@lovrabet/rabetbase-cli 2.5.5 → 2.5.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/README.md +15 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/detail.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/logs.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/batch-design.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/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.d.ts +1 -0
- package/lib/commands/dataset/design-context.js +1 -0
- package/lib/commands/dataset/design-start.d.ts +1 -0
- package/lib/commands/dataset/design-start.js +1 -0
- package/lib/commands/dataset/design-status.d.ts +1 -0
- package/lib/commands/dataset/design-status.js +1 -0
- package/lib/commands/dataset/design-sync-retry.d.ts +1 -0
- package/lib/commands/dataset/design-sync-retry.js +1 -0
- package/lib/commands/dataset/design-sync-status.d.ts +1 -0
- package/lib/commands/dataset/design-sync-status.js +1 -0
- package/lib/commands/dataset/design-validate.d.ts +1 -0
- package/lib/commands/dataset/design-validate.js +1 -0
- 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/cross-db-analysis-shared.d.ts +40 -0
- package/lib/commands/db/cross-db-analysis-shared.js +1 -0
- package/lib/commands/db/cross-db-analyze-latest.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-latest.js +1 -0
- package/lib/commands/db/cross-db-analyze-start.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-start.js +1 -0
- package/lib/commands/db/cross-db-analyze-status.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-status.js +1 -0
- 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/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.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/api-architecture-upgrade.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/feishu-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.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +18 -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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.d.ts +17 -0
- package/lib/core/cross-db-analysis.js +1 -0
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.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.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/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/services/dataset-design/checkpoint.d.ts +17 -0
- package/lib/services/dataset-design/checkpoint.js +1 -0
- package/lib/services/dataset-design/commands.d.ts +6 -0
- package/lib/services/dataset-design/commands.js +1 -0
- package/lib/services/dataset-design/contract.d.ts +7 -0
- package/lib/services/dataset-design/contract.js +1 -0
- 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/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
- package/skills/rabetbase/SKILL.md +9 -7
- package/skills/rabetbase/guides/database-connection-workflow.md +12 -3
- package/skills/rabetbase/guides/independent-deployment.md +10 -2
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +2 -0
- package/skills/rabetbase/references/rabetbase-dataset-design.md +25 -0
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +2 -255
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-cross-analyze.md +78 -0
- package/skills/rabetbase-dataset-generation/SKILL.md +45 -0
- package/skills/rabetbase-dataset-generation/references/workflow.md +60 -0
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57f197,_0x597d91){const _0x496f01=a60_0x12f3,_0x1a846a=_0x57f197();while(!![]){try{const _0x207c53=parseInt(_0x496f01(0x191))/0x1+-parseInt(_0x496f01(0x195))/0x2+-parseInt(_0x496f01(0x18e))/0x3*(-parseInt(_0x496f01(0x18f))/0x4)+parseInt(_0x496f01(0x190))/0x5+parseInt(_0x496f01(0x193))/0x6+-parseInt(_0x496f01(0x192))/0x7*(parseInt(_0x496f01(0x196))/0x8)+-parseInt(_0x496f01(0x194))/0x9;if(_0x207c53===_0x597d91)break;else _0x1a846a['push'](_0x1a846a['shift']());}catch(_0x9806f4){_0x1a846a['push'](_0x1a846a['shift']());}}}(a60_0x48ee,0x78d3f));function a60_0x48ee(){const _0x3d515f=['460376OkfOWF','84gxtZfo','120108fhQElo','4228095NAPxYK','250966brQrNk','7XgcvAA','5546922vieBiE','16598610PZcAxb','930160VyfqrN'];a60_0x48ee=function(){return _0x3d515f;};return a60_0x48ee();}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';function a60_0x12f3(_0x9438db,_0x27e55f){_0x9438db=_0x9438db-0x18e;const _0x48ee2c=a60_0x48ee();let _0x12f3cb=_0x48ee2c[_0x9438db];return _0x12f3cb;}import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x25ee96=a61_0x22c8;function a61_0x5979(){const _0x5cbd0b=['skill-domain','validation','string','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','8lrBiDe','2239315xUUpzU','kb-service-domain','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','Region\x20\x22','4ZGXLRv','Custom\x20platform\x20API\x20HTTPS\x20origin','str','routing','6576101hMdFgy','Custom\x20SkillHub\x20HTTPS\x20origin','write','Custom\x20local\x20callback\x20HTTPS\x20origin','30654TNfNqF','nonInteractive','Custom\x20KB\x20Service\x20HTTPS\x20origin','bool','Custom\x20Runtime\x20HTTPS\x20origin','project','independent','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','user-domain','assign','Select\x20Lovrabet\x20region','kb-domain','domain-config','label','Official\x20Lovrabet\x20region:\x20','2260mZAlIj','Independent-deployment\x20Domain\x20JSON\x20file','region','4002476QYprpo','Custom\x20User\x20HTTPS\x20origin','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','join','official','config','enterprise-v1','keys','localDomain','certificate-domain','5464184LgmWza','length','60HwizEU','runtime-domain','global','134007HyeWlw','manifestDomains','init','cancelled','Custom\x20knowledge-base\x20HTTPS\x20origin','2943618AWZufD','\x22\x20is\x20not\x20currently\x20available.','3RbaOgP','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','local-domain','api-domain','mode','cdn'];a61_0x5979=function(){return _0x5cbd0b;};return a61_0x5979();}(function(_0x18de8a,_0x32378b){const _0x4a5a6f=a61_0x22c8,_0x4b919a=_0x18de8a();while(!![]){try{const _0x113fcf=parseInt(_0x4a5a6f(0x1a7))/0x1*(parseInt(_0x4a5a6f(0x17e))/0x2)+parseInt(_0x4a5a6f(0x1ae))/0x3*(parseInt(_0x4a5a6f(0x198))/0x4)+-parseInt(_0x4a5a6f(0x17a))/0x5+parseInt(_0x4a5a6f(0x1ac))/0x6+parseInt(_0x4a5a6f(0x182))/0x7*(parseInt(_0x4a5a6f(0x179))/0x8)+parseInt(_0x4a5a6f(0x186))/0x9*(parseInt(_0x4a5a6f(0x195))/0xa)+-parseInt(_0x4a5a6f(0x1a2))/0xb*(parseInt(_0x4a5a6f(0x1a4))/0xc);if(_0x113fcf===_0x32378b)break;else _0x4b919a['push'](_0x4b919a['shift']());}catch(_0x5798d1){_0x4b919a['push'](_0x4b919a['shift']());}}}(a61_0x5979,0x83114));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';function a61_0x22c8(_0x4ea085,_0x49b124){_0x4ea085=_0x4ea085-0x179;const _0x59793d=a61_0x5979();let _0x22c8e0=_0x59793d[_0x4ea085];return _0x22c8e0;}export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a61_0x25ee96(0x197),'type':a61_0x25ee96(0x1b6),'description':a61_0x25ee96(0x194)+ENABLED_LOVRABET_REGION_VALUES[a61_0x25ee96(0x19b)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a61_0x25ee96(0x192),'type':a61_0x25ee96(0x1b6),'description':a61_0x25ee96(0x196)},{'name':a61_0x25ee96(0x18e),'type':a61_0x25ee96(0x1b6),'description':a61_0x25ee96(0x199)},{'name':a61_0x25ee96(0x1b1),'type':a61_0x25ee96(0x1b6),'description':a61_0x25ee96(0x17f)},{'name':a61_0x25ee96(0x1a5),'type':a61_0x25ee96(0x1b6),'description':a61_0x25ee96(0x18a)},{'name':a61_0x25ee96(0x1b4),'type':a61_0x25ee96(0x1b6),'description':a61_0x25ee96(0x183)},{'name':a61_0x25ee96(0x191),'type':a61_0x25ee96(0x1b6),'description':a61_0x25ee96(0x1ab)},{'name':a61_0x25ee96(0x17b),'type':a61_0x25ee96(0x1b6),'description':a61_0x25ee96(0x188)},{'name':'app-domain','type':a61_0x25ee96(0x1b6),'description':a61_0x25ee96(0x17c)},{'name':a61_0x25ee96(0x1b0),'type':a61_0x25ee96(0x1b6),'description':a61_0x25ee96(0x185)},{'name':a61_0x25ee96(0x1a1),'type':a61_0x25ee96(0x1b6),'description':'Custom\x20certificate\x20service\x20HTTPS\x20origin'}];async function resolveRegion(_0x4b1ad7){const _0x4016eb=a61_0x25ee96,_0x3f212d=_0x4b1ad7[_0x4016eb(0x180)](_0x4016eb(0x197));if(_0x3f212d){if(!isEnabledLovrabetRegion(_0x3f212d))throw CliErrors[_0x4016eb(0x1b5)](_0x4016eb(0x17d)+_0x3f212d+_0x4016eb(0x1ad),'Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES[_0x4016eb(0x19b)](',\x20'));return _0x3f212d;}if(_0x4b1ad7[_0x4016eb(0x187)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x4016eb(0x190),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x333e40=>({'name':getOfficialRoutingProfile(_0x333e40)[_0x4016eb(0x193)]+'\x20('+_0x333e40+')','value':_0x333e40}))});}catch(_0x446bfb){if(_0x446bfb?.['name']==='ExitPromptError')throw CliErrors[_0x4016eb(0x1aa)]();throw _0x446bfb;}}export async function executeConfigInit(_0x1008c1){const _0x1dfd76=a61_0x25ee96,_0x266517=resolveDomainConfigInput(_0x1008c1),_0xd755c2=_0x266517['domains'],_0x48977f=Object['keys'](_0xd755c2)[_0x1dfd76(0x1a3)]>0x0;if(_0x48977f&&_0x1008c1[_0x1dfd76(0x180)](_0x1dfd76(0x197)))throw CliErrors['validation']('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');if(!!_0xd755c2[_0x1dfd76(0x1a0)]!==!!_0xd755c2['certificateDomain'])throw CliErrors[_0x1dfd76(0x1b5)](_0x1dfd76(0x19a));const _0x2d5e17=_0x1008c1[_0x1dfd76(0x189)](_0x1dfd76(0x1a6))?'global':_0x1dfd76(0x18b),_0x4ef66a=readScopedConfig(_0x2d5e17);for(const _0x46a1d2 of DOMAIN_CONFIG_FIELDS)delete _0x4ef66a[_0x46a1d2];for(const _0x1f52b9 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x4ef66a[_0x1f52b9];delete _0x4ef66a[_0x1dfd76(0x181)];let _0x2b7fcc=null;if(_0x48977f)delete _0x4ef66a[_0x1dfd76(0x197)],_0x266517[_0x1dfd76(0x1b2)]===_0x1dfd76(0x19e)?_0x4ef66a[_0x1dfd76(0x181)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x266517[_0x1dfd76(0x1a8)],'cdn':_0x266517[_0x1dfd76(0x1b3)]}:Object[_0x1dfd76(0x18f)](_0x4ef66a,_0xd755c2);else{_0x2b7fcc=await resolveRegion(_0x1008c1);if(_0x2b7fcc===DEFAULT_LOVRABET_REGION)delete _0x4ef66a[_0x1dfd76(0x197)];else _0x4ef66a[_0x1dfd76(0x197)]=_0x2b7fcc;}return writeScopedConfig(_0x4ef66a,_0x2d5e17),{'ok':!![],'message':_0x48977f?'Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20'+Object[_0x1dfd76(0x19f)](_0x266517['mode']===_0x1dfd76(0x19e)?_0x266517[_0x1dfd76(0x1a8)]:_0xd755c2)[_0x1dfd76(0x19b)](',\x20')+'.':_0x1dfd76(0x1af)+_0x2b7fcc+'.','data':{'mode':_0x48977f?_0x1dfd76(0x18c):_0x1dfd76(0x19c),'protocol':_0x266517['mode']===_0x1dfd76(0x19e)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x2b7fcc,'domains':_0xd755c2,'cdn':_0x266517[_0x1dfd76(0x1b2)]===_0x1dfd76(0x19e)?_0x266517['cdn']:undefined}};}export const configInitDefinition={'service':a61_0x25ee96(0x19d),'command':a61_0x25ee96(0x1a9),'description':a61_0x25ee96(0x1b7),'risk':a61_0x25ee96(0x184),'confirmationDescription':a61_0x25ee96(0x18d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x31f1d8=a62_0xbc86;(function(_0x37df98,_0x1d2020){const _0x471a38=a62_0xbc86,_0x58b0dc=_0x37df98();while(!![]){try{const _0x14b888=-parseInt(_0x471a38(0xf6))/0x1+-parseInt(_0x471a38(0xed))/0x2*(-parseInt(_0x471a38(0xee))/0x3)+parseInt(_0x471a38(0xf2))/0x4*(-parseInt(_0x471a38(0xf0))/0x5)+-parseInt(_0x471a38(0xeb))/0x6+-parseInt(_0x471a38(0xe7))/0x7+parseInt(_0x471a38(0xf5))/0x8+parseInt(_0x471a38(0xe8))/0x9;if(_0x14b888===_0x1d2020)break;else _0x58b0dc['push'](_0x58b0dc['shift']());}catch(_0x1cc181){_0x58b0dc['push'](_0x58b0dc['shift']());}}}(a62_0x9f6a,0xd6c5b));import{readScopedConfig}from'../../commands/config/shared.js';function a62_0xbc86(_0x4384bc,_0x4528e1){_0x4384bc=_0x4384bc-0xe7;const _0x9f6ac7=a62_0x9f6a();let _0xbc865a=_0x9f6ac7[_0x4384bc];return _0xbc865a;}import{readConfig}from'../../utils/config.js';async function execute(_0xcae4d6){const _0x40fdf8=a62_0xbc86,_0x462d21=_0xcae4d6[_0x40fdf8(0xea)]('global')?readScopedConfig(_0x40fdf8(0xe9)):readConfig();return{'ok':!![],'data':_0x462d21};}function a62_0x9f6a(){const _0x318063=['817823xMbtHJ','11579547ZPZNjQ','22711410QtJZtz','global','bool','4828182JqjoeR','List\x20all\x20config\x20values','796pqqvrJ','11091dYqDeX','read','2555iEvbWe','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','1636lziPTb','config','boolean','2964408zaiweP'];a62_0x9f6a=function(){return _0x318063;};return a62_0x9f6a();}export const configListDefinition={'service':a62_0x31f1d8(0xf3),'command':'list','description':a62_0x31f1d8(0xec),'risk':a62_0x31f1d8(0xef),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x31f1d8(0xe9),'type':a62_0x31f1d8(0xf4),'description':a62_0x31f1d8(0xf1),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x8fd6e9=a63_0x5dc9;function a63_0x502f(){const _0xcf6fc5=['set','includes','2307FNrZWR','write','476PefucZ','40gsdwAx','Project','env','2706WAFJrY','354510HPAnFY','validation','Config\x20value','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','value','length','bool','2ryldWt','\x20set\x20to:\x20','Invalid\x20value\x20for\x20\x22','201785QKDxah','1790zDRmrb','boolean','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','125113VzeaTp','Missing\x20key.','Usage:\x20','Set\x20a\x20config\x20value','global','\x20workspace\x20add\x20<name>\x20--appcode\x20','locale','appcode','object','`,\x20`','306936FgBenS','riskLevel','\x20appcode\x20set\x20to:\x20','Missing\x20value.','key','str','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','39BUcjdY','apps','join','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','7qCEtPU','Settable\x20top-level\x20keys:\x20','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','string','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Top-level\x20key\x20\x22','app','116163aMQips'];a63_0x502f=function(){return _0xcf6fc5;};return a63_0x502f();}(function(_0x2a272f,_0x505677){const _0x2889bc=a63_0x5dc9,_0x383abe=_0x2a272f();while(!![]){try{const _0x5a2999=parseInt(_0x2889bc(0x1ea))/0x1*(parseInt(_0x2889bc(0x1e3))/0x2)+-parseInt(_0x2889bc(0x1d5))/0x3*(-parseInt(_0x2889bc(0x1d7))/0x4)+parseInt(_0x2889bc(0x1e6))/0x5+parseInt(_0x2889bc(0x1dc))/0x6*(-parseInt(_0x2889bc(0x1ca))/0x7)+-parseInt(_0x2889bc(0x1d8))/0x8*(parseInt(_0x2889bc(0x1d2))/0x9)+-parseInt(_0x2889bc(0x1e7))/0xa*(-parseInt(_0x2889bc(0x1db))/0xb)+-parseInt(_0x2889bc(0x1f4))/0xc*(parseInt(_0x2889bc(0x1c6))/0xd);if(_0x5a2999===_0x505677)break;else _0x383abe['push'](_0x383abe['shift']());}catch(_0x5f5c76){_0x383abe['push'](_0x383abe['shift']());}}}(a63_0x502f,0x18935));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x17aced){const _0x1849a9=a63_0x5dc9,_0x178b15=_0x17aced[_0x1849a9(0x1c4)](_0x1849a9(0x1c3)),_0x2ffaa7=_0x17aced['str'](_0x1849a9(0x1e0));if(!_0x178b15)throw CliErrors[_0x1849a9(0x1dd)](_0x1849a9(0x1eb),_0x1849a9(0x1ec)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x2ffaa7===undefined||_0x2ffaa7==='')throw CliErrors[_0x1849a9(0x1dd)](_0x1849a9(0x1c2),_0x1849a9(0x1ec)+CLI_BIN_NAME+_0x1849a9(0x1cf));let _0x3c7591=_0x178b15,_0x4b8a02=_0x2ffaa7;if(_0x2ffaa7[_0x1849a9(0x1e1)]>0x1f4)throw CliErrors['validation']('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(_0x178b15===_0x1849a9(0x1f5))throw CliErrors['validation'](_0x1849a9(0x1df));if(!isTopLevelConfigKey(_0x178b15))throw CliErrors[_0x1849a9(0x1dd)](_0x1849a9(0x1d0)+_0x178b15+'\x22\x20is\x20not\x20settable.',_0x1849a9(0x1cb)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x178b15]&&!CONFIG_ENUM_VALUES[_0x178b15]['includes'](_0x2ffaa7))throw CliErrors[_0x1849a9(0x1dd)](_0x1849a9(0x1e5)+_0x178b15+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x178b15][_0x1849a9(0x1c8)](',\x20'));if(_0x178b15===_0x1849a9(0x1f0)&&!normalizeLocale(_0x2ffaa7))throw CliErrors[_0x1849a9(0x1dd)]('Invalid\x20locale\x20value.',_0x1849a9(0x1ce));DOMAIN_CONFIG_FIELDS[_0x1849a9(0x1d4)](_0x178b15)&&(_0x4b8a02=normalizeDomainOrigin(_0x178b15,_0x2ffaa7));const _0xe845e={'global':_0x17aced[_0x1849a9(0x1e2)]('global')},_0x5d367c=resolveWriteScope(_0xe845e),_0x2817b1=readScopedConfig(_0x5d367c);_0x178b15===_0x1849a9(0x1d1)&&(_0x3c7591=_0x1849a9(0x1f1),delete _0x2817b1['app']);_0x178b15===_0x1849a9(0x1f0)&&(_0x4b8a02=normalizeLocale(_0x2ffaa7));if(_0x178b15===_0x1849a9(0x1da)){_0x4b8a02=normalizeEnv(_0x2ffaa7);if(!isProduction(_0x4b8a02)&&!isDaily(_0x4b8a02))throw CliErrors[_0x1849a9(0x1dd)](_0x1849a9(0x1c9),_0x1849a9(0x1cc));}if(_0x178b15==='appcode'){const _0x3ee8d5=_0x2817b1['apps']&&typeof _0x2817b1[_0x1849a9(0x1c7)]===_0x1849a9(0x1f2)?Object['keys'](_0x2817b1[_0x1849a9(0x1c7)]):[];if(_0x3ee8d5['length']>0x0)throw CliErrors[_0x1849a9(0x1dd)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Use\x20`'+CLI_BIN_NAME+_0x1849a9(0x1ef)+_0x4b8a02+_0x1849a9(0x1f3)+CLI_BIN_NAME+_0x1849a9(0x1e9));const _0x5d86d5=buildCanonicalProjectConfig({..._0x2817b1},{'appCodes':[_0x4b8a02],'env':typeof _0x2817b1[_0x1849a9(0x1da)]===_0x1849a9(0x1cd)?_0x2817b1[_0x1849a9(0x1da)]:undefined});writeScopedConfig(_0x5d86d5,_0x5d367c);const _0x2b94e5=_0x5d367c===_0x1849a9(0x1ee)?'Global':_0x1849a9(0x1d9);return{'ok':!![],'message':'✓\x20'+_0x2b94e5+_0x1849a9(0x1c1)+_0x4b8a02+_0x1849a9(0x1c5)};}_0x2817b1[_0x3c7591]=_0x4b8a02,writeScopedConfig(_0x2817b1,_0x5d367c);const _0x5af542=_0x5d367c===_0x1849a9(0x1ee)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x5af542+'\x20'+_0x3c7591+_0x1849a9(0x1e4)+_0x4b8a02};}function a63_0x5dc9(_0xa09718,_0x173718){_0xa09718=_0xa09718-0x1c1;const _0x502fc4=a63_0x502f();let _0x5dc946=_0x502fc4[_0xa09718];return _0x5dc946;}export const configSetDefinition={'service':'config','command':a63_0x8fd6e9(0x1d3),'description':a63_0x8fd6e9(0x1ed),'risk':a63_0x8fd6e9(0x1d6),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a63_0x8fd6e9(0x1c3),'type':a63_0x8fd6e9(0x1cd),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a63_0x8fd6e9(0x1e0),'type':a63_0x8fd6e9(0x1cd),'description':a63_0x8fd6e9(0x1de),'required':!![]},{'name':a63_0x8fd6e9(0x1ee),'type':a63_0x8fd6e9(0x1e8),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x258411,_0xcc9b75){var _0x3ef0a7=a64_0x4c40,_0x3ea499=_0x258411();while(!![]){try{var _0x2e42c3=parseInt(_0x3ef0a7(0xc8))/0x1*(-parseInt(_0x3ef0a7(0xca))/0x2)+-parseInt(_0x3ef0a7(0xc9))/0x3+-parseInt(_0x3ef0a7(0xce))/0x4+parseInt(_0x3ef0a7(0xc2))/0x5*(-parseInt(_0x3ef0a7(0xc4))/0x6)+-parseInt(_0x3ef0a7(0xcc))/0x7*(-parseInt(_0x3ef0a7(0xc3))/0x8)+-parseInt(_0x3ef0a7(0xc6))/0x9+-parseInt(_0x3ef0a7(0xcd))/0xa*(-parseInt(_0x3ef0a7(0xc1))/0xb);if(_0x2e42c3===_0xcc9b75)break;else _0x3ea499['push'](_0x3ea499['shift']());}catch(_0x244125){_0x3ea499['push'](_0x3ea499['shift']());}}}(a64_0x4d72,0xd2f59));import{CLI_BIN_NAME}from'../../constant/cli.js';function a64_0x4d72(){var _0x1aabd1=['141353hMCAZV','1143567zLqHgY','4bxUOAo','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','121506UQHbYk','10DIFcIi','470992LDrMIb','global','31372275mXGfOE','5fqOiEs','256BVDQky','10098204WucFea','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','708435GDLqRd','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).'];a64_0x4d72=function(){return _0x1aabd1;};return a64_0x4d72();}import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};function a64_0x4c40(_0x368c63,_0x2582de){_0x368c63=_0x368c63-0xc1;var _0x4d72df=a64_0x4d72();var _0x4c4006=_0x4d72df[_0x368c63];return _0x4c4006;}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x59b8b8){var _0x507ce5=a64_0x4c40;if(_0x59b8b8[_0x507ce5(0xcf)])return _0x507ce5(0xcf);if(!isInProject())throw CliErrors['validation'](_0x507ce5(0xc7),_0x507ce5(0xc5)+CLI_BIN_NAME+_0x507ce5(0xcb));return'project';}export function readScopedConfig(_0x3d4bbe){return readConfigFile(resolveWriteConfigPath(_0x3d4bbe));}export function writeScopedConfig(_0x533f58,_0x43d942){writeConfigFile(resolveWriteConfigPath(_0x43d942),_0x533f58);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x36bf80=a65_0x8010;(function(_0xa6836,_0x113aa9){const _0x5856b8=a65_0x8010,_0x2eefdb=_0xa6836();while(!![]){try{const _0xb4ad12=parseInt(_0x5856b8(0x18c))/0x1*(-parseInt(_0x5856b8(0x19b))/0x2)+-parseInt(_0x5856b8(0x1cd))/0x3*(parseInt(_0x5856b8(0x1d2))/0x4)+-parseInt(_0x5856b8(0x186))/0x5*(parseInt(_0x5856b8(0x194))/0x6)+parseInt(_0x5856b8(0x165))/0x7+parseInt(_0x5856b8(0x1d5))/0x8*(-parseInt(_0x5856b8(0x1ab))/0x9)+-parseInt(_0x5856b8(0x191))/0xa+parseInt(_0x5856b8(0x1ce))/0xb*(parseInt(_0x5856b8(0x1c3))/0xc);if(_0xb4ad12===_0x113aa9)break;else _0x2eefdb['push'](_0x2eefdb['shift']());}catch(_0x12a8af){_0x2eefdb['push'](_0x2eefdb['shift']());}}}(a65_0x54a2,0xb2fec));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x36bf80(0x174),a65_0x36bf80(0x16b)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x36bf80(0x1d1),a65_0x36bf80(0x1bd),a65_0x36bf80(0x16d),a65_0x36bf80(0x1d4),a65_0x36bf80(0x196),a65_0x36bf80(0x185),a65_0x36bf80(0x17b),a65_0x36bf80(0x172),a65_0x36bf80(0x18a),a65_0x36bf80(0x197)]);export function isDatasetBatchDesign(_0x1d3c40){const _0x866caf=a65_0x36bf80;return isObject(_0x1d3c40)&&_0x1d3c40[_0x866caf(0x1b0)]===_0x866caf(0x1a7);}export function validateDatasetBatchDesign(_0x3d65cb){const _0x365800=a65_0x36bf80;(!isObject(_0x3d65cb)||_0x3d65cb['kind']!=='dataset-batch')&&fail('Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.');_0x3d65cb['schemaVersion']!==0x1&&fail('Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.');const _0x254b2b=objectArray(_0x3d65cb[_0x365800(0x17e)],_0x365800(0x17e),0x1,0x14),_0xf31f43=objectArray(_0x3d65cb[_0x365800(0x18e)],_0x365800(0x18e),0x0,0xc8),_0x18ab99=objectArray(_0x3d65cb[_0x365800(0x1b9)],_0x365800(0x1b9),0x0,0xc8),_0x3bfc55=new Set(),_0xd3c19d=new Map();for(const [_0x46cef3,_0x64cde3]of _0x254b2b[_0x365800(0x1c4)]()){const _0x4ae704=requiredString(_0x64cde3[_0x365800(0x167)],_0x365800(0x1bf)+_0x46cef3+_0x365800(0x190));!LOCAL_KEY[_0x365800(0x1c0)](_0x4ae704)&&fail(_0x365800(0x1bf)+_0x46cef3+_0x365800(0x18d)+LOCAL_KEY['source']+'.');_0x3bfc55['has'](_0x4ae704)&&fail(_0x365800(0x1ad));_0x3bfc55[_0x365800(0x16f)](_0x4ae704);!isObject(_0x64cde3[_0x365800(0x1a3)])&&fail(_0x365800(0x1bf)+_0x46cef3+'].design\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x64cde3[_0x365800(0x1a3)],'datasets['+_0x46cef3+_0x365800(0x1b7));if(!isObject(_0x64cde3[_0x365800(0x1a3)][_0x365800(0x176)]))fail(_0x365800(0x1bf)+_0x46cef3+_0x365800(0x177));rejectServerDatasetIdentity(_0x64cde3[_0x365800(0x1a3)][_0x365800(0x176)],_0x365800(0x1bf)+_0x46cef3+_0x365800(0x195)),requiredString(_0x64cde3[_0x365800(0x1a3)][_0x365800(0x176)][_0x365800(0x179)],'datasets['+_0x46cef3+'].design.dataset.datasetName');_0x365800(0x18e)in _0x64cde3[_0x365800(0x1a3)]&&(!Array[_0x365800(0x1c2)](_0x64cde3[_0x365800(0x1a3)][_0x365800(0x18e)])||_0x64cde3['design'][_0x365800(0x18e)][_0x365800(0x1c8)]!==0x0)&&fail('datasets['+_0x46cef3+'].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.');const _0xe5297a=objectArray(_0x64cde3[_0x365800(0x1a3)][_0x365800(0x19e)],_0x365800(0x1bf)+_0x46cef3+_0x365800(0x1a2),0x1,0xc8),_0xb6c55d=new Map();for(const [_0x5b2311,_0x4d3a92]of _0xe5297a[_0x365800(0x1c4)]()){const _0x32408d=fieldName(_0x4d3a92);if(!_0x32408d)fail(_0x365800(0x1bf)+_0x46cef3+'].design.fields['+_0x5b2311+']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.');const _0x48d701=_0x32408d[_0x365800(0x16a)]();if(_0xb6c55d[_0x365800(0x1d0)](_0x48d701))fail(_0x365800(0x188)+_0x4ae704+_0x365800(0x1c9));const _0x21a252=stringValue(_0x4d3a92[_0x365800(0x170)]??_0x4d3a92[_0x365800(0x1d6)])[_0x365800(0x193)]();if(!SUPPORTED_FIELD_TYPES['has'](_0x21a252))fail(_0x365800(0x1bf)+_0x46cef3+_0x365800(0x1ca)+_0x5b2311+_0x365800(0x1ba));_0xb6c55d[_0x365800(0x198)](_0x48d701,_0x21a252),[_0x4d3a92[_0x365800(0x17a)],_0x4d3a92[_0x365800(0x19c)],_0x4d3a92['refTableLabelField']]['some'](_0x550550=>stringValue(_0x550550))&&fail('datasets['+_0x46cef3+_0x365800(0x1ca)+_0x5b2311+_0x365800(0x1b4));}_0xd3c19d[_0x365800(0x198)](_0x4ae704,_0xb6c55d);}const _0x21f21f=new Set(),_0xe6e523=new Set();for(const [_0x217ad7,_0x5a1d27]of _0xf31f43[_0x365800(0x1c4)]()){const _0x5b1a30=validateRelation(_0x5a1d27,_0x217ad7,_0x3bfc55,_0xd3c19d);if(_0x21f21f[_0x365800(0x1d0)](_0x5b1a30))fail(_0x365800(0x183));_0x21f21f['add'](_0x5b1a30);const _0x311497=_0x5b1a30[_0x365800(0x1b8)]('\x00',0x2)['join']('\x00');if(_0xe6e523[_0x365800(0x1d0)](_0x311497))fail(_0x365800(0x1d3));_0xe6e523['add'](_0x311497);}for(const [_0x27db3f,_0x868221]of _0x18ab99['entries']()){requiredString(_0x868221[_0x365800(0x1aa)],'unresolvedRelations['+_0x27db3f+_0x365800(0x18f)),validateConfidence(_0x868221[_0x365800(0x16e)],_0x365800(0x175)+_0x27db3f+_0x365800(0x1a4));}return _0x3d65cb;}export function reconcileBatchResult(_0x586783){const _0x4b1b54=a65_0x36bf80;if(!isObject(_0x586783))return null;try{const _0x487c29=stringArray(_0x586783['expectedLocalKeys'],_0x4b1b54(0x163),0x1,0x14),_0x1da093=new Set(_0x487c29);if(_0x1da093['size']!==_0x487c29[_0x4b1b54(0x1c8)]||_0x487c29[_0x4b1b54(0x18b)](_0x2298bf=>!LOCAL_KEY[_0x4b1b54(0x1c0)](_0x2298bf)))return null;const _0x1b9304=objectArray(_0x586783[_0x4b1b54(0x1bb)],_0x4b1b54(0x1bb),0x1,0x14),_0x4498f1=new Map(),_0xe5f922=new Set();for(const _0x504ba8 of _0x1b9304){const _0x579aab=requiredString(_0x504ba8[_0x4b1b54(0x167)],'createdDatasets[].localKey'),_0x6c83bb=requiredString(_0x504ba8[_0x4b1b54(0x1b6)]??_0x504ba8[_0x4b1b54(0x161)],_0x4b1b54(0x1c5));if(_0x4498f1[_0x4b1b54(0x1d0)](_0x579aab)||_0xe5f922[_0x4b1b54(0x1d0)](_0x6c83bb))return null;_0x4498f1[_0x4b1b54(0x198)](_0x579aab,_0x6c83bb),_0xe5f922[_0x4b1b54(0x16f)](_0x6c83bb);}if(!sameSet(_0x1da093,new Set(_0x4498f1[_0x4b1b54(0x1a9)]())))return null;const _0x33dccd=objectArray(_0x586783[_0x4b1b54(0x187)],'expectedRelations',0x0,0xc8),_0x561c5e=objectArray(_0x586783[_0x4b1b54(0x178)],_0x4b1b54(0x178),0x0,0xc8),_0x5dec80=relationTupleSet(_0x33dccd,![],_0x4498f1),_0x113f1c=relationTupleSet(_0x561c5e,!![],_0x4498f1);if(!_0x5dec80||!_0x113f1c||!sameSet(_0x5dec80,_0x113f1c))return null;const _0x36c317=objectArray(_0x586783[_0x4b1b54(0x1b9)],'unresolvedRelations',0x0,0xc8);return{'expectedLocalKeys':_0x487c29,'expectedRelations':_0x33dccd,'createdDatasets':_0x1b9304,'createdRelations':_0x561c5e,'unresolvedRelations':_0x36c317,...isObject(_0x586783['metrics'])?{'metrics':_0x586783[_0x4b1b54(0x173)]}:{}};}catch{return null;}}function validateRelation(_0x51c3a4,_0x29e6c0,_0x171ad1,_0x5b9783){const _0x43bd07=a65_0x36bf80,_0x439460=_0x43bd07(0x17c)+_0x29e6c0+']',_0x20d41e=requiredString(_0x51c3a4[_0x43bd07(0x171)],_0x439460+_0x43bd07(0x1cc)),_0x2d5f91=requiredString(_0x51c3a4[_0x43bd07(0x1a6)],_0x439460+_0x43bd07(0x1ae)),_0xb89aa5=requiredString(_0x51c3a4[_0x43bd07(0x169)],_0x439460+_0x43bd07(0x1a1))[_0x43bd07(0x16a)](),_0xd53c77=requiredString(_0x51c3a4[_0x43bd07(0x19a)],_0x439460+_0x43bd07(0x1cb))[_0x43bd07(0x16a)]();if(!_0x171ad1[_0x43bd07(0x1d0)](_0x20d41e)||!_0x171ad1[_0x43bd07(0x1d0)](_0x2d5f91))fail(_0x439460+_0x43bd07(0x182));const _0xa7a157=_0x5b9783[_0x43bd07(0x180)](_0x20d41e)?.[_0x43bd07(0x180)](_0xb89aa5),_0x4bbe42=_0x5b9783['get'](_0x2d5f91)?.[_0x43bd07(0x180)](_0xd53c77);if(_0xa7a157===undefined||_0x4bbe42===undefined)fail(_0x439460+_0x43bd07(0x1af));if(_0xa7a157&&_0x4bbe42&&_0xa7a157!==_0x4bbe42)fail(_0x439460+_0x43bd07(0x192));const _0x290a9e=stringValue(_0x51c3a4[_0x43bd07(0x1a8)])||_0x43bd07(0x19f);if(_0x290a9e!==_0x43bd07(0x19f))fail(_0x439460+'.relationType\x20must\x20be\x20\x22lookup\x22.');const _0x708584=stringValue(_0x51c3a4[_0x43bd07(0x1cf)])||_0x43bd07(0x174);if(!SUPPORTED_CARDINALITIES[_0x43bd07(0x1d0)](_0x708584))fail(_0x439460+_0x43bd07(0x1ac));return requiredString(_0x51c3a4[_0x43bd07(0x1aa)],_0x439460+_0x43bd07(0x184)),validateConfidence(_0x51c3a4[_0x43bd07(0x16e)],_0x439460+_0x43bd07(0x1be)),tuple(_0x20d41e,_0xb89aa5,_0x2d5f91,_0xd53c77,_0x43bd07(0x19f),_0x708584);}function a65_0x54a2(){const _0x32cb04=['.confidence','datasets[','test','fieldName','isArray','384LqiNUv','entries','createdDatasets[].code','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','number','length','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','].design.fields[','.toField','.fromDatasetKey','21jxnkRH','1352153Ruiwvz','cardinality','has','TEXT','622988ffDNcX','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','BOOLEAN','16bFEPBG','fieldType','datasetCode','string','expectedLocalKeys','\x20must\x20be\x20between\x200\x20and\x201.','6107318uCzhQE','name','localKey','every','fromField','toLowerCase','ONE_TO_ONE','modelId','DATETIME','confidence','add','type','fromDatasetKey','USER','metrics','MANY_TO_ONE','unresolvedRelations[','dataset','].design.dataset\x20must\x20be\x20an\x20object.','createdRelations','datasetName','refTable','DATE_RANGE','relations[','toDatasetCode','datasets','trim','get','\x20non-empty\x20strings.','\x20references\x20an\x20unknown\x20dataset\x20localKey.','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','.reason','MULTI_SELECT','145XqLgFd','expectedRelations','Dataset\x20','join','ADDRESS','some','1072712IOtnMR','].localKey\x20must\x20match\x20','relations','].reason','].localKey','6330880CcuScH','\x20connects\x20incompatible\x20field\x20types.','toUpperCase','213474OQQMVN','].design.dataset','SELECT','UPLOAD','set','modelCode','toField','2IAXvTi','refTableField','validation','fields','lookup','\x20is\x20required.','.fromField','].design.fields','design','].confidence','map','toDatasetKey','dataset-batch','relationType','keys','reason','1102617mJtcGi','.cardinality\x20is\x20not\x20supported.','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','.toDatasetKey','\x20references\x20an\x20unknown\x20field.','kind','\x20must\x20contain\x20','size','fromDatasetCode',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','object','code','].design','split','unresolvedRelations','].type\x20is\x20not\x20supported.','createdDatasets','datasetId','NUMBER'];a65_0x54a2=function(){return _0x32cb04;};return a65_0x54a2();}function relationTupleSet(_0x2a133d,_0x2b9774,_0x109561){const _0x18f30d=a65_0x36bf80,_0x42c25f=new Set();for(const _0x54612a of _0x2a133d){const _0x1ce1e6=stringValue(_0x54612a[_0x18f30d(0x171)]),_0x2754ef=stringValue(_0x54612a[_0x18f30d(0x1a6)]),_0x3ec686=stringValue(_0x54612a[_0x18f30d(0x169)])[_0x18f30d(0x16a)](),_0x1f3314=stringValue(_0x54612a[_0x18f30d(0x19a)])['toLowerCase'](),_0x584f93=stringValue(_0x54612a[_0x18f30d(0x1a8)]),_0x122315=stringValue(_0x54612a['cardinality']);if(!_0x1ce1e6||!_0x2754ef||!_0x3ec686||!_0x1f3314||_0x584f93!==_0x18f30d(0x19f)||!SUPPORTED_CARDINALITIES[_0x18f30d(0x1d0)](_0x122315))return null;if(!_0x109561['has'](_0x1ce1e6)||!_0x109561['has'](_0x2754ef))return null;if(_0x2b9774&&(stringValue(_0x54612a[_0x18f30d(0x1b3)])!==_0x109561[_0x18f30d(0x180)](_0x1ce1e6)||stringValue(_0x54612a[_0x18f30d(0x17d)])!==_0x109561[_0x18f30d(0x180)](_0x2754ef)))return null;const _0x1bdeff=tuple(_0x1ce1e6,_0x3ec686,_0x2754ef,_0x1f3314,_0x584f93,_0x122315);if(_0x42c25f[_0x18f30d(0x1d0)](_0x1bdeff))return null;_0x42c25f['add'](_0x1bdeff);}return _0x42c25f;}function rejectServerDatasetIdentity(_0x394c4e,_0x30d5a8){const _0x4b0409=a65_0x36bf80;for(const _0x113f96 of['id',_0x4b0409(0x1bc),_0x4b0409(0x16c),_0x4b0409(0x1b6),'datasetCode',_0x4b0409(0x199)]){if(_0x394c4e[_0x113f96]!==undefined&&_0x394c4e[_0x113f96]!==null&&_0x394c4e[_0x113f96]!=='')fail(_0x30d5a8+'.'+_0x113f96+_0x4b0409(0x1c6));}}function objectArray(_0xacab99,_0x471246,_0x341a11,_0x2ec114){const _0x121f0f=a65_0x36bf80;return(!Array['isArray'](_0xacab99)||_0xacab99[_0x121f0f(0x1c8)]<_0x341a11||_0xacab99[_0x121f0f(0x1c8)]>_0x2ec114||_0xacab99['some'](_0x1ab5f3=>!isObject(_0x1ab5f3)))&&fail(_0x471246+_0x121f0f(0x1b1)+_0x341a11+'..'+_0x2ec114+'\x20objects.'),_0xacab99;}function stringArray(_0x327e61,_0x514cd1,_0x23ea93,_0x5a62a7){const _0x4f913c=a65_0x36bf80;return(!Array[_0x4f913c(0x1c2)](_0x327e61)||_0x327e61['length']<_0x23ea93||_0x327e61[_0x4f913c(0x1c8)]>_0x5a62a7||_0x327e61[_0x4f913c(0x18b)](_0x46eca8=>typeof _0x46eca8!==_0x4f913c(0x162)||!_0x46eca8[_0x4f913c(0x17f)]()))&&fail(_0x514cd1+_0x4f913c(0x1b1)+_0x23ea93+'..'+_0x5a62a7+_0x4f913c(0x181)),_0x327e61;}function requiredString(_0x426bf2,_0x1e8f38){const _0x231081=a65_0x36bf80,_0x318e7e=stringValue(_0x426bf2);if(!_0x318e7e)fail(_0x1e8f38+_0x231081(0x1a0));return _0x318e7e;}function stringValue(_0x3b8ad1){const _0x4e0068=a65_0x36bf80;return typeof _0x3b8ad1===_0x4e0068(0x162)?_0x3b8ad1['trim']():'';}function fieldName(_0x18df92){const _0x1376c1=a65_0x36bf80;return stringValue(_0x18df92['code']??_0x18df92['fieldCode']??_0x18df92[_0x1376c1(0x166)]??_0x18df92[_0x1376c1(0x1c1)]);}function validateConfidence(_0x297226,_0x56d6e7){const _0xd08fe9=a65_0x36bf80;_0x297226!==undefined&&_0x297226!==null&&(typeof _0x297226!==_0xd08fe9(0x1c7)||!Number['isFinite'](_0x297226)||_0x297226<0x0||_0x297226>0x1)&&fail(_0x56d6e7+_0xd08fe9(0x164));}function tuple(..._0x46884f){const _0x4635ef=a65_0x36bf80;return _0x46884f[_0x4635ef(0x1a5)]((_0x2c6053,_0x2328eb)=>_0x2328eb===0x1||_0x2328eb===0x3?_0x2c6053['toLowerCase']():_0x2c6053)[_0x4635ef(0x189)]('\x00');}function a65_0x8010(_0x2fe6c3,_0x2378a4){_0x2fe6c3=_0x2fe6c3-0x161;const _0x54a2e2=a65_0x54a2();let _0x8010a=_0x54a2e2[_0x2fe6c3];return _0x8010a;}function sameSet(_0x864f87,_0x1373ad){const _0x33c6ca=a65_0x36bf80;return _0x864f87['size']===_0x1373ad[_0x33c6ca(0x1b2)]&&[..._0x864f87][_0x33c6ca(0x168)](_0x4b627d=>_0x1373ad[_0x33c6ca(0x1d0)](_0x4b627d));}function isObject(_0x40e223){const _0x41c812=a65_0x36bf80;return typeof _0x40e223===_0x41c812(0x1b5)&&_0x40e223!==null&&!Array[_0x41c812(0x1c2)](_0x40e223);}function fail(_0x1b0cd6){const _0x23392a=a65_0x36bf80;throw CliErrors[_0x23392a(0x19d)](_0x1b0cd6);}
|
|
1
|
+
const a65_0x240fb9=a65_0x3404;(function(_0x47d01d,_0x4f289b){const _0x3f0215=a65_0x3404,_0x4a0239=_0x47d01d();while(!![]){try{const _0x2f5604=parseInt(_0x3f0215(0x14b))/0x1+-parseInt(_0x3f0215(0x184))/0x2+parseInt(_0x3f0215(0x15b))/0x3*(parseInt(_0x3f0215(0x18d))/0x4)+-parseInt(_0x3f0215(0x1a3))/0x5+parseInt(_0x3f0215(0x19f))/0x6*(-parseInt(_0x3f0215(0x15e))/0x7)+-parseInt(_0x3f0215(0x193))/0x8*(parseInt(_0x3f0215(0x188))/0x9)+parseInt(_0x3f0215(0x183))/0xa*(parseInt(_0x3f0215(0x181))/0xb);if(_0x2f5604===_0x4f289b)break;else _0x4a0239['push'](_0x4a0239['shift']());}catch(_0x44c33d){_0x4a0239['push'](_0x4a0239['shift']());}}}(a65_0x474a,0xccfc8));function a65_0x3404(_0x1f26b2,_0xd16804){_0x1f26b2=_0x1f26b2-0x146;const _0x474a4b=a65_0x474a();let _0x34049f=_0x474a4b[_0x1f26b2];return _0x34049f;}import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set(['MANY_TO_ONE',a65_0x240fb9(0x186)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x240fb9(0x15f),a65_0x240fb9(0x170),'DATETIME',a65_0x240fb9(0x163),a65_0x240fb9(0x14a),a65_0x240fb9(0x14e),a65_0x240fb9(0x18e),a65_0x240fb9(0x172),'ADDRESS',a65_0x240fb9(0x19a)]);export function isDatasetBatchDesign(_0xd9e370){const _0x418d8b=a65_0x240fb9;return isObject(_0xd9e370)&&_0xd9e370[_0x418d8b(0x1ad)]===_0x418d8b(0x160);}export function validateDatasetBatchDesign(_0x4c1ff5){const _0x2da541=a65_0x240fb9;(!isObject(_0x4c1ff5)||_0x4c1ff5[_0x2da541(0x1ad)]!==_0x2da541(0x160))&&fail(_0x2da541(0x187));_0x4c1ff5[_0x2da541(0x1a9)]!==0x1&&fail(_0x2da541(0x155));const _0x2d0ebe=objectArray(_0x4c1ff5[_0x2da541(0x173)],_0x2da541(0x173),0x1,0x14),_0x49bc1f=objectArray(_0x4c1ff5[_0x2da541(0x1a0)],_0x2da541(0x1a0),0x0,0xc8),_0x4988b1=objectArray(_0x4c1ff5[_0x2da541(0x148)],_0x2da541(0x148),0x0,0xc8),_0x598140=new Set(),_0xe38206=new Map();for(const [_0x2b4485,_0x107e4e]of _0x2d0ebe[_0x2da541(0x182)]()){const _0x422a24=requiredString(_0x107e4e[_0x2da541(0x199)],_0x2da541(0x177)+_0x2b4485+_0x2da541(0x18c));!LOCAL_KEY['test'](_0x422a24)&&fail(_0x2da541(0x177)+_0x2b4485+_0x2da541(0x15c)+LOCAL_KEY[_0x2da541(0x18b)]+'.');_0x598140['has'](_0x422a24)&&fail(_0x2da541(0x14f));_0x598140[_0x2da541(0x159)](_0x422a24);!isObject(_0x107e4e[_0x2da541(0x189)])&&fail('datasets['+_0x2b4485+_0x2da541(0x1ab));rejectServerDatasetIdentity(_0x107e4e['design'],_0x2da541(0x177)+_0x2b4485+_0x2da541(0x149));if(!isObject(_0x107e4e[_0x2da541(0x189)]['dataset']))fail(_0x2da541(0x177)+_0x2b4485+_0x2da541(0x151));rejectServerDatasetIdentity(_0x107e4e[_0x2da541(0x189)][_0x2da541(0x165)],_0x2da541(0x177)+_0x2b4485+_0x2da541(0x1a2)),requiredString(_0x107e4e[_0x2da541(0x189)][_0x2da541(0x165)][_0x2da541(0x17b)],'datasets['+_0x2b4485+_0x2da541(0x168));_0x2da541(0x1a0)in _0x107e4e[_0x2da541(0x189)]&&(!Array[_0x2da541(0x1a1)](_0x107e4e[_0x2da541(0x189)][_0x2da541(0x1a0)])||_0x107e4e[_0x2da541(0x189)]['relations'][_0x2da541(0x1ac)]!==0x0)&&fail('datasets['+_0x2b4485+_0x2da541(0x158));const _0x1e56c5=objectArray(_0x107e4e[_0x2da541(0x189)][_0x2da541(0x1ae)],'datasets['+_0x2b4485+_0x2da541(0x197),0x1,0xc8),_0x59b75a=new Map();for(const [_0x36ffb1,_0x5e6da9]of _0x1e56c5[_0x2da541(0x182)]()){const _0x14e5f8=fieldName(_0x5e6da9);if(!_0x14e5f8)fail(_0x2da541(0x177)+_0x2b4485+'].design.fields['+_0x36ffb1+_0x2da541(0x16a));const _0x23736a=_0x14e5f8[_0x2da541(0x152)]();if(_0x59b75a[_0x2da541(0x16d)](_0x23736a))fail(_0x2da541(0x169)+_0x422a24+'\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.');const _0x2cd8e7=stringValue(_0x5e6da9['type']??_0x5e6da9['fieldType'])[_0x2da541(0x190)]();if(!SUPPORTED_FIELD_TYPES[_0x2da541(0x16d)](_0x2cd8e7))fail(_0x2da541(0x177)+_0x2b4485+_0x2da541(0x18f)+_0x36ffb1+_0x2da541(0x1b1));_0x59b75a[_0x2da541(0x17c)](_0x23736a,_0x2cd8e7),[_0x5e6da9['refTable'],_0x5e6da9[_0x2da541(0x178)],_0x5e6da9['refTableLabelField']]['some'](_0x21a4f5=>stringValue(_0x21a4f5))&&fail(_0x2da541(0x177)+_0x2b4485+'].design.fields['+_0x36ffb1+_0x2da541(0x191));}_0xe38206[_0x2da541(0x17c)](_0x422a24,_0x59b75a);}const _0x4ff099=new Set(),_0x117bc8=new Set();for(const [_0x4520ee,_0x289f53]of _0x49bc1f['entries']()){const _0x329bed=validateRelation(_0x289f53,_0x4520ee,_0x598140,_0xe38206);if(_0x4ff099[_0x2da541(0x16d)](_0x329bed))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0x4ff099[_0x2da541(0x159)](_0x329bed);const _0x1c52c6=_0x329bed[_0x2da541(0x14c)]('\x00',0x2)[_0x2da541(0x157)]('\x00');if(_0x117bc8[_0x2da541(0x16d)](_0x1c52c6))fail(_0x2da541(0x19d));_0x117bc8[_0x2da541(0x159)](_0x1c52c6);}for(const [_0x2b9ce4,_0x3dc915]of _0x4988b1[_0x2da541(0x182)]()){requiredString(_0x3dc915[_0x2da541(0x166)],'unresolvedRelations['+_0x2b9ce4+_0x2da541(0x1a5)),validateConfidence(_0x3dc915['confidence'],'unresolvedRelations['+_0x2b9ce4+'].confidence');}return _0x4c1ff5;}export function reconcileBatchResult(_0x44be34){const _0x248174=a65_0x240fb9;if(!isObject(_0x44be34))return null;try{const _0x390779=stringArray(_0x44be34[_0x248174(0x154)],_0x248174(0x154),0x1,0x14),_0x2500f3=new Set(_0x390779);if(_0x2500f3[_0x248174(0x16e)]!==_0x390779[_0x248174(0x1ac)]||_0x390779[_0x248174(0x18a)](_0x3d06f3=>!LOCAL_KEY[_0x248174(0x17f)](_0x3d06f3)))return null;const _0x75d3ef=objectArray(_0x44be34[_0x248174(0x1a8)],_0x248174(0x1a8),0x1,0x14),_0x5124a3=new Map(),_0xdd2c79=new Set();for(const _0x219677 of _0x75d3ef){const _0x15766d=requiredString(_0x219677['localKey'],_0x248174(0x15d)),_0x5d5f4b=requiredString(_0x219677[_0x248174(0x1a6)]??_0x219677['datasetCode'],_0x248174(0x19b));if(_0x5124a3[_0x248174(0x16d)](_0x15766d)||_0xdd2c79[_0x248174(0x16d)](_0x5d5f4b))return null;_0x5124a3['set'](_0x15766d,_0x5d5f4b),_0xdd2c79['add'](_0x5d5f4b);}if(!sameSet(_0x2500f3,new Set(_0x5124a3[_0x248174(0x196)]())))return null;const _0x304066=objectArray(_0x44be34['expectedRelations'],'expectedRelations',0x0,0xc8),_0x24eee7=objectArray(_0x44be34[_0x248174(0x195)],_0x248174(0x195),0x0,0xc8),_0x540066=relationTupleSet(_0x304066,![],_0x5124a3),_0x3b39aa=relationTupleSet(_0x24eee7,!![],_0x5124a3);if(!_0x540066||!_0x3b39aa||!sameSet(_0x540066,_0x3b39aa))return null;const _0x37f15a=objectArray(_0x44be34[_0x248174(0x148)],_0x248174(0x148),0x0,0xc8);return{'expectedLocalKeys':_0x390779,'expectedRelations':_0x304066,'createdDatasets':_0x75d3ef,'createdRelations':_0x24eee7,'unresolvedRelations':_0x37f15a,...isObject(_0x44be34[_0x248174(0x1b0)])?{'metrics':_0x44be34['metrics']}:{}};}catch{return null;}}function validateRelation(_0x4f9045,_0x333938,_0x130a5d,_0xd88364){const _0x1fb065=a65_0x240fb9,_0x1b578e=_0x1fb065(0x17d)+_0x333938+']',_0x412882=requiredString(_0x4f9045['fromDatasetKey'],_0x1b578e+_0x1fb065(0x164)),_0x149bd8=requiredString(_0x4f9045[_0x1fb065(0x16f)],_0x1b578e+_0x1fb065(0x175)),_0x2341e9=requiredString(_0x4f9045['fromField'],_0x1b578e+_0x1fb065(0x19c))['toLowerCase'](),_0x41b55d=requiredString(_0x4f9045[_0x1fb065(0x162)],_0x1b578e+_0x1fb065(0x176))['toLowerCase']();if(!_0x130a5d['has'](_0x412882)||!_0x130a5d[_0x1fb065(0x16d)](_0x149bd8))fail(_0x1b578e+_0x1fb065(0x17e));const _0x4b0b5d=_0xd88364[_0x1fb065(0x156)](_0x412882)?.['get'](_0x2341e9),_0xbb5613=_0xd88364[_0x1fb065(0x156)](_0x149bd8)?.['get'](_0x41b55d);if(_0x4b0b5d===undefined||_0xbb5613===undefined)fail(_0x1b578e+'\x20references\x20an\x20unknown\x20field.');if(_0x4b0b5d&&_0xbb5613&&_0x4b0b5d!==_0xbb5613)fail(_0x1b578e+_0x1fb065(0x16b));const _0x8666da=stringValue(_0x4f9045[_0x1fb065(0x17a)])||_0x1fb065(0x1aa);if(_0x8666da!==_0x1fb065(0x1aa))fail(_0x1b578e+'.relationType\x20must\x20be\x20\x22lookup\x22.');const _0x5c6cbf=stringValue(_0x4f9045['cardinality'])||_0x1fb065(0x161);if(!SUPPORTED_CARDINALITIES['has'](_0x5c6cbf))fail(_0x1b578e+_0x1fb065(0x16c));return requiredString(_0x4f9045[_0x1fb065(0x166)],_0x1b578e+'.reason'),validateConfidence(_0x4f9045['confidence'],_0x1b578e+'.confidence'),tuple(_0x412882,_0x2341e9,_0x149bd8,_0x41b55d,_0x1fb065(0x1aa),_0x5c6cbf);}function relationTupleSet(_0x543b08,_0x4a0aab,_0x27e3e2){const _0x4ea527=a65_0x240fb9,_0x39c342=new Set();for(const _0x517991 of _0x543b08){const _0x3e9f02=stringValue(_0x517991[_0x4ea527(0x167)]),_0x391e06=stringValue(_0x517991['toDatasetKey']),_0x235f9e=stringValue(_0x517991[_0x4ea527(0x15a)])[_0x4ea527(0x152)](),_0x45bdec=stringValue(_0x517991[_0x4ea527(0x162)])[_0x4ea527(0x152)](),_0x212f39=stringValue(_0x517991[_0x4ea527(0x17a)]),_0x953cf8=stringValue(_0x517991['cardinality']);if(!_0x3e9f02||!_0x391e06||!_0x235f9e||!_0x45bdec||_0x212f39!==_0x4ea527(0x1aa)||!SUPPORTED_CARDINALITIES[_0x4ea527(0x16d)](_0x953cf8))return null;if(!_0x27e3e2[_0x4ea527(0x16d)](_0x3e9f02)||!_0x27e3e2['has'](_0x391e06))return null;if(_0x4a0aab&&(stringValue(_0x517991['fromDatasetCode'])!==_0x27e3e2[_0x4ea527(0x156)](_0x3e9f02)||stringValue(_0x517991[_0x4ea527(0x180)])!==_0x27e3e2[_0x4ea527(0x156)](_0x391e06)))return null;const _0x32870e=tuple(_0x3e9f02,_0x235f9e,_0x391e06,_0x45bdec,_0x212f39,_0x953cf8);if(_0x39c342[_0x4ea527(0x16d)](_0x32870e))return null;_0x39c342['add'](_0x32870e);}return _0x39c342;}function rejectServerDatasetIdentity(_0x5d7252,_0x236206){const _0x224344=a65_0x240fb9;for(const _0x14f3f5 of['id','datasetId',_0x224344(0x192),'code',_0x224344(0x153),'modelCode']){if(_0x5d7252[_0x14f3f5]!==undefined&&_0x5d7252[_0x14f3f5]!==null&&_0x5d7252[_0x14f3f5]!=='')fail(_0x236206+'.'+_0x14f3f5+_0x224344(0x14d));}}function objectArray(_0x5994ef,_0x40d255,_0x3b6602,_0xf8f6f2){const _0x2a9be3=a65_0x240fb9;return(!Array['isArray'](_0x5994ef)||_0x5994ef[_0x2a9be3(0x1ac)]<_0x3b6602||_0x5994ef[_0x2a9be3(0x1ac)]>_0xf8f6f2||_0x5994ef[_0x2a9be3(0x18a)](_0x56c16d=>!isObject(_0x56c16d)))&&fail(_0x40d255+'\x20must\x20contain\x20'+_0x3b6602+'..'+_0xf8f6f2+_0x2a9be3(0x146)),_0x5994ef;}function stringArray(_0x2ca95c,_0x5defba,_0x4b559f,_0x3d5d3d){const _0x186adb=a65_0x240fb9;return(!Array['isArray'](_0x2ca95c)||_0x2ca95c[_0x186adb(0x1ac)]<_0x4b559f||_0x2ca95c[_0x186adb(0x1ac)]>_0x3d5d3d||_0x2ca95c[_0x186adb(0x18a)](_0x1eaba4=>typeof _0x1eaba4!==_0x186adb(0x171)||!_0x1eaba4['trim']()))&&fail(_0x5defba+_0x186adb(0x174)+_0x4b559f+'..'+_0x3d5d3d+_0x186adb(0x19e)),_0x2ca95c;}function requiredString(_0x457129,_0x3e6588){const _0xd5c799=stringValue(_0x457129);if(!_0xd5c799)fail(_0x3e6588+'\x20is\x20required.');return _0xd5c799;}function stringValue(_0x42196f){const _0x11d44d=a65_0x240fb9;return typeof _0x42196f===_0x11d44d(0x171)?_0x42196f[_0x11d44d(0x150)]():'';}function fieldName(_0x465c77){const _0x18c820=a65_0x240fb9;return stringValue(_0x465c77['code']??_0x465c77[_0x18c820(0x194)]??_0x465c77['name']??_0x465c77['fieldName']);}function validateConfidence(_0x4d9db1,_0x2f4715){const _0x5ddf40=a65_0x240fb9;_0x4d9db1!==undefined&&_0x4d9db1!==null&&(typeof _0x4d9db1!==_0x5ddf40(0x147)||!Number[_0x5ddf40(0x1a4)](_0x4d9db1)||_0x4d9db1<0x0||_0x4d9db1>0x1)&&fail(_0x2f4715+_0x5ddf40(0x198));}function tuple(..._0x32ded1){const _0x22000f=a65_0x240fb9;return _0x32ded1[_0x22000f(0x179)]((_0x3c6139,_0x15023c)=>_0x15023c===0x1||_0x15023c===0x3?_0x3c6139['toLowerCase']():_0x3c6139)['join']('\x00');}function sameSet(_0xbec964,_0x66f9a7){const _0x3ff303=a65_0x240fb9;return _0xbec964[_0x3ff303(0x16e)]===_0x66f9a7[_0x3ff303(0x16e)]&&[..._0xbec964][_0x3ff303(0x185)](_0x556c7d=>_0x66f9a7[_0x3ff303(0x16d)](_0x556c7d));}function isObject(_0x3e4832){const _0x7ffbb9=a65_0x240fb9;return typeof _0x3e4832===_0x7ffbb9(0x1af)&&_0x3e4832!==null&&!Array[_0x7ffbb9(0x1a1)](_0x3e4832);}function a65_0x474a(){const _0x36c883=['refTableField','map','relationType','datasetName','set','relations[','\x20references\x20an\x20unknown\x20dataset\x20localKey.','test','toDatasetCode','44NnwGJd','entries','2985380anKrDe','2284402olfndj','every','ONE_TO_ONE','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','4518513ujsLRU','design','some','source','].localKey','1502908qzQsCG','DATE_RANGE','].design.fields[','toUpperCase',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','modelId','8yXQBnp','fieldCode','createdRelations','keys','].design.fields','\x20must\x20be\x20between\x200\x20and\x201.','localKey','UPLOAD','createdDatasets[].code','.fromField','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','\x20non-empty\x20strings.','6cxGxSM','relations','isArray','].design.dataset','573840EejvsM','isFinite','].reason','code','validation','createdDatasets','schemaVersion','lookup','].design\x20must\x20be\x20an\x20object.','length','kind','fields','object','metrics','].type\x20is\x20not\x20supported.','\x20objects.','number','unresolvedRelations','].design','SELECT','1482671FfPYdf','split','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','MULTI_SELECT','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','trim','].design.dataset\x20must\x20be\x20an\x20object.','toLowerCase','datasetCode','expectedLocalKeys','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','get','join','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','add','fromField','6gdRLCX','].localKey\x20must\x20match\x20','createdDatasets[].localKey','5807389rctWTy','TEXT','dataset-batch','MANY_TO_ONE','toField','BOOLEAN','.fromDatasetKey','dataset','reason','fromDatasetKey','].design.dataset.datasetName','Dataset\x20',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','\x20connects\x20incompatible\x20field\x20types.','.cardinality\x20is\x20not\x20supported.','has','size','toDatasetKey','NUMBER','string','USER','datasets','\x20must\x20contain\x20','.toDatasetKey','.toField','datasets['];a65_0x474a=function(){return _0x36c883;};return a65_0x474a();}function fail(_0x413bdf){const _0x320914=a65_0x240fb9;throw CliErrors[_0x320914(0x1a7)](_0x413bdf);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a66_0x24e1a2=a66_0x20db;(function(_0x3bf16e,_0x2e81f4){const _0x4fbb29=a66_0x20db,_0xe38b1a=_0x3bf16e();while(!![]){try{const _0x2fb2e1=-parseInt(_0x4fbb29(0x137))/0x1+parseInt(_0x4fbb29(0x13d))/0x2*(parseInt(_0x4fbb29(0x108))/0x3)+parseInt(_0x4fbb29(0x106))/0x4+-parseInt(_0x4fbb29(0x126))/0x5*(-parseInt(_0x4fbb29(0x12b))/0x6)+parseInt(_0x4fbb29(0x146))/0x7*(-parseInt(_0x4fbb29(0x125))/0x8)+-parseInt(_0x4fbb29(0x147))/0x9*(-parseInt(_0x4fbb29(0x133))/0xa)+-parseInt(_0x4fbb29(0x12c))/0xb;if(_0x2fb2e1===_0x2e81f4)break;else _0xe38b1a['push'](_0xe38b1a['shift']());}catch(_0x23fc68){_0xe38b1a['push'](_0xe38b1a['shift']());}}}(a66_0x1cc5,0xb11bf));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a66_0x24e1a2(0x13c),METADATA_BACKEND_PATH=a66_0x24e1a2(0x10f),UNGROUPED_BUSINESS_GROUP=a66_0x24e1a2(0x11c);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x21fe5a,input:_0x5ae442,dryRun:_0x11660a}){const _0x266934=a66_0x24e1a2;validateInput(_0x5ae442);const _0x29ad76=normalizeBusinessGroupArgument(_0x5ae442['businessGroup']),_0x4ad0b5=await getDatasetDetail(_0x5ae442['code']),_0x21390e=resolveBusinessGroupDataset(_0x4ad0b5,_0x5ae442[_0x266934(0x135)]);assertBusinessGroupUpdateSupported(_0x21390e,_0x29ad76);const _0x7527ef=loadCurrentBusinessGroup(_0x4ad0b5,_0x21390e);assertExpectedBusinessGroup(_0x7527ef,_0x5ae442[_0x266934(0x123)]);const _0x197255=buildBackendPlan(_0x21fe5a,_0x21390e,_0x29ad76),_0x9ec31e=_0x7527ef!==_0x29ad76;let _0x5a774b;if(_0x9ec31e&&!_0x11660a){_0x197255['kind']===_0x266934(0x143)?await updateDbTableBusinessGroup(_0x197255[_0x266934(0x10d)]):await updateErBusinessGroup(_0x197255['payload']);const _0x32086d=await getDatasetDetail(_0x21390e[_0x266934(0x135)]),_0x3381c0=resolveBusinessGroupDataset(_0x32086d,_0x21390e[_0x266934(0x135)]),_0xb317cf=loadCurrentBusinessGroup(_0x32086d,_0x3381c0);if(_0xb317cf!==_0x29ad76)throw CliErrors[_0x266934(0x12a)](_0x266934(0x107),_0x266934(0x102)+JSON[_0x266934(0x112)](displayBusinessGroup(_0x29ad76))+',\x20actual\x20'+JSON[_0x266934(0x112)](displayBusinessGroup(_0xb317cf))+'.');_0x5a774b={'verified':!![],'status':_0x266934(0x14a),'afterReadback':{'businessGroup':displayBusinessGroup(_0xb317cf)}};}else!_0x9ec31e&&(_0x5a774b={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x7527ef)}});const _0x2654da={'operation':'update','appCode':_0x21fe5a,'selector':{'code':_0x21390e[_0x266934(0x135)]},'dataset':{'id':_0x21390e['id'],'code':_0x21390e[_0x266934(0x135)],'name':_0x21390e[_0x266934(0x11d)],'sourceType':_0x21390e[_0x266934(0x11e)]},'before':{'businessGroup':displayBusinessGroup(_0x7527ef)},'after':{'businessGroup':displayBusinessGroup(_0x29ad76)},'changed':_0x9ec31e,'dryRun':_0x11660a,'submitted':_0x9ec31e&&!_0x11660a,'backend':{'method':_0x197255['method'],'path':_0x197255[_0x266934(0x117)],'payload':_0x197255[_0x266934(0x10d)]},..._0x5a774b?{'verification':_0x5a774b}:{},'warnings':[]};return{'ok':!![],'data':_0x2654da,'message':_0x9ec31e?_0x11660a?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x21390e['code']:_0x266934(0x113)+_0x21390e[_0x266934(0x135)]:_0x266934(0x11f)+_0x21390e[_0x266934(0x135)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a66_0x24e1a2(0x10e),'description':a66_0x24e1a2(0x145),'risk':a66_0x24e1a2(0x104),'flags':[CODE_FLAG,{'name':'business-group','type':a66_0x24e1a2(0x142),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':'expect-business-group','type':a66_0x24e1a2(0x142),'required':![],'description':a66_0x24e1a2(0x10b)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54c115){validateInput(readBusinessGroupUpdateInput(_0x54c115));},async 'dryRun'(_0x191f76){const _0x5c0858=a66_0x24e1a2,_0x5dab9f=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x191f76[_0x5c0858(0x10c)],'input':readBusinessGroupUpdateInput(_0x191f76),'dryRun':!![]});return{'method':_0x5dab9f['data']['backend'][_0x5c0858(0x105)],'url':_0x5dab9f[_0x5c0858(0x139)]['backend']['path'],'body':_0x5dab9f[_0x5c0858(0x139)][_0x5c0858(0x10a)]['payload'],'description':_0x5dab9f['message'],..._0x5dab9f[_0x5c0858(0x139)]};},async 'execute'(_0x15c70a){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x15c70a['appCode'],'input':readBusinessGroupUpdateInput(_0x15c70a),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x4a32be){const _0x7d5fa7=a66_0x24e1a2,_0x23ac9d=_0x4a32be['str'](_0x7d5fa7(0x116));return{'code':trim(_0x4a32be[_0x7d5fa7(0x13b)](_0x7d5fa7(0x135))),'businessGroup':_0x4a32be['str'](_0x7d5fa7(0x109)),'expectBusinessGroup':_0x23ac9d===undefined||_0x23ac9d===''?undefined:_0x23ac9d};}function validateInput(_0x2f60d6){const _0x174815=a66_0x24e1a2;if(!trim(_0x2f60d6[_0x174815(0x135)]))throw CliErrors[_0x174815(0x134)]('--code\x20is\x20required');if(_0x2f60d6[_0x174815(0x144)]===undefined)throw CliErrors[_0x174815(0x134)](_0x174815(0x12d));if(!trim(_0x2f60d6[_0x174815(0x144)]))throw CliErrors[_0x174815(0x134)](_0x174815(0x124));}function assertBusinessGroupUpdateSupported(_0x9e3728,_0x54b245){const _0x331514=a66_0x24e1a2;if(_0x9e3728[_0x331514(0x11e)]===_0x331514(0x12f)&&!_0x54b245)throw CliErrors[_0x331514(0x134)](_0x331514(0x140));}function resolveBusinessGroupDataset(_0x2879f6,_0xfbe45){const _0x2ef589=a66_0x24e1a2,_0x42b80f=asPlainObject(_0x2879f6[_0x2ef589(0x127)]),_0x19d310=asPlainObject(_0x2879f6[_0x2ef589(0x103)]),_0x10555f=resolveSourceType(_0x2879f6,_0x42b80f,_0x19d310),_0x4b8f60=firstString(_0x2879f6[_0x2ef589(0x118)],_0x2879f6[_0x2ef589(0x135)],_0x42b80f[_0x2ef589(0x136)],_0xfbe45)||_0xfbe45;return{'id':firstNumber(_0x2879f6['modelId'],_0x2879f6['id'],_0x42b80f[_0x2ef589(0x131)])??firstString(_0x2879f6['modelId'],_0x2879f6['id'],_0x42b80f[_0x2ef589(0x131)])??null,'code':_0x4b8f60,'name':firstString(_0x2879f6[_0x2ef589(0x11d)],_0x42b80f['datasetName'],_0x42b80f[_0x2ef589(0x11d)])||null,'sourceType':_0x10555f,'dbTableSelector':_0x10555f===_0x2ef589(0x12f)?{'dbLinkId':firstNumber(_0x19d310['dbId']),'tableName':firstString(_0x19d310[_0x2ef589(0x13a)])||null}:null};}function resolveSourceType(_0xc8d88a,_0x51faa2,_0x30bca8){const _0x43c9b4=a66_0x24e1a2,_0xfeaafe=firstString(_0xc8d88a[_0x43c9b4(0x12e)],_0xc8d88a['sourceType'],_0x51faa2[_0x43c9b4(0x12e)],_0x51faa2['sourceType'])?.[_0x43c9b4(0x138)]()[_0x43c9b4(0x110)]();if(_0xfeaafe==='DB_TABLE'||_0xfeaafe===_0x43c9b4(0x128))return _0xfeaafe;if(Object['keys'](_0x30bca8)[_0x43c9b4(0x130)]>0x0)return _0x43c9b4(0x12f);throw CliErrors['validation'](_0x43c9b4(0x148));}function loadCurrentBusinessGroup(_0x346e61,_0x5041a5){const _0x2ac126=a66_0x24e1a2,_0x5e6c68=readBusinessGroupFromDatasetDetail(_0x346e61,_0x5041a5[_0x2ac126(0x11e)]);if(_0x5e6c68[_0x2ac126(0x13f)])return normalizeBusinessGroup(_0x5e6c68[_0x2ac126(0x11b)]);return'';}function readBusinessGroupFromDatasetDetail(_0x5d7433,_0x23b1ef){const _0x47cebd=a66_0x24e1a2,_0x411e9d=asPlainObject(_0x5d7433[_0x47cebd(0x127)]),_0x8c488d=firstPresent(_0x5d7433[_0x47cebd(0x144)]);if(_0x8c488d[_0x47cebd(0x13f)])return _0x8c488d;const _0x2d7e20=firstPresent(_0x411e9d['businessGroup']);if(_0x2d7e20[_0x47cebd(0x13f)])return _0x2d7e20;if(_0x23b1ef==='DB_TABLE')return{'found':![]};const _0x4dd3c7=readBusinessGroupFromExtend(_0x5d7433[_0x47cebd(0x132)]);if(_0x4dd3c7['found'])return _0x4dd3c7;return readBusinessGroupFromExtend(_0x411e9d[_0x47cebd(0x132)]);}function readBusinessGroupFromExtend(_0x2e72af){const _0x5c1b1b=a66_0x24e1a2;if(_0x2e72af===undefined||_0x2e72af===null||_0x2e72af==='')return{'found':![]};if(typeof _0x2e72af===_0x5c1b1b(0x142))try{const _0x5bd36b=JSON['parse'](_0x2e72af);return readBusinessGroupFromExtend(_0x5bd36b);}catch{return{'found':![]};}const _0x3a4bea=asPlainObject(_0x2e72af);if(Object['prototype'][_0x5c1b1b(0x149)][_0x5c1b1b(0x114)](_0x3a4bea,_0x5c1b1b(0x144)))return{'found':!![],'value':_0x3a4bea[_0x5c1b1b(0x144)]};return{'found':![]};}function firstPresent(..._0x5c33ea){for(const _0x258866 of _0x5c33ea){if(_0x258866!==undefined&&_0x258866!==null)return{'found':!![],'value':_0x258866};}return{'found':![]};}function assertExpectedBusinessGroup(_0x10c8b1,_0x223006){const _0x12bcc0=a66_0x24e1a2;if(_0x223006===undefined)return;const _0x2411bb=normalizeBusinessGroupArgument(_0x223006);if(_0x10c8b1!==_0x2411bb)throw CliErrors[_0x12bcc0(0x134)](_0x12bcc0(0x13e),_0x12bcc0(0x102)+JSON['stringify'](_0x2411bb)+_0x12bcc0(0x11a)+JSON[_0x12bcc0(0x112)](_0x10c8b1));}function a66_0x1cc5(){const _0x48b1e1=['dbtableConfig','write','method','2436400Jhcstr','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','9Feiuci','business-group','backend','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','appCode','payload','business-group-update','/smartapi/question/er-config/business-group/edit','toUpperCase','metadata','stringify','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','call','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','expect-business-group','path','modelCode','POST',',\x20actual\x20','value','ungrouped','name','sourceType','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','number','object','dbLinkId','expectBusinessGroup','--business-group\x20must\x20not\x20be\x20blank','32BUGXkM','1499185NbCyjt','dataset','METADATA','dbTableSelector','apiError','6oqDqVb','6872976tvFbxx','--business-group\x20is\x20required','source','DB_TABLE','length','datasetId','extend','87220MldPpV','validation','code','datasetCode','1189898qzwFLU','trim','data','tableName','str','/smartapi/dblink/updateTableBusinessGroup','636892AOwOSv','Expectation\x20mismatch\x20at\x20businessGroup','found','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','isFinite','string','db-table','businessGroup','Update\x20business\x20scenario\x20group','1305164yzaMdJ','1467OnQsSb','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','hasOwnProperty','matched','isArray','Expected\x20'];a66_0x1cc5=function(){return _0x48b1e1;};return a66_0x1cc5();}function buildBackendPlan(_0x1ae48b,_0x376b48,_0x3db769){const _0x6000d4=a66_0x24e1a2;if(_0x376b48[_0x6000d4(0x11e)]===_0x6000d4(0x12f)){if(!_0x376b48[_0x6000d4(0x129)]||_0x376b48[_0x6000d4(0x129)][_0x6000d4(0x122)]===null||!_0x376b48[_0x6000d4(0x129)][_0x6000d4(0x13a)])throw CliErrors[_0x6000d4(0x134)]('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.',_0x6000d4(0x115));return{'kind':_0x6000d4(0x143),'method':_0x6000d4(0x119),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x376b48[_0x6000d4(0x129)][_0x6000d4(0x122)],'tableName':_0x376b48[_0x6000d4(0x129)]['tableName'],'businessGroup':_0x3db769}};}return{'kind':_0x6000d4(0x111),'method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x1ae48b,'datasetCode':_0x376b48[_0x6000d4(0x135)],'businessGroup':_0x3db769}};}function normalizeBusinessGroup(_0x5ede07){const _0x5a4c77=a66_0x24e1a2;if(_0x5ede07===undefined||_0x5ede07===null)return'';return String(_0x5ede07)[_0x5a4c77(0x138)]();}function normalizeBusinessGroupArgument(_0x345629){const _0x468731=normalizeBusinessGroup(_0x345629);return _0x468731===UNGROUPED_BUSINESS_GROUP?'':_0x468731;}function displayBusinessGroup(_0x4be715){return _0x4be715||UNGROUPED_BUSINESS_GROUP;}function a66_0x20db(_0x2bb2fd,_0x476bda){_0x2bb2fd=_0x2bb2fd-0x102;const _0x1cc556=a66_0x1cc5();let _0x20dbf2=_0x1cc556[_0x2bb2fd];return _0x20dbf2;}function asPlainObject(_0x2cb67d){const _0x11f373=a66_0x24e1a2;if(!_0x2cb67d||typeof _0x2cb67d!==_0x11f373(0x121)||Array[_0x11f373(0x14b)](_0x2cb67d))return{};return _0x2cb67d;}function firstString(..._0x930255){const _0x2a6b94=a66_0x24e1a2;for(const _0x32fb84 of _0x930255){if(typeof _0x32fb84===_0x2a6b94(0x142)&&_0x32fb84[_0x2a6b94(0x138)]())return _0x32fb84[_0x2a6b94(0x138)]();if(typeof _0x32fb84===_0x2a6b94(0x120)&&Number[_0x2a6b94(0x141)](_0x32fb84))return String(_0x32fb84);}return undefined;}function firstNumber(..._0x4a8d9a){const _0x2adc71=a66_0x24e1a2;for(const _0x51ce68 of _0x4a8d9a){if(typeof _0x51ce68===_0x2adc71(0x120)&&Number['isFinite'](_0x51ce68))return _0x51ce68;if(typeof _0x51ce68===_0x2adc71(0x142)&&_0x51ce68[_0x2adc71(0x138)]()&&Number[_0x2adc71(0x141)](Number(_0x51ce68)))return Number(_0x51ce68);}return null;}function trim(_0x3080b9){const _0x32175b=a66_0x24e1a2;return String(_0x3080b9||'')[_0x32175b(0x138)]();}
|
|
1
|
+
function a66_0x564b(_0x43ef2a,_0x539891){_0x43ef2a=_0x43ef2a-0x121;const _0x2cd475=a66_0x2cd4();let _0x564b9b=_0x2cd475[_0x43ef2a];return _0x564b9b;}function a66_0x2cd4(){const _0xdf1099=['Expected\x20','dbTableSelector','backend','found','business-group','name','matched','datasetCode','source','metadata','code','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','datasetId','835702zGucSI','2749404zcyxvK','data','call','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','update','parse','path','trim','914850dwNkjt','str','db-table',',\x20actual\x20','validation','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','modelId','--code\x20is\x20required','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','businessGroup','string','hasOwnProperty','extend','business-group-update','object','modelCode','DB_TABLE','appCode','--business-group\x20must\x20not\x20be\x20blank','keys','92692ZOFhNi','expect-business-group','write','dbLinkId','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','/smartapi/question/er-config/business-group/edit','2765224OFhouG','--business-group\x20is\x20required','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','1028409XibQMV','apiError','isArray','stringify','623405zAOidL','1pzkMLT','Expectation\x20mismatch\x20at\x20businessGroup','tableName','isFinite','number','value','unchanged','POST','message','kind','payload','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','expectBusinessGroup','dbtableConfig','toUpperCase','ungrouped','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','datasetName','sourceType','Update\x20business\x20scenario\x20group','dataset'];a66_0x2cd4=function(){return _0xdf1099;};return a66_0x2cd4();}const a66_0x3eb540=a66_0x564b;(function(_0x452f4c,_0x20dc39){const _0x3f0d19=a66_0x564b,_0x457092=_0x452f4c();while(!![]){try{const _0x18aa15=-parseInt(_0x3f0d19(0x140))/0x1*(parseInt(_0x3f0d19(0x162))/0x2)+parseInt(_0x3f0d19(0x13b))/0x3+parseInt(_0x3f0d19(0x132))/0x4+parseInt(_0x3f0d19(0x13f))/0x5+parseInt(_0x3f0d19(0x16b))/0x6+parseInt(_0x3f0d19(0x163))/0x7+-parseInt(_0x3f0d19(0x138))/0x8;if(_0x18aa15===_0x20dc39)break;else _0x457092['push'](_0x457092['shift']());}catch(_0x5b573a){_0x457092['push'](_0x457092['shift']());}}}(a66_0x2cd4,0x42810));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH='/smartapi/dblink/updateTableBusinessGroup',METADATA_BACKEND_PATH=a66_0x3eb540(0x137),UNGROUPED_BUSINESS_GROUP=a66_0x3eb540(0x14f);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x28e4f6,input:_0x1a2e28,dryRun:_0x5b0023}){const _0x380c11=a66_0x3eb540;validateInput(_0x1a2e28);const _0x127334=normalizeBusinessGroupArgument(_0x1a2e28[_0x380c11(0x127)]),_0x418618=await getDatasetDetail(_0x1a2e28[_0x380c11(0x15f)]),_0x241dc2=resolveBusinessGroupDataset(_0x418618,_0x1a2e28[_0x380c11(0x15f)]);assertBusinessGroupUpdateSupported(_0x241dc2,_0x127334);const _0x4fc704=loadCurrentBusinessGroup(_0x418618,_0x241dc2);assertExpectedBusinessGroup(_0x4fc704,_0x1a2e28[_0x380c11(0x14c)]);const _0x396081=buildBackendPlan(_0x28e4f6,_0x241dc2,_0x127334),_0x56a970=_0x4fc704!==_0x127334;let _0x4b98db;if(_0x56a970&&!_0x5b0023){_0x396081[_0x380c11(0x149)]===_0x380c11(0x16d)?await updateDbTableBusinessGroup(_0x396081[_0x380c11(0x14a)]):await updateErBusinessGroup(_0x396081[_0x380c11(0x14a)]);const _0x58c864=await getDatasetDetail(_0x241dc2[_0x380c11(0x15f)]),_0x220a62=resolveBusinessGroupDataset(_0x58c864,_0x241dc2[_0x380c11(0x15f)]),_0x2f8d3f=loadCurrentBusinessGroup(_0x58c864,_0x220a62);if(_0x2f8d3f!==_0x127334)throw CliErrors[_0x380c11(0x13c)](_0x380c11(0x123),'Expected\x20'+JSON['stringify'](displayBusinessGroup(_0x127334))+_0x380c11(0x121)+JSON[_0x380c11(0x13e)](displayBusinessGroup(_0x2f8d3f))+'.');_0x4b98db={'verified':!![],'status':_0x380c11(0x15b),'afterReadback':{'businessGroup':displayBusinessGroup(_0x2f8d3f)}};}else!_0x56a970&&(_0x4b98db={'verified':!![],'status':_0x380c11(0x146),'afterReadback':{'businessGroup':displayBusinessGroup(_0x4fc704)}});const _0x39f45f={'operation':_0x380c11(0x167),'appCode':_0x28e4f6,'selector':{'code':_0x241dc2[_0x380c11(0x15f)]},'dataset':{'id':_0x241dc2['id'],'code':_0x241dc2[_0x380c11(0x15f)],'name':_0x241dc2[_0x380c11(0x15a)],'sourceType':_0x241dc2[_0x380c11(0x152)]},'before':{'businessGroup':displayBusinessGroup(_0x4fc704)},'after':{'businessGroup':displayBusinessGroup(_0x127334)},'changed':_0x56a970,'dryRun':_0x5b0023,'submitted':_0x56a970&&!_0x5b0023,'backend':{'method':_0x396081['method'],'path':_0x396081[_0x380c11(0x169)],'payload':_0x396081[_0x380c11(0x14a)]},..._0x4b98db?{'verification':_0x4b98db}:{},'warnings':[]};return{'ok':!![],'data':_0x39f45f,'message':_0x56a970?_0x5b0023?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x241dc2['code']:_0x380c11(0x150)+_0x241dc2['code']:_0x380c11(0x14b)+_0x241dc2[_0x380c11(0x15f)]};}export const datasetBusinessGroupUpdate={'service':a66_0x3eb540(0x154),'command':a66_0x3eb540(0x12b),'description':a66_0x3eb540(0x153),'risk':a66_0x3eb540(0x134),'flags':[CODE_FLAG,{'name':a66_0x3eb540(0x159),'type':'string','required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':a66_0x3eb540(0x133),'type':a66_0x3eb540(0x128),'required':![],'description':a66_0x3eb540(0x126)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1e0d0e){validateInput(readBusinessGroupUpdateInput(_0x1e0d0e));},async 'dryRun'(_0x10f4e2){const _0x37957d=a66_0x3eb540,_0x4182f0=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x10f4e2['appCode'],'input':readBusinessGroupUpdateInput(_0x10f4e2),'dryRun':!![]});return{'method':_0x4182f0[_0x37957d(0x164)][_0x37957d(0x157)]['method'],'url':_0x4182f0[_0x37957d(0x164)][_0x37957d(0x157)][_0x37957d(0x169)],'body':_0x4182f0[_0x37957d(0x164)][_0x37957d(0x157)][_0x37957d(0x14a)],'description':_0x4182f0[_0x37957d(0x148)],..._0x4182f0[_0x37957d(0x164)]};},async 'execute'(_0x4ea4c7){const _0xc1c02c=a66_0x3eb540;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x4ea4c7[_0xc1c02c(0x12f)],'input':readBusinessGroupUpdateInput(_0x4ea4c7),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x319513){const _0x32d7db=a66_0x3eb540,_0x10c6f0=_0x319513[_0x32d7db(0x16c)](_0x32d7db(0x133));return{'code':trim(_0x319513[_0x32d7db(0x16c)](_0x32d7db(0x15f))),'businessGroup':_0x319513[_0x32d7db(0x16c)](_0x32d7db(0x159)),'expectBusinessGroup':_0x10c6f0===undefined||_0x10c6f0===''?undefined:_0x10c6f0};}function validateInput(_0x31bff0){const _0x4d1349=a66_0x3eb540;if(!trim(_0x31bff0[_0x4d1349(0x15f)]))throw CliErrors['validation'](_0x4d1349(0x125));if(_0x31bff0[_0x4d1349(0x127)]===undefined)throw CliErrors['validation'](_0x4d1349(0x139));if(!trim(_0x31bff0[_0x4d1349(0x127)]))throw CliErrors[_0x4d1349(0x122)](_0x4d1349(0x130));}function assertBusinessGroupUpdateSupported(_0x57335a,_0x52ea19){const _0xf5f4ee=a66_0x3eb540;if(_0x57335a[_0xf5f4ee(0x152)]===_0xf5f4ee(0x12e)&&!_0x52ea19)throw CliErrors[_0xf5f4ee(0x122)](_0xf5f4ee(0x160));}function resolveBusinessGroupDataset(_0xf15a04,_0x5316dd){const _0x56175a=a66_0x3eb540,_0x4ca9d4=asPlainObject(_0xf15a04[_0x56175a(0x154)]),_0x56fd50=asPlainObject(_0xf15a04[_0x56175a(0x14d)]),_0x597873=resolveSourceType(_0xf15a04,_0x4ca9d4,_0x56fd50),_0xec7b31=firstString(_0xf15a04[_0x56175a(0x12d)],_0xf15a04[_0x56175a(0x15f)],_0x4ca9d4[_0x56175a(0x15c)],_0x5316dd)||_0x5316dd;return{'id':firstNumber(_0xf15a04[_0x56175a(0x124)],_0xf15a04['id'],_0x4ca9d4[_0x56175a(0x161)])??firstString(_0xf15a04[_0x56175a(0x124)],_0xf15a04['id'],_0x4ca9d4['datasetId'])??null,'code':_0xec7b31,'name':firstString(_0xf15a04[_0x56175a(0x15a)],_0x4ca9d4[_0x56175a(0x151)],_0x4ca9d4[_0x56175a(0x15a)])||null,'sourceType':_0x597873,'dbTableSelector':_0x597873===_0x56175a(0x12e)?{'dbLinkId':firstNumber(_0x56fd50['dbId']),'tableName':firstString(_0x56fd50[_0x56175a(0x142)])||null}:null};}function resolveSourceType(_0x3ad8b0,_0x1424f7,_0x4ffb89){const _0x540737=a66_0x3eb540,_0x46ef0c=firstString(_0x3ad8b0[_0x540737(0x15d)],_0x3ad8b0['sourceType'],_0x1424f7[_0x540737(0x15d)],_0x1424f7[_0x540737(0x152)])?.[_0x540737(0x16a)]()[_0x540737(0x14e)]();if(_0x46ef0c===_0x540737(0x12e)||_0x46ef0c==='METADATA')return _0x46ef0c;if(Object[_0x540737(0x131)](_0x4ffb89)['length']>0x0)return'DB_TABLE';throw CliErrors[_0x540737(0x122)](_0x540737(0x136));}function loadCurrentBusinessGroup(_0x51de02,_0x1fe1d1){const _0x3bdcd1=a66_0x3eb540,_0x457e3c=readBusinessGroupFromDatasetDetail(_0x51de02,_0x1fe1d1[_0x3bdcd1(0x152)]);if(_0x457e3c[_0x3bdcd1(0x158)])return normalizeBusinessGroup(_0x457e3c[_0x3bdcd1(0x145)]);return'';}function readBusinessGroupFromDatasetDetail(_0x44c15c,_0x2d1978){const _0x28ab8a=a66_0x3eb540,_0x3048a0=asPlainObject(_0x44c15c[_0x28ab8a(0x154)]),_0x576e15=firstPresent(_0x44c15c[_0x28ab8a(0x127)]);if(_0x576e15[_0x28ab8a(0x158)])return _0x576e15;const _0x561ab2=firstPresent(_0x3048a0[_0x28ab8a(0x127)]);if(_0x561ab2[_0x28ab8a(0x158)])return _0x561ab2;if(_0x2d1978===_0x28ab8a(0x12e))return{'found':![]};const _0x581ce2=readBusinessGroupFromExtend(_0x44c15c[_0x28ab8a(0x12a)]);if(_0x581ce2[_0x28ab8a(0x158)])return _0x581ce2;return readBusinessGroupFromExtend(_0x3048a0[_0x28ab8a(0x12a)]);}function readBusinessGroupFromExtend(_0x314185){const _0x393ae7=a66_0x3eb540;if(_0x314185===undefined||_0x314185===null||_0x314185==='')return{'found':![]};if(typeof _0x314185==='string')try{const _0x5d4d7b=JSON[_0x393ae7(0x168)](_0x314185);return readBusinessGroupFromExtend(_0x5d4d7b);}catch{return{'found':![]};}const _0x494ca2=asPlainObject(_0x314185);if(Object['prototype'][_0x393ae7(0x129)][_0x393ae7(0x165)](_0x494ca2,'businessGroup'))return{'found':!![],'value':_0x494ca2[_0x393ae7(0x127)]};return{'found':![]};}function firstPresent(..._0xbfe927){for(const _0x46a236 of _0xbfe927){if(_0x46a236!==undefined&&_0x46a236!==null)return{'found':!![],'value':_0x46a236};}return{'found':![]};}function assertExpectedBusinessGroup(_0x22e700,_0x11e7b6){const _0x302f5a=a66_0x3eb540;if(_0x11e7b6===undefined)return;const _0x250776=normalizeBusinessGroupArgument(_0x11e7b6);if(_0x22e700!==_0x250776)throw CliErrors[_0x302f5a(0x122)](_0x302f5a(0x141),_0x302f5a(0x155)+JSON[_0x302f5a(0x13e)](_0x250776)+_0x302f5a(0x121)+JSON['stringify'](_0x22e700));}function buildBackendPlan(_0xe490c8,_0x4108cc,_0x5c9d9b){const _0x15f82c=a66_0x3eb540;if(_0x4108cc[_0x15f82c(0x152)]==='DB_TABLE'){if(!_0x4108cc[_0x15f82c(0x156)]||_0x4108cc[_0x15f82c(0x156)][_0x15f82c(0x135)]===null||!_0x4108cc[_0x15f82c(0x156)][_0x15f82c(0x142)])throw CliErrors[_0x15f82c(0x122)](_0x15f82c(0x13a),_0x15f82c(0x166));return{'kind':_0x15f82c(0x16d),'method':_0x15f82c(0x147),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x4108cc['dbTableSelector'][_0x15f82c(0x135)],'tableName':_0x4108cc[_0x15f82c(0x156)][_0x15f82c(0x142)],'businessGroup':_0x5c9d9b}};}return{'kind':_0x15f82c(0x15e),'method':_0x15f82c(0x147),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0xe490c8,'datasetCode':_0x4108cc[_0x15f82c(0x15f)],'businessGroup':_0x5c9d9b}};}function normalizeBusinessGroup(_0x4e85fc){const _0x174929=a66_0x3eb540;if(_0x4e85fc===undefined||_0x4e85fc===null)return'';return String(_0x4e85fc)[_0x174929(0x16a)]();}function normalizeBusinessGroupArgument(_0x581863){const _0x145451=normalizeBusinessGroup(_0x581863);return _0x145451===UNGROUPED_BUSINESS_GROUP?'':_0x145451;}function displayBusinessGroup(_0xe41d86){return _0xe41d86||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x349229){const _0x2ea55b=a66_0x3eb540;if(!_0x349229||typeof _0x349229!==_0x2ea55b(0x12c)||Array[_0x2ea55b(0x13d)](_0x349229))return{};return _0x349229;}function firstString(..._0x63d8f1){const _0x27e4dc=a66_0x3eb540;for(const _0x43bb0c of _0x63d8f1){if(typeof _0x43bb0c===_0x27e4dc(0x128)&&_0x43bb0c[_0x27e4dc(0x16a)]())return _0x43bb0c[_0x27e4dc(0x16a)]();if(typeof _0x43bb0c===_0x27e4dc(0x144)&&Number[_0x27e4dc(0x143)](_0x43bb0c))return String(_0x43bb0c);}return undefined;}function firstNumber(..._0x5f30f0){const _0x271c80=a66_0x3eb540;for(const _0x475abd of _0x5f30f0){if(typeof _0x475abd===_0x271c80(0x144)&&Number[_0x271c80(0x143)](_0x475abd))return _0x475abd;if(typeof _0x475abd===_0x271c80(0x128)&&_0x475abd[_0x271c80(0x16a)]()&&Number[_0x271c80(0x143)](Number(_0x475abd)))return Number(_0x475abd);}return null;}function trim(_0xbb4240){const _0x4ad1e5=a66_0x3eb540;return String(_0xbb4240||'')[_0x4ad1e5(0x16a)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a67_0x1cfd(_0x55edf9,_0x3154f5){_0x55edf9=_0x55edf9-0x187;const _0x3e797d=a67_0x3e79();let _0x1cfd7c=_0x3e797d[_0x55edf9];return _0x1cfd7c;}const a67_0x548b95=a67_0x1cfd;(function(_0x1cd7d5,_0x165805){const _0x5eb783=a67_0x1cfd,_0x224195=_0x1cd7d5();while(!![]){try{const _0x4d8051=-parseInt(_0x5eb783(0x197))/0x1*(-parseInt(_0x5eb783(0x193))/0x2)+-parseInt(_0x5eb783(0x18c))/0x3+-parseInt(_0x5eb783(0x18d))/0x4+-parseInt(_0x5eb783(0x196))/0x5+parseInt(_0x5eb783(0x18b))/0x6*(-parseInt(_0x5eb783(0x187))/0x7)+parseInt(_0x5eb783(0x18a))/0x8+parseInt(_0x5eb783(0x18f))/0x9*(parseInt(_0x5eb783(0x192))/0xa);if(_0x4d8051===_0x165805)break;else _0x224195['push'](_0x224195['shift']());}catch(_0x257228){_0x224195['push'](_0x224195['shift']());}}}(a67_0x3e79,0x56b15));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a67_0x3e79(){const _0x410035=['2506thxOeu','groups','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','4422552ZlQmmh','8406JZKAfz','1708272lPpONF','185252wTtnfc','read','18dBPZMY','appCode','map','4375640zkFoqm','1293106pZxKgX','dbid','ungrouped','3010560rbRxZa','1eickHj','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','trim','num','dataset'];a67_0x3e79=function(){return _0x410035;};return a67_0x3e79();}export const datasetBusinessGroups={'service':a67_0x548b95(0x19b),'command':'business-groups','description':a67_0x548b95(0x198),'risk':a67_0x548b95(0x18e),'flags':[{'name':a67_0x548b95(0x194),'type':'number','required':!![],'description':a67_0x548b95(0x189)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5ce32d){const _0x168140=a67_0x548b95,_0x24da4d=_0x5ce32d[_0x168140(0x19a)]('dbid'),_0x4681dc=await getErBusinessGroupSummary(_0x5ce32d[_0x168140(0x190)],_0x24da4d),_0x4448b6=_0x4681dc[_0x168140(0x188)][_0x168140(0x191)](_0x2b2e20=>({..._0x2b2e20,'businessGroup':_0x2b2e20['businessGroup'][_0x168140(0x199)]()||_0x168140(0x195)}));return{'ok':!![],'data':{..._0x4681dc,'groups':_0x4448b6,'scope':'DB_TABLE'},'message':'Found\x20'+_0x4448b6['length']+'\x20business\x20group(s)\x20for\x20database\x20connection\x20'+_0x24da4d};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x22e946=a68_0x1f5f;(function(_0x27329a,_0x4a10c8){const _0x1617b6=a68_0x1f5f,_0x24e47f=_0x27329a();while(!![]){try{const _0x544dd9=parseInt(_0x1617b6(0x209))/0x1*(parseInt(_0x1617b6(0x207))/0x2)+parseInt(_0x1617b6(0x206))/0x3+-parseInt(_0x1617b6(0x1ef))/0x4*(parseInt(_0x1617b6(0x1fd))/0x5)+parseInt(_0x1617b6(0x1fe))/0x6*(-parseInt(_0x1617b6(0x1e8))/0x7)+parseInt(_0x1617b6(0x205))/0x8*(parseInt(_0x1617b6(0x200))/0x9)+parseInt(_0x1617b6(0x1ff))/0xa+parseInt(_0x1617b6(0x1f6))/0xb;if(_0x544dd9===_0x4a10c8)break;else _0x24e47f['push'](_0x24e47f['shift']());}catch(_0x3fd7d9){_0x24e47f['push'](_0x24e47f['shift']());}}}(a68_0x71d1,0x3c9b1));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a68_0x22e946(0x1f0),'filter':a68_0x22e946(0x1e9),'getOne':a68_0x22e946(0x20c)};export const RUNTIME_DATA_ACCESS_SUMMARY=a68_0x22e946(0x1f7);function valueToString(_0x1751ec){const _0x7e4d77=a68_0x22e946;return _0x1751ec==null?'':String(_0x1751ec)[_0x7e4d77(0x204)]();}function getDatasetCode(_0x4d7f05){const _0x59c36f=a68_0x22e946;return valueToString(_0x4d7f05[_0x59c36f(0x1f1)]??_0x4d7f05[_0x59c36f(0x201)]??_0x4d7f05[_0x59c36f(0x1f2)]?.['datasetCode']);}function getDatasetName(_0x15e33e){const _0x47c3d9=a68_0x22e946;return valueToString(_0x15e33e['name']??_0x15e33e[_0x47c3d9(0x1f2)]?.[_0x47c3d9(0x20a)])||_0x47c3d9(0x1ed);}function getDatasetSource(_0x1710ca){const _0x433551=a68_0x22e946;return valueToString(_0x1710ca[_0x433551(0x1f8)]??_0x1710ca[_0x433551(0x1f2)]?.[_0x433551(0x1ec)])[_0x433551(0x202)]();}function a68_0x1f5f(_0x58607f,_0x3f7b47){_0x58607f=_0x58607f-0x1e8;const _0x71d170=a68_0x71d1();let _0x1f5f90=_0x71d170[_0x58607f];return _0x1f5f90;}function a68_0x71d1(){const _0x2a06aa=['filter','dbId','validation','1101870gdpwhh','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','source','tableName','METADATA','getOne','join','11170ovcrqH','432JsARPP','1866440xXkhrI','410823vrmCgh','modelCode','toUpperCase','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','trim','8dBJrdh','1186371wVFobb','2JhzbQS','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','269723ccqQIn','datasetName','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','31157vDgGXx','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','The\x20current\x20dataset\x20\x22','SQL\x20schema\x20validation','sourceType','unknown','UNKNOWN','768dHmqUu','lovrabet','code','dataset'];a68_0x71d1=function(){return _0x2a06aa;};return a68_0x71d1();}function getDbtableConfig(_0x5d05fd){const _0x4f9bfb=_0x5d05fd['dbtableConfig']??_0x5d05fd['dbtable'];return _0x4f9bfb&&typeof _0x4f9bfb==='object'?_0x4f9bfb:{};}export function isDbTableBackedDataset(_0x4da266){const _0x155eb7=a68_0x22e946,_0x38ca24=getDatasetSource(_0x4da266);if(_0x38ca24===_0x155eb7(0x1fa))return![];const _0x48bd2e=getDbtableConfig(_0x4da266),_0x46db7f=_0x48bd2e[_0x155eb7(0x1f4)]??_0x48bd2e['id'],_0x46f67a=valueToString(_0x48bd2e[_0x155eb7(0x1f9)]??_0x4da266['tableName']??_0x4da266['dataset']?.[_0x155eb7(0x1f9)]);return _0x46db7f!==undefined&&_0x46db7f!==null&&_0x46f67a['length']>0x0;}export function filterDbTableBackedDatasets(_0x4b8cdc){const _0x453984=a68_0x22e946;return _0x4b8cdc[_0x453984(0x1f3)](_0x28b094=>isDbTableBackedDataset(_0x28b094));}export function buildDbTableBackedRequirementMessage(_0x21fe61,_0x3bb4c9=a68_0x22e946(0x1eb)){const _0x3e2947=a68_0x22e946,_0x356a0f=getDatasetSource(_0x21fe61)||_0x3e2947(0x1ee),_0x1e5551=getDatasetName(_0x21fe61),_0x42f09b=getDatasetCode(_0x21fe61),_0x3b807d=_0x42f09b?'\x20('+_0x42f09b+')':'';return[_0x3e2947(0x1ea)+_0x1e5551+'\x22'+_0x3b807d+'\x20is\x20'+_0x356a0f+_0x3e2947(0x20b)+_0x3bb4c9+'.','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.',_0x3e2947(0x203),_0x3e2947(0x208)+RUNTIME_DATA_ACCESS_COMMANDS[_0x3e2947(0x1f3)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x3e2947(0x1fb)]+'.'][_0x3e2947(0x1fc)]('\x20');}export function assertDatasetIsDbTableBacked(_0x448f44,_0x3dd1dc){const _0x5c7b7d=a68_0x22e946;if(!isDbTableBackedDataset(_0x448f44))throw CliErrors[_0x5c7b7d(0x1f5)](buildDbTableBackedRequirementMessage(_0x448f44,_0x3dd1dc));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x1abde2=a69_0x17d0;(function(_0x1dc791,_0x2e24ef){const _0x312acc=a69_0x17d0,_0x567734=_0x1dc791();while(!![]){try{const _0xdcfbcf=parseInt(_0x312acc(0x6a))/0x1*(parseInt(_0x312acc(0x73))/0x2)+parseInt(_0x312acc(0x72))/0x3+parseInt(_0x312acc(0x6c))/0x4+-parseInt(_0x312acc(0x6b))/0x5+-parseInt(_0x312acc(0x75))/0x6+-parseInt(_0x312acc(0x69))/0x7+-parseInt(_0x312acc(0x74))/0x8*(-parseInt(_0x312acc(0x6f))/0x9);if(_0xdcfbcf===_0x2e24ef)break;else _0x567734['push'](_0x567734['shift']());}catch(_0x3bf608){_0x567734['push'](_0x567734['shift']());}}}(a69_0x31ed,0x862bd));import{createCrossDbRelation}from'../../core/api-client.js';function a69_0x17d0(_0x462313,_0x5ad2c1){_0x462313=_0x462313-0x69;const _0x31edee=a69_0x31ed();let _0x17d098=_0x31edee[_0x462313];return _0x17d098;}function a69_0x31ed(){const _0x4637d2=['5601750moeWQs','169711rWvRno','5305030WmgKXF','3750164RkrsAU','dataset','create','9ZThEpC','cross-relation-create','Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','1962135lnAUyL','10IUVAQR','7908504qUiYNQ','6107298HqjFcs'];a69_0x31ed=function(){return _0x4637d2;};return a69_0x31ed();}import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationCreate={'service':a69_0x1abde2(0x6d),'command':a69_0x1abde2(0x70),'description':a69_0x1abde2(0x71),'risk':'write','strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x19981c=>validateCrossRelation(_0x19981c,a69_0x1abde2(0x6e)),'dryRun':_0x2afd41=>previewCrossRelation(_0x2afd41,a69_0x1abde2(0x6e)),'execute':_0x1e29a1=>executeCrossRelation(_0x1e29a1,a69_0x1abde2(0x6e),createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x884659=a70_0x14f5;(function(_0x3b3e9b,_0x173685){const _0x19b781=a70_0x14f5,_0x5f16b4=_0x3b3e9b();while(!![]){try{const _0x40b299=parseInt(_0x19b781(0xfc))/0x1*(parseInt(_0x19b781(0xf6))/0x2)+-parseInt(_0x19b781(0x101))/0x3*(-parseInt(_0x19b781(0xfa))/0x4)+-parseInt(_0x19b781(0xf9))/0x5+parseInt(_0x19b781(0x100))/0x6*(-parseInt(_0x19b781(0xfb))/0x7)+parseInt(_0x19b781(0xff))/0x8+parseInt(_0x19b781(0xf7))/0x9*(-parseInt(_0x19b781(0xf3))/0xa)+parseInt(_0x19b781(0xf4))/0xb*(parseInt(_0x19b781(0xfe))/0xc);if(_0x40b299===_0x173685)break;else _0x5f16b4['push'](_0x5f16b4['shift']());}catch(_0x289b06){_0x5f16b4['push'](_0x5f16b4['shift']());}}}(a70_0x2274,0xd01e3));function a70_0x2274(){const _0x5e6424=['7DJLRDu','delete','292308DlFkYp','1821352JxjGyF','3606RxSljN','354zlbBBo','69230xzGCsp','1243bHBezF','high-risk-write','86596HMGbbU','2043CSdIHe','dataset','1592990SSPIIS','168pcAfVR','6356bjRlUz'];a70_0x2274=function(){return _0x5e6424;};return a70_0x2274();}function a70_0x14f5(_0x9b3f2c,_0x264c7e){_0x9b3f2c=_0x9b3f2c-0xf3;const _0x2274da=a70_0x2274();let _0x14f545=_0x2274da[_0x9b3f2c];return _0x14f545;}import{deleteCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationDelete={'service':a70_0x884659(0xf8),'command':'cross-relation-delete','description':'Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','risk':a70_0x884659(0xf5),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x762e2a=>validateCrossRelation(_0x762e2a,a70_0x884659(0xfd)),'dryRun':_0x352c48=>previewCrossRelation(_0x352c48,a70_0x884659(0xfd)),'execute':_0x29fabb=>executeCrossRelation(_0x29fabb,a70_0x884659(0xfd),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x205adf=a71_0x2b11;function a71_0x2b11(_0x57c3c3,_0x3cd4fc){_0x57c3c3=_0x57c3c3-0xb5;const _0x2720d1=a71_0x2720();let _0x2b1164=_0x2720d1[_0x57c3c3];return _0x2b1164;}(function(_0x33ca6c,_0x34f9b9){const _0x1f3e04=a71_0x2b11,_0x45ea5f=_0x33ca6c();while(!![]){try{const _0x162b8b=parseInt(_0x1f3e04(0xb7))/0x1+-parseInt(_0x1f3e04(0xc4))/0x2+-parseInt(_0x1f3e04(0xc2))/0x3*(parseInt(_0x1f3e04(0xc0))/0x4)+-parseInt(_0x1f3e04(0xbc))/0x5*(-parseInt(_0x1f3e04(0xc3))/0x6)+-parseInt(_0x1f3e04(0xc1))/0x7+-parseInt(_0x1f3e04(0xbb))/0x8+parseInt(_0x1f3e04(0xc5))/0x9*(parseInt(_0x1f3e04(0xbe))/0xa);if(_0x162b8b===_0x34f9b9)break;else _0x45ea5f['push'](_0x45ea5f['shift']());}catch(_0xd6d17d){_0x45ea5f['push'](_0x45ea5f['shift']());}}}(a71_0x2720,0x7c353));import{queryCrossDbRelations}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CROSS_RELATION_DBLINK_FLAG,CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG}from'../../commands/common/flags.js';import{projectCrossRelation,resolveCrossRelationQuery,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationList={'service':a71_0x205adf(0xb8),'command':'cross-relation-list','description':a71_0x205adf(0xb6),'risk':a71_0x205adf(0xb5),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[{...CROSS_RELATION_FROM_DATASET_FLAG,'required':![]},CROSS_RELATION_DBLINK_FLAG,{...CROSS_RELATION_FROM_COLUMN_FLAG,'required':![]},APPCODE_FLAG_OPTIONAL],'validate':async _0x1c4fc5=>validateCrossRelation(_0x1c4fc5,a71_0x205adf(0xc7)),async 'execute'(_0x41eecf){const _0x5270f7=a71_0x205adf,_0x5d21a4=await resolveCrossRelationQuery(_0x41eecf),_0x364357=await queryCrossDbRelations(_0x5d21a4);return{'ok':!![],'data':{'appCode':_0x41eecf[_0x5270f7(0xbd)],'selector':_0x5d21a4,'total':_0x364357[_0x5270f7(0xbf)],'relations':_0x364357[_0x5270f7(0xba)](projectCrossRelation)},'message':_0x5270f7(0xc6)+_0x364357['length']+_0x5270f7(0xb9)};}};function a71_0x2720(){const _0x5cc236=['Cross-database\x20relations:\x20','list','read','List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','342474BCnhNi','dataset','\x20relation(s)','map','7497384ffyCSg','26105ZKJBek','appCode','32155640FNNXAI','length','4qCHFRu','6960912zuDFII','2995332DgSIvw','474rXSJgk','1063418jdcYAh','9htCzvo'];a71_0x2720=function(){return _0x5cc236;};return a71_0x2720();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a72_0x40c5aa=a72_0x5118;(function(_0x5252a5,_0x2643c0){const _0x18ea9b=a72_0x5118,_0x5649cc=_0x5252a5();while(!![]){try{const _0x46a760=-parseInt(_0x18ea9b(0x16e))/0x1*(-parseInt(_0x18ea9b(0x17f))/0x2)+-parseInt(_0x18ea9b(0x180))/0x3*(parseInt(_0x18ea9b(0x159))/0x4)+-parseInt(_0x18ea9b(0x19f))/0x5+parseInt(_0x18ea9b(0x168))/0x6*(-parseInt(_0x18ea9b(0x192))/0x7)+-parseInt(_0x18ea9b(0x17a))/0x8+parseInt(_0x18ea9b(0x15b))/0x9*(parseInt(_0x18ea9b(0x178))/0xa)+parseInt(_0x18ea9b(0x1a1))/0xb;if(_0x46a760===_0x2643c0)break;else _0x5649cc['push'](_0x5649cc['shift']());}catch(_0x5e5efa){_0x5649cc['push'](_0x5649cc['shift']());}}}(a72_0x3676,0xc4b08));import{getDatasetDetail,queryCrossDbRelations}from'../../core/api-client.js';import{CROSS_DB_RELATION_PATHS}from'../../core/cross-db-relation.js';import{CliError,CliErrors}from'../../errors.js';import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0xbf2ff5,_0x3726e9){const _0x1a5cb9=a72_0x5118,_0xbb3b5b=_0xbf2ff5[_0x1a5cb9(0x15d)](_0x3726e9)[_0x1a5cb9(0x1a2)]();if(!_0xbb3b5b)throw CliErrors[_0x1a5cb9(0x158)](_0x3726e9);return _0xbb3b5b;}function explicitDblink(_0x370f33){const _0x24ff6a=a72_0x5118,_0x1a965d=_0x370f33['flag'](_0x24ff6a(0x197));if(_0x1a965d===undefined||_0x1a965d===null)return undefined;const _0x4eb89d=Number(_0x1a965d);if(!Number[_0x24ff6a(0x198)](_0x4eb89d)||_0x4eb89d<=0x0)throw CliErrors[_0x24ff6a(0x170)](_0x24ff6a(0x164));return _0x4eb89d;}export function validateCrossRelation(_0x15029b,_0x440bc4){const _0x1bb325=a72_0x5118,_0x5586d1=explicitDblink(_0x15029b);if(_0x440bc4===_0x1bb325(0x16b)){if(!_0x15029b[_0x1bb325(0x15d)](_0x1bb325(0x1a4))[_0x1bb325(0x1a2)]()&&_0x5586d1===undefined)throw CliErrors[_0x1bb325(0x170)]('Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.');return;}required(_0x15029b,_0x1bb325(0x1a4)),required(_0x15029b,'from-column');if(_0x440bc4!==_0x1bb325(0x196)){required(_0x15029b,_0x1bb325(0x183)),required(_0x15029b,_0x1bb325(0x160));const _0x16da5f=_0x15029b[_0x1bb325(0x15d)](_0x1bb325(0x182))[_0x1bb325(0x1a2)]();if(_0x16da5f&&!CROSS_RELATION_CARDINALITY_FLAG['enum'][_0x1bb325(0x16a)](_0x16da5f))throw CliErrors[_0x1bb325(0x170)](_0x1bb325(0x17b));}}async function resolveEndpoint(_0x56ef48){const _0x159389=a72_0x5118,_0x55bacf=await getDatasetDetail(_0x56ef48),_0x117cb5=_0x55bacf?.[_0x159389(0x18a)]??{};if((_0x55bacf?.['source']??_0x117cb5['sourceType'])!=='DB_TABLE')throw CliErrors[_0x159389(0x170)](_0x159389(0x17e)+_0x56ef48+'\x20must\x20be\x20a\x20DB_TABLE\x20dataset.');const _0x3caa24=_0x55bacf['dbtableConfig']??_0x55bacf[_0x159389(0x19b)]??{};let _0x2d4beb=_0x55bacf[_0x159389(0x18c)]??_0x117cb5[_0x159389(0x18c)]??{};if(typeof _0x2d4beb===_0x159389(0x167))try{_0x2d4beb=_0x2d4beb[_0x159389(0x1a2)]()?JSON[_0x159389(0x15a)](_0x2d4beb):{};}catch{throw CliErrors[_0x159389(0x170)](_0x159389(0x17e)+_0x56ef48+_0x159389(0x1a3));}const _0x1135aa=Number(_0x2d4beb?.[_0x159389(0x173)]?.[_0x159389(0x17d)]??_0x55bacf[_0x159389(0x173)]?.[_0x159389(0x17d)]??_0x117cb5[_0x159389(0x173)]?.[_0x159389(0x17d)]??_0x3caa24[_0x159389(0x17d)]??_0x117cb5[_0x159389(0x17d)]??_0x55bacf[_0x159389(0x17d)]),_0x4dd439=String(_0x55bacf[_0x159389(0x19c)]??_0x117cb5['tableName']??_0x3caa24[_0x159389(0x19c)]??'')['trim']();if(!Number[_0x159389(0x198)](_0x1135aa)||_0x1135aa<=0x0||!_0x4dd439)throw CliErrors['validation'](_0x159389(0x17e)+_0x56ef48+_0x159389(0x176));return{'datasetCode':_0x56ef48,'dblinkId':_0x1135aa,'table':_0x4dd439};}export async function resolveCrossRelationQuery(_0x4c8e05){const _0x52c7f6=a72_0x5118,_0x54b196=_0x4c8e05[_0x52c7f6(0x15d)](_0x52c7f6(0x1a4))[_0x52c7f6(0x1a2)](),_0x57c6c0=explicitDblink(_0x4c8e05),_0x554440=_0x54b196?await resolveEndpoint(_0x54b196):undefined;if(_0x554440&&_0x57c6c0!==undefined&&_0x554440[_0x52c7f6(0x19e)]!==_0x57c6c0)throw CliErrors[_0x52c7f6(0x170)](_0x52c7f6(0x162));const _0x1ede78=_0x554440?.[_0x52c7f6(0x19e)]??_0x57c6c0;if(_0x1ede78===undefined)throw CliErrors[_0x52c7f6(0x170)](_0x52c7f6(0x1a6));return{'appCode':_0x4c8e05[_0x52c7f6(0x191)],'fromDblinkId':_0x1ede78,..._0x54b196?{'fromDatasetCode':_0x54b196}:{},..._0x4c8e05['str'](_0x52c7f6(0x172))[_0x52c7f6(0x1a2)]()?{'fromField':_0x4c8e05[_0x52c7f6(0x15d)](_0x52c7f6(0x172))['trim']()}:{}};}export function projectCrossRelation(_0x2c383e){const _0x1d330c=a72_0x5118;return{'relationId':_0x2c383e[_0x1d330c(0x184)],'from':{'source':_0x1d330c(0x1a5),'datasetCode':_0x2c383e[_0x1d330c(0x18b)],'datasetName':_0x2c383e[_0x1d330c(0x18f)],'dblinkId':_0x2c383e['fromDblinkId'],'table':_0x2c383e[_0x1d330c(0x19a)],'field':_0x2c383e[_0x1d330c(0x187)]},'to':{'source':'DB_TABLE','datasetCode':_0x2c383e['toDatasetCode'],'datasetName':_0x2c383e[_0x1d330c(0x157)],'dblinkId':_0x2c383e['toDblinkId'],'table':_0x2c383e[_0x1d330c(0x195)],'field':_0x2c383e[_0x1d330c(0x177)],'labelField':_0x2c383e[_0x1d330c(0x199)]},'relation':{'cardinality':_0x2c383e[_0x1d330c(0x182)],'relationType':_0x2c383e[_0x1d330c(0x161)]}};}function a72_0x3676(){const _0x1c21b4=['filter','fromField','from','expectedLabel','dataset','fromDatasetCode','extend','query','length','fromDatasetName','expectedCardinality','appCode','3241fTLHJv','toLowerCase','table','toTableName','delete','from-dblink-id','isSafeInteger','refTableLabelName','fromTableName','dbtable','tableName','some','dblinkId','7839110vZyEce','before','47689565AFUDtr','trim','\x20has\x20invalid\x20storage\x20configuration.','from-datasetcode','DB_TABLE','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','map','toDblinkId','\x20write\x20was\x20not\x20verified.','toDatasetName','flagMissing','52rJgkiv','parse','612LLEzHu','label_inherited','str','\x20a\x20cross-database\x20relation\x20for\x20','data','to-column','relationType','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','apiError','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','matched','datasetCode','string','4938ogaxSj','message','includes','list','create','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','42KQtAFM','body','validation','fromDblinkId','from-column','storageProfile','catch','Would\x20','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','toField','37510GxUmQY','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','3087752RxXTIS','Invalid\x20--cardinality.','POST','dbId','Dataset\x20','4934EcqOdj','358527IuEvIM','to-label-column','cardinality','to-datasetcode','relationId','\x20verified.'];a72_0x3676=function(){return _0x1c21b4;};return a72_0x3676();}function ambiguity(_0x3f1373){const _0x3840c1=a72_0x5118,_0x543686=CliErrors[_0x3840c1(0x170)](_0x3840c1(0x1a7),'Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.');return Object['defineProperty'](_0x543686,'data',{'value':{'candidates':_0x3f1373[_0x3840c1(0x1a8)](projectCrossRelation)}}),_0x543686;}const sameName=(_0x338495,_0x569f0b)=>_0x338495['toLowerCase']()===_0x569f0b[a72_0x40c5aa(0x193)]();function matchesEndpoint(_0x49a656,_0x41e238,_0x49bfac,_0x2a129e,_0x39b5a0){const _0x4cfd03=a72_0x40c5aa;return _0x49a656[_0x4cfd03(0x171)]===_0x41e238['dblinkId']&&sameName(_0x49a656[_0x4cfd03(0x19a)],_0x41e238['table'])&&sameName(_0x49a656[_0x4cfd03(0x187)],_0x49bfac)&&_0x49a656[_0x4cfd03(0x1a9)]===_0x2a129e[_0x4cfd03(0x19e)]&&sameName(_0x49a656[_0x4cfd03(0x195)],_0x2a129e['table'])&&sameName(_0x49a656[_0x4cfd03(0x177)],_0x39b5a0);}export async function prepareCrossRelation(_0x44b6cc,_0x3c946e){const _0x14017d=a72_0x40c5aa,_0xeba864=await resolveEndpoint(required(_0x44b6cc,_0x14017d(0x1a4))),_0x1b69fe=explicitDblink(_0x44b6cc);if(_0x1b69fe!==undefined&&_0xeba864['dblinkId']!==_0x1b69fe)throw CliErrors[_0x14017d(0x170)](_0x14017d(0x162));const _0x42f812={'appCode':_0x44b6cc[_0x14017d(0x191)],'fromDatasetCode':_0xeba864[_0x14017d(0x166)],'fromField':required(_0x44b6cc,'from-column'),..._0x1b69fe!==undefined?{'fromDblinkId':_0x1b69fe}:{}},_0x5b80fc={'appCode':_0x44b6cc[_0x14017d(0x191)],'fromDblinkId':_0xeba864[_0x14017d(0x19e)],'fromDatasetCode':_0xeba864[_0x14017d(0x166)],'fromField':_0x42f812[_0x14017d(0x187)]},_0x9f44a6=await queryCrossDbRelations(_0x5b80fc);let _0x18fbdf=null;if(_0x3c946e!=='create'){if(_0x9f44a6[_0x14017d(0x18e)]>0x1)throw ambiguity(_0x9f44a6);_0x18fbdf=_0x9f44a6[0x0]??null;if(!_0x18fbdf)throw CliErrors[_0x14017d(0x170)](_0x14017d(0x179));}if(_0x3c946e==='delete')return{'operation':_0x3c946e,'from':_0xeba864,'query':_0x5b80fc,'body':_0x42f812,'before':_0x18fbdf};const _0x3fbc56=await resolveEndpoint(required(_0x44b6cc,'to-datasetcode'));if(_0xeba864['dblinkId']===_0x3fbc56[_0x14017d(0x19e)])throw CliErrors['validation']('Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.');const _0x471971=_0x44b6cc[_0x14017d(0x15d)](_0x14017d(0x181))[_0x14017d(0x1a2)](),_0x3af065=_0x44b6cc[_0x14017d(0x15d)](_0x14017d(0x182))[_0x14017d(0x1a2)](),_0x1570ed={..._0x42f812,'toDatasetCode':_0x3fbc56[_0x14017d(0x166)],'toField':required(_0x44b6cc,_0x14017d(0x160)),..._0x471971?{'refTableLabelName':_0x471971}:{},..._0x3af065?{'cardinality':_0x3af065}:{}};if(_0x9f44a6[_0x14017d(0x19d)](_0x14efdf=>_0x14efdf[_0x14017d(0x184)]!==_0x18fbdf?.['relationId']&&matchesEndpoint(_0x14efdf,_0xeba864,_0x1570ed[_0x14017d(0x187)],_0x3fbc56,_0x1570ed[_0x14017d(0x177)])))throw CliErrors[_0x14017d(0x170)]('Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.');return{'operation':_0x3c946e,'from':_0xeba864,'to':_0x3fbc56,'query':_0x5b80fc,'body':_0x1570ed,'before':_0x18fbdf,'expectedLabel':_0x471971||_0x18fbdf?.[_0x14017d(0x199)]||_0x1570ed['toField'],'expectedCardinality':_0x3af065||_0x18fbdf?.[_0x14017d(0x182)]||null};}function mutationData(_0x16759a,_0x47c82f,_0x1361df){const _0x51999d=a72_0x40c5aa,{operation:_0x302d8a,body:_0x2d722c,before:_0x3df674}=_0x16759a;return{'operation':_0x302d8a,'selector':{'appCode':_0x2d722c[_0x51999d(0x191)],'from':{'datasetCode':_0x2d722c[_0x51999d(0x18b)],'field':_0x2d722c[_0x51999d(0x187)],'dblinkId':_0x16759a['from'][_0x51999d(0x19e)]}},'before':_0x3df674?projectCrossRelation(_0x3df674):null,'after':_0x1361df,'dryRun':_0x47c82f,'backend':{'method':_0x51999d(0x17c),'path':CROSS_DB_RELATION_PATHS[_0x302d8a]},'warnings':_0x302d8a==='update'&&!_0x2d722c[_0x51999d(0x199)]?[{'code':_0x51999d(0x15c),'message':'The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.'}]:[]};}export async function previewCrossRelation(_0x269ddd,_0x5c74f5){const _0x6f7917=a72_0x40c5aa,_0xf96b0e=await prepareCrossRelation(_0x269ddd,_0x5c74f5),_0x4736fa=_0xf96b0e[_0x6f7917(0x16f)],_0x4719b0=_0x5c74f5===_0x6f7917(0x196)?null:{..._0xf96b0e[_0x6f7917(0x1a0)]?{'relationId':_0xf96b0e[_0x6f7917(0x1a0)][_0x6f7917(0x184)]}:{},'from':{'datasetCode':_0xf96b0e['from'][_0x6f7917(0x166)],'dblinkId':_0xf96b0e[_0x6f7917(0x188)]['dblinkId'],'table':_0xf96b0e[_0x6f7917(0x188)][_0x6f7917(0x194)],'field':_0x4736fa[_0x6f7917(0x187)]},'to':{'datasetCode':_0xf96b0e['to'][_0x6f7917(0x166)],'dblinkId':_0xf96b0e['to']['dblinkId'],'table':_0xf96b0e['to'][_0x6f7917(0x194)],'field':_0x4736fa[_0x6f7917(0x177)],'labelField':_0xf96b0e[_0x6f7917(0x189)]},'relation':{'cardinality':_0xf96b0e[_0x6f7917(0x190)],'relationType':0x2}};return{...mutationData(_0xf96b0e,!![],null),'after':_0x4719b0,'method':_0x6f7917(0x17c),'url':CROSS_DB_RELATION_PATHS[_0x5c74f5],'body':_0xf96b0e[_0x6f7917(0x16f)],'description':_0x6f7917(0x175)+_0x5c74f5+_0x6f7917(0x15e)+_0x4736fa[_0x6f7917(0x18b)]+'.'+_0x4736fa[_0x6f7917(0x187)]};}function a72_0x5118(_0x164e39,_0x6fb824){_0x164e39=_0x164e39-0x157;const _0x367611=a72_0x3676();let _0x51188a=_0x367611[_0x164e39];return _0x51188a;}export async function executeCrossRelation(_0xc476cd,_0x5b7ac9,_0x4c43bc){const _0x1a5ec6=a72_0x40c5aa,_0xebcd74=await prepareCrossRelation(_0xc476cd,_0x5b7ac9);try{await _0x4c43bc(_0xebcd74['body']);}catch(_0x437441){if(_0x437441 instanceof CliError&&_0x437441[_0x1a5ec6(0x169)][_0x1a5ec6(0x16a)]('multiple\x20cross-database\x20relations\x20matched')){const _0x5a4586=await queryCrossDbRelations(_0xebcd74[_0x1a5ec6(0x18d)])[_0x1a5ec6(0x174)](()=>[]);throw ambiguity(_0x5a4586);}throw _0x437441;}let _0x15c269=[],_0x15194e,_0x4eb1de=![];try{_0x15c269=await queryCrossDbRelations(_0xebcd74[_0x1a5ec6(0x18d)]);if(_0x5b7ac9===_0x1a5ec6(0x196))_0x4eb1de=!_0x15c269[_0x1a5ec6(0x19d)](_0x5d8df6=>_0x5d8df6[_0x1a5ec6(0x184)]===_0xebcd74[_0x1a5ec6(0x1a0)][_0x1a5ec6(0x184)]);else{const _0x43306b=_0xebcd74[_0x1a5ec6(0x16f)],_0x47ead8=_0x15c269[_0x1a5ec6(0x186)](_0x5cf292=>matchesEndpoint(_0x5cf292,_0xebcd74[_0x1a5ec6(0x188)],_0x43306b[_0x1a5ec6(0x187)],_0xebcd74['to'],_0x43306b['toField'])&&(_0x5b7ac9===_0x1a5ec6(0x16c)||_0x5cf292[_0x1a5ec6(0x184)]===_0xebcd74[_0x1a5ec6(0x1a0)][_0x1a5ec6(0x184)]));_0x15194e=_0x47ead8[_0x1a5ec6(0x18e)]===0x1?_0x47ead8[0x0]:undefined,_0x4eb1de=!!_0x15194e&&_0x15194e[_0x1a5ec6(0x199)]===_0xebcd74[_0x1a5ec6(0x189)]&&_0x15194e[_0x1a5ec6(0x182)]===_0xebcd74[_0x1a5ec6(0x190)]&&_0x15194e['relationType']===0x2;}}catch{}const _0x4637ff={...mutationData(_0xebcd74,![],_0x15194e?projectCrossRelation(_0x15194e):null),'verification':{'status':_0x4eb1de?_0x1a5ec6(0x165):'unconfirmed','verified':_0x4eb1de}};if(!_0x4eb1de){const _0x271d38=CliErrors[_0x1a5ec6(0x163)]('Cross-database\x20relation\x20'+_0x5b7ac9+_0x1a5ec6(0x1aa),_0x1a5ec6(0x16d));Object['defineProperty'](_0x271d38,_0x1a5ec6(0x15f),{'value':{..._0x4637ff,'candidates':_0x15c269[_0x1a5ec6(0x1a8)](projectCrossRelation)}});throw _0x271d38;}return{'ok':!![],'data':_0x4637ff,'message':'Cross-database\x20relation\x20'+_0x5b7ac9+_0x1a5ec6(0x185)};}
|
|
1
|
+
const a72_0x508adc=a72_0x2120;(function(_0x5d34c8,_0xaa3df8){const _0x4113b4=a72_0x2120,_0x29844f=_0x5d34c8();while(!![]){try{const _0x44274e=-parseInt(_0x4113b4(0x147))/0x1*(-parseInt(_0x4113b4(0x16e))/0x2)+-parseInt(_0x4113b4(0x14f))/0x3*(-parseInt(_0x4113b4(0x144))/0x4)+parseInt(_0x4113b4(0x15c))/0x5+-parseInt(_0x4113b4(0x173))/0x6+parseInt(_0x4113b4(0x15e))/0x7+-parseInt(_0x4113b4(0x166))/0x8*(parseInt(_0x4113b4(0x157))/0x9)+-parseInt(_0x4113b4(0x16c))/0xa;if(_0x44274e===_0xaa3df8)break;else _0x29844f['push'](_0x29844f['shift']());}catch(_0x161331){_0x29844f['push'](_0x29844f['shift']());}}}(a72_0x4a58,0x39b1c));import{getDatasetDetail,queryCrossDbRelations}from'../../core/api-client.js';import{CROSS_DB_RELATION_PATHS}from'../../core/cross-db-relation.js';function a72_0x2120(_0x1b2f98,_0x4d3fe1){_0x1b2f98=_0x1b2f98-0x131;const _0x4a58a7=a72_0x4a58();let _0x212061=_0x4a58a7[_0x1b2f98];return _0x212061;}import{CliError,CliErrors}from'../../errors.js';import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0x51c983,_0x485244){const _0x21e80a=a72_0x2120,_0x1d49a2=_0x51c983['str'](_0x485244)[_0x21e80a(0x14b)]();if(!_0x1d49a2)throw CliErrors[_0x21e80a(0x137)](_0x485244);return _0x1d49a2;}function explicitDblink(_0xda79f2){const _0x15620a=a72_0x2120,_0x194a3d=_0xda79f2['flag'](_0x15620a(0x17c));if(_0x194a3d===undefined||_0x194a3d===null)return undefined;const _0x4016ce=Number(_0x194a3d);if(!Number[_0x15620a(0x163)](_0x4016ce)||_0x4016ce<=0x0)throw CliErrors['validation'](_0x15620a(0x162));return _0x4016ce;}export function validateCrossRelation(_0x4214ea,_0x44e909){const _0x4fc397=a72_0x2120,_0x357323=explicitDblink(_0x4214ea);if(_0x44e909==='list'){if(!_0x4214ea[_0x4fc397(0x13d)](_0x4fc397(0x16b))[_0x4fc397(0x14b)]()&&_0x357323===undefined)throw CliErrors[_0x4fc397(0x13b)](_0x4fc397(0x156));return;}required(_0x4214ea,_0x4fc397(0x16b)),required(_0x4214ea,'from-column');if(_0x44e909!==_0x4fc397(0x15d)){required(_0x4214ea,_0x4fc397(0x13e)),required(_0x4214ea,'to-column');const _0x329dec=_0x4214ea['str'](_0x4fc397(0x177))[_0x4fc397(0x14b)]();if(_0x329dec&&!CROSS_RELATION_CARDINALITY_FLAG[_0x4fc397(0x13f)][_0x4fc397(0x183)](_0x329dec))throw CliErrors[_0x4fc397(0x13b)](_0x4fc397(0x13c));}}async function resolveEndpoint(_0x268d5b){const _0x1fa621=a72_0x2120,_0x15093f=await getDatasetDetail(_0x268d5b),_0x1b3653=_0x15093f?.[_0x1fa621(0x182)]??{};if((_0x15093f?.[_0x1fa621(0x16a)]??_0x1b3653['sourceType'])!==_0x1fa621(0x149))throw CliErrors[_0x1fa621(0x13b)](_0x1fa621(0x170)+_0x268d5b+_0x1fa621(0x15f));const _0x1d9082=_0x15093f[_0x1fa621(0x178)]??_0x15093f[_0x1fa621(0x133)]??{};let _0x56ce68=_0x15093f['extend']??_0x1b3653[_0x1fa621(0x174)]??{};if(typeof _0x56ce68===_0x1fa621(0x16f))try{_0x56ce68=_0x56ce68['trim']()?JSON['parse'](_0x56ce68):{};}catch{throw CliErrors['validation'](_0x1fa621(0x170)+_0x268d5b+_0x1fa621(0x145));}const _0x2f33c0=Number(_0x56ce68?.[_0x1fa621(0x140)]?.['dbId']??_0x15093f[_0x1fa621(0x140)]?.['dbId']??_0x1b3653[_0x1fa621(0x140)]?.[_0x1fa621(0x152)]??_0x1d9082[_0x1fa621(0x152)]??_0x1b3653[_0x1fa621(0x152)]??_0x15093f[_0x1fa621(0x152)]),_0x206108=String(_0x15093f[_0x1fa621(0x15a)]??_0x1b3653['tableName']??_0x1d9082[_0x1fa621(0x15a)]??'')[_0x1fa621(0x14b)]();if(!Number[_0x1fa621(0x163)](_0x2f33c0)||_0x2f33c0<=0x0||!_0x206108)throw CliErrors[_0x1fa621(0x13b)](_0x1fa621(0x170)+_0x268d5b+'\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.');return{'datasetCode':_0x268d5b,'dblinkId':_0x2f33c0,'table':_0x206108};}export async function resolveCrossRelationQuery(_0x21eca9){const _0x5f3a99=a72_0x2120,_0x5ff6ff=_0x21eca9[_0x5f3a99(0x13d)](_0x5f3a99(0x16b))[_0x5f3a99(0x14b)](),_0x27389c=explicitDblink(_0x21eca9),_0x58c463=_0x5ff6ff?await resolveEndpoint(_0x5ff6ff):undefined;if(_0x58c463&&_0x27389c!==undefined&&_0x58c463[_0x5f3a99(0x14d)]!==_0x27389c)throw CliErrors[_0x5f3a99(0x13b)](_0x5f3a99(0x171));const _0x10933d=_0x58c463?.[_0x5f3a99(0x14d)]??_0x27389c;if(_0x10933d===undefined)throw CliErrors[_0x5f3a99(0x13b)](_0x5f3a99(0x156));return{'appCode':_0x21eca9[_0x5f3a99(0x167)],'fromDblinkId':_0x10933d,..._0x5ff6ff?{'fromDatasetCode':_0x5ff6ff}:{},..._0x21eca9['str']('from-column')[_0x5f3a99(0x14b)]()?{'fromField':_0x21eca9[_0x5f3a99(0x13d)](_0x5f3a99(0x154))[_0x5f3a99(0x14b)]()}:{}};}export function projectCrossRelation(_0x32ef0e){const _0x4e0ee5=a72_0x2120;return{'relationId':_0x32ef0e[_0x4e0ee5(0x143)],'from':{'source':_0x4e0ee5(0x149),'datasetCode':_0x32ef0e[_0x4e0ee5(0x181)],'datasetName':_0x32ef0e['fromDatasetName'],'dblinkId':_0x32ef0e[_0x4e0ee5(0x136)],'table':_0x32ef0e[_0x4e0ee5(0x134)],'field':_0x32ef0e[_0x4e0ee5(0x14e)]},'to':{'source':'DB_TABLE','datasetCode':_0x32ef0e['toDatasetCode'],'datasetName':_0x32ef0e[_0x4e0ee5(0x165)],'dblinkId':_0x32ef0e[_0x4e0ee5(0x153)],'table':_0x32ef0e['toTableName'],'field':_0x32ef0e[_0x4e0ee5(0x17d)],'labelField':_0x32ef0e[_0x4e0ee5(0x17a)]},'relation':{'cardinality':_0x32ef0e['cardinality'],'relationType':_0x32ef0e[_0x4e0ee5(0x15b)]}};}function ambiguity(_0x404414){const _0x12ea69=a72_0x2120,_0x59c8fe=CliErrors[_0x12ea69(0x13b)](_0x12ea69(0x176),'Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.');return Object[_0x12ea69(0x172)](_0x59c8fe,'data',{'value':{'candidates':_0x404414[_0x12ea69(0x141)](projectCrossRelation)}}),_0x59c8fe;}const sameName=(_0x493ead,_0x2b9766)=>_0x493ead[a72_0x508adc(0x16d)]()===_0x2b9766[a72_0x508adc(0x16d)]();function matchesEndpoint(_0x20087b,_0x2265a2,_0x450694,_0x5baad0,_0x2e12b9){const _0x447539=a72_0x508adc;return _0x20087b[_0x447539(0x136)]===_0x2265a2['dblinkId']&&sameName(_0x20087b[_0x447539(0x134)],_0x2265a2[_0x447539(0x158)])&&sameName(_0x20087b[_0x447539(0x14e)],_0x450694)&&_0x20087b[_0x447539(0x153)]===_0x5baad0[_0x447539(0x14d)]&&sameName(_0x20087b[_0x447539(0x168)],_0x5baad0[_0x447539(0x158)])&&sameName(_0x20087b[_0x447539(0x17d)],_0x2e12b9);}export async function prepareCrossRelation(_0x27c64d,_0xff44b2){const _0x1364c3=a72_0x508adc,_0x5b320c=await resolveEndpoint(required(_0x27c64d,_0x1364c3(0x16b))),_0x4656f0=explicitDblink(_0x27c64d);if(_0x4656f0!==undefined&&_0x5b320c[_0x1364c3(0x14d)]!==_0x4656f0)throw CliErrors[_0x1364c3(0x13b)](_0x1364c3(0x171));const _0x18a888={'appCode':_0x27c64d[_0x1364c3(0x167)],'fromDatasetCode':_0x5b320c[_0x1364c3(0x17e)],'fromField':required(_0x27c64d,_0x1364c3(0x154)),..._0x4656f0!==undefined?{'fromDblinkId':_0x4656f0}:{}},_0x465800={'appCode':_0x27c64d[_0x1364c3(0x167)],'fromDblinkId':_0x5b320c['dblinkId'],'fromDatasetCode':_0x5b320c[_0x1364c3(0x17e)],'fromField':_0x18a888['fromField']},_0xb1b589=await queryCrossDbRelations(_0x465800);let _0x1503f7=null;if(_0xff44b2!=='create'){if(_0xb1b589[_0x1364c3(0x148)]>0x1)throw ambiguity(_0xb1b589);_0x1503f7=_0xb1b589[0x0]??null;if(!_0x1503f7)throw CliErrors[_0x1364c3(0x13b)](_0x1364c3(0x180));}if(_0xff44b2===_0x1364c3(0x15d))return{'operation':_0xff44b2,'from':_0x5b320c,'query':_0x465800,'body':_0x18a888,'before':_0x1503f7};const _0x306205=await resolveEndpoint(required(_0x27c64d,_0x1364c3(0x13e)));if(_0x5b320c[_0x1364c3(0x14d)]===_0x306205[_0x1364c3(0x14d)])throw CliErrors[_0x1364c3(0x13b)]('Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.');const _0xbcdde5=_0x27c64d[_0x1364c3(0x13d)](_0x1364c3(0x169))['trim'](),_0x2fd709=_0x27c64d[_0x1364c3(0x13d)](_0x1364c3(0x177))[_0x1364c3(0x14b)](),_0x2971a9={..._0x18a888,'toDatasetCode':_0x306205[_0x1364c3(0x17e)],'toField':required(_0x27c64d,'to-column'),..._0xbcdde5?{'refTableLabelName':_0xbcdde5}:{},..._0x2fd709?{'cardinality':_0x2fd709}:{}};if(_0xb1b589[_0x1364c3(0x14c)](_0x21438d=>_0x21438d[_0x1364c3(0x143)]!==_0x1503f7?.[_0x1364c3(0x143)]&&matchesEndpoint(_0x21438d,_0x5b320c,_0x2971a9[_0x1364c3(0x14e)],_0x306205,_0x2971a9[_0x1364c3(0x17d)])))throw CliErrors[_0x1364c3(0x13b)](_0x1364c3(0x175));return{'operation':_0xff44b2,'from':_0x5b320c,'to':_0x306205,'query':_0x465800,'body':_0x2971a9,'before':_0x1503f7,'expectedLabel':_0xbcdde5||_0x1503f7?.[_0x1364c3(0x17a)]||_0x2971a9[_0x1364c3(0x17d)],'expectedCardinality':_0x2fd709||_0x1503f7?.[_0x1364c3(0x177)]||null};}function mutationData(_0x1c3939,_0x4005d7,_0x19b0b3){const _0x2294cc=a72_0x508adc,{operation:_0x419e9e,body:_0x5374b5,before:_0x39f156}=_0x1c3939;return{'operation':_0x419e9e,'selector':{'appCode':_0x5374b5[_0x2294cc(0x167)],'from':{'datasetCode':_0x5374b5[_0x2294cc(0x181)],'field':_0x5374b5[_0x2294cc(0x14e)],'dblinkId':_0x1c3939[_0x2294cc(0x135)][_0x2294cc(0x14d)]}},'before':_0x39f156?projectCrossRelation(_0x39f156):null,'after':_0x19b0b3,'dryRun':_0x4005d7,'backend':{'method':_0x2294cc(0x17f),'path':CROSS_DB_RELATION_PATHS[_0x419e9e]},'warnings':_0x419e9e===_0x2294cc(0x17b)&&!_0x5374b5['refTableLabelName']?[{'code':'label_inherited','message':'The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.'}]:[]};}export async function previewCrossRelation(_0x26213a,_0xf0f838){const _0x5546b9=a72_0x508adc,_0x2310ae=await prepareCrossRelation(_0x26213a,_0xf0f838),_0x3bb8c4=_0x2310ae[_0x5546b9(0x146)],_0x35aa2e=_0xf0f838===_0x5546b9(0x15d)?null:{..._0x2310ae[_0x5546b9(0x179)]?{'relationId':_0x2310ae['before'][_0x5546b9(0x143)]}:{},'from':{'datasetCode':_0x2310ae[_0x5546b9(0x135)][_0x5546b9(0x17e)],'dblinkId':_0x2310ae[_0x5546b9(0x135)][_0x5546b9(0x14d)],'table':_0x2310ae[_0x5546b9(0x135)][_0x5546b9(0x158)],'field':_0x3bb8c4[_0x5546b9(0x14e)]},'to':{'datasetCode':_0x2310ae['to'][_0x5546b9(0x17e)],'dblinkId':_0x2310ae['to'][_0x5546b9(0x14d)],'table':_0x2310ae['to'][_0x5546b9(0x158)],'field':_0x3bb8c4[_0x5546b9(0x17d)],'labelField':_0x2310ae[_0x5546b9(0x155)]},'relation':{'cardinality':_0x2310ae[_0x5546b9(0x139)],'relationType':0x2}};return{...mutationData(_0x2310ae,!![],null),'after':_0x35aa2e,'method':'POST','url':CROSS_DB_RELATION_PATHS[_0xf0f838],'body':_0x2310ae[_0x5546b9(0x146)],'description':'Would\x20'+_0xf0f838+'\x20a\x20cross-database\x20relation\x20for\x20'+_0x3bb8c4[_0x5546b9(0x181)]+'.'+_0x3bb8c4[_0x5546b9(0x14e)]};}function a72_0x4a58(){const _0x5dc8dc=['Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','9XrCVUz','table','matched','tableName','relationType','1426080tEhkLt','delete','586901UucPaO','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','apiError','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','isSafeInteger','Cross-database\x20relation\x20','toDatasetName','1621984ynnFQJ','appCode','toTableName','to-label-column','source','from-datasetcode','3163550BXtdwA','toLowerCase','6OYztZC','string','Dataset\x20','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','defineProperty','365760ZaskEl','extend','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','cardinality','dbtableConfig','before','refTableLabelName','update','from-dblink-id','toField','datasetCode','POST','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','fromDatasetCode','dataset','includes','filter','create','dbtable','fromTableName','from','fromDblinkId','flagMissing','data','expectedCardinality','multiple\x20cross-database\x20relations\x20matched','validation','Invalid\x20--cardinality.','str','to-datasetcode','enum','storageProfile','map','query','relationId','110804DBCLVj','\x20has\x20invalid\x20storage\x20configuration.','body','29069DNWhwT','length','DB_TABLE','unconfirmed','trim','some','dblinkId','fromField','39lyciKg','\x20verified.','message','dbId','toDblinkId','from-column','expectedLabel'];a72_0x4a58=function(){return _0x5dc8dc;};return a72_0x4a58();}export async function executeCrossRelation(_0x5d7462,_0x3bb309,_0x8029ec){const _0x55ac45=a72_0x508adc,_0x15a11c=await prepareCrossRelation(_0x5d7462,_0x3bb309);try{await _0x8029ec(_0x15a11c[_0x55ac45(0x146)]);}catch(_0x153534){if(_0x153534 instanceof CliError&&_0x153534[_0x55ac45(0x151)][_0x55ac45(0x183)](_0x55ac45(0x13a))){const _0x8d37a7=await queryCrossDbRelations(_0x15a11c[_0x55ac45(0x142)])['catch'](()=>[]);throw ambiguity(_0x8d37a7);}throw _0x153534;}let _0x52b256=[],_0x5a3852,_0x267898=![];try{_0x52b256=await queryCrossDbRelations(_0x15a11c[_0x55ac45(0x142)]);if(_0x3bb309===_0x55ac45(0x15d))_0x267898=!_0x52b256[_0x55ac45(0x14c)](_0x12b2f4=>_0x12b2f4[_0x55ac45(0x143)]===_0x15a11c[_0x55ac45(0x179)]['relationId']);else{const _0x78bfcd=_0x15a11c[_0x55ac45(0x146)],_0x2cd557=_0x52b256[_0x55ac45(0x131)](_0x1791e0=>matchesEndpoint(_0x1791e0,_0x15a11c['from'],_0x78bfcd['fromField'],_0x15a11c['to'],_0x78bfcd[_0x55ac45(0x17d)])&&(_0x3bb309===_0x55ac45(0x132)||_0x1791e0[_0x55ac45(0x143)]===_0x15a11c[_0x55ac45(0x179)][_0x55ac45(0x143)]));_0x5a3852=_0x2cd557[_0x55ac45(0x148)]===0x1?_0x2cd557[0x0]:undefined,_0x267898=!!_0x5a3852&&_0x5a3852['refTableLabelName']===_0x15a11c[_0x55ac45(0x155)]&&_0x5a3852[_0x55ac45(0x177)]===_0x15a11c[_0x55ac45(0x139)]&&_0x5a3852[_0x55ac45(0x15b)]===0x2;}}catch{}const _0x10dca3={...mutationData(_0x15a11c,![],_0x5a3852?projectCrossRelation(_0x5a3852):null),'verification':{'status':_0x267898?_0x55ac45(0x159):_0x55ac45(0x14a),'verified':_0x267898}};if(!_0x267898){const _0x4bbb13=CliErrors[_0x55ac45(0x161)](_0x55ac45(0x164)+_0x3bb309+'\x20write\x20was\x20not\x20verified.',_0x55ac45(0x160));Object[_0x55ac45(0x172)](_0x4bbb13,_0x55ac45(0x138),{'value':{..._0x10dca3,'candidates':_0x52b256[_0x55ac45(0x141)](projectCrossRelation)}});throw _0x4bbb13;}return{'ok':!![],'data':_0x10dca3,'message':_0x55ac45(0x164)+_0x3bb309+_0x55ac45(0x150)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a73_0x430330=a73_0x4769;function a73_0x4769(_0x37f08c,_0x3ef56a){_0x37f08c=_0x37f08c-0x88;const _0x3c4233=a73_0x3c42();let _0x4769c8=_0x3c4233[_0x37f08c];return _0x4769c8;}(function(_0x35e323,_0xc2f4dc){const _0x4a8694=a73_0x4769,_0x58808f=_0x35e323();while(!![]){try{const _0x3d34ef=parseInt(_0x4a8694(0x98))/0x1+parseInt(_0x4a8694(0x8c))/0x2*(-parseInt(_0x4a8694(0x8f))/0x3)+parseInt(_0x4a8694(0x8a))/0x4*(parseInt(_0x4a8694(0x95))/0x5)+-parseInt(_0x4a8694(0x8b))/0x6+parseInt(_0x4a8694(0x96))/0x7*(parseInt(_0x4a8694(0x89))/0x8)+parseInt(_0x4a8694(0x8d))/0x9*(-parseInt(_0x4a8694(0x92))/0xa)+parseInt(_0x4a8694(0x94))/0xb*(parseInt(_0x4a8694(0x8e))/0xc);if(_0x3d34ef===_0xc2f4dc)break;else _0x58808f['push'](_0x58808f['shift']());}catch(_0x15b449){_0x58808f['push'](_0x58808f['shift']());}}}(a73_0x3c42,0x999cd));import{updateCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationUpdate={'service':a73_0x430330(0x88),'command':a73_0x430330(0x91),'description':a73_0x430330(0x97),'risk':a73_0x430330(0x93),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x24ca81=>validateCrossRelation(_0x24ca81,'update'),'dryRun':_0x2f03b5=>previewCrossRelation(_0x2f03b5,a73_0x430330(0x90)),'execute':_0x262efa=>executeCrossRelation(_0x262efa,a73_0x430330(0x90),updateCrossDbRelation)};function a73_0x3c42(){const _0x486add=['cross-relation-update','10KujcqL','write','11ILjUgX','15cnmnJJ','177891ZWStmf','Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','591856zHzDTc','dataset','184ikTqUp','495092WyoSyc','5176596TkItzD','2LPvwdt','5507469BzecVw','9769092tmvcsS','773583hTAmfm','update'];a73_0x3c42=function(){return _0x486add;};return a73_0x3c42();}
|