@lovrabet/rabetbase-cli 2.5.4-beta.3 → 2.5.4-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- 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.d.ts +2 -0
- package/lib/commands/app/detail.js +1 -0
- 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/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +3 -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.d.ts +2 -0
- package/lib/commands/menu/shared/path.js +1 -0
- package/lib/commands/menu/shared/service.d.ts +6 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.d.ts +28 -0
- package/lib/commands/menu/shared/subapp-assets.js +1 -0
- package/lib/commands/menu/shared/sync-core.d.ts +2 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +14 -4
- 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.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-status.js +1 -0
- package/lib/commands/menu/subapp-assets-update.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-update.js +1 -0
- 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 +16 -1
- 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-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/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 +22 -13
- package/skills/rabetbase/guides/backend-function.md +2 -7
- package/skills/rabetbase/guides/bff-creation-workflow.md +24 -23
- package/skills/rabetbase/guides/host-frontend-integration.md +62 -0
- package/skills/rabetbase/guides/independent-deployment.md +45 -0
- package/skills/rabetbase/guides/troubleshooting.md +9 -1
- package/skills/rabetbase/references/rabetbase-app-detail.md +31 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +2 -2
- package/skills/rabetbase/references/rabetbase-data-list-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +5 -1
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -7
- package/skills/rabetbase/references/rabetbase-menu-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-status.md +19 -0
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-update.md +27 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +40 -14
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -3
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-user-account.md +8 -8
- package/skills/rabetbase.manifest.json +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a59_0x344e(_0x375f5a,_0x41d9b3){_0x375f5a=_0x375f5a-0x1c0;const _0x505173=a59_0x5051();let _0x344e07=_0x505173[_0x375f5a];return _0x344e07;}function a59_0x5051(){const _0x176671=['Usage:\x20','read','str','922475RwaeqP','get','Get\x20a\x20config\x20value\x20by\x20key','2320840oetjAO','\x20config\x20get\x20--key\x20<key>','8TNiPYN','208ighVlY','appcode','203zmfVea','key','11JftlhQ','string','113301ETmfaP','608275DVaRUL','4PyzxtW','config','validation','25632084HWCMns','app','object','104808vUOOpK','Key\x20not\x20found:\x20','165294zrQJRB'];a59_0x5051=function(){return _0x176671;};return a59_0x5051();}const a59_0x482157=a59_0x344e;(function(_0x3ce37f,_0x2e9d64){const _0x45c616=a59_0x344e,_0x3e0af2=_0x3ce37f();while(!![]){try{const _0x20fe35=-parseInt(_0x45c616(0x1c1))/0x1+-parseInt(_0x45c616(0x1d3))/0x2*(-parseInt(_0x45c616(0x1c8))/0x3)+-parseInt(_0x45c616(0x1c2))/0x4*(-parseInt(_0x45c616(0x1ce))/0x5)+parseInt(_0x45c616(0x1ca))/0x6*(-parseInt(_0x45c616(0x1d6))/0x7)+parseInt(_0x45c616(0x1d4))/0x8*(-parseInt(_0x45c616(0x1c0))/0x9)+parseInt(_0x45c616(0x1d1))/0xa*(-parseInt(_0x45c616(0x1d8))/0xb)+parseInt(_0x45c616(0x1c5))/0xc;if(_0x20fe35===_0x2e9d64)break;else _0x3e0af2['push'](_0x3e0af2['shift']());}catch(_0x5f19c5){_0x3e0af2['push'](_0x3e0af2['shift']());}}}(a59_0x5051,0x78854));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(_0x3dbfc5){const _0x1ec252=a59_0x344e,_0x20ab30=_0x3dbfc5[_0x1ec252(0x1cd)](_0x1ec252(0x1d7));if(!_0x20ab30)throw CliErrors[_0x1ec252(0x1c4)]('Missing\x20key.',_0x1ec252(0x1cb)+CLI_BIN_NAME+_0x1ec252(0x1d2));const _0x526d01=readConfig(),_0x2236fe=_0x20ab30===_0x1ec252(0x1c6)?_0x1ec252(0x1d5):_0x20ab30,_0x28652f=_0x526d01[_0x2236fe];if(_0x28652f===undefined)throw CliErrors['validation'](_0x1ec252(0x1c9)+_0x20ab30);return{'ok':!![],'data':typeof _0x28652f===_0x1ec252(0x1c7)?_0x28652f:{[_0x2236fe]:_0x28652f},'message':typeof _0x28652f===_0x1ec252(0x1c7)?undefined:String(_0x28652f)};}export const configGetDefinition={'service':a59_0x482157(0x1c3),'command':a59_0x482157(0x1cf),'description':a59_0x482157(0x1d0),'risk':a59_0x482157(0x1cc),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a59_0x482157(0x1d7),'type':a59_0x482157(0x1d9),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a60_0x572e(){const _0x2e7a96=['4392DmbRIG','5LAZVOq','37358728nBuTEh','6091938kIsNQc','5192pbysfP','4947252QXbJCK','7451752BhCJrg','10DRacLb','4066904MIsGLP','338148CMOeMU','1NTUpkO'];a60_0x572e=function(){return _0x2e7a96;};return a60_0x572e();}function a60_0x48c7(_0x3bae23,_0x537911){_0x3bae23=_0x3bae23-0x161;const _0x572e7f=a60_0x572e();let _0x48c721=_0x572e7f[_0x3bae23];return _0x48c721;}(function(_0xaeb6b5,_0x5bb820){const _0x503d75=a60_0x48c7,_0x45f44e=_0xaeb6b5();while(!![]){try{const _0x5a0565=parseInt(_0x503d75(0x166))/0x1*(-parseInt(_0x503d75(0x165))/0x2)+-parseInt(_0x503d75(0x161))/0x3+parseInt(_0x503d75(0x164))/0x4*(-parseInt(_0x503d75(0x168))/0x5)+-parseInt(_0x503d75(0x16a))/0x6+parseInt(_0x503d75(0x162))/0x7+-parseInt(_0x503d75(0x16b))/0x8*(-parseInt(_0x503d75(0x167))/0x9)+parseInt(_0x503d75(0x163))/0xa*(parseInt(_0x503d75(0x169))/0xb);if(_0x5a0565===_0x5bb820)break;else _0x45f44e['push'](_0x45f44e['shift']());}catch(_0x42c495){_0x45f44e['push'](_0x45f44e['shift']());}}}(a60_0x572e,0xe2639));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';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x46e82b=a61_0x6dcb;(function(_0x42f5a0,_0x5da20e){const _0x29537f=a61_0x6dcb,_0x251d62=_0x42f5a0();while(!![]){try{const _0x846e1=parseInt(_0x29537f(0x1b2))/0x1+parseInt(_0x29537f(0x1b4))/0x2*(parseInt(_0x29537f(0x1e4))/0x3)+-parseInt(_0x29537f(0x1bc))/0x4+parseInt(_0x29537f(0x1d2))/0x5+-parseInt(_0x29537f(0x1c7))/0x6*(parseInt(_0x29537f(0x1ba))/0x7)+parseInt(_0x29537f(0x1c4))/0x8*(parseInt(_0x29537f(0x1d7))/0x9)+parseInt(_0x29537f(0x1c2))/0xa*(-parseInt(_0x29537f(0x1c9))/0xb);if(_0x846e1===_0x5da20e)break;else _0x251d62['push'](_0x251d62['shift']());}catch(_0x4b58ef){_0x251d62['push'](_0x251d62['shift']());}}}(a61_0x338d,0xa5c03));import{select}from'@inquirer/prompts';function a61_0x6dcb(_0x2e4522,_0x3bf1f2){_0x2e4522=_0x2e4522-0x1aa;const _0x338df7=a61_0x338d();let _0x6dcb2=_0x338df7[_0x2e4522];return _0x6dcb2;}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';function a61_0x338d(){const _0x47d84c=['Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','Custom\x20certificate\x20service\x20HTTPS\x20origin','3bHNGCX','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','cancelled','name','\x22\x20is\x20not\x20currently\x20available.','Custom\x20platform\x20API\x20HTTPS\x20origin','Select\x20Lovrabet\x20region','Custom\x20User\x20HTTPS\x20origin','validation','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','Available\x20regions:\x20','580498SZvXJk','assign','1953058AvWRxe','Custom\x20SkillHub\x20HTTPS\x20origin','map','local-domain','api-domain','runtime-domain','7skLAKc','certificate-domain','1862432pycAZL','kb-domain','join','manifestDomains','global','Independent-deployment\x20Domain\x20JSON\x20file','113240ORbhqu','user-domain','26024BlmLAo','region','domain-config','6290322FlRvPp','label','154IMgrXk','skill-domain','ExitPromptError','Custom\x20knowledge-base\x20HTTPS\x20origin','write','routing','independent','enterprise-v1','length','1207045muLBai','string','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','Official\x20Lovrabet\x20region:\x20','config','1530gmnFwf','keys','Custom\x20Runtime\x20HTTPS\x20origin','app-domain','cdn','mode','Custom\x20local\x20callback\x20HTTPS\x20origin','official','localDomain','domains','str'];a61_0x338d=function(){return _0x47d84c;};return a61_0x338d();}import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a61_0x46e82b(0x1c5),'type':a61_0x46e82b(0x1d3),'description':a61_0x46e82b(0x1d5)+ENABLED_LOVRABET_REGION_VALUES[a61_0x46e82b(0x1be)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a61_0x46e82b(0x1c6),'type':a61_0x46e82b(0x1d3),'description':a61_0x46e82b(0x1c1)},{'name':a61_0x46e82b(0x1c3),'type':a61_0x46e82b(0x1d3),'description':a61_0x46e82b(0x1ae)},{'name':a61_0x46e82b(0x1b8),'type':a61_0x46e82b(0x1d3),'description':a61_0x46e82b(0x1ac)},{'name':a61_0x46e82b(0x1b9),'type':a61_0x46e82b(0x1d3),'description':a61_0x46e82b(0x1d9)},{'name':a61_0x46e82b(0x1ca),'type':a61_0x46e82b(0x1d3),'description':a61_0x46e82b(0x1b5)},{'name':a61_0x46e82b(0x1bd),'type':'string','description':a61_0x46e82b(0x1cc)},{'name':'kb-service-domain','type':a61_0x46e82b(0x1d3),'description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'},{'name':a61_0x46e82b(0x1da),'type':a61_0x46e82b(0x1d3),'description':'Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin'},{'name':a61_0x46e82b(0x1b7),'type':a61_0x46e82b(0x1d3),'description':a61_0x46e82b(0x1dd)},{'name':a61_0x46e82b(0x1bb),'type':a61_0x46e82b(0x1d3),'description':a61_0x46e82b(0x1e3)}];async function resolveRegion(_0x517c54){const _0xb65cde=a61_0x46e82b,_0x564745=_0x517c54['str'](_0xb65cde(0x1c5));if(_0x564745){if(!isEnabledLovrabetRegion(_0x564745))throw CliErrors[_0xb65cde(0x1af)]('Region\x20\x22'+_0x564745+_0xb65cde(0x1ab),_0xb65cde(0x1b1)+ENABLED_LOVRABET_REGION_VALUES[_0xb65cde(0x1be)](',\x20'));return _0x564745;}if(_0x517c54['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0xb65cde(0x1ad),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0xb65cde(0x1b6)](_0xdbdb45=>({'name':getOfficialRoutingProfile(_0xdbdb45)[_0xb65cde(0x1c8)]+'\x20('+_0xdbdb45+')','value':_0xdbdb45}))});}catch(_0x4056c2){if(_0x4056c2?.[_0xb65cde(0x1aa)]===_0xb65cde(0x1cb))throw CliErrors[_0xb65cde(0x1e6)]();throw _0x4056c2;}}export async function executeConfigInit(_0x353da1){const _0x5c0b34=a61_0x46e82b,_0xea81cb=resolveDomainConfigInput(_0x353da1),_0x5c28dd=_0xea81cb[_0x5c0b34(0x1e0)],_0xabe1be=Object[_0x5c0b34(0x1d8)](_0x5c28dd)[_0x5c0b34(0x1d1)]>0x0;if(_0xabe1be&&_0x353da1[_0x5c0b34(0x1e1)](_0x5c0b34(0x1c5)))throw CliErrors['validation']('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');if(!!_0x5c28dd[_0x5c0b34(0x1df)]!==!!_0x5c28dd['certificateDomain'])throw CliErrors['validation'](_0x5c0b34(0x1e5));const _0x4102d4=_0x353da1['bool']('global')?_0x5c0b34(0x1c0):'project',_0x307841=readScopedConfig(_0x4102d4);for(const _0x314565 of DOMAIN_CONFIG_FIELDS)delete _0x307841[_0x314565];for(const _0x1771bf of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x307841[_0x1771bf];delete _0x307841[_0x5c0b34(0x1ce)];let _0x5cd479=null;if(_0xabe1be)delete _0x307841[_0x5c0b34(0x1c5)],_0xea81cb[_0x5c0b34(0x1dc)]===_0x5c0b34(0x1d0)?_0x307841['routing']={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0xea81cb[_0x5c0b34(0x1bf)],'cdn':_0xea81cb[_0x5c0b34(0x1db)]}:Object[_0x5c0b34(0x1b3)](_0x307841,_0x5c28dd);else{_0x5cd479=await resolveRegion(_0x353da1);if(_0x5cd479===DEFAULT_LOVRABET_REGION)delete _0x307841['region'];else _0x307841[_0x5c0b34(0x1c5)]=_0x5cd479;}return writeScopedConfig(_0x307841,_0x4102d4),{'ok':!![],'message':_0xabe1be?'Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20'+Object[_0x5c0b34(0x1d8)](_0xea81cb[_0x5c0b34(0x1dc)]==='enterprise-v1'?_0xea81cb['manifestDomains']:_0x5c28dd)[_0x5c0b34(0x1be)](',\x20')+'.':_0x5c0b34(0x1d4)+_0x5cd479+'.','data':{'mode':_0xabe1be?_0x5c0b34(0x1cf):_0x5c0b34(0x1de),'protocol':_0xea81cb[_0x5c0b34(0x1dc)]===_0x5c0b34(0x1d0)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x5cd479,'domains':_0x5c28dd,'cdn':_0xea81cb[_0x5c0b34(0x1dc)]===_0x5c0b34(0x1d0)?_0xea81cb['cdn']:undefined}};}export const configInitDefinition={'service':a61_0x46e82b(0x1d6),'command':'init','description':a61_0x46e82b(0x1b0),'risk':a61_0x46e82b(0x1cd),'confirmationDescription':a61_0x46e82b(0x1e2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a62_0x51d7(_0x3bce10,_0x2f9348){_0x3bce10=_0x3bce10-0xe7;const _0x3563fa=a62_0x3563();let _0x51d70b=_0x3563fa[_0x3bce10];return _0x51d70b;}const a62_0x2e4ff0=a62_0x51d7;(function(_0x55991a,_0xd6fe4a){const _0x33768e=a62_0x51d7,_0x539099=_0x55991a();while(!![]){try{const _0x17c149=-parseInt(_0x33768e(0xf4))/0x1*(parseInt(_0x33768e(0xe9))/0x2)+-parseInt(_0x33768e(0xf3))/0x3*(parseInt(_0x33768e(0xe8))/0x4)+parseInt(_0x33768e(0xf1))/0x5+-parseInt(_0x33768e(0xf0))/0x6+parseInt(_0x33768e(0xf6))/0x7*(-parseInt(_0x33768e(0xec))/0x8)+-parseInt(_0x33768e(0xef))/0x9*(-parseInt(_0x33768e(0xeb))/0xa)+parseInt(_0x33768e(0xed))/0xb;if(_0x17c149===_0xd6fe4a)break;else _0x539099['push'](_0x539099['shift']());}catch(_0x5887d0){_0x539099['push'](_0x539099['shift']());}}}(a62_0x3563,0x1e681));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a62_0x3563(){const _0x466ed8=['74998MDEVFq','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','12592REjwpc','10NGnWEV','boolean','2419060wsEsYb','136YFXNQA','2578455gEGZZy','list','9SYXVIG','358980lNgBew','643550exAhKC','global','138XGluMk','18740KqSgru','read'];a62_0x3563=function(){return _0x466ed8;};return a62_0x3563();}async function execute(_0x2c0e46){const _0x4cb62e=a62_0x51d7,_0xd50520=_0x2c0e46['bool'](_0x4cb62e(0xf2))?readScopedConfig(_0x4cb62e(0xf2)):readConfig();return{'ok':!![],'data':_0xd50520};}export const configListDefinition={'service':'config','command':a62_0x2e4ff0(0xee),'description':'List\x20all\x20config\x20values','risk':a62_0x2e4ff0(0xf5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x2e4ff0(0xf2),'type':a62_0x2e4ff0(0xea),'description':a62_0x2e4ff0(0xe7),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x345f34=a63_0x1015;(function(_0xb40884,_0x1c225b){const _0x376708=a63_0x1015,_0x5cd417=_0xb40884();while(!![]){try{const _0x13b9b4=-parseInt(_0x376708(0x108))/0x1+-parseInt(_0x376708(0xf6))/0x2+parseInt(_0x376708(0xf4))/0x3+parseInt(_0x376708(0x105))/0x4*(parseInt(_0x376708(0x103))/0x5)+-parseInt(_0x376708(0xe4))/0x6+-parseInt(_0x376708(0xe8))/0x7+parseInt(_0x376708(0xf8))/0x8;if(_0x13b9b4===_0x1c225b)break;else _0x5cd417['push'](_0x5cd417['shift']());}catch(_0x42d91a){_0x5cd417['push'](_0x5cd417['shift']());}}}(a63_0x5c81,0xc08b4));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';function a63_0x5c81(){const _0x14b048=['Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','1220106drHYEC','bool','2956656LCAOxa','object','25710992odeAcX','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','write','Usage:\x20','keys','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','\x20appcode\x20set\x20to:\x20','\x22\x20is\x20not\x20settable.','\x20workspace\x20add\x20<name>\x20--appcode\x20','validation','string','3598195PYcYNE','boolean','8iikNkb','Invalid\x20locale\x20value.','length','1289377DxyljR','Project','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Invalid\x20value\x20for\x20\x22','key','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20set\x20to:\x20','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','`,\x20`','join','Top-level\x20key\x20\x22','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','Missing\x20value.','riskLevel','8128374aFwwxR','value','locale','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','1041320pPaHYY','apps','Global','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','app','env','global','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','appcode','config','str'];a63_0x5c81=function(){return _0x14b048;};return a63_0x5c81();}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x29e069){const _0x5bdab2=a63_0x1015,_0x2847b4=_0x29e069[_0x5bdab2(0xf2)]('key'),_0x59d405=_0x29e069[_0x5bdab2(0xf2)]('value');if(!_0x2847b4)throw CliErrors[_0x5bdab2(0x101)]('Missing\x20key.',_0x5bdab2(0xfb)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x59d405===undefined||_0x59d405==='')throw CliErrors[_0x5bdab2(0x101)](_0x5bdab2(0x114),_0x5bdab2(0xfb)+CLI_BIN_NAME+_0x5bdab2(0xf9));let _0x35d8dc=_0x2847b4,_0x32e783=_0x59d405;if(_0x59d405[_0x5bdab2(0x107)]>0x1f4)throw CliErrors[_0x5bdab2(0x101)](_0x5bdab2(0xeb));if(_0x2847b4===_0x5bdab2(0xe3))throw CliErrors[_0x5bdab2(0x101)](_0x5bdab2(0x10d));if(!isTopLevelConfigKey(_0x2847b4))throw CliErrors[_0x5bdab2(0x101)](_0x5bdab2(0x112)+_0x2847b4+_0x5bdab2(0xff),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x2847b4]&&!CONFIG_ENUM_VALUES[_0x2847b4]['includes'](_0x59d405))throw CliErrors['validation'](_0x5bdab2(0x10b)+_0x2847b4+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x2847b4][_0x5bdab2(0x111)](',\x20'));if(_0x2847b4==='locale'&&!normalizeLocale(_0x59d405))throw CliErrors[_0x5bdab2(0x101)](_0x5bdab2(0x106),_0x5bdab2(0xe7));DOMAIN_CONFIG_FIELDS['includes'](_0x2847b4)&&(_0x32e783=normalizeDomainOrigin(_0x2847b4,_0x59d405));const _0x9f826f={'global':_0x29e069[_0x5bdab2(0xf5)](_0x5bdab2(0xee))},_0x542cf1=resolveWriteScope(_0x9f826f),_0x38a992=readScopedConfig(_0x542cf1);_0x2847b4===_0x5bdab2(0xec)&&(_0x35d8dc=_0x5bdab2(0xf0),delete _0x38a992['app']);_0x2847b4===_0x5bdab2(0xe6)&&(_0x32e783=normalizeLocale(_0x59d405));if(_0x2847b4==='env'){_0x32e783=normalizeEnv(_0x59d405);if(!isProduction(_0x32e783)&&!isDaily(_0x32e783))throw CliErrors[_0x5bdab2(0x101)](_0x5bdab2(0x10a),_0x5bdab2(0xfd));}if(_0x2847b4===_0x5bdab2(0xf0)){const _0x5e56f3=_0x38a992[_0x5bdab2(0xe9)]&&typeof _0x38a992[_0x5bdab2(0xe9)]===_0x5bdab2(0xf7)?Object[_0x5bdab2(0xfc)](_0x38a992['apps']):[];if(_0x5e56f3[_0x5bdab2(0x107)]>0x0)throw CliErrors[_0x5bdab2(0x101)](_0x5bdab2(0xf3),'Use\x20`'+CLI_BIN_NAME+_0x5bdab2(0x100)+_0x32e783+_0x5bdab2(0x110)+CLI_BIN_NAME+_0x5bdab2(0x10f));const _0x425103=buildCanonicalProjectConfig({..._0x38a992},{'appCodes':[_0x32e783],'env':typeof _0x38a992[_0x5bdab2(0xed)]===_0x5bdab2(0x102)?_0x38a992[_0x5bdab2(0xed)]:undefined});writeScopedConfig(_0x425103,_0x542cf1);const _0x3af037=_0x542cf1==='global'?'Global':_0x5bdab2(0x109);return{'ok':!![],'message':'✓\x20'+_0x3af037+_0x5bdab2(0xfe)+_0x32e783+_0x5bdab2(0x113)};}_0x38a992[_0x35d8dc]=_0x32e783,writeScopedConfig(_0x38a992,_0x542cf1);const _0x145e1d=_0x542cf1===_0x5bdab2(0xee)?_0x5bdab2(0xea):'Project';return{'ok':!![],'message':'✓\x20'+_0x145e1d+'\x20'+_0x35d8dc+_0x5bdab2(0x10e)+_0x32e783};}function a63_0x1015(_0x58c3f2,_0x59b995){_0x58c3f2=_0x58c3f2-0xe3;const _0x5c818e=a63_0x5c81();let _0x101582=_0x5c818e[_0x58c3f2];return _0x101582;}export const configSetDefinition={'service':a63_0x345f34(0xf1),'command':'set','description':'Set\x20a\x20config\x20value','risk':a63_0x345f34(0xfa),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a63_0x345f34(0x10c),'type':a63_0x345f34(0x102),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a63_0x345f34(0xe5),'type':a63_0x345f34(0x102),'description':'Config\x20value','required':!![]},{'name':a63_0x345f34(0xee),'type':a63_0x345f34(0x104),'description':a63_0x345f34(0xef),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x429818,_0x48de20){var _0x4edaab=a64_0x3668,_0x182ce2=_0x429818();while(!![]){try{var _0x17c296=-parseInt(_0x4edaab(0x19f))/0x1*(-parseInt(_0x4edaab(0x194))/0x2)+parseInt(_0x4edaab(0x196))/0x3*(parseInt(_0x4edaab(0x1a1))/0x4)+parseInt(_0x4edaab(0x197))/0x5*(-parseInt(_0x4edaab(0x193))/0x6)+parseInt(_0x4edaab(0x195))/0x7*(-parseInt(_0x4edaab(0x190))/0x8)+-parseInt(_0x4edaab(0x192))/0x9*(parseInt(_0x4edaab(0x1a0))/0xa)+-parseInt(_0x4edaab(0x19a))/0xb*(parseInt(_0x4edaab(0x198))/0xc)+-parseInt(_0x4edaab(0x19b))/0xd*(-parseInt(_0x4edaab(0x18f))/0xe);if(_0x17c296===_0x48de20)break;else _0x182ce2['push'](_0x182ce2['shift']());}catch(_0x55e37e){_0x182ce2['push'](_0x182ce2['shift']());}}}(a64_0x1536,0xb7f0f));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a64_0x3668(_0x5caeae,_0x4acc16){_0x5caeae=_0x5caeae-0x18f;var _0x1536dd=a64_0x1536();var _0x366848=_0x1536dd[_0x5caeae];return _0x366848;}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};export function resolveWriteScope(_0x59697c){var _0x146bf0=a64_0x3668;if(_0x59697c[_0x146bf0(0x19c)])return _0x146bf0(0x19c);if(!isInProject())throw CliErrors[_0x146bf0(0x191)](_0x146bf0(0x19e),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x146bf0(0x199));return _0x146bf0(0x19d);}export function readScopedConfig(_0x32574c){return readConfigFile(resolveWriteConfigPath(_0x32574c));}function a64_0x1536(){var _0x2a3d33=['3620502DsLKto','340QXeEhG','636CMSIxN','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','125796FHRBFf','1142310BQmSSH','global','project','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','49EhWpIx','30ocXBfG','4mGIhyK','196NqyDVJ','64TDjSZV','validation','1426842MdELlw','53892jTipfn','50438VKOxVr','1073471pDoZFV'];a64_0x1536=function(){return _0x2a3d33;};return a64_0x1536();}export function writeScopedConfig(_0x1a0d89,_0x378f5a){writeConfigFile(resolveWriteConfigPath(_0x378f5a),_0x1a0d89);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a64_0xa1ed64=a64_0x2821;(function(_0x31b2cc,_0x527b0b){const _0x136c0a=a64_0x2821,_0x23a8e3=_0x31b2cc();while(!![]){try{const _0x47e566=parseInt(_0x136c0a(0xad))/0x1+-parseInt(_0x136c0a(0x99))/0x2+parseInt(_0x136c0a(0x94))/0x3*(-parseInt(_0x136c0a(0xb2))/0x4)+parseInt(_0x136c0a(0xb4))/0x5*(parseInt(_0x136c0a(0x7c))/0x6)+-parseInt(_0x136c0a(0x82))/0x7+parseInt(_0x136c0a(0xba))/0x8+parseInt(_0x136c0a(0x80))/0x9;if(_0x47e566===_0x527b0b)break;else _0x23a8e3['push'](_0x23a8e3['shift']());}catch(_0x1888f1){_0x23a8e3['push'](_0x23a8e3['shift']());}}}(a64_0x24e5,0xa4edc));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set(['MANY_TO_ONE',a64_0xa1ed64(0xaa)]),SUPPORTED_FIELD_TYPES=new Set([a64_0xa1ed64(0xa9),a64_0xa1ed64(0xcb),a64_0xa1ed64(0xd3),'BOOLEAN',a64_0xa1ed64(0xd0),'MULTI_SELECT','DATE_RANGE','USER','ADDRESS',a64_0xa1ed64(0xcf)]);export function isDatasetBatchDesign(_0x4e9b51){const _0x245222=a64_0xa1ed64;return isObject(_0x4e9b51)&&_0x4e9b51['kind']===_0x245222(0xb3);}export function validateDatasetBatchDesign(_0xe5e9c0){const _0x33ed80=a64_0xa1ed64;(!isObject(_0xe5e9c0)||_0xe5e9c0[_0x33ed80(0x9e)]!==_0x33ed80(0xb3))&&fail(_0x33ed80(0x79));_0xe5e9c0['schemaVersion']!==0x1&&fail(_0x33ed80(0xc1));const _0x5ee68d=objectArray(_0xe5e9c0['datasets'],_0x33ed80(0x74),0x1,0x14),_0x10b6ff=objectArray(_0xe5e9c0[_0x33ed80(0x98)],_0x33ed80(0x98),0x0,0xc8),_0x46fa22=objectArray(_0xe5e9c0[_0x33ed80(0x9c)],'unresolvedRelations',0x0,0xc8),_0xc90793=new Set(),_0x5d793c=new Map();for(const [_0x25f940,_0x7df0e3]of _0x5ee68d[_0x33ed80(0x8f)]()){const _0x13c9ee=requiredString(_0x7df0e3['localKey'],_0x33ed80(0x75)+_0x25f940+_0x33ed80(0x9d));!LOCAL_KEY[_0x33ed80(0xa2)](_0x13c9ee)&&fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xd7)+LOCAL_KEY[_0x33ed80(0x8d)]+'.');_0xc90793[_0x33ed80(0x89)](_0x13c9ee)&&fail(_0x33ed80(0xbd));_0xc90793[_0x33ed80(0xbc)](_0x13c9ee);!isObject(_0x7df0e3[_0x33ed80(0xa4)])&&fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0x91));rejectServerDatasetIdentity(_0x7df0e3[_0x33ed80(0xa4)],_0x33ed80(0x75)+_0x25f940+_0x33ed80(0x87));if(!isObject(_0x7df0e3[_0x33ed80(0xa4)][_0x33ed80(0xd1)]))fail(_0x33ed80(0x75)+_0x25f940+'].design.dataset\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x7df0e3[_0x33ed80(0xa4)][_0x33ed80(0xd1)],_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xc2)),requiredString(_0x7df0e3['design'][_0x33ed80(0xd1)][_0x33ed80(0xcc)],_0x33ed80(0x75)+_0x25f940+'].design.dataset.datasetName');_0x33ed80(0x98)in _0x7df0e3[_0x33ed80(0xa4)]&&(!Array[_0x33ed80(0xa0)](_0x7df0e3['design'][_0x33ed80(0x98)])||_0x7df0e3[_0x33ed80(0xa4)][_0x33ed80(0x98)][_0x33ed80(0xa8)]!==0x0)&&fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xca));const _0x408464=objectArray(_0x7df0e3[_0x33ed80(0xa4)]['fields'],'datasets['+_0x25f940+_0x33ed80(0xd9),0x1,0xc8),_0x1a128b=new Map();for(const [_0x547752,_0x4f51f6]of _0x408464['entries']()){const _0x1f03ed=fieldName(_0x4f51f6);if(!_0x1f03ed)fail('datasets['+_0x25f940+_0x33ed80(0xc5)+_0x547752+_0x33ed80(0x76));const _0x2cde7a=_0x1f03ed['toLowerCase']();if(_0x1a128b[_0x33ed80(0x89)](_0x2cde7a))fail(_0x33ed80(0xc9)+_0x13c9ee+_0x33ed80(0xa6));const _0x45ba2e=stringValue(_0x4f51f6['type']??_0x4f51f6[_0x33ed80(0xb5)])[_0x33ed80(0x8b)]();if(!SUPPORTED_FIELD_TYPES[_0x33ed80(0x89)](_0x45ba2e))fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xc5)+_0x547752+_0x33ed80(0xd2));_0x1a128b[_0x33ed80(0x72)](_0x2cde7a,_0x45ba2e),[_0x4f51f6[_0x33ed80(0x9f)],_0x4f51f6[_0x33ed80(0x7d)],_0x4f51f6[_0x33ed80(0x8a)]][_0x33ed80(0xb0)](_0x5e576b=>stringValue(_0x5e576b))&&fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xc5)+_0x547752+']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.');}_0x5d793c[_0x33ed80(0x72)](_0x13c9ee,_0x1a128b);}const _0x4e1979=new Set(),_0x400457=new Set();for(const [_0x302b65,_0x344022]of _0x10b6ff[_0x33ed80(0x8f)]()){const _0xe43b4b=validateRelation(_0x344022,_0x302b65,_0xc90793,_0x5d793c);if(_0x4e1979['has'](_0xe43b4b))fail(_0x33ed80(0xa5));_0x4e1979[_0x33ed80(0xbc)](_0xe43b4b);const _0x3ca6d2=_0xe43b4b['split']('\x00',0x2)['join']('\x00');if(_0x400457[_0x33ed80(0x89)](_0x3ca6d2))fail(_0x33ed80(0xa3));_0x400457[_0x33ed80(0xbc)](_0x3ca6d2);}for(const [_0x5a04bc,_0x5c0a16]of _0x46fa22[_0x33ed80(0x8f)]()){requiredString(_0x5c0a16[_0x33ed80(0x81)],_0x33ed80(0xda)+_0x5a04bc+'].reason'),validateConfidence(_0x5c0a16[_0x33ed80(0x96)],'unresolvedRelations['+_0x5a04bc+_0x33ed80(0xc4));}return _0xe5e9c0;}export function reconcileBatchResult(_0x406fbe){const _0x4fc1f9=a64_0xa1ed64;if(!isObject(_0x406fbe))return null;try{const _0x350275=stringArray(_0x406fbe[_0x4fc1f9(0x84)],_0x4fc1f9(0x84),0x1,0x14),_0x352eec=new Set(_0x350275);if(_0x352eec[_0x4fc1f9(0x85)]!==_0x350275[_0x4fc1f9(0xa8)]||_0x350275[_0x4fc1f9(0xb0)](_0xf9d589=>!LOCAL_KEY[_0x4fc1f9(0xa2)](_0xf9d589)))return null;const _0xc6633c=objectArray(_0x406fbe[_0x4fc1f9(0xc0)],'createdDatasets',0x1,0x14),_0x37729c=new Map(),_0x461218=new Set();for(const _0x35478d of _0xc6633c){const _0x4b6646=requiredString(_0x35478d[_0x4fc1f9(0xa7)],_0x4fc1f9(0x97)),_0x2e9434=requiredString(_0x35478d[_0x4fc1f9(0xb6)]??_0x35478d[_0x4fc1f9(0xa1)],'createdDatasets[].code');if(_0x37729c['has'](_0x4b6646)||_0x461218[_0x4fc1f9(0x89)](_0x2e9434))return null;_0x37729c[_0x4fc1f9(0x72)](_0x4b6646,_0x2e9434),_0x461218['add'](_0x2e9434);}if(!sameSet(_0x352eec,new Set(_0x37729c[_0x4fc1f9(0xc3)]())))return null;const _0x57512f=objectArray(_0x406fbe[_0x4fc1f9(0xb1)],_0x4fc1f9(0xb1),0x0,0xc8),_0x24f6bf=objectArray(_0x406fbe['createdRelations'],'createdRelations',0x0,0xc8),_0x25b3fc=relationTupleSet(_0x57512f,![],_0x37729c),_0x204509=relationTupleSet(_0x24f6bf,!![],_0x37729c);if(!_0x25b3fc||!_0x204509||!sameSet(_0x25b3fc,_0x204509))return null;const _0x3caf75=objectArray(_0x406fbe[_0x4fc1f9(0x9c)],'unresolvedRelations',0x0,0xc8);return{'expectedLocalKeys':_0x350275,'expectedRelations':_0x57512f,'createdDatasets':_0xc6633c,'createdRelations':_0x24f6bf,'unresolvedRelations':_0x3caf75,...isObject(_0x406fbe[_0x4fc1f9(0xc8)])?{'metrics':_0x406fbe[_0x4fc1f9(0xc8)]}:{}};}catch{return null;}}function validateRelation(_0x2edf08,_0x54020a,_0x1de1b1,_0x58f28a){const _0x596567=a64_0xa1ed64,_0x21ee78=_0x596567(0x78)+_0x54020a+']',_0x35cb68=requiredString(_0x2edf08[_0x596567(0xae)],_0x21ee78+'.fromDatasetKey'),_0x55d687=requiredString(_0x2edf08[_0x596567(0x8c)],_0x21ee78+'.toDatasetKey'),_0x58c8d2=requiredString(_0x2edf08['fromField'],_0x21ee78+_0x596567(0x90))[_0x596567(0x9b)](),_0x49eb33=requiredString(_0x2edf08['toField'],_0x21ee78+_0x596567(0xce))[_0x596567(0x9b)]();if(!_0x1de1b1[_0x596567(0x89)](_0x35cb68)||!_0x1de1b1['has'](_0x55d687))fail(_0x21ee78+'\x20references\x20an\x20unknown\x20dataset\x20localKey.');const _0x5e1ae1=_0x58f28a['get'](_0x35cb68)?.[_0x596567(0xd5)](_0x58c8d2),_0x39e233=_0x58f28a[_0x596567(0xd5)](_0x55d687)?.[_0x596567(0xd5)](_0x49eb33);if(_0x5e1ae1===undefined||_0x39e233===undefined)fail(_0x21ee78+_0x596567(0x95));if(_0x5e1ae1&&_0x39e233&&_0x5e1ae1!==_0x39e233)fail(_0x21ee78+_0x596567(0xc7));const _0x2bc30c=stringValue(_0x2edf08[_0x596567(0x8e)])||'lookup';if(_0x2bc30c!==_0x596567(0xc6))fail(_0x21ee78+_0x596567(0x83));const _0x248c53=stringValue(_0x2edf08[_0x596567(0xb9)])||'MANY_TO_ONE';if(!SUPPORTED_CARDINALITIES[_0x596567(0x89)](_0x248c53))fail(_0x21ee78+'.cardinality\x20is\x20not\x20supported.');return requiredString(_0x2edf08[_0x596567(0x81)],_0x21ee78+_0x596567(0x92)),validateConfidence(_0x2edf08[_0x596567(0x96)],_0x21ee78+_0x596567(0x86)),tuple(_0x35cb68,_0x58c8d2,_0x55d687,_0x49eb33,_0x596567(0xc6),_0x248c53);}function relationTupleSet(_0x20f2ec,_0x2919f4,_0x182192){const _0x5389e6=a64_0xa1ed64,_0x4a7a41=new Set();for(const _0x21ddf0 of _0x20f2ec){const _0x166df6=stringValue(_0x21ddf0['fromDatasetKey']),_0xc44d80=stringValue(_0x21ddf0[_0x5389e6(0x8c)]),_0x152fb8=stringValue(_0x21ddf0[_0x5389e6(0x7f)])[_0x5389e6(0x9b)](),_0x5e2b08=stringValue(_0x21ddf0[_0x5389e6(0xcd)])[_0x5389e6(0x9b)](),_0x39cad1=stringValue(_0x21ddf0['relationType']),_0x5ab79c=stringValue(_0x21ddf0[_0x5389e6(0xb9)]);if(!_0x166df6||!_0xc44d80||!_0x152fb8||!_0x5e2b08||_0x39cad1!==_0x5389e6(0xc6)||!SUPPORTED_CARDINALITIES[_0x5389e6(0x89)](_0x5ab79c))return null;if(!_0x182192['has'](_0x166df6)||!_0x182192[_0x5389e6(0x89)](_0xc44d80))return null;if(_0x2919f4&&(stringValue(_0x21ddf0[_0x5389e6(0xd6)])!==_0x182192[_0x5389e6(0xd5)](_0x166df6)||stringValue(_0x21ddf0[_0x5389e6(0xbf)])!==_0x182192[_0x5389e6(0xd5)](_0xc44d80)))return null;const _0x580481=tuple(_0x166df6,_0x152fb8,_0xc44d80,_0x5e2b08,_0x39cad1,_0x5ab79c);if(_0x4a7a41[_0x5389e6(0x89)](_0x580481))return null;_0x4a7a41[_0x5389e6(0xbc)](_0x580481);}return _0x4a7a41;}function rejectServerDatasetIdentity(_0x3d2a22,_0xc6de){const _0x1795d=a64_0xa1ed64;for(const _0x509ed6 of['id',_0x1795d(0xb8),_0x1795d(0xaf),_0x1795d(0xb6),_0x1795d(0xa1),_0x1795d(0xd8)]){if(_0x3d2a22[_0x509ed6]!==undefined&&_0x3d2a22[_0x509ed6]!==null&&_0x3d2a22[_0x509ed6]!=='')fail(_0xc6de+'.'+_0x509ed6+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function objectArray(_0x1eeb9e,_0x1ebe97,_0x409296,_0x42ae37){const _0x56edca=a64_0xa1ed64;return(!Array['isArray'](_0x1eeb9e)||_0x1eeb9e[_0x56edca(0xa8)]<_0x409296||_0x1eeb9e['length']>_0x42ae37||_0x1eeb9e['some'](_0x3388d7=>!isObject(_0x3388d7)))&&fail(_0x1ebe97+'\x20must\x20contain\x20'+_0x409296+'..'+_0x42ae37+_0x56edca(0x93)),_0x1eeb9e;}function stringArray(_0x3bf14b,_0x2fc5be,_0x7b9313,_0x236807){const _0x5cbd95=a64_0xa1ed64;return(!Array[_0x5cbd95(0xa0)](_0x3bf14b)||_0x3bf14b[_0x5cbd95(0xa8)]<_0x7b9313||_0x3bf14b[_0x5cbd95(0xa8)]>_0x236807||_0x3bf14b[_0x5cbd95(0xb0)](_0x58a77f=>typeof _0x58a77f!==_0x5cbd95(0x73)||!_0x58a77f['trim']()))&&fail(_0x2fc5be+_0x5cbd95(0xb7)+_0x7b9313+'..'+_0x236807+_0x5cbd95(0x77)),_0x3bf14b;}function requiredString(_0x52516c,_0x58bc83){const _0x328077=a64_0xa1ed64,_0x3beba8=stringValue(_0x52516c);if(!_0x3beba8)fail(_0x58bc83+_0x328077(0x7a));return _0x3beba8;}function stringValue(_0x153b60){const _0x4547fd=a64_0xa1ed64;return typeof _0x153b60===_0x4547fd(0x73)?_0x153b60['trim']():'';}function fieldName(_0x54dd60){const _0x154574=a64_0xa1ed64;return stringValue(_0x54dd60[_0x154574(0xb6)]??_0x54dd60[_0x154574(0x7b)]??_0x54dd60[_0x154574(0xac)]??_0x54dd60[_0x154574(0x88)]);}function validateConfidence(_0x3500e6,_0x9361e8){const _0x50d551=a64_0xa1ed64;_0x3500e6!==undefined&&_0x3500e6!==null&&(typeof _0x3500e6!=='number'||!Number['isFinite'](_0x3500e6)||_0x3500e6<0x0||_0x3500e6>0x1)&&fail(_0x9361e8+_0x50d551(0xd4));}function tuple(..._0x2c1994){const _0x5c7286=a64_0xa1ed64;return _0x2c1994[_0x5c7286(0x9a)]((_0x3757e1,_0x17b78a)=>_0x17b78a===0x1||_0x17b78a===0x3?_0x3757e1[_0x5c7286(0x9b)]():_0x3757e1)[_0x5c7286(0x7e)]('\x00');}function a64_0x2821(_0x1a9e5c,_0x1db459){_0x1a9e5c=_0x1a9e5c-0x72;const _0x24e581=a64_0x24e5();let _0x282116=_0x24e581[_0x1a9e5c];return _0x282116;}function sameSet(_0x562500,_0x1bd426){const _0x346536=a64_0xa1ed64;return _0x562500[_0x346536(0x85)]===_0x1bd426[_0x346536(0x85)]&&[..._0x562500][_0x346536(0xbb)](_0x5dea6f=>_0x1bd426[_0x346536(0x89)](_0x5dea6f));}function isObject(_0x83fb7c){const _0x3ebd0e=a64_0xa1ed64;return typeof _0x83fb7c===_0x3ebd0e(0xbe)&&_0x83fb7c!==null&&!Array[_0x3ebd0e(0xa0)](_0x83fb7c);}function fail(_0x500677){const _0x2fce81=a64_0xa1ed64;throw CliErrors[_0x2fce81(0xab)](_0x500677);}function a64_0x24e5(){const _0x55598d=['name','206543KaFXkR','fromDatasetKey','modelId','some','expectedRelations','4DIOQRP','dataset-batch','3357240tMBfbj','fieldType','code','\x20must\x20contain\x20','datasetId','cardinality','483200bzHLxL','every','add','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','object','toDatasetCode','createdDatasets','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','].design.dataset','keys','].confidence','].design.fields[','lookup','\x20connects\x20incompatible\x20field\x20types.','metrics','Dataset\x20','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','NUMBER','datasetName','toField','.toField','UPLOAD','SELECT','dataset','].type\x20is\x20not\x20supported.','DATETIME','\x20must\x20be\x20between\x200\x20and\x201.','get','fromDatasetCode','].localKey\x20must\x20match\x20','modelCode','].design.fields','unresolvedRelations[','set','string','datasets','datasets[',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','\x20non-empty\x20strings.','relations[','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','\x20is\x20required.','fieldCode','12RXnMiE','refTableField','join','fromField','9721512qyCBuG','reason','5859994ZcXvbW','.relationType\x20must\x20be\x20\x22lookup\x22.','expectedLocalKeys','size','.confidence','].design','fieldName','has','refTableLabelField','toUpperCase','toDatasetKey','source','relationType','entries','.fromField','].design\x20must\x20be\x20an\x20object.','.reason','\x20objects.','2218164NmifWD','\x20references\x20an\x20unknown\x20field.','confidence','createdDatasets[].localKey','relations','875858OjWRHP','map','toLowerCase','unresolvedRelations','].localKey','kind','refTable','isArray','datasetCode','test','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','design','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','localKey','length','TEXT','ONE_TO_ONE','validation'];a64_0x24e5=function(){return _0x55598d;};return a64_0x24e5();}
|
|
1
|
+
const a65_0x1ccab1=a65_0x10be;function a65_0x10be(_0x3ce7b3,_0x3196d2){_0x3ce7b3=_0x3ce7b3-0x8c;const _0x1a8ca2=a65_0x1a8c();let _0x10bea0=_0x1a8ca2[_0x3ce7b3];return _0x10bea0;}(function(_0x43b931,_0x283fe6){const _0x28a251=a65_0x10be,_0x8b373e=_0x43b931();while(!![]){try{const _0x352f03=-parseInt(_0x28a251(0xb0))/0x1*(-parseInt(_0x28a251(0xf6))/0x2)+-parseInt(_0x28a251(0xde))/0x3+parseInt(_0x28a251(0xf4))/0x4*(-parseInt(_0x28a251(0xa0))/0x5)+-parseInt(_0x28a251(0x99))/0x6+-parseInt(_0x28a251(0xa3))/0x7*(parseInt(_0x28a251(0xe5))/0x8)+-parseInt(_0x28a251(0xa7))/0x9*(parseInt(_0x28a251(0xa9))/0xa)+parseInt(_0x28a251(0x97))/0xb*(parseInt(_0x28a251(0xf9))/0xc);if(_0x352f03===_0x283fe6)break;else _0x8b373e['push'](_0x8b373e['shift']());}catch(_0x367c7d){_0x8b373e['push'](_0x8b373e['shift']());}}}(a65_0x1a8c,0xd890a));function a65_0x1a8c(){const _0xc4d2c7=['object','.fromDatasetKey','unresolvedRelations','fromDatasetKey','fromField',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','\x20must\x20contain\x20','MULTI_SELECT','].design\x20must\x20be\x20an\x20object.','entries','2188FRueAN','.fromField','830tUPdBr','datasetCode','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','120hJKISt','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','].confidence','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','some','\x20references\x20an\x20unknown\x20dataset\x20localKey.','set','string','length','createdRelations','code','\x20connects\x20incompatible\x20field\x20types.','5983153MIRSjF','].type\x20is\x20not\x20supported.','10534728idGgHq','cardinality','USER','test','SELECT','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','reason','5165uLJjVB','relations[','\x20references\x20an\x20unknown\x20field.','2874151YgaUsX','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','metrics','isArray','2110302WkMciu','toLowerCase','60xrkYug','fieldName','].design','source','modelId','refTableField','\x20objects.','3289ouxUQM','MANY_TO_ONE','design','refTableLabelField','trim','name','fieldCode','relationType','size','DATETIME','number','datasetId','datasets[','expectedRelations','refTable','split','isFinite','toDatasetKey','join','localKey','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','keys','createdDatasets[].code','].design.dataset\x20must\x20be\x20an\x20object.','datasets','ADDRESS','toUpperCase',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','.toField','.relationType\x20must\x20be\x20\x22lookup\x22.','get','\x20non-empty\x20strings.','add','expectedLocalKeys','.cardinality\x20is\x20not\x20supported.','kind','NUMBER','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','BOOLEAN','].design.fields','dataset-batch','toField','].localKey\x20must\x20match\x20','dataset','.reason','confidence','4104666SMMZev','datasetName','UPLOAD','relations','every','type','lookup','16WXjvWA','].design.fields[','validation','fromDatasetCode','has'];a65_0x1a8c=function(){return _0xc4d2c7;};return a65_0x1a8c();}import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x1ccab1(0xb1),'ONE_TO_ONE']),SUPPORTED_FIELD_TYPES=new Set(['TEXT',a65_0x1ccab1(0xd4),a65_0x1ccab1(0xb9),a65_0x1ccab1(0xd6),a65_0x1ccab1(0x9d),a65_0x1ccab1(0xf1),'DATE_RANGE',a65_0x1ccab1(0x9b),a65_0x1ccab1(0xc9),a65_0x1ccab1(0xe0)]);export function isDatasetBatchDesign(_0x73dac9){const _0x36c04d=a65_0x1ccab1;return isObject(_0x73dac9)&&_0x73dac9[_0x36c04d(0xd3)]===_0x36c04d(0xd8);}export function validateDatasetBatchDesign(_0x40d035){const _0x3d8c33=a65_0x1ccab1;(!isObject(_0x40d035)||_0x40d035[_0x3d8c33(0xd3)]!==_0x3d8c33(0xd8))&&fail('Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.');_0x40d035['schemaVersion']!==0x1&&fail(_0x3d8c33(0xa4));const _0x1b054d=objectArray(_0x40d035['datasets'],_0x3d8c33(0xc8),0x1,0x14),_0x185bfc=objectArray(_0x40d035[_0x3d8c33(0xe1)],_0x3d8c33(0xe1),0x0,0xc8),_0x159945=objectArray(_0x40d035[_0x3d8c33(0xec)],'unresolvedRelations',0x0,0xc8),_0x38bc44=new Set(),_0x4982c6=new Map();for(const [_0x2494ee,_0x1c7a67]of _0x1b054d[_0x3d8c33(0xf3)]()){const _0x97cc8c=requiredString(_0x1c7a67[_0x3d8c33(0xc3)],_0x3d8c33(0xbc)+_0x2494ee+'].localKey');!LOCAL_KEY[_0x3d8c33(0x9c)](_0x97cc8c)&&fail('datasets['+_0x2494ee+_0x3d8c33(0xda)+LOCAL_KEY[_0x3d8c33(0xac)]+'.');_0x38bc44[_0x3d8c33(0xe9)](_0x97cc8c)&&fail(_0x3d8c33(0x8c));_0x38bc44[_0x3d8c33(0xd0)](_0x97cc8c);!isObject(_0x1c7a67[_0x3d8c33(0xb2)])&&fail('datasets['+_0x2494ee+_0x3d8c33(0xf2));rejectServerDatasetIdentity(_0x1c7a67['design'],_0x3d8c33(0xbc)+_0x2494ee+_0x3d8c33(0xab));if(!isObject(_0x1c7a67['design'][_0x3d8c33(0xdb)]))fail('datasets['+_0x2494ee+_0x3d8c33(0xc7));rejectServerDatasetIdentity(_0x1c7a67['design'][_0x3d8c33(0xdb)],_0x3d8c33(0xbc)+_0x2494ee+'].design.dataset'),requiredString(_0x1c7a67['design'][_0x3d8c33(0xdb)][_0x3d8c33(0xdf)],_0x3d8c33(0xbc)+_0x2494ee+'].design.dataset.datasetName');_0x3d8c33(0xe1)in _0x1c7a67[_0x3d8c33(0xb2)]&&(!Array[_0x3d8c33(0xa6)](_0x1c7a67[_0x3d8c33(0xb2)]['relations'])||_0x1c7a67[_0x3d8c33(0xb2)][_0x3d8c33(0xe1)][_0x3d8c33(0x93)]!==0x0)&&fail(_0x3d8c33(0xbc)+_0x2494ee+_0x3d8c33(0xd5));const _0x4306e1=objectArray(_0x1c7a67[_0x3d8c33(0xb2)]['fields'],'datasets['+_0x2494ee+_0x3d8c33(0xd7),0x1,0xc8),_0xd981be=new Map();for(const [_0x2d81c3,_0x356ff8]of _0x4306e1[_0x3d8c33(0xf3)]()){const _0x15a3a1=fieldName(_0x356ff8);if(!_0x15a3a1)fail('datasets['+_0x2494ee+_0x3d8c33(0xe6)+_0x2d81c3+_0x3d8c33(0xcb));const _0x3adfe4=_0x15a3a1['toLowerCase']();if(_0xd981be[_0x3d8c33(0xe9)](_0x3adfe4))fail('Dataset\x20'+_0x97cc8c+_0x3d8c33(0xf8));const _0x114db8=stringValue(_0x356ff8[_0x3d8c33(0xe3)]??_0x356ff8['fieldType'])[_0x3d8c33(0xca)]();if(!SUPPORTED_FIELD_TYPES['has'](_0x114db8))fail(_0x3d8c33(0xbc)+_0x2494ee+_0x3d8c33(0xe6)+_0x2d81c3+_0x3d8c33(0x98));_0xd981be['set'](_0x3adfe4,_0x114db8),[_0x356ff8[_0x3d8c33(0xbe)],_0x356ff8[_0x3d8c33(0xae)],_0x356ff8[_0x3d8c33(0xb3)]][_0x3d8c33(0x8f)](_0x1fa539=>stringValue(_0x1fa539))&&fail(_0x3d8c33(0xbc)+_0x2494ee+_0x3d8c33(0xe6)+_0x2d81c3+_0x3d8c33(0xef));}_0x4982c6[_0x3d8c33(0x91)](_0x97cc8c,_0xd981be);}const _0x56e8c1=new Set(),_0xb294c0=new Set();for(const [_0x4ab537,_0x3addd2]of _0x185bfc[_0x3d8c33(0xf3)]()){const _0x2de304=validateRelation(_0x3addd2,_0x4ab537,_0x38bc44,_0x4982c6);if(_0x56e8c1[_0x3d8c33(0xe9)](_0x2de304))fail(_0x3d8c33(0x9e));_0x56e8c1[_0x3d8c33(0xd0)](_0x2de304);const _0x28a1d0=_0x2de304[_0x3d8c33(0xbf)]('\x00',0x2)[_0x3d8c33(0xc2)]('\x00');if(_0xb294c0[_0x3d8c33(0xe9)](_0x28a1d0))fail(_0x3d8c33(0x8e));_0xb294c0['add'](_0x28a1d0);}for(const [_0x3661eb,_0x50cf32]of _0x159945[_0x3d8c33(0xf3)]()){requiredString(_0x50cf32[_0x3d8c33(0x9f)],'unresolvedRelations['+_0x3661eb+'].reason'),validateConfidence(_0x50cf32[_0x3d8c33(0xdd)],'unresolvedRelations['+_0x3661eb+_0x3d8c33(0x8d));}return _0x40d035;}export function reconcileBatchResult(_0xb5555d){const _0x33e85c=a65_0x1ccab1;if(!isObject(_0xb5555d))return null;try{const _0x1c2356=stringArray(_0xb5555d[_0x33e85c(0xd1)],_0x33e85c(0xd1),0x1,0x14),_0x1108b6=new Set(_0x1c2356);if(_0x1108b6[_0x33e85c(0xb8)]!==_0x1c2356[_0x33e85c(0x93)]||_0x1c2356[_0x33e85c(0x8f)](_0x5fad19=>!LOCAL_KEY[_0x33e85c(0x9c)](_0x5fad19)))return null;const _0x5b14df=objectArray(_0xb5555d['createdDatasets'],'createdDatasets',0x1,0x14),_0xe243d0=new Map(),_0x4f76ad=new Set();for(const _0x54f549 of _0x5b14df){const _0x501871=requiredString(_0x54f549['localKey'],'createdDatasets[].localKey'),_0x2e2326=requiredString(_0x54f549['code']??_0x54f549[_0x33e85c(0xf7)],_0x33e85c(0xc6));if(_0xe243d0[_0x33e85c(0xe9)](_0x501871)||_0x4f76ad[_0x33e85c(0xe9)](_0x2e2326))return null;_0xe243d0['set'](_0x501871,_0x2e2326),_0x4f76ad['add'](_0x2e2326);}if(!sameSet(_0x1108b6,new Set(_0xe243d0[_0x33e85c(0xc5)]())))return null;const _0x3a02cf=objectArray(_0xb5555d[_0x33e85c(0xbd)],_0x33e85c(0xbd),0x0,0xc8),_0x37ed37=objectArray(_0xb5555d[_0x33e85c(0x94)],_0x33e85c(0x94),0x0,0xc8),_0x39cc5d=relationTupleSet(_0x3a02cf,![],_0xe243d0),_0x3ffab4=relationTupleSet(_0x37ed37,!![],_0xe243d0);if(!_0x39cc5d||!_0x3ffab4||!sameSet(_0x39cc5d,_0x3ffab4))return null;const _0x5afca8=objectArray(_0xb5555d[_0x33e85c(0xec)],_0x33e85c(0xec),0x0,0xc8);return{'expectedLocalKeys':_0x1c2356,'expectedRelations':_0x3a02cf,'createdDatasets':_0x5b14df,'createdRelations':_0x37ed37,'unresolvedRelations':_0x5afca8,...isObject(_0xb5555d[_0x33e85c(0xa5)])?{'metrics':_0xb5555d[_0x33e85c(0xa5)]}:{}};}catch{return null;}}function validateRelation(_0x26f9de,_0x39b1c0,_0x34ca50,_0x44cc43){const _0x364ab0=a65_0x1ccab1,_0x1a2ce2=_0x364ab0(0xa1)+_0x39b1c0+']',_0x4e6c63=requiredString(_0x26f9de[_0x364ab0(0xed)],_0x1a2ce2+_0x364ab0(0xeb)),_0x98573d=requiredString(_0x26f9de['toDatasetKey'],_0x1a2ce2+'.toDatasetKey'),_0x56454b=requiredString(_0x26f9de[_0x364ab0(0xee)],_0x1a2ce2+_0x364ab0(0xf5))[_0x364ab0(0xa8)](),_0x115654=requiredString(_0x26f9de[_0x364ab0(0xd9)],_0x1a2ce2+_0x364ab0(0xcc))[_0x364ab0(0xa8)]();if(!_0x34ca50[_0x364ab0(0xe9)](_0x4e6c63)||!_0x34ca50[_0x364ab0(0xe9)](_0x98573d))fail(_0x1a2ce2+_0x364ab0(0x90));const _0x17be82=_0x44cc43[_0x364ab0(0xce)](_0x4e6c63)?.[_0x364ab0(0xce)](_0x56454b),_0x5be083=_0x44cc43['get'](_0x98573d)?.[_0x364ab0(0xce)](_0x115654);if(_0x17be82===undefined||_0x5be083===undefined)fail(_0x1a2ce2+_0x364ab0(0xa2));if(_0x17be82&&_0x5be083&&_0x17be82!==_0x5be083)fail(_0x1a2ce2+_0x364ab0(0x96));const _0x4df297=stringValue(_0x26f9de[_0x364ab0(0xb7)])||_0x364ab0(0xe4);if(_0x4df297!==_0x364ab0(0xe4))fail(_0x1a2ce2+_0x364ab0(0xcd));const _0x59460e=stringValue(_0x26f9de[_0x364ab0(0x9a)])||'MANY_TO_ONE';if(!SUPPORTED_CARDINALITIES[_0x364ab0(0xe9)](_0x59460e))fail(_0x1a2ce2+_0x364ab0(0xd2));return requiredString(_0x26f9de['reason'],_0x1a2ce2+_0x364ab0(0xdc)),validateConfidence(_0x26f9de[_0x364ab0(0xdd)],_0x1a2ce2+'.confidence'),tuple(_0x4e6c63,_0x56454b,_0x98573d,_0x115654,'lookup',_0x59460e);}function relationTupleSet(_0xd86290,_0x28de7a,_0x8e10d0){const _0xf8ddda=a65_0x1ccab1,_0x375697=new Set();for(const _0xb08df1 of _0xd86290){const _0x49689b=stringValue(_0xb08df1['fromDatasetKey']),_0x377405=stringValue(_0xb08df1[_0xf8ddda(0xc1)]),_0x16bda3=stringValue(_0xb08df1[_0xf8ddda(0xee)])[_0xf8ddda(0xa8)](),_0x268271=stringValue(_0xb08df1[_0xf8ddda(0xd9)])['toLowerCase'](),_0x16f8a2=stringValue(_0xb08df1[_0xf8ddda(0xb7)]),_0x429c26=stringValue(_0xb08df1['cardinality']);if(!_0x49689b||!_0x377405||!_0x16bda3||!_0x268271||_0x16f8a2!=='lookup'||!SUPPORTED_CARDINALITIES[_0xf8ddda(0xe9)](_0x429c26))return null;if(!_0x8e10d0['has'](_0x49689b)||!_0x8e10d0['has'](_0x377405))return null;if(_0x28de7a&&(stringValue(_0xb08df1[_0xf8ddda(0xe8)])!==_0x8e10d0[_0xf8ddda(0xce)](_0x49689b)||stringValue(_0xb08df1['toDatasetCode'])!==_0x8e10d0[_0xf8ddda(0xce)](_0x377405)))return null;const _0x17ff0b=tuple(_0x49689b,_0x16bda3,_0x377405,_0x268271,_0x16f8a2,_0x429c26);if(_0x375697[_0xf8ddda(0xe9)](_0x17ff0b))return null;_0x375697['add'](_0x17ff0b);}return _0x375697;}function rejectServerDatasetIdentity(_0x4d2242,_0x2a4d0e){const _0x4b99b6=a65_0x1ccab1;for(const _0x355186 of['id',_0x4b99b6(0xbb),_0x4b99b6(0xad),_0x4b99b6(0x95),_0x4b99b6(0xf7),'modelCode']){if(_0x4d2242[_0x355186]!==undefined&&_0x4d2242[_0x355186]!==null&&_0x4d2242[_0x355186]!=='')fail(_0x2a4d0e+'.'+_0x355186+_0x4b99b6(0xc4));}}function objectArray(_0x465807,_0x18cb44,_0x40512f,_0x6883ea){const _0x4138df=a65_0x1ccab1;return(!Array[_0x4138df(0xa6)](_0x465807)||_0x465807[_0x4138df(0x93)]<_0x40512f||_0x465807[_0x4138df(0x93)]>_0x6883ea||_0x465807['some'](_0x3c726a=>!isObject(_0x3c726a)))&&fail(_0x18cb44+_0x4138df(0xf0)+_0x40512f+'..'+_0x6883ea+_0x4138df(0xaf)),_0x465807;}function stringArray(_0x4f8763,_0x6ea620,_0x32defa,_0x4243fc){const _0x33bb64=a65_0x1ccab1;return(!Array[_0x33bb64(0xa6)](_0x4f8763)||_0x4f8763['length']<_0x32defa||_0x4f8763[_0x33bb64(0x93)]>_0x4243fc||_0x4f8763[_0x33bb64(0x8f)](_0x3fca8a=>typeof _0x3fca8a!==_0x33bb64(0x92)||!_0x3fca8a[_0x33bb64(0xb4)]()))&&fail(_0x6ea620+'\x20must\x20contain\x20'+_0x32defa+'..'+_0x4243fc+_0x33bb64(0xcf)),_0x4f8763;}function requiredString(_0x5952fa,_0x4aa614){const _0x2c3319=stringValue(_0x5952fa);if(!_0x2c3319)fail(_0x4aa614+'\x20is\x20required.');return _0x2c3319;}function stringValue(_0x2417e1){const _0x3f5a72=a65_0x1ccab1;return typeof _0x2417e1===_0x3f5a72(0x92)?_0x2417e1[_0x3f5a72(0xb4)]():'';}function fieldName(_0x45a4c4){const _0x538b4a=a65_0x1ccab1;return stringValue(_0x45a4c4[_0x538b4a(0x95)]??_0x45a4c4[_0x538b4a(0xb6)]??_0x45a4c4[_0x538b4a(0xb5)]??_0x45a4c4[_0x538b4a(0xaa)]);}function validateConfidence(_0x223525,_0x280917){const _0x3897f5=a65_0x1ccab1;_0x223525!==undefined&&_0x223525!==null&&(typeof _0x223525!==_0x3897f5(0xba)||!Number[_0x3897f5(0xc0)](_0x223525)||_0x223525<0x0||_0x223525>0x1)&&fail(_0x280917+'\x20must\x20be\x20between\x200\x20and\x201.');}function tuple(..._0x17e706){const _0x174515=a65_0x1ccab1;return _0x17e706['map']((_0x5b5685,_0x126627)=>_0x126627===0x1||_0x126627===0x3?_0x5b5685[_0x174515(0xa8)]():_0x5b5685)[_0x174515(0xc2)]('\x00');}function sameSet(_0x2b8170,_0x5df1c1){const _0x531899=a65_0x1ccab1;return _0x2b8170['size']===_0x5df1c1[_0x531899(0xb8)]&&[..._0x2b8170][_0x531899(0xe2)](_0xd90e31=>_0x5df1c1[_0x531899(0xe9)](_0xd90e31));}function isObject(_0x39b0c1){const _0x4a59e5=a65_0x1ccab1;return typeof _0x39b0c1===_0x4a59e5(0xea)&&_0x39b0c1!==null&&!Array[_0x4a59e5(0xa6)](_0x39b0c1);}function fail(_0x2a48c0){const _0x26a4d2=a65_0x1ccab1;throw CliErrors[_0x26a4d2(0xe7)](_0x2a48c0);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x3015e4=a65_0x2b46;(function(_0xc56e29,_0x484b5f){const _0x13830b=a65_0x2b46,_0x397c76=_0xc56e29();while(!![]){try{const _0x305afe=-parseInt(_0x13830b(0xd6))/0x1+parseInt(_0x13830b(0x11a))/0x2*(-parseInt(_0x13830b(0x108))/0x3)+-parseInt(_0x13830b(0x11b))/0x4*(-parseInt(_0x13830b(0xda))/0x5)+-parseInt(_0x13830b(0xf2))/0x6*(parseInt(_0x13830b(0xec))/0x7)+-parseInt(_0x13830b(0x104))/0x8+-parseInt(_0x13830b(0xea))/0x9+-parseInt(_0x13830b(0x10c))/0xa*(-parseInt(_0x13830b(0x116))/0xb);if(_0x305afe===_0x484b5f)break;else _0x397c76['push'](_0x397c76['shift']());}catch(_0x539277){_0x397c76['push'](_0x397c76['shift']());}}}(a65_0x4e65,0x69ca5));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=a65_0x3015e4(0x119),UNGROUPED_BUSINESS_GROUP=a65_0x3015e4(0x10f);function a65_0x2b46(_0x4cb75b,_0x24699d){_0x4cb75b=_0x4cb75b-0xcf;const _0x4e6558=a65_0x4e65();let _0x2b4631=_0x4e6558[_0x4cb75b];return _0x2b4631;}export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x46d425,input:_0x52788f,dryRun:_0x3c8d65}){const _0x65bd61=a65_0x3015e4;validateInput(_0x52788f);const _0x276174=normalizeBusinessGroupArgument(_0x52788f[_0x65bd61(0xe3)]),_0x2cb119=await getDatasetDetail(_0x52788f[_0x65bd61(0x110)]),_0x370169=resolveBusinessGroupDataset(_0x2cb119,_0x52788f[_0x65bd61(0x110)]);assertBusinessGroupUpdateSupported(_0x370169,_0x276174);const _0x68f523=loadCurrentBusinessGroup(_0x2cb119,_0x370169);assertExpectedBusinessGroup(_0x68f523,_0x52788f[_0x65bd61(0xd7)]);const _0x463754=buildBackendPlan(_0x46d425,_0x370169,_0x276174),_0x53ee2f=_0x68f523!==_0x276174;let _0x26ff93;if(_0x53ee2f&&!_0x3c8d65){_0x463754[_0x65bd61(0x10b)]===_0x65bd61(0x112)?await updateDbTableBusinessGroup(_0x463754['payload']):await updateErBusinessGroup(_0x463754[_0x65bd61(0xd4)]);const _0x4605d5=await getDatasetDetail(_0x370169[_0x65bd61(0x110)]),_0x324367=resolveBusinessGroupDataset(_0x4605d5,_0x370169[_0x65bd61(0x110)]),_0x27f12d=loadCurrentBusinessGroup(_0x4605d5,_0x324367);if(_0x27f12d!==_0x276174)throw CliErrors[_0x65bd61(0x109)](_0x65bd61(0xf8),_0x65bd61(0xe9)+JSON['stringify'](displayBusinessGroup(_0x276174))+_0x65bd61(0xee)+JSON[_0x65bd61(0xff)](displayBusinessGroup(_0x27f12d))+'.');_0x26ff93={'verified':!![],'status':_0x65bd61(0xcf),'afterReadback':{'businessGroup':displayBusinessGroup(_0x27f12d)}};}else!_0x53ee2f&&(_0x26ff93={'verified':!![],'status':_0x65bd61(0xd5),'afterReadback':{'businessGroup':displayBusinessGroup(_0x68f523)}});const _0x39b567={'operation':'update','appCode':_0x46d425,'selector':{'code':_0x370169[_0x65bd61(0x110)]},'dataset':{'id':_0x370169['id'],'code':_0x370169[_0x65bd61(0x110)],'name':_0x370169[_0x65bd61(0xfb)],'sourceType':_0x370169[_0x65bd61(0x117)]},'before':{'businessGroup':displayBusinessGroup(_0x68f523)},'after':{'businessGroup':displayBusinessGroup(_0x276174)},'changed':_0x53ee2f,'dryRun':_0x3c8d65,'submitted':_0x53ee2f&&!_0x3c8d65,'backend':{'method':_0x463754[_0x65bd61(0x10e)],'path':_0x463754[_0x65bd61(0xe0)],'payload':_0x463754[_0x65bd61(0xd4)]},..._0x26ff93?{'verification':_0x26ff93}:{},'warnings':[]};return{'ok':!![],'data':_0x39b567,'message':_0x53ee2f?_0x3c8d65?_0x65bd61(0xfe)+_0x370169[_0x65bd61(0x110)]:_0x65bd61(0x101)+_0x370169[_0x65bd61(0x110)]:_0x65bd61(0xdb)+_0x370169[_0x65bd61(0x110)]};}export const datasetBusinessGroupUpdate={'service':a65_0x3015e4(0xe5),'command':'business-group-update','description':a65_0x3015e4(0xe4),'risk':a65_0x3015e4(0x115),'flags':[CODE_FLAG,{'name':a65_0x3015e4(0x10a),'type':a65_0x3015e4(0xe8),'required':!![],'description':a65_0x3015e4(0x102)},{'name':a65_0x3015e4(0xe1),'type':a65_0x3015e4(0xe8),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x303ef9){validateInput(readBusinessGroupUpdateInput(_0x303ef9));},async 'dryRun'(_0x4b38f6){const _0x55fe0c=a65_0x3015e4,_0xac549f=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x4b38f6['appCode'],'input':readBusinessGroupUpdateInput(_0x4b38f6),'dryRun':!![]});return{'method':_0xac549f[_0x55fe0c(0xf5)][_0x55fe0c(0x11c)]['method'],'url':_0xac549f[_0x55fe0c(0xf5)][_0x55fe0c(0x11c)][_0x55fe0c(0xe0)],'body':_0xac549f[_0x55fe0c(0xf5)][_0x55fe0c(0x11c)]['payload'],'description':_0xac549f['message'],..._0xac549f[_0x55fe0c(0xf5)]};},async 'execute'(_0x25a3ce){const _0x427e54=a65_0x3015e4;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x25a3ce[_0x427e54(0xd3)],'input':readBusinessGroupUpdateInput(_0x25a3ce),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x4721f3){const _0x2b39b0=a65_0x3015e4,_0x3510fa=_0x4721f3[_0x2b39b0(0xde)](_0x2b39b0(0xe1));return{'code':trim(_0x4721f3[_0x2b39b0(0xde)](_0x2b39b0(0x110))),'businessGroup':_0x4721f3[_0x2b39b0(0xde)](_0x2b39b0(0x10a)),'expectBusinessGroup':_0x3510fa===undefined||_0x3510fa===''?undefined:_0x3510fa};}function validateInput(_0x135ae7){const _0x330f23=a65_0x3015e4;if(!trim(_0x135ae7[_0x330f23(0x110)]))throw CliErrors['validation'](_0x330f23(0xf6));if(_0x135ae7[_0x330f23(0xe3)]===undefined)throw CliErrors[_0x330f23(0x100)](_0x330f23(0xfd));if(!trim(_0x135ae7[_0x330f23(0xe3)]))throw CliErrors[_0x330f23(0x100)](_0x330f23(0xdf));}function assertBusinessGroupUpdateSupported(_0x1ac653,_0x283359){const _0x534c52=a65_0x3015e4;if(_0x1ac653[_0x534c52(0x117)]===_0x534c52(0xe6)&&!_0x283359)throw CliErrors['validation'](_0x534c52(0xd1));}function resolveBusinessGroupDataset(_0x5a80b6,_0x16c6b5){const _0x42eaf4=a65_0x3015e4,_0x2b36f0=asPlainObject(_0x5a80b6[_0x42eaf4(0xe5)]),_0x516315=asPlainObject(_0x5a80b6[_0x42eaf4(0x105)]),_0x462b12=resolveSourceType(_0x5a80b6,_0x2b36f0,_0x516315),_0x452f85=firstString(_0x5a80b6[_0x42eaf4(0x103)],_0x5a80b6['code'],_0x2b36f0[_0x42eaf4(0xdc)],_0x16c6b5)||_0x16c6b5;return{'id':firstNumber(_0x5a80b6['modelId'],_0x5a80b6['id'],_0x2b36f0[_0x42eaf4(0x111)])??firstString(_0x5a80b6[_0x42eaf4(0xf7)],_0x5a80b6['id'],_0x2b36f0[_0x42eaf4(0x111)])??null,'code':_0x452f85,'name':firstString(_0x5a80b6[_0x42eaf4(0xfb)],_0x2b36f0[_0x42eaf4(0x106)],_0x2b36f0['name'])||null,'sourceType':_0x462b12,'dbTableSelector':_0x462b12==='DB_TABLE'?{'dbLinkId':firstNumber(_0x516315[_0x42eaf4(0xe7)]),'tableName':firstString(_0x516315['tableName'])||null}:null};}function resolveSourceType(_0x38435e,_0x126506,_0x28132f){const _0x407a9b=a65_0x3015e4,_0x2c3bde=firstString(_0x38435e[_0x407a9b(0xf4)],_0x38435e[_0x407a9b(0x117)],_0x126506[_0x407a9b(0xf4)],_0x126506[_0x407a9b(0x117)])?.[_0x407a9b(0xd0)]()[_0x407a9b(0xf3)]();if(_0x2c3bde===_0x407a9b(0xe6)||_0x2c3bde===_0x407a9b(0x10d))return _0x2c3bde;if(Object['keys'](_0x28132f)['length']>0x0)return'DB_TABLE';throw CliErrors[_0x407a9b(0x100)](_0x407a9b(0xfc));}function loadCurrentBusinessGroup(_0x247982,_0x52bd97){const _0x5c87c3=a65_0x3015e4,_0x4b05b6=readBusinessGroupFromDatasetDetail(_0x247982,_0x52bd97[_0x5c87c3(0x117)]);if(_0x4b05b6[_0x5c87c3(0xf9)])return normalizeBusinessGroup(_0x4b05b6[_0x5c87c3(0x114)]);return'';}function readBusinessGroupFromDatasetDetail(_0x43094e,_0x328306){const _0x265c25=a65_0x3015e4,_0x22d7c5=asPlainObject(_0x43094e[_0x265c25(0xe5)]),_0x11e550=firstPresent(_0x43094e[_0x265c25(0xe3)]);if(_0x11e550[_0x265c25(0xf9)])return _0x11e550;const _0x5f09b5=firstPresent(_0x22d7c5[_0x265c25(0xe3)]);if(_0x5f09b5[_0x265c25(0xf9)])return _0x5f09b5;if(_0x328306===_0x265c25(0xe6))return{'found':![]};const _0x4ecf33=readBusinessGroupFromExtend(_0x43094e[_0x265c25(0xeb)]);if(_0x4ecf33[_0x265c25(0xf9)])return _0x4ecf33;return readBusinessGroupFromExtend(_0x22d7c5[_0x265c25(0xeb)]);}function readBusinessGroupFromExtend(_0x1163cd){const _0x27d893=a65_0x3015e4;if(_0x1163cd===undefined||_0x1163cd===null||_0x1163cd==='')return{'found':![]};if(typeof _0x1163cd===_0x27d893(0xe8))try{const _0x7b4807=JSON[_0x27d893(0xdd)](_0x1163cd);return readBusinessGroupFromExtend(_0x7b4807);}catch{return{'found':![]};}const _0x5b5e8d=asPlainObject(_0x1163cd);if(Object[_0x27d893(0xfa)][_0x27d893(0x107)][_0x27d893(0xed)](_0x5b5e8d,_0x27d893(0xe3)))return{'found':!![],'value':_0x5b5e8d[_0x27d893(0xe3)]};return{'found':![]};}function firstPresent(..._0x333b44){for(const _0x19ae28 of _0x333b44){if(_0x19ae28!==undefined&&_0x19ae28!==null)return{'found':!![],'value':_0x19ae28};}return{'found':![]};}function a65_0x4e65(){const _0x37777f=['db-table','dbTableSelector','value','write','16432559UkMYxn','sourceType','object','/smartapi/question/er-config/business-group/edit','2ojvaMo','28lnMDvT','backend','matched','trim','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','POST','appCode','payload','unchanged','727556ssvzLF','expectBusinessGroup','number','tableName','11965vxaEkD','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','datasetCode','parse','str','--business-group\x20must\x20not\x20be\x20blank','path','expect-business-group','isFinite','businessGroup','Update\x20business\x20scenario\x20group','dataset','DB_TABLE','dbId','string','Expected\x20','1251819CeKXau','extend','3295978CukNcF','call',',\x20actual\x20','dbLinkId','isArray','Expectation\x20mismatch\x20at\x20businessGroup','6VElytr','toUpperCase','source','data','--code\x20is\x20required','modelId','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','found','prototype','name','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','--business-group\x20is\x20required','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','stringify','validation','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','modelCode','3780952EaKpOR','dbtableConfig','datasetName','hasOwnProperty','2283156SyHIhz','apiError','business-group','kind','20jQdBQB','METADATA','method','ungrouped','code','datasetId'];a65_0x4e65=function(){return _0x37777f;};return a65_0x4e65();}function assertExpectedBusinessGroup(_0x237501,_0x1749e1){const _0x505bb8=a65_0x3015e4;if(_0x1749e1===undefined)return;const _0xb8e24f=normalizeBusinessGroupArgument(_0x1749e1);if(_0x237501!==_0xb8e24f)throw CliErrors[_0x505bb8(0x100)](_0x505bb8(0xf1),_0x505bb8(0xe9)+JSON[_0x505bb8(0xff)](_0xb8e24f)+_0x505bb8(0xee)+JSON['stringify'](_0x237501));}function buildBackendPlan(_0x310afd,_0x4c4769,_0x496106){const _0x2a8b16=a65_0x3015e4;if(_0x4c4769[_0x2a8b16(0x117)]==='DB_TABLE'){if(!_0x4c4769[_0x2a8b16(0x113)]||_0x4c4769[_0x2a8b16(0x113)][_0x2a8b16(0xef)]===null||!_0x4c4769[_0x2a8b16(0x113)]['tableName'])throw CliErrors[_0x2a8b16(0x100)]('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.');return{'kind':_0x2a8b16(0x112),'method':_0x2a8b16(0xd2),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x4c4769['dbTableSelector'][_0x2a8b16(0xef)],'tableName':_0x4c4769[_0x2a8b16(0x113)][_0x2a8b16(0xd9)],'businessGroup':_0x496106}};}return{'kind':'metadata','method':_0x2a8b16(0xd2),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x310afd,'datasetCode':_0x4c4769[_0x2a8b16(0x110)],'businessGroup':_0x496106}};}function normalizeBusinessGroup(_0x3f37e0){const _0xe7ef6c=a65_0x3015e4;if(_0x3f37e0===undefined||_0x3f37e0===null)return'';return String(_0x3f37e0)[_0xe7ef6c(0xd0)]();}function normalizeBusinessGroupArgument(_0x2e7abb){const _0x2784d8=normalizeBusinessGroup(_0x2e7abb);return _0x2784d8===UNGROUPED_BUSINESS_GROUP?'':_0x2784d8;}function displayBusinessGroup(_0xedf53a){return _0xedf53a||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x3b35c5){const _0x23c597=a65_0x3015e4;if(!_0x3b35c5||typeof _0x3b35c5!==_0x23c597(0x118)||Array[_0x23c597(0xf0)](_0x3b35c5))return{};return _0x3b35c5;}function firstString(..._0x377053){const _0x4f6901=a65_0x3015e4;for(const _0x4bfade of _0x377053){if(typeof _0x4bfade==='string'&&_0x4bfade[_0x4f6901(0xd0)]())return _0x4bfade[_0x4f6901(0xd0)]();if(typeof _0x4bfade==='number'&&Number[_0x4f6901(0xe2)](_0x4bfade))return String(_0x4bfade);}return undefined;}function firstNumber(..._0x1e84b5){const _0x47da02=a65_0x3015e4;for(const _0x39e1ea of _0x1e84b5){if(typeof _0x39e1ea===_0x47da02(0xd8)&&Number[_0x47da02(0xe2)](_0x39e1ea))return _0x39e1ea;if(typeof _0x39e1ea==='string'&&_0x39e1ea[_0x47da02(0xd0)]()&&Number[_0x47da02(0xe2)](Number(_0x39e1ea)))return Number(_0x39e1ea);}return null;}function trim(_0xbccfc){return String(_0xbccfc||'')['trim']();}
|
|
1
|
+
const a66_0x2634fc=a66_0x2a54;(function(_0x3d4cc5,_0x361310){const _0x3c3d1a=a66_0x2a54,_0x1ca617=_0x3d4cc5();while(!![]){try{const _0x330ae7=-parseInt(_0x3c3d1a(0x139))/0x1+parseInt(_0x3c3d1a(0x15c))/0x2+parseInt(_0x3c3d1a(0x129))/0x3*(-parseInt(_0x3c3d1a(0x128))/0x4)+parseInt(_0x3c3d1a(0x140))/0x5*(parseInt(_0x3c3d1a(0x150))/0x6)+-parseInt(_0x3c3d1a(0x145))/0x7*(parseInt(_0x3c3d1a(0x120))/0x8)+parseInt(_0x3c3d1a(0x11d))/0x9*(-parseInt(_0x3c3d1a(0x147))/0xa)+parseInt(_0x3c3d1a(0x146))/0xb;if(_0x330ae7===_0x361310)break;else _0x1ca617['push'](_0x1ca617['shift']());}catch(_0x2ae25c){_0x1ca617['push'](_0x1ca617['shift']());}}}(a66_0x511c,0xe1d56));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_0x2634fc(0x144),METADATA_BACKEND_PATH=a66_0x2634fc(0x14d),UNGROUPED_BUSINESS_GROUP=a66_0x2634fc(0x136);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x1e3a57,input:_0x2d4b98,dryRun:_0x206874}){const _0x2a29de=a66_0x2634fc;validateInput(_0x2d4b98);const _0x16f8e6=normalizeBusinessGroupArgument(_0x2d4b98[_0x2a29de(0x132)]),_0x3c0fd4=await getDatasetDetail(_0x2d4b98[_0x2a29de(0x121)]),_0x5274cf=resolveBusinessGroupDataset(_0x3c0fd4,_0x2d4b98[_0x2a29de(0x121)]);assertBusinessGroupUpdateSupported(_0x5274cf,_0x16f8e6);const _0x578ff4=loadCurrentBusinessGroup(_0x3c0fd4,_0x5274cf);assertExpectedBusinessGroup(_0x578ff4,_0x2d4b98[_0x2a29de(0x157)]);const _0x1a2a90=buildBackendPlan(_0x1e3a57,_0x5274cf,_0x16f8e6),_0x96699c=_0x578ff4!==_0x16f8e6;let _0x4d4927;if(_0x96699c&&!_0x206874){_0x1a2a90[_0x2a29de(0x148)]==='db-table'?await updateDbTableBusinessGroup(_0x1a2a90['payload']):await updateErBusinessGroup(_0x1a2a90[_0x2a29de(0x14e)]);const _0x1060c2=await getDatasetDetail(_0x5274cf[_0x2a29de(0x121)]),_0x78b4a2=resolveBusinessGroupDataset(_0x1060c2,_0x5274cf['code']),_0x1552b8=loadCurrentBusinessGroup(_0x1060c2,_0x78b4a2);if(_0x1552b8!==_0x16f8e6)throw CliErrors[_0x2a29de(0x12c)]('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x2a29de(0x143)+JSON[_0x2a29de(0x14a)](displayBusinessGroup(_0x16f8e6))+_0x2a29de(0x15e)+JSON[_0x2a29de(0x14a)](displayBusinessGroup(_0x1552b8))+'.');_0x4d4927={'verified':!![],'status':_0x2a29de(0x155),'afterReadback':{'businessGroup':displayBusinessGroup(_0x1552b8)}};}else!_0x96699c&&(_0x4d4927={'verified':!![],'status':_0x2a29de(0x13f),'afterReadback':{'businessGroup':displayBusinessGroup(_0x578ff4)}});const _0x4f2f53={'operation':_0x2a29de(0x116),'appCode':_0x1e3a57,'selector':{'code':_0x5274cf['code']},'dataset':{'id':_0x5274cf['id'],'code':_0x5274cf[_0x2a29de(0x121)],'name':_0x5274cf[_0x2a29de(0x135)],'sourceType':_0x5274cf[_0x2a29de(0x13a)]},'before':{'businessGroup':displayBusinessGroup(_0x578ff4)},'after':{'businessGroup':displayBusinessGroup(_0x16f8e6)},'changed':_0x96699c,'dryRun':_0x206874,'submitted':_0x96699c&&!_0x206874,'backend':{'method':_0x1a2a90[_0x2a29de(0x11b)],'path':_0x1a2a90[_0x2a29de(0x117)],'payload':_0x1a2a90['payload']},..._0x4d4927?{'verification':_0x4d4927}:{},'warnings':[]};return{'ok':!![],'data':_0x4f2f53,'message':_0x96699c?_0x206874?_0x2a29de(0x138)+_0x5274cf['code']:_0x2a29de(0x12b)+_0x5274cf[_0x2a29de(0x121)]:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x5274cf[_0x2a29de(0x121)]};}export const datasetBusinessGroupUpdate={'service':a66_0x2634fc(0x15a),'command':a66_0x2634fc(0x149),'description':a66_0x2634fc(0x13e),'risk':a66_0x2634fc(0x151),'flags':[CODE_FLAG,{'name':a66_0x2634fc(0x153),'type':a66_0x2634fc(0x11f),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':'expect-business-group','type':'string','required':![],'description':a66_0x2634fc(0x142)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4195aa){validateInput(readBusinessGroupUpdateInput(_0x4195aa));},async 'dryRun'(_0x4135f9){const _0x7ad819=a66_0x2634fc,_0x41803c=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x4135f9['appCode'],'input':readBusinessGroupUpdateInput(_0x4135f9),'dryRun':!![]});return{'method':_0x41803c[_0x7ad819(0x134)]['backend']['method'],'url':_0x41803c['data'][_0x7ad819(0x137)][_0x7ad819(0x117)],'body':_0x41803c[_0x7ad819(0x134)][_0x7ad819(0x137)][_0x7ad819(0x14e)],'description':_0x41803c[_0x7ad819(0x130)],..._0x41803c['data']};},async 'execute'(_0x212fd2){const _0xcb3826=a66_0x2634fc;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x212fd2[_0xcb3826(0x13b)],'input':readBusinessGroupUpdateInput(_0x212fd2),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x21829f){const _0xd8a144=a66_0x2634fc,_0x4864f7=_0x21829f[_0xd8a144(0x141)](_0xd8a144(0x14b));return{'code':trim(_0x21829f[_0xd8a144(0x141)](_0xd8a144(0x121))),'businessGroup':_0x21829f[_0xd8a144(0x141)](_0xd8a144(0x153)),'expectBusinessGroup':_0x4864f7===undefined||_0x4864f7===''?undefined:_0x4864f7};}function validateInput(_0x40752d){const _0x403a6a=a66_0x2634fc;if(!trim(_0x40752d[_0x403a6a(0x121)]))throw CliErrors[_0x403a6a(0x126)](_0x403a6a(0x133));if(_0x40752d[_0x403a6a(0x132)]===undefined)throw CliErrors[_0x403a6a(0x126)](_0x403a6a(0x115));if(!trim(_0x40752d['businessGroup']))throw CliErrors[_0x403a6a(0x126)]('--business-group\x20must\x20not\x20be\x20blank');}function a66_0x511c(){const _0x59c67e=['hasOwnProperty','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','apiError','call','keys','extend','message','dbTableSelector','businessGroup','--code\x20is\x20required','data','name','ungrouped','backend','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','1025425RVOMvF','sourceType','appCode','datasetCode','isFinite','Update\x20business\x20scenario\x20group','unchanged','5McVIUQ','str','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','Expected\x20','/smartapi/dblink/updateTableBusinessGroup','53123lzgKwW','39819439PPFTHT','10LiFUvX','kind','business-group-update','stringify','expect-business-group','number','/smartapi/question/er-config/business-group/edit','payload','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','4107732meNJiN','write','trim','business-group','modelId','matched','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','expectBusinessGroup','dbId','isArray','dataset','tableName','744800TkjGWm','dbLinkId',',\x20actual\x20','prototype','DB_TABLE','--business-group\x20is\x20required','update','path','found','parse','POST','method','dbtableConfig','4442211vwaSZZ','toUpperCase','string','600DSBFPI','code','length','metadata','source','object','validation','datasetId','8CoWlNo','2495667XkUJYF'];a66_0x511c=function(){return _0x59c67e;};return a66_0x511c();}function assertBusinessGroupUpdateSupported(_0x387cda,_0x2de74e){const _0x4424de=a66_0x2634fc;if(_0x387cda['sourceType']===_0x4424de(0x160)&&!_0x2de74e)throw CliErrors[_0x4424de(0x126)]('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function resolveBusinessGroupDataset(_0x2166b7,_0x1c9102){const _0x134597=a66_0x2634fc,_0x4ec428=asPlainObject(_0x2166b7[_0x134597(0x15a)]),_0x513109=asPlainObject(_0x2166b7[_0x134597(0x11c)]),_0x3a9fc0=resolveSourceType(_0x2166b7,_0x4ec428,_0x513109),_0x4e31d1=firstString(_0x2166b7['modelCode'],_0x2166b7[_0x134597(0x121)],_0x4ec428[_0x134597(0x13c)],_0x1c9102)||_0x1c9102;return{'id':firstNumber(_0x2166b7['modelId'],_0x2166b7['id'],_0x4ec428[_0x134597(0x127)])??firstString(_0x2166b7[_0x134597(0x154)],_0x2166b7['id'],_0x4ec428[_0x134597(0x127)])??null,'code':_0x4e31d1,'name':firstString(_0x2166b7[_0x134597(0x135)],_0x4ec428['datasetName'],_0x4ec428[_0x134597(0x135)])||null,'sourceType':_0x3a9fc0,'dbTableSelector':_0x3a9fc0==='DB_TABLE'?{'dbLinkId':firstNumber(_0x513109[_0x134597(0x158)]),'tableName':firstString(_0x513109[_0x134597(0x15b)])||null}:null};}function resolveSourceType(_0x698e75,_0x15cee3,_0x3f5215){const _0x4db740=a66_0x2634fc,_0x38e398=firstString(_0x698e75[_0x4db740(0x124)],_0x698e75['sourceType'],_0x15cee3[_0x4db740(0x124)],_0x15cee3[_0x4db740(0x13a)])?.['trim']()[_0x4db740(0x11e)]();if(_0x38e398==='DB_TABLE'||_0x38e398==='METADATA')return _0x38e398;if(Object[_0x4db740(0x12e)](_0x3f5215)[_0x4db740(0x122)]>0x0)return _0x4db740(0x160);throw CliErrors[_0x4db740(0x126)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x11baff,_0x55e040){const _0x36cc67=readBusinessGroupFromDatasetDetail(_0x11baff,_0x55e040['sourceType']);if(_0x36cc67['found'])return normalizeBusinessGroup(_0x36cc67['value']);return'';}function readBusinessGroupFromDatasetDetail(_0x5d77fe,_0x2bd855){const _0x15e79f=a66_0x2634fc,_0x8944=asPlainObject(_0x5d77fe[_0x15e79f(0x15a)]),_0x419da4=firstPresent(_0x5d77fe[_0x15e79f(0x132)]);if(_0x419da4[_0x15e79f(0x118)])return _0x419da4;const _0x34fa2d=firstPresent(_0x8944['businessGroup']);if(_0x34fa2d[_0x15e79f(0x118)])return _0x34fa2d;if(_0x2bd855===_0x15e79f(0x160))return{'found':![]};const _0x53600b=readBusinessGroupFromExtend(_0x5d77fe[_0x15e79f(0x12f)]);if(_0x53600b[_0x15e79f(0x118)])return _0x53600b;return readBusinessGroupFromExtend(_0x8944[_0x15e79f(0x12f)]);}function readBusinessGroupFromExtend(_0x5d9440){const _0x27ebdf=a66_0x2634fc;if(_0x5d9440===undefined||_0x5d9440===null||_0x5d9440==='')return{'found':![]};if(typeof _0x5d9440===_0x27ebdf(0x11f))try{const _0x4fc5bd=JSON[_0x27ebdf(0x119)](_0x5d9440);return readBusinessGroupFromExtend(_0x4fc5bd);}catch{return{'found':![]};}const _0x39503b=asPlainObject(_0x5d9440);if(Object[_0x27ebdf(0x15f)][_0x27ebdf(0x12a)][_0x27ebdf(0x12d)](_0x39503b,'businessGroup'))return{'found':!![],'value':_0x39503b[_0x27ebdf(0x132)]};return{'found':![]};}function firstPresent(..._0x8e9f6c){for(const _0x171ab1 of _0x8e9f6c){if(_0x171ab1!==undefined&&_0x171ab1!==null)return{'found':!![],'value':_0x171ab1};}return{'found':![]};}function assertExpectedBusinessGroup(_0xf20df0,_0x1509d9){const _0x3f4e02=a66_0x2634fc;if(_0x1509d9===undefined)return;const _0x429b8d=normalizeBusinessGroupArgument(_0x1509d9);if(_0xf20df0!==_0x429b8d)throw CliErrors['validation']('Expectation\x20mismatch\x20at\x20businessGroup',_0x3f4e02(0x143)+JSON['stringify'](_0x429b8d)+_0x3f4e02(0x15e)+JSON['stringify'](_0xf20df0));}function a66_0x2a54(_0x41d267,_0x52f0db){_0x41d267=_0x41d267-0x115;const _0x511cff=a66_0x511c();let _0x2a5469=_0x511cff[_0x41d267];return _0x2a5469;}function buildBackendPlan(_0x3ff328,_0x45ce73,_0x100e5f){const _0xf0dcfd=a66_0x2634fc;if(_0x45ce73['sourceType']===_0xf0dcfd(0x160)){if(!_0x45ce73[_0xf0dcfd(0x131)]||_0x45ce73['dbTableSelector']['dbLinkId']===null||!_0x45ce73[_0xf0dcfd(0x131)][_0xf0dcfd(0x15b)])throw CliErrors[_0xf0dcfd(0x126)](_0xf0dcfd(0x14f),_0xf0dcfd(0x156));return{'kind':'db-table','method':_0xf0dcfd(0x11a),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x45ce73[_0xf0dcfd(0x131)][_0xf0dcfd(0x15d)],'tableName':_0x45ce73[_0xf0dcfd(0x131)][_0xf0dcfd(0x15b)],'businessGroup':_0x100e5f}};}return{'kind':_0xf0dcfd(0x123),'method':_0xf0dcfd(0x11a),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x3ff328,'datasetCode':_0x45ce73['code'],'businessGroup':_0x100e5f}};}function normalizeBusinessGroup(_0x2857ca){const _0x28c70c=a66_0x2634fc;if(_0x2857ca===undefined||_0x2857ca===null)return'';return String(_0x2857ca)[_0x28c70c(0x152)]();}function normalizeBusinessGroupArgument(_0x5f4c3b){const _0x22a681=normalizeBusinessGroup(_0x5f4c3b);return _0x22a681===UNGROUPED_BUSINESS_GROUP?'':_0x22a681;}function displayBusinessGroup(_0x211fd8){return _0x211fd8||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x9af80a){const _0x166d8c=a66_0x2634fc;if(!_0x9af80a||typeof _0x9af80a!==_0x166d8c(0x125)||Array[_0x166d8c(0x159)](_0x9af80a))return{};return _0x9af80a;}function firstString(..._0x12d52d){const _0xaabe3b=a66_0x2634fc;for(const _0x346be4 of _0x12d52d){if(typeof _0x346be4===_0xaabe3b(0x11f)&&_0x346be4['trim']())return _0x346be4[_0xaabe3b(0x152)]();if(typeof _0x346be4===_0xaabe3b(0x14c)&&Number['isFinite'](_0x346be4))return String(_0x346be4);}return undefined;}function firstNumber(..._0x50f694){const _0x3e6759=a66_0x2634fc;for(const _0x5d5a95 of _0x50f694){if(typeof _0x5d5a95===_0x3e6759(0x14c)&&Number[_0x3e6759(0x13d)](_0x5d5a95))return _0x5d5a95;if(typeof _0x5d5a95===_0x3e6759(0x11f)&&_0x5d5a95[_0x3e6759(0x152)]()&&Number[_0x3e6759(0x13d)](Number(_0x5d5a95)))return Number(_0x5d5a95);}return null;}function trim(_0x388d04){const _0x483867=a66_0x2634fc;return String(_0x388d04||'')[_0x483867(0x152)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x5b54a7=a67_0x3ce6;(function(_0x3d7b85,_0x1421eb){const _0x3136b5=a67_0x3ce6,_0x50910b=_0x3d7b85();while(!![]){try{const _0x2f8f8d=parseInt(_0x3136b5(0x159))/0x1*(parseInt(_0x3136b5(0x15b))/0x2)+parseInt(_0x3136b5(0x150))/0x3*(parseInt(_0x3136b5(0x163))/0x4)+-parseInt(_0x3136b5(0x162))/0x5+parseInt(_0x3136b5(0x15c))/0x6*(parseInt(_0x3136b5(0x160))/0x7)+parseInt(_0x3136b5(0x151))/0x8+parseInt(_0x3136b5(0x154))/0x9*(-parseInt(_0x3136b5(0x15d))/0xa)+parseInt(_0x3136b5(0x156))/0xb;if(_0x2f8f8d===_0x1421eb)break;else _0x50910b['push'](_0x50910b['shift']());}catch(_0x374d0e){_0x50910b['push'](_0x50910b['shift']());}}}(a67_0x4b82,0xa9a14));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a67_0x3ce6(_0x2f1eb5,_0x167be9){_0x2f1eb5=_0x2f1eb5-0x14f;const _0x4b82fd=a67_0x4b82();let _0x3ce60f=_0x4b82fd[_0x2f1eb5];return _0x3ce60f;}import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a67_0x5b54a7(0x153),'command':'business-groups','description':'List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','risk':'read','flags':[{'name':'dbid','type':a67_0x5b54a7(0x161),'required':!![],'description':a67_0x5b54a7(0x157)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3ac2bd){const _0x16437a=a67_0x5b54a7,_0x543da1=_0x3ac2bd['num'](_0x16437a(0x14f)),_0x264836=await getErBusinessGroupSummary(_0x3ac2bd[_0x16437a(0x165)],_0x543da1),_0x29a7a1=_0x264836[_0x16437a(0x152)][_0x16437a(0x158)](_0x3ad20e=>({..._0x3ad20e,'businessGroup':_0x3ad20e[_0x16437a(0x15f)][_0x16437a(0x15a)]()||_0x16437a(0x15e)}));return{'ok':!![],'data':{..._0x264836,'groups':_0x29a7a1,'scope':_0x16437a(0x155)},'message':_0x16437a(0x164)+_0x29a7a1['length']+'\x20business\x20group(s)\x20for\x20database\x20connection\x20'+_0x543da1};}};function a67_0x4b82(){const _0x59aaee=['1kSbMAw','trim','2740834pJHTlr','597462YRHOld','18770mhYbro','ungrouped','businessGroup','35IzRtne','number','4800835yyipNl','4OySfVG','Found\x20','appCode','dbid','163143LAvLWF','4429472lNFzWy','groups','dataset','4626jzmzIn','DB_TABLE','1577202eREwkk','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','map'];a67_0x4b82=function(){return _0x59aaee;};return a67_0x4b82();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a68_0x1b44e5=a68_0x1dc2;(function(_0xe33a4a,_0x3ea19a){const _0x51eb6e=a68_0x1dc2,_0xb4b40d=_0xe33a4a();while(!![]){try{const _0x1662c5=parseInt(_0x51eb6e(0x16a))/0x1+-parseInt(_0x51eb6e(0x15f))/0x2*(parseInt(_0x51eb6e(0x167))/0x3)+-parseInt(_0x51eb6e(0x164))/0x4+-parseInt(_0x51eb6e(0x152))/0x5*(parseInt(_0x51eb6e(0x15b))/0x6)+parseInt(_0x51eb6e(0x157))/0x7+-parseInt(_0x51eb6e(0x168))/0x8*(parseInt(_0x51eb6e(0x158))/0x9)+parseInt(_0x51eb6e(0x154))/0xa*(parseInt(_0x51eb6e(0x14b))/0xb);if(_0x1662c5===_0x3ea19a)break;else _0xb4b40d['push'](_0xb4b40d['shift']());}catch(_0xee91da){_0xb4b40d['push'](_0xb4b40d['shift']());}}}(a68_0x374d,0xeb0b6));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a68_0x1b44e5(0x14d),'filter':a68_0x1b44e5(0x15e),'getOne':a68_0x1b44e5(0x161)};function a68_0x1dc2(_0x23fd50,_0x1530a0){_0x23fd50=_0x23fd50-0x14b;const _0x374d88=a68_0x374d();let _0x1dc2a8=_0x374d88[_0x23fd50];return _0x1dc2a8;}export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x4070d7){const _0x2f193a=a68_0x1b44e5;return _0x4070d7==null?'':String(_0x4070d7)[_0x2f193a(0x169)]();}function getDatasetCode(_0x512c8e){const _0x41b644=a68_0x1b44e5;return valueToString(_0x512c8e[_0x41b644(0x16d)]??_0x512c8e[_0x41b644(0x160)]??_0x512c8e['dataset']?.[_0x41b644(0x151)]);}function getDatasetName(_0x36c983){const _0x11dd35=a68_0x1b44e5;return valueToString(_0x36c983[_0x11dd35(0x153)]??_0x36c983[_0x11dd35(0x14f)]?.[_0x11dd35(0x14e)])||'unknown';}function getDatasetSource(_0x21a778){const _0x398550=a68_0x1b44e5;return valueToString(_0x21a778['source']??_0x21a778[_0x398550(0x14f)]?.[_0x398550(0x16c)])[_0x398550(0x14c)]();}function getDbtableConfig(_0x352bba){const _0x3de0f7=a68_0x1b44e5,_0x48bc86=_0x352bba[_0x3de0f7(0x163)]??_0x352bba[_0x3de0f7(0x150)];return _0x48bc86&&typeof _0x48bc86===_0x3de0f7(0x159)?_0x48bc86:{};}export function isDbTableBackedDataset(_0x4e8109){const _0x30d263=a68_0x1b44e5,_0x1933c7=getDatasetSource(_0x4e8109);if(_0x1933c7==='METADATA')return![];const _0x2856e8=getDbtableConfig(_0x4e8109),_0x244c7c=_0x2856e8[_0x30d263(0x15a)]??_0x2856e8['id'],_0x3201ba=valueToString(_0x2856e8[_0x30d263(0x166)]??_0x4e8109['tableName']??_0x4e8109['dataset']?.['tableName']);return _0x244c7c!==undefined&&_0x244c7c!==null&&_0x3201ba['length']>0x0;}export function filterDbTableBackedDatasets(_0x455256){return _0x455256['filter'](_0x2ba922=>isDbTableBackedDataset(_0x2ba922));}export function buildDbTableBackedRequirementMessage(_0x5b6b65,_0xfbecf7='SQL\x20schema\x20validation'){const _0x5bc8fd=a68_0x1b44e5,_0x361ef9=getDatasetSource(_0x5b6b65)||'UNKNOWN',_0x112162=getDatasetName(_0x5b6b65),_0x5a30c4=getDatasetCode(_0x5b6b65),_0x2011be=_0x5a30c4?'\x20('+_0x5a30c4+')':'';return[_0x5bc8fd(0x155)+_0x112162+'\x22'+_0x2011be+_0x5bc8fd(0x15d)+_0x361ef9+_0x5bc8fd(0x16b)+_0xfbecf7+'.','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.',_0x5bc8fd(0x165),_0x5bc8fd(0x156)+RUNTIME_DATA_ACCESS_COMMANDS[_0x5bc8fd(0x162)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'.'][_0x5bc8fd(0x15c)]('\x20');}export function assertDatasetIsDbTableBacked(_0x1b5157,_0x2adc7d){if(!isDbTableBackedDataset(_0x1b5157))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x1b5157,_0x2adc7d));}function a68_0x374d(){const _0x21bf7c=['4270545yeaLjG','object','dbId','22752nyLFnJ','join','\x20is\x20','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','456jjuZst','modelCode','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','filter','dbtableConfig','2964556RCGVJQ','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','tableName','9813UVKMBw','24IwAoke','trim','131001jZwKxL','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','sourceType','code','18927623TDBziR','toUpperCase','lovrabet','datasetName','dataset','dbtable','datasetCode','2430gAWGMV','name','30DpBCRC','The\x20current\x20dataset\x20\x22','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','2961112OaDZJi'];a68_0x374d=function(){return _0x21bf7c;};return a68_0x374d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x288f27=a69_0x57db;(function(_0x52ab05,_0x23324c){const _0x20ae2d=a69_0x57db,_0x209894=_0x52ab05();while(!![]){try{const _0x2bd61c=-parseInt(_0x20ae2d(0xd1))/0x1*(-parseInt(_0x20ae2d(0xce))/0x2)+parseInt(_0x20ae2d(0xcd))/0x3+-parseInt(_0x20ae2d(0xc5))/0x4+-parseInt(_0x20ae2d(0xd0))/0x5*(parseInt(_0x20ae2d(0xcf))/0x6)+parseInt(_0x20ae2d(0xcc))/0x7*(-parseInt(_0x20ae2d(0xcb))/0x8)+-parseInt(_0x20ae2d(0xd2))/0x9*(-parseInt(_0x20ae2d(0xc8))/0xa)+parseInt(_0x20ae2d(0xca))/0xb*(parseInt(_0x20ae2d(0xd3))/0xc);if(_0x2bd61c===_0x23324c)break;else _0x209894['push'](_0x209894['shift']());}catch(_0x58f956){_0x209894['push'](_0x209894['shift']());}}}(a69_0x5afe,0x6af07));import{createCrossDbRelation}from'../../core/api-client.js';function a69_0x57db(_0x47ef95,_0x476dea){_0x47ef95=_0x47ef95-0xc5;const _0x5afea0=a69_0x5afe();let _0x57db08=_0x5afea0[_0x47ef95];return _0x57db08;}function a69_0x5afe(){const _0x374ba2=['63PWLqfl','72rTxmmw','create','3025932KXXHCe','write','Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','30980TfFJmd','dataset','2028565Qbggck','16usytVa','224357nOfAfx','1226433QwnEZB','9356rVBVHI','6fYUGXc','3473605RsRZAQ','89armmAH'];a69_0x5afe=function(){return _0x374ba2;};return a69_0x5afe();}import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationCreate={'service':a69_0x288f27(0xc9),'command':'cross-relation-create','description':a69_0x288f27(0xc7),'risk':a69_0x288f27(0xc6),'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 _0x4e7a04=>validateCrossRelation(_0x4e7a04,a69_0x288f27(0xd4)),'dryRun':_0x5451d4=>previewCrossRelation(_0x5451d4,a69_0x288f27(0xd4)),'execute':_0x1e3b67=>executeCrossRelation(_0x1e3b67,a69_0x288f27(0xd4),createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x16d2c9=a70_0x3e1c;function a70_0x1f44(){const _0x30b4ca=['4432935AFgopW','high-risk-write','delete','9872388gyovXJ','23763npqegJ','Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','424GhxSzL','cross-relation-delete','16teWYrX','333575lhXsxR','1530348yDKePd','7736477HvgBIa','2648646LGmZib'];a70_0x1f44=function(){return _0x30b4ca;};return a70_0x1f44();}(function(_0x21adae,_0x1c13e1){const _0x2939a9=a70_0x3e1c,_0x28f0c2=_0x21adae();while(!![]){try{const _0x1ef229=-parseInt(_0x2939a9(0x190))/0x1+parseInt(_0x2939a9(0x191))/0x2+-parseInt(_0x2939a9(0x18b))/0x3*(-parseInt(_0x2939a9(0x18d))/0x4)+parseInt(_0x2939a9(0x187))/0x5+-parseInt(_0x2939a9(0x193))/0x6+parseInt(_0x2939a9(0x192))/0x7+parseInt(_0x2939a9(0x18f))/0x8*(-parseInt(_0x2939a9(0x18a))/0x9);if(_0x1ef229===_0x1c13e1)break;else _0x28f0c2['push'](_0x28f0c2['shift']());}catch(_0x267ce5){_0x28f0c2['push'](_0x28f0c2['shift']());}}}(a70_0x1f44,0x99406));import{deleteCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';function a70_0x3e1c(_0x503129,_0x537bfa){_0x503129=_0x503129-0x187;const _0x1f4405=a70_0x1f44();let _0x3e1c31=_0x1f4405[_0x503129];return _0x3e1c31;}export const datasetCrossRelationDelete={'service':'dataset','command':a70_0x16d2c9(0x18e),'description':a70_0x16d2c9(0x18c),'risk':a70_0x16d2c9(0x188),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x43e361=>validateCrossRelation(_0x43e361,'delete'),'dryRun':_0x1f45a3=>previewCrossRelation(_0x1f45a3,a70_0x16d2c9(0x189)),'execute':_0x4ed41a=>executeCrossRelation(_0x4ed41a,a70_0x16d2c9(0x189),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x3a0ea5=a71_0x1475;(function(_0x524c2f,_0x11de5f){const _0x11cf88=a71_0x1475,_0x1bd34a=_0x524c2f();while(!![]){try{const _0x3458e3=parseInt(_0x11cf88(0x202))/0x1+parseInt(_0x11cf88(0x1f3))/0x2*(-parseInt(_0x11cf88(0x1f7))/0x3)+parseInt(_0x11cf88(0x1f4))/0x4*(-parseInt(_0x11cf88(0x1fa))/0x5)+parseInt(_0x11cf88(0x200))/0x6*(parseInt(_0x11cf88(0x204))/0x7)+-parseInt(_0x11cf88(0x1f8))/0x8*(parseInt(_0x11cf88(0x1fd))/0x9)+-parseInt(_0x11cf88(0x1fb))/0xa*(parseInt(_0x11cf88(0x1f9))/0xb)+parseInt(_0x11cf88(0x201))/0xc;if(_0x3458e3===_0x11de5f)break;else _0x1bd34a['push'](_0x1bd34a['shift']());}catch(_0x2df062){_0x1bd34a['push'](_0x1bd34a['shift']());}}}(a71_0x4b3d,0xb24f6));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';function a71_0x1475(_0x1c5086,_0x11c85b){_0x1c5086=_0x1c5086-0x1f3;const _0x4b3df9=a71_0x4b3d();let _0x14751a=_0x4b3df9[_0x1c5086];return _0x14751a;}function a71_0x4b3d(){const _0x3631dc=['appCode','cross-relation-list','3291SVpmPH','8olWHua','44LOUWis','312565ROocmD','586330xKPNYq','\x20relation(s)','5509017tkbBkY','List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','map','2704224glEbbp','9754680bUcxqo','281746BvCdAe','length','21qiYQXA','list','Cross-database\x20relations:\x20','332IIfIQp','44gMuEph'];a71_0x4b3d=function(){return _0x3631dc;};return a71_0x4b3d();}export const datasetCrossRelationList={'service':'dataset','command':a71_0x3a0ea5(0x1f6),'description':a71_0x3a0ea5(0x1fe),'risk':'read','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 _0x26addc=>validateCrossRelation(_0x26addc,a71_0x3a0ea5(0x205)),async 'execute'(_0x78a29a){const _0x2cc1da=a71_0x3a0ea5,_0xa77fa5=await resolveCrossRelationQuery(_0x78a29a),_0x497ab3=await queryCrossDbRelations(_0xa77fa5);return{'ok':!![],'data':{'appCode':_0x78a29a[_0x2cc1da(0x1f5)],'selector':_0xa77fa5,'total':_0x497ab3[_0x2cc1da(0x203)],'relations':_0x497ab3[_0x2cc1da(0x1ff)](projectCrossRelation)},'message':_0x2cc1da(0x206)+_0x497ab3['length']+_0x2cc1da(0x1fc)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a71_0x5d49(_0x53200c,_0x3fa375){_0x53200c=_0x53200c-0xa7;const _0x3886a1=a71_0x3886();let _0x5d4955=_0x3886a1[_0x53200c];return _0x5d4955;}const a71_0x11fe7b=a71_0x5d49;(function(_0x586ebe,_0x3b63b8){const _0x18ace9=a71_0x5d49,_0x5b011d=_0x586ebe();while(!![]){try{const _0x540f96=parseInt(_0x18ace9(0xd7))/0x1*(parseInt(_0x18ace9(0xab))/0x2)+-parseInt(_0x18ace9(0xe0))/0x3*(parseInt(_0x18ace9(0xdd))/0x4)+parseInt(_0x18ace9(0xf3))/0x5+parseInt(_0x18ace9(0xaf))/0x6*(-parseInt(_0x18ace9(0xe9))/0x7)+-parseInt(_0x18ace9(0xb6))/0x8*(parseInt(_0x18ace9(0xb1))/0x9)+-parseInt(_0x18ace9(0xe4))/0xa*(parseInt(_0x18ace9(0xcb))/0xb)+parseInt(_0x18ace9(0xdc))/0xc;if(_0x540f96===_0x3b63b8)break;else _0x5b011d['push'](_0x5b011d['shift']());}catch(_0x50bd78){_0x5b011d['push'](_0x5b011d['shift']());}}}(a71_0x3886,0x7d2a2));import{getDatasetDetail,queryCrossDbRelations}from'../../core/api-client.js';import{CROSS_DB_RELATION_PATHS}from'../../core/cross-db-relation.js';import{CliError,CliErrors}from'../../errors.js';import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0x484020,_0x4ae762){const _0x396068=a71_0x5d49,_0x29d667=_0x484020['str'](_0x4ae762)['trim']();if(!_0x29d667)throw CliErrors[_0x396068(0xcf)](_0x4ae762);return _0x29d667;}function explicitDblink(_0x484152){const _0x53375d=a71_0x5d49,_0x3e5b5a=_0x484152['flag'](_0x53375d(0xed));if(_0x3e5b5a===undefined||_0x3e5b5a===null)return undefined;const _0x3f69ab=Number(_0x3e5b5a);if(!Number['isSafeInteger'](_0x3f69ab)||_0x3f69ab<=0x0)throw CliErrors[_0x53375d(0xd9)](_0x53375d(0xcc));return _0x3f69ab;}export function validateCrossRelation(_0x1b6e5c,_0x32e056){const _0x243946=a71_0x5d49,_0xff5ae2=explicitDblink(_0x1b6e5c);if(_0x32e056===_0x243946(0xf8)){if(!_0x1b6e5c[_0x243946(0xd5)]('from-datasetcode')[_0x243946(0xa9)]()&&_0xff5ae2===undefined)throw CliErrors['validation'](_0x243946(0xee));return;}required(_0x1b6e5c,_0x243946(0xba)),required(_0x1b6e5c,_0x243946(0xc7));if(_0x32e056!==_0x243946(0xb0)){required(_0x1b6e5c,'to-datasetcode'),required(_0x1b6e5c,_0x243946(0xfc));const _0x18f00a=_0x1b6e5c[_0x243946(0xd5)]('cardinality')[_0x243946(0xa9)]();if(_0x18f00a&&!CROSS_RELATION_CARDINALITY_FLAG['enum'][_0x243946(0xae)](_0x18f00a))throw CliErrors[_0x243946(0xd9)](_0x243946(0xbd));}}async function resolveEndpoint(_0x4ba511){const _0x39055e=a71_0x5d49,_0x24332e=await getDatasetDetail(_0x4ba511),_0x217208=_0x24332e?.[_0x39055e(0xf9)]??{};if((_0x24332e?.[_0x39055e(0xb4)]??_0x217208['sourceType'])!=='DB_TABLE')throw CliErrors[_0x39055e(0xd9)](_0x39055e(0xdf)+_0x4ba511+_0x39055e(0xf1));const _0x2a2e60=_0x24332e['dbtableConfig']??_0x24332e[_0x39055e(0xbf)]??{};let _0xc0f1f9=_0x24332e[_0x39055e(0xf0)]??_0x217208[_0x39055e(0xf0)]??{};if(typeof _0xc0f1f9===_0x39055e(0xc4))try{_0xc0f1f9=_0xc0f1f9[_0x39055e(0xa9)]()?JSON['parse'](_0xc0f1f9):{};}catch{throw CliErrors['validation'](_0x39055e(0xdf)+_0x4ba511+_0x39055e(0xad));}const _0x431a43=Number(_0xc0f1f9?.[_0x39055e(0xc2)]?.['dbId']??_0x24332e[_0x39055e(0xc2)]?.[_0x39055e(0xa8)]??_0x217208[_0x39055e(0xc2)]?.[_0x39055e(0xa8)]??_0x2a2e60[_0x39055e(0xa8)]??_0x217208[_0x39055e(0xa8)]??_0x24332e[_0x39055e(0xa8)]),_0x40528c=String(_0x24332e['tableName']??_0x217208[_0x39055e(0xfd)]??_0x2a2e60['tableName']??'')[_0x39055e(0xa9)]();if(!Number[_0x39055e(0xe6)](_0x431a43)||_0x431a43<=0x0||!_0x40528c)throw CliErrors[_0x39055e(0xd9)](_0x39055e(0xdf)+_0x4ba511+_0x39055e(0xc8));return{'datasetCode':_0x4ba511,'dblinkId':_0x431a43,'table':_0x40528c};}export async function resolveCrossRelationQuery(_0x4bd3d5){const _0x528774=a71_0x5d49,_0x12816d=_0x4bd3d5[_0x528774(0xd5)](_0x528774(0xba))[_0x528774(0xa9)](),_0x2a7f4f=explicitDblink(_0x4bd3d5),_0x55fd4a=_0x12816d?await resolveEndpoint(_0x12816d):undefined;if(_0x55fd4a&&_0x2a7f4f!==undefined&&_0x55fd4a[_0x528774(0xfa)]!==_0x2a7f4f)throw CliErrors[_0x528774(0xd9)]('--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.');const _0x173393=_0x55fd4a?.['dblinkId']??_0x2a7f4f;if(_0x173393===undefined)throw CliErrors[_0x528774(0xd9)]('Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.');return{'appCode':_0x4bd3d5[_0x528774(0xb5)],'fromDblinkId':_0x173393,..._0x12816d?{'fromDatasetCode':_0x12816d}:{},..._0x4bd3d5[_0x528774(0xd5)](_0x528774(0xc7))['trim']()?{'fromField':_0x4bd3d5[_0x528774(0xd5)](_0x528774(0xc7))[_0x528774(0xa9)]()}:{}};}export function projectCrossRelation(_0x1af32d){const _0x35bbb9=a71_0x5d49;return{'relationId':_0x1af32d[_0x35bbb9(0xf5)],'from':{'source':_0x35bbb9(0xb3),'datasetCode':_0x1af32d[_0x35bbb9(0xce)],'datasetName':_0x1af32d[_0x35bbb9(0xc6)],'dblinkId':_0x1af32d[_0x35bbb9(0xd1)],'table':_0x1af32d[_0x35bbb9(0xc3)],'field':_0x1af32d[_0x35bbb9(0xcd)]},'to':{'source':'DB_TABLE','datasetCode':_0x1af32d['toDatasetCode'],'datasetName':_0x1af32d[_0x35bbb9(0xda)],'dblinkId':_0x1af32d[_0x35bbb9(0xd8)],'table':_0x1af32d[_0x35bbb9(0xb7)],'field':_0x1af32d[_0x35bbb9(0xbc)],'labelField':_0x1af32d[_0x35bbb9(0xd0)]},'relation':{'cardinality':_0x1af32d[_0x35bbb9(0xb9)],'relationType':_0x1af32d[_0x35bbb9(0xd6)]}};}function ambiguity(_0x41c3f1){const _0x43edb9=a71_0x5d49,_0x31bbe8=CliErrors['validation'](_0x43edb9(0xfb),'Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.');return Object[_0x43edb9(0xc9)](_0x31bbe8,_0x43edb9(0xd4),{'value':{'candidates':_0x41c3f1['map'](projectCrossRelation)}}),_0x31bbe8;}const sameName=(_0x1303c0,_0x36f28c)=>_0x1303c0[a71_0x11fe7b(0xa7)]()===_0x36f28c['toLowerCase']();function matchesEndpoint(_0x18d3b7,_0x19729b,_0x1573ec,_0x11e39e,_0x496fa2){const _0x47e95e=a71_0x11fe7b;return _0x18d3b7[_0x47e95e(0xd1)]===_0x19729b[_0x47e95e(0xfa)]&&sameName(_0x18d3b7[_0x47e95e(0xc3)],_0x19729b[_0x47e95e(0xc0)])&&sameName(_0x18d3b7['fromField'],_0x1573ec)&&_0x18d3b7[_0x47e95e(0xd8)]===_0x11e39e[_0x47e95e(0xfa)]&&sameName(_0x18d3b7[_0x47e95e(0xb7)],_0x11e39e['table'])&&sameName(_0x18d3b7[_0x47e95e(0xbc)],_0x496fa2);}export async function prepareCrossRelation(_0x44b8dd,_0x5bfb1c){const _0x15bee2=a71_0x11fe7b,_0x5b0fae=await resolveEndpoint(required(_0x44b8dd,_0x15bee2(0xba))),_0x141eb4=explicitDblink(_0x44b8dd);if(_0x141eb4!==undefined&&_0x5b0fae[_0x15bee2(0xfa)]!==_0x141eb4)throw CliErrors[_0x15bee2(0xd9)](_0x15bee2(0xac));const _0x26d4f9={'appCode':_0x44b8dd[_0x15bee2(0xb5)],'fromDatasetCode':_0x5b0fae[_0x15bee2(0xc5)],'fromField':required(_0x44b8dd,_0x15bee2(0xc7)),..._0x141eb4!==undefined?{'fromDblinkId':_0x141eb4}:{}},_0x34eba7={'appCode':_0x44b8dd[_0x15bee2(0xb5)],'fromDblinkId':_0x5b0fae['dblinkId'],'fromDatasetCode':_0x5b0fae[_0x15bee2(0xc5)],'fromField':_0x26d4f9[_0x15bee2(0xcd)]},_0x51aadf=await queryCrossDbRelations(_0x34eba7);let _0x4d5576=null;if(_0x5bfb1c!==_0x15bee2(0xea)){if(_0x51aadf[_0x15bee2(0xd2)]>0x1)throw ambiguity(_0x51aadf);_0x4d5576=_0x51aadf[0x0]??null;if(!_0x4d5576)throw CliErrors[_0x15bee2(0xd9)](_0x15bee2(0xe3));}if(_0x5bfb1c==='delete')return{'operation':_0x5bfb1c,'from':_0x5b0fae,'query':_0x34eba7,'body':_0x26d4f9,'before':_0x4d5576};const _0x37396b=await resolveEndpoint(required(_0x44b8dd,'to-datasetcode'));if(_0x5b0fae[_0x15bee2(0xfa)]===_0x37396b[_0x15bee2(0xfa)])throw CliErrors[_0x15bee2(0xd9)](_0x15bee2(0xd3));const _0x431456=_0x44b8dd['str'](_0x15bee2(0xe5))[_0x15bee2(0xa9)](),_0x57c531=_0x44b8dd['str']('cardinality')[_0x15bee2(0xa9)](),_0x6d0bba={..._0x26d4f9,'toDatasetCode':_0x37396b[_0x15bee2(0xc5)],'toField':required(_0x44b8dd,_0x15bee2(0xfc)),..._0x431456?{'refTableLabelName':_0x431456}:{},..._0x57c531?{'cardinality':_0x57c531}:{}};if(_0x51aadf[_0x15bee2(0xdb)](_0xff4aa8=>_0xff4aa8[_0x15bee2(0xf5)]!==_0x4d5576?.['relationId']&&matchesEndpoint(_0xff4aa8,_0x5b0fae,_0x6d0bba[_0x15bee2(0xcd)],_0x37396b,_0x6d0bba[_0x15bee2(0xbc)])))throw CliErrors[_0x15bee2(0xd9)](_0x15bee2(0xaa));return{'operation':_0x5bfb1c,'from':_0x5b0fae,'to':_0x37396b,'query':_0x34eba7,'body':_0x6d0bba,'before':_0x4d5576,'expectedLabel':_0x431456||_0x4d5576?.['refTableLabelName']||_0x6d0bba[_0x15bee2(0xbc)],'expectedCardinality':_0x57c531||_0x4d5576?.[_0x15bee2(0xb9)]||null};}function mutationData(_0x563865,_0x18cd2c,_0x35b83){const _0x4e2e74=a71_0x11fe7b,{operation:_0x31be11,body:_0x1eec53,before:_0x112beb}=_0x563865;return{'operation':_0x31be11,'selector':{'appCode':_0x1eec53['appCode'],'from':{'datasetCode':_0x1eec53[_0x4e2e74(0xce)],'field':_0x1eec53['fromField'],'dblinkId':_0x563865['from'][_0x4e2e74(0xfa)]}},'before':_0x112beb?projectCrossRelation(_0x112beb):null,'after':_0x35b83,'dryRun':_0x18cd2c,'backend':{'method':_0x4e2e74(0xe8),'path':CROSS_DB_RELATION_PATHS[_0x31be11]},'warnings':_0x31be11==='update'&&!_0x1eec53['refTableLabelName']?[{'code':'label_inherited','message':_0x4e2e74(0xeb)}]:[]};}function a71_0x3886(){const _0x46a859=['2263026ALxkxb','delete','697743TLKsyU','query','DB_TABLE','source','appCode','40nJPDLW','toTableName','expectedCardinality','cardinality','from-datasetcode','matched','toField','Invalid\x20--cardinality.','filter','dbtable','table','expectedLabel','storageProfile','fromTableName','string','datasetCode','fromDatasetName','from-column','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','defineProperty','multiple\x20cross-database\x20relations\x20matched','245443fbsInr','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','fromField','fromDatasetCode','flagMissing','refTableLabelName','fromDblinkId','length','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','data','str','relationType','154034nnMRRk','toDblinkId','validation','toDatasetName','some','17573808KfMeYc','3882108qQvgTo','apiError','Dataset\x20','3QwNLUo','before','body','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','130LGlqWT','to-label-column','isSafeInteger','Would\x20','POST','7taNIDs','create','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','catch','from-dblink-id','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','\x20write\x20was\x20not\x20verified.','extend','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','message','4597790KBcexk','\x20a\x20cross-database\x20relation\x20for\x20','relationId','from','unconfirmed','list','dataset','dblinkId','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','to-column','tableName','map','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','toLowerCase','dbId','trim','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','2bothSo','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','\x20has\x20invalid\x20storage\x20configuration.','includes'];a71_0x3886=function(){return _0x46a859;};return a71_0x3886();}export async function previewCrossRelation(_0x5ce629,_0x3803f8){const _0x55dadb=a71_0x11fe7b,_0x335169=await prepareCrossRelation(_0x5ce629,_0x3803f8),_0x3b6635=_0x335169[_0x55dadb(0xe2)],_0xb96408=_0x3803f8===_0x55dadb(0xb0)?null:{..._0x335169['before']?{'relationId':_0x335169['before'][_0x55dadb(0xf5)]}:{},'from':{'datasetCode':_0x335169[_0x55dadb(0xf6)][_0x55dadb(0xc5)],'dblinkId':_0x335169[_0x55dadb(0xf6)]['dblinkId'],'table':_0x335169[_0x55dadb(0xf6)][_0x55dadb(0xc0)],'field':_0x3b6635[_0x55dadb(0xcd)]},'to':{'datasetCode':_0x335169['to']['datasetCode'],'dblinkId':_0x335169['to'][_0x55dadb(0xfa)],'table':_0x335169['to'][_0x55dadb(0xc0)],'field':_0x3b6635[_0x55dadb(0xbc)],'labelField':_0x335169[_0x55dadb(0xc1)]},'relation':{'cardinality':_0x335169[_0x55dadb(0xb8)],'relationType':0x2}};return{...mutationData(_0x335169,!![],null),'after':_0xb96408,'method':'POST','url':CROSS_DB_RELATION_PATHS[_0x3803f8],'body':_0x335169[_0x55dadb(0xe2)],'description':_0x55dadb(0xe7)+_0x3803f8+_0x55dadb(0xf4)+_0x3b6635[_0x55dadb(0xce)]+'.'+_0x3b6635['fromField']};}export async function executeCrossRelation(_0x171a52,_0x4f764f,_0xe89347){const _0x14dae4=a71_0x11fe7b,_0x7d558b=await prepareCrossRelation(_0x171a52,_0x4f764f);try{await _0xe89347(_0x7d558b[_0x14dae4(0xe2)]);}catch(_0x3b41c1){if(_0x3b41c1 instanceof CliError&&_0x3b41c1[_0x14dae4(0xf2)][_0x14dae4(0xae)](_0x14dae4(0xca))){const _0x2db47b=await queryCrossDbRelations(_0x7d558b[_0x14dae4(0xb2)])[_0x14dae4(0xec)](()=>[]);throw ambiguity(_0x2db47b);}throw _0x3b41c1;}let _0xb901a3=[],_0x19fe78,_0x255260=![];try{_0xb901a3=await queryCrossDbRelations(_0x7d558b[_0x14dae4(0xb2)]);if(_0x4f764f===_0x14dae4(0xb0))_0x255260=!_0xb901a3[_0x14dae4(0xdb)](_0x1d89da=>_0x1d89da[_0x14dae4(0xf5)]===_0x7d558b[_0x14dae4(0xe1)][_0x14dae4(0xf5)]);else{const _0x388302=_0x7d558b[_0x14dae4(0xe2)],_0x354707=_0xb901a3[_0x14dae4(0xbe)](_0x24bfca=>matchesEndpoint(_0x24bfca,_0x7d558b['from'],_0x388302['fromField'],_0x7d558b['to'],_0x388302['toField'])&&(_0x4f764f==='create'||_0x24bfca[_0x14dae4(0xf5)]===_0x7d558b['before']['relationId']));_0x19fe78=_0x354707[_0x14dae4(0xd2)]===0x1?_0x354707[0x0]:undefined,_0x255260=!!_0x19fe78&&_0x19fe78[_0x14dae4(0xd0)]===_0x7d558b['expectedLabel']&&_0x19fe78[_0x14dae4(0xb9)]===_0x7d558b[_0x14dae4(0xb8)]&&_0x19fe78[_0x14dae4(0xd6)]===0x2;}}catch{}const _0x2ac470={...mutationData(_0x7d558b,![],_0x19fe78?projectCrossRelation(_0x19fe78):null),'verification':{'status':_0x255260?_0x14dae4(0xbb):_0x14dae4(0xf7),'verified':_0x255260}};if(!_0x255260){const _0x3e717b=CliErrors[_0x14dae4(0xde)]('Cross-database\x20relation\x20'+_0x4f764f+_0x14dae4(0xef),_0x14dae4(0xff));Object['defineProperty'](_0x3e717b,_0x14dae4(0xd4),{'value':{..._0x2ac470,'candidates':_0xb901a3[_0x14dae4(0xfe)](projectCrossRelation)}});throw _0x3e717b;}return{'ok':!![],'data':_0x2ac470,'message':'Cross-database\x20relation\x20'+_0x4f764f+'\x20verified.'};}
|
|
1
|
+
const a72_0x43a217=a72_0x2d2d;(function(_0x25dae7,_0x39eae4){const _0x360eaa=a72_0x2d2d,_0x2a9bba=_0x25dae7();while(!![]){try{const _0x2aaf59=-parseInt(_0x360eaa(0x126))/0x1*(parseInt(_0x360eaa(0x153))/0x2)+parseInt(_0x360eaa(0x120))/0x3+-parseInt(_0x360eaa(0x133))/0x4*(-parseInt(_0x360eaa(0x144))/0x5)+-parseInt(_0x360eaa(0x11e))/0x6+parseInt(_0x360eaa(0x109))/0x7*(-parseInt(_0x360eaa(0x141))/0x8)+-parseInt(_0x360eaa(0x12f))/0x9*(parseInt(_0x360eaa(0x12b))/0xa)+parseInt(_0x360eaa(0x127))/0xb*(parseInt(_0x360eaa(0x136))/0xc);if(_0x2aaf59===_0x39eae4)break;else _0x2a9bba['push'](_0x2a9bba['shift']());}catch(_0x12218f){_0x2a9bba['push'](_0x2a9bba['shift']());}}}(a72_0x2ac2,0xf0cdb));import{getDatasetDetail,queryCrossDbRelations}from'../../core/api-client.js';import{CROSS_DB_RELATION_PATHS}from'../../core/cross-db-relation.js';import{CliError,CliErrors}from'../../errors.js';import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0x26ad66,_0x2a3596){const _0x635bf=a72_0x2d2d,_0x3a41e0=_0x26ad66[_0x635bf(0x128)](_0x2a3596)[_0x635bf(0x139)]();if(!_0x3a41e0)throw CliErrors['flagMissing'](_0x2a3596);return _0x3a41e0;}function explicitDblink(_0x53defa){const _0x509e48=a72_0x2d2d,_0x56923f=_0x53defa[_0x509e48(0x111)](_0x509e48(0x156));if(_0x56923f===undefined||_0x56923f===null)return undefined;const _0x11c2ce=Number(_0x56923f);if(!Number[_0x509e48(0x116)](_0x11c2ce)||_0x11c2ce<=0x0)throw CliErrors[_0x509e48(0x140)](_0x509e48(0x155));return _0x11c2ce;}export function validateCrossRelation(_0x416846,_0x4b0ba9){const _0x4b94d6=a72_0x2d2d,_0x4a295b=explicitDblink(_0x416846);if(_0x4b0ba9===_0x4b94d6(0x14b)){if(!_0x416846['str'](_0x4b94d6(0x10e))[_0x4b94d6(0x139)]()&&_0x4a295b===undefined)throw CliErrors[_0x4b94d6(0x140)](_0x4b94d6(0x108));return;}required(_0x416846,_0x4b94d6(0x10e)),required(_0x416846,_0x4b94d6(0x14e));if(_0x4b0ba9!=='delete'){required(_0x416846,_0x4b94d6(0x150)),required(_0x416846,_0x4b94d6(0x14f));const _0x2c9608=_0x416846[_0x4b94d6(0x128)](_0x4b94d6(0x132))[_0x4b94d6(0x139)]();if(_0x2c9608&&!CROSS_RELATION_CARDINALITY_FLAG[_0x4b94d6(0x113)][_0x4b94d6(0x112)](_0x2c9608))throw CliErrors[_0x4b94d6(0x140)](_0x4b94d6(0x10f));}}async function resolveEndpoint(_0x2e6653){const _0x418db0=a72_0x2d2d,_0x3df6c4=await getDatasetDetail(_0x2e6653),_0x39b30d=_0x3df6c4?.[_0x418db0(0x115)]??{};if((_0x3df6c4?.['source']??_0x39b30d[_0x418db0(0x118)])!==_0x418db0(0x134))throw CliErrors['validation'](_0x418db0(0x114)+_0x2e6653+_0x418db0(0x119));const _0xcd150=_0x3df6c4[_0x418db0(0x122)]??_0x3df6c4[_0x418db0(0x14c)]??{};let _0xfb61d5=_0x3df6c4[_0x418db0(0x107)]??_0x39b30d[_0x418db0(0x107)]??{};if(typeof _0xfb61d5===_0x418db0(0x124))try{_0xfb61d5=_0xfb61d5[_0x418db0(0x139)]()?JSON[_0x418db0(0x13c)](_0xfb61d5):{};}catch{throw CliErrors[_0x418db0(0x140)](_0x418db0(0x114)+_0x2e6653+_0x418db0(0x12c));}const _0x3ecbf8=Number(_0xfb61d5?.['storageProfile']?.[_0x418db0(0x105)]??_0x3df6c4[_0x418db0(0x143)]?.[_0x418db0(0x105)]??_0x39b30d[_0x418db0(0x143)]?.[_0x418db0(0x105)]??_0xcd150[_0x418db0(0x105)]??_0x39b30d[_0x418db0(0x105)]??_0x3df6c4['dbId']),_0x1d5395=String(_0x3df6c4['tableName']??_0x39b30d[_0x418db0(0x10d)]??_0xcd150['tableName']??'')[_0x418db0(0x139)]();if(!Number[_0x418db0(0x116)](_0x3ecbf8)||_0x3ecbf8<=0x0||!_0x1d5395)throw CliErrors['validation'](_0x418db0(0x114)+_0x2e6653+'\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.');return{'datasetCode':_0x2e6653,'dblinkId':_0x3ecbf8,'table':_0x1d5395};}export async function resolveCrossRelationQuery(_0xc4ec0d){const _0x1f2b7b=a72_0x2d2d,_0x2bb52f=_0xc4ec0d[_0x1f2b7b(0x128)]('from-datasetcode')[_0x1f2b7b(0x139)](),_0x554a4d=explicitDblink(_0xc4ec0d),_0x11cc10=_0x2bb52f?await resolveEndpoint(_0x2bb52f):undefined;if(_0x11cc10&&_0x554a4d!==undefined&&_0x11cc10[_0x1f2b7b(0x152)]!==_0x554a4d)throw CliErrors['validation'](_0x1f2b7b(0x12d));const _0x53fef4=_0x11cc10?.[_0x1f2b7b(0x152)]??_0x554a4d;if(_0x53fef4===undefined)throw CliErrors[_0x1f2b7b(0x140)](_0x1f2b7b(0x108));return{'appCode':_0xc4ec0d[_0x1f2b7b(0x11d)],'fromDblinkId':_0x53fef4,..._0x2bb52f?{'fromDatasetCode':_0x2bb52f}:{},..._0xc4ec0d[_0x1f2b7b(0x128)](_0x1f2b7b(0x14e))[_0x1f2b7b(0x139)]()?{'fromField':_0xc4ec0d[_0x1f2b7b(0x128)](_0x1f2b7b(0x14e))[_0x1f2b7b(0x139)]()}:{}};}export function projectCrossRelation(_0x19f2d2){const _0x873f12=a72_0x2d2d;return{'relationId':_0x19f2d2[_0x873f12(0x11c)],'from':{'source':_0x873f12(0x134),'datasetCode':_0x19f2d2[_0x873f12(0x157)],'datasetName':_0x19f2d2['fromDatasetName'],'dblinkId':_0x19f2d2[_0x873f12(0x130)],'table':_0x19f2d2[_0x873f12(0x146)],'field':_0x19f2d2[_0x873f12(0x106)]},'to':{'source':_0x873f12(0x134),'datasetCode':_0x19f2d2[_0x873f12(0x104)],'datasetName':_0x19f2d2[_0x873f12(0x14d)],'dblinkId':_0x19f2d2[_0x873f12(0x131)],'table':_0x19f2d2[_0x873f12(0x147)],'field':_0x19f2d2[_0x873f12(0x110)],'labelField':_0x19f2d2[_0x873f12(0x13d)]},'relation':{'cardinality':_0x19f2d2[_0x873f12(0x132)],'relationType':_0x19f2d2[_0x873f12(0x13e)]}};}function a72_0x2d2d(_0x55a1f5,_0x2c37b6){_0x55a1f5=_0x55a1f5-0x100;const _0x2ac22d=a72_0x2ac2();let _0x2d2ddd=_0x2ac22d[_0x55a1f5];return _0x2d2ddd;}function a72_0x2ac2(){const _0x15c0d9=['label_inherited','dbtableConfig','body','string','to-label-column','308813uJkOaQ','54792034CjghUt','str','update','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','4842550HEfXfE','\x20has\x20invalid\x20storage\x20configuration.','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','apiError','36OPIfPJ','fromDblinkId','toDblinkId','cardinality','4804WNJwBi','DB_TABLE','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','12FUSCUT','datasetCode','message','trim','multiple\x20cross-database\x20relations\x20matched','create','parse','refTableLabelName','relationType','defineProperty','validation','1020664AeuCAL','before','storageProfile','675RyxSJC','expectedCardinality','fromTableName','toTableName','length','data','POST','list','dbtable','toDatasetName','from-column','to-column','to-datasetcode','unconfirmed','dblinkId','6KdVOhZ','table','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','from-dblink-id','fromDatasetCode','\x20verified.','catch','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','from','toDatasetCode','dbId','fromField','extend','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','14hPJcrG','expectedLabel','matched','toLowerCase','tableName','from-datasetcode','Invalid\x20--cardinality.','toField','flag','includes','enum','Dataset\x20','dataset','isSafeInteger','Cross-database\x20relation\x20','sourceType','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','map','delete','relationId','appCode','8304156vZOmbq','filter','1037259JQLXkU'];a72_0x2ac2=function(){return _0x15c0d9;};return a72_0x2ac2();}function ambiguity(_0x206925){const _0x41c838=a72_0x2d2d,_0x20195a=CliErrors[_0x41c838(0x140)](_0x41c838(0x135),'Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.');return Object['defineProperty'](_0x20195a,_0x41c838(0x149),{'value':{'candidates':_0x206925[_0x41c838(0x11a)](projectCrossRelation)}}),_0x20195a;}const sameName=(_0x182564,_0x23b678)=>_0x182564[a72_0x43a217(0x10c)]()===_0x23b678['toLowerCase']();function matchesEndpoint(_0x583e9d,_0x3c0253,_0x1baf7f,_0x55cc22,_0x41472f){const _0x578a28=a72_0x43a217;return _0x583e9d['fromDblinkId']===_0x3c0253[_0x578a28(0x152)]&&sameName(_0x583e9d[_0x578a28(0x146)],_0x3c0253[_0x578a28(0x154)])&&sameName(_0x583e9d['fromField'],_0x1baf7f)&&_0x583e9d[_0x578a28(0x131)]===_0x55cc22[_0x578a28(0x152)]&&sameName(_0x583e9d['toTableName'],_0x55cc22[_0x578a28(0x154)])&&sameName(_0x583e9d['toField'],_0x41472f);}export async function prepareCrossRelation(_0xa28950,_0xc8a816){const _0x8c5d32=a72_0x43a217,_0x58ec34=await resolveEndpoint(required(_0xa28950,_0x8c5d32(0x10e))),_0x15815e=explicitDblink(_0xa28950);if(_0x15815e!==undefined&&_0x58ec34[_0x8c5d32(0x152)]!==_0x15815e)throw CliErrors[_0x8c5d32(0x140)]('--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.');const _0x3fffac={'appCode':_0xa28950[_0x8c5d32(0x11d)],'fromDatasetCode':_0x58ec34[_0x8c5d32(0x137)],'fromField':required(_0xa28950,_0x8c5d32(0x14e)),..._0x15815e!==undefined?{'fromDblinkId':_0x15815e}:{}},_0x53f35b={'appCode':_0xa28950[_0x8c5d32(0x11d)],'fromDblinkId':_0x58ec34[_0x8c5d32(0x152)],'fromDatasetCode':_0x58ec34['datasetCode'],'fromField':_0x3fffac[_0x8c5d32(0x106)]},_0x49b319=await queryCrossDbRelations(_0x53f35b);let _0x4e761d=null;if(_0xc8a816!==_0x8c5d32(0x13b)){if(_0x49b319[_0x8c5d32(0x148)]>0x1)throw ambiguity(_0x49b319);_0x4e761d=_0x49b319[0x0]??null;if(!_0x4e761d)throw CliErrors[_0x8c5d32(0x140)]('Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.');}if(_0xc8a816===_0x8c5d32(0x11b))return{'operation':_0xc8a816,'from':_0x58ec34,'query':_0x53f35b,'body':_0x3fffac,'before':_0x4e761d};const _0x2379db=await resolveEndpoint(required(_0xa28950,_0x8c5d32(0x150)));if(_0x58ec34[_0x8c5d32(0x152)]===_0x2379db[_0x8c5d32(0x152)])throw CliErrors[_0x8c5d32(0x140)](_0x8c5d32(0x12a));const _0x2ee800=_0xa28950[_0x8c5d32(0x128)](_0x8c5d32(0x125))['trim'](),_0x2fc70e=_0xa28950[_0x8c5d32(0x128)]('cardinality')[_0x8c5d32(0x139)](),_0x81602c={..._0x3fffac,'toDatasetCode':_0x2379db[_0x8c5d32(0x137)],'toField':required(_0xa28950,_0x8c5d32(0x14f)),..._0x2ee800?{'refTableLabelName':_0x2ee800}:{},..._0x2fc70e?{'cardinality':_0x2fc70e}:{}};if(_0x49b319['some'](_0x3df4c6=>_0x3df4c6[_0x8c5d32(0x11c)]!==_0x4e761d?.['relationId']&&matchesEndpoint(_0x3df4c6,_0x58ec34,_0x81602c[_0x8c5d32(0x106)],_0x2379db,_0x81602c[_0x8c5d32(0x110)])))throw CliErrors['validation']('Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.');return{'operation':_0xc8a816,'from':_0x58ec34,'to':_0x2379db,'query':_0x53f35b,'body':_0x81602c,'before':_0x4e761d,'expectedLabel':_0x2ee800||_0x4e761d?.[_0x8c5d32(0x13d)]||_0x81602c['toField'],'expectedCardinality':_0x2fc70e||_0x4e761d?.[_0x8c5d32(0x132)]||null};}function mutationData(_0x1b20fc,_0x5c6406,_0x54484a){const _0x39c4e7=a72_0x43a217,{operation:_0x40f05b,body:_0x20b99f,before:_0x189603}=_0x1b20fc;return{'operation':_0x40f05b,'selector':{'appCode':_0x20b99f[_0x39c4e7(0x11d)],'from':{'datasetCode':_0x20b99f[_0x39c4e7(0x157)],'field':_0x20b99f[_0x39c4e7(0x106)],'dblinkId':_0x1b20fc[_0x39c4e7(0x103)][_0x39c4e7(0x152)]}},'before':_0x189603?projectCrossRelation(_0x189603):null,'after':_0x54484a,'dryRun':_0x5c6406,'backend':{'method':_0x39c4e7(0x14a),'path':CROSS_DB_RELATION_PATHS[_0x40f05b]},'warnings':_0x40f05b===_0x39c4e7(0x129)&&!_0x20b99f[_0x39c4e7(0x13d)]?[{'code':_0x39c4e7(0x121),'message':'The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.'}]:[]};}export async function previewCrossRelation(_0x54c4b3,_0x55f2f9){const _0x5e4a50=a72_0x43a217,_0x3ba959=await prepareCrossRelation(_0x54c4b3,_0x55f2f9),_0x12860a=_0x3ba959[_0x5e4a50(0x123)],_0x580ece=_0x55f2f9===_0x5e4a50(0x11b)?null:{..._0x3ba959[_0x5e4a50(0x142)]?{'relationId':_0x3ba959[_0x5e4a50(0x142)][_0x5e4a50(0x11c)]}:{},'from':{'datasetCode':_0x3ba959[_0x5e4a50(0x103)][_0x5e4a50(0x137)],'dblinkId':_0x3ba959[_0x5e4a50(0x103)][_0x5e4a50(0x152)],'table':_0x3ba959['from'][_0x5e4a50(0x154)],'field':_0x12860a[_0x5e4a50(0x106)]},'to':{'datasetCode':_0x3ba959['to'][_0x5e4a50(0x137)],'dblinkId':_0x3ba959['to']['dblinkId'],'table':_0x3ba959['to'][_0x5e4a50(0x154)],'field':_0x12860a['toField'],'labelField':_0x3ba959['expectedLabel']},'relation':{'cardinality':_0x3ba959[_0x5e4a50(0x145)],'relationType':0x2}};return{...mutationData(_0x3ba959,!![],null),'after':_0x580ece,'method':_0x5e4a50(0x14a),'url':CROSS_DB_RELATION_PATHS[_0x55f2f9],'body':_0x3ba959[_0x5e4a50(0x123)],'description':'Would\x20'+_0x55f2f9+'\x20a\x20cross-database\x20relation\x20for\x20'+_0x12860a[_0x5e4a50(0x157)]+'.'+_0x12860a['fromField']};}export async function executeCrossRelation(_0x22a9cf,_0x1cfb7d,_0x4c78e2){const _0x3e9120=a72_0x43a217,_0x50212e=await prepareCrossRelation(_0x22a9cf,_0x1cfb7d);try{await _0x4c78e2(_0x50212e[_0x3e9120(0x123)]);}catch(_0x4a527a){if(_0x4a527a instanceof CliError&&_0x4a527a[_0x3e9120(0x138)][_0x3e9120(0x112)](_0x3e9120(0x13a))){const _0x5c5a4b=await queryCrossDbRelations(_0x50212e['query'])[_0x3e9120(0x101)](()=>[]);throw ambiguity(_0x5c5a4b);}throw _0x4a527a;}let _0x2be596=[],_0x3ed7a5,_0xaf82aa=![];try{_0x2be596=await queryCrossDbRelations(_0x50212e['query']);if(_0x1cfb7d===_0x3e9120(0x11b))_0xaf82aa=!_0x2be596['some'](_0x118028=>_0x118028[_0x3e9120(0x11c)]===_0x50212e[_0x3e9120(0x142)]['relationId']);else{const _0xe6b326=_0x50212e[_0x3e9120(0x123)],_0xbad520=_0x2be596[_0x3e9120(0x11f)](_0x3859cd=>matchesEndpoint(_0x3859cd,_0x50212e[_0x3e9120(0x103)],_0xe6b326[_0x3e9120(0x106)],_0x50212e['to'],_0xe6b326[_0x3e9120(0x110)])&&(_0x1cfb7d===_0x3e9120(0x13b)||_0x3859cd[_0x3e9120(0x11c)]===_0x50212e[_0x3e9120(0x142)]['relationId']));_0x3ed7a5=_0xbad520[_0x3e9120(0x148)]===0x1?_0xbad520[0x0]:undefined,_0xaf82aa=!!_0x3ed7a5&&_0x3ed7a5[_0x3e9120(0x13d)]===_0x50212e[_0x3e9120(0x10a)]&&_0x3ed7a5[_0x3e9120(0x132)]===_0x50212e[_0x3e9120(0x145)]&&_0x3ed7a5[_0x3e9120(0x13e)]===0x2;}}catch{}const _0x21f9e3={...mutationData(_0x50212e,![],_0x3ed7a5?projectCrossRelation(_0x3ed7a5):null),'verification':{'status':_0xaf82aa?_0x3e9120(0x10b):_0x3e9120(0x151),'verified':_0xaf82aa}};if(!_0xaf82aa){const _0x9eca08=CliErrors[_0x3e9120(0x12e)]('Cross-database\x20relation\x20'+_0x1cfb7d+'\x20write\x20was\x20not\x20verified.',_0x3e9120(0x102));Object[_0x3e9120(0x13f)](_0x9eca08,_0x3e9120(0x149),{'value':{..._0x21f9e3,'candidates':_0x2be596[_0x3e9120(0x11a)](projectCrossRelation)}});throw _0x9eca08;}return{'ok':!![],'data':_0x21f9e3,'message':_0x3e9120(0x117)+_0x1cfb7d+_0x3e9120(0x100)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a73_0x1b25(_0x56ddaa,_0x5657b7){_0x56ddaa=_0x56ddaa-0x141;const _0x1346b6=a73_0x1346();let _0x1b25a7=_0x1346b6[_0x56ddaa];return _0x1b25a7;}const a73_0x4d618c=a73_0x1b25;(function(_0xe4a478,_0x4dbd3e){const _0x452bf4=a73_0x1b25,_0x25c650=_0xe4a478();while(!![]){try{const _0x1e0824=-parseInt(_0x452bf4(0x145))/0x1*(parseInt(_0x452bf4(0x144))/0x2)+parseInt(_0x452bf4(0x146))/0x3+parseInt(_0x452bf4(0x14a))/0x4+parseInt(_0x452bf4(0x141))/0x5*(parseInt(_0x452bf4(0x14d))/0x6)+-parseInt(_0x452bf4(0x143))/0x7+-parseInt(_0x452bf4(0x149))/0x8*(-parseInt(_0x452bf4(0x14c))/0x9)+parseInt(_0x452bf4(0x142))/0xa*(-parseInt(_0x452bf4(0x147))/0xb);if(_0x1e0824===_0x4dbd3e)break;else _0x25c650['push'](_0x25c650['shift']());}catch(_0x3c1009){_0x25c650['push'](_0x25c650['shift']());}}}(a73_0x1346,0x37c0f));function a73_0x1346(){const _0xb2c499=['562AFbaeN','673fUvEXD','937722vXBKXt','3232438geBJdu','cross-relation-update','200yvrNir','1062184DHWiNk','write','122571KHmbBV','37956HxLzxm','update','170IuTlnC','20ntAjiz','899381DUghFv'];a73_0x1346=function(){return _0xb2c499;};return a73_0x1346();}import{updateCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationUpdate={'service':'dataset','command':a73_0x4d618c(0x148),'description':'Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','risk':a73_0x4d618c(0x14b),'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 _0x5176dc=>validateCrossRelation(_0x5176dc,'update'),'dryRun':_0x56dddd=>previewCrossRelation(_0x56dddd,a73_0x4d618c(0x14e)),'execute':_0x181a7c=>executeCrossRelation(_0x181a7c,a73_0x4d618c(0x14e),updateCrossDbRelation)};
|