@lovrabet/rabetbase-cli 2.5.11-beta.1 → 2.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.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/context.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/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 +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f6f7c,_0x5b9cee){const _0x48a3be=a60_0xe70c,_0x4ce3d4=_0x4f6f7c();while(!![]){try{const _0x36ab45=parseInt(_0x48a3be(0x115))/0x1*(parseInt(_0x48a3be(0x117))/0x2)+-parseInt(_0x48a3be(0x111))/0x3+-parseInt(_0x48a3be(0x11a))/0x4*(parseInt(_0x48a3be(0x119))/0x5)+parseInt(_0x48a3be(0x114))/0x6*(-parseInt(_0x48a3be(0x11c))/0x7)+parseInt(_0x48a3be(0x11b))/0x8*(parseInt(_0x48a3be(0x112))/0x9)+parseInt(_0x48a3be(0x118))/0xa*(-parseInt(_0x48a3be(0x116))/0xb)+parseInt(_0x48a3be(0x110))/0xc*(parseInt(_0x48a3be(0x113))/0xd);if(_0x36ab45===_0x5b9cee)break;else _0x4ce3d4['push'](_0x4ce3d4['shift']());}catch(_0x4b01a7){_0x4ce3d4['push'](_0x4ce3d4['shift']());}}}(a60_0xab8d,0xba648));import{configListDefinition}from'../../commands/config/list.js';function a60_0xab8d(){const _0x287b32=['2988855lrmWnr','9MHLyJY','57675657reZdTC','228FYtuGj','56678SpOSoN','55TvTiLN','20DVAiLK','2439740dIGeMc','7072145RtKHRj','4EeyJut','3518568bOUQmm','193263NAyOQQ','12segyOW'];a60_0xab8d=function(){return _0x287b32;};return a60_0xab8d();}import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';function a60_0xe70c(_0x250962,_0x39c8e1){_0x250962=_0x250962-0x110;const _0xab8d50=a60_0xab8d();let _0xe70c29=_0xab8d50[_0x250962];return _0xe70c29;}import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a61_0x6cdeb0=a61_0x48b6;(function(_0x25a820,_0xd87baa){const _0x2da792=a61_0x48b6,_0x531278=_0x25a820();while(!![]){try{const _0x6216aa=parseInt(_0x2da792(0xbb))/0x1*(parseInt(_0x2da792(0xb0))/0x2)+-parseInt(_0x2da792(0xbc))/0x3+parseInt(_0x2da792(0xc5))/0x4*(parseInt(_0x2da792(0x9e))/0x5)+parseInt(_0x2da792(0x9b))/0x6*(-parseInt(_0x2da792(0x99))/0x7)+parseInt(_0x2da792(0xaf))/0x8*(-parseInt(_0x2da792(0xa7))/0x9)+parseInt(_0x2da792(0xca))/0xa+parseInt(_0x2da792(0xa4))/0xb;if(_0x6216aa===_0xd87baa)break;else _0x531278['push'](_0x531278['shift']());}catch(_0x56b2a2){_0x531278['push'](_0x531278['shift']());}}}(a61_0x5e3d,0x78407));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a61_0x48b6(_0x146bb6,_0x39e86d){_0x146bb6=_0x146bb6-0x96;const _0x5e3d55=a61_0x5e3d();let _0x48b6eb=_0x5e3d55[_0x146bb6];return _0x48b6eb;}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_0x5e3d(){const _0x22302e=['certificateDomain','\x22\x20is\x20not\x20currently\x20available.','Custom\x20local\x20callback\x20HTTPS\x20origin','validation','keys','103FVAVxp','1747404FGuSEg','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','label','certificate-domain','Custom\x20certificate\x20service\x20HTTPS\x20origin','mode','Available\x20regions:\x20','domains','918560iEiuqT','map','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','user-domain','nonInteractive','994300KPLMdt','localDomain','region','runtime-domain','skill-domain','join','Select\x20Lovrabet\x20region','kb-domain','Official\x20Lovrabet\x20region:\x20','2681XATIMV','Custom\x20platform\x20API\x20HTTPS\x20origin','10662rdOeOo','cancelled','independent','5jINFIt','enterprise-v1','str','project','Custom\x20KB\x20Service\x20HTTPS\x20origin','cdn','24713843BlWcKJ','ExitPromptError','kb-service-domain','126Ozbvvg','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','init','manifestDomains','Custom\x20knowledge-base\x20HTTPS\x20origin','string','config','length','507928QVCEZQ','1334gUcpeB','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','Custom\x20Runtime\x20HTTPS\x20origin','Custom\x20User\x20HTTPS\x20origin','Region\x20\x22','app-domain'];a61_0x5e3d=function(){return _0x22302e;};return a61_0x5e3d();}import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a61_0x6cdeb0(0xcc),'type':'string','description':a61_0x6cdeb0(0x98)+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'domain-config','type':a61_0x6cdeb0(0xac),'description':'Independent-deployment\x20Domain\x20JSON\x20file'},{'name':a61_0x6cdeb0(0xc8),'type':a61_0x6cdeb0(0xac),'description':a61_0x6cdeb0(0xb3)},{'name':'api-domain','type':a61_0x6cdeb0(0xac),'description':a61_0x6cdeb0(0x9a)},{'name':a61_0x6cdeb0(0xcd),'type':a61_0x6cdeb0(0xac),'description':a61_0x6cdeb0(0xb2)},{'name':a61_0x6cdeb0(0xce),'type':a61_0x6cdeb0(0xac),'description':'Custom\x20SkillHub\x20HTTPS\x20origin'},{'name':a61_0x6cdeb0(0x97),'type':a61_0x6cdeb0(0xac),'description':a61_0x6cdeb0(0xab)},{'name':a61_0x6cdeb0(0xa6),'type':a61_0x6cdeb0(0xac),'description':a61_0x6cdeb0(0xa2)},{'name':a61_0x6cdeb0(0xb5),'type':'string','description':a61_0x6cdeb0(0xa8)},{'name':'local-domain','type':a61_0x6cdeb0(0xac),'description':a61_0x6cdeb0(0xb8)},{'name':a61_0x6cdeb0(0xc0),'type':a61_0x6cdeb0(0xac),'description':a61_0x6cdeb0(0xc1)}];async function resolveRegion(_0x1b6f60){const _0x157bad=a61_0x6cdeb0,_0x347f29=_0x1b6f60[_0x157bad(0xa0)](_0x157bad(0xcc));if(_0x347f29){if(!isEnabledLovrabetRegion(_0x347f29))throw CliErrors[_0x157bad(0xb9)](_0x157bad(0xb4)+_0x347f29+_0x157bad(0xb7),_0x157bad(0xc3)+ENABLED_LOVRABET_REGION_VALUES[_0x157bad(0xcf)](',\x20'));return _0x347f29;}if(_0x1b6f60[_0x157bad(0xc9)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x157bad(0x96),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x157bad(0xc6)](_0x350369=>({'name':getOfficialRoutingProfile(_0x350369)[_0x157bad(0xbf)]+'\x20('+_0x350369+')','value':_0x350369}))});}catch(_0x4aec3c){if(_0x4aec3c?.['name']===_0x157bad(0xa5))throw CliErrors[_0x157bad(0x9c)]();throw _0x4aec3c;}}export async function executeConfigInit(_0x315703){const _0x212aa0=a61_0x6cdeb0,_0x4a37ec=resolveDomainConfigInput(_0x315703),_0xf9c408=_0x4a37ec[_0x212aa0(0xc4)],_0xae027a=Object[_0x212aa0(0xba)](_0xf9c408)[_0x212aa0(0xae)]>0x0;if(_0xae027a&&_0x315703['str']('region'))throw CliErrors[_0x212aa0(0xb9)]('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');if(!!_0xf9c408[_0x212aa0(0xcb)]!==!!_0xf9c408[_0x212aa0(0xb6)])throw CliErrors['validation'](_0x212aa0(0xb1));const _0x22e00d=_0x315703['bool']('global')?'global':_0x212aa0(0xa1),_0x1294e0=readScopedConfig(_0x22e00d);for(const _0x51ffcb of DOMAIN_CONFIG_FIELDS)delete _0x1294e0[_0x51ffcb];for(const _0x5391fd of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x1294e0[_0x5391fd];delete _0x1294e0['routing'];let _0x29f3fa=null;if(_0xae027a)delete _0x1294e0['region'],_0x4a37ec[_0x212aa0(0xc2)]===_0x212aa0(0x9f)?_0x1294e0['routing']={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x4a37ec[_0x212aa0(0xaa)],'cdn':_0x4a37ec[_0x212aa0(0xa3)]}:Object['assign'](_0x1294e0,_0xf9c408);else{_0x29f3fa=await resolveRegion(_0x315703);if(_0x29f3fa===DEFAULT_LOVRABET_REGION)delete _0x1294e0[_0x212aa0(0xcc)];else _0x1294e0[_0x212aa0(0xcc)]=_0x29f3fa;}return writeScopedConfig(_0x1294e0,_0x22e00d),{'ok':!![],'message':_0xae027a?_0x212aa0(0xbe)+Object[_0x212aa0(0xba)](_0x4a37ec[_0x212aa0(0xc2)]===_0x212aa0(0x9f)?_0x4a37ec['manifestDomains']:_0xf9c408)['join'](',\x20')+'.':_0x212aa0(0xbd)+_0x29f3fa+'.','data':{'mode':_0xae027a?_0x212aa0(0x9d):'official','protocol':_0x4a37ec['mode']===_0x212aa0(0x9f)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x29f3fa,'domains':_0xf9c408,'cdn':_0x4a37ec[_0x212aa0(0xc2)]==='enterprise-v1'?_0x4a37ec['cdn']:undefined}};}export const configInitDefinition={'service':a61_0x6cdeb0(0xad),'command':a61_0x6cdeb0(0xa9),'description':a61_0x6cdeb0(0xc7),'risk':'write','confirmationDescription':'Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x3b5f4a=a62_0x5e1a;(function(_0xdc4235,_0x532893){const _0x2ec8ce=a62_0x5e1a,_0x3ece97=_0xdc4235();while(!![]){try{const _0x3b3b80=-parseInt(_0x2ec8ce(0x177))/0x1*(-parseInt(_0x2ec8ce(0x16f))/0x2)+-parseInt(_0x2ec8ce(0x178))/0x3*(parseInt(_0x2ec8ce(0x175))/0x4)+parseInt(_0x2ec8ce(0x17c))/0x5*(parseInt(_0x2ec8ce(0x179))/0x6)+parseInt(_0x2ec8ce(0x17d))/0x7+-parseInt(_0x2ec8ce(0x17a))/0x8+parseInt(_0x2ec8ce(0x171))/0x9+-parseInt(_0x2ec8ce(0x170))/0xa;if(_0x3b3b80===_0x532893)break;else _0x3ece97['push'](_0x3ece97['shift']());}catch(_0x1612fd){_0x3ece97['push'](_0x3ece97['shift']());}}}(a62_0x1e08,0x9b629));function a62_0x1e08(){const _0x5d0c40=['183724eExtPf','config','59aVYSzp','39dCxrgW','185844sASMXC','2389440gxRslt','List\x20all\x20config\x20values','35MeuSzC','3784396uGEQrF','8846OPntGx','2830460auoFyq','7171947QpjMVQ','read','bool','global'];a62_0x1e08=function(){return _0x5d0c40;};return a62_0x1e08();}function a62_0x5e1a(_0xdd79c0,_0x569396){_0xdd79c0=_0xdd79c0-0x16f;const _0x1e08de=a62_0x1e08();let _0x5e1aad=_0x1e08de[_0xdd79c0];return _0x5e1aad;}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0xaf6cbf){const _0x335cf7=a62_0x5e1a,_0x9a9987=_0xaf6cbf[_0x335cf7(0x173)](_0x335cf7(0x174))?readScopedConfig(_0x335cf7(0x174)):readConfig();return{'ok':!![],'data':_0x9a9987};}export const configListDefinition={'service':a62_0x3b5f4a(0x176),'command':'list','description':a62_0x3b5f4a(0x17b),'risk':a62_0x3b5f4a(0x172),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x3b5f4a(0x174),'type':'boolean','description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0xcf47b2=a63_0x354e;(function(_0x53f59c,_0x41a1e4){const _0x38c2f8=a63_0x354e,_0x243f41=_0x53f59c();while(!![]){try{const _0x3f8b65=parseInt(_0x38c2f8(0x1eb))/0x1*(-parseInt(_0x38c2f8(0x1dc))/0x2)+-parseInt(_0x38c2f8(0x1c9))/0x3*(-parseInt(_0x38c2f8(0x1bf))/0x4)+-parseInt(_0x38c2f8(0x1e5))/0x5+parseInt(_0x38c2f8(0x1be))/0x6*(-parseInt(_0x38c2f8(0x1e8))/0x7)+-parseInt(_0x38c2f8(0x1e7))/0x8+parseInt(_0x38c2f8(0x1d8))/0x9+parseInt(_0x38c2f8(0x1b8))/0xa;if(_0x3f8b65===_0x41a1e4)break;else _0x243f41['push'](_0x243f41['shift']());}catch(_0x5ee2e5){_0x243f41['push'](_0x243f41['shift']());}}}(a63_0x3806,0x9bf45));function a63_0x354e(_0x1da809,_0x8be609){_0x1da809=_0x1da809-0x1b7;const _0x3806e9=a63_0x3806();let _0x354eef=_0x3806e9[_0x1da809];return _0x354eef;}function a63_0x3806(){const _0x33e97f=['28FAQRAX','Top-level\x20key\x20\x22','key','120721bMkhfT','Invalid\x20locale\x20value.','36022260EkhNal','boolean','appcode','global','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','length','986652IhBBvN','11372BukWxS','keys','\x20set\x20to:\x20','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Project','\x22\x20is\x20not\x20settable.','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','set','Usage:\x20','`,\x20`','1146FYzTit','Use\x20`','Config\x20value','config','Settable\x20top-level\x20keys:\x20','write','Invalid\x20value\x20for\x20\x22','locale','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','apps','string','validation','Set\x20a\x20config\x20value','env','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','168642dGfpkB','riskLevel','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','app','20syDbWy','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','includes','bool','\x22.\x20Allowed:\x20','value','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','\x20workspace\x20add\x20<name>\x20--appcode\x20','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','4770965wDfvlS','str','9992240wJkfrp'];a63_0x3806=function(){return _0x33e97f;};return a63_0x3806();}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x4047a0){const _0x32d059=a63_0x354e,_0x18fe74=_0x4047a0[_0x32d059(0x1e6)](_0x32d059(0x1ea)),_0x5f2ea0=_0x4047a0[_0x32d059(0x1e6)](_0x32d059(0x1e1));if(!_0x18fe74)throw CliErrors[_0x32d059(0x1d4)]('Missing\x20key.',_0x32d059(0x1c7)+CLI_BIN_NAME+_0x32d059(0x1da));if(_0x5f2ea0===undefined||_0x5f2ea0==='')throw CliErrors['validation']('Missing\x20value.',_0x32d059(0x1c7)+CLI_BIN_NAME+_0x32d059(0x1da));let _0x16fcbe=_0x18fe74,_0x24aaef=_0x5f2ea0;if(_0x5f2ea0[_0x32d059(0x1bd)]>0x1f4)throw CliErrors[_0x32d059(0x1d4)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(_0x18fe74===_0x32d059(0x1d9))throw CliErrors[_0x32d059(0x1d4)](_0x32d059(0x1bc));if(!isTopLevelConfigKey(_0x18fe74))throw CliErrors[_0x32d059(0x1d4)](_0x32d059(0x1e9)+_0x18fe74+_0x32d059(0x1c4),_0x32d059(0x1cd)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x18fe74]&&!CONFIG_ENUM_VALUES[_0x18fe74][_0x32d059(0x1de)](_0x5f2ea0))throw CliErrors[_0x32d059(0x1d4)](_0x32d059(0x1cf)+_0x18fe74+_0x32d059(0x1e0)+CONFIG_ENUM_VALUES[_0x18fe74]['join'](',\x20'));if(_0x18fe74===_0x32d059(0x1d0)&&!normalizeLocale(_0x5f2ea0))throw CliErrors[_0x32d059(0x1d4)](_0x32d059(0x1b7),_0x32d059(0x1d1));DOMAIN_CONFIG_FIELDS[_0x32d059(0x1de)](_0x18fe74)&&(_0x24aaef=normalizeDomainOrigin(_0x18fe74,_0x5f2ea0));const _0x5601c8={'global':_0x4047a0[_0x32d059(0x1df)](_0x32d059(0x1bb))},_0x58886f=resolveWriteScope(_0x5601c8),_0x5a42e0=readScopedConfig(_0x58886f);_0x18fe74===_0x32d059(0x1db)&&(_0x16fcbe=_0x32d059(0x1ba),delete _0x5a42e0['app']);_0x18fe74===_0x32d059(0x1d0)&&(_0x24aaef=normalizeLocale(_0x5f2ea0));if(_0x18fe74===_0x32d059(0x1d6)){_0x24aaef=normalizeEnv(_0x5f2ea0);if(!isProduction(_0x24aaef)&&!isDaily(_0x24aaef))throw CliErrors[_0x32d059(0x1d4)](_0x32d059(0x1c5),_0x32d059(0x1e4));}if(_0x18fe74===_0x32d059(0x1ba)){const _0x58ef81=_0x5a42e0[_0x32d059(0x1d2)]&&typeof _0x5a42e0[_0x32d059(0x1d2)]==='object'?Object[_0x32d059(0x1c0)](_0x5a42e0[_0x32d059(0x1d2)]):[];if(_0x58ef81['length']>0x0)throw CliErrors[_0x32d059(0x1d4)](_0x32d059(0x1dd),_0x32d059(0x1ca)+CLI_BIN_NAME+_0x32d059(0x1e3)+_0x24aaef+_0x32d059(0x1c8)+CLI_BIN_NAME+_0x32d059(0x1d7));const _0x2b74dd=buildCanonicalProjectConfig({..._0x5a42e0},{'appCodes':[_0x24aaef],'env':typeof _0x5a42e0['env']===_0x32d059(0x1d3)?_0x5a42e0[_0x32d059(0x1d6)]:undefined});writeScopedConfig(_0x2b74dd,_0x58886f);const _0x5adb68=_0x58886f===_0x32d059(0x1bb)?'Global':_0x32d059(0x1c3);return{'ok':!![],'message':'✓\x20'+_0x5adb68+'\x20appcode\x20set\x20to:\x20'+_0x24aaef+_0x32d059(0x1e2)};}_0x5a42e0[_0x16fcbe]=_0x24aaef,writeScopedConfig(_0x5a42e0,_0x58886f);const _0x1b402b=_0x58886f===_0x32d059(0x1bb)?'Global':_0x32d059(0x1c3);return{'ok':!![],'message':'✓\x20'+_0x1b402b+'\x20'+_0x16fcbe+_0x32d059(0x1c1)+_0x24aaef};}export const configSetDefinition={'service':a63_0xcf47b2(0x1cc),'command':a63_0xcf47b2(0x1c6),'description':a63_0xcf47b2(0x1d5),'risk':a63_0xcf47b2(0x1ce),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a63_0xcf47b2(0x1d3),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a63_0xcf47b2(0x1e1),'type':'string','description':a63_0xcf47b2(0x1cb),'required':!![]},{'name':a63_0xcf47b2(0x1bb),'type':a63_0xcf47b2(0x1b9),'description':a63_0xcf47b2(0x1c2),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49c3a8,_0x5477b5){var _0x934c46=a64_0x6627,_0x6b1e15=_0x49c3a8();while(!![]){try{var _0x2d0f85=-parseInt(_0x934c46(0x190))/0x1*(-parseInt(_0x934c46(0x185))/0x2)+-parseInt(_0x934c46(0x18f))/0x3*(-parseInt(_0x934c46(0x187))/0x4)+parseInt(_0x934c46(0x184))/0x5+-parseInt(_0x934c46(0x182))/0x6+parseInt(_0x934c46(0x189))/0x7*(-parseInt(_0x934c46(0x186))/0x8)+parseInt(_0x934c46(0x183))/0x9*(parseInt(_0x934c46(0x18a))/0xa)+parseInt(_0x934c46(0x192))/0xb*(-parseInt(_0x934c46(0x18c))/0xc);if(_0x2d0f85===_0x5477b5)break;else _0x6b1e15['push'](_0x6b1e15['shift']());}catch(_0x2e078a){_0x6b1e15['push'](_0x6b1e15['shift']());}}}(a64_0x2147,0x1ff6a));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x797ceb){var _0xf07391=a64_0x6627;if(_0x797ceb['global'])return _0xf07391(0x18b);if(!isInProject())throw CliErrors[_0xf07391(0x191)](_0xf07391(0x18d),_0xf07391(0x18e)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0xf07391(0x188);}export function readScopedConfig(_0x12040e){return readConfigFile(resolveWriteConfigPath(_0x12040e));}function a64_0x2147(){var _0x33ce11=['Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','9CYrEFO','547IvjSnN','validation','88ElKakT','782742orfjxH','126RqPDCe','928465WYfjtf','202YnBrvf','104piASWq','60968koQnWV','project','21007NFmibd','92170qfVEWW','global','172968cfXuGw','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).'];a64_0x2147=function(){return _0x33ce11;};return a64_0x2147();}function a64_0x6627(_0x2ab7d0,_0x2f6609){_0x2ab7d0=_0x2ab7d0-0x182;var _0x214719=a64_0x2147();var _0x66277c=_0x214719[_0x2ab7d0];return _0x66277c;}export function writeScopedConfig(_0x25e3eb,_0x2b8c22){writeConfigFile(resolveWriteConfigPath(_0x2b8c22),_0x25e3eb);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x460371=a65_0x38dc;(function(_0x514b02,_0x65c680){const _0x46914e=a65_0x38dc,_0x285152=_0x514b02();while(!![]){try{const _0x443634=-parseInt(_0x46914e(0xa1))/0x1+parseInt(_0x46914e(0x94))/0x2+parseInt(_0x46914e(0x89))/0x3+parseInt(_0x46914e(0xad))/0x4+-parseInt(_0x46914e(0xe3))/0x5+-parseInt(_0x46914e(0xd6))/0x6+-parseInt(_0x46914e(0xc6))/0x7*(-parseInt(_0x46914e(0xda))/0x8);if(_0x443634===_0x65c680)break;else _0x285152['push'](_0x285152['shift']());}catch(_0x350a75){_0x285152['push'](_0x285152['shift']());}}}(a65_0x4bff,0x4e4c6));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set(['MANY_TO_ONE',a65_0x460371(0xd3)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x460371(0xd5),a65_0x460371(0xb2),'DATETIME',a65_0x460371(0x82),a65_0x460371(0x90),'MULTI_SELECT','DATE_RANGE',a65_0x460371(0x8c),a65_0x460371(0x9d),'UPLOAD']);export function isDatasetBatchDesign(_0x4d5df5){const _0x289d94=a65_0x460371;return isObject(_0x4d5df5)&&_0x4d5df5[_0x289d94(0xe7)]===_0x289d94(0xb9);}export function validateDatasetBatchDesign(_0xd37eda){const _0x5b0b20=a65_0x460371;(!isObject(_0xd37eda)||_0xd37eda[_0x5b0b20(0xe7)]!==_0x5b0b20(0xb9))&&fail('Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.');_0xd37eda[_0x5b0b20(0x9c)]!==0x1&&fail('Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.');const _0x12ea52=objectArray(_0xd37eda['datasets'],_0x5b0b20(0xe1),0x1,0x14),_0x136421=objectArray(_0xd37eda[_0x5b0b20(0xd7)],_0x5b0b20(0xd7),0x0,0xc8),_0x11ea5e=objectArray(_0xd37eda['unresolvedRelations'],_0x5b0b20(0xa0),0x0,0xc8),_0x29c39d=new Set(),_0x2a9977=new Map();for(const [_0x1a2926,_0x1f3e6d]of _0x12ea52[_0x5b0b20(0xaf)]()){const _0x495564=requiredString(_0x1f3e6d[_0x5b0b20(0xb0)],_0x5b0b20(0xa4)+_0x1a2926+_0x5b0b20(0x9a));!LOCAL_KEY[_0x5b0b20(0xbf)](_0x495564)&&fail(_0x5b0b20(0xa4)+_0x1a2926+_0x5b0b20(0xd8)+LOCAL_KEY[_0x5b0b20(0xdd)]+'.');_0x29c39d['has'](_0x495564)&&fail(_0x5b0b20(0xb5));_0x29c39d[_0x5b0b20(0x91)](_0x495564);!isObject(_0x1f3e6d[_0x5b0b20(0xc1)])&&fail(_0x5b0b20(0xa4)+_0x1a2926+'].design\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x1f3e6d[_0x5b0b20(0xc1)],_0x5b0b20(0xa4)+_0x1a2926+'].design');if(!isObject(_0x1f3e6d[_0x5b0b20(0xc1)][_0x5b0b20(0xd1)]))fail(_0x5b0b20(0xa4)+_0x1a2926+_0x5b0b20(0xeb));rejectServerDatasetIdentity(_0x1f3e6d['design'][_0x5b0b20(0xd1)],'datasets['+_0x1a2926+_0x5b0b20(0xc2)),requiredString(_0x1f3e6d[_0x5b0b20(0xc1)][_0x5b0b20(0xd1)]['datasetName'],_0x5b0b20(0xa4)+_0x1a2926+_0x5b0b20(0xa9));'relations'in _0x1f3e6d[_0x5b0b20(0xc1)]&&(!Array[_0x5b0b20(0xdc)](_0x1f3e6d['design'][_0x5b0b20(0xd7)])||_0x1f3e6d['design']['relations'][_0x5b0b20(0xe4)]!==0x0)&&fail('datasets['+_0x1a2926+_0x5b0b20(0xdb));const _0x50ff55=objectArray(_0x1f3e6d[_0x5b0b20(0xc1)][_0x5b0b20(0x97)],_0x5b0b20(0xa4)+_0x1a2926+_0x5b0b20(0x8b),0x1,0xc8),_0x19390a=new Map();for(const [_0x49153f,_0x4498f6]of _0x50ff55[_0x5b0b20(0xaf)]()){const _0x5aab60=fieldName(_0x4498f6);if(!_0x5aab60)fail(_0x5b0b20(0xa4)+_0x1a2926+_0x5b0b20(0x9f)+_0x49153f+_0x5b0b20(0xa5));const _0x815bab=_0x5aab60[_0x5b0b20(0x93)]();if(_0x19390a[_0x5b0b20(0x86)](_0x815bab))fail(_0x5b0b20(0xc9)+_0x495564+'\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.');const _0x5ea555=stringValue(_0x4498f6[_0x5b0b20(0xac)]??_0x4498f6[_0x5b0b20(0xbc)])[_0x5b0b20(0xbd)]();if(!SUPPORTED_FIELD_TYPES[_0x5b0b20(0x86)](_0x5ea555))fail(_0x5b0b20(0xa4)+_0x1a2926+_0x5b0b20(0x9f)+_0x49153f+_0x5b0b20(0xd4));_0x19390a[_0x5b0b20(0x9b)](_0x815bab,_0x5ea555),[_0x4498f6['refTable'],_0x4498f6[_0x5b0b20(0xd9)],_0x4498f6['refTableLabelField']][_0x5b0b20(0xce)](_0x469993=>stringValue(_0x469993))&&fail('datasets['+_0x1a2926+_0x5b0b20(0x9f)+_0x49153f+_0x5b0b20(0xea));}_0x2a9977[_0x5b0b20(0x9b)](_0x495564,_0x19390a);}const _0x14494e=new Set(),_0x95fc3f=new Set();for(const [_0x28682d,_0x1347a5]of _0x136421[_0x5b0b20(0xaf)]()){const _0x10bba9=validateRelation(_0x1347a5,_0x28682d,_0x29c39d,_0x2a9977);if(_0x14494e[_0x5b0b20(0x86)](_0x10bba9))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0x14494e[_0x5b0b20(0x91)](_0x10bba9);const _0x26f102=_0x10bba9[_0x5b0b20(0xae)]('\x00',0x2)[_0x5b0b20(0xe5)]('\x00');if(_0x95fc3f['has'](_0x26f102))fail(_0x5b0b20(0x96));_0x95fc3f[_0x5b0b20(0x91)](_0x26f102);}for(const [_0xcba705,_0x5cc3f3]of _0x11ea5e[_0x5b0b20(0xaf)]()){requiredString(_0x5cc3f3[_0x5b0b20(0xca)],_0x5b0b20(0xa8)+_0xcba705+'].reason'),validateConfidence(_0x5cc3f3[_0x5b0b20(0x8a)],_0x5b0b20(0xa8)+_0xcba705+_0x5b0b20(0xba));}return _0xd37eda;}export function reconcileBatchResult(_0x5b08af){const _0x4a59aa=a65_0x460371;if(!isObject(_0x5b08af))return null;try{const _0x4897a2=stringArray(_0x5b08af[_0x4a59aa(0xbe)],_0x4a59aa(0xbe),0x1,0x14),_0x2064ee=new Set(_0x4897a2);if(_0x2064ee[_0x4a59aa(0x98)]!==_0x4897a2[_0x4a59aa(0xe4)]||_0x4897a2[_0x4a59aa(0xce)](_0x36b06f=>!LOCAL_KEY[_0x4a59aa(0xbf)](_0x36b06f)))return null;const _0x5dee93=objectArray(_0x5b08af['createdDatasets'],_0x4a59aa(0xde),0x1,0x14),_0x269fed=new Map(),_0x28f55c=new Set();for(const _0x59b588 of _0x5dee93){const _0x896ac=requiredString(_0x59b588['localKey'],_0x4a59aa(0xd0)),_0x6648e6=requiredString(_0x59b588[_0x4a59aa(0xaa)]??_0x59b588[_0x4a59aa(0x92)],_0x4a59aa(0xcc));if(_0x269fed[_0x4a59aa(0x86)](_0x896ac)||_0x28f55c[_0x4a59aa(0x86)](_0x6648e6))return null;_0x269fed[_0x4a59aa(0x9b)](_0x896ac,_0x6648e6),_0x28f55c[_0x4a59aa(0x91)](_0x6648e6);}if(!sameSet(_0x2064ee,new Set(_0x269fed[_0x4a59aa(0xb4)]())))return null;const _0x55035f=objectArray(_0x5b08af[_0x4a59aa(0xe6)],_0x4a59aa(0xe6),0x0,0xc8),_0x3b6f3e=objectArray(_0x5b08af['createdRelations'],_0x4a59aa(0xc8),0x0,0xc8),_0x48535a=relationTupleSet(_0x55035f,![],_0x269fed),_0xd86ee7=relationTupleSet(_0x3b6f3e,!![],_0x269fed);if(!_0x48535a||!_0xd86ee7||!sameSet(_0x48535a,_0xd86ee7))return null;const _0x124efe=objectArray(_0x5b08af[_0x4a59aa(0xa0)],_0x4a59aa(0xa0),0x0,0xc8);return{'expectedLocalKeys':_0x4897a2,'expectedRelations':_0x55035f,'createdDatasets':_0x5dee93,'createdRelations':_0x3b6f3e,'unresolvedRelations':_0x124efe,...isObject(_0x5b08af[_0x4a59aa(0xe0)])?{'metrics':_0x5b08af[_0x4a59aa(0xe0)]}:{}};}catch{return null;}}function validateRelation(_0x8013dc,_0x450cd6,_0x261e0a,_0x1dde7e){const _0x13ebc9=a65_0x460371,_0x59770d='relations['+_0x450cd6+']',_0xd48fdd=requiredString(_0x8013dc[_0x13ebc9(0x99)],_0x59770d+_0x13ebc9(0xe9)),_0x5c5d98=requiredString(_0x8013dc[_0x13ebc9(0xa3)],_0x59770d+_0x13ebc9(0x85)),_0x273ad8=requiredString(_0x8013dc[_0x13ebc9(0xe2)],_0x59770d+_0x13ebc9(0xbb))[_0x13ebc9(0x93)](),_0x16fc2c=requiredString(_0x8013dc[_0x13ebc9(0x84)],_0x59770d+_0x13ebc9(0xa2))['toLowerCase']();if(!_0x261e0a[_0x13ebc9(0x86)](_0xd48fdd)||!_0x261e0a['has'](_0x5c5d98))fail(_0x59770d+_0x13ebc9(0xa7));const _0x5d0d14=_0x1dde7e[_0x13ebc9(0xc3)](_0xd48fdd)?.[_0x13ebc9(0xc3)](_0x273ad8),_0x417d8f=_0x1dde7e[_0x13ebc9(0xc3)](_0x5c5d98)?.[_0x13ebc9(0xc3)](_0x16fc2c);if(_0x5d0d14===undefined||_0x417d8f===undefined)fail(_0x59770d+_0x13ebc9(0x95));if(_0x5d0d14&&_0x417d8f&&_0x5d0d14!==_0x417d8f)fail(_0x59770d+_0x13ebc9(0x8d));const _0xa03536=stringValue(_0x8013dc['relationType'])||_0x13ebc9(0xb8);if(_0xa03536!=='lookup')fail(_0x59770d+_0x13ebc9(0x83));const _0x53faf2=stringValue(_0x8013dc[_0x13ebc9(0xab)])||_0x13ebc9(0xb7);if(!SUPPORTED_CARDINALITIES[_0x13ebc9(0x86)](_0x53faf2))fail(_0x59770d+_0x13ebc9(0xcb));return requiredString(_0x8013dc['reason'],_0x59770d+_0x13ebc9(0xb1)),validateConfidence(_0x8013dc[_0x13ebc9(0x8a)],_0x59770d+_0x13ebc9(0x87)),tuple(_0xd48fdd,_0x273ad8,_0x5c5d98,_0x16fc2c,_0x13ebc9(0xb8),_0x53faf2);}function a65_0x4bff(){const _0x2e1e78=['].design.dataset','get','fromDatasetCode','modelCode','10843OUWylm','object','createdRelations','Dataset\x20','reason','.cardinality\x20is\x20not\x20supported.','createdDatasets[].code','\x20non-empty\x20strings.','some','trim','createdDatasets[].localKey','dataset','isFinite','ONE_TO_ONE','].type\x20is\x20not\x20supported.','TEXT','2480130idzqTP','relations','].localKey\x20must\x20match\x20','refTableField','3736vEqzrU','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','isArray','source','createdDatasets','\x20objects.','metrics','datasets','fromField','1550175HimGZq','length','join','expectedRelations','kind','every','.fromDatasetKey',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','].design.dataset\x20must\x20be\x20an\x20object.','string','BOOLEAN','.relationType\x20must\x20be\x20\x22lookup\x22.','toField','.toDatasetKey','has','.confidence','name','441606ZJsbsB','confidence','].design.fields','USER','\x20connects\x20incompatible\x20field\x20types.','datasetId','\x20must\x20be\x20between\x200\x20and\x201.','SELECT','add','datasetCode','toLowerCase','692842nQDKyz','\x20references\x20an\x20unknown\x20field.','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','fields','size','fromDatasetKey','].localKey','set','schemaVersion','ADDRESS','relationType','].design.fields[','unresolvedRelations','561324XJgZWm','.toField','toDatasetKey','datasets[',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','\x20is\x20required.','\x20references\x20an\x20unknown\x20dataset\x20localKey.','unresolvedRelations[','].design.dataset.datasetName','code','cardinality','type','1553672XfTZxe','split','entries','localKey','.reason','NUMBER','map','keys','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','fieldName','MANY_TO_ONE','lookup','dataset-batch','].confidence','.fromField','fieldType','toUpperCase','expectedLocalKeys','test','\x20must\x20contain\x20','design'];a65_0x4bff=function(){return _0x2e1e78;};return a65_0x4bff();}function relationTupleSet(_0x594e35,_0x35824b,_0x53e98b){const _0x14d629=a65_0x460371,_0x331485=new Set();for(const _0x3c502f of _0x594e35){const _0x22be2f=stringValue(_0x3c502f[_0x14d629(0x99)]),_0xeeceb1=stringValue(_0x3c502f[_0x14d629(0xa3)]),_0x4548c3=stringValue(_0x3c502f[_0x14d629(0xe2)])[_0x14d629(0x93)](),_0x1df475=stringValue(_0x3c502f[_0x14d629(0x84)])[_0x14d629(0x93)](),_0x549d93=stringValue(_0x3c502f[_0x14d629(0x9e)]),_0x2f4fb8=stringValue(_0x3c502f['cardinality']);if(!_0x22be2f||!_0xeeceb1||!_0x4548c3||!_0x1df475||_0x549d93!==_0x14d629(0xb8)||!SUPPORTED_CARDINALITIES[_0x14d629(0x86)](_0x2f4fb8))return null;if(!_0x53e98b[_0x14d629(0x86)](_0x22be2f)||!_0x53e98b[_0x14d629(0x86)](_0xeeceb1))return null;if(_0x35824b&&(stringValue(_0x3c502f[_0x14d629(0xc4)])!==_0x53e98b[_0x14d629(0xc3)](_0x22be2f)||stringValue(_0x3c502f['toDatasetCode'])!==_0x53e98b[_0x14d629(0xc3)](_0xeeceb1)))return null;const _0x5e8bdb=tuple(_0x22be2f,_0x4548c3,_0xeeceb1,_0x1df475,_0x549d93,_0x2f4fb8);if(_0x331485[_0x14d629(0x86)](_0x5e8bdb))return null;_0x331485[_0x14d629(0x91)](_0x5e8bdb);}return _0x331485;}function rejectServerDatasetIdentity(_0x1bcbac,_0x59bdf4){const _0x556622=a65_0x460371;for(const _0x522c15 of['id',_0x556622(0x8e),'modelId','code',_0x556622(0x92),_0x556622(0xc5)]){if(_0x1bcbac[_0x522c15]!==undefined&&_0x1bcbac[_0x522c15]!==null&&_0x1bcbac[_0x522c15]!=='')fail(_0x59bdf4+'.'+_0x522c15+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function objectArray(_0x2c3126,_0x392e36,_0x253cdd,_0x4b95a7){const _0x444dd3=a65_0x460371;return(!Array[_0x444dd3(0xdc)](_0x2c3126)||_0x2c3126['length']<_0x253cdd||_0x2c3126[_0x444dd3(0xe4)]>_0x4b95a7||_0x2c3126[_0x444dd3(0xce)](_0x27146e=>!isObject(_0x27146e)))&&fail(_0x392e36+_0x444dd3(0xc0)+_0x253cdd+'..'+_0x4b95a7+_0x444dd3(0xdf)),_0x2c3126;}function stringArray(_0x2e3bdf,_0x484369,_0x1018c5,_0x518f45){const _0x3a7dcd=a65_0x460371;return(!Array[_0x3a7dcd(0xdc)](_0x2e3bdf)||_0x2e3bdf[_0x3a7dcd(0xe4)]<_0x1018c5||_0x2e3bdf[_0x3a7dcd(0xe4)]>_0x518f45||_0x2e3bdf[_0x3a7dcd(0xce)](_0x38228e=>typeof _0x38228e!==_0x3a7dcd(0xec)||!_0x38228e[_0x3a7dcd(0xcf)]()))&&fail(_0x484369+_0x3a7dcd(0xc0)+_0x1018c5+'..'+_0x518f45+_0x3a7dcd(0xcd)),_0x2e3bdf;}function requiredString(_0x40d68e,_0x536efa){const _0x13cc6b=a65_0x460371,_0x5f1fd8=stringValue(_0x40d68e);if(!_0x5f1fd8)fail(_0x536efa+_0x13cc6b(0xa6));return _0x5f1fd8;}function stringValue(_0x4cddb8){const _0x2b9f49=a65_0x460371;return typeof _0x4cddb8===_0x2b9f49(0xec)?_0x4cddb8['trim']():'';}function a65_0x38dc(_0xfc4ff2,_0x3027f6){_0xfc4ff2=_0xfc4ff2-0x82;const _0x4bfff1=a65_0x4bff();let _0x38dc24=_0x4bfff1[_0xfc4ff2];return _0x38dc24;}function fieldName(_0x2d09d2){const _0x35fbb7=a65_0x460371;return stringValue(_0x2d09d2['code']??_0x2d09d2['fieldCode']??_0x2d09d2[_0x35fbb7(0x88)]??_0x2d09d2[_0x35fbb7(0xb6)]);}function validateConfidence(_0xb1bd05,_0x380548){const _0x21cb6c=a65_0x460371;_0xb1bd05!==undefined&&_0xb1bd05!==null&&(typeof _0xb1bd05!=='number'||!Number[_0x21cb6c(0xd2)](_0xb1bd05)||_0xb1bd05<0x0||_0xb1bd05>0x1)&&fail(_0x380548+_0x21cb6c(0x8f));}function tuple(..._0x11bd7f){const _0x248498=a65_0x460371;return _0x11bd7f[_0x248498(0xb3)]((_0x2e1835,_0x1e0fae)=>_0x1e0fae===0x1||_0x1e0fae===0x3?_0x2e1835[_0x248498(0x93)]():_0x2e1835)[_0x248498(0xe5)]('\x00');}function sameSet(_0x4739bc,_0x3e9158){const _0x1a8533=a65_0x460371;return _0x4739bc[_0x1a8533(0x98)]===_0x3e9158[_0x1a8533(0x98)]&&[..._0x4739bc][_0x1a8533(0xe8)](_0x2761ae=>_0x3e9158[_0x1a8533(0x86)](_0x2761ae));}function isObject(_0x34a606){const _0x21e1c1=a65_0x460371;return typeof _0x34a606===_0x21e1c1(0xc7)&&_0x34a606!==null&&!Array[_0x21e1c1(0xdc)](_0x34a606);}function fail(_0x2789c0){throw CliErrors['validation'](_0x2789c0);}
|
|
1
|
+
const a65_0x1ffa75=a65_0x516b;(function(_0x34e793,_0x47a5fc){const _0x43833f=a65_0x516b,_0x13dcc2=_0x34e793();while(!![]){try{const _0x41c9dd=parseInt(_0x43833f(0xb3))/0x1+parseInt(_0x43833f(0xaa))/0x2+parseInt(_0x43833f(0xa8))/0x3+parseInt(_0x43833f(0x82))/0x4+-parseInt(_0x43833f(0x73))/0x5+parseInt(_0x43833f(0x6d))/0x6+-parseInt(_0x43833f(0x83))/0x7;if(_0x41c9dd===_0x47a5fc)break;else _0x13dcc2['push'](_0x13dcc2['shift']());}catch(_0x217b04){_0x13dcc2['push'](_0x13dcc2['shift']());}}}(a65_0x300d,0xa673e));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x1ffa75(0x99),a65_0x1ffa75(0x72)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x1ffa75(0xb5),'NUMBER',a65_0x1ffa75(0x96),a65_0x1ffa75(0xcc),a65_0x1ffa75(0x84),a65_0x1ffa75(0x76),a65_0x1ffa75(0xa6),'USER',a65_0x1ffa75(0xc1),a65_0x1ffa75(0x7d)]);export function isDatasetBatchDesign(_0x45523f){const _0x212bed=a65_0x1ffa75;return isObject(_0x45523f)&&_0x45523f['kind']===_0x212bed(0xb0);}export function validateDatasetBatchDesign(_0xbb73c4){const _0x2a9f4d=a65_0x1ffa75;(!isObject(_0xbb73c4)||_0xbb73c4[_0x2a9f4d(0xbd)]!==_0x2a9f4d(0xb0))&&fail('Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.');_0xbb73c4[_0x2a9f4d(0x6c)]!==0x1&&fail(_0x2a9f4d(0xca));const _0x29e173=objectArray(_0xbb73c4[_0x2a9f4d(0x86)],_0x2a9f4d(0x86),0x1,0x14),_0x58c9fd=objectArray(_0xbb73c4[_0x2a9f4d(0xae)],_0x2a9f4d(0xae),0x0,0xc8),_0x261548=objectArray(_0xbb73c4[_0x2a9f4d(0x6a)],_0x2a9f4d(0x6a),0x0,0xc8),_0x30e8f2=new Set(),_0x4bc467=new Map();for(const [_0x1ee08f,_0x250b2c]of _0x29e173[_0x2a9f4d(0xbe)]()){const _0x5808b3=requiredString(_0x250b2c[_0x2a9f4d(0x94)],_0x2a9f4d(0x79)+_0x1ee08f+'].localKey');!LOCAL_KEY[_0x2a9f4d(0x6b)](_0x5808b3)&&fail(_0x2a9f4d(0x79)+_0x1ee08f+_0x2a9f4d(0xb8)+LOCAL_KEY[_0x2a9f4d(0xb7)]+'.');_0x30e8f2['has'](_0x5808b3)&&fail(_0x2a9f4d(0x7b));_0x30e8f2[_0x2a9f4d(0xc6)](_0x5808b3);!isObject(_0x250b2c[_0x2a9f4d(0xb2)])&&fail('datasets['+_0x1ee08f+'].design\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x250b2c['design'],_0x2a9f4d(0x79)+_0x1ee08f+'].design');if(!isObject(_0x250b2c[_0x2a9f4d(0xb2)]['dataset']))fail(_0x2a9f4d(0x79)+_0x1ee08f+_0x2a9f4d(0x7a));rejectServerDatasetIdentity(_0x250b2c['design'][_0x2a9f4d(0x9f)],'datasets['+_0x1ee08f+'].design.dataset'),requiredString(_0x250b2c[_0x2a9f4d(0xb2)][_0x2a9f4d(0x9f)][_0x2a9f4d(0xb9)],'datasets['+_0x1ee08f+_0x2a9f4d(0x8a));'relations'in _0x250b2c['design']&&(!Array[_0x2a9f4d(0x6e)](_0x250b2c[_0x2a9f4d(0xb2)][_0x2a9f4d(0xae)])||_0x250b2c[_0x2a9f4d(0xb2)][_0x2a9f4d(0xae)][_0x2a9f4d(0x68)]!==0x0)&&fail(_0x2a9f4d(0x79)+_0x1ee08f+_0x2a9f4d(0xc8));const _0x6df6b9=objectArray(_0x250b2c[_0x2a9f4d(0xb2)][_0x2a9f4d(0xbc)],_0x2a9f4d(0x79)+_0x1ee08f+_0x2a9f4d(0xc9),0x1,0xc8),_0x3b9a8d=new Map();for(const [_0x53c9ec,_0x4fb873]of _0x6df6b9[_0x2a9f4d(0xbe)]()){const _0xe7ac56=fieldName(_0x4fb873);if(!_0xe7ac56)fail(_0x2a9f4d(0x79)+_0x1ee08f+_0x2a9f4d(0xb6)+_0x53c9ec+_0x2a9f4d(0xc2));const _0x59ec98=_0xe7ac56[_0x2a9f4d(0x97)]();if(_0x3b9a8d['has'](_0x59ec98))fail(_0x2a9f4d(0xa0)+_0x5808b3+_0x2a9f4d(0x8c));const _0x2c748f=stringValue(_0x4fb873[_0x2a9f4d(0x95)]??_0x4fb873[_0x2a9f4d(0xad)])[_0x2a9f4d(0xbf)]();if(!SUPPORTED_FIELD_TYPES[_0x2a9f4d(0xc0)](_0x2c748f))fail(_0x2a9f4d(0x79)+_0x1ee08f+'].design.fields['+_0x53c9ec+_0x2a9f4d(0x87));_0x3b9a8d[_0x2a9f4d(0x91)](_0x59ec98,_0x2c748f),[_0x4fb873['refTable'],_0x4fb873['refTableField'],_0x4fb873['refTableLabelField']][_0x2a9f4d(0x75)](_0x164fd6=>stringValue(_0x164fd6))&&fail(_0x2a9f4d(0x79)+_0x1ee08f+_0x2a9f4d(0xb6)+_0x53c9ec+_0x2a9f4d(0x90));}_0x4bc467['set'](_0x5808b3,_0x3b9a8d);}const _0x6c769e=new Set(),_0x60b688=new Set();for(const [_0x387bf6,_0x2be013]of _0x58c9fd[_0x2a9f4d(0xbe)]()){const _0x326d5e=validateRelation(_0x2be013,_0x387bf6,_0x30e8f2,_0x4bc467);if(_0x6c769e[_0x2a9f4d(0xc0)](_0x326d5e))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0x6c769e[_0x2a9f4d(0xc6)](_0x326d5e);const _0x3e2551=_0x326d5e['split']('\x00',0x2)['join']('\x00');if(_0x60b688[_0x2a9f4d(0xc0)](_0x3e2551))fail(_0x2a9f4d(0x70));_0x60b688[_0x2a9f4d(0xc6)](_0x3e2551);}for(const [_0x283431,_0x30dc23]of _0x261548[_0x2a9f4d(0xbe)]()){requiredString(_0x30dc23[_0x2a9f4d(0xa1)],_0x2a9f4d(0x9b)+_0x283431+_0x2a9f4d(0xb1)),validateConfidence(_0x30dc23[_0x2a9f4d(0x88)],_0x2a9f4d(0x9b)+_0x283431+_0x2a9f4d(0x81));}return _0xbb73c4;}export function reconcileBatchResult(_0x53c094){const _0x5c7f68=a65_0x1ffa75;if(!isObject(_0x53c094))return null;try{const _0x1cc1e9=stringArray(_0x53c094[_0x5c7f68(0xaf)],'expectedLocalKeys',0x1,0x14),_0x2b73e3=new Set(_0x1cc1e9);if(_0x2b73e3['size']!==_0x1cc1e9[_0x5c7f68(0x68)]||_0x1cc1e9[_0x5c7f68(0x75)](_0x32b7c7=>!LOCAL_KEY[_0x5c7f68(0x6b)](_0x32b7c7)))return null;const _0x28f92a=objectArray(_0x53c094[_0x5c7f68(0xac)],'createdDatasets',0x1,0x14),_0x445bbe=new Map(),_0x2d4e01=new Set();for(const _0x309287 of _0x28f92a){const _0x4d4a46=requiredString(_0x309287['localKey'],_0x5c7f68(0xbb)),_0x2db856=requiredString(_0x309287['code']??_0x309287[_0x5c7f68(0x9a)],_0x5c7f68(0xa2));if(_0x445bbe[_0x5c7f68(0xc0)](_0x4d4a46)||_0x2d4e01[_0x5c7f68(0xc0)](_0x2db856))return null;_0x445bbe['set'](_0x4d4a46,_0x2db856),_0x2d4e01[_0x5c7f68(0xc6)](_0x2db856);}if(!sameSet(_0x2b73e3,new Set(_0x445bbe[_0x5c7f68(0xcb)]())))return null;const _0x198adf=objectArray(_0x53c094[_0x5c7f68(0x9d)],'expectedRelations',0x0,0xc8),_0x6cd588=objectArray(_0x53c094[_0x5c7f68(0x8e)],_0x5c7f68(0x8e),0x0,0xc8),_0x302da8=relationTupleSet(_0x198adf,![],_0x445bbe),_0x1c59e0=relationTupleSet(_0x6cd588,!![],_0x445bbe);if(!_0x302da8||!_0x1c59e0||!sameSet(_0x302da8,_0x1c59e0))return null;const _0x473055=objectArray(_0x53c094['unresolvedRelations'],'unresolvedRelations',0x0,0xc8);return{'expectedLocalKeys':_0x1cc1e9,'expectedRelations':_0x198adf,'createdDatasets':_0x28f92a,'createdRelations':_0x6cd588,'unresolvedRelations':_0x473055,...isObject(_0x53c094['metrics'])?{'metrics':_0x53c094[_0x5c7f68(0x7f)]}:{}};}catch{return null;}}function validateRelation(_0x1dcff6,_0x5730f9,_0x378d81,_0x482a85){const _0x3da5b1=a65_0x1ffa75,_0x270bb5=_0x3da5b1(0x9c)+_0x5730f9+']',_0x31d413=requiredString(_0x1dcff6[_0x3da5b1(0x85)],_0x270bb5+_0x3da5b1(0x7e)),_0x5120cd=requiredString(_0x1dcff6[_0x3da5b1(0x80)],_0x270bb5+'.toDatasetKey'),_0x4ae307=requiredString(_0x1dcff6['fromField'],_0x270bb5+'.fromField')[_0x3da5b1(0x97)](),_0x35e767=requiredString(_0x1dcff6[_0x3da5b1(0x8b)],_0x270bb5+_0x3da5b1(0x78))[_0x3da5b1(0x97)]();if(!_0x378d81[_0x3da5b1(0xc0)](_0x31d413)||!_0x378d81[_0x3da5b1(0xc0)](_0x5120cd))fail(_0x270bb5+_0x3da5b1(0x92));const _0x4ea10d=_0x482a85['get'](_0x31d413)?.[_0x3da5b1(0x89)](_0x4ae307),_0x131b15=_0x482a85[_0x3da5b1(0x89)](_0x5120cd)?.[_0x3da5b1(0x89)](_0x35e767);if(_0x4ea10d===undefined||_0x131b15===undefined)fail(_0x270bb5+'\x20references\x20an\x20unknown\x20field.');if(_0x4ea10d&&_0x131b15&&_0x4ea10d!==_0x131b15)fail(_0x270bb5+_0x3da5b1(0x69));const _0x154b78=stringValue(_0x1dcff6[_0x3da5b1(0xa4)])||_0x3da5b1(0x7c);if(_0x154b78!==_0x3da5b1(0x7c))fail(_0x270bb5+_0x3da5b1(0x67));const _0x4c35f4=stringValue(_0x1dcff6[_0x3da5b1(0x6f)])||_0x3da5b1(0x99);if(!SUPPORTED_CARDINALITIES['has'](_0x4c35f4))fail(_0x270bb5+_0x3da5b1(0xa9));return requiredString(_0x1dcff6[_0x3da5b1(0xa1)],_0x270bb5+'.reason'),validateConfidence(_0x1dcff6['confidence'],_0x270bb5+'.confidence'),tuple(_0x31d413,_0x4ae307,_0x5120cd,_0x35e767,_0x3da5b1(0x7c),_0x4c35f4);}function relationTupleSet(_0x43bd81,_0x4ac57b,_0x197447){const _0x22664e=a65_0x1ffa75,_0x6ad692=new Set();for(const _0xdb5542 of _0x43bd81){const _0x55d598=stringValue(_0xdb5542[_0x22664e(0x85)]),_0x5b013e=stringValue(_0xdb5542[_0x22664e(0x80)]),_0x489737=stringValue(_0xdb5542[_0x22664e(0x74)])[_0x22664e(0x97)](),_0x22f865=stringValue(_0xdb5542[_0x22664e(0x8b)])[_0x22664e(0x97)](),_0x3a7b19=stringValue(_0xdb5542[_0x22664e(0xa4)]),_0x5a8e11=stringValue(_0xdb5542[_0x22664e(0x6f)]);if(!_0x55d598||!_0x5b013e||!_0x489737||!_0x22f865||_0x3a7b19!==_0x22664e(0x7c)||!SUPPORTED_CARDINALITIES[_0x22664e(0xc0)](_0x5a8e11))return null;if(!_0x197447[_0x22664e(0xc0)](_0x55d598)||!_0x197447[_0x22664e(0xc0)](_0x5b013e))return null;if(_0x4ac57b&&(stringValue(_0xdb5542[_0x22664e(0xcd)])!==_0x197447[_0x22664e(0x89)](_0x55d598)||stringValue(_0xdb5542['toDatasetCode'])!==_0x197447['get'](_0x5b013e)))return null;const _0x433cd9=tuple(_0x55d598,_0x489737,_0x5b013e,_0x22f865,_0x3a7b19,_0x5a8e11);if(_0x6ad692[_0x22664e(0xc0)](_0x433cd9))return null;_0x6ad692['add'](_0x433cd9);}return _0x6ad692;}function rejectServerDatasetIdentity(_0x44984f,_0x17c192){const _0x172cc3=a65_0x1ffa75;for(const _0x46ebba of['id','datasetId',_0x172cc3(0x77),_0x172cc3(0xc3),'datasetCode','modelCode']){if(_0x44984f[_0x46ebba]!==undefined&&_0x44984f[_0x46ebba]!==null&&_0x44984f[_0x46ebba]!=='')fail(_0x17c192+'.'+_0x46ebba+_0x172cc3(0xa5));}}function objectArray(_0x2e2075,_0x1f5227,_0x276f55,_0x24a09c){const _0x2f2531=a65_0x1ffa75;return(!Array[_0x2f2531(0x6e)](_0x2e2075)||_0x2e2075['length']<_0x276f55||_0x2e2075[_0x2f2531(0x68)]>_0x24a09c||_0x2e2075[_0x2f2531(0x75)](_0x35e457=>!isObject(_0x35e457)))&&fail(_0x1f5227+_0x2f2531(0xc7)+_0x276f55+'..'+_0x24a09c+_0x2f2531(0xa3)),_0x2e2075;}function stringArray(_0x14bd9b,_0x17baa5,_0x1bd231,_0x5c6df9){const _0x5494b1=a65_0x1ffa75;return(!Array[_0x5494b1(0x6e)](_0x14bd9b)||_0x14bd9b[_0x5494b1(0x68)]<_0x1bd231||_0x14bd9b['length']>_0x5c6df9||_0x14bd9b[_0x5494b1(0x75)](_0x313c97=>typeof _0x313c97!==_0x5494b1(0x98)||!_0x313c97[_0x5494b1(0xba)]()))&&fail(_0x17baa5+_0x5494b1(0xc7)+_0x1bd231+'..'+_0x5c6df9+_0x5494b1(0x66)),_0x14bd9b;}function requiredString(_0x521d25,_0x479b01){const _0x2b87d5=stringValue(_0x521d25);if(!_0x2b87d5)fail(_0x479b01+'\x20is\x20required.');return _0x2b87d5;}function stringValue(_0x33fd4b){return typeof _0x33fd4b==='string'?_0x33fd4b['trim']():'';}function fieldName(_0x4add0a){const _0x16eee5=a65_0x1ffa75;return stringValue(_0x4add0a[_0x16eee5(0xc3)]??_0x4add0a[_0x16eee5(0xc5)]??_0x4add0a[_0x16eee5(0xb4)]??_0x4add0a[_0x16eee5(0x8d)]);}function a65_0x516b(_0x2ea824,_0x139506){_0x2ea824=_0x2ea824-0x66;const _0x300dbb=a65_0x300d();let _0x516bac=_0x300dbb[_0x2ea824];return _0x516bac;}function validateConfidence(_0x532133,_0x476df1){const _0x36eac9=a65_0x1ffa75;_0x532133!==undefined&&_0x532133!==null&&(typeof _0x532133!==_0x36eac9(0x71)||!Number['isFinite'](_0x532133)||_0x532133<0x0||_0x532133>0x1)&&fail(_0x476df1+_0x36eac9(0xc4));}function a65_0x300d(){const _0x24dec6=['\x20must\x20be\x20between\x200\x20and\x201.','fieldCode','add','\x20must\x20contain\x20','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','].design.fields','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','keys','BOOLEAN','fromDatasetCode','\x20non-empty\x20strings.','.relationType\x20must\x20be\x20\x22lookup\x22.','length','\x20connects\x20incompatible\x20field\x20types.','unresolvedRelations','test','schemaVersion','7642200xsxJKa','isArray','cardinality','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','number','ONE_TO_ONE','4408835RBTAiM','fromField','some','MULTI_SELECT','modelId','.toField','datasets[','].design.dataset\x20must\x20be\x20an\x20object.','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','lookup','UPLOAD','.fromDatasetKey','metrics','toDatasetKey','].confidence','4461788qcLTkd','18506810ndRitk','SELECT','fromDatasetKey','datasets','].type\x20is\x20not\x20supported.','confidence','get','].design.dataset.datasetName','toField','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','fieldName','createdRelations','map',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','set','\x20references\x20an\x20unknown\x20dataset\x20localKey.','size','localKey','type','DATETIME','toLowerCase','string','MANY_TO_ONE','datasetCode','unresolvedRelations[','relations[','expectedRelations','every','dataset','Dataset\x20','reason','createdDatasets[].code','\x20objects.','relationType','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','DATE_RANGE','join','726519BmNhjD','.cardinality\x20is\x20not\x20supported.','1483428vPyjtp','object','createdDatasets','fieldType','relations','expectedLocalKeys','dataset-batch','].reason','design','834353tRVemq','name','TEXT','].design.fields[','source','].localKey\x20must\x20match\x20','datasetName','trim','createdDatasets[].localKey','fields','kind','entries','toUpperCase','has','ADDRESS',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','code'];a65_0x300d=function(){return _0x24dec6;};return a65_0x300d();}function tuple(..._0x436964){const _0x15f67f=a65_0x1ffa75;return _0x436964[_0x15f67f(0x8f)]((_0x26a009,_0x148b22)=>_0x148b22===0x1||_0x148b22===0x3?_0x26a009[_0x15f67f(0x97)]():_0x26a009)[_0x15f67f(0xa7)]('\x00');}function sameSet(_0x3a3ee0,_0x337968){const _0x4bf448=a65_0x1ffa75;return _0x3a3ee0[_0x4bf448(0x93)]===_0x337968[_0x4bf448(0x93)]&&[..._0x3a3ee0][_0x4bf448(0x9e)](_0x16ae52=>_0x337968['has'](_0x16ae52));}function isObject(_0x29af71){const _0x1615e9=a65_0x1ffa75;return typeof _0x29af71===_0x1615e9(0xab)&&_0x29af71!==null&&!Array[_0x1615e9(0x6e)](_0x29af71);}function fail(_0x4e49ea){throw CliErrors['validation'](_0x4e49ea);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a66_0x376d5c=a66_0x48da;(function(_0x1d9763,_0x540348){const _0xef46e9=a66_0x48da,_0x2b76f4=_0x1d9763();while(!![]){try{const _0x49c69a=-parseInt(_0xef46e9(0x1a2))/0x1*(-parseInt(_0xef46e9(0x1c3))/0x2)+parseInt(_0xef46e9(0x1a3))/0x3*(parseInt(_0xef46e9(0x1be))/0x4)+-parseInt(_0xef46e9(0x1a7))/0x5+-parseInt(_0xef46e9(0x18d))/0x6+-parseInt(_0xef46e9(0x1b4))/0x7+parseInt(_0xef46e9(0x1a5))/0x8*(-parseInt(_0xef46e9(0x192))/0x9)+parseInt(_0xef46e9(0x193))/0xa;if(_0x49c69a===_0x540348)break;else _0x2b76f4['push'](_0x2b76f4['shift']());}catch(_0x3afdeb){_0x2b76f4['push'](_0x2b76f4['shift']());}}}(a66_0x5d60,0xec48a));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='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP=a66_0x376d5c(0x18f);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x33f640,input:_0x2a3416,dryRun:_0x4d402e}){const _0x4d7f33=a66_0x376d5c;validateInput(_0x2a3416);const _0x223a9f=normalizeBusinessGroupArgument(_0x2a3416[_0x4d7f33(0x1aa)]),_0x27d4f7=await getDatasetDetail(_0x2a3416[_0x4d7f33(0x1b1)]),_0x47ef79=resolveBusinessGroupDataset(_0x27d4f7,_0x2a3416[_0x4d7f33(0x1b1)]);assertBusinessGroupUpdateSupported(_0x47ef79,_0x223a9f);const _0x2ebc40=loadCurrentBusinessGroup(_0x27d4f7,_0x47ef79);assertExpectedBusinessGroup(_0x2ebc40,_0x2a3416[_0x4d7f33(0x1b7)]);const _0x5acd49=buildBackendPlan(_0x33f640,_0x47ef79,_0x223a9f),_0x48f0a5=_0x2ebc40!==_0x223a9f;let _0xe6f50d;if(_0x48f0a5&&!_0x4d402e){_0x5acd49[_0x4d7f33(0x1c6)]==='db-table'?await updateDbTableBusinessGroup(_0x5acd49['payload']):await updateErBusinessGroup(_0x5acd49[_0x4d7f33(0x17f)]);const _0x355a6c=await getDatasetDetail(_0x47ef79['code']),_0x4d6f15=resolveBusinessGroupDataset(_0x355a6c,_0x47ef79['code']),_0x4b6aa5=loadCurrentBusinessGroup(_0x355a6c,_0x4d6f15);if(_0x4b6aa5!==_0x223a9f)throw CliErrors[_0x4d7f33(0x19c)](_0x4d7f33(0x186),_0x4d7f33(0x1a6)+JSON['stringify'](displayBusinessGroup(_0x223a9f))+',\x20actual\x20'+JSON[_0x4d7f33(0x19f)](displayBusinessGroup(_0x4b6aa5))+'.');_0xe6f50d={'verified':!![],'status':'matched','afterReadback':{'businessGroup':displayBusinessGroup(_0x4b6aa5)}};}else!_0x48f0a5&&(_0xe6f50d={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x2ebc40)}});const _0x588a27={'operation':_0x4d7f33(0x190),'appCode':_0x33f640,'selector':{'code':_0x47ef79['code']},'dataset':{'id':_0x47ef79['id'],'code':_0x47ef79[_0x4d7f33(0x1b1)],'name':_0x47ef79[_0x4d7f33(0x182)],'sourceType':_0x47ef79['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x2ebc40)},'after':{'businessGroup':displayBusinessGroup(_0x223a9f)},'changed':_0x48f0a5,'dryRun':_0x4d402e,'submitted':_0x48f0a5&&!_0x4d402e,'backend':{'method':_0x5acd49['method'],'path':_0x5acd49[_0x4d7f33(0x188)],'payload':_0x5acd49[_0x4d7f33(0x17f)]},..._0xe6f50d?{'verification':_0xe6f50d}:{},'warnings':[]};return{'ok':!![],'data':_0x588a27,'message':_0x48f0a5?_0x4d402e?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x47ef79[_0x4d7f33(0x1b1)]:_0x4d7f33(0x1b2)+_0x47ef79['code']:_0x4d7f33(0x194)+_0x47ef79['code']};}export const datasetBusinessGroupUpdate={'service':a66_0x376d5c(0x18e),'command':a66_0x376d5c(0x1bc),'description':a66_0x376d5c(0x198),'risk':a66_0x376d5c(0x1ba),'flags':[CODE_FLAG,{'name':a66_0x376d5c(0x1af),'type':'string','required':!![],'description':a66_0x376d5c(0x19a)},{'name':a66_0x376d5c(0x1ab),'type':a66_0x376d5c(0x1a4),'required':![],'description':a66_0x376d5c(0x1ac)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x12d766){validateInput(readBusinessGroupUpdateInput(_0x12d766));},async 'dryRun'(_0x3df471){const _0x24d77c=a66_0x376d5c,_0x3061ff=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x3df471['appCode'],'input':readBusinessGroupUpdateInput(_0x3df471),'dryRun':!![]});return{'method':_0x3061ff[_0x24d77c(0x18b)]['backend'][_0x24d77c(0x19e)],'url':_0x3061ff[_0x24d77c(0x18b)][_0x24d77c(0x1b8)][_0x24d77c(0x188)],'body':_0x3061ff[_0x24d77c(0x18b)][_0x24d77c(0x1b8)][_0x24d77c(0x17f)],'description':_0x3061ff['message'],..._0x3061ff[_0x24d77c(0x18b)]};},async 'execute'(_0x4c26aa){const _0x4c38cf=a66_0x376d5c;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x4c26aa[_0x4c38cf(0x181)],'input':readBusinessGroupUpdateInput(_0x4c26aa),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x5defed){const _0x3fef20=a66_0x376d5c,_0x3cc15a=_0x5defed[_0x3fef20(0x1bb)](_0x3fef20(0x1ab));return{'code':trim(_0x5defed['str'](_0x3fef20(0x1b1))),'businessGroup':_0x5defed[_0x3fef20(0x1bb)]('business-group'),'expectBusinessGroup':_0x3cc15a===undefined||_0x3cc15a===''?undefined:_0x3cc15a};}function validateInput(_0x30362a){const _0x43c46a=a66_0x376d5c;if(!trim(_0x30362a[_0x43c46a(0x1b1)]))throw CliErrors[_0x43c46a(0x18a)]('--code\x20is\x20required');if(_0x30362a[_0x43c46a(0x1aa)]===undefined)throw CliErrors['validation'](_0x43c46a(0x1bf));if(!trim(_0x30362a['businessGroup']))throw CliErrors[_0x43c46a(0x18a)](_0x43c46a(0x19d));}function assertBusinessGroupUpdateSupported(_0x19a5de,_0x5a6ca8){const _0x55f15c=a66_0x376d5c;if(_0x19a5de[_0x55f15c(0x1a9)]===_0x55f15c(0x1b3)&&!_0x5a6ca8)throw CliErrors['validation']('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function resolveBusinessGroupDataset(_0x2d8c09,_0x2df3fc){const _0x2cd50f=a66_0x376d5c,_0x4418f7=asPlainObject(_0x2d8c09[_0x2cd50f(0x18e)]),_0x26756f=asPlainObject(_0x2d8c09[_0x2cd50f(0x1c5)]),_0x14ad80=resolveSourceType(_0x2d8c09,_0x4418f7,_0x26756f),_0x1f6bcc=firstString(_0x2d8c09[_0x2cd50f(0x195)],_0x2d8c09[_0x2cd50f(0x1b1)],_0x4418f7[_0x2cd50f(0x180)],_0x2df3fc)||_0x2df3fc;return{'id':firstNumber(_0x2d8c09[_0x2cd50f(0x1c0)],_0x2d8c09['id'],_0x4418f7['datasetId'])??firstString(_0x2d8c09[_0x2cd50f(0x1c0)],_0x2d8c09['id'],_0x4418f7[_0x2cd50f(0x1b9)])??null,'code':_0x1f6bcc,'name':firstString(_0x2d8c09['name'],_0x4418f7[_0x2cd50f(0x189)],_0x4418f7[_0x2cd50f(0x182)])||null,'sourceType':_0x14ad80,'dbTableSelector':_0x14ad80===_0x2cd50f(0x1b3)?{'dbLinkId':firstNumber(_0x26756f[_0x2cd50f(0x1c4)]),'tableName':firstString(_0x26756f[_0x2cd50f(0x191)])||null}:null};}function resolveSourceType(_0x483b3a,_0x5c4142,_0x2813d3){const _0x1362c3=a66_0x376d5c,_0x2cde4a=firstString(_0x483b3a[_0x1362c3(0x1a1)],_0x483b3a[_0x1362c3(0x1a9)],_0x5c4142[_0x1362c3(0x1a1)],_0x5c4142[_0x1362c3(0x1a9)])?.[_0x1362c3(0x1b5)]()[_0x1362c3(0x1bd)]();if(_0x2cde4a===_0x1362c3(0x1b3)||_0x2cde4a===_0x1362c3(0x1c1))return _0x2cde4a;if(Object['keys'](_0x2813d3)[_0x1362c3(0x1c2)]>0x0)return _0x1362c3(0x1b3);throw CliErrors[_0x1362c3(0x18a)](_0x1362c3(0x199));}function loadCurrentBusinessGroup(_0x5d276a,_0x30f165){const _0x433048=a66_0x376d5c,_0x2211ed=readBusinessGroupFromDatasetDetail(_0x5d276a,_0x30f165[_0x433048(0x1a9)]);if(_0x2211ed[_0x433048(0x1ad)])return normalizeBusinessGroup(_0x2211ed[_0x433048(0x1ae)]);return'';}function a66_0x5d60(){const _0x418e15=['payload','datasetCode','appCode','name','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','prototype','dbTableSelector','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','path','datasetName','validation','data','parse','1819590frmGWi','dataset','ungrouped','update','tableName','63epsWfd','37440900THDQsi','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','modelCode','call','dbLinkId','Update\x20business\x20scenario\x20group','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','POST','apiError','--business-group\x20must\x20not\x20be\x20blank','method','stringify','object','source','79549VrzIfr','1047GsFHfZ','string','1970840SkYwBm','Expected\x20','5000360kNKKjf','isFinite','sourceType','businessGroup','expect-business-group','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','found','value','business-group','extend','code','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','DB_TABLE','9021936jmHnDa','trim','db-table','expectBusinessGroup','backend','datasetId','write','str','business-group-update','toUpperCase','332EogLPK','--business-group\x20is\x20required','modelId','METADATA','length','38whfiTq','dbId','dbtableConfig','kind','number',',\x20actual\x20'];a66_0x5d60=function(){return _0x418e15;};return a66_0x5d60();}function readBusinessGroupFromDatasetDetail(_0x5e7f7f,_0x47775b){const _0xe5d084=a66_0x376d5c,_0x2b05bd=asPlainObject(_0x5e7f7f[_0xe5d084(0x18e)]),_0x1a3fb3=firstPresent(_0x5e7f7f[_0xe5d084(0x1aa)]);if(_0x1a3fb3[_0xe5d084(0x1ad)])return _0x1a3fb3;const _0x72d0c9=firstPresent(_0x2b05bd[_0xe5d084(0x1aa)]);if(_0x72d0c9[_0xe5d084(0x1ad)])return _0x72d0c9;if(_0x47775b==='DB_TABLE')return{'found':![]};const _0x379723=readBusinessGroupFromExtend(_0x5e7f7f[_0xe5d084(0x1b0)]);if(_0x379723[_0xe5d084(0x1ad)])return _0x379723;return readBusinessGroupFromExtend(_0x2b05bd[_0xe5d084(0x1b0)]);}function readBusinessGroupFromExtend(_0x2d11b2){const _0x214c73=a66_0x376d5c;if(_0x2d11b2===undefined||_0x2d11b2===null||_0x2d11b2==='')return{'found':![]};if(typeof _0x2d11b2===_0x214c73(0x1a4))try{const _0x26e0e3=JSON[_0x214c73(0x18c)](_0x2d11b2);return readBusinessGroupFromExtend(_0x26e0e3);}catch{return{'found':![]};}const _0x223eb4=asPlainObject(_0x2d11b2);if(Object[_0x214c73(0x184)]['hasOwnProperty'][_0x214c73(0x196)](_0x223eb4,_0x214c73(0x1aa)))return{'found':!![],'value':_0x223eb4['businessGroup']};return{'found':![]};}function firstPresent(..._0x334a5f){for(const _0x261761 of _0x334a5f){if(_0x261761!==undefined&&_0x261761!==null)return{'found':!![],'value':_0x261761};}return{'found':![]};}function assertExpectedBusinessGroup(_0x52d532,_0x5b8697){const _0x5863c7=a66_0x376d5c;if(_0x5b8697===undefined)return;const _0x2b75db=normalizeBusinessGroupArgument(_0x5b8697);if(_0x52d532!==_0x2b75db)throw CliErrors['validation']('Expectation\x20mismatch\x20at\x20businessGroup',_0x5863c7(0x1a6)+JSON[_0x5863c7(0x19f)](_0x2b75db)+_0x5863c7(0x1c8)+JSON[_0x5863c7(0x19f)](_0x52d532));}function buildBackendPlan(_0x1d635f,_0x34daa1,_0x5a5f38){const _0x8dcf36=a66_0x376d5c;if(_0x34daa1[_0x8dcf36(0x1a9)]===_0x8dcf36(0x1b3)){if(!_0x34daa1[_0x8dcf36(0x185)]||_0x34daa1[_0x8dcf36(0x185)]['dbLinkId']===null||!_0x34daa1[_0x8dcf36(0x185)][_0x8dcf36(0x191)])throw CliErrors['validation'](_0x8dcf36(0x183),_0x8dcf36(0x187));return{'kind':_0x8dcf36(0x1b6),'method':_0x8dcf36(0x19b),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x34daa1[_0x8dcf36(0x185)][_0x8dcf36(0x197)],'tableName':_0x34daa1[_0x8dcf36(0x185)][_0x8dcf36(0x191)],'businessGroup':_0x5a5f38}};}return{'kind':'metadata','method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x1d635f,'datasetCode':_0x34daa1[_0x8dcf36(0x1b1)],'businessGroup':_0x5a5f38}};}function normalizeBusinessGroup(_0x155422){if(_0x155422===undefined||_0x155422===null)return'';return String(_0x155422)['trim']();}function normalizeBusinessGroupArgument(_0x36d0cf){const _0x48a59a=normalizeBusinessGroup(_0x36d0cf);return _0x48a59a===UNGROUPED_BUSINESS_GROUP?'':_0x48a59a;}function a66_0x48da(_0x5538c8,_0x3104f0){_0x5538c8=_0x5538c8-0x17f;const _0x5d606e=a66_0x5d60();let _0x48da01=_0x5d606e[_0x5538c8];return _0x48da01;}function displayBusinessGroup(_0xadf91f){return _0xadf91f||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x1a4fe3){const _0x34b18d=a66_0x376d5c;if(!_0x1a4fe3||typeof _0x1a4fe3!==_0x34b18d(0x1a0)||Array['isArray'](_0x1a4fe3))return{};return _0x1a4fe3;}function firstString(..._0x4fc570){const _0x3a8241=a66_0x376d5c;for(const _0x85f84f of _0x4fc570){if(typeof _0x85f84f===_0x3a8241(0x1a4)&&_0x85f84f[_0x3a8241(0x1b5)]())return _0x85f84f[_0x3a8241(0x1b5)]();if(typeof _0x85f84f===_0x3a8241(0x1c7)&&Number[_0x3a8241(0x1a8)](_0x85f84f))return String(_0x85f84f);}return undefined;}function firstNumber(..._0x2742d8){const _0x441916=a66_0x376d5c;for(const _0x40cbf3 of _0x2742d8){if(typeof _0x40cbf3===_0x441916(0x1c7)&&Number['isFinite'](_0x40cbf3))return _0x40cbf3;if(typeof _0x40cbf3===_0x441916(0x1a4)&&_0x40cbf3[_0x441916(0x1b5)]()&&Number[_0x441916(0x1a8)](Number(_0x40cbf3)))return Number(_0x40cbf3);}return null;}function trim(_0x4fea7f){const _0x226e21=a66_0x376d5c;return String(_0x4fea7f||'')[_0x226e21(0x1b5)]();}
|
|
1
|
+
const a66_0x4aeced=a66_0x134a;(function(_0x5e1d0c,_0x31f2ee){const _0x46295d=a66_0x134a,_0x5d0624=_0x5e1d0c();while(!![]){try{const _0x227e1b=parseInt(_0x46295d(0x97))/0x1*(-parseInt(_0x46295d(0x8d))/0x2)+-parseInt(_0x46295d(0xa8))/0x3+parseInt(_0x46295d(0x8f))/0x4*(parseInt(_0x46295d(0xba))/0x5)+-parseInt(_0x46295d(0xc9))/0x6*(parseInt(_0x46295d(0xb8))/0x7)+parseInt(_0x46295d(0xbf))/0x8+-parseInt(_0x46295d(0xb9))/0x9*(parseInt(_0x46295d(0x8b))/0xa)+parseInt(_0x46295d(0xcf))/0xb*(parseInt(_0x46295d(0x93))/0xc);if(_0x227e1b===_0x31f2ee)break;else _0x5d0624['push'](_0x5d0624['shift']());}catch(_0x4d2b17){_0x5d0624['push'](_0x5d0624['shift']());}}}(a66_0x37a3,0xda751));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_0x4aeced(0xaf),METADATA_BACKEND_PATH=a66_0x4aeced(0xad),UNGROUPED_BUSINESS_GROUP=a66_0x4aeced(0xb3);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x3c1ff9,input:_0xea50ea,dryRun:_0x2d2479}){const _0x29e673=a66_0x4aeced;validateInput(_0xea50ea);const _0x17b340=normalizeBusinessGroupArgument(_0xea50ea[_0x29e673(0xc0)]),_0x3013a0=await getDatasetDetail(_0xea50ea['code']),_0x4d4131=resolveBusinessGroupDataset(_0x3013a0,_0xea50ea[_0x29e673(0xbb)]);assertBusinessGroupUpdateSupported(_0x4d4131,_0x17b340);const _0xf342f6=loadCurrentBusinessGroup(_0x3013a0,_0x4d4131);assertExpectedBusinessGroup(_0xf342f6,_0xea50ea[_0x29e673(0xb2)]);const _0xa2d401=buildBackendPlan(_0x3c1ff9,_0x4d4131,_0x17b340),_0x4fde47=_0xf342f6!==_0x17b340;let _0x5ab10c;if(_0x4fde47&&!_0x2d2479){_0xa2d401[_0x29e673(0x86)]===_0x29e673(0xab)?await updateDbTableBusinessGroup(_0xa2d401[_0x29e673(0xb6)]):await updateErBusinessGroup(_0xa2d401[_0x29e673(0xb6)]);const _0x1d1140=await getDatasetDetail(_0x4d4131[_0x29e673(0xbb)]),_0x52891a=resolveBusinessGroupDataset(_0x1d1140,_0x4d4131['code']),_0xa85956=loadCurrentBusinessGroup(_0x1d1140,_0x52891a);if(_0xa85956!==_0x17b340)throw CliErrors['apiError'](_0x29e673(0xc6),'Expected\x20'+JSON['stringify'](displayBusinessGroup(_0x17b340))+_0x29e673(0xa2)+JSON[_0x29e673(0xa7)](displayBusinessGroup(_0xa85956))+'.');_0x5ab10c={'verified':!![],'status':_0x29e673(0xac),'afterReadback':{'businessGroup':displayBusinessGroup(_0xa85956)}};}else!_0x4fde47&&(_0x5ab10c={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0xf342f6)}});const _0x3ac065={'operation':_0x29e673(0xbc),'appCode':_0x3c1ff9,'selector':{'code':_0x4d4131['code']},'dataset':{'id':_0x4d4131['id'],'code':_0x4d4131[_0x29e673(0xbb)],'name':_0x4d4131['name'],'sourceType':_0x4d4131[_0x29e673(0xa3)]},'before':{'businessGroup':displayBusinessGroup(_0xf342f6)},'after':{'businessGroup':displayBusinessGroup(_0x17b340)},'changed':_0x4fde47,'dryRun':_0x2d2479,'submitted':_0x4fde47&&!_0x2d2479,'backend':{'method':_0xa2d401[_0x29e673(0xc8)],'path':_0xa2d401[_0x29e673(0x9c)],'payload':_0xa2d401[_0x29e673(0xb6)]},..._0x5ab10c?{'verification':_0x5ab10c}:{},'warnings':[]};return{'ok':!![],'data':_0x3ac065,'message':_0x4fde47?_0x2d2479?_0x29e673(0xa4)+_0x4d4131[_0x29e673(0xbb)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x4d4131['code']:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x4d4131['code']};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a66_0x4aeced(0x94),'description':a66_0x4aeced(0x95),'risk':a66_0x4aeced(0x90),'flags':[CODE_FLAG,{'name':'business-group','type':a66_0x4aeced(0xb0),'required':!![],'description':a66_0x4aeced(0xae)},{'name':a66_0x4aeced(0xa9),'type':'string','required':![],'description':a66_0x4aeced(0xb7)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x56b6a8){validateInput(readBusinessGroupUpdateInput(_0x56b6a8));},async 'dryRun'(_0x229c8d){const _0x34eefc=a66_0x4aeced,_0x5ddbac=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x229c8d[_0x34eefc(0xc2)],'input':readBusinessGroupUpdateInput(_0x229c8d),'dryRun':!![]});return{'method':_0x5ddbac[_0x34eefc(0x87)][_0x34eefc(0xa5)][_0x34eefc(0xc8)],'url':_0x5ddbac['data'][_0x34eefc(0xa5)][_0x34eefc(0x9c)],'body':_0x5ddbac[_0x34eefc(0x87)][_0x34eefc(0xa5)][_0x34eefc(0xb6)],'description':_0x5ddbac[_0x34eefc(0x85)],..._0x5ddbac['data']};},async 'execute'(_0x55107c){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x55107c['appCode'],'input':readBusinessGroupUpdateInput(_0x55107c),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x1184cb){const _0x5666ff=a66_0x4aeced,_0xa0c14a=_0x1184cb['str'](_0x5666ff(0xa9));return{'code':trim(_0x1184cb[_0x5666ff(0x91)](_0x5666ff(0xbb))),'businessGroup':_0x1184cb['str'](_0x5666ff(0x8e)),'expectBusinessGroup':_0xa0c14a===undefined||_0xa0c14a===''?undefined:_0xa0c14a};}function validateInput(_0x4c1c80){const _0x265fa1=a66_0x4aeced;if(!trim(_0x4c1c80[_0x265fa1(0xbb)]))throw CliErrors[_0x265fa1(0xc7)](_0x265fa1(0xa0));if(_0x4c1c80[_0x265fa1(0xc0)]===undefined)throw CliErrors[_0x265fa1(0xc7)]('--business-group\x20is\x20required');if(!trim(_0x4c1c80['businessGroup']))throw CliErrors[_0x265fa1(0xc7)]('--business-group\x20must\x20not\x20be\x20blank');}function a66_0x37a3(){const _0x279b57=['prototype','modelId','keys','path','toUpperCase','metadata','dbTableSelector','--code\x20is\x20required','datasetName',',\x20actual\x20','sourceType','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','backend','parse','stringify','3526635UOhFJj','expect-business-group','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','db-table','matched','/smartapi/question/er-config/business-group/edit','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','/smartapi/dblink/updateTableBusinessGroup','string','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','expectBusinessGroup','ungrouped','value','isFinite','payload','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','120169YSOWvg','333nFmPxn','5635510ixklEX','code','update','POST','DB_TABLE','11747360UtWAyI','businessGroup','isArray','appCode','datasetId','length','modelCode','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','validation','method','234HvCCQe','tableName','number','trim','Expected\x20','found','84711BNeFpv','source','message','kind','data','dataset','name','call','413730DqUdtJ','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','122DQorGM','business-group','4AODMfh','write','str','dbId','5040cDqkhW','business-group-update','Update\x20business\x20scenario\x20group','dbLinkId','25562ZAgPEw','extend'];a66_0x37a3=function(){return _0x279b57;};return a66_0x37a3();}function assertBusinessGroupUpdateSupported(_0x2c7144,_0x1b7f8e){const _0x3c66d0=a66_0x4aeced;if(_0x2c7144['sourceType']===_0x3c66d0(0xbe)&&!_0x1b7f8e)throw CliErrors['validation'](_0x3c66d0(0x8c));}function resolveBusinessGroupDataset(_0x47badb,_0x3eb31d){const _0x316db5=a66_0x4aeced,_0x351387=asPlainObject(_0x47badb[_0x316db5(0x88)]),_0x52bf98=asPlainObject(_0x47badb['dbtableConfig']),_0x148205=resolveSourceType(_0x47badb,_0x351387,_0x52bf98),_0x331aa1=firstString(_0x47badb[_0x316db5(0xc5)],_0x47badb[_0x316db5(0xbb)],_0x351387['datasetCode'],_0x3eb31d)||_0x3eb31d;return{'id':firstNumber(_0x47badb['modelId'],_0x47badb['id'],_0x351387[_0x316db5(0xc3)])??firstString(_0x47badb[_0x316db5(0x9a)],_0x47badb['id'],_0x351387['datasetId'])??null,'code':_0x331aa1,'name':firstString(_0x47badb[_0x316db5(0x89)],_0x351387[_0x316db5(0xa1)],_0x351387['name'])||null,'sourceType':_0x148205,'dbTableSelector':_0x148205==='DB_TABLE'?{'dbLinkId':firstNumber(_0x52bf98[_0x316db5(0x92)]),'tableName':firstString(_0x52bf98['tableName'])||null}:null};}function resolveSourceType(_0x1150ca,_0x1c933e,_0x2753da){const _0x1f843b=a66_0x4aeced,_0x222e9e=firstString(_0x1150ca[_0x1f843b(0xd0)],_0x1150ca['sourceType'],_0x1c933e[_0x1f843b(0xd0)],_0x1c933e[_0x1f843b(0xa3)])?.[_0x1f843b(0xcc)]()[_0x1f843b(0x9d)]();if(_0x222e9e===_0x1f843b(0xbe)||_0x222e9e==='METADATA')return _0x222e9e;if(Object[_0x1f843b(0x9b)](_0x2753da)[_0x1f843b(0xc4)]>0x0)return _0x1f843b(0xbe);throw CliErrors['validation']('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x4f76da,_0x1ef669){const _0xd39750=a66_0x4aeced,_0x28850d=readBusinessGroupFromDatasetDetail(_0x4f76da,_0x1ef669[_0xd39750(0xa3)]);if(_0x28850d['found'])return normalizeBusinessGroup(_0x28850d[_0xd39750(0xb4)]);return'';}function readBusinessGroupFromDatasetDetail(_0x534520,_0x50cfd8){const _0x389456=a66_0x4aeced,_0x32a843=asPlainObject(_0x534520['dataset']),_0x7c3098=firstPresent(_0x534520[_0x389456(0xc0)]);if(_0x7c3098[_0x389456(0xce)])return _0x7c3098;const _0x25af78=firstPresent(_0x32a843['businessGroup']);if(_0x25af78[_0x389456(0xce)])return _0x25af78;if(_0x50cfd8===_0x389456(0xbe))return{'found':![]};const _0x23f880=readBusinessGroupFromExtend(_0x534520['extend']);if(_0x23f880['found'])return _0x23f880;return readBusinessGroupFromExtend(_0x32a843[_0x389456(0x98)]);}function readBusinessGroupFromExtend(_0x12aad9){const _0x3e04af=a66_0x4aeced;if(_0x12aad9===undefined||_0x12aad9===null||_0x12aad9==='')return{'found':![]};if(typeof _0x12aad9===_0x3e04af(0xb0))try{const _0x48edbf=JSON[_0x3e04af(0xa6)](_0x12aad9);return readBusinessGroupFromExtend(_0x48edbf);}catch{return{'found':![]};}const _0x37477e=asPlainObject(_0x12aad9);if(Object[_0x3e04af(0x99)]['hasOwnProperty'][_0x3e04af(0x8a)](_0x37477e,_0x3e04af(0xc0)))return{'found':!![],'value':_0x37477e['businessGroup']};return{'found':![]};}function firstPresent(..._0x3db0a1){for(const _0x70d465 of _0x3db0a1){if(_0x70d465!==undefined&&_0x70d465!==null)return{'found':!![],'value':_0x70d465};}return{'found':![]};}function assertExpectedBusinessGroup(_0xf54cd9,_0x4d597c){const _0x24e348=a66_0x4aeced;if(_0x4d597c===undefined)return;const _0x2f0090=normalizeBusinessGroupArgument(_0x4d597c);if(_0xf54cd9!==_0x2f0090)throw CliErrors[_0x24e348(0xc7)]('Expectation\x20mismatch\x20at\x20businessGroup',_0x24e348(0xcd)+JSON[_0x24e348(0xa7)](_0x2f0090)+_0x24e348(0xa2)+JSON['stringify'](_0xf54cd9));}function a66_0x134a(_0x2ec747,_0x23c571){_0x2ec747=_0x2ec747-0x85;const _0x37a3a0=a66_0x37a3();let _0x134aad=_0x37a3a0[_0x2ec747];return _0x134aad;}function buildBackendPlan(_0x3ed507,_0x589a8a,_0x233a06){const _0x494f59=a66_0x4aeced;if(_0x589a8a[_0x494f59(0xa3)]===_0x494f59(0xbe)){if(!_0x589a8a[_0x494f59(0x9f)]||_0x589a8a['dbTableSelector'][_0x494f59(0x96)]===null||!_0x589a8a[_0x494f59(0x9f)][_0x494f59(0xca)])throw CliErrors[_0x494f59(0xc7)](_0x494f59(0xaa),_0x494f59(0xb1));return{'kind':_0x494f59(0xab),'method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x589a8a[_0x494f59(0x9f)][_0x494f59(0x96)],'tableName':_0x589a8a[_0x494f59(0x9f)][_0x494f59(0xca)],'businessGroup':_0x233a06}};}return{'kind':_0x494f59(0x9e),'method':_0x494f59(0xbd),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x3ed507,'datasetCode':_0x589a8a[_0x494f59(0xbb)],'businessGroup':_0x233a06}};}function normalizeBusinessGroup(_0x477f56){const _0x534a54=a66_0x4aeced;if(_0x477f56===undefined||_0x477f56===null)return'';return String(_0x477f56)[_0x534a54(0xcc)]();}function normalizeBusinessGroupArgument(_0x1fae57){const _0x353be5=normalizeBusinessGroup(_0x1fae57);return _0x353be5===UNGROUPED_BUSINESS_GROUP?'':_0x353be5;}function displayBusinessGroup(_0x4b3ba8){return _0x4b3ba8||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x78ef6e){const _0x179e67=a66_0x4aeced;if(!_0x78ef6e||typeof _0x78ef6e!=='object'||Array[_0x179e67(0xc1)](_0x78ef6e))return{};return _0x78ef6e;}function firstString(..._0x5b9435){const _0x203c08=a66_0x4aeced;for(const _0x24e0f4 of _0x5b9435){if(typeof _0x24e0f4===_0x203c08(0xb0)&&_0x24e0f4[_0x203c08(0xcc)]())return _0x24e0f4[_0x203c08(0xcc)]();if(typeof _0x24e0f4==='number'&&Number['isFinite'](_0x24e0f4))return String(_0x24e0f4);}return undefined;}function firstNumber(..._0x547a92){const _0x3429a0=a66_0x4aeced;for(const _0x5d75ef of _0x547a92){if(typeof _0x5d75ef===_0x3429a0(0xcb)&&Number[_0x3429a0(0xb5)](_0x5d75ef))return _0x5d75ef;if(typeof _0x5d75ef===_0x3429a0(0xb0)&&_0x5d75ef[_0x3429a0(0xcc)]()&&Number[_0x3429a0(0xb5)](Number(_0x5d75ef)))return Number(_0x5d75ef);}return null;}function trim(_0x2cad71){const _0x1f8df7=a66_0x4aeced;return String(_0x2cad71||'')[_0x1f8df7(0xcc)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a67_0x4bf7a5=a67_0x3925;(function(_0x35078c,_0x5941bd){const _0xa6dac=a67_0x3925,_0x585a79=_0x35078c();while(!![]){try{const _0x4b1247=-parseInt(_0xa6dac(0x78))/0x1+parseInt(_0xa6dac(0x89))/0x2*(parseInt(_0xa6dac(0x8c))/0x3)+parseInt(_0xa6dac(0x88))/0x4+-parseInt(_0xa6dac(0x83))/0x5+parseInt(_0xa6dac(0x7c))/0x6*(-parseInt(_0xa6dac(0x8b))/0x7)+parseInt(_0xa6dac(0x84))/0x8+-parseInt(_0xa6dac(0x82))/0x9*(-parseInt(_0xa6dac(0x87))/0xa);if(_0x4b1247===_0x5941bd)break;else _0x585a79['push'](_0x585a79['shift']());}catch(_0x45862a){_0x585a79['push'](_0x585a79['shift']());}}}(a67_0x3cb9,0x8e144));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a67_0x3cb9(){const _0x34090b=['166347VENPjY','business-groups','read','appCode','508856tUWqMP','businessGroup','dbid','trim','441846LQEINz','length','DB_TABLE','groups','num','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','4149XQCMSM','5139685VrONyH','1087280tzAOeH','map','Found\x20','43580tOxYmh','1728372UQpTGc','18UYItOA','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','91aYsgGd'];a67_0x3cb9=function(){return _0x34090b;};return a67_0x3cb9();}function a67_0x3925(_0x4e2222,_0x6683a2){_0x4e2222=_0x4e2222-0x78;const _0x3cb964=a67_0x3cb9();let _0x392553=_0x3cb964[_0x4e2222];return _0x392553;}export const datasetBusinessGroups={'service':'dataset','command':a67_0x4bf7a5(0x8d),'description':a67_0x4bf7a5(0x8a),'risk':a67_0x4bf7a5(0x8e),'flags':[{'name':a67_0x4bf7a5(0x7a),'type':'number','required':!![],'description':a67_0x4bf7a5(0x81)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0xe07c03){const _0x19baa5=a67_0x4bf7a5,_0x4c712c=_0xe07c03[_0x19baa5(0x80)]('dbid'),_0x5f29c2=await getErBusinessGroupSummary(_0xe07c03[_0x19baa5(0x8f)],_0x4c712c),_0x4f39dc=_0x5f29c2[_0x19baa5(0x7f)][_0x19baa5(0x85)](_0x51ed78=>({..._0x51ed78,'businessGroup':_0x51ed78[_0x19baa5(0x79)][_0x19baa5(0x7b)]()||'ungrouped'}));return{'ok':!![],'data':{..._0x5f29c2,'groups':_0x4f39dc,'scope':_0x19baa5(0x7e)},'message':_0x19baa5(0x86)+_0x4f39dc[_0x19baa5(0x7d)]+'\x20business\x20group(s)\x20for\x20database\x20connection\x20'+_0x4c712c};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a68_0xedf9c3=a68_0x5269;(function(_0xe32a6e,_0x5750a8){const _0x3922c3=a68_0x5269,_0xc6980e=_0xe32a6e();while(!![]){try{const _0x3dfd27=parseInt(_0x3922c3(0x81))/0x1*(-parseInt(_0x3922c3(0x6a))/0x2)+-parseInt(_0x3922c3(0x70))/0x3+-parseInt(_0x3922c3(0x6b))/0x4*(parseInt(_0x3922c3(0x80))/0x5)+parseInt(_0x3922c3(0x85))/0x6+parseInt(_0x3922c3(0x71))/0x7*(-parseInt(_0x3922c3(0x83))/0x8)+-parseInt(_0x3922c3(0x7e))/0x9*(-parseInt(_0x3922c3(0x7a))/0xa)+parseInt(_0x3922c3(0x65))/0xb;if(_0x3dfd27===_0x5750a8)break;else _0xc6980e['push'](_0xc6980e['shift']());}catch(_0x475db5){_0xc6980e['push'](_0xc6980e['shift']());}}}(a68_0x224d,0xda165));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a68_0xedf9c3(0x79),'filter':a68_0xedf9c3(0x77),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY=a68_0xedf9c3(0x7b);function valueToString(_0x2d3f03){const _0x876cef=a68_0xedf9c3;return _0x2d3f03==null?'':String(_0x2d3f03)[_0x876cef(0x68)]();}function getDatasetCode(_0x47b1da){const _0x1a9339=a68_0xedf9c3;return valueToString(_0x47b1da[_0x1a9339(0x87)]??_0x47b1da['modelCode']??_0x47b1da[_0x1a9339(0x6e)]?.['datasetCode']);}function getDatasetName(_0x4cfece){const _0x5365fb=a68_0xedf9c3;return valueToString(_0x4cfece['name']??_0x4cfece['dataset']?.[_0x5365fb(0x74)])||_0x5365fb(0x7d);}function getDatasetSource(_0x5dfdba){const _0x14d27b=a68_0xedf9c3;return valueToString(_0x5dfdba[_0x14d27b(0x6c)]??_0x5dfdba[_0x14d27b(0x6e)]?.[_0x14d27b(0x84)])[_0x14d27b(0x7c)]();}function getDbtableConfig(_0x5e01bf){const _0x55782c=a68_0xedf9c3,_0x3cc055=_0x5e01bf[_0x55782c(0x6f)]??_0x5e01bf['dbtable'];return _0x3cc055&&typeof _0x3cc055==='object'?_0x3cc055:{};}function a68_0x224d(){const _0x1862f2=['1312839gbCoFN','63fpHqzz','UNKNOWN','METADATA','datasetName','getOne','filter','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','join','lovrabet','8868470jZyldq','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','toUpperCase','unknown','9VnbQNz','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','2106505FtWfDO','1518377JDgeMn','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','794128dhUjXb','sourceType','7685178ZkHCTF','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','code','21958860arseHx','tableName','The\x20current\x20dataset\x20\x22','trim','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','2nlykzL','4ShNMJg','source','\x20is\x20','dataset','dbtableConfig'];a68_0x224d=function(){return _0x1862f2;};return a68_0x224d();}export function isDbTableBackedDataset(_0x523d7d){const _0x45b9a6=a68_0xedf9c3,_0x53b34c=getDatasetSource(_0x523d7d);if(_0x53b34c===_0x45b9a6(0x73))return![];const _0x213455=getDbtableConfig(_0x523d7d),_0x25a429=_0x213455['dbId']??_0x213455['id'],_0x124a26=valueToString(_0x213455[_0x45b9a6(0x66)]??_0x523d7d[_0x45b9a6(0x66)]??_0x523d7d[_0x45b9a6(0x6e)]?.[_0x45b9a6(0x66)]);return _0x25a429!==undefined&&_0x25a429!==null&&_0x124a26['length']>0x0;}export function filterDbTableBackedDatasets(_0x7cb6e){return _0x7cb6e['filter'](_0x27aaa1=>isDbTableBackedDataset(_0x27aaa1));}export function buildDbTableBackedRequirementMessage(_0x2e6d48,_0x1d406a='SQL\x20schema\x20validation'){const _0x55c808=a68_0xedf9c3,_0x128ee8=getDatasetSource(_0x2e6d48)||_0x55c808(0x72),_0x2ec690=getDatasetName(_0x2e6d48),_0x5afb78=getDatasetCode(_0x2e6d48),_0x118ac6=_0x5afb78?'\x20('+_0x5afb78+')':'';return[_0x55c808(0x67)+_0x2ec690+'\x22'+_0x118ac6+_0x55c808(0x6d)+_0x128ee8+_0x55c808(0x69)+_0x1d406a+'.',_0x55c808(0x7f),_0x55c808(0x86),_0x55c808(0x82)+RUNTIME_DATA_ACCESS_COMMANDS[_0x55c808(0x76)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x55c808(0x75)]+'.'][_0x55c808(0x78)]('\x20');}function a68_0x5269(_0x342442,_0x12f144){_0x342442=_0x342442-0x65;const _0x224dc5=a68_0x224d();let _0x5269ec=_0x224dc5[_0x342442];return _0x5269ec;}export function assertDatasetIsDbTableBacked(_0x13b7b6,_0x5e8177){if(!isDbTableBackedDataset(_0x13b7b6))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x13b7b6,_0x5e8177));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x259f89=a69_0x10f8;(function(_0xa8e851,_0x5a2938){const _0x2ea557=a69_0x10f8,_0x54e5e8=_0xa8e851();while(!![]){try{const _0x48b71e=-parseInt(_0x2ea557(0x9f))/0x1+-parseInt(_0x2ea557(0xa4))/0x2*(parseInt(_0x2ea557(0xa2))/0x3)+parseInt(_0x2ea557(0xa0))/0x4*(-parseInt(_0x2ea557(0xa6))/0x5)+parseInt(_0x2ea557(0xa9))/0x6+-parseInt(_0x2ea557(0x9e))/0x7*(parseInt(_0x2ea557(0xa3))/0x8)+-parseInt(_0x2ea557(0xab))/0x9*(parseInt(_0x2ea557(0xa8))/0xa)+parseInt(_0x2ea557(0xaa))/0xb;if(_0x48b71e===_0x5a2938)break;else _0x54e5e8['push'](_0x54e5e8['shift']());}catch(_0x5ea430){_0x54e5e8['push'](_0x54e5e8['shift']());}}}(a69_0x4a6d,0xd5d02));function a69_0x4a6d(){const _0x5dc29f=['write','5KpOvNd','dataset','10aMBLpg','6214644rnaUPo','34498013tGHsLE','3063591hLnRrn','Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','112FFRxNB','1578997htrBdH','4386092EKnwEl','create','2364CuYxxx','95608fbGOTK','226usBrlq'];a69_0x4a6d=function(){return _0x5dc29f;};return a69_0x4a6d();}import{createCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';function a69_0x10f8(_0x38b578,_0x14d344){_0x38b578=_0x38b578-0x9d;const _0x4a6d0f=a69_0x4a6d();let _0x10f820=_0x4a6d0f[_0x38b578];return _0x10f820;}export const datasetCrossRelationCreate={'service':a69_0x259f89(0xa7),'command':'cross-relation-create','description':a69_0x259f89(0x9d),'risk':a69_0x259f89(0xa5),'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 _0x138524=>validateCrossRelation(_0x138524,a69_0x259f89(0xa1)),'dryRun':_0x43cea2=>previewCrossRelation(_0x43cea2,a69_0x259f89(0xa1)),'execute':_0x4d24fa=>executeCrossRelation(_0x4d24fa,a69_0x259f89(0xa1),createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x44d476=a70_0x3f77;(function(_0x5b712a,_0x236182){const _0x12c736=a70_0x3f77,_0x4b3d67=_0x5b712a();while(!![]){try{const _0x3ac991=parseInt(_0x12c736(0x194))/0x1*(parseInt(_0x12c736(0x185))/0x2)+parseInt(_0x12c736(0x18e))/0x3*(parseInt(_0x12c736(0x18c))/0x4)+parseInt(_0x12c736(0x18d))/0x5*(parseInt(_0x12c736(0x186))/0x6)+-parseInt(_0x12c736(0x18a))/0x7*(-parseInt(_0x12c736(0x190))/0x8)+-parseInt(_0x12c736(0x18f))/0x9+parseInt(_0x12c736(0x18b))/0xa*(-parseInt(_0x12c736(0x192))/0xb)+-parseInt(_0x12c736(0x193))/0xc*(parseInt(_0x12c736(0x191))/0xd);if(_0x3ac991===_0x236182)break;else _0x4b3d67['push'](_0x4b3d67['shift']());}catch(_0x5b19a3){_0x4b3d67['push'](_0x4b3d67['shift']());}}}(a70_0x104f,0x7eb5b));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_0x104f(){const _0x420e23=['delete','Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','high-risk-write','21ubvVzt','2410TaVHsl','4sODoTQ','11835logdrm','1597863sxmwdy','6567606UuGsYt','1520704TyfYBD','2499653IGzcGC','38170pGjbDg','12ngaFxV','5762VmHkuM','254WhSpIZ','1122IZBkUl'];a70_0x104f=function(){return _0x420e23;};return a70_0x104f();}function a70_0x3f77(_0x4fe6cf,_0xbc5fd7){_0x4fe6cf=_0x4fe6cf-0x185;const _0x104f84=a70_0x104f();let _0x3f77d2=_0x104f84[_0x4fe6cf];return _0x3f77d2;}export const datasetCrossRelationDelete={'service':'dataset','command':'cross-relation-delete','description':a70_0x44d476(0x188),'risk':a70_0x44d476(0x189),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x2a0cd5=>validateCrossRelation(_0x2a0cd5,a70_0x44d476(0x187)),'dryRun':_0x185520=>previewCrossRelation(_0x185520,'delete'),'execute':_0x2398bc=>executeCrossRelation(_0x2398bc,'delete',deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x20c0ee=a71_0x7957;(function(_0x4f1ce9,_0x59984d){const _0x26b4e4=a71_0x7957,_0x189d97=_0x4f1ce9();while(!![]){try{const _0x2bcbba=-parseInt(_0x26b4e4(0x17e))/0x1+-parseInt(_0x26b4e4(0x181))/0x2+parseInt(_0x26b4e4(0x173))/0x3+parseInt(_0x26b4e4(0x180))/0x4+parseInt(_0x26b4e4(0x178))/0x5+-parseInt(_0x26b4e4(0x175))/0x6*(parseInt(_0x26b4e4(0x17b))/0x7)+parseInt(_0x26b4e4(0x17f))/0x8;if(_0x2bcbba===_0x59984d)break;else _0x189d97['push'](_0x189d97['shift']());}catch(_0x560563){_0x189d97['push'](_0x189d97['shift']());}}}(a71_0x3830,0x64d2b));function a71_0x7957(_0x4b1623,_0x479aa7){_0x4b1623=_0x4b1623-0x172;const _0x383015=a71_0x3830();let _0x795763=_0x383015[_0x4b1623];return _0x795763;}import{queryCrossDbRelations}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CROSS_RELATION_DBLINK_FLAG,CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG}from'../../commands/common/flags.js';import{projectCrossRelation,resolveCrossRelationQuery,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationList={'service':a71_0x20c0ee(0x182),'command':a71_0x20c0ee(0x179),'description':a71_0x20c0ee(0x17c),'risk':a71_0x20c0ee(0x17a),'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 _0x5d0418=>validateCrossRelation(_0x5d0418,a71_0x20c0ee(0x17d)),async 'execute'(_0xcb7603){const _0x2f051b=a71_0x20c0ee,_0xfcb19a=await resolveCrossRelationQuery(_0xcb7603),_0x269340=await queryCrossDbRelations(_0xfcb19a);return{'ok':!![],'data':{'appCode':_0xcb7603[_0x2f051b(0x183)],'selector':_0xfcb19a,'total':_0x269340[_0x2f051b(0x176)],'relations':_0x269340[_0x2f051b(0x177)](projectCrossRelation)},'message':_0x2f051b(0x172)+_0x269340[_0x2f051b(0x176)]+_0x2f051b(0x174)};}};function a71_0x3830(){const _0xe6369d=['1021629jxvVpA','\x20relation(s)','194772VmCLcK','length','map','262425AyaExo','cross-relation-list','read','175BmIshj','List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','list','372342KKzCZD','8009784jAVcWm','3286184QBeaQD','1237868zObIbh','dataset','appCode','Cross-database\x20relations:\x20'];a71_0x3830=function(){return _0xe6369d;};return a71_0x3830();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4a67d6,_0x58fa61){const _0xc581c2=a72_0x1b10,_0x3efda4=_0x4a67d6();while(!![]){try{const _0x4f0b53=-parseInt(_0xc581c2(0x1ee))/0x1+parseInt(_0xc581c2(0x21e))/0x2*(-parseInt(_0xc581c2(0x1e9))/0x3)+-parseInt(_0xc581c2(0x1d3))/0x4*(parseInt(_0xc581c2(0x203))/0x5)+parseInt(_0xc581c2(0x218))/0x6+-parseInt(_0xc581c2(0x223))/0x7+parseInt(_0xc581c2(0x1e8))/0x8+-parseInt(_0xc581c2(0x1fb))/0x9*(-parseInt(_0xc581c2(0x1de))/0xa);if(_0x4f0b53===_0x58fa61)break;else _0x3efda4['push'](_0x3efda4['shift']());}catch(_0x17ab74){_0x3efda4['push'](_0x3efda4['shift']());}}}(a72_0x3746,0x9e03b));import{getDatasetDetail,queryCrossDbRelations}from'../../core/api-client.js';import{CROSS_DB_RELATION_PATHS}from'../../core/cross-db-relation.js';function a72_0x1b10(_0x51492d,_0x3d3a05){_0x51492d=_0x51492d-0x1d3;const _0x37464d=a72_0x3746();let _0x1b1040=_0x37464d[_0x51492d];return _0x1b1040;}import{CliError,CliErrors}from'../../errors.js';import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0x5182c6,_0x488dc6){const _0x583c18=a72_0x1b10,_0xc55f7d=_0x5182c6['str'](_0x488dc6)[_0x583c18(0x21c)]();if(!_0xc55f7d)throw CliErrors[_0x583c18(0x1d5)](_0x488dc6);return _0xc55f7d;}function explicitDblink(_0x3ad325){const _0x1bcd3d=a72_0x1b10,_0x40f110=_0x3ad325[_0x1bcd3d(0x1da)]('from-dblink-id');if(_0x40f110===undefined||_0x40f110===null)return undefined;const _0x26ea59=Number(_0x40f110);if(!Number[_0x1bcd3d(0x1ff)](_0x26ea59)||_0x26ea59<=0x0)throw CliErrors[_0x1bcd3d(0x212)]('--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x26ea59;}export function validateCrossRelation(_0x50bb5c,_0x29f35b){const _0x7f0aed=a72_0x1b10,_0x43995b=explicitDblink(_0x50bb5c);if(_0x29f35b===_0x7f0aed(0x1ec)){if(!_0x50bb5c[_0x7f0aed(0x1fd)](_0x7f0aed(0x21b))[_0x7f0aed(0x21c)]()&&_0x43995b===undefined)throw CliErrors[_0x7f0aed(0x212)](_0x7f0aed(0x204));return;}required(_0x50bb5c,'from-datasetcode'),required(_0x50bb5c,'from-column');if(_0x29f35b!==_0x7f0aed(0x1ea)){required(_0x50bb5c,_0x7f0aed(0x1fc)),required(_0x50bb5c,_0x7f0aed(0x217));const _0x17c192=_0x50bb5c[_0x7f0aed(0x1fd)]('cardinality')[_0x7f0aed(0x21c)]();if(_0x17c192&&!CROSS_RELATION_CARDINALITY_FLAG['enum'][_0x7f0aed(0x1e4)](_0x17c192))throw CliErrors[_0x7f0aed(0x212)](_0x7f0aed(0x1d4));}}async function resolveEndpoint(_0x2086a8){const _0x53cb90=a72_0x1b10,_0x22383f=await getDatasetDetail(_0x2086a8),_0xc2d51f=_0x22383f?.[_0x53cb90(0x225)]??{};if((_0x22383f?.[_0x53cb90(0x1df)]??_0xc2d51f[_0x53cb90(0x1f0)])!=='DB_TABLE')throw CliErrors[_0x53cb90(0x212)](_0x53cb90(0x214)+_0x2086a8+_0x53cb90(0x205));const _0x166d31=_0x22383f[_0x53cb90(0x20e)]??_0x22383f['dbtable']??{};let _0x1935a5=_0x22383f[_0x53cb90(0x1e7)]??_0xc2d51f[_0x53cb90(0x1e7)]??{};if(typeof _0x1935a5===_0x53cb90(0x227))try{_0x1935a5=_0x1935a5['trim']()?JSON[_0x53cb90(0x1f7)](_0x1935a5):{};}catch{throw CliErrors[_0x53cb90(0x212)](_0x53cb90(0x214)+_0x2086a8+_0x53cb90(0x1e3));}const _0xc80ef5=Number(_0x1935a5?.[_0x53cb90(0x1d7)]?.[_0x53cb90(0x20c)]??_0x22383f[_0x53cb90(0x1d7)]?.[_0x53cb90(0x20c)]??_0xc2d51f[_0x53cb90(0x1d7)]?.[_0x53cb90(0x20c)]??_0x166d31['dbId']??_0xc2d51f[_0x53cb90(0x20c)]??_0x22383f[_0x53cb90(0x20c)]),_0x133fe0=String(_0x22383f[_0x53cb90(0x1db)]??_0xc2d51f[_0x53cb90(0x1db)]??_0x166d31[_0x53cb90(0x1db)]??'')['trim']();if(!Number['isSafeInteger'](_0xc80ef5)||_0xc80ef5<=0x0||!_0x133fe0)throw CliErrors[_0x53cb90(0x212)]('Dataset\x20'+_0x2086a8+_0x53cb90(0x1e5));return{'datasetCode':_0x2086a8,'dblinkId':_0xc80ef5,'table':_0x133fe0};}export async function resolveCrossRelationQuery(_0x1351c6){const _0x4b5cb8=a72_0x1b10,_0x48d68b=_0x1351c6['str']('from-datasetcode')[_0x4b5cb8(0x21c)](),_0x2a0196=explicitDblink(_0x1351c6),_0x31e432=_0x48d68b?await resolveEndpoint(_0x48d68b):undefined;if(_0x31e432&&_0x2a0196!==undefined&&_0x31e432[_0x4b5cb8(0x1f1)]!==_0x2a0196)throw CliErrors[_0x4b5cb8(0x212)](_0x4b5cb8(0x21f));const _0x419d8a=_0x31e432?.['dblinkId']??_0x2a0196;if(_0x419d8a===undefined)throw CliErrors[_0x4b5cb8(0x212)](_0x4b5cb8(0x204));return{'appCode':_0x1351c6[_0x4b5cb8(0x1dd)],'fromDblinkId':_0x419d8a,..._0x48d68b?{'fromDatasetCode':_0x48d68b}:{},..._0x1351c6['str'](_0x4b5cb8(0x206))[_0x4b5cb8(0x21c)]()?{'fromField':_0x1351c6['str'](_0x4b5cb8(0x206))[_0x4b5cb8(0x21c)]()}:{}};}export function projectCrossRelation(_0x374c30){const _0x114691=a72_0x1b10;return{'relationId':_0x374c30[_0x114691(0x1f4)],'from':{'source':_0x114691(0x20b),'datasetCode':_0x374c30[_0x114691(0x201)],'datasetName':_0x374c30[_0x114691(0x21a)],'dblinkId':_0x374c30[_0x114691(0x226)],'table':_0x374c30[_0x114691(0x1d6)],'field':_0x374c30['fromField']},'to':{'source':_0x114691(0x20b),'datasetCode':_0x374c30[_0x114691(0x228)],'datasetName':_0x374c30['toDatasetName'],'dblinkId':_0x374c30['toDblinkId'],'table':_0x374c30[_0x114691(0x202)],'field':_0x374c30[_0x114691(0x200)],'labelField':_0x374c30[_0x114691(0x219)]},'relation':{'cardinality':_0x374c30[_0x114691(0x21d)],'relationType':_0x374c30[_0x114691(0x1fa)]}};}function ambiguity(_0x1a42e6){const _0x4cca20=a72_0x1b10,_0x2d336b=CliErrors[_0x4cca20(0x212)]('Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.',_0x4cca20(0x1f9));return Object[_0x4cca20(0x209)](_0x2d336b,_0x4cca20(0x1d9),{'value':{'candidates':_0x1a42e6[_0x4cca20(0x215)](projectCrossRelation)}}),_0x2d336b;}const sameName=(_0x2cb1be,_0x5292be)=>_0x2cb1be['toLowerCase']()===_0x5292be['toLowerCase']();function a72_0x3746(){const _0x520ad5=['dbtableConfig','apiError','label_inherited','to-label-column','validation','Would\x20','Dataset\x20','map','toDblinkId','to-column','4207548rYXzfH','refTableLabelName','fromDatasetName','from-datasetcode','trim','cardinality','934sRfZJh','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','before','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','from','7958769OEYPVH','catch','dataset','fromDblinkId','string','toDatasetCode','4aFMLsQ','Invalid\x20--cardinality.','flagMissing','fromTableName','storageProfile','\x20verified.','data','flag','tableName','matched','appCode','20JzrEQl','source','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','\x20write\x20was\x20not\x20verified.','Cross-database\x20relation\x20','\x20has\x20invalid\x20storage\x20configuration.','includes','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','\x20a\x20cross-database\x20relation\x20for\x20','extend','4520080NykvlO','2865XKnhjJ','delete','expectedCardinality','list','query','786007tqjXpD','table','sourceType','dblinkId','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','fromField','relationId','expectedLabel','some','parse','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','relationType','11543013VElZzY','to-datasetcode','str','datasetCode','isSafeInteger','toField','fromDatasetCode','toTableName','4075980IvkNji','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','from-column','unconfirmed','body','defineProperty','create','DB_TABLE','dbId','length'];a72_0x3746=function(){return _0x520ad5;};return a72_0x3746();}function matchesEndpoint(_0x17869f,_0x402f58,_0x537a0c,_0xcd8218,_0x4abf52){const _0x348a1e=a72_0x1b10;return _0x17869f[_0x348a1e(0x226)]===_0x402f58[_0x348a1e(0x1f1)]&&sameName(_0x17869f[_0x348a1e(0x1d6)],_0x402f58[_0x348a1e(0x1ef)])&&sameName(_0x17869f[_0x348a1e(0x1f3)],_0x537a0c)&&_0x17869f[_0x348a1e(0x216)]===_0xcd8218[_0x348a1e(0x1f1)]&&sameName(_0x17869f[_0x348a1e(0x202)],_0xcd8218[_0x348a1e(0x1ef)])&&sameName(_0x17869f[_0x348a1e(0x200)],_0x4abf52);}export async function prepareCrossRelation(_0x5ef5e8,_0x59e663){const _0x280cfc=a72_0x1b10,_0x1300b3=await resolveEndpoint(required(_0x5ef5e8,_0x280cfc(0x21b))),_0x515155=explicitDblink(_0x5ef5e8);if(_0x515155!==undefined&&_0x1300b3[_0x280cfc(0x1f1)]!==_0x515155)throw CliErrors[_0x280cfc(0x212)](_0x280cfc(0x21f));const _0xef470f={'appCode':_0x5ef5e8[_0x280cfc(0x1dd)],'fromDatasetCode':_0x1300b3['datasetCode'],'fromField':required(_0x5ef5e8,'from-column'),..._0x515155!==undefined?{'fromDblinkId':_0x515155}:{}},_0x361359={'appCode':_0x5ef5e8['appCode'],'fromDblinkId':_0x1300b3[_0x280cfc(0x1f1)],'fromDatasetCode':_0x1300b3[_0x280cfc(0x1fe)],'fromField':_0xef470f['fromField']},_0x59a454=await queryCrossDbRelations(_0x361359);let _0x3ecd63=null;if(_0x59e663!==_0x280cfc(0x20a)){if(_0x59a454[_0x280cfc(0x20d)]>0x1)throw ambiguity(_0x59a454);_0x3ecd63=_0x59a454[0x0]??null;if(!_0x3ecd63)throw CliErrors[_0x280cfc(0x212)]('Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.');}if(_0x59e663==='delete')return{'operation':_0x59e663,'from':_0x1300b3,'query':_0x361359,'body':_0xef470f,'before':_0x3ecd63};const _0x10fc32=await resolveEndpoint(required(_0x5ef5e8,'to-datasetcode'));if(_0x1300b3[_0x280cfc(0x1f1)]===_0x10fc32[_0x280cfc(0x1f1)])throw CliErrors['validation'](_0x280cfc(0x1f8));const _0x246530=_0x5ef5e8[_0x280cfc(0x1fd)](_0x280cfc(0x211))[_0x280cfc(0x21c)](),_0x308ce0=_0x5ef5e8[_0x280cfc(0x1fd)]('cardinality')['trim'](),_0x2f41d4={..._0xef470f,'toDatasetCode':_0x10fc32[_0x280cfc(0x1fe)],'toField':required(_0x5ef5e8,'to-column'),..._0x246530?{'refTableLabelName':_0x246530}:{},..._0x308ce0?{'cardinality':_0x308ce0}:{}};if(_0x59a454[_0x280cfc(0x1f6)](_0x3a599c=>_0x3a599c[_0x280cfc(0x1f4)]!==_0x3ecd63?.['relationId']&&matchesEndpoint(_0x3a599c,_0x1300b3,_0x2f41d4[_0x280cfc(0x1f3)],_0x10fc32,_0x2f41d4['toField'])))throw CliErrors[_0x280cfc(0x212)](_0x280cfc(0x1f2));return{'operation':_0x59e663,'from':_0x1300b3,'to':_0x10fc32,'query':_0x361359,'body':_0x2f41d4,'before':_0x3ecd63,'expectedLabel':_0x246530||_0x3ecd63?.[_0x280cfc(0x219)]||_0x2f41d4[_0x280cfc(0x200)],'expectedCardinality':_0x308ce0||_0x3ecd63?.['cardinality']||null};}function mutationData(_0x1aeb38,_0x31b8be,_0x4b8a37){const _0x7c55a4=a72_0x1b10,{operation:_0x1992c1,body:_0x638a55,before:_0x514c14}=_0x1aeb38;return{'operation':_0x1992c1,'selector':{'appCode':_0x638a55[_0x7c55a4(0x1dd)],'from':{'datasetCode':_0x638a55['fromDatasetCode'],'field':_0x638a55['fromField'],'dblinkId':_0x1aeb38[_0x7c55a4(0x222)][_0x7c55a4(0x1f1)]}},'before':_0x514c14?projectCrossRelation(_0x514c14):null,'after':_0x4b8a37,'dryRun':_0x31b8be,'backend':{'method':'POST','path':CROSS_DB_RELATION_PATHS[_0x1992c1]},'warnings':_0x1992c1==='update'&&!_0x638a55[_0x7c55a4(0x219)]?[{'code':_0x7c55a4(0x210),'message':_0x7c55a4(0x1e0)}]:[]};}export async function previewCrossRelation(_0x2e9d02,_0x18d46a){const _0x3c8d90=a72_0x1b10,_0x10d096=await prepareCrossRelation(_0x2e9d02,_0x18d46a),_0x97f11b=_0x10d096['body'],_0x41047e=_0x18d46a===_0x3c8d90(0x1ea)?null:{..._0x10d096[_0x3c8d90(0x220)]?{'relationId':_0x10d096[_0x3c8d90(0x220)]['relationId']}:{},'from':{'datasetCode':_0x10d096[_0x3c8d90(0x222)][_0x3c8d90(0x1fe)],'dblinkId':_0x10d096[_0x3c8d90(0x222)][_0x3c8d90(0x1f1)],'table':_0x10d096['from'][_0x3c8d90(0x1ef)],'field':_0x97f11b['fromField']},'to':{'datasetCode':_0x10d096['to'][_0x3c8d90(0x1fe)],'dblinkId':_0x10d096['to'][_0x3c8d90(0x1f1)],'table':_0x10d096['to'][_0x3c8d90(0x1ef)],'field':_0x97f11b[_0x3c8d90(0x200)],'labelField':_0x10d096[_0x3c8d90(0x1f5)]},'relation':{'cardinality':_0x10d096[_0x3c8d90(0x1eb)],'relationType':0x2}};return{...mutationData(_0x10d096,!![],null),'after':_0x41047e,'method':'POST','url':CROSS_DB_RELATION_PATHS[_0x18d46a],'body':_0x10d096[_0x3c8d90(0x208)],'description':_0x3c8d90(0x213)+_0x18d46a+_0x3c8d90(0x1e6)+_0x97f11b['fromDatasetCode']+'.'+_0x97f11b[_0x3c8d90(0x1f3)]};}export async function executeCrossRelation(_0x24e89b,_0x21625e,_0x1f4422){const _0x1410ad=a72_0x1b10,_0x33629b=await prepareCrossRelation(_0x24e89b,_0x21625e);try{await _0x1f4422(_0x33629b[_0x1410ad(0x208)]);}catch(_0x1c3836){if(_0x1c3836 instanceof CliError&&_0x1c3836['message'][_0x1410ad(0x1e4)]('multiple\x20cross-database\x20relations\x20matched')){const _0x10ac78=await queryCrossDbRelations(_0x33629b[_0x1410ad(0x1ed)])[_0x1410ad(0x224)](()=>[]);throw ambiguity(_0x10ac78);}throw _0x1c3836;}let _0xc1fb5d=[],_0x343205,_0x498dc2=![];try{_0xc1fb5d=await queryCrossDbRelations(_0x33629b[_0x1410ad(0x1ed)]);if(_0x21625e===_0x1410ad(0x1ea))_0x498dc2=!_0xc1fb5d[_0x1410ad(0x1f6)](_0x53fa4b=>_0x53fa4b['relationId']===_0x33629b[_0x1410ad(0x220)][_0x1410ad(0x1f4)]);else{const _0x21163f=_0x33629b['body'],_0x54632f=_0xc1fb5d['filter'](_0x3437f9=>matchesEndpoint(_0x3437f9,_0x33629b['from'],_0x21163f[_0x1410ad(0x1f3)],_0x33629b['to'],_0x21163f['toField'])&&(_0x21625e==='create'||_0x3437f9[_0x1410ad(0x1f4)]===_0x33629b['before'][_0x1410ad(0x1f4)]));_0x343205=_0x54632f['length']===0x1?_0x54632f[0x0]:undefined,_0x498dc2=!!_0x343205&&_0x343205[_0x1410ad(0x219)]===_0x33629b[_0x1410ad(0x1f5)]&&_0x343205['cardinality']===_0x33629b['expectedCardinality']&&_0x343205[_0x1410ad(0x1fa)]===0x2;}}catch{}const _0x4cd3f0={...mutationData(_0x33629b,![],_0x343205?projectCrossRelation(_0x343205):null),'verification':{'status':_0x498dc2?_0x1410ad(0x1dc):_0x1410ad(0x207),'verified':_0x498dc2}};if(!_0x498dc2){const _0x3b28ef=CliErrors[_0x1410ad(0x20f)](_0x1410ad(0x1e2)+_0x21625e+_0x1410ad(0x1e1),_0x1410ad(0x221));Object[_0x1410ad(0x209)](_0x3b28ef,'data',{'value':{..._0x4cd3f0,'candidates':_0xc1fb5d[_0x1410ad(0x215)](projectCrossRelation)}});throw _0x3b28ef;}return{'ok':!![],'data':_0x4cd3f0,'message':_0x1410ad(0x1e2)+_0x21625e+_0x1410ad(0x1d8)};}
|
|
1
|
+
const a72_0x262cfd=a72_0x4d5c;(function(_0x9d83b9,_0x49642f){const _0x41bfe3=a72_0x4d5c,_0x3e31a7=_0x9d83b9();while(!![]){try{const _0x56c8d8=-parseInt(_0x41bfe3(0xd5))/0x1+-parseInt(_0x41bfe3(0xe5))/0x2*(parseInt(_0x41bfe3(0xd4))/0x3)+-parseInt(_0x41bfe3(0xd1))/0x4+-parseInt(_0x41bfe3(0xea))/0x5*(parseInt(_0x41bfe3(0xd9))/0x6)+parseInt(_0x41bfe3(0x103))/0x7*(parseInt(_0x41bfe3(0x102))/0x8)+parseInt(_0x41bfe3(0xde))/0x9+-parseInt(_0x41bfe3(0xf1))/0xa*(-parseInt(_0x41bfe3(0xfb))/0xb);if(_0x56c8d8===_0x49642f)break;else _0x3e31a7['push'](_0x3e31a7['shift']());}catch(_0x307111){_0x3e31a7['push'](_0x3e31a7['shift']());}}}(a72_0x8efd,0xc5335));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(_0x162a58,_0x5a72cc){const _0x1e5acb=a72_0x4d5c,_0x13609c=_0x162a58[_0x1e5acb(0x101)](_0x5a72cc)['trim']();if(!_0x13609c)throw CliErrors[_0x1e5acb(0xb8)](_0x5a72cc);return _0x13609c;}function explicitDblink(_0x294279){const _0x4434b4=a72_0x4d5c,_0x1f309f=_0x294279[_0x4434b4(0xd0)](_0x4434b4(0xcb));if(_0x1f309f===undefined||_0x1f309f===null)return undefined;const _0x5a60ce=Number(_0x1f309f);if(!Number[_0x4434b4(0xce)](_0x5a60ce)||_0x5a60ce<=0x0)throw CliErrors['validation'](_0x4434b4(0xed));return _0x5a60ce;}export function validateCrossRelation(_0x5e801a,_0x5d88f8){const _0x5e298a=a72_0x4d5c,_0xf05b20=explicitDblink(_0x5e801a);if(_0x5d88f8===_0x5e298a(0xbb)){if(!_0x5e801a['str'](_0x5e298a(0x10b))[_0x5e298a(0xe4)]()&&_0xf05b20===undefined)throw CliErrors['validation'](_0x5e298a(0x100));return;}required(_0x5e801a,_0x5e298a(0x10b)),required(_0x5e801a,'from-column');if(_0x5d88f8!==_0x5e298a(0xbe)){required(_0x5e801a,'to-datasetcode'),required(_0x5e801a,_0x5e298a(0xd7));const _0x1b20b0=_0x5e801a[_0x5e298a(0x101)]('cardinality')[_0x5e298a(0xe4)]();if(_0x1b20b0&&!CROSS_RELATION_CARDINALITY_FLAG['enum'][_0x5e298a(0xb9)](_0x1b20b0))throw CliErrors[_0x5e298a(0xb7)]('Invalid\x20--cardinality.');}}async function resolveEndpoint(_0x36af4d){const _0x529dce=a72_0x4d5c,_0x42793a=await getDatasetDetail(_0x36af4d),_0x5da4db=_0x42793a?.[_0x529dce(0xfc)]??{};if((_0x42793a?.[_0x529dce(0xfd)]??_0x5da4db[_0x529dce(0xef)])!==_0x529dce(0xb6))throw CliErrors[_0x529dce(0xb7)](_0x529dce(0xe8)+_0x36af4d+_0x529dce(0xf6));const _0x98dd4a=_0x42793a[_0x529dce(0xca)]??_0x42793a[_0x529dce(0xc4)]??{};let _0x316b93=_0x42793a[_0x529dce(0xeb)]??_0x5da4db[_0x529dce(0xeb)]??{};if(typeof _0x316b93==='string')try{_0x316b93=_0x316b93[_0x529dce(0xe4)]()?JSON[_0x529dce(0xe1)](_0x316b93):{};}catch{throw CliErrors[_0x529dce(0xb7)]('Dataset\x20'+_0x36af4d+_0x529dce(0x107));}const _0x160767=Number(_0x316b93?.['storageProfile']?.[_0x529dce(0xf4)]??_0x42793a[_0x529dce(0xc2)]?.[_0x529dce(0xf4)]??_0x5da4db[_0x529dce(0xc2)]?.['dbId']??_0x98dd4a[_0x529dce(0xf4)]??_0x5da4db['dbId']??_0x42793a[_0x529dce(0xf4)]),_0x4d9040=String(_0x42793a['tableName']??_0x5da4db['tableName']??_0x98dd4a[_0x529dce(0xe9)]??'')['trim']();if(!Number[_0x529dce(0xce)](_0x160767)||_0x160767<=0x0||!_0x4d9040)throw CliErrors['validation'](_0x529dce(0xe8)+_0x36af4d+_0x529dce(0xc0));return{'datasetCode':_0x36af4d,'dblinkId':_0x160767,'table':_0x4d9040};}export async function resolveCrossRelationQuery(_0xd2b64b){const _0x3fb588=a72_0x4d5c,_0x5d0214=_0xd2b64b[_0x3fb588(0x101)]('from-datasetcode')[_0x3fb588(0xe4)](),_0x5ad95e=explicitDblink(_0xd2b64b),_0x29a5f0=_0x5d0214?await resolveEndpoint(_0x5d0214):undefined;if(_0x29a5f0&&_0x5ad95e!==undefined&&_0x29a5f0[_0x3fb588(0xee)]!==_0x5ad95e)throw CliErrors[_0x3fb588(0xb7)](_0x3fb588(0xbf));const _0x2dad50=_0x29a5f0?.['dblinkId']??_0x5ad95e;if(_0x2dad50===undefined)throw CliErrors['validation'](_0x3fb588(0x100));return{'appCode':_0xd2b64b[_0x3fb588(0xbc)],'fromDblinkId':_0x2dad50,..._0x5d0214?{'fromDatasetCode':_0x5d0214}:{},..._0xd2b64b['str'](_0x3fb588(0xc6))[_0x3fb588(0xe4)]()?{'fromField':_0xd2b64b[_0x3fb588(0x101)]('from-column')[_0x3fb588(0xe4)]()}:{}};}export function projectCrossRelation(_0x2c1ab5){const _0x9b6d12=a72_0x4d5c;return{'relationId':_0x2c1ab5[_0x9b6d12(0xb4)],'from':{'source':_0x9b6d12(0xb6),'datasetCode':_0x2c1ab5[_0x9b6d12(0xf0)],'datasetName':_0x2c1ab5['fromDatasetName'],'dblinkId':_0x2c1ab5[_0x9b6d12(0xfa)],'table':_0x2c1ab5['fromTableName'],'field':_0x2c1ab5[_0x9b6d12(0xd2)]},'to':{'source':_0x9b6d12(0xb6),'datasetCode':_0x2c1ab5[_0x9b6d12(0xcf)],'datasetName':_0x2c1ab5['toDatasetName'],'dblinkId':_0x2c1ab5[_0x9b6d12(0xf7)],'table':_0x2c1ab5[_0x9b6d12(0xf9)],'field':_0x2c1ab5[_0x9b6d12(0xe0)],'labelField':_0x2c1ab5[_0x9b6d12(0xc3)]},'relation':{'cardinality':_0x2c1ab5['cardinality'],'relationType':_0x2c1ab5['relationType']}};}function ambiguity(_0xc08f17){const _0x59b033=a72_0x4d5c,_0x1d60e1=CliErrors[_0x59b033(0xb7)](_0x59b033(0xba),_0x59b033(0xcc));return Object[_0x59b033(0xe7)](_0x1d60e1,'data',{'value':{'candidates':_0xc08f17[_0x59b033(0xc5)](projectCrossRelation)}}),_0x1d60e1;}const sameName=(_0x24a902,_0x4567b8)=>_0x24a902['toLowerCase']()===_0x4567b8[a72_0x262cfd(0xec)]();function matchesEndpoint(_0x344b6c,_0x3be9f7,_0x4985fa,_0x50ba37,_0x2c3cd9){const _0xfccc60=a72_0x262cfd;return _0x344b6c[_0xfccc60(0xfa)]===_0x3be9f7['dblinkId']&&sameName(_0x344b6c['fromTableName'],_0x3be9f7['table'])&&sameName(_0x344b6c[_0xfccc60(0xd2)],_0x4985fa)&&_0x344b6c[_0xfccc60(0xf7)]===_0x50ba37[_0xfccc60(0xee)]&&sameName(_0x344b6c['toTableName'],_0x50ba37[_0xfccc60(0xf5)])&&sameName(_0x344b6c['toField'],_0x2c3cd9);}export async function prepareCrossRelation(_0x1dd171,_0x1ef5f2){const _0xdbce55=a72_0x262cfd,_0x3e52aa=await resolveEndpoint(required(_0x1dd171,_0xdbce55(0x10b))),_0xcc6d7b=explicitDblink(_0x1dd171);if(_0xcc6d7b!==undefined&&_0x3e52aa[_0xdbce55(0xee)]!==_0xcc6d7b)throw CliErrors['validation'](_0xdbce55(0xbf));const _0x568d6f={'appCode':_0x1dd171[_0xdbce55(0xbc)],'fromDatasetCode':_0x3e52aa['datasetCode'],'fromField':required(_0x1dd171,_0xdbce55(0xc6)),..._0xcc6d7b!==undefined?{'fromDblinkId':_0xcc6d7b}:{}},_0x21e950={'appCode':_0x1dd171[_0xdbce55(0xbc)],'fromDblinkId':_0x3e52aa[_0xdbce55(0xee)],'fromDatasetCode':_0x3e52aa[_0xdbce55(0xc8)],'fromField':_0x568d6f[_0xdbce55(0xd2)]},_0x4e7b3a=await queryCrossDbRelations(_0x21e950);let _0x2d1fb4=null;if(_0x1ef5f2!==_0xdbce55(0xc7)){if(_0x4e7b3a[_0xdbce55(0xe2)]>0x1)throw ambiguity(_0x4e7b3a);_0x2d1fb4=_0x4e7b3a[0x0]??null;if(!_0x2d1fb4)throw CliErrors[_0xdbce55(0xb7)](_0xdbce55(0x105));}if(_0x1ef5f2==='delete')return{'operation':_0x1ef5f2,'from':_0x3e52aa,'query':_0x21e950,'body':_0x568d6f,'before':_0x2d1fb4};const _0x24e1ae=await resolveEndpoint(required(_0x1dd171,_0xdbce55(0x108)));if(_0x3e52aa[_0xdbce55(0xee)]===_0x24e1ae[_0xdbce55(0xee)])throw CliErrors[_0xdbce55(0xb7)](_0xdbce55(0xe3));const _0x458d54=_0x1dd171[_0xdbce55(0x101)](_0xdbce55(0xff))['trim'](),_0x1aae4b=_0x1dd171[_0xdbce55(0x101)](_0xdbce55(0xdd))[_0xdbce55(0xe4)](),_0x24ad15={..._0x568d6f,'toDatasetCode':_0x24e1ae[_0xdbce55(0xc8)],'toField':required(_0x1dd171,'to-column'),..._0x458d54?{'refTableLabelName':_0x458d54}:{},..._0x1aae4b?{'cardinality':_0x1aae4b}:{}};if(_0x4e7b3a['some'](_0x2f7a1b=>_0x2f7a1b[_0xdbce55(0xb4)]!==_0x2d1fb4?.['relationId']&&matchesEndpoint(_0x2f7a1b,_0x3e52aa,_0x24ad15['fromField'],_0x24e1ae,_0x24ad15['toField'])))throw CliErrors[_0xdbce55(0xb7)]('Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.');return{'operation':_0x1ef5f2,'from':_0x3e52aa,'to':_0x24e1ae,'query':_0x21e950,'body':_0x24ad15,'before':_0x2d1fb4,'expectedLabel':_0x458d54||_0x2d1fb4?.['refTableLabelName']||_0x24ad15[_0xdbce55(0xe0)],'expectedCardinality':_0x1aae4b||_0x2d1fb4?.['cardinality']||null};}function a72_0x4d5c(_0xfe39a,_0x35750c){_0xfe39a=_0xfe39a-0xb4;const _0x8efdc5=a72_0x8efd();let _0x4d5c3a=_0x8efdc5[_0xfe39a];return _0x4d5c3a;}function a72_0x8efd(){const _0x1e5185=['extend','toLowerCase','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','dblinkId','sourceType','fromDatasetCode','493140PFXIRl','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','dbId','table','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','toDblinkId','data','toTableName','fromDblinkId','297QWyeye','dataset','source','unconfirmed','to-label-column','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','str','6872XRHIqs','6503fQeXWj','apiError','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','update','\x20has\x20invalid\x20storage\x20configuration.','to-datasetcode','body','Cross-database\x20relation\x20','from-datasetcode','relationId','filter','DB_TABLE','validation','flagMissing','includes','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','list','appCode','from','delete','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','\x20a\x20cross-database\x20relation\x20for\x20','storageProfile','refTableLabelName','dbtable','map','from-column','create','datasetCode','relationType','dbtableConfig','from-dblink-id','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','\x20write\x20was\x20not\x20verified.','isSafeInteger','toDatasetCode','flag','6053672wKeeIu','fromField','Would\x20','69051Rjouif','533212YWRPJb','label_inherited','to-column','some','68370qqEjrC','expectedLabel','POST','expectedCardinality','cardinality','12687381zWwoMR','query','toField','parse','length','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','trim','10hnLCXh','before','defineProperty','Dataset\x20','tableName','250EyKDKT'];a72_0x8efd=function(){return _0x1e5185;};return a72_0x8efd();}function mutationData(_0x2dbf50,_0x3739a5,_0x5ac829){const _0x5c18c1=a72_0x262cfd,{operation:_0x20cc14,body:_0x95c9d5,before:_0x53dba2}=_0x2dbf50;return{'operation':_0x20cc14,'selector':{'appCode':_0x95c9d5['appCode'],'from':{'datasetCode':_0x95c9d5[_0x5c18c1(0xf0)],'field':_0x95c9d5[_0x5c18c1(0xd2)],'dblinkId':_0x2dbf50[_0x5c18c1(0xbd)][_0x5c18c1(0xee)]}},'before':_0x53dba2?projectCrossRelation(_0x53dba2):null,'after':_0x5ac829,'dryRun':_0x3739a5,'backend':{'method':_0x5c18c1(0xdb),'path':CROSS_DB_RELATION_PATHS[_0x20cc14]},'warnings':_0x20cc14===_0x5c18c1(0x106)&&!_0x95c9d5[_0x5c18c1(0xc3)]?[{'code':_0x5c18c1(0xd6),'message':_0x5c18c1(0xf2)}]:[]};}export async function previewCrossRelation(_0xf6c070,_0x4c767b){const _0x335306=a72_0x262cfd,_0x201ac9=await prepareCrossRelation(_0xf6c070,_0x4c767b),_0x5d62d8=_0x201ac9['body'],_0xa93c64=_0x4c767b==='delete'?null:{..._0x201ac9['before']?{'relationId':_0x201ac9[_0x335306(0xe6)][_0x335306(0xb4)]}:{},'from':{'datasetCode':_0x201ac9[_0x335306(0xbd)][_0x335306(0xc8)],'dblinkId':_0x201ac9['from'][_0x335306(0xee)],'table':_0x201ac9[_0x335306(0xbd)][_0x335306(0xf5)],'field':_0x5d62d8['fromField']},'to':{'datasetCode':_0x201ac9['to'][_0x335306(0xc8)],'dblinkId':_0x201ac9['to'][_0x335306(0xee)],'table':_0x201ac9['to'][_0x335306(0xf5)],'field':_0x5d62d8[_0x335306(0xe0)],'labelField':_0x201ac9[_0x335306(0xda)]},'relation':{'cardinality':_0x201ac9['expectedCardinality'],'relationType':0x2}};return{...mutationData(_0x201ac9,!![],null),'after':_0xa93c64,'method':'POST','url':CROSS_DB_RELATION_PATHS[_0x4c767b],'body':_0x201ac9['body'],'description':_0x335306(0xd3)+_0x4c767b+_0x335306(0xc1)+_0x5d62d8['fromDatasetCode']+'.'+_0x5d62d8[_0x335306(0xd2)]};}export async function executeCrossRelation(_0x1dc2cc,_0x23f7ee,_0x59d54d){const _0x2b169d=a72_0x262cfd,_0x59549d=await prepareCrossRelation(_0x1dc2cc,_0x23f7ee);try{await _0x59d54d(_0x59549d[_0x2b169d(0x109)]);}catch(_0x4d3328){if(_0x4d3328 instanceof CliError&&_0x4d3328['message'][_0x2b169d(0xb9)]('multiple\x20cross-database\x20relations\x20matched')){const _0x7fa2f6=await queryCrossDbRelations(_0x59549d[_0x2b169d(0xdf)])['catch'](()=>[]);throw ambiguity(_0x7fa2f6);}throw _0x4d3328;}let _0xab3ac3=[],_0x21360d,_0x2fdabb=![];try{_0xab3ac3=await queryCrossDbRelations(_0x59549d[_0x2b169d(0xdf)]);if(_0x23f7ee===_0x2b169d(0xbe))_0x2fdabb=!_0xab3ac3[_0x2b169d(0xd8)](_0xae08d1=>_0xae08d1[_0x2b169d(0xb4)]===_0x59549d['before']['relationId']);else{const _0x32bd24=_0x59549d[_0x2b169d(0x109)],_0xc182a4=_0xab3ac3[_0x2b169d(0xb5)](_0x518fa5=>matchesEndpoint(_0x518fa5,_0x59549d['from'],_0x32bd24[_0x2b169d(0xd2)],_0x59549d['to'],_0x32bd24[_0x2b169d(0xe0)])&&(_0x23f7ee===_0x2b169d(0xc7)||_0x518fa5[_0x2b169d(0xb4)]===_0x59549d[_0x2b169d(0xe6)]['relationId']));_0x21360d=_0xc182a4[_0x2b169d(0xe2)]===0x1?_0xc182a4[0x0]:undefined,_0x2fdabb=!!_0x21360d&&_0x21360d['refTableLabelName']===_0x59549d[_0x2b169d(0xda)]&&_0x21360d[_0x2b169d(0xdd)]===_0x59549d[_0x2b169d(0xdc)]&&_0x21360d[_0x2b169d(0xc9)]===0x2;}}catch{}const _0x281992={...mutationData(_0x59549d,![],_0x21360d?projectCrossRelation(_0x21360d):null),'verification':{'status':_0x2fdabb?'matched':_0x2b169d(0xfe),'verified':_0x2fdabb}};if(!_0x2fdabb){const _0x5b44ac=CliErrors[_0x2b169d(0x104)](_0x2b169d(0x10a)+_0x23f7ee+_0x2b169d(0xcd),_0x2b169d(0xf3));Object['defineProperty'](_0x5b44ac,_0x2b169d(0xf8),{'value':{..._0x281992,'candidates':_0xab3ac3['map'](projectCrossRelation)}});throw _0x5b44ac;}return{'ok':!![],'data':_0x281992,'message':_0x2b169d(0x10a)+_0x23f7ee+'\x20verified.'};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a73_0x3a04de=a73_0x315a;function a73_0x315a(_0x1077a7,_0x5104f4){_0x1077a7=_0x1077a7-0x121;const _0x595d57=a73_0x595d();let _0x315aee=_0x595d57[_0x1077a7];return _0x315aee;}(function(_0x182bdd,_0x1aaaaa){const _0x1e2e56=a73_0x315a,_0x347c66=_0x182bdd();while(!![]){try{const _0x48ab8b=-parseInt(_0x1e2e56(0x12c))/0x1*(-parseInt(_0x1e2e56(0x12b))/0x2)+parseInt(_0x1e2e56(0x122))/0x3+parseInt(_0x1e2e56(0x121))/0x4+parseInt(_0x1e2e56(0x127))/0x5*(-parseInt(_0x1e2e56(0x129))/0x6)+-parseInt(_0x1e2e56(0x12a))/0x7+parseInt(_0x1e2e56(0x125))/0x8*(parseInt(_0x1e2e56(0x123))/0x9)+parseInt(_0x1e2e56(0x128))/0xa*(parseInt(_0x1e2e56(0x12d))/0xb);if(_0x48ab8b===_0x1aaaaa)break;else _0x347c66['push'](_0x347c66['shift']());}catch(_0xe671b5){_0x347c66['push'](_0x347c66['shift']());}}}(a73_0x595d,0xaa3ae));function a73_0x595d(){const _0x11b0ec=['38230SgwLpM','6PRRZym','2385467aNeQeQ','2XdnRqF','437317WQgkDb','957NQrKjk','update','write','1309268RDdRWx','1919454vYKgim','2611215QUYGiZ','dataset','16CWgjTC','cross-relation-update','6396400PsgYMa'];a73_0x595d=function(){return _0x11b0ec;};return a73_0x595d();}import{updateCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationUpdate={'service':a73_0x3a04de(0x124),'command':a73_0x3a04de(0x126),'description':'Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','risk':a73_0x3a04de(0x12f),'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 _0x4f0cf0=>validateCrossRelation(_0x4f0cf0,a73_0x3a04de(0x12e)),'dryRun':_0x3a2d8a=>previewCrossRelation(_0x3a2d8a,a73_0x3a04de(0x12e)),'execute':_0x561515=>executeCrossRelation(_0x561515,'update',updateCrossDbRelation)};
|