@lovrabet/rabetbase-cli 2.5.5-beta.2 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.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-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +3 -3
- package/skills/rabetbase/guides/independent-deployment.md +11 -1
- package/skills/rabetbase/references/rabetbase-config.md +16 -19
- package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +5 -4
- package/skills/rabetbase/references/rabetbase-workspace.md +3 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d5cfa,_0x54cdad){const _0x399567=a60_0x1090,_0x34b396=_0x3d5cfa();while(!![]){try{const _0xafc6d8=parseInt(_0x399567(0x7b))/0x1+-parseInt(_0x399567(0x78))/0x2+-parseInt(_0x399567(0x77))/0x3*(-parseInt(_0x399567(0x7f))/0x4)+-parseInt(_0x399567(0x79))/0x5*(parseInt(_0x399567(0x7c))/0x6)+-parseInt(_0x399567(0x80))/0x7+parseInt(_0x399567(0x7e))/0x8+-parseInt(_0x399567(0x7d))/0x9*(-parseInt(_0x399567(0x7a))/0xa);if(_0xafc6d8===_0x54cdad)break;else _0x34b396['push'](_0x34b396['shift']());}catch(_0x23780c){_0x34b396['push'](_0x34b396['shift']());}}}(a60_0x4390,0x333b2));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a60_0x1090(_0x470ff5,_0x593d39){_0x470ff5=_0x470ff5-0x77;const _0x439076=a60_0x4390();let _0x10903c=_0x439076[_0x470ff5];return _0x10903c;}import{configSetDefinition}from'../../commands/config/set.js';function a60_0x4390(){const _0x37b6c0=['817660kQrZLP','315vpWqzI','10pDHXCZ','204556RNyoVx','36492GIbEPS','4730877KZarPk','2765928wWoNUN','1864MacIIQ','2107378ftrntN','1461qmGQJY'];a60_0x4390=function(){return _0x37b6c0;};return a60_0x4390();}import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x3cd0c6=a61_0x577d;(function(_0x439362,_0x45195a){const _0x98e761=a61_0x577d,_0xda15fb=_0x439362();while(!![]){try{const _0x100c95=-parseInt(_0x98e761(0x147))/0x1*(parseInt(_0x98e761(0x123))/0x2)+-parseInt(_0x98e761(0x136))/0x3*(parseInt(_0x98e761(0x126))/0x4)+parseInt(_0x98e761(0x11c))/0x5+parseInt(_0x98e761(0x12e))/0x6*(-parseInt(_0x98e761(0x143))/0x7)+parseInt(_0x98e761(0x152))/0x8*(-parseInt(_0x98e761(0x145))/0x9)+-parseInt(_0x98e761(0x155))/0xa+parseInt(_0x98e761(0x138))/0xb;if(_0x100c95===_0x45195a)break;else _0xda15fb['push'](_0xda15fb['shift']());}catch(_0x5f4922){_0xda15fb['push'](_0xda15fb['shift']());}}}(a61_0x3804,0xf2037));function a61_0x577d(_0xbdd9c9,_0x8c3028){_0xbdd9c9=_0xbdd9c9-0x11c;const _0x380401=a61_0x3804();let _0x577d62=_0x380401[_0xbdd9c9];return _0x577d62;}import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';function a61_0x3804(){const _0x4b272d=['12259590dxqfAL','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','certificateDomain','global','767825XXczQY','local-domain','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','Official\x20Lovrabet\x20region:\x20','join','\x22\x20is\x20not\x20currently\x20available.','str','2AiuKsj','validation','certificate-domain','2839348QNJSlZ','Region\x20\x22','kb-service-domain','bool','manifestDomains','Custom\x20knowledge-base\x20HTTPS\x20origin','mode','kb-domain','486450YpZiku','ExitPromptError','Select\x20Lovrabet\x20region','keys','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','localDomain','enterprise-v1','official','3YiTFab','project','52943088wZiUOJ','Available\x20regions:\x20','write','name','string','Custom\x20SkillHub\x20HTTPS\x20origin','region','skill-domain','config','Custom\x20local\x20callback\x20HTTPS\x20origin','Custom\x20platform\x20API\x20HTTPS\x20origin','21cLeQFF','Custom\x20Runtime\x20HTTPS\x20origin','468iqGgxk','map','168977vgNmfe','domain-config','user-domain','length','init','Independent-deployment\x20Domain\x20JSON\x20file','api-domain','domains','app-domain','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','cdn','250352YdGASr','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','routing'];a61_0x3804=function(){return _0x4b272d;};return a61_0x3804();}import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':'region','type':'string','description':a61_0x3cd0c6(0x11f)+ENABLED_LOVRABET_REGION_VALUES[a61_0x3cd0c6(0x120)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a61_0x3cd0c6(0x148),'type':a61_0x3cd0c6(0x13c),'description':a61_0x3cd0c6(0x14c)},{'name':a61_0x3cd0c6(0x149),'type':a61_0x3cd0c6(0x13c),'description':'Custom\x20User\x20HTTPS\x20origin'},{'name':a61_0x3cd0c6(0x14d),'type':a61_0x3cd0c6(0x13c),'description':a61_0x3cd0c6(0x142)},{'name':'runtime-domain','type':'string','description':a61_0x3cd0c6(0x144)},{'name':a61_0x3cd0c6(0x13f),'type':a61_0x3cd0c6(0x13c),'description':a61_0x3cd0c6(0x13d)},{'name':a61_0x3cd0c6(0x12d),'type':a61_0x3cd0c6(0x13c),'description':a61_0x3cd0c6(0x12b)},{'name':a61_0x3cd0c6(0x128),'type':a61_0x3cd0c6(0x13c),'description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'},{'name':a61_0x3cd0c6(0x14f),'type':a61_0x3cd0c6(0x13c),'description':'Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin'},{'name':a61_0x3cd0c6(0x11d),'type':a61_0x3cd0c6(0x13c),'description':a61_0x3cd0c6(0x141)},{'name':a61_0x3cd0c6(0x125),'type':a61_0x3cd0c6(0x13c),'description':'Custom\x20certificate\x20service\x20HTTPS\x20origin'}];async function resolveRegion(_0x1b5b4b){const _0x128f9e=a61_0x3cd0c6,_0x580d9c=_0x1b5b4b['str'](_0x128f9e(0x13e));if(_0x580d9c){if(!isEnabledLovrabetRegion(_0x580d9c))throw CliErrors[_0x128f9e(0x124)](_0x128f9e(0x127)+_0x580d9c+_0x128f9e(0x121),_0x128f9e(0x139)+ENABLED_LOVRABET_REGION_VALUES[_0x128f9e(0x120)](',\x20'));return _0x580d9c;}if(_0x1b5b4b['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x128f9e(0x130),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x128f9e(0x146)](_0x47ae33=>({'name':getOfficialRoutingProfile(_0x47ae33)['label']+'\x20('+_0x47ae33+')','value':_0x47ae33}))});}catch(_0x327588){if(_0x327588?.[_0x128f9e(0x13b)]===_0x128f9e(0x12f))throw CliErrors['cancelled']();throw _0x327588;}}export async function executeConfigInit(_0x413032){const _0x4934d7=a61_0x3cd0c6,_0x10322e=resolveDomainConfigInput(_0x413032),_0x278730=_0x10322e[_0x4934d7(0x14e)],_0x10c5e7=Object[_0x4934d7(0x131)](_0x278730)[_0x4934d7(0x14a)]>0x0;if(_0x10c5e7&&_0x413032[_0x4934d7(0x122)](_0x4934d7(0x13e)))throw CliErrors[_0x4934d7(0x124)](_0x4934d7(0x150));if(!!_0x278730[_0x4934d7(0x133)]!==!!_0x278730[_0x4934d7(0x157)])throw CliErrors['validation'](_0x4934d7(0x132));const _0x3ebefd=_0x413032[_0x4934d7(0x129)]('global')?_0x4934d7(0x158):_0x4934d7(0x137),_0x8abbf4=readScopedConfig(_0x3ebefd);for(const _0x403f5b of DOMAIN_CONFIG_FIELDS)delete _0x8abbf4[_0x403f5b];for(const _0x1d9f7a of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x8abbf4[_0x1d9f7a];delete _0x8abbf4[_0x4934d7(0x154)];let _0x29d307=null;if(_0x10c5e7)delete _0x8abbf4[_0x4934d7(0x13e)],_0x10322e[_0x4934d7(0x12c)]==='enterprise-v1'?_0x8abbf4['routing']={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x10322e[_0x4934d7(0x12a)],'cdn':_0x10322e[_0x4934d7(0x151)]}:Object['assign'](_0x8abbf4,_0x278730);else{_0x29d307=await resolveRegion(_0x413032);if(_0x29d307===DEFAULT_LOVRABET_REGION)delete _0x8abbf4[_0x4934d7(0x13e)];else _0x8abbf4[_0x4934d7(0x13e)]=_0x29d307;}return writeScopedConfig(_0x8abbf4,_0x3ebefd),{'ok':!![],'message':_0x10c5e7?_0x4934d7(0x11e)+Object[_0x4934d7(0x131)](_0x10322e[_0x4934d7(0x12c)]===_0x4934d7(0x134)?_0x10322e[_0x4934d7(0x12a)]:_0x278730)[_0x4934d7(0x120)](',\x20')+'.':'Rabetbase\x20connection\x20configured\x20for\x20region:\x20'+_0x29d307+'.','data':{'mode':_0x10c5e7?'independent':_0x4934d7(0x135),'protocol':_0x10322e[_0x4934d7(0x12c)]==='enterprise-v1'?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x29d307,'domains':_0x278730,'cdn':_0x10322e[_0x4934d7(0x12c)]==='enterprise-v1'?_0x10322e['cdn']:undefined}};}export const configInitDefinition={'service':a61_0x3cd0c6(0x140),'command':a61_0x3cd0c6(0x14b),'description':a61_0x3cd0c6(0x153),'risk':a61_0x3cd0c6(0x13a),'confirmationDescription':a61_0x3cd0c6(0x156),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x53f707=a62_0x4b70;(function(_0x192254,_0x52a605){const _0x37c5c5=a62_0x4b70,_0x56ee39=_0x192254();while(!![]){try{const _0x93794f=parseInt(_0x37c5c5(0xf8))/0x1*(-parseInt(_0x37c5c5(0xf9))/0x2)+-parseInt(_0x37c5c5(0x100))/0x3+parseInt(_0x37c5c5(0xfb))/0x4*(parseInt(_0x37c5c5(0x103))/0x5)+-parseInt(_0x37c5c5(0x104))/0x6*(parseInt(_0x37c5c5(0x102))/0x7)+parseInt(_0x37c5c5(0xfa))/0x8+parseInt(_0x37c5c5(0xf4))/0x9*(-parseInt(_0x37c5c5(0xfc))/0xa)+-parseInt(_0x37c5c5(0xf3))/0xb*(-parseInt(_0x37c5c5(0xf7))/0xc);if(_0x93794f===_0x52a605)break;else _0x56ee39['push'](_0x56ee39['shift']());}catch(_0x44e17d){_0x56ee39['push'](_0x56ee39['shift']());}}}(a62_0x5344,0x2b130));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a62_0x4b70(_0x25e4c1,_0x2b1c4a){_0x25e4c1=_0x25e4c1-0xf3;const _0x534434=a62_0x5344();let _0x4b7060=_0x534434[_0x25e4c1];return _0x4b7060;}async function execute(_0xbf01e5){const _0x55a2c0=a62_0x4b70,_0x4c0c88=_0xbf01e5[_0x55a2c0(0x105)](_0x55a2c0(0xfd))?readScopedConfig(_0x55a2c0(0xfd)):readConfig();return{'ok':!![],'data':_0x4c0c88};}function a62_0x5344(){const _0x332fe7=['1007805lCiepN','List\x20all\x20config\x20values','1239cusFtz','8115uhaQgt','9486kgGpCu','bool','11ottPwB','926676NIzdTk','config','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','7055856DgdEEf','14LtafoR','14030PJVyhn','2111968fsRzIf','856insQuh','30yOazZg','global','read','boolean'];a62_0x5344=function(){return _0x332fe7;};return a62_0x5344();}export const configListDefinition={'service':a62_0x53f707(0xf5),'command':'list','description':a62_0x53f707(0x101),'risk':a62_0x53f707(0xfe),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x53f707(0xfd),'type':a62_0x53f707(0xff),'description':a62_0x53f707(0xf6),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x2ce39a=a63_0x58f9;(function(_0x2c40d5,_0x25c2f0){const _0x3a1e6a=a63_0x58f9,_0x16373a=_0x2c40d5();while(!![]){try{const _0x45f33f=-parseInt(_0x3a1e6a(0x187))/0x1*(parseInt(_0x3a1e6a(0x177))/0x2)+-parseInt(_0x3a1e6a(0x1a1))/0x3+-parseInt(_0x3a1e6a(0x173))/0x4+parseInt(_0x3a1e6a(0x172))/0x5+parseInt(_0x3a1e6a(0x180))/0x6*(parseInt(_0x3a1e6a(0x19c))/0x7)+-parseInt(_0x3a1e6a(0x17d))/0x8*(parseInt(_0x3a1e6a(0x18c))/0x9)+-parseInt(_0x3a1e6a(0x18d))/0xa*(-parseInt(_0x3a1e6a(0x183))/0xb);if(_0x45f33f===_0x25c2f0)break;else _0x16373a['push'](_0x16373a['shift']());}catch(_0x32f6cf){_0x16373a['push'](_0x16373a['shift']());}}}(a63_0x3c7a,0x7e7a6));import{CliErrors}from'../../errors.js';function a63_0x58f9(_0x5f442b,_0x153431){_0x5f442b=_0x5f442b-0x172;const _0x3c7ab5=a63_0x3c7a();let _0x58f9f8=_0x3c7ab5[_0x5f442b];return _0x58f9f8;}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';function a63_0x3c7a(){const _0x5424=['riskLevel','str','2917455LWvfjh','Missing\x20value.','3591815pEohXv','795904ABfQvN','Invalid\x20value\x20for\x20\x22','string','bool','2xxPBCR','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','\x20workspace\x20add\x20<name>\x20--appcode\x20','\x22\x20is\x20not\x20settable.','appcode','Set\x20a\x20config\x20value','8yeSiff','Usage:\x20','write','5571282fZWaEP','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','11JTDcKv','Config\x20value','value','config','493305xbnKeP','app','join','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','object','4482045pfTurE','10339150WCLdrf','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','global','Settable\x20top-level\x20keys:\x20','env','set','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','apps','length','includes','key','Global','Top-level\x20key\x20\x22','\x20set\x20to:\x20','7ePwqLI','validation','Project'];a63_0x3c7a=function(){return _0x5424;};return a63_0x3c7a();}import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x27ea80){const _0x437a6a=a63_0x58f9,_0x204eb6=_0x27ea80['str'](_0x437a6a(0x198)),_0x10193c=_0x27ea80[_0x437a6a(0x1a0)](_0x437a6a(0x185));if(!_0x204eb6)throw CliErrors[_0x437a6a(0x19d)]('Missing\x20key.',_0x437a6a(0x17e)+CLI_BIN_NAME+_0x437a6a(0x18a));if(_0x10193c===undefined||_0x10193c==='')throw CliErrors['validation'](_0x437a6a(0x1a2),_0x437a6a(0x17e)+CLI_BIN_NAME+_0x437a6a(0x18a));let _0xbd9ebe=_0x204eb6,_0x4309e6=_0x10193c;if(_0x10193c['length']>0x1f4)throw CliErrors[_0x437a6a(0x19d)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(_0x204eb6===_0x437a6a(0x19f))throw CliErrors[_0x437a6a(0x19d)](_0x437a6a(0x194));if(!isTopLevelConfigKey(_0x204eb6))throw CliErrors[_0x437a6a(0x19d)](_0x437a6a(0x19a)+_0x204eb6+_0x437a6a(0x17a),_0x437a6a(0x191)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x204eb6]&&!CONFIG_ENUM_VALUES[_0x204eb6][_0x437a6a(0x197)](_0x10193c))throw CliErrors[_0x437a6a(0x19d)](_0x437a6a(0x174)+_0x204eb6+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x204eb6][_0x437a6a(0x189)](',\x20'));if(_0x204eb6==='locale'&&!normalizeLocale(_0x10193c))throw CliErrors['validation']('Invalid\x20locale\x20value.',_0x437a6a(0x178));DOMAIN_CONFIG_FIELDS[_0x437a6a(0x197)](_0x204eb6)&&(_0x4309e6=normalizeDomainOrigin(_0x204eb6,_0x10193c));const _0x4109fb={'global':_0x27ea80[_0x437a6a(0x176)](_0x437a6a(0x190))},_0x2a6c73=resolveWriteScope(_0x4109fb),_0x50ea73=readScopedConfig(_0x2a6c73);_0x204eb6===_0x437a6a(0x188)&&(_0xbd9ebe='appcode',delete _0x50ea73['app']);_0x204eb6==='locale'&&(_0x4309e6=normalizeLocale(_0x10193c));if(_0x204eb6==='env'){_0x4309e6=normalizeEnv(_0x10193c);if(!isProduction(_0x4309e6)&&!isDaily(_0x4309e6))throw CliErrors[_0x437a6a(0x19d)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x204eb6===_0x437a6a(0x17b)){const _0x42482f=_0x50ea73[_0x437a6a(0x195)]&&typeof _0x50ea73[_0x437a6a(0x195)]===_0x437a6a(0x18b)?Object['keys'](_0x50ea73[_0x437a6a(0x195)]):[];if(_0x42482f[_0x437a6a(0x196)]>0x0)throw CliErrors[_0x437a6a(0x19d)](_0x437a6a(0x181),'Use\x20`'+CLI_BIN_NAME+_0x437a6a(0x179)+_0x4309e6+'`,\x20`'+CLI_BIN_NAME+_0x437a6a(0x18e));const _0x1e7cf0=buildCanonicalProjectConfig({..._0x50ea73},{'appCodes':[_0x4309e6],'env':typeof _0x50ea73[_0x437a6a(0x192)]==='string'?_0x50ea73['env']:undefined});writeScopedConfig(_0x1e7cf0,_0x2a6c73);const _0x43e0f7=_0x2a6c73===_0x437a6a(0x190)?'Global':_0x437a6a(0x19e);return{'ok':!![],'message':'✓\x20'+_0x43e0f7+'\x20appcode\x20set\x20to:\x20'+_0x4309e6+_0x437a6a(0x18f)};}_0x50ea73[_0xbd9ebe]=_0x4309e6,writeScopedConfig(_0x50ea73,_0x2a6c73);const _0xce651a=_0x2a6c73===_0x437a6a(0x190)?_0x437a6a(0x199):_0x437a6a(0x19e);return{'ok':!![],'message':'✓\x20'+_0xce651a+'\x20'+_0xbd9ebe+_0x437a6a(0x19b)+_0x4309e6};}export const configSetDefinition={'service':a63_0x2ce39a(0x186),'command':a63_0x2ce39a(0x193),'description':a63_0x2ce39a(0x17c),'risk':a63_0x2ce39a(0x17f),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a63_0x2ce39a(0x198),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a63_0x2ce39a(0x185),'type':a63_0x2ce39a(0x175),'description':a63_0x2ce39a(0x184),'required':!![]},{'name':a63_0x2ce39a(0x190),'type':'boolean','description':a63_0x2ce39a(0x182),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x557d81,_0x85f3be){var _0xf184fd=a64_0x4d2d,_0x298800=_0x557d81();while(!![]){try{var _0x5b6374=-parseInt(_0xf184fd(0xdb))/0x1*(-parseInt(_0xf184fd(0xe9))/0x2)+-parseInt(_0xf184fd(0xe0))/0x3*(parseInt(_0xf184fd(0xe1))/0x4)+parseInt(_0xf184fd(0xe3))/0x5+-parseInt(_0xf184fd(0xe8))/0x6+-parseInt(_0xf184fd(0xdf))/0x7*(-parseInt(_0xf184fd(0xe7))/0x8)+parseInt(_0xf184fd(0xe5))/0x9*(parseInt(_0xf184fd(0xdd))/0xa)+-parseInt(_0xf184fd(0xdc))/0xb*(parseInt(_0xf184fd(0xe4))/0xc);if(_0x5b6374===_0x85f3be)break;else _0x298800['push'](_0x298800['shift']());}catch(_0x2aab6f){_0x298800['push'](_0x298800['shift']());}}}(a64_0xc506,0xdf1ef));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';function a64_0x4d2d(_0x5d225e,_0x6c942a){_0x5d225e=_0x5d225e-0xdb;var _0xc506e=a64_0xc506();var _0x4d2dc2=_0xc506e[_0x5d225e];return _0x4d2dc2;}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x20149a){var _0x41cd35=a64_0x4d2d;if(_0x20149a[_0x41cd35(0xde)])return'global';if(!isInProject())throw CliErrors['validation'](_0x41cd35(0xe6),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0x41cd35(0xe2);}export function readScopedConfig(_0x3c33a9){return readConfigFile(resolveWriteConfigPath(_0x3c33a9));}function a64_0xc506(){var _0x21adb3=['369kbxuvv','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','2778952fvenBn','3257004HAVNkQ','10skqTlT','313451fnzppg','1903oJtkvf','263850GBLUJS','global','7ybQuyb','80151vkPRcL','12gOUbSr','project','8831185hhEuEy','223752dkauoT'];a64_0xc506=function(){return _0x21adb3;};return a64_0xc506();}export function writeScopedConfig(_0x1c8ba7,_0xf89219){writeConfigFile(resolveWriteConfigPath(_0xf89219),_0x1c8ba7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x542ef6=a65_0x448c;(function(_0x30fd59,_0x830043){const _0xd7a353=a65_0x448c,_0x2b94af=_0x30fd59();while(!![]){try{const _0x1864a8=-parseInt(_0xd7a353(0xa6))/0x1+parseInt(_0xd7a353(0x81))/0x2+parseInt(_0xd7a353(0x84))/0x3+parseInt(_0xd7a353(0xc8))/0x4+-parseInt(_0xd7a353(0x8d))/0x5+parseInt(_0xd7a353(0xd1))/0x6+-parseInt(_0xd7a353(0xcb))/0x7;if(_0x1864a8===_0x830043)break;else _0x2b94af['push'](_0x2b94af['shift']());}catch(_0x1c8744){_0x2b94af['push'](_0x2b94af['shift']());}}}(a65_0x4b4c,0x762d0));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x542ef6(0xab),a65_0x542ef6(0xad)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x542ef6(0xc0),a65_0x542ef6(0xbd),a65_0x542ef6(0xc7),a65_0x542ef6(0xbe),a65_0x542ef6(0xb1),a65_0x542ef6(0x8a),a65_0x542ef6(0x7a),a65_0x542ef6(0x7f),'ADDRESS','UPLOAD']);export function isDatasetBatchDesign(_0x4c0110){const _0x3ff3be=a65_0x542ef6;return isObject(_0x4c0110)&&_0x4c0110[_0x3ff3be(0x95)]===_0x3ff3be(0xb7);}export function validateDatasetBatchDesign(_0x547e48){const _0x333108=a65_0x542ef6;(!isObject(_0x547e48)||_0x547e48[_0x333108(0x95)]!=='dataset-batch')&&fail('Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.');_0x547e48['schemaVersion']!==0x1&&fail(_0x333108(0xcd));const _0x5d2072=objectArray(_0x547e48[_0x333108(0x97)],_0x333108(0x97),0x1,0x14),_0xa7dd3f=objectArray(_0x547e48[_0x333108(0x7e)],_0x333108(0x7e),0x0,0xc8),_0x498ac6=objectArray(_0x547e48[_0x333108(0x75)],'unresolvedRelations',0x0,0xc8),_0x478c7e=new Set(),_0x56e7b7=new Map();for(const [_0x2635de,_0x1a7d48]of _0x5d2072[_0x333108(0xa2)]()){const _0x10fac4=requiredString(_0x1a7d48[_0x333108(0xc2)],_0x333108(0x94)+_0x2635de+'].localKey');!LOCAL_KEY[_0x333108(0xa4)](_0x10fac4)&&fail(_0x333108(0x94)+_0x2635de+_0x333108(0xd8)+LOCAL_KEY[_0x333108(0xc4)]+'.');_0x478c7e[_0x333108(0x92)](_0x10fac4)&&fail('Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.');_0x478c7e[_0x333108(0x73)](_0x10fac4);!isObject(_0x1a7d48[_0x333108(0x74)])&&fail(_0x333108(0x94)+_0x2635de+_0x333108(0xd7));rejectServerDatasetIdentity(_0x1a7d48['design'],'datasets['+_0x2635de+'].design');if(!isObject(_0x1a7d48[_0x333108(0x74)][_0x333108(0xc6)]))fail(_0x333108(0x94)+_0x2635de+_0x333108(0x8f));rejectServerDatasetIdentity(_0x1a7d48[_0x333108(0x74)]['dataset'],'datasets['+_0x2635de+'].design.dataset'),requiredString(_0x1a7d48[_0x333108(0x74)][_0x333108(0xc6)][_0x333108(0xc1)],_0x333108(0x94)+_0x2635de+_0x333108(0xcc));'relations'in _0x1a7d48[_0x333108(0x74)]&&(!Array[_0x333108(0xa0)](_0x1a7d48[_0x333108(0x74)][_0x333108(0x7e)])||_0x1a7d48[_0x333108(0x74)][_0x333108(0x7e)][_0x333108(0xd0)]!==0x0)&&fail(_0x333108(0x94)+_0x2635de+_0x333108(0x9d));const _0x287484=objectArray(_0x1a7d48[_0x333108(0x74)][_0x333108(0x90)],_0x333108(0x94)+_0x2635de+_0x333108(0x8e),0x1,0xc8),_0x1a2f0a=new Map();for(const [_0x242897,_0x6bd5a5]of _0x287484[_0x333108(0xa2)]()){const _0x45c980=fieldName(_0x6bd5a5);if(!_0x45c980)fail(_0x333108(0x94)+_0x2635de+_0x333108(0xb8)+_0x242897+_0x333108(0x83));const _0x426ca1=_0x45c980[_0x333108(0x7b)]();if(_0x1a2f0a[_0x333108(0x92)](_0x426ca1))fail(_0x333108(0x98)+_0x10fac4+_0x333108(0x9c));const _0xa9f88e=stringValue(_0x6bd5a5['type']??_0x6bd5a5[_0x333108(0x85)])[_0x333108(0xac)]();if(!SUPPORTED_FIELD_TYPES[_0x333108(0x92)](_0xa9f88e))fail(_0x333108(0x94)+_0x2635de+_0x333108(0xb8)+_0x242897+_0x333108(0x80));_0x1a2f0a[_0x333108(0x9e)](_0x426ca1,_0xa9f88e),[_0x6bd5a5[_0x333108(0x88)],_0x6bd5a5[_0x333108(0xb0)],_0x6bd5a5['refTableLabelField']][_0x333108(0xb3)](_0x564fcd=>stringValue(_0x564fcd))&&fail(_0x333108(0x94)+_0x2635de+'].design.fields['+_0x242897+_0x333108(0xbc));}_0x56e7b7[_0x333108(0x9e)](_0x10fac4,_0x1a2f0a);}const _0xea92c4=new Set(),_0x313a10=new Set();for(const [_0x2cdc86,_0x1e64ea]of _0xa7dd3f['entries']()){const _0x4ad804=validateRelation(_0x1e64ea,_0x2cdc86,_0x478c7e,_0x56e7b7);if(_0xea92c4[_0x333108(0x92)](_0x4ad804))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0xea92c4['add'](_0x4ad804);const _0x47c71e=_0x4ad804[_0x333108(0x82)]('\x00',0x2)['join']('\x00');if(_0x313a10['has'](_0x47c71e))fail(_0x333108(0xaf));_0x313a10[_0x333108(0x73)](_0x47c71e);}for(const [_0x5c37d3,_0x4baaf9]of _0x498ac6[_0x333108(0xa2)]()){requiredString(_0x4baaf9[_0x333108(0x77)],'unresolvedRelations['+_0x5c37d3+_0x333108(0xd4)),validateConfidence(_0x4baaf9['confidence'],_0x333108(0x86)+_0x5c37d3+_0x333108(0xb2));}return _0x547e48;}export function reconcileBatchResult(_0x1b698e){const _0x51da97=a65_0x542ef6;if(!isObject(_0x1b698e))return null;try{const _0x242d79=stringArray(_0x1b698e[_0x51da97(0xa3)],_0x51da97(0xa3),0x1,0x14),_0x52559f=new Set(_0x242d79);if(_0x52559f[_0x51da97(0xc3)]!==_0x242d79[_0x51da97(0xd0)]||_0x242d79[_0x51da97(0xb3)](_0x5dc0d1=>!LOCAL_KEY[_0x51da97(0xa4)](_0x5dc0d1)))return null;const _0xaabd9f=objectArray(_0x1b698e[_0x51da97(0xa5)],'createdDatasets',0x1,0x14),_0x2b2411=new Map(),_0x1a8f77=new Set();for(const _0x9e9dfa of _0xaabd9f){const _0x217790=requiredString(_0x9e9dfa[_0x51da97(0xc2)],_0x51da97(0xd6)),_0xa7860f=requiredString(_0x9e9dfa['code']??_0x9e9dfa[_0x51da97(0xbb)],_0x51da97(0xca));if(_0x2b2411[_0x51da97(0x92)](_0x217790)||_0x1a8f77['has'](_0xa7860f))return null;_0x2b2411[_0x51da97(0x9e)](_0x217790,_0xa7860f),_0x1a8f77['add'](_0xa7860f);}if(!sameSet(_0x52559f,new Set(_0x2b2411[_0x51da97(0xbf)]())))return null;const _0x2e4ec8=objectArray(_0x1b698e['expectedRelations'],_0x51da97(0xb9),0x0,0xc8),_0x4c13c0=objectArray(_0x1b698e['createdRelations'],_0x51da97(0xce),0x0,0xc8),_0x33f5a6=relationTupleSet(_0x2e4ec8,![],_0x2b2411),_0xa0d6cb=relationTupleSet(_0x4c13c0,!![],_0x2b2411);if(!_0x33f5a6||!_0xa0d6cb||!sameSet(_0x33f5a6,_0xa0d6cb))return null;const _0x399867=objectArray(_0x1b698e[_0x51da97(0x75)],'unresolvedRelations',0x0,0xc8);return{'expectedLocalKeys':_0x242d79,'expectedRelations':_0x2e4ec8,'createdDatasets':_0xaabd9f,'createdRelations':_0x4c13c0,'unresolvedRelations':_0x399867,...isObject(_0x1b698e[_0x51da97(0x76)])?{'metrics':_0x1b698e[_0x51da97(0x76)]}:{}};}catch{return null;}}function validateRelation(_0x5ebe91,_0x364843,_0x31e556,_0x4a0a26){const _0x58f32b=a65_0x542ef6,_0x81a1e1=_0x58f32b(0xa1)+_0x364843+']',_0x278f67=requiredString(_0x5ebe91[_0x58f32b(0xa7)],_0x81a1e1+'.fromDatasetKey'),_0x2d857a=requiredString(_0x5ebe91[_0x58f32b(0xd2)],_0x81a1e1+'.toDatasetKey'),_0x1eb514=requiredString(_0x5ebe91[_0x58f32b(0x8b)],_0x81a1e1+_0x58f32b(0x9a))[_0x58f32b(0x7b)](),_0x1d6704=requiredString(_0x5ebe91[_0x58f32b(0x87)],_0x81a1e1+_0x58f32b(0xae))[_0x58f32b(0x7b)]();if(!_0x31e556['has'](_0x278f67)||!_0x31e556[_0x58f32b(0x92)](_0x2d857a))fail(_0x81a1e1+_0x58f32b(0x9f));const _0x2be1b5=_0x4a0a26[_0x58f32b(0x9b)](_0x278f67)?.[_0x58f32b(0x9b)](_0x1eb514),_0x4cb9ec=_0x4a0a26[_0x58f32b(0x9b)](_0x2d857a)?.[_0x58f32b(0x9b)](_0x1d6704);if(_0x2be1b5===undefined||_0x4cb9ec===undefined)fail(_0x81a1e1+_0x58f32b(0x96));if(_0x2be1b5&&_0x4cb9ec&&_0x2be1b5!==_0x4cb9ec)fail(_0x81a1e1+_0x58f32b(0x93));const _0x254833=stringValue(_0x5ebe91[_0x58f32b(0xcf)])||_0x58f32b(0xb4);if(_0x254833!==_0x58f32b(0xb4))fail(_0x81a1e1+_0x58f32b(0xba));const _0xdce10d=stringValue(_0x5ebe91['cardinality'])||'MANY_TO_ONE';if(!SUPPORTED_CARDINALITIES[_0x58f32b(0x92)](_0xdce10d))fail(_0x81a1e1+_0x58f32b(0xaa));return requiredString(_0x5ebe91[_0x58f32b(0x77)],_0x81a1e1+'.reason'),validateConfidence(_0x5ebe91['confidence'],_0x81a1e1+_0x58f32b(0x79)),tuple(_0x278f67,_0x1eb514,_0x2d857a,_0x1d6704,_0x58f32b(0xb4),_0xdce10d);}function relationTupleSet(_0x3a3e3f,_0x25115a,_0x5998df){const _0x220714=a65_0x542ef6,_0x4ea3da=new Set();for(const _0x17c422 of _0x3a3e3f){const _0x272259=stringValue(_0x17c422[_0x220714(0xa7)]),_0x304191=stringValue(_0x17c422[_0x220714(0xd2)]),_0x279344=stringValue(_0x17c422['fromField'])[_0x220714(0x7b)](),_0x1024bf=stringValue(_0x17c422['toField'])['toLowerCase'](),_0x56ae06=stringValue(_0x17c422[_0x220714(0xcf)]),_0x2d07e7=stringValue(_0x17c422[_0x220714(0x89)]);if(!_0x272259||!_0x304191||!_0x279344||!_0x1024bf||_0x56ae06!==_0x220714(0xb4)||!SUPPORTED_CARDINALITIES[_0x220714(0x92)](_0x2d07e7))return null;if(!_0x5998df[_0x220714(0x92)](_0x272259)||!_0x5998df[_0x220714(0x92)](_0x304191))return null;if(_0x25115a&&(stringValue(_0x17c422['fromDatasetCode'])!==_0x5998df[_0x220714(0x9b)](_0x272259)||stringValue(_0x17c422[_0x220714(0xd9)])!==_0x5998df[_0x220714(0x9b)](_0x304191)))return null;const _0x3e1c48=tuple(_0x272259,_0x279344,_0x304191,_0x1024bf,_0x56ae06,_0x2d07e7);if(_0x4ea3da[_0x220714(0x92)](_0x3e1c48))return null;_0x4ea3da[_0x220714(0x73)](_0x3e1c48);}return _0x4ea3da;}function a65_0x448c(_0x2d8a6d,_0x2338da){_0x2d8a6d=_0x2d8a6d-0x73;const _0x4b4c79=a65_0x4b4c();let _0x448c12=_0x4b4c79[_0x2d8a6d];return _0x448c12;}function rejectServerDatasetIdentity(_0xa95606,_0x4807c7){const _0x47e87b=a65_0x542ef6;for(const _0x267780 of['id',_0x47e87b(0xa9),'modelId',_0x47e87b(0x8c),'datasetCode','modelCode']){if(_0xa95606[_0x267780]!==undefined&&_0xa95606[_0x267780]!==null&&_0xa95606[_0x267780]!=='')fail(_0x4807c7+'.'+_0x267780+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function objectArray(_0x65a4cb,_0x4498fb,_0x56f1e9,_0x4bbe6c){const _0x32c2d8=a65_0x542ef6;return(!Array['isArray'](_0x65a4cb)||_0x65a4cb[_0x32c2d8(0xd0)]<_0x56f1e9||_0x65a4cb['length']>_0x4bbe6c||_0x65a4cb[_0x32c2d8(0xb3)](_0x40376b=>!isObject(_0x40376b)))&&fail(_0x4498fb+_0x32c2d8(0xd5)+_0x56f1e9+'..'+_0x4bbe6c+_0x32c2d8(0xb6)),_0x65a4cb;}function stringArray(_0x8fb317,_0x5e5f91,_0x4b400e,_0x383722){const _0x3527dd=a65_0x542ef6;return(!Array['isArray'](_0x8fb317)||_0x8fb317['length']<_0x4b400e||_0x8fb317[_0x3527dd(0xd0)]>_0x383722||_0x8fb317[_0x3527dd(0xb3)](_0x29c06b=>typeof _0x29c06b!=='string'||!_0x29c06b['trim']()))&&fail(_0x5e5f91+'\x20must\x20contain\x20'+_0x4b400e+'..'+_0x383722+'\x20non-empty\x20strings.'),_0x8fb317;}function requiredString(_0x3f7b5d,_0x33e9d7){const _0x5069c9=stringValue(_0x3f7b5d);if(!_0x5069c9)fail(_0x33e9d7+'\x20is\x20required.');return _0x5069c9;}function stringValue(_0x20420e){const _0x525525=a65_0x542ef6;return typeof _0x20420e===_0x525525(0xd3)?_0x20420e['trim']():'';}function fieldName(_0x3c1cbb){const _0x8e49de=a65_0x542ef6;return stringValue(_0x3c1cbb[_0x8e49de(0x8c)]??_0x3c1cbb['fieldCode']??_0x3c1cbb[_0x8e49de(0x78)]??_0x3c1cbb[_0x8e49de(0xa8)]);}function a65_0x4b4c(){const _0x1cceb9=['\x20must\x20contain\x20','createdDatasets[].localKey','].design\x20must\x20be\x20an\x20object.','].localKey\x20must\x20match\x20','toDatasetCode','add','design','unresolvedRelations','metrics','reason','name','.confidence','DATE_RANGE','toLowerCase','number','every','relations','USER','].type\x20is\x20not\x20supported.','182164dVZwoA','split',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','2629887mZsrWG','fieldType','unresolvedRelations[','toField','refTable','cardinality','MULTI_SELECT','fromField','code','3232945wYtJJz','].design.fields','].design.dataset\x20must\x20be\x20an\x20object.','fields','object','has','\x20connects\x20incompatible\x20field\x20types.','datasets[','kind','\x20references\x20an\x20unknown\x20field.','datasets','Dataset\x20','map','.fromField','get','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','set','\x20references\x20an\x20unknown\x20dataset\x20localKey.','isArray','relations[','entries','expectedLocalKeys','test','createdDatasets','715530WthRrl','fromDatasetKey','fieldName','datasetId','.cardinality\x20is\x20not\x20supported.','MANY_TO_ONE','toUpperCase','ONE_TO_ONE','.toField','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','refTableField','SELECT','].confidence','some','lookup','isFinite','\x20objects.','dataset-batch','].design.fields[','expectedRelations','.relationType\x20must\x20be\x20\x22lookup\x22.','datasetCode',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','NUMBER','BOOLEAN','keys','TEXT','datasetName','localKey','size','source','\x20must\x20be\x20between\x200\x20and\x201.','dataset','DATETIME','3137572lelpQK','validation','createdDatasets[].code','6017795BTAVae','].design.dataset.datasetName','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','createdRelations','relationType','length','5722488lEQvUu','toDatasetKey','string','].reason'];a65_0x4b4c=function(){return _0x1cceb9;};return a65_0x4b4c();}function validateConfidence(_0xbb0c21,_0x4c5081){const _0x5ec787=a65_0x542ef6;_0xbb0c21!==undefined&&_0xbb0c21!==null&&(typeof _0xbb0c21!==_0x5ec787(0x7c)||!Number[_0x5ec787(0xb5)](_0xbb0c21)||_0xbb0c21<0x0||_0xbb0c21>0x1)&&fail(_0x4c5081+_0x5ec787(0xc5));}function tuple(..._0x555c1e){const _0x480a72=a65_0x542ef6;return _0x555c1e[_0x480a72(0x99)]((_0x58e737,_0x5c9ce5)=>_0x5c9ce5===0x1||_0x5c9ce5===0x3?_0x58e737[_0x480a72(0x7b)]():_0x58e737)['join']('\x00');}function sameSet(_0x8c19b7,_0x1807e2){const _0x8d011f=a65_0x542ef6;return _0x8c19b7[_0x8d011f(0xc3)]===_0x1807e2[_0x8d011f(0xc3)]&&[..._0x8c19b7][_0x8d011f(0x7d)](_0x364b52=>_0x1807e2['has'](_0x364b52));}function isObject(_0x3fbcd8){const _0x4372d0=a65_0x542ef6;return typeof _0x3fbcd8===_0x4372d0(0x91)&&_0x3fbcd8!==null&&!Array[_0x4372d0(0xa0)](_0x3fbcd8);}function fail(_0x29bafd){const _0x30667f=a65_0x542ef6;throw CliErrors[_0x30667f(0xc9)](_0x29bafd);}
|
|
1
|
+
const a65_0x36bf80=a65_0x8010;(function(_0xa6836,_0x113aa9){const _0x5856b8=a65_0x8010,_0x2eefdb=_0xa6836();while(!![]){try{const _0xb4ad12=parseInt(_0x5856b8(0x18c))/0x1*(-parseInt(_0x5856b8(0x19b))/0x2)+-parseInt(_0x5856b8(0x1cd))/0x3*(parseInt(_0x5856b8(0x1d2))/0x4)+-parseInt(_0x5856b8(0x186))/0x5*(parseInt(_0x5856b8(0x194))/0x6)+parseInt(_0x5856b8(0x165))/0x7+parseInt(_0x5856b8(0x1d5))/0x8*(-parseInt(_0x5856b8(0x1ab))/0x9)+-parseInt(_0x5856b8(0x191))/0xa+parseInt(_0x5856b8(0x1ce))/0xb*(parseInt(_0x5856b8(0x1c3))/0xc);if(_0xb4ad12===_0x113aa9)break;else _0x2eefdb['push'](_0x2eefdb['shift']());}catch(_0x12a8af){_0x2eefdb['push'](_0x2eefdb['shift']());}}}(a65_0x54a2,0xb2fec));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x36bf80(0x174),a65_0x36bf80(0x16b)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x36bf80(0x1d1),a65_0x36bf80(0x1bd),a65_0x36bf80(0x16d),a65_0x36bf80(0x1d4),a65_0x36bf80(0x196),a65_0x36bf80(0x185),a65_0x36bf80(0x17b),a65_0x36bf80(0x172),a65_0x36bf80(0x18a),a65_0x36bf80(0x197)]);export function isDatasetBatchDesign(_0x1d3c40){const _0x866caf=a65_0x36bf80;return isObject(_0x1d3c40)&&_0x1d3c40[_0x866caf(0x1b0)]===_0x866caf(0x1a7);}export function validateDatasetBatchDesign(_0x3d65cb){const _0x365800=a65_0x36bf80;(!isObject(_0x3d65cb)||_0x3d65cb['kind']!=='dataset-batch')&&fail('Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.');_0x3d65cb['schemaVersion']!==0x1&&fail('Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.');const _0x254b2b=objectArray(_0x3d65cb[_0x365800(0x17e)],_0x365800(0x17e),0x1,0x14),_0xf31f43=objectArray(_0x3d65cb[_0x365800(0x18e)],_0x365800(0x18e),0x0,0xc8),_0x18ab99=objectArray(_0x3d65cb[_0x365800(0x1b9)],_0x365800(0x1b9),0x0,0xc8),_0x3bfc55=new Set(),_0xd3c19d=new Map();for(const [_0x46cef3,_0x64cde3]of _0x254b2b[_0x365800(0x1c4)]()){const _0x4ae704=requiredString(_0x64cde3[_0x365800(0x167)],_0x365800(0x1bf)+_0x46cef3+_0x365800(0x190));!LOCAL_KEY[_0x365800(0x1c0)](_0x4ae704)&&fail(_0x365800(0x1bf)+_0x46cef3+_0x365800(0x18d)+LOCAL_KEY['source']+'.');_0x3bfc55['has'](_0x4ae704)&&fail(_0x365800(0x1ad));_0x3bfc55[_0x365800(0x16f)](_0x4ae704);!isObject(_0x64cde3[_0x365800(0x1a3)])&&fail(_0x365800(0x1bf)+_0x46cef3+'].design\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x64cde3[_0x365800(0x1a3)],'datasets['+_0x46cef3+_0x365800(0x1b7));if(!isObject(_0x64cde3[_0x365800(0x1a3)][_0x365800(0x176)]))fail(_0x365800(0x1bf)+_0x46cef3+_0x365800(0x177));rejectServerDatasetIdentity(_0x64cde3[_0x365800(0x1a3)][_0x365800(0x176)],_0x365800(0x1bf)+_0x46cef3+_0x365800(0x195)),requiredString(_0x64cde3[_0x365800(0x1a3)][_0x365800(0x176)][_0x365800(0x179)],'datasets['+_0x46cef3+'].design.dataset.datasetName');_0x365800(0x18e)in _0x64cde3[_0x365800(0x1a3)]&&(!Array[_0x365800(0x1c2)](_0x64cde3[_0x365800(0x1a3)][_0x365800(0x18e)])||_0x64cde3['design'][_0x365800(0x18e)][_0x365800(0x1c8)]!==0x0)&&fail('datasets['+_0x46cef3+'].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.');const _0xe5297a=objectArray(_0x64cde3[_0x365800(0x1a3)][_0x365800(0x19e)],_0x365800(0x1bf)+_0x46cef3+_0x365800(0x1a2),0x1,0xc8),_0xb6c55d=new Map();for(const [_0x5b2311,_0x4d3a92]of _0xe5297a[_0x365800(0x1c4)]()){const _0x32408d=fieldName(_0x4d3a92);if(!_0x32408d)fail(_0x365800(0x1bf)+_0x46cef3+'].design.fields['+_0x5b2311+']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.');const _0x48d701=_0x32408d[_0x365800(0x16a)]();if(_0xb6c55d[_0x365800(0x1d0)](_0x48d701))fail(_0x365800(0x188)+_0x4ae704+_0x365800(0x1c9));const _0x21a252=stringValue(_0x4d3a92[_0x365800(0x170)]??_0x4d3a92[_0x365800(0x1d6)])[_0x365800(0x193)]();if(!SUPPORTED_FIELD_TYPES['has'](_0x21a252))fail(_0x365800(0x1bf)+_0x46cef3+_0x365800(0x1ca)+_0x5b2311+_0x365800(0x1ba));_0xb6c55d[_0x365800(0x198)](_0x48d701,_0x21a252),[_0x4d3a92[_0x365800(0x17a)],_0x4d3a92[_0x365800(0x19c)],_0x4d3a92['refTableLabelField']]['some'](_0x550550=>stringValue(_0x550550))&&fail('datasets['+_0x46cef3+_0x365800(0x1ca)+_0x5b2311+_0x365800(0x1b4));}_0xd3c19d[_0x365800(0x198)](_0x4ae704,_0xb6c55d);}const _0x21f21f=new Set(),_0xe6e523=new Set();for(const [_0x217ad7,_0x5a1d27]of _0xf31f43[_0x365800(0x1c4)]()){const _0x5b1a30=validateRelation(_0x5a1d27,_0x217ad7,_0x3bfc55,_0xd3c19d);if(_0x21f21f[_0x365800(0x1d0)](_0x5b1a30))fail(_0x365800(0x183));_0x21f21f['add'](_0x5b1a30);const _0x311497=_0x5b1a30[_0x365800(0x1b8)]('\x00',0x2)['join']('\x00');if(_0xe6e523[_0x365800(0x1d0)](_0x311497))fail(_0x365800(0x1d3));_0xe6e523['add'](_0x311497);}for(const [_0x27db3f,_0x868221]of _0x18ab99['entries']()){requiredString(_0x868221[_0x365800(0x1aa)],'unresolvedRelations['+_0x27db3f+_0x365800(0x18f)),validateConfidence(_0x868221[_0x365800(0x16e)],_0x365800(0x175)+_0x27db3f+_0x365800(0x1a4));}return _0x3d65cb;}export function reconcileBatchResult(_0x586783){const _0x4b1b54=a65_0x36bf80;if(!isObject(_0x586783))return null;try{const _0x487c29=stringArray(_0x586783['expectedLocalKeys'],_0x4b1b54(0x163),0x1,0x14),_0x1da093=new Set(_0x487c29);if(_0x1da093['size']!==_0x487c29[_0x4b1b54(0x1c8)]||_0x487c29[_0x4b1b54(0x18b)](_0x2298bf=>!LOCAL_KEY[_0x4b1b54(0x1c0)](_0x2298bf)))return null;const _0x1b9304=objectArray(_0x586783[_0x4b1b54(0x1bb)],_0x4b1b54(0x1bb),0x1,0x14),_0x4498f1=new Map(),_0xe5f922=new Set();for(const _0x504ba8 of _0x1b9304){const _0x579aab=requiredString(_0x504ba8[_0x4b1b54(0x167)],'createdDatasets[].localKey'),_0x6c83bb=requiredString(_0x504ba8[_0x4b1b54(0x1b6)]??_0x504ba8[_0x4b1b54(0x161)],_0x4b1b54(0x1c5));if(_0x4498f1[_0x4b1b54(0x1d0)](_0x579aab)||_0xe5f922[_0x4b1b54(0x1d0)](_0x6c83bb))return null;_0x4498f1[_0x4b1b54(0x198)](_0x579aab,_0x6c83bb),_0xe5f922[_0x4b1b54(0x16f)](_0x6c83bb);}if(!sameSet(_0x1da093,new Set(_0x4498f1[_0x4b1b54(0x1a9)]())))return null;const _0x33dccd=objectArray(_0x586783[_0x4b1b54(0x187)],'expectedRelations',0x0,0xc8),_0x561c5e=objectArray(_0x586783[_0x4b1b54(0x178)],_0x4b1b54(0x178),0x0,0xc8),_0x5dec80=relationTupleSet(_0x33dccd,![],_0x4498f1),_0x113f1c=relationTupleSet(_0x561c5e,!![],_0x4498f1);if(!_0x5dec80||!_0x113f1c||!sameSet(_0x5dec80,_0x113f1c))return null;const _0x36c317=objectArray(_0x586783[_0x4b1b54(0x1b9)],'unresolvedRelations',0x0,0xc8);return{'expectedLocalKeys':_0x487c29,'expectedRelations':_0x33dccd,'createdDatasets':_0x1b9304,'createdRelations':_0x561c5e,'unresolvedRelations':_0x36c317,...isObject(_0x586783['metrics'])?{'metrics':_0x586783[_0x4b1b54(0x173)]}:{}};}catch{return null;}}function validateRelation(_0x51c3a4,_0x29e6c0,_0x171ad1,_0x5b9783){const _0x43bd07=a65_0x36bf80,_0x439460=_0x43bd07(0x17c)+_0x29e6c0+']',_0x20d41e=requiredString(_0x51c3a4[_0x43bd07(0x171)],_0x439460+_0x43bd07(0x1cc)),_0x2d5f91=requiredString(_0x51c3a4[_0x43bd07(0x1a6)],_0x439460+_0x43bd07(0x1ae)),_0xb89aa5=requiredString(_0x51c3a4[_0x43bd07(0x169)],_0x439460+_0x43bd07(0x1a1))[_0x43bd07(0x16a)](),_0xd53c77=requiredString(_0x51c3a4[_0x43bd07(0x19a)],_0x439460+_0x43bd07(0x1cb))[_0x43bd07(0x16a)]();if(!_0x171ad1[_0x43bd07(0x1d0)](_0x20d41e)||!_0x171ad1[_0x43bd07(0x1d0)](_0x2d5f91))fail(_0x439460+_0x43bd07(0x182));const _0xa7a157=_0x5b9783[_0x43bd07(0x180)](_0x20d41e)?.[_0x43bd07(0x180)](_0xb89aa5),_0x4bbe42=_0x5b9783['get'](_0x2d5f91)?.[_0x43bd07(0x180)](_0xd53c77);if(_0xa7a157===undefined||_0x4bbe42===undefined)fail(_0x439460+_0x43bd07(0x1af));if(_0xa7a157&&_0x4bbe42&&_0xa7a157!==_0x4bbe42)fail(_0x439460+_0x43bd07(0x192));const _0x290a9e=stringValue(_0x51c3a4[_0x43bd07(0x1a8)])||_0x43bd07(0x19f);if(_0x290a9e!==_0x43bd07(0x19f))fail(_0x439460+'.relationType\x20must\x20be\x20\x22lookup\x22.');const _0x708584=stringValue(_0x51c3a4[_0x43bd07(0x1cf)])||_0x43bd07(0x174);if(!SUPPORTED_CARDINALITIES[_0x43bd07(0x1d0)](_0x708584))fail(_0x439460+_0x43bd07(0x1ac));return requiredString(_0x51c3a4[_0x43bd07(0x1aa)],_0x439460+_0x43bd07(0x184)),validateConfidence(_0x51c3a4[_0x43bd07(0x16e)],_0x439460+_0x43bd07(0x1be)),tuple(_0x20d41e,_0xb89aa5,_0x2d5f91,_0xd53c77,_0x43bd07(0x19f),_0x708584);}function a65_0x54a2(){const _0x32cb04=['.confidence','datasets[','test','fieldName','isArray','384LqiNUv','entries','createdDatasets[].code','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','number','length','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','].design.fields[','.toField','.fromDatasetKey','21jxnkRH','1352153Ruiwvz','cardinality','has','TEXT','622988ffDNcX','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','BOOLEAN','16bFEPBG','fieldType','datasetCode','string','expectedLocalKeys','\x20must\x20be\x20between\x200\x20and\x201.','6107318uCzhQE','name','localKey','every','fromField','toLowerCase','ONE_TO_ONE','modelId','DATETIME','confidence','add','type','fromDatasetKey','USER','metrics','MANY_TO_ONE','unresolvedRelations[','dataset','].design.dataset\x20must\x20be\x20an\x20object.','createdRelations','datasetName','refTable','DATE_RANGE','relations[','toDatasetCode','datasets','trim','get','\x20non-empty\x20strings.','\x20references\x20an\x20unknown\x20dataset\x20localKey.','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','.reason','MULTI_SELECT','145XqLgFd','expectedRelations','Dataset\x20','join','ADDRESS','some','1072712IOtnMR','].localKey\x20must\x20match\x20','relations','].reason','].localKey','6330880CcuScH','\x20connects\x20incompatible\x20field\x20types.','toUpperCase','213474OQQMVN','].design.dataset','SELECT','UPLOAD','set','modelCode','toField','2IAXvTi','refTableField','validation','fields','lookup','\x20is\x20required.','.fromField','].design.fields','design','].confidence','map','toDatasetKey','dataset-batch','relationType','keys','reason','1102617mJtcGi','.cardinality\x20is\x20not\x20supported.','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','.toDatasetKey','\x20references\x20an\x20unknown\x20field.','kind','\x20must\x20contain\x20','size','fromDatasetCode',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','object','code','].design','split','unresolvedRelations','].type\x20is\x20not\x20supported.','createdDatasets','datasetId','NUMBER'];a65_0x54a2=function(){return _0x32cb04;};return a65_0x54a2();}function relationTupleSet(_0x2a133d,_0x2b9774,_0x109561){const _0x18f30d=a65_0x36bf80,_0x42c25f=new Set();for(const _0x54612a of _0x2a133d){const _0x1ce1e6=stringValue(_0x54612a[_0x18f30d(0x171)]),_0x2754ef=stringValue(_0x54612a[_0x18f30d(0x1a6)]),_0x3ec686=stringValue(_0x54612a[_0x18f30d(0x169)])[_0x18f30d(0x16a)](),_0x1f3314=stringValue(_0x54612a[_0x18f30d(0x19a)])['toLowerCase'](),_0x584f93=stringValue(_0x54612a[_0x18f30d(0x1a8)]),_0x122315=stringValue(_0x54612a['cardinality']);if(!_0x1ce1e6||!_0x2754ef||!_0x3ec686||!_0x1f3314||_0x584f93!==_0x18f30d(0x19f)||!SUPPORTED_CARDINALITIES[_0x18f30d(0x1d0)](_0x122315))return null;if(!_0x109561['has'](_0x1ce1e6)||!_0x109561['has'](_0x2754ef))return null;if(_0x2b9774&&(stringValue(_0x54612a[_0x18f30d(0x1b3)])!==_0x109561[_0x18f30d(0x180)](_0x1ce1e6)||stringValue(_0x54612a[_0x18f30d(0x17d)])!==_0x109561[_0x18f30d(0x180)](_0x2754ef)))return null;const _0x1bdeff=tuple(_0x1ce1e6,_0x3ec686,_0x2754ef,_0x1f3314,_0x584f93,_0x122315);if(_0x42c25f[_0x18f30d(0x1d0)](_0x1bdeff))return null;_0x42c25f['add'](_0x1bdeff);}return _0x42c25f;}function rejectServerDatasetIdentity(_0x394c4e,_0x30d5a8){const _0x4b0409=a65_0x36bf80;for(const _0x113f96 of['id',_0x4b0409(0x1bc),_0x4b0409(0x16c),_0x4b0409(0x1b6),'datasetCode',_0x4b0409(0x199)]){if(_0x394c4e[_0x113f96]!==undefined&&_0x394c4e[_0x113f96]!==null&&_0x394c4e[_0x113f96]!=='')fail(_0x30d5a8+'.'+_0x113f96+_0x4b0409(0x1c6));}}function objectArray(_0xacab99,_0x471246,_0x341a11,_0x2ec114){const _0x121f0f=a65_0x36bf80;return(!Array['isArray'](_0xacab99)||_0xacab99[_0x121f0f(0x1c8)]<_0x341a11||_0xacab99[_0x121f0f(0x1c8)]>_0x2ec114||_0xacab99['some'](_0x1ab5f3=>!isObject(_0x1ab5f3)))&&fail(_0x471246+_0x121f0f(0x1b1)+_0x341a11+'..'+_0x2ec114+'\x20objects.'),_0xacab99;}function stringArray(_0x327e61,_0x514cd1,_0x23ea93,_0x5a62a7){const _0x4f913c=a65_0x36bf80;return(!Array[_0x4f913c(0x1c2)](_0x327e61)||_0x327e61['length']<_0x23ea93||_0x327e61[_0x4f913c(0x1c8)]>_0x5a62a7||_0x327e61[_0x4f913c(0x18b)](_0x46eca8=>typeof _0x46eca8!==_0x4f913c(0x162)||!_0x46eca8[_0x4f913c(0x17f)]()))&&fail(_0x514cd1+_0x4f913c(0x1b1)+_0x23ea93+'..'+_0x5a62a7+_0x4f913c(0x181)),_0x327e61;}function requiredString(_0x426bf2,_0x1e8f38){const _0x231081=a65_0x36bf80,_0x318e7e=stringValue(_0x426bf2);if(!_0x318e7e)fail(_0x1e8f38+_0x231081(0x1a0));return _0x318e7e;}function stringValue(_0x3b8ad1){const _0x4e0068=a65_0x36bf80;return typeof _0x3b8ad1===_0x4e0068(0x162)?_0x3b8ad1['trim']():'';}function fieldName(_0x18df92){const _0x1376c1=a65_0x36bf80;return stringValue(_0x18df92['code']??_0x18df92['fieldCode']??_0x18df92[_0x1376c1(0x166)]??_0x18df92[_0x1376c1(0x1c1)]);}function validateConfidence(_0x297226,_0x56d6e7){const _0xd08fe9=a65_0x36bf80;_0x297226!==undefined&&_0x297226!==null&&(typeof _0x297226!==_0xd08fe9(0x1c7)||!Number['isFinite'](_0x297226)||_0x297226<0x0||_0x297226>0x1)&&fail(_0x56d6e7+_0xd08fe9(0x164));}function tuple(..._0x46884f){const _0x4635ef=a65_0x36bf80;return _0x46884f[_0x4635ef(0x1a5)]((_0x2c6053,_0x2328eb)=>_0x2328eb===0x1||_0x2328eb===0x3?_0x2c6053['toLowerCase']():_0x2c6053)[_0x4635ef(0x189)]('\x00');}function a65_0x8010(_0x2fe6c3,_0x2378a4){_0x2fe6c3=_0x2fe6c3-0x161;const _0x54a2e2=a65_0x54a2();let _0x8010a=_0x54a2e2[_0x2fe6c3];return _0x8010a;}function sameSet(_0x864f87,_0x1373ad){const _0x33c6ca=a65_0x36bf80;return _0x864f87['size']===_0x1373ad[_0x33c6ca(0x1b2)]&&[..._0x864f87][_0x33c6ca(0x168)](_0x4b627d=>_0x1373ad[_0x33c6ca(0x1d0)](_0x4b627d));}function isObject(_0x40e223){const _0x41c812=a65_0x36bf80;return typeof _0x40e223===_0x41c812(0x1b5)&&_0x40e223!==null&&!Array[_0x41c812(0x1c2)](_0x40e223);}function fail(_0x1b0cd6){const _0x23392a=a65_0x36bf80;throw CliErrors[_0x23392a(0x19d)](_0x1b0cd6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a66_0x428d61=a66_0x51d3;(function(_0x3c57a8,_0x436c56){const _0x5c270b=a66_0x51d3,_0xaceb99=_0x3c57a8();while(!![]){try{const _0x1e2b6e=parseInt(_0x5c270b(0x183))/0x1*(parseInt(_0x5c270b(0x18d))/0x2)+parseInt(_0x5c270b(0x15f))/0x3+-parseInt(_0x5c270b(0x190))/0x4+-parseInt(_0x5c270b(0x18c))/0x5*(parseInt(_0x5c270b(0x15a))/0x6)+-parseInt(_0x5c270b(0x187))/0x7+-parseInt(_0x5c270b(0x188))/0x8+-parseInt(_0x5c270b(0x165))/0x9*(parseInt(_0x5c270b(0x197))/0xa);if(_0x1e2b6e===_0x436c56)break;else _0xaceb99['push'](_0xaceb99['shift']());}catch(_0x5ea069){_0xaceb99['push'](_0xaceb99['shift']());}}}(a66_0x1082,0xbadeb));function a66_0x51d3(_0x29b089,_0x4f2044){_0x29b089=_0x29b089-0x155;const _0x108236=a66_0x1082();let _0x51d304=_0x108236[_0x29b089];return _0x51d304;}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_0x428d61(0x158),METADATA_BACKEND_PATH=a66_0x428d61(0x16e),UNGROUPED_BUSINESS_GROUP=a66_0x428d61(0x199);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x2cd65e,input:_0x324264,dryRun:_0x2dad20}){const _0xc1fc49=a66_0x428d61;validateInput(_0x324264);const _0x1bd307=normalizeBusinessGroupArgument(_0x324264['businessGroup']),_0x293bf9=await getDatasetDetail(_0x324264[_0xc1fc49(0x192)]),_0x4241ed=resolveBusinessGroupDataset(_0x293bf9,_0x324264['code']);assertBusinessGroupUpdateSupported(_0x4241ed,_0x1bd307);const _0x2e83e9=loadCurrentBusinessGroup(_0x293bf9,_0x4241ed);assertExpectedBusinessGroup(_0x2e83e9,_0x324264[_0xc1fc49(0x19b)]);const _0x32b1ae=buildBackendPlan(_0x2cd65e,_0x4241ed,_0x1bd307),_0xebbe0b=_0x2e83e9!==_0x1bd307;let _0x41d66b;if(_0xebbe0b&&!_0x2dad20){_0x32b1ae[_0xc1fc49(0x162)]==='db-table'?await updateDbTableBusinessGroup(_0x32b1ae[_0xc1fc49(0x156)]):await updateErBusinessGroup(_0x32b1ae[_0xc1fc49(0x156)]);const _0x203f65=await getDatasetDetail(_0x4241ed[_0xc1fc49(0x192)]),_0x3328b1=resolveBusinessGroupDataset(_0x203f65,_0x4241ed[_0xc1fc49(0x192)]),_0x33feb7=loadCurrentBusinessGroup(_0x203f65,_0x3328b1);if(_0x33feb7!==_0x1bd307)throw CliErrors['apiError'](_0xc1fc49(0x172),_0xc1fc49(0x160)+JSON[_0xc1fc49(0x170)](displayBusinessGroup(_0x1bd307))+_0xc1fc49(0x173)+JSON[_0xc1fc49(0x170)](displayBusinessGroup(_0x33feb7))+'.');_0x41d66b={'verified':!![],'status':_0xc1fc49(0x17a),'afterReadback':{'businessGroup':displayBusinessGroup(_0x33feb7)}};}else!_0xebbe0b&&(_0x41d66b={'verified':!![],'status':_0xc1fc49(0x17c),'afterReadback':{'businessGroup':displayBusinessGroup(_0x2e83e9)}});const _0x320608={'operation':'update','appCode':_0x2cd65e,'selector':{'code':_0x4241ed[_0xc1fc49(0x192)]},'dataset':{'id':_0x4241ed['id'],'code':_0x4241ed[_0xc1fc49(0x192)],'name':_0x4241ed['name'],'sourceType':_0x4241ed[_0xc1fc49(0x16a)]},'before':{'businessGroup':displayBusinessGroup(_0x2e83e9)},'after':{'businessGroup':displayBusinessGroup(_0x1bd307)},'changed':_0xebbe0b,'dryRun':_0x2dad20,'submitted':_0xebbe0b&&!_0x2dad20,'backend':{'method':_0x32b1ae['method'],'path':_0x32b1ae[_0xc1fc49(0x177)],'payload':_0x32b1ae[_0xc1fc49(0x156)]},..._0x41d66b?{'verification':_0x41d66b}:{},'warnings':[]};return{'ok':!![],'data':_0x320608,'message':_0xebbe0b?_0x2dad20?_0xc1fc49(0x15c)+_0x4241ed['code']:_0xc1fc49(0x181)+_0x4241ed[_0xc1fc49(0x192)]:_0xc1fc49(0x19d)+_0x4241ed[_0xc1fc49(0x192)]};}export const datasetBusinessGroupUpdate={'service':a66_0x428d61(0x16b),'command':a66_0x428d61(0x18f),'description':a66_0x428d61(0x191),'risk':a66_0x428d61(0x176),'flags':[CODE_FLAG,{'name':'business-group','type':'string','required':!![],'description':a66_0x428d61(0x178)},{'name':a66_0x428d61(0x180),'type':'string','required':![],'description':a66_0x428d61(0x161)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x356c5e){validateInput(readBusinessGroupUpdateInput(_0x356c5e));},async 'dryRun'(_0x20c512){const _0xcc431c=a66_0x428d61,_0x2dc984=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x20c512['appCode'],'input':readBusinessGroupUpdateInput(_0x20c512),'dryRun':!![]});return{'method':_0x2dc984[_0xcc431c(0x157)][_0xcc431c(0x19c)]['method'],'url':_0x2dc984['data'][_0xcc431c(0x19c)][_0xcc431c(0x177)],'body':_0x2dc984['data'][_0xcc431c(0x19c)]['payload'],'description':_0x2dc984['message'],..._0x2dc984[_0xcc431c(0x157)]};},async 'execute'(_0x5a2fbb){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x5a2fbb['appCode'],'input':readBusinessGroupUpdateInput(_0x5a2fbb),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x5bccad){const _0x5cdb7b=a66_0x428d61,_0xbe4410=_0x5bccad[_0x5cdb7b(0x17f)](_0x5cdb7b(0x180));return{'code':trim(_0x5bccad[_0x5cdb7b(0x17f)]('code')),'businessGroup':_0x5bccad['str'](_0x5cdb7b(0x186)),'expectBusinessGroup':_0xbe4410===undefined||_0xbe4410===''?undefined:_0xbe4410};}function validateInput(_0x1e2e1b){const _0x2c59a6=a66_0x428d61;if(!trim(_0x1e2e1b[_0x2c59a6(0x192)]))throw CliErrors[_0x2c59a6(0x164)]('--code\x20is\x20required');if(_0x1e2e1b[_0x2c59a6(0x185)]===undefined)throw CliErrors[_0x2c59a6(0x164)](_0x2c59a6(0x195));if(!trim(_0x1e2e1b[_0x2c59a6(0x185)]))throw CliErrors[_0x2c59a6(0x164)](_0x2c59a6(0x184));}function assertBusinessGroupUpdateSupported(_0x3343d,_0x35cb04){const _0x4b6047=a66_0x428d61;if(_0x3343d[_0x4b6047(0x16a)]===_0x4b6047(0x15d)&&!_0x35cb04)throw CliErrors['validation'](_0x4b6047(0x19e));}function resolveBusinessGroupDataset(_0x23414c,_0x53afb1){const _0x1cdc05=a66_0x428d61,_0x45204d=asPlainObject(_0x23414c[_0x1cdc05(0x16b)]),_0xf18043=asPlainObject(_0x23414c['dbtableConfig']),_0x461ddd=resolveSourceType(_0x23414c,_0x45204d,_0xf18043),_0x1457fa=firstString(_0x23414c['modelCode'],_0x23414c[_0x1cdc05(0x192)],_0x45204d['datasetCode'],_0x53afb1)||_0x53afb1;return{'id':firstNumber(_0x23414c[_0x1cdc05(0x18b)],_0x23414c['id'],_0x45204d['datasetId'])??firstString(_0x23414c['modelId'],_0x23414c['id'],_0x45204d[_0x1cdc05(0x159)])??null,'code':_0x1457fa,'name':firstString(_0x23414c['name'],_0x45204d[_0x1cdc05(0x169)],_0x45204d['name'])||null,'sourceType':_0x461ddd,'dbTableSelector':_0x461ddd==='DB_TABLE'?{'dbLinkId':firstNumber(_0xf18043['dbId']),'tableName':firstString(_0xf18043[_0x1cdc05(0x16d)])||null}:null};}function resolveSourceType(_0x5d0be2,_0x88f2b6,_0x21a8ee){const _0xb4f980=a66_0x428d61,_0x346ab7=firstString(_0x5d0be2[_0xb4f980(0x189)],_0x5d0be2[_0xb4f980(0x16a)],_0x88f2b6[_0xb4f980(0x189)],_0x88f2b6['sourceType'])?.[_0xb4f980(0x198)]()[_0xb4f980(0x16f)]();if(_0x346ab7===_0xb4f980(0x15d)||_0x346ab7===_0xb4f980(0x196))return _0x346ab7;if(Object[_0xb4f980(0x18a)](_0x21a8ee)[_0xb4f980(0x166)]>0x0)return'DB_TABLE';throw CliErrors[_0xb4f980(0x164)](_0xb4f980(0x179));}function loadCurrentBusinessGroup(_0x45ae9b,_0x132179){const _0xc5d94b=a66_0x428d61,_0x459a5f=readBusinessGroupFromDatasetDetail(_0x45ae9b,_0x132179[_0xc5d94b(0x16a)]);if(_0x459a5f['found'])return normalizeBusinessGroup(_0x459a5f[_0xc5d94b(0x194)]);return'';}function readBusinessGroupFromDatasetDetail(_0x1ae2e8,_0x32e55c){const _0x1a4c1d=a66_0x428d61,_0x267dd9=asPlainObject(_0x1ae2e8[_0x1a4c1d(0x16b)]),_0x1ddc6f=firstPresent(_0x1ae2e8[_0x1a4c1d(0x185)]);if(_0x1ddc6f[_0x1a4c1d(0x175)])return _0x1ddc6f;const _0x4db6e1=firstPresent(_0x267dd9[_0x1a4c1d(0x185)]);if(_0x4db6e1[_0x1a4c1d(0x175)])return _0x4db6e1;if(_0x32e55c===_0x1a4c1d(0x15d))return{'found':![]};const _0x41c666=readBusinessGroupFromExtend(_0x1ae2e8['extend']);if(_0x41c666[_0x1a4c1d(0x175)])return _0x41c666;return readBusinessGroupFromExtend(_0x267dd9[_0x1a4c1d(0x17e)]);}function readBusinessGroupFromExtend(_0x6f0dd5){const _0x446844=a66_0x428d61;if(_0x6f0dd5===undefined||_0x6f0dd5===null||_0x6f0dd5==='')return{'found':![]};if(typeof _0x6f0dd5===_0x446844(0x167))try{const _0x3944ec=JSON[_0x446844(0x174)](_0x6f0dd5);return readBusinessGroupFromExtend(_0x3944ec);}catch{return{'found':![]};}const _0x5be2b7=asPlainObject(_0x6f0dd5);if(Object[_0x446844(0x17b)]['hasOwnProperty'][_0x446844(0x19a)](_0x5be2b7,_0x446844(0x185)))return{'found':!![],'value':_0x5be2b7[_0x446844(0x185)]};return{'found':![]};}function firstPresent(..._0x2c1895){for(const _0xecf5e5 of _0x2c1895){if(_0xecf5e5!==undefined&&_0xecf5e5!==null)return{'found':!![],'value':_0xecf5e5};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4b1af7,_0x121106){const _0x33b909=a66_0x428d61;if(_0x121106===undefined)return;const _0x2f55ef=normalizeBusinessGroupArgument(_0x121106);if(_0x4b1af7!==_0x2f55ef)throw CliErrors['validation'](_0x33b909(0x171),_0x33b909(0x160)+JSON[_0x33b909(0x170)](_0x2f55ef)+',\x20actual\x20'+JSON[_0x33b909(0x170)](_0x4b1af7));}function buildBackendPlan(_0x5cd6c5,_0x567f17,_0x496ac1){const _0x2e294c=a66_0x428d61;if(_0x567f17[_0x2e294c(0x16a)]===_0x2e294c(0x15d)){if(!_0x567f17['dbTableSelector']||_0x567f17['dbTableSelector'][_0x2e294c(0x18e)]===null||!_0x567f17[_0x2e294c(0x16c)][_0x2e294c(0x16d)])throw CliErrors[_0x2e294c(0x164)](_0x2e294c(0x15e),'Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.');return{'kind':_0x2e294c(0x193),'method':_0x2e294c(0x15b),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x567f17[_0x2e294c(0x16c)]['dbLinkId'],'tableName':_0x567f17['dbTableSelector']['tableName'],'businessGroup':_0x496ac1}};}return{'kind':_0x2e294c(0x17d),'method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x5cd6c5,'datasetCode':_0x567f17['code'],'businessGroup':_0x496ac1}};}function normalizeBusinessGroup(_0xaf542e){if(_0xaf542e===undefined||_0xaf542e===null)return'';return String(_0xaf542e)['trim']();}function normalizeBusinessGroupArgument(_0x85eba6){const _0x5d4e50=normalizeBusinessGroup(_0x85eba6);return _0x5d4e50===UNGROUPED_BUSINESS_GROUP?'':_0x5d4e50;}function displayBusinessGroup(_0x35764c){return _0x35764c||UNGROUPED_BUSINESS_GROUP;}function a66_0x1082(){const _0x4edd25=['DB_TABLE','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','4195731UGXJDM','Expected\x20','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','kind','isArray','validation','9cxmLGD','length','string','object','datasetName','sourceType','dataset','dbTableSelector','tableName','/smartapi/question/er-config/business-group/edit','toUpperCase','stringify','Expectation\x20mismatch\x20at\x20businessGroup','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',',\x20actual\x20','parse','found','write','path','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','matched','prototype','unchanged','metadata','extend','str','expect-business-group','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','isFinite','265gUZCnu','--business-group\x20must\x20not\x20be\x20blank','businessGroup','business-group','1575119UnvhLg','5020240wwqhhG','source','keys','modelId','218505spPYUc','9078EFGPdJ','dbLinkId','business-group-update','274648blBYcO','Update\x20business\x20scenario\x20group','code','db-table','value','--business-group\x20is\x20required','METADATA','4340730teNUSZ','trim','ungrouped','call','expectBusinessGroup','backend','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','number','payload','data','/smartapi/dblink/updateTableBusinessGroup','datasetId','66bHgpnm','POST','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'];a66_0x1082=function(){return _0x4edd25;};return a66_0x1082();}function asPlainObject(_0x2b1168){const _0x2a33c2=a66_0x428d61;if(!_0x2b1168||typeof _0x2b1168!==_0x2a33c2(0x168)||Array[_0x2a33c2(0x163)](_0x2b1168))return{};return _0x2b1168;}function firstString(..._0x76b42){const _0x48e9f5=a66_0x428d61;for(const _0x3cbd81 of _0x76b42){if(typeof _0x3cbd81==='string'&&_0x3cbd81['trim']())return _0x3cbd81[_0x48e9f5(0x198)]();if(typeof _0x3cbd81===_0x48e9f5(0x155)&&Number[_0x48e9f5(0x182)](_0x3cbd81))return String(_0x3cbd81);}return undefined;}function firstNumber(..._0x3a5c01){const _0xb2fff6=a66_0x428d61;for(const _0x4de8d1 of _0x3a5c01){if(typeof _0x4de8d1===_0xb2fff6(0x155)&&Number[_0xb2fff6(0x182)](_0x4de8d1))return _0x4de8d1;if(typeof _0x4de8d1==='string'&&_0x4de8d1[_0xb2fff6(0x198)]()&&Number[_0xb2fff6(0x182)](Number(_0x4de8d1)))return Number(_0x4de8d1);}return null;}function trim(_0x319733){return String(_0x319733||'')['trim']();}
|
|
1
|
+
const a66_0x24e1a2=a66_0x20db;(function(_0x3bf16e,_0x2e81f4){const _0x4fbb29=a66_0x20db,_0xe38b1a=_0x3bf16e();while(!![]){try{const _0x2fb2e1=-parseInt(_0x4fbb29(0x137))/0x1+parseInt(_0x4fbb29(0x13d))/0x2*(parseInt(_0x4fbb29(0x108))/0x3)+parseInt(_0x4fbb29(0x106))/0x4+-parseInt(_0x4fbb29(0x126))/0x5*(-parseInt(_0x4fbb29(0x12b))/0x6)+parseInt(_0x4fbb29(0x146))/0x7*(-parseInt(_0x4fbb29(0x125))/0x8)+-parseInt(_0x4fbb29(0x147))/0x9*(-parseInt(_0x4fbb29(0x133))/0xa)+-parseInt(_0x4fbb29(0x12c))/0xb;if(_0x2fb2e1===_0x2e81f4)break;else _0xe38b1a['push'](_0xe38b1a['shift']());}catch(_0x23fc68){_0xe38b1a['push'](_0xe38b1a['shift']());}}}(a66_0x1cc5,0xb11bf));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a66_0x24e1a2(0x13c),METADATA_BACKEND_PATH=a66_0x24e1a2(0x10f),UNGROUPED_BUSINESS_GROUP=a66_0x24e1a2(0x11c);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x21fe5a,input:_0x5ae442,dryRun:_0x11660a}){const _0x266934=a66_0x24e1a2;validateInput(_0x5ae442);const _0x29ad76=normalizeBusinessGroupArgument(_0x5ae442['businessGroup']),_0x4ad0b5=await getDatasetDetail(_0x5ae442['code']),_0x21390e=resolveBusinessGroupDataset(_0x4ad0b5,_0x5ae442[_0x266934(0x135)]);assertBusinessGroupUpdateSupported(_0x21390e,_0x29ad76);const _0x7527ef=loadCurrentBusinessGroup(_0x4ad0b5,_0x21390e);assertExpectedBusinessGroup(_0x7527ef,_0x5ae442[_0x266934(0x123)]);const _0x197255=buildBackendPlan(_0x21fe5a,_0x21390e,_0x29ad76),_0x9ec31e=_0x7527ef!==_0x29ad76;let _0x5a774b;if(_0x9ec31e&&!_0x11660a){_0x197255['kind']===_0x266934(0x143)?await updateDbTableBusinessGroup(_0x197255[_0x266934(0x10d)]):await updateErBusinessGroup(_0x197255['payload']);const _0x32086d=await getDatasetDetail(_0x21390e[_0x266934(0x135)]),_0x3381c0=resolveBusinessGroupDataset(_0x32086d,_0x21390e[_0x266934(0x135)]),_0xb317cf=loadCurrentBusinessGroup(_0x32086d,_0x3381c0);if(_0xb317cf!==_0x29ad76)throw CliErrors[_0x266934(0x12a)](_0x266934(0x107),_0x266934(0x102)+JSON[_0x266934(0x112)](displayBusinessGroup(_0x29ad76))+',\x20actual\x20'+JSON[_0x266934(0x112)](displayBusinessGroup(_0xb317cf))+'.');_0x5a774b={'verified':!![],'status':_0x266934(0x14a),'afterReadback':{'businessGroup':displayBusinessGroup(_0xb317cf)}};}else!_0x9ec31e&&(_0x5a774b={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x7527ef)}});const _0x2654da={'operation':'update','appCode':_0x21fe5a,'selector':{'code':_0x21390e[_0x266934(0x135)]},'dataset':{'id':_0x21390e['id'],'code':_0x21390e[_0x266934(0x135)],'name':_0x21390e[_0x266934(0x11d)],'sourceType':_0x21390e[_0x266934(0x11e)]},'before':{'businessGroup':displayBusinessGroup(_0x7527ef)},'after':{'businessGroup':displayBusinessGroup(_0x29ad76)},'changed':_0x9ec31e,'dryRun':_0x11660a,'submitted':_0x9ec31e&&!_0x11660a,'backend':{'method':_0x197255['method'],'path':_0x197255[_0x266934(0x117)],'payload':_0x197255[_0x266934(0x10d)]},..._0x5a774b?{'verification':_0x5a774b}:{},'warnings':[]};return{'ok':!![],'data':_0x2654da,'message':_0x9ec31e?_0x11660a?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x21390e['code']:_0x266934(0x113)+_0x21390e[_0x266934(0x135)]:_0x266934(0x11f)+_0x21390e[_0x266934(0x135)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a66_0x24e1a2(0x10e),'description':a66_0x24e1a2(0x145),'risk':a66_0x24e1a2(0x104),'flags':[CODE_FLAG,{'name':'business-group','type':a66_0x24e1a2(0x142),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':'expect-business-group','type':a66_0x24e1a2(0x142),'required':![],'description':a66_0x24e1a2(0x10b)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54c115){validateInput(readBusinessGroupUpdateInput(_0x54c115));},async 'dryRun'(_0x191f76){const _0x5c0858=a66_0x24e1a2,_0x5dab9f=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x191f76[_0x5c0858(0x10c)],'input':readBusinessGroupUpdateInput(_0x191f76),'dryRun':!![]});return{'method':_0x5dab9f['data']['backend'][_0x5c0858(0x105)],'url':_0x5dab9f[_0x5c0858(0x139)]['backend']['path'],'body':_0x5dab9f[_0x5c0858(0x139)][_0x5c0858(0x10a)]['payload'],'description':_0x5dab9f['message'],..._0x5dab9f[_0x5c0858(0x139)]};},async 'execute'(_0x15c70a){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x15c70a['appCode'],'input':readBusinessGroupUpdateInput(_0x15c70a),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x4a32be){const _0x7d5fa7=a66_0x24e1a2,_0x23ac9d=_0x4a32be['str'](_0x7d5fa7(0x116));return{'code':trim(_0x4a32be[_0x7d5fa7(0x13b)](_0x7d5fa7(0x135))),'businessGroup':_0x4a32be['str'](_0x7d5fa7(0x109)),'expectBusinessGroup':_0x23ac9d===undefined||_0x23ac9d===''?undefined:_0x23ac9d};}function validateInput(_0x2f60d6){const _0x174815=a66_0x24e1a2;if(!trim(_0x2f60d6[_0x174815(0x135)]))throw CliErrors[_0x174815(0x134)]('--code\x20is\x20required');if(_0x2f60d6[_0x174815(0x144)]===undefined)throw CliErrors[_0x174815(0x134)](_0x174815(0x12d));if(!trim(_0x2f60d6[_0x174815(0x144)]))throw CliErrors[_0x174815(0x134)](_0x174815(0x124));}function assertBusinessGroupUpdateSupported(_0x9e3728,_0x54b245){const _0x331514=a66_0x24e1a2;if(_0x9e3728[_0x331514(0x11e)]===_0x331514(0x12f)&&!_0x54b245)throw CliErrors[_0x331514(0x134)](_0x331514(0x140));}function resolveBusinessGroupDataset(_0x2879f6,_0xfbe45){const _0x2ef589=a66_0x24e1a2,_0x42b80f=asPlainObject(_0x2879f6[_0x2ef589(0x127)]),_0x19d310=asPlainObject(_0x2879f6[_0x2ef589(0x103)]),_0x10555f=resolveSourceType(_0x2879f6,_0x42b80f,_0x19d310),_0x4b8f60=firstString(_0x2879f6[_0x2ef589(0x118)],_0x2879f6[_0x2ef589(0x135)],_0x42b80f[_0x2ef589(0x136)],_0xfbe45)||_0xfbe45;return{'id':firstNumber(_0x2879f6['modelId'],_0x2879f6['id'],_0x42b80f[_0x2ef589(0x131)])??firstString(_0x2879f6['modelId'],_0x2879f6['id'],_0x42b80f[_0x2ef589(0x131)])??null,'code':_0x4b8f60,'name':firstString(_0x2879f6[_0x2ef589(0x11d)],_0x42b80f['datasetName'],_0x42b80f[_0x2ef589(0x11d)])||null,'sourceType':_0x10555f,'dbTableSelector':_0x10555f===_0x2ef589(0x12f)?{'dbLinkId':firstNumber(_0x19d310['dbId']),'tableName':firstString(_0x19d310[_0x2ef589(0x13a)])||null}:null};}function resolveSourceType(_0xc8d88a,_0x51faa2,_0x30bca8){const _0x43c9b4=a66_0x24e1a2,_0xfeaafe=firstString(_0xc8d88a[_0x43c9b4(0x12e)],_0xc8d88a['sourceType'],_0x51faa2[_0x43c9b4(0x12e)],_0x51faa2['sourceType'])?.[_0x43c9b4(0x138)]()[_0x43c9b4(0x110)]();if(_0xfeaafe==='DB_TABLE'||_0xfeaafe===_0x43c9b4(0x128))return _0xfeaafe;if(Object['keys'](_0x30bca8)[_0x43c9b4(0x130)]>0x0)return _0x43c9b4(0x12f);throw CliErrors['validation'](_0x43c9b4(0x148));}function loadCurrentBusinessGroup(_0x346e61,_0x5041a5){const _0x2ac126=a66_0x24e1a2,_0x5e6c68=readBusinessGroupFromDatasetDetail(_0x346e61,_0x5041a5[_0x2ac126(0x11e)]);if(_0x5e6c68[_0x2ac126(0x13f)])return normalizeBusinessGroup(_0x5e6c68[_0x2ac126(0x11b)]);return'';}function readBusinessGroupFromDatasetDetail(_0x5d7433,_0x23b1ef){const _0x47cebd=a66_0x24e1a2,_0x411e9d=asPlainObject(_0x5d7433[_0x47cebd(0x127)]),_0x8c488d=firstPresent(_0x5d7433[_0x47cebd(0x144)]);if(_0x8c488d[_0x47cebd(0x13f)])return _0x8c488d;const _0x2d7e20=firstPresent(_0x411e9d['businessGroup']);if(_0x2d7e20[_0x47cebd(0x13f)])return _0x2d7e20;if(_0x23b1ef==='DB_TABLE')return{'found':![]};const _0x4dd3c7=readBusinessGroupFromExtend(_0x5d7433[_0x47cebd(0x132)]);if(_0x4dd3c7['found'])return _0x4dd3c7;return readBusinessGroupFromExtend(_0x411e9d[_0x47cebd(0x132)]);}function readBusinessGroupFromExtend(_0x2e72af){const _0x5c1b1b=a66_0x24e1a2;if(_0x2e72af===undefined||_0x2e72af===null||_0x2e72af==='')return{'found':![]};if(typeof _0x2e72af===_0x5c1b1b(0x142))try{const _0x5bd36b=JSON['parse'](_0x2e72af);return readBusinessGroupFromExtend(_0x5bd36b);}catch{return{'found':![]};}const _0x3a4bea=asPlainObject(_0x2e72af);if(Object['prototype'][_0x5c1b1b(0x149)][_0x5c1b1b(0x114)](_0x3a4bea,_0x5c1b1b(0x144)))return{'found':!![],'value':_0x3a4bea[_0x5c1b1b(0x144)]};return{'found':![]};}function firstPresent(..._0x5c33ea){for(const _0x258866 of _0x5c33ea){if(_0x258866!==undefined&&_0x258866!==null)return{'found':!![],'value':_0x258866};}return{'found':![]};}function assertExpectedBusinessGroup(_0x10c8b1,_0x223006){const _0x12bcc0=a66_0x24e1a2;if(_0x223006===undefined)return;const _0x2411bb=normalizeBusinessGroupArgument(_0x223006);if(_0x10c8b1!==_0x2411bb)throw CliErrors[_0x12bcc0(0x134)](_0x12bcc0(0x13e),_0x12bcc0(0x102)+JSON['stringify'](_0x2411bb)+_0x12bcc0(0x11a)+JSON[_0x12bcc0(0x112)](_0x10c8b1));}function a66_0x1cc5(){const _0x48b1e1=['dbtableConfig','write','method','2436400Jhcstr','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','9Feiuci','business-group','backend','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','appCode','payload','business-group-update','/smartapi/question/er-config/business-group/edit','toUpperCase','metadata','stringify','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','call','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','expect-business-group','path','modelCode','POST',',\x20actual\x20','value','ungrouped','name','sourceType','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','number','object','dbLinkId','expectBusinessGroup','--business-group\x20must\x20not\x20be\x20blank','32BUGXkM','1499185NbCyjt','dataset','METADATA','dbTableSelector','apiError','6oqDqVb','6872976tvFbxx','--business-group\x20is\x20required','source','DB_TABLE','length','datasetId','extend','87220MldPpV','validation','code','datasetCode','1189898qzwFLU','trim','data','tableName','str','/smartapi/dblink/updateTableBusinessGroup','636892AOwOSv','Expectation\x20mismatch\x20at\x20businessGroup','found','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','isFinite','string','db-table','businessGroup','Update\x20business\x20scenario\x20group','1305164yzaMdJ','1467OnQsSb','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','hasOwnProperty','matched','isArray','Expected\x20'];a66_0x1cc5=function(){return _0x48b1e1;};return a66_0x1cc5();}function buildBackendPlan(_0x1ae48b,_0x376b48,_0x3db769){const _0x6000d4=a66_0x24e1a2;if(_0x376b48[_0x6000d4(0x11e)]===_0x6000d4(0x12f)){if(!_0x376b48[_0x6000d4(0x129)]||_0x376b48[_0x6000d4(0x129)][_0x6000d4(0x122)]===null||!_0x376b48[_0x6000d4(0x129)][_0x6000d4(0x13a)])throw CliErrors[_0x6000d4(0x134)]('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.',_0x6000d4(0x115));return{'kind':_0x6000d4(0x143),'method':_0x6000d4(0x119),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x376b48[_0x6000d4(0x129)][_0x6000d4(0x122)],'tableName':_0x376b48[_0x6000d4(0x129)]['tableName'],'businessGroup':_0x3db769}};}return{'kind':_0x6000d4(0x111),'method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x1ae48b,'datasetCode':_0x376b48[_0x6000d4(0x135)],'businessGroup':_0x3db769}};}function normalizeBusinessGroup(_0x5ede07){const _0x5a4c77=a66_0x24e1a2;if(_0x5ede07===undefined||_0x5ede07===null)return'';return String(_0x5ede07)[_0x5a4c77(0x138)]();}function normalizeBusinessGroupArgument(_0x345629){const _0x468731=normalizeBusinessGroup(_0x345629);return _0x468731===UNGROUPED_BUSINESS_GROUP?'':_0x468731;}function displayBusinessGroup(_0x4be715){return _0x4be715||UNGROUPED_BUSINESS_GROUP;}function a66_0x20db(_0x2bb2fd,_0x476bda){_0x2bb2fd=_0x2bb2fd-0x102;const _0x1cc556=a66_0x1cc5();let _0x20dbf2=_0x1cc556[_0x2bb2fd];return _0x20dbf2;}function asPlainObject(_0x2cb67d){const _0x11f373=a66_0x24e1a2;if(!_0x2cb67d||typeof _0x2cb67d!==_0x11f373(0x121)||Array[_0x11f373(0x14b)](_0x2cb67d))return{};return _0x2cb67d;}function firstString(..._0x930255){const _0x2a6b94=a66_0x24e1a2;for(const _0x32fb84 of _0x930255){if(typeof _0x32fb84===_0x2a6b94(0x142)&&_0x32fb84[_0x2a6b94(0x138)]())return _0x32fb84[_0x2a6b94(0x138)]();if(typeof _0x32fb84===_0x2a6b94(0x120)&&Number[_0x2a6b94(0x141)](_0x32fb84))return String(_0x32fb84);}return undefined;}function firstNumber(..._0x4a8d9a){const _0x2adc71=a66_0x24e1a2;for(const _0x51ce68 of _0x4a8d9a){if(typeof _0x51ce68===_0x2adc71(0x120)&&Number['isFinite'](_0x51ce68))return _0x51ce68;if(typeof _0x51ce68===_0x2adc71(0x142)&&_0x51ce68[_0x2adc71(0x138)]()&&Number[_0x2adc71(0x141)](Number(_0x51ce68)))return Number(_0x51ce68);}return null;}function trim(_0x3080b9){const _0x32175b=a66_0x24e1a2;return String(_0x3080b9||'')[_0x32175b(0x138)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a67_0x59f7(_0x5369f7,_0x3ba4d4){_0x5369f7=_0x5369f7-0xd1;const _0x452106=a67_0x4521();let _0x59f7ba=_0x452106[_0x5369f7];return _0x59f7ba;}const a67_0x301b16=a67_0x59f7;function a67_0x4521(){const _0x427e08=['\x20business\x20group(s)\x20for\x20database\x20connection\x20','6889356GaALhb','dbid','read','25eAMECD','businessGroup','990536fbVxgv','Found\x20','751931vRcBGJ','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','242elpQlb','10318374DadDxm','map','ungrouped','number','length','5926hthZLq','570DVarAR','trim','994IUdfWs','DB_TABLE','num','999Zisotx','dataset','8pvDxTk','471290CJHLIv'];a67_0x4521=function(){return _0x427e08;};return a67_0x4521();}(function(_0x90a91c,_0x4a2efa){const _0xbeb2de=a67_0x59f7,_0x2af194=_0x90a91c();while(!![]){try{const _0x54518f=-parseInt(_0xbeb2de(0xe9))/0x1+-parseInt(_0xbeb2de(0xd7))/0x2*(-parseInt(_0xbeb2de(0xdd))/0x3)+-parseInt(_0xbeb2de(0xe7))/0x4*(parseInt(_0xbeb2de(0xe5))/0x5)+-parseInt(_0xbeb2de(0xd8))/0x6*(-parseInt(_0xbeb2de(0xda))/0x7)+-parseInt(_0xbeb2de(0xdf))/0x8*(-parseInt(_0xbeb2de(0xd2))/0x9)+parseInt(_0xbeb2de(0xe0))/0xa*(parseInt(_0xbeb2de(0xd1))/0xb)+-parseInt(_0xbeb2de(0xe2))/0xc;if(_0x54518f===_0x4a2efa)break;else _0x2af194['push'](_0x2af194['shift']());}catch(_0x3f2fcb){_0x2af194['push'](_0x2af194['shift']());}}}(a67_0x4521,0x9730f));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a67_0x301b16(0xde),'command':'business-groups','description':a67_0x301b16(0xea),'risk':a67_0x301b16(0xe4),'flags':[{'name':'dbid','type':a67_0x301b16(0xd5),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x17ae61){const _0x163a70=a67_0x301b16,_0x329373=_0x17ae61[_0x163a70(0xdc)](_0x163a70(0xe3)),_0x584162=await getErBusinessGroupSummary(_0x17ae61['appCode'],_0x329373),_0x3152de=_0x584162['groups'][_0x163a70(0xd3)](_0x157f80=>({..._0x157f80,'businessGroup':_0x157f80[_0x163a70(0xe6)][_0x163a70(0xd9)]()||_0x163a70(0xd4)}));return{'ok':!![],'data':{..._0x584162,'groups':_0x3152de,'scope':_0x163a70(0xdb)},'message':_0x163a70(0xe8)+_0x3152de[_0x163a70(0xd6)]+_0x163a70(0xe1)+_0x329373};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x1c5841=a68_0x5d83;(function(_0x2ed47d,_0x276728){const _0xbcec66=a68_0x5d83,_0x5eb512=_0x2ed47d();while(!![]){try{const _0x1e6ff7=parseInt(_0xbcec66(0x87))/0x1*(parseInt(_0xbcec66(0x83))/0x2)+parseInt(_0xbcec66(0x7a))/0x3+parseInt(_0xbcec66(0x68))/0x4*(-parseInt(_0xbcec66(0x72))/0x5)+parseInt(_0xbcec66(0x84))/0x6+-parseInt(_0xbcec66(0x7e))/0x7+-parseInt(_0xbcec66(0x82))/0x8+-parseInt(_0xbcec66(0x73))/0x9*(parseInt(_0xbcec66(0x6d))/0xa);if(_0x1e6ff7===_0x276728)break;else _0x5eb512['push'](_0x5eb512['shift']());}catch(_0x2f901a){_0x5eb512['push'](_0x5eb512['shift']());}}}(a68_0x5bb3,0x6820a));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a68_0x1c5841(0x6a),'filter':a68_0x1c5841(0x74),'getOne':a68_0x1c5841(0x86)};function a68_0x5d83(_0x25d0d5,_0x3d9bde){_0x25d0d5=_0x25d0d5-0x66;const _0x5bb38b=a68_0x5bb3();let _0x5d83ac=_0x5bb38b[_0x25d0d5];return _0x5d83ac;}export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x2026e){const _0x38512e=a68_0x1c5841;return _0x2026e==null?'':String(_0x2026e)[_0x38512e(0x79)]();}function getDatasetCode(_0x5c48e7){const _0x4bd95a=a68_0x1c5841;return valueToString(_0x5c48e7[_0x4bd95a(0x81)]??_0x5c48e7[_0x4bd95a(0x67)]??_0x5c48e7[_0x4bd95a(0x71)]?.[_0x4bd95a(0x70)]);}function getDatasetName(_0x291665){const _0x4bed45=a68_0x1c5841;return valueToString(_0x291665[_0x4bed45(0x85)]??_0x291665[_0x4bed45(0x71)]?.['datasetName'])||'unknown';}function getDatasetSource(_0x5b87d0){const _0x24717b=a68_0x1c5841;return valueToString(_0x5b87d0[_0x24717b(0x75)]??_0x5b87d0[_0x24717b(0x71)]?.[_0x24717b(0x78)])[_0x24717b(0x88)]();}function getDbtableConfig(_0x352c4a){const _0x3d8dc0=a68_0x1c5841,_0x3e9234=_0x352c4a[_0x3d8dc0(0x8b)]??_0x352c4a[_0x3d8dc0(0x76)];return _0x3e9234&&typeof _0x3e9234===_0x3d8dc0(0x89)?_0x3e9234:{};}export function isDbTableBackedDataset(_0x21f264){const _0x2f66e0=a68_0x1c5841,_0x14b950=getDatasetSource(_0x21f264);if(_0x14b950===_0x2f66e0(0x66))return![];const _0x222862=getDbtableConfig(_0x21f264),_0x38a651=_0x222862[_0x2f66e0(0x7b)]??_0x222862['id'],_0x461460=valueToString(_0x222862[_0x2f66e0(0x7c)]??_0x21f264[_0x2f66e0(0x7c)]??_0x21f264[_0x2f66e0(0x71)]?.[_0x2f66e0(0x7c)]);return _0x38a651!==undefined&&_0x38a651!==null&&_0x461460[_0x2f66e0(0x6f)]>0x0;}export function filterDbTableBackedDatasets(_0x229425){const _0x5e36fe=a68_0x1c5841;return _0x229425[_0x5e36fe(0x7d)](_0x16ab98=>isDbTableBackedDataset(_0x16ab98));}export function buildDbTableBackedRequirementMessage(_0x14b5f3,_0x2ec124=a68_0x1c5841(0x80)){const _0x20df99=a68_0x1c5841,_0x5e3458=getDatasetSource(_0x14b5f3)||_0x20df99(0x6b),_0x1145ad=getDatasetName(_0x14b5f3),_0x5b792d=getDatasetCode(_0x14b5f3),_0x5e1dfe=_0x5b792d?'\x20('+_0x5b792d+')':'';return['The\x20current\x20dataset\x20\x22'+_0x1145ad+'\x22'+_0x5e1dfe+_0x20df99(0x77)+_0x5e3458+'\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20'+_0x2ec124+'.','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.',_0x20df99(0x6c),_0x20df99(0x6e)+RUNTIME_DATA_ACCESS_COMMANDS[_0x20df99(0x7d)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x20df99(0x7f)]+'.'][_0x20df99(0x8a)]('\x20');}export function assertDatasetIsDbTableBacked(_0x19a62e,_0x503eb3){const _0x7de253=a68_0x1c5841;if(!isDbTableBackedDataset(_0x19a62e))throw CliErrors[_0x7de253(0x69)](buildDbTableBackedRequirementMessage(_0x19a62e,_0x503eb3));}function a68_0x5bb3(){const _0x33b3bd=['4628092dTANBC','getOne','SQL\x20schema\x20validation','code','4752096xFuzqX','4JwJlZb','5078952PRQlAn','name','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','181658ehhdsy','toUpperCase','object','join','dbtableConfig','METADATA','modelCode','28TqvIqy','validation','lovrabet','UNKNOWN','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','50870VekmwZ','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','length','datasetCode','dataset','127475mgtmJF','18eBsuNy','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','source','dbtable','\x20is\x20','sourceType','trim','1981515WnZnXl','dbId','tableName','filter'];a68_0x5bb3=function(){return _0x33b3bd;};return a68_0x5bb3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x32a5ad=a69_0x4df2;(function(_0x311138,_0x16426b){const _0x7ebea7=a69_0x4df2,_0x5c9972=_0x311138();while(!![]){try{const _0x72ed0b=parseInt(_0x7ebea7(0x1f0))/0x1*(-parseInt(_0x7ebea7(0x1f6))/0x2)+-parseInt(_0x7ebea7(0x1e9))/0x3*(-parseInt(_0x7ebea7(0x1f8))/0x4)+parseInt(_0x7ebea7(0x1f7))/0x5*(-parseInt(_0x7ebea7(0x1ed))/0x6)+-parseInt(_0x7ebea7(0x1eb))/0x7*(-parseInt(_0x7ebea7(0x1e8))/0x8)+parseInt(_0x7ebea7(0x1f9))/0x9*(parseInt(_0x7ebea7(0x1f2))/0xa)+parseInt(_0x7ebea7(0x1ea))/0xb*(parseInt(_0x7ebea7(0x1f3))/0xc)+parseInt(_0x7ebea7(0x1ec))/0xd;if(_0x72ed0b===_0x16426b)break;else _0x5c9972['push'](_0x5c9972['shift']());}catch(_0x2a79d6){_0x5c9972['push'](_0x5c9972['shift']());}}}(a69_0x5bf5,0x1c7dc));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_0x4df2(_0x3ec7e0,_0x23fac0){_0x3ec7e0=_0x3ec7e0-0x1e8;const _0x5bf55e=a69_0x5bf5();let _0x4df2e9=_0x5bf55e[_0x3ec7e0];return _0x4df2e9;}export const datasetCrossRelationCreate={'service':a69_0x32a5ad(0x1f5),'command':a69_0x32a5ad(0x1f4),'description':a69_0x32a5ad(0x1f1),'risk':a69_0x32a5ad(0x1ef),'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 _0x1ffde3=>validateCrossRelation(_0x1ffde3,'create'),'dryRun':_0x38e691=>previewCrossRelation(_0x38e691,a69_0x32a5ad(0x1ee)),'execute':_0xacd611=>executeCrossRelation(_0xacd611,a69_0x32a5ad(0x1ee),createCrossDbRelation)};function a69_0x5bf5(){const _0x42c991=['create','write','2yJORVn','Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','140OxpTNS','24uBEWLF','cross-relation-create','dataset','168360OuOWgj','532965bWVnjo','88KLTpMF','62244xmgEcY','8XrfJmg','12516LtgaWK','443168bTQvtK','285404mDHpOd','1062061ZJkRNo','6aakyJt'];a69_0x5bf5=function(){return _0x42c991;};return a69_0x5bf5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x27cc06=a70_0x5973;(function(_0x5599f7,_0x48b0b3){const _0x2e9e5a=a70_0x5973,_0x32f9b9=_0x5599f7();while(!![]){try{const _0x2bca9b=parseInt(_0x2e9e5a(0x1b2))/0x1*(-parseInt(_0x2e9e5a(0x1ba))/0x2)+parseInt(_0x2e9e5a(0x1c1))/0x3*(-parseInt(_0x2e9e5a(0x1b4))/0x4)+-parseInt(_0x2e9e5a(0x1b3))/0x5*(-parseInt(_0x2e9e5a(0x1bb))/0x6)+-parseInt(_0x2e9e5a(0x1be))/0x7*(-parseInt(_0x2e9e5a(0x1bf))/0x8)+parseInt(_0x2e9e5a(0x1c0))/0x9+parseInt(_0x2e9e5a(0x1b7))/0xa*(-parseInt(_0x2e9e5a(0x1b6))/0xb)+-parseInt(_0x2e9e5a(0x1b8))/0xc*(-parseInt(_0x2e9e5a(0x1bd))/0xd);if(_0x2bca9b===_0x48b0b3)break;else _0x32f9b9['push'](_0x32f9b9['shift']());}catch(_0x3f5efa){_0x32f9b9['push'](_0x32f9b9['shift']());}}}(a70_0x11f8,0x72985));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';function a70_0x5973(_0x20a0f6,_0x5aa7dd){_0x20a0f6=_0x20a0f6-0x1b2;const _0x11f8ae=a70_0x11f8();let _0x597319=_0x11f8ae[_0x20a0f6];return _0x597319;}function a70_0x11f8(){const _0x14e0e4=['235830SUIDpg','24fSOzpb','492678yIURuw','210978ZloCtm','446014vxsmvM','33840ghHhSg','52vNvdux','Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','5269UZPqBu','8340bWcGYg','4156404QCYJHY','delete','4xURhlr','84CNUfMZ','dataset','91ZRLQnJ'];a70_0x11f8=function(){return _0x14e0e4;};return a70_0x11f8();}import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationDelete={'service':a70_0x27cc06(0x1bc),'command':'cross-relation-delete','description':a70_0x27cc06(0x1b5),'risk':'high-risk-write','strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x4e7b21=>validateCrossRelation(_0x4e7b21,'delete'),'dryRun':_0x106b4d=>previewCrossRelation(_0x106b4d,a70_0x27cc06(0x1b9)),'execute':_0xadd66d=>executeCrossRelation(_0xadd66d,'delete',deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x3e9db4=a71_0x5eab;(function(_0x5a765b,_0x27a7a0){const _0x4dbdde=a71_0x5eab,_0x5ad4d8=_0x5a765b();while(!![]){try{const _0x7ac38=parseInt(_0x4dbdde(0x132))/0x1*(parseInt(_0x4dbdde(0x126))/0x2)+parseInt(_0x4dbdde(0x12a))/0x3+-parseInt(_0x4dbdde(0x123))/0x4*(parseInt(_0x4dbdde(0x124))/0x5)+parseInt(_0x4dbdde(0x131))/0x6+-parseInt(_0x4dbdde(0x12c))/0x7*(parseInt(_0x4dbdde(0x133))/0x8)+parseInt(_0x4dbdde(0x128))/0x9+-parseInt(_0x4dbdde(0x130))/0xa*(-parseInt(_0x4dbdde(0x12d))/0xb);if(_0x7ac38===_0x27a7a0)break;else _0x5ad4d8['push'](_0x5ad4d8['shift']());}catch(_0xf7c605){_0x5ad4d8['push'](_0x5ad4d8['shift']());}}}(a71_0x17bd,0xc3a8b));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';function a71_0x5eab(_0x317ead,_0x1bf148){_0x317ead=_0x317ead-0x123;const _0x17bdce=a71_0x17bd();let _0x5eab87=_0x17bdce[_0x317ead];return _0x5eab87;}import{projectCrossRelation,resolveCrossRelationQuery,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';function a71_0x17bd(){const _0x57d4fe=['Cross-database\x20relations:\x20','4633230McXExf','length','2557891enQJmg','66wgaORU','map','dataset','508700MTOjLo','73914EfBirg','96891oLhFbz','32LhPgMp','appCode','4872564XLwrof','5FjIVAF','list','14ZbQSsa','cross-relation-list','8469234vPlHIu'];a71_0x17bd=function(){return _0x57d4fe;};return a71_0x17bd();}export const datasetCrossRelationList={'service':a71_0x3e9db4(0x12f),'command':a71_0x3e9db4(0x127),'description':'List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','risk':'read','strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[{...CROSS_RELATION_FROM_DATASET_FLAG,'required':![]},CROSS_RELATION_DBLINK_FLAG,{...CROSS_RELATION_FROM_COLUMN_FLAG,'required':![]},APPCODE_FLAG_OPTIONAL],'validate':async _0xbfdb4f=>validateCrossRelation(_0xbfdb4f,a71_0x3e9db4(0x125)),async 'execute'(_0x3b3437){const _0x2e1ef9=a71_0x3e9db4,_0x4509a7=await resolveCrossRelationQuery(_0x3b3437),_0x40c33e=await queryCrossDbRelations(_0x4509a7);return{'ok':!![],'data':{'appCode':_0x3b3437[_0x2e1ef9(0x134)],'selector':_0x4509a7,'total':_0x40c33e[_0x2e1ef9(0x12b)],'relations':_0x40c33e[_0x2e1ef9(0x12e)](projectCrossRelation)},'message':_0x2e1ef9(0x129)+_0x40c33e[_0x2e1ef9(0x12b)]+'\x20relation(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a72_0x24270a=a72_0x4aef;(function(_0x257457,_0x417433){const _0x52846d=a72_0x4aef,_0x1ae2a5=_0x257457();while(!![]){try{const _0x5abf65=parseInt(_0x52846d(0x1f7))/0x1*(parseInt(_0x52846d(0x216))/0x2)+-parseInt(_0x52846d(0x1fa))/0x3*(-parseInt(_0x52846d(0x1f0))/0x4)+parseInt(_0x52846d(0x232))/0x5+-parseInt(_0x52846d(0x221))/0x6*(parseInt(_0x52846d(0x1f3))/0x7)+-parseInt(_0x52846d(0x218))/0x8*(-parseInt(_0x52846d(0x1ed))/0x9)+parseInt(_0x52846d(0x1f8))/0xa+-parseInt(_0x52846d(0x234))/0xb;if(_0x5abf65===_0x417433)break;else _0x1ae2a5['push'](_0x1ae2a5['shift']());}catch(_0x378a43){_0x1ae2a5['push'](_0x1ae2a5['shift']());}}}(a72_0x5049,0x9f096));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(_0x28307d,_0xd5ccf8){const _0x130796=a72_0x4aef,_0x36543b=_0x28307d['str'](_0xd5ccf8)[_0x130796(0x21e)]();if(!_0x36543b)throw CliErrors[_0x130796(0x1de)](_0xd5ccf8);return _0x36543b;}function explicitDblink(_0x484da9){const _0x12bdd9=a72_0x4aef,_0x53bd20=_0x484da9['flag']('from-dblink-id');if(_0x53bd20===undefined||_0x53bd20===null)return undefined;const _0x46e7b6=Number(_0x53bd20);if(!Number[_0x12bdd9(0x1e5)](_0x46e7b6)||_0x46e7b6<=0x0)throw CliErrors['validation'](_0x12bdd9(0x22c));return _0x46e7b6;}export function validateCrossRelation(_0x4feb67,_0x1bb472){const _0x956619=a72_0x4aef,_0x1dc70c=explicitDblink(_0x4feb67);if(_0x1bb472===_0x956619(0x1e6)){if(!_0x4feb67['str'](_0x956619(0x222))['trim']()&&_0x1dc70c===undefined)throw CliErrors['validation'](_0x956619(0x1fd));return;}required(_0x4feb67,_0x956619(0x222)),required(_0x4feb67,_0x956619(0x208));if(_0x1bb472!==_0x956619(0x20b)){required(_0x4feb67,'to-datasetcode'),required(_0x4feb67,_0x956619(0x214));const _0x5f0746=_0x4feb67[_0x956619(0x220)]('cardinality')[_0x956619(0x21e)]();if(_0x5f0746&&!CROSS_RELATION_CARDINALITY_FLAG[_0x956619(0x235)]['includes'](_0x5f0746))throw CliErrors[_0x956619(0x1f9)]('Invalid\x20--cardinality.');}}async function resolveEndpoint(_0x29c645){const _0x150dcc=a72_0x4aef,_0xb0cd05=await getDatasetDetail(_0x29c645),_0x2bd37b=_0xb0cd05?.['dataset']??{};if((_0xb0cd05?.[_0x150dcc(0x1e2)]??_0x2bd37b['sourceType'])!=='DB_TABLE')throw CliErrors[_0x150dcc(0x1f9)]('Dataset\x20'+_0x29c645+_0x150dcc(0x202));const _0x4aee0b=_0xb0cd05[_0x150dcc(0x205)]??_0xb0cd05[_0x150dcc(0x211)]??{};let _0x20c794=_0xb0cd05[_0x150dcc(0x20c)]??_0x2bd37b[_0x150dcc(0x20c)]??{};if(typeof _0x20c794===_0x150dcc(0x21c))try{_0x20c794=_0x20c794[_0x150dcc(0x21e)]()?JSON[_0x150dcc(0x22b)](_0x20c794):{};}catch{throw CliErrors['validation'](_0x150dcc(0x226)+_0x29c645+_0x150dcc(0x1ec));}const _0x175362=Number(_0x20c794?.[_0x150dcc(0x1f2)]?.[_0x150dcc(0x1f1)]??_0xb0cd05[_0x150dcc(0x1f2)]?.[_0x150dcc(0x1f1)]??_0x2bd37b[_0x150dcc(0x1f2)]?.[_0x150dcc(0x1f1)]??_0x4aee0b[_0x150dcc(0x1f1)]??_0x2bd37b[_0x150dcc(0x1f1)]??_0xb0cd05[_0x150dcc(0x1f1)]),_0x89590a=String(_0xb0cd05[_0x150dcc(0x20f)]??_0x2bd37b[_0x150dcc(0x20f)]??_0x4aee0b['tableName']??'')[_0x150dcc(0x21e)]();if(!Number[_0x150dcc(0x1e5)](_0x175362)||_0x175362<=0x0||!_0x89590a)throw CliErrors[_0x150dcc(0x1f9)](_0x150dcc(0x226)+_0x29c645+_0x150dcc(0x206));return{'datasetCode':_0x29c645,'dblinkId':_0x175362,'table':_0x89590a};}export async function resolveCrossRelationQuery(_0xe473e9){const _0x58ec6c=a72_0x4aef,_0x41f677=_0xe473e9[_0x58ec6c(0x220)](_0x58ec6c(0x222))[_0x58ec6c(0x21e)](),_0x59bb5e=explicitDblink(_0xe473e9),_0x3be152=_0x41f677?await resolveEndpoint(_0x41f677):undefined;if(_0x3be152&&_0x59bb5e!==undefined&&_0x3be152[_0x58ec6c(0x1f5)]!==_0x59bb5e)throw CliErrors[_0x58ec6c(0x1f9)](_0x58ec6c(0x20d));const _0x555372=_0x3be152?.[_0x58ec6c(0x1f5)]??_0x59bb5e;if(_0x555372===undefined)throw CliErrors['validation'](_0x58ec6c(0x1fd));return{'appCode':_0xe473e9[_0x58ec6c(0x233)],'fromDblinkId':_0x555372,..._0x41f677?{'fromDatasetCode':_0x41f677}:{},..._0xe473e9[_0x58ec6c(0x220)]('from-column')[_0x58ec6c(0x21e)]()?{'fromField':_0xe473e9[_0x58ec6c(0x220)](_0x58ec6c(0x208))[_0x58ec6c(0x21e)]()}:{}};}export function projectCrossRelation(_0x25d4f4){const _0x1d5a13=a72_0x4aef;return{'relationId':_0x25d4f4[_0x1d5a13(0x230)],'from':{'source':_0x1d5a13(0x212),'datasetCode':_0x25d4f4[_0x1d5a13(0x229)],'datasetName':_0x25d4f4[_0x1d5a13(0x1fe)],'dblinkId':_0x25d4f4['fromDblinkId'],'table':_0x25d4f4[_0x1d5a13(0x21d)],'field':_0x25d4f4[_0x1d5a13(0x217)]},'to':{'source':_0x1d5a13(0x212),'datasetCode':_0x25d4f4[_0x1d5a13(0x20e)],'datasetName':_0x25d4f4[_0x1d5a13(0x223)],'dblinkId':_0x25d4f4[_0x1d5a13(0x21a)],'table':_0x25d4f4[_0x1d5a13(0x1fc)],'field':_0x25d4f4[_0x1d5a13(0x1e9)],'labelField':_0x25d4f4[_0x1d5a13(0x201)]},'relation':{'cardinality':_0x25d4f4[_0x1d5a13(0x204)],'relationType':_0x25d4f4[_0x1d5a13(0x1ff)]}};}function ambiguity(_0x5ce933){const _0x39017c=a72_0x4aef,_0x223e1d=CliErrors[_0x39017c(0x1f9)]('Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.',_0x39017c(0x1e0));return Object[_0x39017c(0x1ee)](_0x223e1d,_0x39017c(0x22e),{'value':{'candidates':_0x5ce933[_0x39017c(0x210)](projectCrossRelation)}}),_0x223e1d;}function a72_0x5049(){const _0x497499=['str','114PUQxlt','from-datasetcode','toDatasetName','Would\x20','length','Dataset\x20','toLowerCase','expectedLabel','fromDatasetCode','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','parse','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','data','from','relationId','POST','2026370itUHDN','appCode','25650537AfaOxv','enum','\x20verified.','flagMissing','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.','includes','source','\x20write\x20was\x20not\x20verified.','label_inherited','isSafeInteger','list','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','expectedCardinality','toField','before','catch','\x20has\x20invalid\x20storage\x20configuration.','9ZjmOZQ','defineProperty','filter','24SeVgsE','dbId','storageProfile','416318MAPWmA','Cross-database\x20relation\x20','dblinkId','\x20a\x20cross-database\x20relation\x20for\x20','884267PBpiQM','5968420vRjIkC','validation','613641dfGknV','table','toTableName','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','fromDatasetName','relationType','multiple\x20cross-database\x20relations\x20matched','refTableLabelName','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','some','cardinality','dbtableConfig','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','datasetCode','from-column','unconfirmed','to-label-column','delete','extend','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','toDatasetCode','tableName','map','dbtable','DB_TABLE','create','to-column','query','2kvaOtp','fromField','7996976MjzZJP','update','toDblinkId','body','string','fromTableName','trim','apiError'];a72_0x5049=function(){return _0x497499;};return a72_0x5049();}function a72_0x4aef(_0x358b23,_0x360402){_0x358b23=_0x358b23-0x1de;const _0x50499c=a72_0x5049();let _0x4aef57=_0x50499c[_0x358b23];return _0x4aef57;}const sameName=(_0x390321,_0x54b8b0)=>_0x390321[a72_0x24270a(0x227)]()===_0x54b8b0[a72_0x24270a(0x227)]();function matchesEndpoint(_0x307098,_0x500772,_0x152660,_0x147277,_0x1fa4ce){const _0x1711e7=a72_0x24270a;return _0x307098['fromDblinkId']===_0x500772[_0x1711e7(0x1f5)]&&sameName(_0x307098[_0x1711e7(0x21d)],_0x500772['table'])&&sameName(_0x307098[_0x1711e7(0x217)],_0x152660)&&_0x307098[_0x1711e7(0x21a)]===_0x147277[_0x1711e7(0x1f5)]&&sameName(_0x307098['toTableName'],_0x147277[_0x1711e7(0x1fb)])&&sameName(_0x307098[_0x1711e7(0x1e9)],_0x1fa4ce);}export async function prepareCrossRelation(_0x400292,_0x2e7b1e){const _0x151c54=a72_0x24270a,_0xbfc6b0=await resolveEndpoint(required(_0x400292,_0x151c54(0x222))),_0x1fd035=explicitDblink(_0x400292);if(_0x1fd035!==undefined&&_0xbfc6b0[_0x151c54(0x1f5)]!==_0x1fd035)throw CliErrors[_0x151c54(0x1f9)](_0x151c54(0x20d));const _0x895d13={'appCode':_0x400292[_0x151c54(0x233)],'fromDatasetCode':_0xbfc6b0[_0x151c54(0x207)],'fromField':required(_0x400292,_0x151c54(0x208)),..._0x1fd035!==undefined?{'fromDblinkId':_0x1fd035}:{}},_0x28b69a={'appCode':_0x400292[_0x151c54(0x233)],'fromDblinkId':_0xbfc6b0[_0x151c54(0x1f5)],'fromDatasetCode':_0xbfc6b0[_0x151c54(0x207)],'fromField':_0x895d13[_0x151c54(0x217)]},_0x2e840e=await queryCrossDbRelations(_0x28b69a);let _0x301679=null;if(_0x2e7b1e!==_0x151c54(0x213)){if(_0x2e840e[_0x151c54(0x225)]>0x1)throw ambiguity(_0x2e840e);_0x301679=_0x2e840e[0x0]??null;if(!_0x301679)throw CliErrors[_0x151c54(0x1f9)]('Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.');}if(_0x2e7b1e===_0x151c54(0x20b))return{'operation':_0x2e7b1e,'from':_0xbfc6b0,'query':_0x28b69a,'body':_0x895d13,'before':_0x301679};const _0x1ae1fd=await resolveEndpoint(required(_0x400292,'to-datasetcode'));if(_0xbfc6b0[_0x151c54(0x1f5)]===_0x1ae1fd[_0x151c54(0x1f5)])throw CliErrors[_0x151c54(0x1f9)](_0x151c54(0x1df));const _0x5f01f7=_0x400292['str'](_0x151c54(0x20a))[_0x151c54(0x21e)](),_0x129213=_0x400292[_0x151c54(0x220)](_0x151c54(0x204))[_0x151c54(0x21e)](),_0xcd5c85={..._0x895d13,'toDatasetCode':_0x1ae1fd[_0x151c54(0x207)],'toField':required(_0x400292,_0x151c54(0x214)),..._0x5f01f7?{'refTableLabelName':_0x5f01f7}:{},..._0x129213?{'cardinality':_0x129213}:{}};if(_0x2e840e[_0x151c54(0x203)](_0x4b139c=>_0x4b139c[_0x151c54(0x230)]!==_0x301679?.[_0x151c54(0x230)]&&matchesEndpoint(_0x4b139c,_0xbfc6b0,_0xcd5c85[_0x151c54(0x217)],_0x1ae1fd,_0xcd5c85[_0x151c54(0x1e9)])))throw CliErrors[_0x151c54(0x1f9)](_0x151c54(0x22d));return{'operation':_0x2e7b1e,'from':_0xbfc6b0,'to':_0x1ae1fd,'query':_0x28b69a,'body':_0xcd5c85,'before':_0x301679,'expectedLabel':_0x5f01f7||_0x301679?.[_0x151c54(0x201)]||_0xcd5c85[_0x151c54(0x1e9)],'expectedCardinality':_0x129213||_0x301679?.['cardinality']||null};}function mutationData(_0x43ef9a,_0x42d323,_0x319729){const _0x10957c=a72_0x24270a,{operation:_0x2ed4df,body:_0x4c6630,before:_0xf9dcc2}=_0x43ef9a;return{'operation':_0x2ed4df,'selector':{'appCode':_0x4c6630['appCode'],'from':{'datasetCode':_0x4c6630[_0x10957c(0x229)],'field':_0x4c6630[_0x10957c(0x217)],'dblinkId':_0x43ef9a[_0x10957c(0x22f)][_0x10957c(0x1f5)]}},'before':_0xf9dcc2?projectCrossRelation(_0xf9dcc2):null,'after':_0x319729,'dryRun':_0x42d323,'backend':{'method':_0x10957c(0x231),'path':CROSS_DB_RELATION_PATHS[_0x2ed4df]},'warnings':_0x2ed4df===_0x10957c(0x219)&&!_0x4c6630[_0x10957c(0x201)]?[{'code':_0x10957c(0x1e4),'message':_0x10957c(0x22a)}]:[]};}export async function previewCrossRelation(_0xb7c23e,_0x392067){const _0x1e6f11=a72_0x24270a,_0x247af2=await prepareCrossRelation(_0xb7c23e,_0x392067),_0xfbe61f=_0x247af2['body'],_0x267377=_0x392067===_0x1e6f11(0x20b)?null:{..._0x247af2[_0x1e6f11(0x1ea)]?{'relationId':_0x247af2[_0x1e6f11(0x1ea)][_0x1e6f11(0x230)]}:{},'from':{'datasetCode':_0x247af2['from'][_0x1e6f11(0x207)],'dblinkId':_0x247af2['from'][_0x1e6f11(0x1f5)],'table':_0x247af2[_0x1e6f11(0x22f)][_0x1e6f11(0x1fb)],'field':_0xfbe61f[_0x1e6f11(0x217)]},'to':{'datasetCode':_0x247af2['to'][_0x1e6f11(0x207)],'dblinkId':_0x247af2['to'][_0x1e6f11(0x1f5)],'table':_0x247af2['to'][_0x1e6f11(0x1fb)],'field':_0xfbe61f[_0x1e6f11(0x1e9)],'labelField':_0x247af2[_0x1e6f11(0x228)]},'relation':{'cardinality':_0x247af2[_0x1e6f11(0x1e8)],'relationType':0x2}};return{...mutationData(_0x247af2,!![],null),'after':_0x267377,'method':_0x1e6f11(0x231),'url':CROSS_DB_RELATION_PATHS[_0x392067],'body':_0x247af2[_0x1e6f11(0x21b)],'description':_0x1e6f11(0x224)+_0x392067+_0x1e6f11(0x1f6)+_0xfbe61f[_0x1e6f11(0x229)]+'.'+_0xfbe61f['fromField']};}export async function executeCrossRelation(_0x5f5b07,_0x32eeeb,_0x12e756){const _0x3f2f6c=a72_0x24270a,_0x3593df=await prepareCrossRelation(_0x5f5b07,_0x32eeeb);try{await _0x12e756(_0x3593df['body']);}catch(_0x1297db){if(_0x1297db instanceof CliError&&_0x1297db['message'][_0x3f2f6c(0x1e1)](_0x3f2f6c(0x200))){const _0x59315e=await queryCrossDbRelations(_0x3593df[_0x3f2f6c(0x215)])[_0x3f2f6c(0x1eb)](()=>[]);throw ambiguity(_0x59315e);}throw _0x1297db;}let _0x315865=[],_0x42defd,_0x1c3699=![];try{_0x315865=await queryCrossDbRelations(_0x3593df['query']);if(_0x32eeeb===_0x3f2f6c(0x20b))_0x1c3699=!_0x315865[_0x3f2f6c(0x203)](_0x497955=>_0x497955[_0x3f2f6c(0x230)]===_0x3593df[_0x3f2f6c(0x1ea)][_0x3f2f6c(0x230)]);else{const _0x9f55b9=_0x3593df[_0x3f2f6c(0x21b)],_0x535588=_0x315865[_0x3f2f6c(0x1ef)](_0xf1ca17=>matchesEndpoint(_0xf1ca17,_0x3593df[_0x3f2f6c(0x22f)],_0x9f55b9[_0x3f2f6c(0x217)],_0x3593df['to'],_0x9f55b9[_0x3f2f6c(0x1e9)])&&(_0x32eeeb===_0x3f2f6c(0x213)||_0xf1ca17[_0x3f2f6c(0x230)]===_0x3593df[_0x3f2f6c(0x1ea)][_0x3f2f6c(0x230)]));_0x42defd=_0x535588[_0x3f2f6c(0x225)]===0x1?_0x535588[0x0]:undefined,_0x1c3699=!!_0x42defd&&_0x42defd[_0x3f2f6c(0x201)]===_0x3593df[_0x3f2f6c(0x228)]&&_0x42defd[_0x3f2f6c(0x204)]===_0x3593df[_0x3f2f6c(0x1e8)]&&_0x42defd['relationType']===0x2;}}catch{}const _0x5f2afb={...mutationData(_0x3593df,![],_0x42defd?projectCrossRelation(_0x42defd):null),'verification':{'status':_0x1c3699?'matched':_0x3f2f6c(0x209),'verified':_0x1c3699}};if(!_0x1c3699){const _0x35517b=CliErrors[_0x3f2f6c(0x21f)](_0x3f2f6c(0x1f4)+_0x32eeeb+_0x3f2f6c(0x1e3),_0x3f2f6c(0x1e7));Object['defineProperty'](_0x35517b,_0x3f2f6c(0x22e),{'value':{..._0x5f2afb,'candidates':_0x315865[_0x3f2f6c(0x210)](projectCrossRelation)}});throw _0x35517b;}return{'ok':!![],'data':_0x5f2afb,'message':'Cross-database\x20relation\x20'+_0x32eeeb+_0x3f2f6c(0x236)};}
|
|
1
|
+
const a72_0x40c5aa=a72_0x5118;(function(_0x5252a5,_0x2643c0){const _0x18ea9b=a72_0x5118,_0x5649cc=_0x5252a5();while(!![]){try{const _0x46a760=-parseInt(_0x18ea9b(0x16e))/0x1*(-parseInt(_0x18ea9b(0x17f))/0x2)+-parseInt(_0x18ea9b(0x180))/0x3*(parseInt(_0x18ea9b(0x159))/0x4)+-parseInt(_0x18ea9b(0x19f))/0x5+parseInt(_0x18ea9b(0x168))/0x6*(-parseInt(_0x18ea9b(0x192))/0x7)+-parseInt(_0x18ea9b(0x17a))/0x8+parseInt(_0x18ea9b(0x15b))/0x9*(parseInt(_0x18ea9b(0x178))/0xa)+parseInt(_0x18ea9b(0x1a1))/0xb;if(_0x46a760===_0x2643c0)break;else _0x5649cc['push'](_0x5649cc['shift']());}catch(_0x5e5efa){_0x5649cc['push'](_0x5649cc['shift']());}}}(a72_0x3676,0xc4b08));import{getDatasetDetail,queryCrossDbRelations}from'../../core/api-client.js';import{CROSS_DB_RELATION_PATHS}from'../../core/cross-db-relation.js';import{CliError,CliErrors}from'../../errors.js';import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0xbf2ff5,_0x3726e9){const _0x1a5cb9=a72_0x5118,_0xbb3b5b=_0xbf2ff5[_0x1a5cb9(0x15d)](_0x3726e9)[_0x1a5cb9(0x1a2)]();if(!_0xbb3b5b)throw CliErrors[_0x1a5cb9(0x158)](_0x3726e9);return _0xbb3b5b;}function explicitDblink(_0x370f33){const _0x24ff6a=a72_0x5118,_0x1a965d=_0x370f33['flag'](_0x24ff6a(0x197));if(_0x1a965d===undefined||_0x1a965d===null)return undefined;const _0x4eb89d=Number(_0x1a965d);if(!Number[_0x24ff6a(0x198)](_0x4eb89d)||_0x4eb89d<=0x0)throw CliErrors[_0x24ff6a(0x170)](_0x24ff6a(0x164));return _0x4eb89d;}export function validateCrossRelation(_0x15029b,_0x440bc4){const _0x1bb325=a72_0x5118,_0x5586d1=explicitDblink(_0x15029b);if(_0x440bc4===_0x1bb325(0x16b)){if(!_0x15029b[_0x1bb325(0x15d)](_0x1bb325(0x1a4))[_0x1bb325(0x1a2)]()&&_0x5586d1===undefined)throw CliErrors[_0x1bb325(0x170)]('Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.');return;}required(_0x15029b,_0x1bb325(0x1a4)),required(_0x15029b,'from-column');if(_0x440bc4!==_0x1bb325(0x196)){required(_0x15029b,_0x1bb325(0x183)),required(_0x15029b,_0x1bb325(0x160));const _0x16da5f=_0x15029b[_0x1bb325(0x15d)](_0x1bb325(0x182))[_0x1bb325(0x1a2)]();if(_0x16da5f&&!CROSS_RELATION_CARDINALITY_FLAG['enum'][_0x1bb325(0x16a)](_0x16da5f))throw CliErrors[_0x1bb325(0x170)](_0x1bb325(0x17b));}}async function resolveEndpoint(_0x56ef48){const _0x159389=a72_0x5118,_0x55bacf=await getDatasetDetail(_0x56ef48),_0x117cb5=_0x55bacf?.[_0x159389(0x18a)]??{};if((_0x55bacf?.['source']??_0x117cb5['sourceType'])!=='DB_TABLE')throw CliErrors[_0x159389(0x170)](_0x159389(0x17e)+_0x56ef48+'\x20must\x20be\x20a\x20DB_TABLE\x20dataset.');const _0x3caa24=_0x55bacf['dbtableConfig']??_0x55bacf[_0x159389(0x19b)]??{};let _0x2d4beb=_0x55bacf[_0x159389(0x18c)]??_0x117cb5[_0x159389(0x18c)]??{};if(typeof _0x2d4beb===_0x159389(0x167))try{_0x2d4beb=_0x2d4beb[_0x159389(0x1a2)]()?JSON[_0x159389(0x15a)](_0x2d4beb):{};}catch{throw CliErrors[_0x159389(0x170)](_0x159389(0x17e)+_0x56ef48+_0x159389(0x1a3));}const _0x1135aa=Number(_0x2d4beb?.[_0x159389(0x173)]?.[_0x159389(0x17d)]??_0x55bacf[_0x159389(0x173)]?.[_0x159389(0x17d)]??_0x117cb5[_0x159389(0x173)]?.[_0x159389(0x17d)]??_0x3caa24[_0x159389(0x17d)]??_0x117cb5[_0x159389(0x17d)]??_0x55bacf[_0x159389(0x17d)]),_0x4dd439=String(_0x55bacf[_0x159389(0x19c)]??_0x117cb5['tableName']??_0x3caa24[_0x159389(0x19c)]??'')['trim']();if(!Number[_0x159389(0x198)](_0x1135aa)||_0x1135aa<=0x0||!_0x4dd439)throw CliErrors['validation'](_0x159389(0x17e)+_0x56ef48+_0x159389(0x176));return{'datasetCode':_0x56ef48,'dblinkId':_0x1135aa,'table':_0x4dd439};}export async function resolveCrossRelationQuery(_0x4c8e05){const _0x52c7f6=a72_0x5118,_0x54b196=_0x4c8e05[_0x52c7f6(0x15d)](_0x52c7f6(0x1a4))[_0x52c7f6(0x1a2)](),_0x57c6c0=explicitDblink(_0x4c8e05),_0x554440=_0x54b196?await resolveEndpoint(_0x54b196):undefined;if(_0x554440&&_0x57c6c0!==undefined&&_0x554440[_0x52c7f6(0x19e)]!==_0x57c6c0)throw CliErrors[_0x52c7f6(0x170)](_0x52c7f6(0x162));const _0x1ede78=_0x554440?.[_0x52c7f6(0x19e)]??_0x57c6c0;if(_0x1ede78===undefined)throw CliErrors[_0x52c7f6(0x170)](_0x52c7f6(0x1a6));return{'appCode':_0x4c8e05[_0x52c7f6(0x191)],'fromDblinkId':_0x1ede78,..._0x54b196?{'fromDatasetCode':_0x54b196}:{},..._0x4c8e05['str'](_0x52c7f6(0x172))[_0x52c7f6(0x1a2)]()?{'fromField':_0x4c8e05[_0x52c7f6(0x15d)](_0x52c7f6(0x172))['trim']()}:{}};}export function projectCrossRelation(_0x2c383e){const _0x1d330c=a72_0x5118;return{'relationId':_0x2c383e[_0x1d330c(0x184)],'from':{'source':_0x1d330c(0x1a5),'datasetCode':_0x2c383e[_0x1d330c(0x18b)],'datasetName':_0x2c383e[_0x1d330c(0x18f)],'dblinkId':_0x2c383e['fromDblinkId'],'table':_0x2c383e[_0x1d330c(0x19a)],'field':_0x2c383e[_0x1d330c(0x187)]},'to':{'source':'DB_TABLE','datasetCode':_0x2c383e['toDatasetCode'],'datasetName':_0x2c383e[_0x1d330c(0x157)],'dblinkId':_0x2c383e['toDblinkId'],'table':_0x2c383e[_0x1d330c(0x195)],'field':_0x2c383e[_0x1d330c(0x177)],'labelField':_0x2c383e[_0x1d330c(0x199)]},'relation':{'cardinality':_0x2c383e[_0x1d330c(0x182)],'relationType':_0x2c383e[_0x1d330c(0x161)]}};}function a72_0x3676(){const _0x1c21b4=['filter','fromField','from','expectedLabel','dataset','fromDatasetCode','extend','query','length','fromDatasetName','expectedCardinality','appCode','3241fTLHJv','toLowerCase','table','toTableName','delete','from-dblink-id','isSafeInteger','refTableLabelName','fromTableName','dbtable','tableName','some','dblinkId','7839110vZyEce','before','47689565AFUDtr','trim','\x20has\x20invalid\x20storage\x20configuration.','from-datasetcode','DB_TABLE','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','map','toDblinkId','\x20write\x20was\x20not\x20verified.','toDatasetName','flagMissing','52rJgkiv','parse','612LLEzHu','label_inherited','str','\x20a\x20cross-database\x20relation\x20for\x20','data','to-column','relationType','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','apiError','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','matched','datasetCode','string','4938ogaxSj','message','includes','list','create','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','42KQtAFM','body','validation','fromDblinkId','from-column','storageProfile','catch','Would\x20','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','toField','37510GxUmQY','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','3087752RxXTIS','Invalid\x20--cardinality.','POST','dbId','Dataset\x20','4934EcqOdj','358527IuEvIM','to-label-column','cardinality','to-datasetcode','relationId','\x20verified.'];a72_0x3676=function(){return _0x1c21b4;};return a72_0x3676();}function ambiguity(_0x3f1373){const _0x3840c1=a72_0x5118,_0x543686=CliErrors[_0x3840c1(0x170)](_0x3840c1(0x1a7),'Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.');return Object['defineProperty'](_0x543686,'data',{'value':{'candidates':_0x3f1373[_0x3840c1(0x1a8)](projectCrossRelation)}}),_0x543686;}const sameName=(_0x338495,_0x569f0b)=>_0x338495['toLowerCase']()===_0x569f0b[a72_0x40c5aa(0x193)]();function matchesEndpoint(_0x49a656,_0x41e238,_0x49bfac,_0x2a129e,_0x39b5a0){const _0x4cfd03=a72_0x40c5aa;return _0x49a656[_0x4cfd03(0x171)]===_0x41e238['dblinkId']&&sameName(_0x49a656[_0x4cfd03(0x19a)],_0x41e238['table'])&&sameName(_0x49a656[_0x4cfd03(0x187)],_0x49bfac)&&_0x49a656[_0x4cfd03(0x1a9)]===_0x2a129e[_0x4cfd03(0x19e)]&&sameName(_0x49a656[_0x4cfd03(0x195)],_0x2a129e['table'])&&sameName(_0x49a656[_0x4cfd03(0x177)],_0x39b5a0);}export async function prepareCrossRelation(_0x44b6cc,_0x3c946e){const _0x14017d=a72_0x40c5aa,_0xeba864=await resolveEndpoint(required(_0x44b6cc,_0x14017d(0x1a4))),_0x1b69fe=explicitDblink(_0x44b6cc);if(_0x1b69fe!==undefined&&_0xeba864['dblinkId']!==_0x1b69fe)throw CliErrors[_0x14017d(0x170)](_0x14017d(0x162));const _0x42f812={'appCode':_0x44b6cc[_0x14017d(0x191)],'fromDatasetCode':_0xeba864[_0x14017d(0x166)],'fromField':required(_0x44b6cc,'from-column'),..._0x1b69fe!==undefined?{'fromDblinkId':_0x1b69fe}:{}},_0x5b80fc={'appCode':_0x44b6cc[_0x14017d(0x191)],'fromDblinkId':_0xeba864[_0x14017d(0x19e)],'fromDatasetCode':_0xeba864[_0x14017d(0x166)],'fromField':_0x42f812[_0x14017d(0x187)]},_0x9f44a6=await queryCrossDbRelations(_0x5b80fc);let _0x18fbdf=null;if(_0x3c946e!=='create'){if(_0x9f44a6[_0x14017d(0x18e)]>0x1)throw ambiguity(_0x9f44a6);_0x18fbdf=_0x9f44a6[0x0]??null;if(!_0x18fbdf)throw CliErrors[_0x14017d(0x170)](_0x14017d(0x179));}if(_0x3c946e==='delete')return{'operation':_0x3c946e,'from':_0xeba864,'query':_0x5b80fc,'body':_0x42f812,'before':_0x18fbdf};const _0x3fbc56=await resolveEndpoint(required(_0x44b6cc,'to-datasetcode'));if(_0xeba864['dblinkId']===_0x3fbc56[_0x14017d(0x19e)])throw CliErrors['validation']('Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.');const _0x471971=_0x44b6cc[_0x14017d(0x15d)](_0x14017d(0x181))[_0x14017d(0x1a2)](),_0x3af065=_0x44b6cc[_0x14017d(0x15d)](_0x14017d(0x182))[_0x14017d(0x1a2)](),_0x1570ed={..._0x42f812,'toDatasetCode':_0x3fbc56[_0x14017d(0x166)],'toField':required(_0x44b6cc,_0x14017d(0x160)),..._0x471971?{'refTableLabelName':_0x471971}:{},..._0x3af065?{'cardinality':_0x3af065}:{}};if(_0x9f44a6[_0x14017d(0x19d)](_0x14efdf=>_0x14efdf[_0x14017d(0x184)]!==_0x18fbdf?.['relationId']&&matchesEndpoint(_0x14efdf,_0xeba864,_0x1570ed[_0x14017d(0x187)],_0x3fbc56,_0x1570ed[_0x14017d(0x177)])))throw CliErrors[_0x14017d(0x170)]('Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.');return{'operation':_0x3c946e,'from':_0xeba864,'to':_0x3fbc56,'query':_0x5b80fc,'body':_0x1570ed,'before':_0x18fbdf,'expectedLabel':_0x471971||_0x18fbdf?.[_0x14017d(0x199)]||_0x1570ed['toField'],'expectedCardinality':_0x3af065||_0x18fbdf?.[_0x14017d(0x182)]||null};}function mutationData(_0x16759a,_0x47c82f,_0x1361df){const _0x51999d=a72_0x40c5aa,{operation:_0x302d8a,body:_0x2d722c,before:_0x3df674}=_0x16759a;return{'operation':_0x302d8a,'selector':{'appCode':_0x2d722c[_0x51999d(0x191)],'from':{'datasetCode':_0x2d722c[_0x51999d(0x18b)],'field':_0x2d722c[_0x51999d(0x187)],'dblinkId':_0x16759a['from'][_0x51999d(0x19e)]}},'before':_0x3df674?projectCrossRelation(_0x3df674):null,'after':_0x1361df,'dryRun':_0x47c82f,'backend':{'method':_0x51999d(0x17c),'path':CROSS_DB_RELATION_PATHS[_0x302d8a]},'warnings':_0x302d8a==='update'&&!_0x2d722c[_0x51999d(0x199)]?[{'code':_0x51999d(0x15c),'message':'The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.'}]:[]};}export async function previewCrossRelation(_0x269ddd,_0x5c74f5){const _0x6f7917=a72_0x40c5aa,_0xf96b0e=await prepareCrossRelation(_0x269ddd,_0x5c74f5),_0x4736fa=_0xf96b0e[_0x6f7917(0x16f)],_0x4719b0=_0x5c74f5===_0x6f7917(0x196)?null:{..._0xf96b0e[_0x6f7917(0x1a0)]?{'relationId':_0xf96b0e[_0x6f7917(0x1a0)][_0x6f7917(0x184)]}:{},'from':{'datasetCode':_0xf96b0e['from'][_0x6f7917(0x166)],'dblinkId':_0xf96b0e[_0x6f7917(0x188)]['dblinkId'],'table':_0xf96b0e[_0x6f7917(0x188)][_0x6f7917(0x194)],'field':_0x4736fa[_0x6f7917(0x187)]},'to':{'datasetCode':_0xf96b0e['to'][_0x6f7917(0x166)],'dblinkId':_0xf96b0e['to']['dblinkId'],'table':_0xf96b0e['to'][_0x6f7917(0x194)],'field':_0x4736fa[_0x6f7917(0x177)],'labelField':_0xf96b0e[_0x6f7917(0x189)]},'relation':{'cardinality':_0xf96b0e[_0x6f7917(0x190)],'relationType':0x2}};return{...mutationData(_0xf96b0e,!![],null),'after':_0x4719b0,'method':_0x6f7917(0x17c),'url':CROSS_DB_RELATION_PATHS[_0x5c74f5],'body':_0xf96b0e[_0x6f7917(0x16f)],'description':_0x6f7917(0x175)+_0x5c74f5+_0x6f7917(0x15e)+_0x4736fa[_0x6f7917(0x18b)]+'.'+_0x4736fa[_0x6f7917(0x187)]};}function a72_0x5118(_0x164e39,_0x6fb824){_0x164e39=_0x164e39-0x157;const _0x367611=a72_0x3676();let _0x51188a=_0x367611[_0x164e39];return _0x51188a;}export async function executeCrossRelation(_0xc476cd,_0x5b7ac9,_0x4c43bc){const _0x1a5ec6=a72_0x40c5aa,_0xebcd74=await prepareCrossRelation(_0xc476cd,_0x5b7ac9);try{await _0x4c43bc(_0xebcd74['body']);}catch(_0x437441){if(_0x437441 instanceof CliError&&_0x437441[_0x1a5ec6(0x169)][_0x1a5ec6(0x16a)]('multiple\x20cross-database\x20relations\x20matched')){const _0x5a4586=await queryCrossDbRelations(_0xebcd74[_0x1a5ec6(0x18d)])[_0x1a5ec6(0x174)](()=>[]);throw ambiguity(_0x5a4586);}throw _0x437441;}let _0x15c269=[],_0x15194e,_0x4eb1de=![];try{_0x15c269=await queryCrossDbRelations(_0xebcd74[_0x1a5ec6(0x18d)]);if(_0x5b7ac9===_0x1a5ec6(0x196))_0x4eb1de=!_0x15c269[_0x1a5ec6(0x19d)](_0x5d8df6=>_0x5d8df6[_0x1a5ec6(0x184)]===_0xebcd74[_0x1a5ec6(0x1a0)][_0x1a5ec6(0x184)]);else{const _0x43306b=_0xebcd74[_0x1a5ec6(0x16f)],_0x47ead8=_0x15c269[_0x1a5ec6(0x186)](_0x5cf292=>matchesEndpoint(_0x5cf292,_0xebcd74[_0x1a5ec6(0x188)],_0x43306b[_0x1a5ec6(0x187)],_0xebcd74['to'],_0x43306b['toField'])&&(_0x5b7ac9===_0x1a5ec6(0x16c)||_0x5cf292[_0x1a5ec6(0x184)]===_0xebcd74[_0x1a5ec6(0x1a0)][_0x1a5ec6(0x184)]));_0x15194e=_0x47ead8[_0x1a5ec6(0x18e)]===0x1?_0x47ead8[0x0]:undefined,_0x4eb1de=!!_0x15194e&&_0x15194e[_0x1a5ec6(0x199)]===_0xebcd74[_0x1a5ec6(0x189)]&&_0x15194e[_0x1a5ec6(0x182)]===_0xebcd74[_0x1a5ec6(0x190)]&&_0x15194e['relationType']===0x2;}}catch{}const _0x4637ff={...mutationData(_0xebcd74,![],_0x15194e?projectCrossRelation(_0x15194e):null),'verification':{'status':_0x4eb1de?_0x1a5ec6(0x165):'unconfirmed','verified':_0x4eb1de}};if(!_0x4eb1de){const _0x271d38=CliErrors[_0x1a5ec6(0x163)]('Cross-database\x20relation\x20'+_0x5b7ac9+_0x1a5ec6(0x1aa),_0x1a5ec6(0x16d));Object['defineProperty'](_0x271d38,_0x1a5ec6(0x15f),{'value':{..._0x4637ff,'candidates':_0x15c269[_0x1a5ec6(0x1a8)](projectCrossRelation)}});throw _0x271d38;}return{'ok':!![],'data':_0x4637ff,'message':'Cross-database\x20relation\x20'+_0x5b7ac9+_0x1a5ec6(0x185)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a73_0xb0de(){const _0x572994=['1324099ONFare','1215092gYkhje','update','20LOYASs','39607ErHnLO','Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','cross-relation-update','dataset','176538qSKZIu','1227460LyHTks','14DxXyDR','12lnvXZV','write','2036457VQWbfc','3671760RIAHDP'];a73_0xb0de=function(){return _0x572994;};return a73_0xb0de();}const a73_0x19d120=a73_0x2ba3;(function(_0x2e41de,_0x40bb00){const _0x2ca81f=a73_0x2ba3,_0x523921=_0x2e41de();while(!![]){try{const _0x416d13=-parseInt(_0x2ca81f(0xa5))/0x1*(parseInt(_0x2ca81f(0x9c))/0x2)+-parseInt(_0x2ca81f(0x9a))/0x3+parseInt(_0x2ca81f(0xa2))/0x4+-parseInt(_0x2ca81f(0x9b))/0x5+parseInt(_0x2ca81f(0x9d))/0x6*(-parseInt(_0x2ca81f(0xa1))/0x7)+parseInt(_0x2ca81f(0xa0))/0x8+parseInt(_0x2ca81f(0x9f))/0x9*(parseInt(_0x2ca81f(0xa4))/0xa);if(_0x416d13===_0x40bb00)break;else _0x523921['push'](_0x523921['shift']());}catch(_0x1ae935){_0x523921['push'](_0x523921['shift']());}}}(a73_0xb0de,0x3e59c));function a73_0x2ba3(_0x516517,_0x5a6005){_0x516517=_0x516517-0x97;const _0xb0de38=a73_0xb0de();let _0x2ba35c=_0xb0de38[_0x516517];return _0x2ba35c;}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_0x19d120(0x99),'command':a73_0x19d120(0x98),'description':a73_0x19d120(0x97),'risk':a73_0x19d120(0x9e),'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 _0x3e9877=>validateCrossRelation(_0x3e9877,'update'),'dryRun':_0x46e0b2=>previewCrossRelation(_0x46e0b2,a73_0x19d120(0xa3)),'execute':_0x220fda=>executeCrossRelation(_0x220fda,a73_0x19d120(0xa3),updateCrossDbRelation)};
|