@lovrabet/rabetbase-cli 2.5.6 → 2.5.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/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/page-list.d.ts +2 -0
- package/lib/commands/flow/page-list.js +1 -0
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.d.ts +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.d.ts +6 -2
- 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 +26 -6
- 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.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +12 -0
- 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.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/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 +1 -1
- package/skills/rabetbase/SKILL.md +8 -4
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +52 -13
- package/skills/rabetbase/guides/backend-function.md +26 -4
- package/skills/rabetbase/guides/bff-creation-workflow.md +9 -0
- package/skills/rabetbase/guides/cross-database-bff.md +1 -0
- package/skills/rabetbase/guides/custom-page-flow-sdk.md +2 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +2 -0
- package/skills/rabetbase/guides/flow-config-examples.md +75 -0
- package/skills/rabetbase/guides/form-flow-start.md +61 -0
- package/skills/rabetbase/guides/typescript-sdk.md +1 -1
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +18 -4
- package/skills/rabetbase/references/rabetbase-codegen-sdk.md +5 -4
- package/skills/rabetbase/references/rabetbase-flow-commands.md +21 -2
- package/skills/rabetbase/references/rabetbase-flow-resources.md +21 -3
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +6 -2
- package/skills/rabetbase/references/rabetbase-kb.md +4 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x29c6b7=a59_0x3cf7;(function(_0x4de076,_0x2a938d){const _0x14cbf9=a59_0x3cf7,_0x356fb8=_0x4de076();while(!![]){try{const _0x3a4638=-parseInt(_0x14cbf9(0xde))/0x1+parseInt(_0x14cbf9(0xd9))/0x2+-parseInt(_0x14cbf9(0xdd))/0x3+-parseInt(_0x14cbf9(0xe4))/0x4+parseInt(_0x14cbf9(0xdf))/0x5*(-parseInt(_0x14cbf9(0xd8))/0x6)+parseInt(_0x14cbf9(0xe6))/0x7+parseInt(_0x14cbf9(0xd7))/0x8;if(_0x3a4638===_0x2a938d)break;else _0x356fb8['push'](_0x356fb8['shift']());}catch(_0x3e9429){_0x356fb8['push'](_0x356fb8['shift']());}}}(a59_0x50ca,0xad494));function a59_0x3cf7(_0x14bc4d,_0x1fd6f0){_0x14bc4d=_0x14bc4d-0xd3;const _0x50cafe=a59_0x50ca();let _0x3cf725=_0x50cafe[_0x14bc4d];return _0x3cf725;}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x2105d){const _0x4d44ef=a59_0x3cf7,_0xebcee0=_0x2105d[_0x4d44ef(0xe3)](_0x4d44ef(0xe5));if(!_0xebcee0)throw CliErrors[_0x4d44ef(0xdc)](_0x4d44ef(0xe2),_0x4d44ef(0xe0)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0xcc455c=readConfig(),_0x3ac0a0=_0xebcee0===_0x4d44ef(0xda)?_0x4d44ef(0xe1):_0xebcee0,_0x163951=_0xcc455c[_0x3ac0a0];if(_0x163951===undefined)throw CliErrors[_0x4d44ef(0xdc)]('Key\x20not\x20found:\x20'+_0xebcee0);return{'ok':!![],'data':typeof _0x163951===_0x4d44ef(0xd3)?_0x163951:{[_0x3ac0a0]:_0x163951},'message':typeof _0x163951===_0x4d44ef(0xd3)?undefined:String(_0x163951)};}export const configGetDefinition={'service':a59_0x29c6b7(0xdb),'command':a59_0x29c6b7(0xd4),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a59_0x29c6b7(0xd6),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a59_0x29c6b7(0xe5),'type':a59_0x29c6b7(0xd5),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};function a59_0x50ca(){const _0x125c41=['string','read','10560976rfvRic','264UmHzti','1987868DYOXNP','app','config','validation','2566677DuVfZI','948807QdWMfu','19880BSwvXw','Usage:\x20','appcode','Missing\x20key.','str','2448604vctvFp','key','6910295cNydVA','object','get'];a59_0x50ca=function(){return _0x125c41;};return a59_0x50ca();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1cb842,_0x352974){const _0x1c3414=a60_0xb633,_0x90075e=_0x1cb842();while(!![]){try{const _0x690e75=-parseInt(_0x1c3414(0x10c))/0x1+parseInt(_0x1c3414(0x10d))/0x2+parseInt(_0x1c3414(0x10e))/0x3+-parseInt(_0x1c3414(0x113))/0x4*(-parseInt(_0x1c3414(0x10b))/0x5)+parseInt(_0x1c3414(0x10f))/0x6*(-parseInt(_0x1c3414(0x111))/0x7)+parseInt(_0x1c3414(0x110))/0x8*(-parseInt(_0x1c3414(0x112))/0x9)+parseInt(_0x1c3414(0x114))/0xa;if(_0x690e75===_0x352974)break;else _0x90075e['push'](_0x90075e['shift']());}catch(_0x4963c5){_0x90075e['push'](_0x90075e['shift']());}}}(a60_0x53fd,0x95764));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';import{configInitDefinition}from'../../commands/config/init.js';function a60_0x53fd(){const _0x81eae6=['100917mwJupI','3244916FgsdNa','1397230NoIQAb','5BobKmb','893222fgAHlk','564104ZHrmwp','1359006edMhRb','14454JvneQD','24zehjGP','427amQkDa'];a60_0x53fd=function(){return _0x81eae6;};return a60_0x53fd();}function a60_0xb633(_0x2ec50f,_0x1b66f8){_0x2ec50f=_0x2ec50f-0x10b;const _0x53fd9d=a60_0x53fd();let _0xb633a1=_0x53fd9d[_0x2ec50f];return _0xb633a1;}export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x233259=a61_0x1f93;(function(_0x33003c,_0x4d71f5){const _0x1f8ae4=a61_0x1f93,_0x546daf=_0x33003c();while(!![]){try{const _0x498314=-parseInt(_0x1f8ae4(0x163))/0x1+-parseInt(_0x1f8ae4(0x179))/0x2+parseInt(_0x1f8ae4(0x161))/0x3+parseInt(_0x1f8ae4(0x188))/0x4+-parseInt(_0x1f8ae4(0x157))/0x5+-parseInt(_0x1f8ae4(0x17e))/0x6+parseInt(_0x1f8ae4(0x17f))/0x7*(parseInt(_0x1f8ae4(0x17b))/0x8);if(_0x498314===_0x4d71f5)break;else _0x546daf['push'](_0x546daf['shift']());}catch(_0x4c0abc){_0x546daf['push'](_0x546daf['shift']());}}}(a61_0x1d05,0xbaf1a));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';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a61_0x233259(0x172),'type':a61_0x233259(0x169),'description':a61_0x233259(0x184)+ENABLED_LOVRABET_REGION_VALUES[a61_0x233259(0x166)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'domain-config','type':a61_0x233259(0x169),'description':a61_0x233259(0x177)},{'name':'user-domain','type':a61_0x233259(0x169),'description':a61_0x233259(0x15b)},{'name':'api-domain','type':a61_0x233259(0x169),'description':a61_0x233259(0x18d)},{'name':a61_0x233259(0x167),'type':a61_0x233259(0x169),'description':a61_0x233259(0x16f)},{'name':a61_0x233259(0x18c),'type':a61_0x233259(0x169),'description':a61_0x233259(0x175)},{'name':a61_0x233259(0x16a),'type':a61_0x233259(0x169),'description':a61_0x233259(0x170)},{'name':a61_0x233259(0x182),'type':a61_0x233259(0x169),'description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'},{'name':a61_0x233259(0x187),'type':a61_0x233259(0x169),'description':'Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin'},{'name':a61_0x233259(0x158),'type':a61_0x233259(0x169),'description':a61_0x233259(0x171)},{'name':a61_0x233259(0x183),'type':a61_0x233259(0x169),'description':a61_0x233259(0x15a)}];async function resolveRegion(_0x256bb8){const _0x19f8de=a61_0x233259,_0xa5fd9b=_0x256bb8['str'](_0x19f8de(0x172));if(_0xa5fd9b){if(!isEnabledLovrabetRegion(_0xa5fd9b))throw CliErrors[_0x19f8de(0x168)](_0x19f8de(0x17c)+_0xa5fd9b+_0x19f8de(0x164),_0x19f8de(0x185)+ENABLED_LOVRABET_REGION_VALUES[_0x19f8de(0x166)](',\x20'));return _0xa5fd9b;}if(_0x256bb8[_0x19f8de(0x15d)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x19f8de(0x165)](_0x2701d3=>({'name':getOfficialRoutingProfile(_0x2701d3)[_0x19f8de(0x16b)]+'\x20('+_0x2701d3+')','value':_0x2701d3}))});}catch(_0x1ca2f5){if(_0x1ca2f5?.[_0x19f8de(0x18a)]===_0x19f8de(0x18b))throw CliErrors[_0x19f8de(0x176)]();throw _0x1ca2f5;}}export async function executeConfigInit(_0x2564b5){const _0x40cbbf=a61_0x233259,_0x1f9d0d=resolveDomainConfigInput(_0x2564b5),_0x115627=_0x1f9d0d[_0x40cbbf(0x174)],_0x4806e5=Object[_0x40cbbf(0x16e)](_0x115627)[_0x40cbbf(0x16d)]>0x0;if(_0x4806e5&&_0x2564b5[_0x40cbbf(0x181)]('region'))throw CliErrors['validation']('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');if(!!_0x115627[_0x40cbbf(0x162)]!==!!_0x115627['certificateDomain'])throw CliErrors['validation']('Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.');const _0x144d46=_0x2564b5[_0x40cbbf(0x186)](_0x40cbbf(0x173))?_0x40cbbf(0x173):'project',_0x5a695b=readScopedConfig(_0x144d46);for(const _0x41c31a of DOMAIN_CONFIG_FIELDS)delete _0x5a695b[_0x41c31a];for(const _0x22e7b5 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x5a695b[_0x22e7b5];delete _0x5a695b[_0x40cbbf(0x17a)];let _0x3a3c73=null;if(_0x4806e5)delete _0x5a695b[_0x40cbbf(0x172)],_0x1f9d0d[_0x40cbbf(0x160)]===_0x40cbbf(0x178)?_0x5a695b[_0x40cbbf(0x17a)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x1f9d0d[_0x40cbbf(0x15c)],'cdn':_0x1f9d0d[_0x40cbbf(0x159)]}:Object[_0x40cbbf(0x15f)](_0x5a695b,_0x115627);else{_0x3a3c73=await resolveRegion(_0x2564b5);if(_0x3a3c73===DEFAULT_LOVRABET_REGION)delete _0x5a695b[_0x40cbbf(0x172)];else _0x5a695b['region']=_0x3a3c73;}return writeScopedConfig(_0x5a695b,_0x144d46),{'ok':!![],'message':_0x4806e5?_0x40cbbf(0x189)+Object[_0x40cbbf(0x16e)](_0x1f9d0d['mode']===_0x40cbbf(0x178)?_0x1f9d0d[_0x40cbbf(0x15c)]:_0x115627)[_0x40cbbf(0x166)](',\x20')+'.':_0x40cbbf(0x15e)+_0x3a3c73+'.','data':{'mode':_0x4806e5?_0x40cbbf(0x17d):'official','protocol':_0x1f9d0d['mode']==='enterprise-v1'?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x3a3c73,'domains':_0x115627,'cdn':_0x1f9d0d[_0x40cbbf(0x160)]===_0x40cbbf(0x178)?_0x1f9d0d[_0x40cbbf(0x159)]:undefined}};}function a61_0x1f93(_0x2a4186,_0x497dee){_0x2a4186=_0x2a4186-0x157;const _0x1d052a=a61_0x1d05();let _0x1f9354=_0x1d052a[_0x2a4186];return _0x1f9354;}function a61_0x1d05(){const _0xbb71d7=['cancelled','Independent-deployment\x20Domain\x20JSON\x20file','enterprise-v1','1754598FdbNUG','routing','16HBicvC','Region\x20\x22','independent','6044328bnhikc','12079907PKTXQC','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','str','kb-service-domain','certificate-domain','Official\x20Lovrabet\x20region:\x20','Available\x20regions:\x20','bool','app-domain','1026684pHKiSD','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','name','ExitPromptError','skill-domain','Custom\x20platform\x20API\x20HTTPS\x20origin','6064010Nmwuwb','local-domain','cdn','Custom\x20certificate\x20service\x20HTTPS\x20origin','Custom\x20User\x20HTTPS\x20origin','manifestDomains','nonInteractive','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','assign','mode','4245852QfCJnk','localDomain','1260146uiROjW','\x22\x20is\x20not\x20currently\x20available.','map','join','runtime-domain','validation','string','kb-domain','label','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','length','keys','Custom\x20Runtime\x20HTTPS\x20origin','Custom\x20knowledge-base\x20HTTPS\x20origin','Custom\x20local\x20callback\x20HTTPS\x20origin','region','global','domains','Custom\x20SkillHub\x20HTTPS\x20origin'];a61_0x1d05=function(){return _0xbb71d7;};return a61_0x1d05();}export const configInitDefinition={'service':'config','command':'init','description':a61_0x233259(0x16c),'risk':'write','confirmationDescription':a61_0x233259(0x180),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x1a9aa8=a62_0x1cc8;(function(_0x3862bc,_0x2978c4){const _0x311590=a62_0x1cc8,_0x1ed4e9=_0x3862bc();while(!![]){try{const _0x2ed863=parseInt(_0x311590(0x132))/0x1+parseInt(_0x311590(0x127))/0x2+-parseInt(_0x311590(0x138))/0x3*(parseInt(_0x311590(0x12c))/0x4)+parseInt(_0x311590(0x133))/0x5*(parseInt(_0x311590(0x129))/0x6)+-parseInt(_0x311590(0x134))/0x7*(parseInt(_0x311590(0x12b))/0x8)+-parseInt(_0x311590(0x131))/0x9*(-parseInt(_0x311590(0x12a))/0xa)+parseInt(_0x311590(0x126))/0xb*(-parseInt(_0x311590(0x12e))/0xc);if(_0x2ed863===_0x2978c4)break;else _0x1ed4e9['push'](_0x1ed4e9['shift']());}catch(_0x3491af){_0x1ed4e9['push'](_0x1ed4e9['shift']());}}}(a62_0x3cf1,0xe720a));import{readScopedConfig}from'../../commands/config/shared.js';function a62_0x1cc8(_0x1edc8b,_0x374d37){_0x1edc8b=_0x1edc8b-0x126;const _0x3cf114=a62_0x3cf1();let _0x1cc835=_0x3cf114[_0x1edc8b];return _0x1cc835;}import{readConfig}from'../../utils/config.js';async function execute(_0x45f184){const _0x34261f=a62_0x1cc8,_0x4486a6=_0x45f184[_0x34261f(0x136)](_0x34261f(0x12f))?readScopedConfig(_0x34261f(0x12f)):readConfig();return{'ok':!![],'data':_0x4486a6};}function a62_0x3cf1(){const _0x29919f=['global','config','518553bPKHzg','775181IfLkeB','30MwopMe','440692Tztfew','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','bool','read','3GGMdcI','11xkyIpE','564738oMRGbJ','list','981918afUCDi','130gtAohl','56NBGAvK','706148BGELEn','boolean','14694744snTJNl'];a62_0x3cf1=function(){return _0x29919f;};return a62_0x3cf1();}export const configListDefinition={'service':a62_0x1a9aa8(0x130),'command':a62_0x1a9aa8(0x128),'description':'List\x20all\x20config\x20values','risk':a62_0x1a9aa8(0x137),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x1a9aa8(0x12f),'type':a62_0x1a9aa8(0x12d),'description':a62_0x1a9aa8(0x135),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x3a72bb=a63_0x3c0f;(function(_0x5337a7,_0x102aec){const _0xa165b1=a63_0x3c0f,_0x456b48=_0x5337a7();while(!![]){try{const _0x3a5f57=parseInt(_0xa165b1(0x90))/0x1*(parseInt(_0xa165b1(0xb0))/0x2)+-parseInt(_0xa165b1(0xb4))/0x3*(parseInt(_0xa165b1(0x9d))/0x4)+parseInt(_0xa165b1(0x99))/0x5+-parseInt(_0xa165b1(0x93))/0x6+-parseInt(_0xa165b1(0xa8))/0x7*(parseInt(_0xa165b1(0xa9))/0x8)+parseInt(_0xa165b1(0x9c))/0x9*(-parseInt(_0xa165b1(0xaf))/0xa)+parseInt(_0xa165b1(0xb5))/0xb;if(_0x3a5f57===_0x102aec)break;else _0x456b48['push'](_0x456b48['shift']());}catch(_0x335afe){_0x456b48['push'](_0x456b48['shift']());}}}(a63_0x51aa,0x86d8e));function a63_0x51aa(){const _0x5d217d=['219350fEXHMK','34VyxHRR','riskLevel','apps','Use\x20`','1467nLrIEH','3902657zlqdPN','env','config','appcode','Usage:\x20','Config\x20value','app','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','26142akGxPi','Set\x20a\x20config\x20value','keys','1184526tvrVGQ','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','boolean','length','Missing\x20key.','Project','5367885zremln','`,\x20`','Top-level\x20key\x20\x22','369SYLjAh','8oAWOEU','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','value','global','\x22\x20is\x20not\x20settable.','validation','locale','string','Global','str','set','1558970mlisKi','8YgTVuO','Missing\x20value.','Invalid\x20value\x20for\x20\x22','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','key'];a63_0x51aa=function(){return _0x5d217d;};return a63_0x51aa();}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';function a63_0x3c0f(_0x2474be,_0x7bcfc3){_0x2474be=_0x2474be-0x8f;const _0x51aa95=a63_0x51aa();let _0x3c0f3a=_0x51aa95[_0x2474be];return _0x3c0f3a;}async function execute(_0x351c89){const _0x1e14c5=a63_0x3c0f,_0x336b49=_0x351c89['str'](_0x1e14c5(0xae)),_0x4a2ac4=_0x351c89[_0x1e14c5(0xa6)]('value');if(!_0x336b49)throw CliErrors[_0x1e14c5(0xa2)](_0x1e14c5(0x97),_0x1e14c5(0xb9)+CLI_BIN_NAME+_0x1e14c5(0xac));if(_0x4a2ac4===undefined||_0x4a2ac4==='')throw CliErrors[_0x1e14c5(0xa2)](_0x1e14c5(0xaa),_0x1e14c5(0xb9)+CLI_BIN_NAME+_0x1e14c5(0xac));let _0x2222d8=_0x336b49,_0x5579ed=_0x4a2ac4;if(_0x4a2ac4[_0x1e14c5(0x96)]>0x1f4)throw CliErrors[_0x1e14c5(0xa2)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(_0x336b49===_0x1e14c5(0xb1))throw CliErrors[_0x1e14c5(0xa2)](_0x1e14c5(0x94));if(!isTopLevelConfigKey(_0x336b49))throw CliErrors[_0x1e14c5(0xa2)](_0x1e14c5(0x9b)+_0x336b49+_0x1e14c5(0xa1),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x336b49]&&!CONFIG_ENUM_VALUES[_0x336b49]['includes'](_0x4a2ac4))throw CliErrors[_0x1e14c5(0xa2)](_0x1e14c5(0xab)+_0x336b49+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x336b49]['join'](',\x20'));if(_0x336b49===_0x1e14c5(0xa3)&&!normalizeLocale(_0x4a2ac4))throw CliErrors[_0x1e14c5(0xa2)]('Invalid\x20locale\x20value.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');DOMAIN_CONFIG_FIELDS['includes'](_0x336b49)&&(_0x5579ed=normalizeDomainOrigin(_0x336b49,_0x4a2ac4));const _0x569d7a={'global':_0x351c89['bool'](_0x1e14c5(0xa0))},_0x57cc09=resolveWriteScope(_0x569d7a),_0x451ddb=readScopedConfig(_0x57cc09);_0x336b49===_0x1e14c5(0xbb)&&(_0x2222d8=_0x1e14c5(0xb8),delete _0x451ddb['app']);_0x336b49===_0x1e14c5(0xa3)&&(_0x5579ed=normalizeLocale(_0x4a2ac4));if(_0x336b49===_0x1e14c5(0xb6)){_0x5579ed=normalizeEnv(_0x4a2ac4);if(!isProduction(_0x5579ed)&&!isDaily(_0x5579ed))throw CliErrors[_0x1e14c5(0xa2)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x336b49===_0x1e14c5(0xb8)){const _0x4350ec=_0x451ddb[_0x1e14c5(0xb2)]&&typeof _0x451ddb[_0x1e14c5(0xb2)]==='object'?Object[_0x1e14c5(0x92)](_0x451ddb['apps']):[];if(_0x4350ec[_0x1e14c5(0x96)]>0x0)throw CliErrors[_0x1e14c5(0xa2)](_0x1e14c5(0x9e),_0x1e14c5(0xb3)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20'+_0x5579ed+_0x1e14c5(0x9a)+CLI_BIN_NAME+_0x1e14c5(0x8f));const _0x13bef7=buildCanonicalProjectConfig({..._0x451ddb},{'appCodes':[_0x5579ed],'env':typeof _0x451ddb['env']===_0x1e14c5(0xa4)?_0x451ddb[_0x1e14c5(0xb6)]:undefined});writeScopedConfig(_0x13bef7,_0x57cc09);const _0x5546c9=_0x57cc09===_0x1e14c5(0xa0)?_0x1e14c5(0xa5):_0x1e14c5(0x98);return{'ok':!![],'message':'✓\x20'+_0x5546c9+'\x20appcode\x20set\x20to:\x20'+_0x5579ed+_0x1e14c5(0xad)};}_0x451ddb[_0x2222d8]=_0x5579ed,writeScopedConfig(_0x451ddb,_0x57cc09);const _0x2230db=_0x57cc09===_0x1e14c5(0xa0)?'Global':_0x1e14c5(0x98);return{'ok':!![],'message':'✓\x20'+_0x2230db+'\x20'+_0x2222d8+'\x20set\x20to:\x20'+_0x5579ed};}export const configSetDefinition={'service':a63_0x3a72bb(0xb7),'command':a63_0x3a72bb(0xa7),'description':a63_0x3a72bb(0x91),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a63_0x3a72bb(0xae),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a63_0x3a72bb(0x9f),'type':'string','description':a63_0x3a72bb(0xba),'required':!![]},{'name':'global','type':a63_0x3a72bb(0x95),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ae2c3,_0x460b2f){var _0x5b3e6a=a64_0xdea0,_0x45755a=_0x2ae2c3();while(!![]){try{var _0x39db45=parseInt(_0x5b3e6a(0x1c5))/0x1*(-parseInt(_0x5b3e6a(0x1bc))/0x2)+-parseInt(_0x5b3e6a(0x1c6))/0x3+-parseInt(_0x5b3e6a(0x1c1))/0x4+parseInt(_0x5b3e6a(0x1c8))/0x5*(-parseInt(_0x5b3e6a(0x1bd))/0x6)+parseInt(_0x5b3e6a(0x1bf))/0x7+parseInt(_0x5b3e6a(0x1c7))/0x8+parseInt(_0x5b3e6a(0x1c0))/0x9;if(_0x39db45===_0x460b2f)break;else _0x45755a['push'](_0x45755a['shift']());}catch(_0x151500){_0x45755a['push'](_0x45755a['shift']());}}}(a64_0x3d5f,0x4bc48));import{CLI_BIN_NAME}from'../../constant/cli.js';function a64_0xdea0(_0x407e94,_0x214d83){_0x407e94=_0x407e94-0x1bc;var _0x3d5f3f=a64_0x3d5f();var _0xdea039=_0x3d5f3f[_0x407e94];return _0xdea039;}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};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};function a64_0x3d5f(){var _0x5a30af=['Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','4846AnXxjs','3330Ujpibh','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','435015DVeqNr','9564687AWKxgB','732432ACYXsJ','project','global','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','2ewzceF','1566339RDgEGU','1677224jCIKzh','2830HqDrVh'];a64_0x3d5f=function(){return _0x5a30af;};return a64_0x3d5f();}export function resolveWriteScope(_0x413567){var _0x2d3449=a64_0xdea0;if(_0x413567['global'])return _0x2d3449(0x1c3);if(!isInProject())throw CliErrors['validation'](_0x2d3449(0x1c9),_0x2d3449(0x1c4)+CLI_BIN_NAME+_0x2d3449(0x1be));return _0x2d3449(0x1c2);}export function readScopedConfig(_0x435bdb){return readConfigFile(resolveWriteConfigPath(_0x435bdb));}export function writeScopedConfig(_0x2f932d,_0x1a53d0){writeConfigFile(resolveWriteConfigPath(_0x1a53d0),_0x2f932d);}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a65_0x40cc67=a65_0x3897;(function(_0x64c741,_0x2e8481){const _0xde6b29=a65_0x3897,_0x389b38=_0x64c741();while(!![]){try{const _0x27158b=parseInt(_0xde6b29(0xb4))/0x1+-parseInt(_0xde6b29(0xc3))/0x2*(-parseInt(_0xde6b29(0xfc))/0x3)+parseInt(_0xde6b29(0xf3))/0x4*(-parseInt(_0xde6b29(0xa4))/0x5)+-parseInt(_0xde6b29(0x105))/0x6+-parseInt(_0xde6b29(0xdb))/0x7+-parseInt(_0xde6b29(0xd1))/0x8+parseInt(_0xde6b29(0xc0))/0x9;if(_0x27158b===_0x2e8481)break;else _0x389b38['push'](_0x389b38['shift']());}catch(_0x2fe439){_0x389b38['push'](_0x389b38['shift']());}}}(a65_0x2d4a,0x37849));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x40cc67(0x102),'ONE_TO_ONE']),SUPPORTED_FIELD_TYPES=new Set([a65_0x40cc67(0xe1),a65_0x40cc67(0xa9),a65_0x40cc67(0x106),a65_0x40cc67(0xe4),a65_0x40cc67(0xe7),a65_0x40cc67(0xc5),a65_0x40cc67(0x108),a65_0x40cc67(0xca),a65_0x40cc67(0xb0),'UPLOAD']);export function isDatasetBatchDesign(_0x2b7b14){const _0x3ec070=a65_0x40cc67;return isObject(_0x2b7b14)&&_0x2b7b14[_0x3ec070(0xc1)]===_0x3ec070(0x103);}export function validateDatasetBatchDesign(_0x18adf6){const _0x4191bc=a65_0x40cc67;(!isObject(_0x18adf6)||_0x18adf6[_0x4191bc(0xc1)]!==_0x4191bc(0x103))&&fail('Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.');_0x18adf6['schemaVersion']!==0x1&&fail('Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.');const _0x176c51=objectArray(_0x18adf6['datasets'],_0x4191bc(0xa3),0x1,0x14),_0x418c77=objectArray(_0x18adf6[_0x4191bc(0xf5)],_0x4191bc(0xf5),0x0,0xc8),_0xc885e8=objectArray(_0x18adf6[_0x4191bc(0xb7)],_0x4191bc(0xb7),0x0,0xc8),_0x54ff6d=new Set(),_0x4d2bbb=new Map();for(const [_0x551067,_0x232dbe]of _0x176c51[_0x4191bc(0xae)]()){const _0x5012a3=requiredString(_0x232dbe['localKey'],_0x4191bc(0x9f)+_0x551067+_0x4191bc(0xe2));!LOCAL_KEY[_0x4191bc(0x10a)](_0x5012a3)&&fail('datasets['+_0x551067+'].localKey\x20must\x20match\x20'+LOCAL_KEY[_0x4191bc(0xd7)]+'.');_0x54ff6d[_0x4191bc(0xd0)](_0x5012a3)&&fail('Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.');_0x54ff6d[_0x4191bc(0x107)](_0x5012a3);!isObject(_0x232dbe['design'])&&fail(_0x4191bc(0x9f)+_0x551067+'].design\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x232dbe[_0x4191bc(0xf9)],_0x4191bc(0x9f)+_0x551067+_0x4191bc(0xc6));if(!isObject(_0x232dbe['design'][_0x4191bc(0xcd)]))fail(_0x4191bc(0x9f)+_0x551067+_0x4191bc(0xed));rejectServerDatasetIdentity(_0x232dbe[_0x4191bc(0xf9)][_0x4191bc(0xcd)],_0x4191bc(0x9f)+_0x551067+_0x4191bc(0xe0)),requiredString(_0x232dbe[_0x4191bc(0xf9)][_0x4191bc(0xcd)]['datasetName'],'datasets['+_0x551067+'].design.dataset.datasetName');_0x4191bc(0xf5)in _0x232dbe[_0x4191bc(0xf9)]&&(!Array['isArray'](_0x232dbe['design'][_0x4191bc(0xf5)])||_0x232dbe[_0x4191bc(0xf9)]['relations'][_0x4191bc(0xe6)]!==0x0)&&fail(_0x4191bc(0x9f)+_0x551067+_0x4191bc(0xa2));const _0x550959=objectArray(_0x232dbe['design'][_0x4191bc(0xc9)],_0x4191bc(0x9f)+_0x551067+_0x4191bc(0xb5),0x1,0xc8),_0x38b18f=new Map();for(const [_0x42c663,_0x399ad1]of _0x550959['entries']()){const _0x1f64d2=fieldName(_0x399ad1);if(!_0x1f64d2)fail(_0x4191bc(0x9f)+_0x551067+'].design.fields['+_0x42c663+_0x4191bc(0xcb));const _0xcf6bb1=_0x1f64d2['toLowerCase']();if(_0x38b18f['has'](_0xcf6bb1))fail(_0x4191bc(0xbf)+_0x5012a3+'\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.');const _0xa48758=stringValue(_0x399ad1[_0x4191bc(0xc8)]??_0x399ad1[_0x4191bc(0xa8)])[_0x4191bc(0xb6)]();if(!SUPPORTED_FIELD_TYPES['has'](_0xa48758))fail(_0x4191bc(0x9f)+_0x551067+_0x4191bc(0xf7)+_0x42c663+_0x4191bc(0xac));_0x38b18f[_0x4191bc(0xbe)](_0xcf6bb1,_0xa48758),[_0x399ad1[_0x4191bc(0xfb)],_0x399ad1['refTableField'],_0x399ad1[_0x4191bc(0xd6)]]['some'](_0x16cb9c=>stringValue(_0x16cb9c))&&fail('datasets['+_0x551067+_0x4191bc(0xf7)+_0x42c663+_0x4191bc(0x100));}_0x4d2bbb['set'](_0x5012a3,_0x38b18f);}const _0x1138cf=new Set(),_0x53e6cd=new Set();for(const [_0x420bbe,_0x4fdf61]of _0x418c77[_0x4191bc(0xae)]()){const _0x16c614=validateRelation(_0x4fdf61,_0x420bbe,_0x54ff6d,_0x4d2bbb);if(_0x1138cf[_0x4191bc(0xd0)](_0x16c614))fail(_0x4191bc(0xab));_0x1138cf[_0x4191bc(0x107)](_0x16c614);const _0x5318e3=_0x16c614[_0x4191bc(0xe5)]('\x00',0x2)['join']('\x00');if(_0x53e6cd[_0x4191bc(0xd0)](_0x5318e3))fail(_0x4191bc(0xdf));_0x53e6cd['add'](_0x5318e3);}for(const [_0x3fd849,_0x55ab84]of _0xc885e8[_0x4191bc(0xae)]()){requiredString(_0x55ab84[_0x4191bc(0xe8)],'unresolvedRelations['+_0x3fd849+_0x4191bc(0xe9)),validateConfidence(_0x55ab84[_0x4191bc(0xcf)],'unresolvedRelations['+_0x3fd849+_0x4191bc(0xf4));}return _0x18adf6;}export function reconcileBatchResult(_0x3d5e4e){const _0x271b0c=a65_0x40cc67;if(!isObject(_0x3d5e4e))return null;try{const _0x1f9c40=stringArray(_0x3d5e4e[_0x271b0c(0xaf)],'expectedLocalKeys',0x1,0x14),_0x278532=new Set(_0x1f9c40);if(_0x278532[_0x271b0c(0xee)]!==_0x1f9c40[_0x271b0c(0xe6)]||_0x1f9c40['some'](_0x5e2b09=>!LOCAL_KEY[_0x271b0c(0x10a)](_0x5e2b09)))return null;const _0x551ab3=objectArray(_0x3d5e4e[_0x271b0c(0xd9)],_0x271b0c(0xd9),0x1,0x14),_0x5e2b61=new Map(),_0x5b29f5=new Set();for(const _0x35a098 of _0x551ab3){const _0x89c297=requiredString(_0x35a098[_0x271b0c(0xfa)],_0x271b0c(0xd3)),_0x29e626=requiredString(_0x35a098[_0x271b0c(0xeb)]??_0x35a098[_0x271b0c(0xad)],'createdDatasets[].code');if(_0x5e2b61[_0x271b0c(0xd0)](_0x89c297)||_0x5b29f5[_0x271b0c(0xd0)](_0x29e626))return null;_0x5e2b61['set'](_0x89c297,_0x29e626),_0x5b29f5[_0x271b0c(0x107)](_0x29e626);}if(!sameSet(_0x278532,new Set(_0x5e2b61[_0x271b0c(0xc7)]())))return null;const _0x497f3b=objectArray(_0x3d5e4e[_0x271b0c(0xa6)],_0x271b0c(0xa6),0x0,0xc8),_0x1751e5=objectArray(_0x3d5e4e[_0x271b0c(0x104)],'createdRelations',0x0,0xc8),_0x43d1d0=relationTupleSet(_0x497f3b,![],_0x5e2b61),_0x55b1f3=relationTupleSet(_0x1751e5,!![],_0x5e2b61);if(!_0x43d1d0||!_0x55b1f3||!sameSet(_0x43d1d0,_0x55b1f3))return null;const _0x3f04ae=objectArray(_0x3d5e4e[_0x271b0c(0xb7)],_0x271b0c(0xb7),0x0,0xc8);return{'expectedLocalKeys':_0x1f9c40,'expectedRelations':_0x497f3b,'createdDatasets':_0x551ab3,'createdRelations':_0x1751e5,'unresolvedRelations':_0x3f04ae,...isObject(_0x3d5e4e[_0x271b0c(0xd2)])?{'metrics':_0x3d5e4e[_0x271b0c(0xd2)]}:{}};}catch{return null;}}function validateRelation(_0x463b03,_0x1732b6,_0x523ec2,_0x40f5d2){const _0x47cd15=a65_0x40cc67,_0x203294=_0x47cd15(0xff)+_0x1732b6+']',_0xa7caa6=requiredString(_0x463b03['fromDatasetKey'],_0x203294+_0x47cd15(0xa5)),_0x115fec=requiredString(_0x463b03[_0x47cd15(0xf8)],_0x203294+_0x47cd15(0xce)),_0x5e0c24=requiredString(_0x463b03['fromField'],_0x203294+'.fromField')[_0x47cd15(0x109)](),_0x483576=requiredString(_0x463b03['toField'],_0x203294+_0x47cd15(0xbc))[_0x47cd15(0x109)]();if(!_0x523ec2['has'](_0xa7caa6)||!_0x523ec2[_0x47cd15(0xd0)](_0x115fec))fail(_0x203294+'\x20references\x20an\x20unknown\x20dataset\x20localKey.');const _0x34d72a=_0x40f5d2[_0x47cd15(0xfd)](_0xa7caa6)?.[_0x47cd15(0xfd)](_0x5e0c24),_0xd5ef96=_0x40f5d2['get'](_0x115fec)?.['get'](_0x483576);if(_0x34d72a===undefined||_0xd5ef96===undefined)fail(_0x203294+_0x47cd15(0xaa));if(_0x34d72a&&_0xd5ef96&&_0x34d72a!==_0xd5ef96)fail(_0x203294+'\x20connects\x20incompatible\x20field\x20types.');const _0x127e71=stringValue(_0x463b03[_0x47cd15(0xc2)])||_0x47cd15(0xb1);if(_0x127e71!==_0x47cd15(0xb1))fail(_0x203294+'.relationType\x20must\x20be\x20\x22lookup\x22.');const _0x2a3d4e=stringValue(_0x463b03[_0x47cd15(0xef)])||_0x47cd15(0x102);if(!SUPPORTED_CARDINALITIES[_0x47cd15(0xd0)](_0x2a3d4e))fail(_0x203294+'.cardinality\x20is\x20not\x20supported.');return requiredString(_0x463b03['reason'],_0x203294+_0x47cd15(0xdc)),validateConfidence(_0x463b03[_0x47cd15(0xcf)],_0x203294+_0x47cd15(0xe3)),tuple(_0xa7caa6,_0x5e0c24,_0x115fec,_0x483576,_0x47cd15(0xb1),_0x2a3d4e);}function relationTupleSet(_0x1e7f8b,_0x135a69,_0x329196){const _0x3f55fb=a65_0x40cc67,_0x25ef81=new Set();for(const _0xb37af3 of _0x1e7f8b){const _0x24edb7=stringValue(_0xb37af3[_0x3f55fb(0xea)]),_0x47c684=stringValue(_0xb37af3['toDatasetKey']),_0x316be3=stringValue(_0xb37af3[_0x3f55fb(0xf6)])[_0x3f55fb(0x109)](),_0x29dfe6=stringValue(_0xb37af3['toField'])[_0x3f55fb(0x109)](),_0x1a5d93=stringValue(_0xb37af3[_0x3f55fb(0xc2)]),_0x3407a8=stringValue(_0xb37af3[_0x3f55fb(0xef)]);if(!_0x24edb7||!_0x47c684||!_0x316be3||!_0x29dfe6||_0x1a5d93!==_0x3f55fb(0xb1)||!SUPPORTED_CARDINALITIES['has'](_0x3407a8))return null;if(!_0x329196[_0x3f55fb(0xd0)](_0x24edb7)||!_0x329196[_0x3f55fb(0xd0)](_0x47c684))return null;if(_0x135a69&&(stringValue(_0xb37af3[_0x3f55fb(0xda)])!==_0x329196[_0x3f55fb(0xfd)](_0x24edb7)||stringValue(_0xb37af3[_0x3f55fb(0xdd)])!==_0x329196[_0x3f55fb(0xfd)](_0x47c684)))return null;const _0x1cf210=tuple(_0x24edb7,_0x316be3,_0x47c684,_0x29dfe6,_0x1a5d93,_0x3407a8);if(_0x25ef81[_0x3f55fb(0xd0)](_0x1cf210))return null;_0x25ef81[_0x3f55fb(0x107)](_0x1cf210);}return _0x25ef81;}function rejectServerDatasetIdentity(_0x1e69d6,_0x52f8c9){const _0x4fba09=a65_0x40cc67;for(const _0x59b50c of['id',_0x4fba09(0xf0),_0x4fba09(0xd4),_0x4fba09(0xeb),_0x4fba09(0xad),_0x4fba09(0xbd)]){if(_0x1e69d6[_0x59b50c]!==undefined&&_0x1e69d6[_0x59b50c]!==null&&_0x1e69d6[_0x59b50c]!=='')fail(_0x52f8c9+'.'+_0x59b50c+_0x4fba09(0xa7));}}function a65_0x2d4a(){const _0x90590c=['\x20references\x20an\x20unknown\x20field.','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','].type\x20is\x20not\x20supported.','datasetCode','entries','expectedLocalKeys','ADDRESS','lookup','string','isFinite','132991BdniAJ','].design.fields','toUpperCase','unresolvedRelations','\x20non-empty\x20strings.','fieldName','name','every','.toField','modelCode','set','Dataset\x20','7060482XPoZzn','kind','relationType','2qJAeVH','\x20must\x20contain\x20','MULTI_SELECT','].design','keys','type','fields','USER',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','\x20is\x20required.','dataset','.toDatasetKey','confidence','has','3044776CamRmJ','metrics','createdDatasets[].localKey','modelId','\x20objects.','refTableLabelField','source','join','createdDatasets','fromDatasetCode','948206yczpkR','.reason','toDatasetCode','some','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','].design.dataset','TEXT','].localKey','.confidence','BOOLEAN','split','length','SELECT','reason','].reason','fromDatasetKey','code','isArray','].design.dataset\x20must\x20be\x20an\x20object.','size','cardinality','datasetId','validation','fieldCode','4sQmUfT','].confidence','relations','fromField','].design.fields[','toDatasetKey','design','localKey','refTable','1285791hmhurX','get','number','relations[',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','trim','MANY_TO_ONE','dataset-batch','createdRelations','1665102TAeWsH','DATETIME','add','DATE_RANGE','toLowerCase','test','datasets[','object','\x20must\x20be\x20between\x200\x20and\x201.','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','datasets','1625565CRiubi','.fromDatasetKey','expectedRelations','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','fieldType','NUMBER'];a65_0x2d4a=function(){return _0x90590c;};return a65_0x2d4a();}function objectArray(_0x31c57e,_0x467acf,_0x57ebcb,_0xc24053){const _0x46f15d=a65_0x40cc67;return(!Array[_0x46f15d(0xec)](_0x31c57e)||_0x31c57e[_0x46f15d(0xe6)]<_0x57ebcb||_0x31c57e[_0x46f15d(0xe6)]>_0xc24053||_0x31c57e[_0x46f15d(0xde)](_0x42d6f8=>!isObject(_0x42d6f8)))&&fail(_0x467acf+_0x46f15d(0xc4)+_0x57ebcb+'..'+_0xc24053+_0x46f15d(0xd5)),_0x31c57e;}function stringArray(_0x314d25,_0x293d72,_0x3a45c7,_0x40fd83){const _0x3dc952=a65_0x40cc67;return(!Array[_0x3dc952(0xec)](_0x314d25)||_0x314d25[_0x3dc952(0xe6)]<_0x3a45c7||_0x314d25[_0x3dc952(0xe6)]>_0x40fd83||_0x314d25[_0x3dc952(0xde)](_0x42d212=>typeof _0x42d212!==_0x3dc952(0xb2)||!_0x42d212[_0x3dc952(0x101)]()))&&fail(_0x293d72+'\x20must\x20contain\x20'+_0x3a45c7+'..'+_0x40fd83+_0x3dc952(0xb8)),_0x314d25;}function a65_0x3897(_0x138e32,_0x3c68ae){_0x138e32=_0x138e32-0x9f;const _0x2d4a59=a65_0x2d4a();let _0x3897ed=_0x2d4a59[_0x138e32];return _0x3897ed;}function requiredString(_0x32f570,_0x412739){const _0x33f9fc=a65_0x40cc67,_0x245979=stringValue(_0x32f570);if(!_0x245979)fail(_0x412739+_0x33f9fc(0xcc));return _0x245979;}function stringValue(_0x11126e){const _0x492af=a65_0x40cc67;return typeof _0x11126e===_0x492af(0xb2)?_0x11126e[_0x492af(0x101)]():'';}function fieldName(_0x46515c){const _0xc74a9=a65_0x40cc67;return stringValue(_0x46515c[_0xc74a9(0xeb)]??_0x46515c[_0xc74a9(0xf2)]??_0x46515c[_0xc74a9(0xba)]??_0x46515c[_0xc74a9(0xb9)]);}function validateConfidence(_0x120235,_0x7844b5){const _0x37d385=a65_0x40cc67;_0x120235!==undefined&&_0x120235!==null&&(typeof _0x120235!==_0x37d385(0xfe)||!Number[_0x37d385(0xb3)](_0x120235)||_0x120235<0x0||_0x120235>0x1)&&fail(_0x7844b5+_0x37d385(0xa1));}function tuple(..._0x33aea9){const _0x1edb50=a65_0x40cc67;return _0x33aea9['map']((_0x1e24e9,_0x2553cb)=>_0x2553cb===0x1||_0x2553cb===0x3?_0x1e24e9['toLowerCase']():_0x1e24e9)[_0x1edb50(0xd8)]('\x00');}function sameSet(_0x8084f1,_0x4c249b){const _0x35c1ae=a65_0x40cc67;return _0x8084f1[_0x35c1ae(0xee)]===_0x4c249b[_0x35c1ae(0xee)]&&[..._0x8084f1][_0x35c1ae(0xbb)](_0x3e3c23=>_0x4c249b[_0x35c1ae(0xd0)](_0x3e3c23));}function isObject(_0x504c68){const _0x15b6eb=a65_0x40cc67;return typeof _0x504c68===_0x15b6eb(0xa0)&&_0x504c68!==null&&!Array[_0x15b6eb(0xec)](_0x504c68);}function fail(_0x54328e){const _0x269233=a65_0x40cc67;throw CliErrors[_0x269233(0xf1)](_0x54328e);}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a66_0xc0e25f=a66_0x3729;(function(_0x54f6be,_0x4b65b7){const _0x384a11=a66_0x3729,_0x2b1af1=_0x54f6be();while(!![]){try{const _0x2db173=parseInt(_0x384a11(0xde))/0x1+-parseInt(_0x384a11(0xcf))/0x2+-parseInt(_0x384a11(0xc2))/0x3*(parseInt(_0x384a11(0xe9))/0x4)+parseInt(_0x384a11(0xf7))/0x5*(parseInt(_0x384a11(0xdf))/0x6)+-parseInt(_0x384a11(0xf1))/0x7*(parseInt(_0x384a11(0xe6))/0x8)+-parseInt(_0x384a11(0xc3))/0x9+parseInt(_0x384a11(0xe5))/0xa;if(_0x2db173===_0x4b65b7)break;else _0x2b1af1['push'](_0x2b1af1['shift']());}catch(_0x9333af){_0x2b1af1['push'](_0x2b1af1['shift']());}}}(a66_0x1914,0x3a6be));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_0xc0e25f(0xd5),METADATA_BACKEND_PATH=a66_0xc0e25f(0xea),UNGROUPED_BUSINESS_GROUP=a66_0xc0e25f(0xf4);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x4d5b97,input:_0x57f7d8,dryRun:_0x4a3738}){const _0x256b7c=a66_0xc0e25f;validateInput(_0x57f7d8);const _0x3f2834=normalizeBusinessGroupArgument(_0x57f7d8[_0x256b7c(0xdd)]),_0xeb557b=await getDatasetDetail(_0x57f7d8[_0x256b7c(0xd8)]),_0x122210=resolveBusinessGroupDataset(_0xeb557b,_0x57f7d8['code']);assertBusinessGroupUpdateSupported(_0x122210,_0x3f2834);const _0x1f4094=loadCurrentBusinessGroup(_0xeb557b,_0x122210);assertExpectedBusinessGroup(_0x1f4094,_0x57f7d8[_0x256b7c(0xd0)]);const _0x77fadc=buildBackendPlan(_0x4d5b97,_0x122210,_0x3f2834),_0x489289=_0x1f4094!==_0x3f2834;let _0x4ca224;if(_0x489289&&!_0x4a3738){_0x77fadc['kind']==='db-table'?await updateDbTableBusinessGroup(_0x77fadc[_0x256b7c(0xf5)]):await updateErBusinessGroup(_0x77fadc[_0x256b7c(0xf5)]);const _0x22d232=await getDatasetDetail(_0x122210[_0x256b7c(0xd8)]),_0x14a0bd=resolveBusinessGroupDataset(_0x22d232,_0x122210['code']),_0x3cdf4d=loadCurrentBusinessGroup(_0x22d232,_0x14a0bd);if(_0x3cdf4d!==_0x3f2834)throw CliErrors[_0x256b7c(0xcd)](_0x256b7c(0xf3),_0x256b7c(0xba)+JSON[_0x256b7c(0xdb)](displayBusinessGroup(_0x3f2834))+_0x256b7c(0xc1)+JSON['stringify'](displayBusinessGroup(_0x3cdf4d))+'.');_0x4ca224={'verified':!![],'status':'matched','afterReadback':{'businessGroup':displayBusinessGroup(_0x3cdf4d)}};}else!_0x489289&&(_0x4ca224={'verified':!![],'status':_0x256b7c(0xbf),'afterReadback':{'businessGroup':displayBusinessGroup(_0x1f4094)}});const _0xda3e44={'operation':_0x256b7c(0xd2),'appCode':_0x4d5b97,'selector':{'code':_0x122210[_0x256b7c(0xd8)]},'dataset':{'id':_0x122210['id'],'code':_0x122210[_0x256b7c(0xd8)],'name':_0x122210['name'],'sourceType':_0x122210[_0x256b7c(0xd7)]},'before':{'businessGroup':displayBusinessGroup(_0x1f4094)},'after':{'businessGroup':displayBusinessGroup(_0x3f2834)},'changed':_0x489289,'dryRun':_0x4a3738,'submitted':_0x489289&&!_0x4a3738,'backend':{'method':_0x77fadc[_0x256b7c(0xbc)],'path':_0x77fadc[_0x256b7c(0xdc)],'payload':_0x77fadc['payload']},..._0x4ca224?{'verification':_0x4ca224}:{},'warnings':[]};return{'ok':!![],'data':_0xda3e44,'message':_0x489289?_0x4a3738?_0x256b7c(0xe2)+_0x122210['code']:_0x256b7c(0xf2)+_0x122210['code']:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x122210[_0x256b7c(0xd8)]};}export const datasetBusinessGroupUpdate={'service':a66_0xc0e25f(0xca),'command':a66_0xc0e25f(0xf6),'description':a66_0xc0e25f(0xe7),'risk':'write','flags':[CODE_FLAG,{'name':a66_0xc0e25f(0xee),'type':a66_0xc0e25f(0xc6),'required':!![],'description':a66_0xc0e25f(0xfa)},{'name':a66_0xc0e25f(0xd3),'type':'string','required':![],'description':a66_0xc0e25f(0xe1)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x276d4d){validateInput(readBusinessGroupUpdateInput(_0x276d4d));},async 'dryRun'(_0x264930){const _0x2b97c7=a66_0xc0e25f,_0x58e77c=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x264930['appCode'],'input':readBusinessGroupUpdateInput(_0x264930),'dryRun':!![]});return{'method':_0x58e77c[_0x2b97c7(0xb7)][_0x2b97c7(0xd4)][_0x2b97c7(0xbc)],'url':_0x58e77c[_0x2b97c7(0xb7)][_0x2b97c7(0xd4)][_0x2b97c7(0xdc)],'body':_0x58e77c[_0x2b97c7(0xb7)][_0x2b97c7(0xd4)]['payload'],'description':_0x58e77c[_0x2b97c7(0xe4)],..._0x58e77c[_0x2b97c7(0xb7)]};},async 'execute'(_0x102e10){const _0x36e3a2=a66_0xc0e25f;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x102e10[_0x36e3a2(0xed)],'input':readBusinessGroupUpdateInput(_0x102e10),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x5170be){const _0x33de29=a66_0xc0e25f,_0x41c093=_0x5170be[_0x33de29(0xb9)](_0x33de29(0xd3));return{'code':trim(_0x5170be[_0x33de29(0xb9)](_0x33de29(0xd8))),'businessGroup':_0x5170be[_0x33de29(0xb9)]('business-group'),'expectBusinessGroup':_0x41c093===undefined||_0x41c093===''?undefined:_0x41c093};}function validateInput(_0x16fe54){const _0x4a9930=a66_0xc0e25f;if(!trim(_0x16fe54[_0x4a9930(0xd8)]))throw CliErrors[_0x4a9930(0xb8)](_0x4a9930(0xf9));if(_0x16fe54['businessGroup']===undefined)throw CliErrors[_0x4a9930(0xb8)]('--business-group\x20is\x20required');if(!trim(_0x16fe54[_0x4a9930(0xdd)]))throw CliErrors['validation']('--business-group\x20must\x20not\x20be\x20blank');}function assertBusinessGroupUpdateSupported(_0x95bfce,_0x453be5){const _0x5afe84=a66_0xc0e25f;if(_0x95bfce[_0x5afe84(0xd7)]==='DB_TABLE'&&!_0x453be5)throw CliErrors['validation']('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function resolveBusinessGroupDataset(_0x3f5b9f,_0x10c0f4){const _0x3141f3=a66_0xc0e25f,_0x5bf215=asPlainObject(_0x3f5b9f[_0x3141f3(0xca)]),_0x2babed=asPlainObject(_0x3f5b9f[_0x3141f3(0xc9)]),_0x457323=resolveSourceType(_0x3f5b9f,_0x5bf215,_0x2babed),_0x3ac320=firstString(_0x3f5b9f['modelCode'],_0x3f5b9f[_0x3141f3(0xd8)],_0x5bf215[_0x3141f3(0xbe)],_0x10c0f4)||_0x10c0f4;return{'id':firstNumber(_0x3f5b9f[_0x3141f3(0xe3)],_0x3f5b9f['id'],_0x5bf215[_0x3141f3(0xec)])??firstString(_0x3f5b9f['modelId'],_0x3f5b9f['id'],_0x5bf215[_0x3141f3(0xec)])??null,'code':_0x3ac320,'name':firstString(_0x3f5b9f[_0x3141f3(0xeb)],_0x5bf215['datasetName'],_0x5bf215['name'])||null,'sourceType':_0x457323,'dbTableSelector':_0x457323==='DB_TABLE'?{'dbLinkId':firstNumber(_0x2babed[_0x3141f3(0xef)]),'tableName':firstString(_0x2babed[_0x3141f3(0xc5)])||null}:null};}function resolveSourceType(_0x275467,_0x4e2d24,_0x26c466){const _0x38c660=a66_0xc0e25f,_0x2fec96=firstString(_0x275467[_0x38c660(0xd1)],_0x275467[_0x38c660(0xd7)],_0x4e2d24['source'],_0x4e2d24['sourceType'])?.[_0x38c660(0xe0)]()['toUpperCase']();if(_0x2fec96===_0x38c660(0xb6)||_0x2fec96===_0x38c660(0xcc))return _0x2fec96;if(Object[_0x38c660(0xda)](_0x26c466)[_0x38c660(0xd9)]>0x0)return _0x38c660(0xb6);throw CliErrors[_0x38c660(0xb8)](_0x38c660(0xf8));}function loadCurrentBusinessGroup(_0x2701da,_0x4756ce){const _0x12f749=a66_0xc0e25f,_0x331b1e=readBusinessGroupFromDatasetDetail(_0x2701da,_0x4756ce[_0x12f749(0xd7)]);if(_0x331b1e['found'])return normalizeBusinessGroup(_0x331b1e[_0x12f749(0xe8)]);return'';}function readBusinessGroupFromDatasetDetail(_0x1491ad,_0x1cba9b){const _0x5b9658=a66_0xc0e25f,_0x57068d=asPlainObject(_0x1491ad['dataset']),_0x36ed59=firstPresent(_0x1491ad[_0x5b9658(0xdd)]);if(_0x36ed59[_0x5b9658(0xd6)])return _0x36ed59;const _0x1f8d13=firstPresent(_0x57068d[_0x5b9658(0xdd)]);if(_0x1f8d13[_0x5b9658(0xd6)])return _0x1f8d13;if(_0x1cba9b===_0x5b9658(0xb6))return{'found':![]};const _0x22b536=readBusinessGroupFromExtend(_0x1491ad['extend']);if(_0x22b536[_0x5b9658(0xd6)])return _0x22b536;return readBusinessGroupFromExtend(_0x57068d['extend']);}function readBusinessGroupFromExtend(_0x15628b){const _0x5a1ff6=a66_0xc0e25f;if(_0x15628b===undefined||_0x15628b===null||_0x15628b==='')return{'found':![]};if(typeof _0x15628b==='string')try{const _0x4e3ce3=JSON['parse'](_0x15628b);return readBusinessGroupFromExtend(_0x4e3ce3);}catch{return{'found':![]};}const _0x3052fc=asPlainObject(_0x15628b);if(Object[_0x5a1ff6(0xf0)]['hasOwnProperty'][_0x5a1ff6(0xc0)](_0x3052fc,_0x5a1ff6(0xdd)))return{'found':!![],'value':_0x3052fc[_0x5a1ff6(0xdd)]};return{'found':![]};}function firstPresent(..._0x2c284f){for(const _0x5bd57b of _0x2c284f){if(_0x5bd57b!==undefined&&_0x5bd57b!==null)return{'found':!![],'value':_0x5bd57b};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4ca074,_0x2fb6ff){const _0xa1f91=a66_0xc0e25f;if(_0x2fb6ff===undefined)return;const _0x14d8d6=normalizeBusinessGroupArgument(_0x2fb6ff);if(_0x4ca074!==_0x14d8d6)throw CliErrors[_0xa1f91(0xb8)]('Expectation\x20mismatch\x20at\x20businessGroup',_0xa1f91(0xba)+JSON[_0xa1f91(0xdb)](_0x14d8d6)+_0xa1f91(0xc1)+JSON['stringify'](_0x4ca074));}function buildBackendPlan(_0x199487,_0xfcfc04,_0x54c10b){const _0x4d8c47=a66_0xc0e25f;if(_0xfcfc04[_0x4d8c47(0xd7)]===_0x4d8c47(0xb6)){if(!_0xfcfc04['dbTableSelector']||_0xfcfc04['dbTableSelector'][_0x4d8c47(0xbb)]===null||!_0xfcfc04[_0x4d8c47(0xc7)]['tableName'])throw CliErrors[_0x4d8c47(0xb8)]('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.',_0x4d8c47(0xcb));return{'kind':_0x4d8c47(0xce),'method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0xfcfc04[_0x4d8c47(0xc7)][_0x4d8c47(0xbb)],'tableName':_0xfcfc04[_0x4d8c47(0xc7)][_0x4d8c47(0xc5)],'businessGroup':_0x54c10b}};}return{'kind':'metadata','method':_0x4d8c47(0xc4),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x199487,'datasetCode':_0xfcfc04[_0x4d8c47(0xd8)],'businessGroup':_0x54c10b}};}function normalizeBusinessGroup(_0x1fec36){const _0x14af8a=a66_0xc0e25f;if(_0x1fec36===undefined||_0x1fec36===null)return'';return String(_0x1fec36)[_0x14af8a(0xe0)]();}function normalizeBusinessGroupArgument(_0x24d611){const _0xcd0478=normalizeBusinessGroup(_0x24d611);return _0xcd0478===UNGROUPED_BUSINESS_GROUP?'':_0xcd0478;}function displayBusinessGroup(_0x3841a9){return _0x3841a9||UNGROUPED_BUSINESS_GROUP;}function a66_0x3729(_0x29709e,_0x46caf2){_0x29709e=_0x29709e-0xb5;const _0x191466=a66_0x1914();let _0x37290c=_0x191466[_0x29709e];return _0x37290c;}function asPlainObject(_0x4c2695){const _0x5e69fa=a66_0xc0e25f;if(!_0x4c2695||typeof _0x4c2695!==_0x5e69fa(0xb5)||Array[_0x5e69fa(0xbd)](_0x4c2695))return{};return _0x4c2695;}function a66_0x1914(){const _0x18e224=['trim','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','modelId','message','8272990jOVwgj','38992qmHOOJ','Update\x20business\x20scenario\x20group','value','267356GqtZAw','/smartapi/question/er-config/business-group/edit','name','datasetId','appCode','business-group','dbId','prototype','553dFqFVS','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','ungrouped','payload','business-group-update','15BeSfHs','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','--code\x20is\x20required','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','object','DB_TABLE','data','validation','str','Expected\x20','dbLinkId','method','isArray','datasetCode','unchanged','call',',\x20actual\x20','3piZIfr','2726820BBccMx','POST','tableName','string','dbTableSelector','number','dbtableConfig','dataset','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','METADATA','apiError','db-table','937238OycyeK','expectBusinessGroup','source','update','expect-business-group','backend','/smartapi/dblink/updateTableBusinessGroup','found','sourceType','code','length','keys','stringify','path','businessGroup','443170MposwF','384618CcAwWb'];a66_0x1914=function(){return _0x18e224;};return a66_0x1914();}function firstString(..._0x3b54d5){const _0x1a1fbd=a66_0xc0e25f;for(const _0x2b96d8 of _0x3b54d5){if(typeof _0x2b96d8===_0x1a1fbd(0xc6)&&_0x2b96d8[_0x1a1fbd(0xe0)]())return _0x2b96d8[_0x1a1fbd(0xe0)]();if(typeof _0x2b96d8===_0x1a1fbd(0xc8)&&Number['isFinite'](_0x2b96d8))return String(_0x2b96d8);}return undefined;}function firstNumber(..._0x4e0e26){const _0x2d11ec=a66_0xc0e25f;for(const _0x348c26 of _0x4e0e26){if(typeof _0x348c26===_0x2d11ec(0xc8)&&Number['isFinite'](_0x348c26))return _0x348c26;if(typeof _0x348c26===_0x2d11ec(0xc6)&&_0x348c26['trim']()&&Number['isFinite'](Number(_0x348c26)))return Number(_0x348c26);}return null;}function trim(_0xb46a9f){const _0x5f4379=a66_0xc0e25f;return String(_0xb46a9f||'')[_0x5f4379(0xe0)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a67_0x5055c9=a67_0x296e;(function(_0xfbbf84,_0x23899c){const _0x3b90ed=a67_0x296e,_0x14b203=_0xfbbf84();while(!![]){try{const _0x3c525b=parseInt(_0x3b90ed(0x19d))/0x1+-parseInt(_0x3b90ed(0x199))/0x2+-parseInt(_0x3b90ed(0x1ac))/0x3*(parseInt(_0x3b90ed(0x1a3))/0x4)+-parseInt(_0x3b90ed(0x197))/0x5+-parseInt(_0x3b90ed(0x1a6))/0x6*(parseInt(_0x3b90ed(0x1a7))/0x7)+-parseInt(_0x3b90ed(0x1a4))/0x8*(parseInt(_0x3b90ed(0x19f))/0x9)+parseInt(_0x3b90ed(0x19c))/0xa;if(_0x3c525b===_0x23899c)break;else _0x14b203['push'](_0x14b203['shift']());}catch(_0x1b5270){_0x14b203['push'](_0x14b203['shift']());}}}(a67_0x3445,0x3ad40));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a67_0x296e(_0x4ef6d2,_0x18a440){_0x4ef6d2=_0x4ef6d2-0x195;const _0x344559=a67_0x3445();let _0x296e15=_0x344559[_0x4ef6d2];return _0x296e15;}function a67_0x3445(){const _0x33a79b=['8696GSRClo','length','90MaXTWt','115192JlcRCm','businessGroup','dataset','ungrouped','groups','15owdgXB','business-groups','trim','1830585QcMJGD','read','765470aMafzX','DB_TABLE','\x20business\x20group(s)\x20for\x20database\x20connection\x20','18788750CvnNXh','33149uoHsug','number','3339zROWAr','dbid','num','appCode','217676ytlfEA'];a67_0x3445=function(){return _0x33a79b;};return a67_0x3445();}import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a67_0x5055c9(0x1a9),'command':a67_0x5055c9(0x195),'description':'List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','risk':a67_0x5055c9(0x198),'flags':[{'name':a67_0x5055c9(0x1a0),'type':a67_0x5055c9(0x19e),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x164291){const _0x31d74f=a67_0x5055c9,_0x590d00=_0x164291[_0x31d74f(0x1a1)](_0x31d74f(0x1a0)),_0x596a6e=await getErBusinessGroupSummary(_0x164291[_0x31d74f(0x1a2)],_0x590d00),_0xc87442=_0x596a6e[_0x31d74f(0x1ab)]['map'](_0x2094ca=>({..._0x2094ca,'businessGroup':_0x2094ca[_0x31d74f(0x1a8)][_0x31d74f(0x196)]()||_0x31d74f(0x1aa)}));return{'ok':!![],'data':{..._0x596a6e,'groups':_0xc87442,'scope':_0x31d74f(0x19a)},'message':'Found\x20'+_0xc87442[_0x31d74f(0x1a5)]+_0x31d74f(0x19b)+_0x590d00};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x8e6dc5=a68_0x2e16;(function(_0xf7306a,_0x2e9332){const _0x31bb60=a68_0x2e16,_0x25d170=_0xf7306a();while(!![]){try{const _0x3eb356=parseInt(_0x31bb60(0x173))/0x1*(-parseInt(_0x31bb60(0x158))/0x2)+parseInt(_0x31bb60(0x157))/0x3+-parseInt(_0x31bb60(0x15a))/0x4*(parseInt(_0x31bb60(0x16e))/0x5)+-parseInt(_0x31bb60(0x16b))/0x6+-parseInt(_0x31bb60(0x153))/0x7*(parseInt(_0x31bb60(0x16a))/0x8)+-parseInt(_0x31bb60(0x165))/0x9*(-parseInt(_0x31bb60(0x159))/0xa)+parseInt(_0x31bb60(0x167))/0xb*(parseInt(_0x31bb60(0x172))/0xc);if(_0x3eb356===_0x2e9332)break;else _0x25d170['push'](_0x25d170['shift']());}catch(_0x13360a){_0x25d170['push'](_0x25d170['shift']());}}}(a68_0x4c09,0xaabec));function a68_0x4c09(){const _0x55b2ed=['unknown','dbtableConfig','join','datasetName','2538FKjxjV','object','12245189SgGQen','modelCode','trim','944aepquS','4250028yFrwGl','getOne','lovrabet','19850ijeGwm','UNKNOWN','SQL\x20schema\x20validation','sourceType','36yAsTSf','27980hNcbYT','\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','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','63966bJBuQH','length','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','source','811263JkvirB','46wbjWlM','2530NHKLsl','556EoZHPJ','name','tableName','filter','\x20is\x20','dataset','toUpperCase'];a68_0x4c09=function(){return _0x55b2ed;};return a68_0x4c09();}import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a68_0x8e6dc5(0x16d),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':a68_0x8e6dc5(0x175)};export const RUNTIME_DATA_ACCESS_SUMMARY=a68_0x8e6dc5(0x155);function valueToString(_0x289361){const _0x1059a5=a68_0x8e6dc5;return _0x289361==null?'':String(_0x289361)[_0x1059a5(0x169)]();}function getDatasetCode(_0x2a53b7){const _0x26b0c5=a68_0x8e6dc5;return valueToString(_0x2a53b7['code']??_0x2a53b7[_0x26b0c5(0x168)]??_0x2a53b7['dataset']?.['datasetCode']);}function getDatasetName(_0x180da5){const _0x2b15ea=a68_0x8e6dc5;return valueToString(_0x180da5[_0x2b15ea(0x15b)]??_0x180da5[_0x2b15ea(0x15f)]?.[_0x2b15ea(0x164)])||_0x2b15ea(0x161);}function a68_0x2e16(_0x28a77a,_0x54bd0d){_0x28a77a=_0x28a77a-0x151;const _0x4c098d=a68_0x4c09();let _0x2e161a=_0x4c098d[_0x28a77a];return _0x2e161a;}function getDatasetSource(_0x4f3d71){const _0x5519f8=a68_0x8e6dc5;return valueToString(_0x4f3d71[_0x5519f8(0x156)]??_0x4f3d71['dataset']?.[_0x5519f8(0x171)])[_0x5519f8(0x160)]();}function getDbtableConfig(_0x2ecfa0){const _0x2f1c57=a68_0x8e6dc5,_0x18aa65=_0x2ecfa0[_0x2f1c57(0x162)]??_0x2ecfa0['dbtable'];return _0x18aa65&&typeof _0x18aa65===_0x2f1c57(0x166)?_0x18aa65:{};}export function isDbTableBackedDataset(_0xeda002){const _0x592ca1=a68_0x8e6dc5,_0x5a2818=getDatasetSource(_0xeda002);if(_0x5a2818==='METADATA')return![];const _0x21e9ec=getDbtableConfig(_0xeda002),_0x53db19=_0x21e9ec['dbId']??_0x21e9ec['id'],_0x76116=valueToString(_0x21e9ec[_0x592ca1(0x15c)]??_0xeda002['tableName']??_0xeda002[_0x592ca1(0x15f)]?.[_0x592ca1(0x15c)]);return _0x53db19!==undefined&&_0x53db19!==null&&_0x76116[_0x592ca1(0x154)]>0x0;}export function filterDbTableBackedDatasets(_0x3a2ddd){const _0x220216=a68_0x8e6dc5;return _0x3a2ddd[_0x220216(0x15d)](_0x509b59=>isDbTableBackedDataset(_0x509b59));}export function buildDbTableBackedRequirementMessage(_0x5df293,_0x5f0406=a68_0x8e6dc5(0x170)){const _0x151a94=a68_0x8e6dc5,_0x1e8135=getDatasetSource(_0x5df293)||_0x151a94(0x16f),_0x13c826=getDatasetName(_0x5df293),_0x2a5303=getDatasetCode(_0x5df293),_0x14f8ed=_0x2a5303?'\x20('+_0x2a5303+')':'';return['The\x20current\x20dataset\x20\x22'+_0x13c826+'\x22'+_0x14f8ed+_0x151a94(0x15e)+_0x1e8135+_0x151a94(0x174)+_0x5f0406+'.',_0x151a94(0x152),_0x151a94(0x151),'To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x151a94(0x15d)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x151a94(0x16c)]+'.'][_0x151a94(0x163)]('\x20');}export function assertDatasetIsDbTableBacked(_0x20a5de,_0x233bfb){if(!isDbTableBackedDataset(_0x20a5de))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x20a5de,_0x233bfb));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x495fc1=a69_0x5ec0;(function(_0x104f9a,_0x38a66e){const _0x203ae7=a69_0x5ec0,_0x53a67a=_0x104f9a();while(!![]){try{const _0xcdfcef=-parseInt(_0x203ae7(0x124))/0x1+-parseInt(_0x203ae7(0x129))/0x2*(-parseInt(_0x203ae7(0x123))/0x3)+parseInt(_0x203ae7(0x126))/0x4*(-parseInt(_0x203ae7(0x127))/0x5)+parseInt(_0x203ae7(0x11e))/0x6+parseInt(_0x203ae7(0x12a))/0x7*(-parseInt(_0x203ae7(0x12b))/0x8)+parseInt(_0x203ae7(0x128))/0x9+-parseInt(_0x203ae7(0x125))/0xa*(-parseInt(_0x203ae7(0x121))/0xb);if(_0xcdfcef===_0x38a66e)break;else _0x53a67a['push'](_0x53a67a['shift']());}catch(_0x12901a){_0x53a67a['push'](_0x53a67a['shift']());}}}(a69_0x961e,0x1fd7f));import{createCrossDbRelation}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,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';function a69_0x5ec0(_0x1ff4e4,_0x1ab22a){_0x1ff4e4=_0x1ff4e4-0x11d;const _0x961eac=a69_0x961e();let _0x5ec000=_0x961eac[_0x1ff4e4];return _0x5ec000;}export const datasetCrossRelationCreate={'service':a69_0x495fc1(0x11d),'command':a69_0x495fc1(0x122),'description':a69_0x495fc1(0x120),'risk':a69_0x495fc1(0x12c),'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 _0x53557e=>validateCrossRelation(_0x53557e,a69_0x495fc1(0x11f)),'dryRun':_0x5639f2=>previewCrossRelation(_0x5639f2,a69_0x495fc1(0x11f)),'execute':_0x7ebe40=>executeCrossRelation(_0x7ebe40,a69_0x495fc1(0x11f),createCrossDbRelation)};function a69_0x961e(){const _0x2a3e96=['44PKEkBb','39595OrGOjf','1100484pyIAfn','291944yUVmpn','7qPOihi','1282024uRgBBc','write','dataset','891378lCbczB','create','Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','11cGqaNL','cross-relation-create','3paJZtk','169105VMidxE','1300870MtkdlW'];a69_0x961e=function(){return _0x2a3e96;};return a69_0x961e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x395418=a70_0x3d9a;(function(_0x45de38,_0x110bd3){const _0x238e1e=a70_0x3d9a,_0x3203c7=_0x45de38();while(!![]){try{const _0x35f59d=parseInt(_0x238e1e(0xac))/0x1*(parseInt(_0x238e1e(0xaf))/0x2)+parseInt(_0x238e1e(0xa6))/0x3*(-parseInt(_0x238e1e(0xa8))/0x4)+-parseInt(_0x238e1e(0xae))/0x5+parseInt(_0x238e1e(0xa9))/0x6+-parseInt(_0x238e1e(0xab))/0x7+-parseInt(_0x238e1e(0xa5))/0x8+-parseInt(_0x238e1e(0xa7))/0x9*(-parseInt(_0x238e1e(0xb0))/0xa);if(_0x35f59d===_0x110bd3)break;else _0x3203c7['push'](_0x3203c7['shift']());}catch(_0x2303f6){_0x3203c7['push'](_0x3203c7['shift']());}}}(a70_0x42db,0x7a46d));import{deleteCrossDbRelation}from'../../core/api-client.js';function a70_0x42db(){const _0x3a7ab1=['2208000vOUDDU','5260BeKAFA','70etEAnf','high-risk-write','1585432xdyJZS','111ULfNGU','263223WWmqRM','35524QZtAit','4998456AXNyIw','delete','883008rqsrdE','212QyfNDz','Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field'];a70_0x42db=function(){return _0x3a7ab1;};return a70_0x42db();}function a70_0x3d9a(_0x5484f2,_0x545e42){_0x5484f2=_0x5484f2-0xa5;const _0x42db26=a70_0x42db();let _0x3d9a02=_0x42db26[_0x5484f2];return _0x3d9a02;}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':'dataset','command':'cross-relation-delete','description':a70_0x395418(0xad),'risk':a70_0x395418(0xb1),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x122e24=>validateCrossRelation(_0x122e24,'delete'),'dryRun':_0x2cefd5=>previewCrossRelation(_0x2cefd5,'delete'),'execute':_0xf5e863=>executeCrossRelation(_0xf5e863,a70_0x395418(0xaa),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a71_0xc72a(){const _0x7f2524=['dataset','17121411IfMZPW','530271CrTjya','read','appCode','284KRfvie','Cross-database\x20relations:\x20','map','3346818qQZCFJ','6577072IUnwXZ','7nBRTTd','2469108TSIcIU','cross-relation-list','31580dWzZbI','217514AsiHuW','List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','length','\x20relation(s)','10nZxmpa'];a71_0xc72a=function(){return _0x7f2524;};return a71_0xc72a();}const a71_0x587eaa=a71_0x1cab;(function(_0x1ffef1,_0x39ac48){const _0x24f468=a71_0x1cab,_0x15c4a6=_0x1ffef1();while(!![]){try{const _0x5abe5c=-parseInt(_0x24f468(0x116))/0x1+parseInt(_0x24f468(0x10f))/0x2+-parseInt(_0x24f468(0x10c))/0x3+-parseInt(_0x24f468(0x106))/0x4*(parseInt(_0x24f468(0x10e))/0x5)+-parseInt(_0x24f468(0x109))/0x6+parseInt(_0x24f468(0x10b))/0x7*(parseInt(_0x24f468(0x10a))/0x8)+parseInt(_0x24f468(0x115))/0x9*(parseInt(_0x24f468(0x113))/0xa);if(_0x5abe5c===_0x39ac48)break;else _0x15c4a6['push'](_0x15c4a6['shift']());}catch(_0x2a1ecb){_0x15c4a6['push'](_0x15c4a6['shift']());}}}(a71_0xc72a,0x73a7c));function a71_0x1cab(_0x381934,_0x4d5247){_0x381934=_0x381934-0x104;const _0xc72ae0=a71_0xc72a();let _0x1caba6=_0xc72ae0[_0x381934];return _0x1caba6;}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_0x587eaa(0x114),'command':a71_0x587eaa(0x10d),'description':a71_0x587eaa(0x110),'risk':a71_0x587eaa(0x104),'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 _0x506f15=>validateCrossRelation(_0x506f15,'list'),async 'execute'(_0x3954be){const _0x1cf991=a71_0x587eaa,_0x202b8c=await resolveCrossRelationQuery(_0x3954be),_0x1bea81=await queryCrossDbRelations(_0x202b8c);return{'ok':!![],'data':{'appCode':_0x3954be[_0x1cf991(0x105)],'selector':_0x202b8c,'total':_0x1bea81[_0x1cf991(0x111)],'relations':_0x1bea81[_0x1cf991(0x108)](projectCrossRelation)},'message':_0x1cf991(0x107)+_0x1bea81['length']+_0x1cf991(0x112)};}};
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a72_0x4287da=a72_0x2bae;(function(_0x306ec1,_0x359a3f){const _0x8bd7fa=a72_0x2bae,_0x3cc854=_0x306ec1();while(!![]){try{const _0x1eb41e=parseInt(_0x8bd7fa(0x180))/0x1+-parseInt(_0x8bd7fa(0x159))/0x2*(parseInt(_0x8bd7fa(0x176))/0x3)+parseInt(_0x8bd7fa(0x163))/0x4+-parseInt(_0x8bd7fa(0x17b))/0x5+parseInt(_0x8bd7fa(0x175))/0x6*(-parseInt(_0x8bd7fa(0x166))/0x7)+parseInt(_0x8bd7fa(0x154))/0x8+parseInt(_0x8bd7fa(0x17a))/0x9;if(_0x1eb41e===_0x359a3f)break;else _0x3cc854['push'](_0x3cc854['shift']());}catch(_0x13e5fd){_0x3cc854['push'](_0x3cc854['shift']());}}}(a72_0x2b72,0xccef8));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 a72_0x2b72(){const _0x329076=['list','expectedLabel','appCode','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','fromDatasetCode','message','toLowerCase','13020840uuLXKJ','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','toDatasetName','flag','update','1704886mgpHXn','sourceType','\x20verified.','dbId','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','create','relationId','dblinkId','extend','3164784OiXdlR','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','includes','77MdMpfu','parse','expectedCardinality','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','toField','datasetCode','trim','to-datasetcode','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','flagMissing','enum','validation','query','data','str','834810YyfonS','3ShWRnT','dbtable','isSafeInteger','\x20has\x20invalid\x20storage\x20configuration.','13166136ujYVlH','6072635FzzMOb','storageProfile','to-column','string','Invalid\x20--cardinality.','555166TOoIGg','refTableLabelName','fromDatasetName','multiple\x20cross-database\x20relations\x20matched','before','catch','Dataset\x20','defineProperty','Cross-database\x20relation\x20','fromDblinkId','Would\x20','fromField','cardinality','some','table','unconfirmed','from-dblink-id','\x20a\x20cross-database\x20relation\x20for\x20','DB_TABLE','tableName','map','from','fromTableName','filter','delete','from-datasetcode','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','length','relationType','body','label_inherited'];a72_0x2b72=function(){return _0x329076;};return a72_0x2b72();}function required(_0x2792e0,_0x542877){const _0x5cf3cc=a72_0x2bae,_0x59dd28=_0x2792e0[_0x5cf3cc(0x174)](_0x542877)[_0x5cf3cc(0x16c)]();if(!_0x59dd28)throw CliErrors[_0x5cf3cc(0x16f)](_0x542877);return _0x59dd28;}function explicitDblink(_0x2bd346){const _0x46d95b=a72_0x2bae,_0x5e4d1a=_0x2bd346[_0x46d95b(0x157)](_0x46d95b(0x13e));if(_0x5e4d1a===undefined||_0x5e4d1a===null)return undefined;const _0x3eb7e4=Number(_0x5e4d1a);if(!Number[_0x46d95b(0x178)](_0x3eb7e4)||_0x3eb7e4<=0x0)throw CliErrors[_0x46d95b(0x171)]('--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x3eb7e4;}export function validateCrossRelation(_0x200c87,_0x51ba83){const _0x8cdaca=a72_0x2bae,_0x3fb12a=explicitDblink(_0x200c87);if(_0x51ba83===_0x8cdaca(0x14d)){if(!_0x200c87['str'](_0x8cdaca(0x147))[_0x8cdaca(0x16c)]()&&_0x3fb12a===undefined)throw CliErrors['validation']('Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.');return;}required(_0x200c87,_0x8cdaca(0x147)),required(_0x200c87,'from-column');if(_0x51ba83!==_0x8cdaca(0x146)){required(_0x200c87,_0x8cdaca(0x16d)),required(_0x200c87,_0x8cdaca(0x17d));const _0x42c72a=_0x200c87[_0x8cdaca(0x174)]('cardinality')[_0x8cdaca(0x16c)]();if(_0x42c72a&&!CROSS_RELATION_CARDINALITY_FLAG[_0x8cdaca(0x170)]['includes'](_0x42c72a))throw CliErrors[_0x8cdaca(0x171)](_0x8cdaca(0x17f));}}async function resolveEndpoint(_0x4b90c2){const _0x117336=a72_0x2bae,_0xd99fac=await getDatasetDetail(_0x4b90c2),_0x32f8d7=_0xd99fac?.['dataset']??{};if((_0xd99fac?.['source']??_0x32f8d7[_0x117336(0x15a)])!=='DB_TABLE')throw CliErrors['validation'](_0x117336(0x134)+_0x4b90c2+_0x117336(0x15e));const _0x51fbc7=_0xd99fac['dbtableConfig']??_0xd99fac[_0x117336(0x177)]??{};let _0x2431d7=_0xd99fac[_0x117336(0x162)]??_0x32f8d7['extend']??{};if(typeof _0x2431d7===_0x117336(0x17e))try{_0x2431d7=_0x2431d7[_0x117336(0x16c)]()?JSON[_0x117336(0x167)](_0x2431d7):{};}catch{throw CliErrors[_0x117336(0x171)](_0x117336(0x134)+_0x4b90c2+_0x117336(0x179));}const _0x50ddff=Number(_0x2431d7?.[_0x117336(0x17c)]?.[_0x117336(0x15c)]??_0xd99fac['storageProfile']?.[_0x117336(0x15c)]??_0x32f8d7[_0x117336(0x17c)]?.['dbId']??_0x51fbc7['dbId']??_0x32f8d7['dbId']??_0xd99fac[_0x117336(0x15c)]),_0x5a3009=String(_0xd99fac[_0x117336(0x141)]??_0x32f8d7[_0x117336(0x141)]??_0x51fbc7['tableName']??'')[_0x117336(0x16c)]();if(!Number[_0x117336(0x178)](_0x50ddff)||_0x50ddff<=0x0||!_0x5a3009)throw CliErrors[_0x117336(0x171)]('Dataset\x20'+_0x4b90c2+_0x117336(0x148));return{'datasetCode':_0x4b90c2,'dblinkId':_0x50ddff,'table':_0x5a3009};}export async function resolveCrossRelationQuery(_0xc08a81){const _0x418414=a72_0x2bae,_0x584ed9=_0xc08a81[_0x418414(0x174)]('from-datasetcode')['trim'](),_0x3c9d6f=explicitDblink(_0xc08a81),_0xf6a033=_0x584ed9?await resolveEndpoint(_0x584ed9):undefined;if(_0xf6a033&&_0x3c9d6f!==undefined&&_0xf6a033[_0x418414(0x161)]!==_0x3c9d6f)throw CliErrors['validation'](_0x418414(0x169));const _0x51e5cf=_0xf6a033?.[_0x418414(0x161)]??_0x3c9d6f;if(_0x51e5cf===undefined)throw CliErrors[_0x418414(0x171)](_0x418414(0x164));return{'appCode':_0xc08a81[_0x418414(0x14f)],'fromDblinkId':_0x51e5cf,..._0x584ed9?{'fromDatasetCode':_0x584ed9}:{},..._0xc08a81[_0x418414(0x174)]('from-column')[_0x418414(0x16c)]()?{'fromField':_0xc08a81[_0x418414(0x174)]('from-column')[_0x418414(0x16c)]()}:{}};}export function projectCrossRelation(_0xc2af20){const _0x37526c=a72_0x2bae;return{'relationId':_0xc2af20['relationId'],'from':{'source':_0x37526c(0x140),'datasetCode':_0xc2af20[_0x37526c(0x151)],'datasetName':_0xc2af20[_0x37526c(0x182)],'dblinkId':_0xc2af20[_0x37526c(0x137)],'table':_0xc2af20[_0x37526c(0x144)],'field':_0xc2af20['fromField']},'to':{'source':_0x37526c(0x140),'datasetCode':_0xc2af20['toDatasetCode'],'datasetName':_0xc2af20[_0x37526c(0x156)],'dblinkId':_0xc2af20['toDblinkId'],'table':_0xc2af20['toTableName'],'field':_0xc2af20[_0x37526c(0x16a)],'labelField':_0xc2af20[_0x37526c(0x181)]},'relation':{'cardinality':_0xc2af20[_0x37526c(0x13a)],'relationType':_0xc2af20['relationType']}};}function ambiguity(_0x18a63c){const _0x1eba19=a72_0x2bae,_0x15dc02=CliErrors[_0x1eba19(0x171)]('Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.',_0x1eba19(0x16e));return Object[_0x1eba19(0x135)](_0x15dc02,_0x1eba19(0x173),{'value':{'candidates':_0x18a63c[_0x1eba19(0x142)](projectCrossRelation)}}),_0x15dc02;}const sameName=(_0xcbc7,_0x1e53ea)=>_0xcbc7[a72_0x4287da(0x153)]()===_0x1e53ea[a72_0x4287da(0x153)]();function matchesEndpoint(_0x5c8433,_0x28698e,_0x43f38d,_0x2f4df2,_0x244913){const _0x44c1ca=a72_0x4287da;return _0x5c8433['fromDblinkId']===_0x28698e['dblinkId']&&sameName(_0x5c8433['fromTableName'],_0x28698e[_0x44c1ca(0x13c)])&&sameName(_0x5c8433['fromField'],_0x43f38d)&&_0x5c8433['toDblinkId']===_0x2f4df2[_0x44c1ca(0x161)]&&sameName(_0x5c8433['toTableName'],_0x2f4df2[_0x44c1ca(0x13c)])&&sameName(_0x5c8433[_0x44c1ca(0x16a)],_0x244913);}export async function prepareCrossRelation(_0x1fca82,_0x5d0d27){const _0x31ee8f=a72_0x4287da,_0x14ec5b=await resolveEndpoint(required(_0x1fca82,_0x31ee8f(0x147))),_0x2167ca=explicitDblink(_0x1fca82);if(_0x2167ca!==undefined&&_0x14ec5b['dblinkId']!==_0x2167ca)throw CliErrors[_0x31ee8f(0x171)](_0x31ee8f(0x169));const _0x1bf3ad={'appCode':_0x1fca82[_0x31ee8f(0x14f)],'fromDatasetCode':_0x14ec5b[_0x31ee8f(0x16b)],'fromField':required(_0x1fca82,'from-column'),..._0x2167ca!==undefined?{'fromDblinkId':_0x2167ca}:{}},_0x5afc81={'appCode':_0x1fca82[_0x31ee8f(0x14f)],'fromDblinkId':_0x14ec5b[_0x31ee8f(0x161)],'fromDatasetCode':_0x14ec5b['datasetCode'],'fromField':_0x1bf3ad[_0x31ee8f(0x139)]},_0x2a8f2d=await queryCrossDbRelations(_0x5afc81);let _0xb422ba=null;if(_0x5d0d27!==_0x31ee8f(0x15f)){if(_0x2a8f2d[_0x31ee8f(0x149)]>0x1)throw ambiguity(_0x2a8f2d);_0xb422ba=_0x2a8f2d[0x0]??null;if(!_0xb422ba)throw CliErrors[_0x31ee8f(0x171)](_0x31ee8f(0x150));}if(_0x5d0d27==='delete')return{'operation':_0x5d0d27,'from':_0x14ec5b,'query':_0x5afc81,'body':_0x1bf3ad,'before':_0xb422ba};const _0x3279d1=await resolveEndpoint(required(_0x1fca82,_0x31ee8f(0x16d)));if(_0x14ec5b[_0x31ee8f(0x161)]===_0x3279d1[_0x31ee8f(0x161)])throw CliErrors[_0x31ee8f(0x171)]('Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.');const _0x13bb40=_0x1fca82[_0x31ee8f(0x174)]('to-label-column')['trim'](),_0x21f9a5=_0x1fca82[_0x31ee8f(0x174)](_0x31ee8f(0x13a))[_0x31ee8f(0x16c)](),_0x33a285={..._0x1bf3ad,'toDatasetCode':_0x3279d1[_0x31ee8f(0x16b)],'toField':required(_0x1fca82,'to-column'),..._0x13bb40?{'refTableLabelName':_0x13bb40}:{},..._0x21f9a5?{'cardinality':_0x21f9a5}:{}};if(_0x2a8f2d[_0x31ee8f(0x13b)](_0x9c181d=>_0x9c181d[_0x31ee8f(0x160)]!==_0xb422ba?.[_0x31ee8f(0x160)]&&matchesEndpoint(_0x9c181d,_0x14ec5b,_0x33a285['fromField'],_0x3279d1,_0x33a285[_0x31ee8f(0x16a)])))throw CliErrors[_0x31ee8f(0x171)]('Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.');return{'operation':_0x5d0d27,'from':_0x14ec5b,'to':_0x3279d1,'query':_0x5afc81,'body':_0x33a285,'before':_0xb422ba,'expectedLabel':_0x13bb40||_0xb422ba?.[_0x31ee8f(0x181)]||_0x33a285[_0x31ee8f(0x16a)],'expectedCardinality':_0x21f9a5||_0xb422ba?.[_0x31ee8f(0x13a)]||null};}function mutationData(_0x43962f,_0x322482,_0x327bc0){const _0x5d9e22=a72_0x4287da,{operation:_0x5c3d74,body:_0x5715ae,before:_0x42494b}=_0x43962f;return{'operation':_0x5c3d74,'selector':{'appCode':_0x5715ae[_0x5d9e22(0x14f)],'from':{'datasetCode':_0x5715ae[_0x5d9e22(0x151)],'field':_0x5715ae['fromField'],'dblinkId':_0x43962f['from'][_0x5d9e22(0x161)]}},'before':_0x42494b?projectCrossRelation(_0x42494b):null,'after':_0x327bc0,'dryRun':_0x322482,'backend':{'method':'POST','path':CROSS_DB_RELATION_PATHS[_0x5c3d74]},'warnings':_0x5c3d74===_0x5d9e22(0x158)&&!_0x5715ae['refTableLabelName']?[{'code':_0x5d9e22(0x14c),'message':_0x5d9e22(0x155)}]:[]};}function a72_0x2bae(_0x36720e,_0x446f7c){_0x36720e=_0x36720e-0x134;const _0x2b7229=a72_0x2b72();let _0x2baef2=_0x2b7229[_0x36720e];return _0x2baef2;}export async function previewCrossRelation(_0x2fb751,_0x671617){const _0x5ec29e=a72_0x4287da,_0x410583=await prepareCrossRelation(_0x2fb751,_0x671617),_0xc39ad7=_0x410583[_0x5ec29e(0x14b)],_0x5bfba3=_0x671617==='delete'?null:{..._0x410583[_0x5ec29e(0x184)]?{'relationId':_0x410583['before']['relationId']}:{},'from':{'datasetCode':_0x410583[_0x5ec29e(0x143)][_0x5ec29e(0x16b)],'dblinkId':_0x410583['from']['dblinkId'],'table':_0x410583[_0x5ec29e(0x143)]['table'],'field':_0xc39ad7[_0x5ec29e(0x139)]},'to':{'datasetCode':_0x410583['to']['datasetCode'],'dblinkId':_0x410583['to']['dblinkId'],'table':_0x410583['to'][_0x5ec29e(0x13c)],'field':_0xc39ad7[_0x5ec29e(0x16a)],'labelField':_0x410583['expectedLabel']},'relation':{'cardinality':_0x410583[_0x5ec29e(0x168)],'relationType':0x2}};return{...mutationData(_0x410583,!![],null),'after':_0x5bfba3,'method':'POST','url':CROSS_DB_RELATION_PATHS[_0x671617],'body':_0x410583[_0x5ec29e(0x14b)],'description':_0x5ec29e(0x138)+_0x671617+_0x5ec29e(0x13f)+_0xc39ad7[_0x5ec29e(0x151)]+'.'+_0xc39ad7[_0x5ec29e(0x139)]};}export async function executeCrossRelation(_0x3d2f16,_0x250622,_0xb820e){const _0x2e6b22=a72_0x4287da,_0xeee67f=await prepareCrossRelation(_0x3d2f16,_0x250622);try{await _0xb820e(_0xeee67f[_0x2e6b22(0x14b)]);}catch(_0x45f03e){if(_0x45f03e instanceof CliError&&_0x45f03e[_0x2e6b22(0x152)][_0x2e6b22(0x165)](_0x2e6b22(0x183))){const _0x2910fe=await queryCrossDbRelations(_0xeee67f[_0x2e6b22(0x172)])[_0x2e6b22(0x185)](()=>[]);throw ambiguity(_0x2910fe);}throw _0x45f03e;}let _0x18e5b2=[],_0x1da58e,_0x4599b8=![];try{_0x18e5b2=await queryCrossDbRelations(_0xeee67f['query']);if(_0x250622===_0x2e6b22(0x146))_0x4599b8=!_0x18e5b2[_0x2e6b22(0x13b)](_0x41a137=>_0x41a137[_0x2e6b22(0x160)]===_0xeee67f[_0x2e6b22(0x184)][_0x2e6b22(0x160)]);else{const _0x438b95=_0xeee67f['body'],_0x199677=_0x18e5b2[_0x2e6b22(0x145)](_0x5ab2e7=>matchesEndpoint(_0x5ab2e7,_0xeee67f[_0x2e6b22(0x143)],_0x438b95[_0x2e6b22(0x139)],_0xeee67f['to'],_0x438b95[_0x2e6b22(0x16a)])&&(_0x250622===_0x2e6b22(0x15f)||_0x5ab2e7[_0x2e6b22(0x160)]===_0xeee67f[_0x2e6b22(0x184)][_0x2e6b22(0x160)]));_0x1da58e=_0x199677[_0x2e6b22(0x149)]===0x1?_0x199677[0x0]:undefined,_0x4599b8=!!_0x1da58e&&_0x1da58e[_0x2e6b22(0x181)]===_0xeee67f[_0x2e6b22(0x14e)]&&_0x1da58e[_0x2e6b22(0x13a)]===_0xeee67f[_0x2e6b22(0x168)]&&_0x1da58e[_0x2e6b22(0x14a)]===0x2;}}catch{}const _0x1ee50c={...mutationData(_0xeee67f,![],_0x1da58e?projectCrossRelation(_0x1da58e):null),'verification':{'status':_0x4599b8?'matched':_0x2e6b22(0x13d),'verified':_0x4599b8}};if(!_0x4599b8){const _0x1ecf1d=CliErrors['apiError']('Cross-database\x20relation\x20'+_0x250622+'\x20write\x20was\x20not\x20verified.',_0x2e6b22(0x15d));Object['defineProperty'](_0x1ecf1d,'data',{'value':{..._0x1ee50c,'candidates':_0x18e5b2[_0x2e6b22(0x142)](projectCrossRelation)}});throw _0x1ecf1d;}return{'ok':!![],'data':_0x1ee50c,'message':_0x2e6b22(0x136)+_0x250622+_0x2e6b22(0x15b)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a73_0x36ed(){const _0xabac57=['Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','59888nFAbqL','cross-relation-update','1417605kGEHTY','2933259kWIYTx','4628336LcovhC','3497382LmImOa','3rWMVka','208944HLjCbw','2571630msucQg','write','update','dataset','108iXxupl'];a73_0x36ed=function(){return _0xabac57;};return a73_0x36ed();}const a73_0xa79d74=a73_0x12a5;(function(_0x28d17b,_0x2d2443){const _0x348f01=a73_0x12a5,_0x257b37=_0x28d17b();while(!![]){try{const _0x1769cf=parseInt(_0x348f01(0x6f))/0x1*(-parseInt(_0x348f01(0x70))/0x2)+-parseInt(_0x348f01(0x71))/0x3+parseInt(_0x348f01(0x6d))/0x4+-parseInt(_0x348f01(0x6b))/0x5+parseInt(_0x348f01(0x6e))/0x6+parseInt(_0x348f01(0x6c))/0x7+-parseInt(_0x348f01(0x77))/0x8*(parseInt(_0x348f01(0x75))/0x9);if(_0x1769cf===_0x2d2443)break;else _0x257b37['push'](_0x257b37['shift']());}catch(_0x2263ec){_0x257b37['push'](_0x257b37['shift']());}}}(a73_0x36ed,0x9627f));import{updateCrossDbRelation}from'../../core/api-client.js';function a73_0x12a5(_0x37ae4a,_0x1e13c8){_0x37ae4a=_0x37ae4a-0x6b;const _0x36eda3=a73_0x36ed();let _0x12a5e6=_0x36eda3[_0x37ae4a];return _0x12a5e6;}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_0xa79d74(0x74),'command':a73_0xa79d74(0x78),'description':a73_0xa79d74(0x76),'risk':a73_0xa79d74(0x72),'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 _0x3b9144=>validateCrossRelation(_0x3b9144,a73_0xa79d74(0x73)),'dryRun':_0x3167d8=>previewCrossRelation(_0x3167d8,'update'),'execute':_0x51e0fb=>executeCrossRelation(_0x51e0fb,a73_0xa79d74(0x73),updateCrossDbRelation)};
|