@lovrabet/rabetbase-cli 2.5.4-beta.3 → 2.5.4-beta.4
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/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/service.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/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +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 +2 -2
- package/skills/rabetbase/references/rabetbase-user-account.md +8 -8
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51ce22,_0x3ddf43){const _0x1071d9=a59_0x293b,_0x3ac2cb=_0x51ce22();while(!![]){try{const _0x233a1a=-parseInt(_0x1071d9(0xa1))/0x1*(parseInt(_0x1071d9(0xa7))/0x2)+parseInt(_0x1071d9(0x9f))/0x3*(parseInt(_0x1071d9(0xa5))/0x4)+parseInt(_0x1071d9(0x9d))/0x5*(-parseInt(_0x1071d9(0xa0))/0x6)+parseInt(_0x1071d9(0xa4))/0x7*(-parseInt(_0x1071d9(0xa3))/0x8)+-parseInt(_0x1071d9(0x9e))/0x9*(parseInt(_0x1071d9(0xa6))/0xa)+parseInt(_0x1071d9(0xa2))/0xb+parseInt(_0x1071d9(0xa8))/0xc;if(_0x233a1a===_0x3ddf43)break;else _0x3ac2cb['push'](_0x3ac2cb['shift']());}catch(_0x22c9bb){_0x3ac2cb['push'](_0x3ac2cb['shift']());}}}(a59_0x5e3e,0xbc093));function a59_0x5e3e(){const _0x2affa7=['318918vTizKX','90tepVmV','292827yunazy','198165PqGNpt','920CJfDtP','39305WUVXQc','36MaCfbL','6429410inagPI','10Fmlild','47591784oePhtb','472585EdCPlI','9aRDXlk'];a59_0x5e3e=function(){return _0x2affa7;};return a59_0x5e3e();}import{configListDefinition}from'../../commands/config/list.js';function a59_0x293b(_0x504ace,_0x2cf4ba){_0x504ace=_0x504ace-0x9d;const _0x5e3ed3=a59_0x5e3e();let _0x293b62=_0x5e3ed3[_0x504ace];return _0x293b62;}import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x2e8498=a60_0x3223;(function(_0x5d48a4,_0xa2aaa9){const _0x472825=a60_0x3223,_0x2bdbe3=_0x5d48a4();while(!![]){try{const _0x319c74=-parseInt(_0x472825(0x13e))/0x1*(parseInt(_0x472825(0x14b))/0x2)+-parseInt(_0x472825(0x15c))/0x3+-parseInt(_0x472825(0x162))/0x4+-parseInt(_0x472825(0x149))/0x5+-parseInt(_0x472825(0x165))/0x6+-parseInt(_0x472825(0x141))/0x7*(-parseInt(_0x472825(0x154))/0x8)+parseInt(_0x472825(0x164))/0x9;if(_0x319c74===_0xa2aaa9)break;else _0x2bdbe3['push'](_0x2bdbe3['shift']());}catch(_0x9276f9){_0x2bdbe3['push'](_0x2bdbe3['shift']());}}}(a60_0x37d6,0x7ab72));import{select}from'@inquirer/prompts';function a60_0x3223(_0x5d17e1,_0x28eb1a){_0x5d17e1=_0x5d17e1-0x12e;const _0x37d6bc=a60_0x37d6();let _0x3223c9=_0x37d6bc[_0x5d17e1];return _0x3223c9;}import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a60_0x2e8498(0x166),'type':a60_0x2e8498(0x153),'description':a60_0x2e8498(0x140)+ENABLED_LOVRABET_REGION_VALUES[a60_0x2e8498(0x159)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'domain-config','type':a60_0x2e8498(0x153),'description':a60_0x2e8498(0x13d)},{'name':a60_0x2e8498(0x157),'type':a60_0x2e8498(0x153),'description':a60_0x2e8498(0x136)},{'name':a60_0x2e8498(0x15a),'type':a60_0x2e8498(0x153),'description':a60_0x2e8498(0x142)},{'name':a60_0x2e8498(0x150),'type':a60_0x2e8498(0x153),'description':'Custom\x20Runtime\x20HTTPS\x20origin'},{'name':a60_0x2e8498(0x12f),'type':a60_0x2e8498(0x153),'description':a60_0x2e8498(0x14c)},{'name':a60_0x2e8498(0x14a),'type':'string','description':a60_0x2e8498(0x15e)},{'name':a60_0x2e8498(0x131),'type':a60_0x2e8498(0x153),'description':a60_0x2e8498(0x15f)},{'name':a60_0x2e8498(0x138),'type':a60_0x2e8498(0x153),'description':a60_0x2e8498(0x133)},{'name':'local-domain','type':a60_0x2e8498(0x153),'description':a60_0x2e8498(0x12e)},{'name':a60_0x2e8498(0x13a),'type':a60_0x2e8498(0x153),'description':'Custom\x20certificate\x20service\x20HTTPS\x20origin'}];function a60_0x37d6(){const _0x4ca803=['domains','official','Custom\x20User\x20HTTPS\x20origin','independent','app-domain','global','certificate-domain','Region\x20\x22','cdn','Independent-deployment\x20Domain\x20JSON\x20file','399871PQKOjn','validation','Official\x20Lovrabet\x20region:\x20','553qUKqON','Custom\x20platform\x20API\x20HTTPS\x20origin','ExitPromptError','routing','mode','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','838760TFkgqQ','kb-domain','2cCoQNH','Custom\x20SkillHub\x20HTTPS\x20origin','enterprise-v1','label','str','runtime-domain','Select\x20Lovrabet\x20region','bool','string','152IUasKw','localDomain','\x22\x20is\x20not\x20currently\x20available.','user-domain','config','join','api-domain','nonInteractive','2665014riUzVX','name','Custom\x20knowledge-base\x20HTTPS\x20origin','Custom\x20KB\x20Service\x20HTTPS\x20origin','init','assign','3795444vQKuCU','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','31037616esDDfh','3255966uavyyi','region','project','Custom\x20local\x20callback\x20HTTPS\x20origin','skill-domain','keys','kb-service-domain','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin'];a60_0x37d6=function(){return _0x4ca803;};return a60_0x37d6();}async function resolveRegion(_0x532c5b){const _0x36a24f=a60_0x2e8498,_0x4badf8=_0x532c5b['str'](_0x36a24f(0x166));if(_0x4badf8){if(!isEnabledLovrabetRegion(_0x4badf8))throw CliErrors[_0x36a24f(0x13f)](_0x36a24f(0x13b)+_0x4badf8+_0x36a24f(0x156),'Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES[_0x36a24f(0x159)](',\x20'));return _0x4badf8;}if(_0x532c5b[_0x36a24f(0x15b)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x36a24f(0x151),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x4a144c=>({'name':getOfficialRoutingProfile(_0x4a144c)[_0x36a24f(0x14e)]+'\x20('+_0x4a144c+')','value':_0x4a144c}))});}catch(_0x1d0531){if(_0x1d0531?.[_0x36a24f(0x15d)]===_0x36a24f(0x143))throw CliErrors['cancelled']();throw _0x1d0531;}}export async function executeConfigInit(_0x36b7ae){const _0x2c7e28=a60_0x2e8498,_0x43bec0=resolveDomainConfigInput(_0x36b7ae),_0x1aad17=_0x43bec0[_0x2c7e28(0x134)],_0x4201dd=Object['keys'](_0x1aad17)['length']>0x0;if(_0x4201dd&&_0x36b7ae[_0x2c7e28(0x14f)]('region'))throw CliErrors[_0x2c7e28(0x13f)](_0x2c7e28(0x132));if(!!_0x1aad17[_0x2c7e28(0x155)]!==!!_0x1aad17['certificateDomain'])throw CliErrors[_0x2c7e28(0x13f)](_0x2c7e28(0x148));const _0xea94f3=_0x36b7ae[_0x2c7e28(0x152)]('global')?_0x2c7e28(0x139):_0x2c7e28(0x167),_0x39645d=readScopedConfig(_0xea94f3);for(const _0x1f49cc of DOMAIN_CONFIG_FIELDS)delete _0x39645d[_0x1f49cc];for(const _0x21b780 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x39645d[_0x21b780];delete _0x39645d[_0x2c7e28(0x144)];let _0x30cd94=null;if(_0x4201dd)delete _0x39645d[_0x2c7e28(0x166)],_0x43bec0[_0x2c7e28(0x145)]===_0x2c7e28(0x14d)?_0x39645d[_0x2c7e28(0x144)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x43bec0['manifestDomains'],'cdn':_0x43bec0[_0x2c7e28(0x13c)]}:Object[_0x2c7e28(0x161)](_0x39645d,_0x1aad17);else{_0x30cd94=await resolveRegion(_0x36b7ae);if(_0x30cd94===DEFAULT_LOVRABET_REGION)delete _0x39645d['region'];else _0x39645d['region']=_0x30cd94;}return writeScopedConfig(_0x39645d,_0xea94f3),{'ok':!![],'message':_0x4201dd?_0x2c7e28(0x146)+Object[_0x2c7e28(0x130)](_0x43bec0['mode']==='enterprise-v1'?_0x43bec0['manifestDomains']:_0x1aad17)['join'](',\x20')+'.':_0x2c7e28(0x163)+_0x30cd94+'.','data':{'mode':_0x4201dd?_0x2c7e28(0x137):_0x2c7e28(0x135),'protocol':_0x43bec0['mode']===_0x2c7e28(0x14d)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x30cd94,'domains':_0x1aad17,'cdn':_0x43bec0[_0x2c7e28(0x145)]===_0x2c7e28(0x14d)?_0x43bec0[_0x2c7e28(0x13c)]:undefined}};}export const configInitDefinition={'service':a60_0x2e8498(0x158),'command':a60_0x2e8498(0x160),'description':'Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':'write','confirmationDescription':a60_0x2e8498(0x147),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x1f4d45=a61_0x1ada;(function(_0x5c50cd,_0x34cc6f){const _0x4b1ca0=a61_0x1ada,_0xc8eaf6=_0x5c50cd();while(!![]){try{const _0x3c55be=parseInt(_0x4b1ca0(0x71))/0x1+parseInt(_0x4b1ca0(0x74))/0x2+-parseInt(_0x4b1ca0(0x69))/0x3*(-parseInt(_0x4b1ca0(0x72))/0x4)+-parseInt(_0x4b1ca0(0x6e))/0x5*(-parseInt(_0x4b1ca0(0x6b))/0x6)+parseInt(_0x4b1ca0(0x75))/0x7+-parseInt(_0x4b1ca0(0x73))/0x8*(-parseInt(_0x4b1ca0(0x6a))/0x9)+-parseInt(_0x4b1ca0(0x76))/0xa*(parseInt(_0x4b1ca0(0x68))/0xb);if(_0x3c55be===_0x34cc6f)break;else _0xc8eaf6['push'](_0xc8eaf6['shift']());}catch(_0x34513d){_0xc8eaf6['push'](_0xc8eaf6['shift']());}}}(a61_0x4a75,0x4c734));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x2ccc56){const _0x35b2aa=a61_0x1ada,_0x275c1a=_0x2ccc56[_0x35b2aa(0x6c)]('global')?readScopedConfig(_0x35b2aa(0x67)):readConfig();return{'ok':!![],'data':_0x275c1a};}function a61_0x1ada(_0x311846,_0x45fe3b){_0x311846=_0x311846-0x66;const _0x4a75d1=a61_0x4a75();let _0x1ada8d=_0x4a75d1[_0x311846];return _0x1ada8d;}export const configListDefinition={'service':a61_0x1f4d45(0x70),'command':a61_0x1f4d45(0x66),'description':a61_0x1f4d45(0x77),'risk':a61_0x1f4d45(0x6d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a61_0x1f4d45(0x67),'type':a61_0x1f4d45(0x6f),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};function a61_0x4a75(){const _0x56f710=['8RaNbUO','1110312NNybMS','844585eAKysO','25830GaYDFe','List\x20all\x20config\x20values','list','global','6798wAJRqU','1694241ewMwZg','3051081CWGgDB','981972yKVFPQ','bool','read','5KztvaL','boolean','config','166205fRtYWt','4WtDGIQ'];a61_0x4a75=function(){return _0x56f710;};return a61_0x4a75();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a62_0x5573(_0x36b740,_0x1df754){_0x36b740=_0x36b740-0xe5;const _0x29a8b4=a62_0x29a8();let _0x55731b=_0x29a8b4[_0x36b740];return _0x55731b;}function a62_0x29a8(){const _0x40b8a2=['868293qejPkS','env','locale','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Invalid\x20value\x20for\x20\x22','Missing\x20value.','apps','\x20workspace\x20add\x20<name>\x20--appcode\x20','1721961SZPJIY','object','Missing\x20key.','2189944gSNxpa','\x20set\x20to:\x20','key','str','value','string','includes','riskLevel','config','boolean','set','156920EFgdOn','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Global','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','appcode','1196534qNChvU','length','Project','bool','519940rnuNft','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x20appcode\x20set\x20to:\x20','12LQKTco','app','Usage:\x20','keys','`,\x20`','150955fTCtVI','write','Top-level\x20key\x20\x22','Settable\x20top-level\x20keys:\x20','global','validation','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.'];a62_0x29a8=function(){return _0x40b8a2;};return a62_0x29a8();}const a62_0x2980ce=a62_0x5573;(function(_0x12659d,_0x148595){const _0x20af12=a62_0x5573,_0x547875=_0x12659d();while(!![]){try{const _0xea223f=parseInt(_0x20af12(0x108))/0x1+parseInt(_0x20af12(0xf4))/0x2+-parseInt(_0x20af12(0x110))/0x3+-parseInt(_0x20af12(0x113))/0x4+-parseInt(_0x20af12(0xf8))/0x5*(-parseInt(_0x20af12(0xfc))/0x6)+-parseInt(_0x20af12(0x101))/0x7+-parseInt(_0x20af12(0xef))/0x8;if(_0xea223f===_0x148595)break;else _0x547875['push'](_0x547875['shift']());}catch(_0x30ee9d){_0x547875['push'](_0x547875['shift']());}}}(a62_0x29a8,0x7cf8b));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x26852e){const _0x1eaff2=a62_0x5573,_0x428d9c=_0x26852e[_0x1eaff2(0xe7)](_0x1eaff2(0xe6)),_0x35a395=_0x26852e['str'](_0x1eaff2(0xe8));if(!_0x428d9c)throw CliErrors['validation'](_0x1eaff2(0x112),_0x1eaff2(0xfe)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x35a395===undefined||_0x35a395==='')throw CliErrors['validation'](_0x1eaff2(0x10d),_0x1eaff2(0xfe)+CLI_BIN_NAME+_0x1eaff2(0xfa));let _0x1eea75=_0x428d9c,_0x36f468=_0x35a395;if(_0x35a395[_0x1eaff2(0xf5)]>0x1f4)throw CliErrors[_0x1eaff2(0x106)](_0x1eaff2(0x107));if(_0x428d9c===_0x1eaff2(0xeb))throw CliErrors['validation']('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x428d9c))throw CliErrors[_0x1eaff2(0x106)](_0x1eaff2(0x103)+_0x428d9c+'\x22\x20is\x20not\x20settable.',_0x1eaff2(0x104)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x428d9c]&&!CONFIG_ENUM_VALUES[_0x428d9c][_0x1eaff2(0xea)](_0x35a395))throw CliErrors[_0x1eaff2(0x106)](_0x1eaff2(0x10c)+_0x428d9c+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x428d9c]['join'](',\x20'));if(_0x428d9c===_0x1eaff2(0x10a)&&!normalizeLocale(_0x35a395))throw CliErrors[_0x1eaff2(0x106)]('Invalid\x20locale\x20value.',_0x1eaff2(0xf2));DOMAIN_CONFIG_FIELDS['includes'](_0x428d9c)&&(_0x36f468=normalizeDomainOrigin(_0x428d9c,_0x35a395));const _0x3fb396={'global':_0x26852e[_0x1eaff2(0xf7)](_0x1eaff2(0x105))},_0x27e532=resolveWriteScope(_0x3fb396),_0x53ed5f=readScopedConfig(_0x27e532);_0x428d9c==='app'&&(_0x1eea75=_0x1eaff2(0xf3),delete _0x53ed5f[_0x1eaff2(0xfd)]);_0x428d9c===_0x1eaff2(0x10a)&&(_0x36f468=normalizeLocale(_0x35a395));if(_0x428d9c==='env'){_0x36f468=normalizeEnv(_0x35a395);if(!isProduction(_0x36f468)&&!isDaily(_0x36f468))throw CliErrors[_0x1eaff2(0x106)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x1eaff2(0xf9));}if(_0x428d9c===_0x1eaff2(0xf3)){const _0x17f4e4=_0x53ed5f['apps']&&typeof _0x53ed5f['apps']===_0x1eaff2(0x111)?Object[_0x1eaff2(0xff)](_0x53ed5f[_0x1eaff2(0x10e)]):[];if(_0x17f4e4['length']>0x0)throw CliErrors['validation']('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Use\x20`'+CLI_BIN_NAME+_0x1eaff2(0x10f)+_0x36f468+_0x1eaff2(0x100)+CLI_BIN_NAME+_0x1eaff2(0x10b));const _0x4ea881=buildCanonicalProjectConfig({..._0x53ed5f},{'appCodes':[_0x36f468],'env':typeof _0x53ed5f[_0x1eaff2(0x109)]==='string'?_0x53ed5f[_0x1eaff2(0x109)]:undefined});writeScopedConfig(_0x4ea881,_0x27e532);const _0x42ce2e=_0x27e532===_0x1eaff2(0x105)?'Global':_0x1eaff2(0xf6);return{'ok':!![],'message':'✓\x20'+_0x42ce2e+_0x1eaff2(0xfb)+_0x36f468+'\x20(stored\x20as\x20a\x20single\x20app\x20profile)'};}_0x53ed5f[_0x1eea75]=_0x36f468,writeScopedConfig(_0x53ed5f,_0x27e532);const _0xa7cb48=_0x27e532===_0x1eaff2(0x105)?_0x1eaff2(0xf1):'Project';return{'ok':!![],'message':'✓\x20'+_0xa7cb48+'\x20'+_0x1eea75+_0x1eaff2(0xe5)+_0x36f468};}export const configSetDefinition={'service':a62_0x2980ce(0xec),'command':a62_0x2980ce(0xee),'description':'Set\x20a\x20config\x20value','risk':a62_0x2980ce(0x102),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x2980ce(0xe6),'type':a62_0x2980ce(0xe9),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a62_0x2980ce(0xe8),'type':'string','description':'Config\x20value','required':!![]},{'name':a62_0x2980ce(0x105),'type':a62_0x2980ce(0xed),'description':a62_0x2980ce(0xf0),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x118d7a,_0x479555){var _0x2350be=a63_0x142b,_0x4b6125=_0x118d7a();while(!![]){try{var _0x3fb1c8=-parseInt(_0x2350be(0xa9))/0x1*(parseInt(_0x2350be(0xaf))/0x2)+-parseInt(_0x2350be(0xb4))/0x3*(-parseInt(_0x2350be(0xad))/0x4)+-parseInt(_0x2350be(0xb0))/0x5*(-parseInt(_0x2350be(0xb2))/0x6)+-parseInt(_0x2350be(0xb3))/0x7+-parseInt(_0x2350be(0xb5))/0x8*(parseInt(_0x2350be(0xab))/0x9)+parseInt(_0x2350be(0xae))/0xa+parseInt(_0x2350be(0xa6))/0xb;if(_0x3fb1c8===_0x479555)break;else _0x4b6125['push'](_0x4b6125['shift']());}catch(_0x2f2f8f){_0x4b6125['push'](_0x4b6125['shift']());}}}(a63_0x3367,0x8de77));function a63_0x142b(_0xc86b5f,_0x3c61f4){_0xc86b5f=_0xc86b5f-0xa6;var _0x336787=a63_0x3367();var _0x142b84=_0x336787[_0xc86b5f];return _0x142b84;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};function a63_0x3367(){var _0x93b441=['1106204ArwTZR','10516470NAiTtS','1098134oIkKEN','5uPhATU','validation','1093188CShNVz','6502657wtpDmG','6hZHlbG','179736VnYSZE','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','9776558dhHqbM','global','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','2zHxjfF','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','27gHfaBy','project'];a63_0x3367=function(){return _0x93b441;};return a63_0x3367();}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x2baad4){var _0x3e9368=a63_0x142b;if(_0x2baad4[_0x3e9368(0xa7)])return _0x3e9368(0xa7);if(!isInProject())throw CliErrors[_0x3e9368(0xb1)](_0x3e9368(0xa8),_0x3e9368(0xb6)+CLI_BIN_NAME+_0x3e9368(0xaa));return _0x3e9368(0xac);}export function readScopedConfig(_0x31b984){return readConfigFile(resolveWriteConfigPath(_0x31b984));}export function writeScopedConfig(_0x20e392,_0x2a39e3){writeConfigFile(resolveWriteConfigPath(_0x2a39e3),_0x20e392);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a64_0xa1ed64=a64_0x2821;(function(_0x31b2cc,_0x527b0b){const _0x136c0a=a64_0x2821,_0x23a8e3=_0x31b2cc();while(!![]){try{const _0x47e566=parseInt(_0x136c0a(0xad))/0x1+-parseInt(_0x136c0a(0x99))/0x2+parseInt(_0x136c0a(0x94))/0x3*(-parseInt(_0x136c0a(0xb2))/0x4)+parseInt(_0x136c0a(0xb4))/0x5*(parseInt(_0x136c0a(0x7c))/0x6)+-parseInt(_0x136c0a(0x82))/0x7+parseInt(_0x136c0a(0xba))/0x8+parseInt(_0x136c0a(0x80))/0x9;if(_0x47e566===_0x527b0b)break;else _0x23a8e3['push'](_0x23a8e3['shift']());}catch(_0x1888f1){_0x23a8e3['push'](_0x23a8e3['shift']());}}}(a64_0x24e5,0xa4edc));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set(['MANY_TO_ONE',a64_0xa1ed64(0xaa)]),SUPPORTED_FIELD_TYPES=new Set([a64_0xa1ed64(0xa9),a64_0xa1ed64(0xcb),a64_0xa1ed64(0xd3),'BOOLEAN',a64_0xa1ed64(0xd0),'MULTI_SELECT','DATE_RANGE','USER','ADDRESS',a64_0xa1ed64(0xcf)]);export function isDatasetBatchDesign(_0x4e9b51){const _0x245222=a64_0xa1ed64;return isObject(_0x4e9b51)&&_0x4e9b51['kind']===_0x245222(0xb3);}export function validateDatasetBatchDesign(_0xe5e9c0){const _0x33ed80=a64_0xa1ed64;(!isObject(_0xe5e9c0)||_0xe5e9c0[_0x33ed80(0x9e)]!==_0x33ed80(0xb3))&&fail(_0x33ed80(0x79));_0xe5e9c0['schemaVersion']!==0x1&&fail(_0x33ed80(0xc1));const _0x5ee68d=objectArray(_0xe5e9c0['datasets'],_0x33ed80(0x74),0x1,0x14),_0x10b6ff=objectArray(_0xe5e9c0[_0x33ed80(0x98)],_0x33ed80(0x98),0x0,0xc8),_0x46fa22=objectArray(_0xe5e9c0[_0x33ed80(0x9c)],'unresolvedRelations',0x0,0xc8),_0xc90793=new Set(),_0x5d793c=new Map();for(const [_0x25f940,_0x7df0e3]of _0x5ee68d[_0x33ed80(0x8f)]()){const _0x13c9ee=requiredString(_0x7df0e3['localKey'],_0x33ed80(0x75)+_0x25f940+_0x33ed80(0x9d));!LOCAL_KEY[_0x33ed80(0xa2)](_0x13c9ee)&&fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xd7)+LOCAL_KEY[_0x33ed80(0x8d)]+'.');_0xc90793[_0x33ed80(0x89)](_0x13c9ee)&&fail(_0x33ed80(0xbd));_0xc90793[_0x33ed80(0xbc)](_0x13c9ee);!isObject(_0x7df0e3[_0x33ed80(0xa4)])&&fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0x91));rejectServerDatasetIdentity(_0x7df0e3[_0x33ed80(0xa4)],_0x33ed80(0x75)+_0x25f940+_0x33ed80(0x87));if(!isObject(_0x7df0e3[_0x33ed80(0xa4)][_0x33ed80(0xd1)]))fail(_0x33ed80(0x75)+_0x25f940+'].design.dataset\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x7df0e3[_0x33ed80(0xa4)][_0x33ed80(0xd1)],_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xc2)),requiredString(_0x7df0e3['design'][_0x33ed80(0xd1)][_0x33ed80(0xcc)],_0x33ed80(0x75)+_0x25f940+'].design.dataset.datasetName');_0x33ed80(0x98)in _0x7df0e3[_0x33ed80(0xa4)]&&(!Array[_0x33ed80(0xa0)](_0x7df0e3['design'][_0x33ed80(0x98)])||_0x7df0e3[_0x33ed80(0xa4)][_0x33ed80(0x98)][_0x33ed80(0xa8)]!==0x0)&&fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xca));const _0x408464=objectArray(_0x7df0e3[_0x33ed80(0xa4)]['fields'],'datasets['+_0x25f940+_0x33ed80(0xd9),0x1,0xc8),_0x1a128b=new Map();for(const [_0x547752,_0x4f51f6]of _0x408464['entries']()){const _0x1f03ed=fieldName(_0x4f51f6);if(!_0x1f03ed)fail('datasets['+_0x25f940+_0x33ed80(0xc5)+_0x547752+_0x33ed80(0x76));const _0x2cde7a=_0x1f03ed['toLowerCase']();if(_0x1a128b[_0x33ed80(0x89)](_0x2cde7a))fail(_0x33ed80(0xc9)+_0x13c9ee+_0x33ed80(0xa6));const _0x45ba2e=stringValue(_0x4f51f6['type']??_0x4f51f6[_0x33ed80(0xb5)])[_0x33ed80(0x8b)]();if(!SUPPORTED_FIELD_TYPES[_0x33ed80(0x89)](_0x45ba2e))fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xc5)+_0x547752+_0x33ed80(0xd2));_0x1a128b[_0x33ed80(0x72)](_0x2cde7a,_0x45ba2e),[_0x4f51f6[_0x33ed80(0x9f)],_0x4f51f6[_0x33ed80(0x7d)],_0x4f51f6[_0x33ed80(0x8a)]][_0x33ed80(0xb0)](_0x5e576b=>stringValue(_0x5e576b))&&fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xc5)+_0x547752+']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.');}_0x5d793c[_0x33ed80(0x72)](_0x13c9ee,_0x1a128b);}const _0x4e1979=new Set(),_0x400457=new Set();for(const [_0x302b65,_0x344022]of _0x10b6ff[_0x33ed80(0x8f)]()){const _0xe43b4b=validateRelation(_0x344022,_0x302b65,_0xc90793,_0x5d793c);if(_0x4e1979['has'](_0xe43b4b))fail(_0x33ed80(0xa5));_0x4e1979[_0x33ed80(0xbc)](_0xe43b4b);const _0x3ca6d2=_0xe43b4b['split']('\x00',0x2)['join']('\x00');if(_0x400457[_0x33ed80(0x89)](_0x3ca6d2))fail(_0x33ed80(0xa3));_0x400457[_0x33ed80(0xbc)](_0x3ca6d2);}for(const [_0x5a04bc,_0x5c0a16]of _0x46fa22[_0x33ed80(0x8f)]()){requiredString(_0x5c0a16[_0x33ed80(0x81)],_0x33ed80(0xda)+_0x5a04bc+'].reason'),validateConfidence(_0x5c0a16[_0x33ed80(0x96)],'unresolvedRelations['+_0x5a04bc+_0x33ed80(0xc4));}return _0xe5e9c0;}export function reconcileBatchResult(_0x406fbe){const _0x4fc1f9=a64_0xa1ed64;if(!isObject(_0x406fbe))return null;try{const _0x350275=stringArray(_0x406fbe[_0x4fc1f9(0x84)],_0x4fc1f9(0x84),0x1,0x14),_0x352eec=new Set(_0x350275);if(_0x352eec[_0x4fc1f9(0x85)]!==_0x350275[_0x4fc1f9(0xa8)]||_0x350275[_0x4fc1f9(0xb0)](_0xf9d589=>!LOCAL_KEY[_0x4fc1f9(0xa2)](_0xf9d589)))return null;const _0xc6633c=objectArray(_0x406fbe[_0x4fc1f9(0xc0)],'createdDatasets',0x1,0x14),_0x37729c=new Map(),_0x461218=new Set();for(const _0x35478d of _0xc6633c){const _0x4b6646=requiredString(_0x35478d[_0x4fc1f9(0xa7)],_0x4fc1f9(0x97)),_0x2e9434=requiredString(_0x35478d[_0x4fc1f9(0xb6)]??_0x35478d[_0x4fc1f9(0xa1)],'createdDatasets[].code');if(_0x37729c['has'](_0x4b6646)||_0x461218[_0x4fc1f9(0x89)](_0x2e9434))return null;_0x37729c[_0x4fc1f9(0x72)](_0x4b6646,_0x2e9434),_0x461218['add'](_0x2e9434);}if(!sameSet(_0x352eec,new Set(_0x37729c[_0x4fc1f9(0xc3)]())))return null;const _0x57512f=objectArray(_0x406fbe[_0x4fc1f9(0xb1)],_0x4fc1f9(0xb1),0x0,0xc8),_0x24f6bf=objectArray(_0x406fbe['createdRelations'],'createdRelations',0x0,0xc8),_0x25b3fc=relationTupleSet(_0x57512f,![],_0x37729c),_0x204509=relationTupleSet(_0x24f6bf,!![],_0x37729c);if(!_0x25b3fc||!_0x204509||!sameSet(_0x25b3fc,_0x204509))return null;const _0x3caf75=objectArray(_0x406fbe[_0x4fc1f9(0x9c)],'unresolvedRelations',0x0,0xc8);return{'expectedLocalKeys':_0x350275,'expectedRelations':_0x57512f,'createdDatasets':_0xc6633c,'createdRelations':_0x24f6bf,'unresolvedRelations':_0x3caf75,...isObject(_0x406fbe[_0x4fc1f9(0xc8)])?{'metrics':_0x406fbe[_0x4fc1f9(0xc8)]}:{}};}catch{return null;}}function validateRelation(_0x2edf08,_0x54020a,_0x1de1b1,_0x58f28a){const _0x596567=a64_0xa1ed64,_0x21ee78=_0x596567(0x78)+_0x54020a+']',_0x35cb68=requiredString(_0x2edf08[_0x596567(0xae)],_0x21ee78+'.fromDatasetKey'),_0x55d687=requiredString(_0x2edf08[_0x596567(0x8c)],_0x21ee78+'.toDatasetKey'),_0x58c8d2=requiredString(_0x2edf08['fromField'],_0x21ee78+_0x596567(0x90))[_0x596567(0x9b)](),_0x49eb33=requiredString(_0x2edf08['toField'],_0x21ee78+_0x596567(0xce))[_0x596567(0x9b)]();if(!_0x1de1b1[_0x596567(0x89)](_0x35cb68)||!_0x1de1b1['has'](_0x55d687))fail(_0x21ee78+'\x20references\x20an\x20unknown\x20dataset\x20localKey.');const _0x5e1ae1=_0x58f28a['get'](_0x35cb68)?.[_0x596567(0xd5)](_0x58c8d2),_0x39e233=_0x58f28a[_0x596567(0xd5)](_0x55d687)?.[_0x596567(0xd5)](_0x49eb33);if(_0x5e1ae1===undefined||_0x39e233===undefined)fail(_0x21ee78+_0x596567(0x95));if(_0x5e1ae1&&_0x39e233&&_0x5e1ae1!==_0x39e233)fail(_0x21ee78+_0x596567(0xc7));const _0x2bc30c=stringValue(_0x2edf08[_0x596567(0x8e)])||'lookup';if(_0x2bc30c!==_0x596567(0xc6))fail(_0x21ee78+_0x596567(0x83));const _0x248c53=stringValue(_0x2edf08[_0x596567(0xb9)])||'MANY_TO_ONE';if(!SUPPORTED_CARDINALITIES[_0x596567(0x89)](_0x248c53))fail(_0x21ee78+'.cardinality\x20is\x20not\x20supported.');return requiredString(_0x2edf08[_0x596567(0x81)],_0x21ee78+_0x596567(0x92)),validateConfidence(_0x2edf08[_0x596567(0x96)],_0x21ee78+_0x596567(0x86)),tuple(_0x35cb68,_0x58c8d2,_0x55d687,_0x49eb33,_0x596567(0xc6),_0x248c53);}function relationTupleSet(_0x20f2ec,_0x2919f4,_0x182192){const _0x5389e6=a64_0xa1ed64,_0x4a7a41=new Set();for(const _0x21ddf0 of _0x20f2ec){const _0x166df6=stringValue(_0x21ddf0['fromDatasetKey']),_0xc44d80=stringValue(_0x21ddf0[_0x5389e6(0x8c)]),_0x152fb8=stringValue(_0x21ddf0[_0x5389e6(0x7f)])[_0x5389e6(0x9b)](),_0x5e2b08=stringValue(_0x21ddf0[_0x5389e6(0xcd)])[_0x5389e6(0x9b)](),_0x39cad1=stringValue(_0x21ddf0['relationType']),_0x5ab79c=stringValue(_0x21ddf0[_0x5389e6(0xb9)]);if(!_0x166df6||!_0xc44d80||!_0x152fb8||!_0x5e2b08||_0x39cad1!==_0x5389e6(0xc6)||!SUPPORTED_CARDINALITIES[_0x5389e6(0x89)](_0x5ab79c))return null;if(!_0x182192['has'](_0x166df6)||!_0x182192[_0x5389e6(0x89)](_0xc44d80))return null;if(_0x2919f4&&(stringValue(_0x21ddf0[_0x5389e6(0xd6)])!==_0x182192[_0x5389e6(0xd5)](_0x166df6)||stringValue(_0x21ddf0[_0x5389e6(0xbf)])!==_0x182192[_0x5389e6(0xd5)](_0xc44d80)))return null;const _0x580481=tuple(_0x166df6,_0x152fb8,_0xc44d80,_0x5e2b08,_0x39cad1,_0x5ab79c);if(_0x4a7a41[_0x5389e6(0x89)](_0x580481))return null;_0x4a7a41[_0x5389e6(0xbc)](_0x580481);}return _0x4a7a41;}function rejectServerDatasetIdentity(_0x3d2a22,_0xc6de){const _0x1795d=a64_0xa1ed64;for(const _0x509ed6 of['id',_0x1795d(0xb8),_0x1795d(0xaf),_0x1795d(0xb6),_0x1795d(0xa1),_0x1795d(0xd8)]){if(_0x3d2a22[_0x509ed6]!==undefined&&_0x3d2a22[_0x509ed6]!==null&&_0x3d2a22[_0x509ed6]!=='')fail(_0xc6de+'.'+_0x509ed6+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function objectArray(_0x1eeb9e,_0x1ebe97,_0x409296,_0x42ae37){const _0x56edca=a64_0xa1ed64;return(!Array['isArray'](_0x1eeb9e)||_0x1eeb9e[_0x56edca(0xa8)]<_0x409296||_0x1eeb9e['length']>_0x42ae37||_0x1eeb9e['some'](_0x3388d7=>!isObject(_0x3388d7)))&&fail(_0x1ebe97+'\x20must\x20contain\x20'+_0x409296+'..'+_0x42ae37+_0x56edca(0x93)),_0x1eeb9e;}function stringArray(_0x3bf14b,_0x2fc5be,_0x7b9313,_0x236807){const _0x5cbd95=a64_0xa1ed64;return(!Array[_0x5cbd95(0xa0)](_0x3bf14b)||_0x3bf14b[_0x5cbd95(0xa8)]<_0x7b9313||_0x3bf14b[_0x5cbd95(0xa8)]>_0x236807||_0x3bf14b[_0x5cbd95(0xb0)](_0x58a77f=>typeof _0x58a77f!==_0x5cbd95(0x73)||!_0x58a77f['trim']()))&&fail(_0x2fc5be+_0x5cbd95(0xb7)+_0x7b9313+'..'+_0x236807+_0x5cbd95(0x77)),_0x3bf14b;}function requiredString(_0x52516c,_0x58bc83){const _0x328077=a64_0xa1ed64,_0x3beba8=stringValue(_0x52516c);if(!_0x3beba8)fail(_0x58bc83+_0x328077(0x7a));return _0x3beba8;}function stringValue(_0x153b60){const _0x4547fd=a64_0xa1ed64;return typeof _0x153b60===_0x4547fd(0x73)?_0x153b60['trim']():'';}function fieldName(_0x54dd60){const _0x154574=a64_0xa1ed64;return stringValue(_0x54dd60[_0x154574(0xb6)]??_0x54dd60[_0x154574(0x7b)]??_0x54dd60[_0x154574(0xac)]??_0x54dd60[_0x154574(0x88)]);}function validateConfidence(_0x3500e6,_0x9361e8){const _0x50d551=a64_0xa1ed64;_0x3500e6!==undefined&&_0x3500e6!==null&&(typeof _0x3500e6!=='number'||!Number['isFinite'](_0x3500e6)||_0x3500e6<0x0||_0x3500e6>0x1)&&fail(_0x9361e8+_0x50d551(0xd4));}function tuple(..._0x2c1994){const _0x5c7286=a64_0xa1ed64;return _0x2c1994[_0x5c7286(0x9a)]((_0x3757e1,_0x17b78a)=>_0x17b78a===0x1||_0x17b78a===0x3?_0x3757e1[_0x5c7286(0x9b)]():_0x3757e1)[_0x5c7286(0x7e)]('\x00');}function a64_0x2821(_0x1a9e5c,_0x1db459){_0x1a9e5c=_0x1a9e5c-0x72;const _0x24e581=a64_0x24e5();let _0x282116=_0x24e581[_0x1a9e5c];return _0x282116;}function sameSet(_0x562500,_0x1bd426){const _0x346536=a64_0xa1ed64;return _0x562500[_0x346536(0x85)]===_0x1bd426[_0x346536(0x85)]&&[..._0x562500][_0x346536(0xbb)](_0x5dea6f=>_0x1bd426[_0x346536(0x89)](_0x5dea6f));}function isObject(_0x83fb7c){const _0x3ebd0e=a64_0xa1ed64;return typeof _0x83fb7c===_0x3ebd0e(0xbe)&&_0x83fb7c!==null&&!Array[_0x3ebd0e(0xa0)](_0x83fb7c);}function fail(_0x500677){const _0x2fce81=a64_0xa1ed64;throw CliErrors[_0x2fce81(0xab)](_0x500677);}function a64_0x24e5(){const _0x55598d=['name','206543KaFXkR','fromDatasetKey','modelId','some','expectedRelations','4DIOQRP','dataset-batch','3357240tMBfbj','fieldType','code','\x20must\x20contain\x20','datasetId','cardinality','483200bzHLxL','every','add','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','object','toDatasetCode','createdDatasets','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','].design.dataset','keys','].confidence','].design.fields[','lookup','\x20connects\x20incompatible\x20field\x20types.','metrics','Dataset\x20','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','NUMBER','datasetName','toField','.toField','UPLOAD','SELECT','dataset','].type\x20is\x20not\x20supported.','DATETIME','\x20must\x20be\x20between\x200\x20and\x201.','get','fromDatasetCode','].localKey\x20must\x20match\x20','modelCode','].design.fields','unresolvedRelations[','set','string','datasets','datasets[',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','\x20non-empty\x20strings.','relations[','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','\x20is\x20required.','fieldCode','12RXnMiE','refTableField','join','fromField','9721512qyCBuG','reason','5859994ZcXvbW','.relationType\x20must\x20be\x20\x22lookup\x22.','expectedLocalKeys','size','.confidence','].design','fieldName','has','refTableLabelField','toUpperCase','toDatasetKey','source','relationType','entries','.fromField','].design\x20must\x20be\x20an\x20object.','.reason','\x20objects.','2218164NmifWD','\x20references\x20an\x20unknown\x20field.','confidence','createdDatasets[].localKey','relations','875858OjWRHP','map','toLowerCase','unresolvedRelations','].localKey','kind','refTable','isArray','datasetCode','test','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','design','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','localKey','length','TEXT','ONE_TO_ONE','validation'];a64_0x24e5=function(){return _0x55598d;};return a64_0x24e5();}
|
|
1
|
+
const a64_0x2a35de=a64_0x2398;(function(_0x46d6da,_0x18d9bc){const _0xdb946c=a64_0x2398,_0x43b727=_0x46d6da();while(!![]){try{const _0x2af0e5=-parseInt(_0xdb946c(0x1d6))/0x1*(parseInt(_0xdb946c(0x195))/0x2)+-parseInt(_0xdb946c(0x178))/0x3*(-parseInt(_0xdb946c(0x1a8))/0x4)+parseInt(_0xdb946c(0x19b))/0x5+-parseInt(_0xdb946c(0x1af))/0x6*(parseInt(_0xdb946c(0x187))/0x7)+parseInt(_0xdb946c(0x18f))/0x8*(parseInt(_0xdb946c(0x18d))/0x9)+-parseInt(_0xdb946c(0x1c1))/0xa*(-parseInt(_0xdb946c(0x1c3))/0xb)+-parseInt(_0xdb946c(0x1c9))/0xc*(parseInt(_0xdb946c(0x1c2))/0xd);if(_0x2af0e5===_0x18d9bc)break;else _0x43b727['push'](_0x43b727['shift']());}catch(_0x579948){_0x43b727['push'](_0x43b727['shift']());}}}(a64_0xf2e0,0x31e24));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a64_0x2a35de(0x1c6),'ONE_TO_ONE']),SUPPORTED_FIELD_TYPES=new Set([a64_0x2a35de(0x1aa),'NUMBER',a64_0x2a35de(0x19d),a64_0x2a35de(0x1bc),a64_0x2a35de(0x181),a64_0x2a35de(0x1a1),a64_0x2a35de(0x17f),a64_0x2a35de(0x19f),'ADDRESS',a64_0x2a35de(0x189)]);export function isDatasetBatchDesign(_0x3564e8){const _0xbcd2f0=a64_0x2a35de;return isObject(_0x3564e8)&&_0x3564e8['kind']===_0xbcd2f0(0x186);}export function validateDatasetBatchDesign(_0x2d25fb){const _0x4cb1f9=a64_0x2a35de;(!isObject(_0x2d25fb)||_0x2d25fb[_0x4cb1f9(0x1cf)]!==_0x4cb1f9(0x186))&&fail(_0x4cb1f9(0x17c));_0x2d25fb[_0x4cb1f9(0x1cd)]!==0x1&&fail(_0x4cb1f9(0x1de));const _0x20bae9=objectArray(_0x2d25fb[_0x4cb1f9(0x177)],_0x4cb1f9(0x177),0x1,0x14),_0x2eb53a=objectArray(_0x2d25fb[_0x4cb1f9(0x1a7)],_0x4cb1f9(0x1a7),0x0,0xc8),_0x2d3b51=objectArray(_0x2d25fb[_0x4cb1f9(0x1d0)],_0x4cb1f9(0x1d0),0x0,0xc8),_0x5d9dc2=new Set(),_0x575406=new Map();for(const [_0x21c9bf,_0x4669ed]of _0x20bae9[_0x4cb1f9(0x191)]()){const _0xf06400=requiredString(_0x4669ed['localKey'],_0x4cb1f9(0x183)+_0x21c9bf+_0x4cb1f9(0x1b4));!LOCAL_KEY[_0x4cb1f9(0x1c7)](_0xf06400)&&fail(_0x4cb1f9(0x183)+_0x21c9bf+_0x4cb1f9(0x1e2)+LOCAL_KEY[_0x4cb1f9(0x17d)]+'.');_0x5d9dc2[_0x4cb1f9(0x1d1)](_0xf06400)&&fail(_0x4cb1f9(0x192));_0x5d9dc2[_0x4cb1f9(0x1df)](_0xf06400);!isObject(_0x4669ed[_0x4cb1f9(0x196)])&&fail(_0x4cb1f9(0x183)+_0x21c9bf+_0x4cb1f9(0x1b6));rejectServerDatasetIdentity(_0x4669ed[_0x4cb1f9(0x196)],_0x4cb1f9(0x183)+_0x21c9bf+_0x4cb1f9(0x179));if(!isObject(_0x4669ed[_0x4cb1f9(0x196)]['dataset']))fail(_0x4cb1f9(0x183)+_0x21c9bf+'].design.dataset\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x4669ed[_0x4cb1f9(0x196)][_0x4cb1f9(0x1d9)],'datasets['+_0x21c9bf+'].design.dataset'),requiredString(_0x4669ed['design'][_0x4cb1f9(0x1d9)]['datasetName'],'datasets['+_0x21c9bf+_0x4cb1f9(0x1cb));'relations'in _0x4669ed[_0x4cb1f9(0x196)]&&(!Array[_0x4cb1f9(0x1d7)](_0x4669ed[_0x4cb1f9(0x196)][_0x4cb1f9(0x1a7)])||_0x4669ed[_0x4cb1f9(0x196)][_0x4cb1f9(0x1a7)][_0x4cb1f9(0x17a)]!==0x0)&&fail(_0x4cb1f9(0x183)+_0x21c9bf+_0x4cb1f9(0x17b));const _0x56d6ed=objectArray(_0x4669ed[_0x4cb1f9(0x196)][_0x4cb1f9(0x1a9)],_0x4cb1f9(0x183)+_0x21c9bf+_0x4cb1f9(0x180),0x1,0xc8),_0x556f0c=new Map();for(const [_0x560efe,_0x3e3c2f]of _0x56d6ed[_0x4cb1f9(0x191)]()){const _0x5e6532=fieldName(_0x3e3c2f);if(!_0x5e6532)fail(_0x4cb1f9(0x183)+_0x21c9bf+_0x4cb1f9(0x1a4)+_0x560efe+']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.');const _0x21f0f1=_0x5e6532[_0x4cb1f9(0x1c0)]();if(_0x556f0c[_0x4cb1f9(0x1d1)](_0x21f0f1))fail(_0x4cb1f9(0x19e)+_0xf06400+'\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.');const _0x2bc87c=stringValue(_0x3e3c2f[_0x4cb1f9(0x1d5)]??_0x3e3c2f[_0x4cb1f9(0x1bd)])['toUpperCase']();if(!SUPPORTED_FIELD_TYPES[_0x4cb1f9(0x1d1)](_0x2bc87c))fail('datasets['+_0x21c9bf+'].design.fields['+_0x560efe+_0x4cb1f9(0x18a));_0x556f0c[_0x4cb1f9(0x176)](_0x21f0f1,_0x2bc87c),[_0x3e3c2f[_0x4cb1f9(0x1dd)],_0x3e3c2f[_0x4cb1f9(0x1b8)],_0x3e3c2f[_0x4cb1f9(0x18e)]][_0x4cb1f9(0x1ba)](_0x5c6cab=>stringValue(_0x5c6cab))&&fail(_0x4cb1f9(0x183)+_0x21c9bf+_0x4cb1f9(0x1a4)+_0x560efe+_0x4cb1f9(0x1d2));}_0x575406['set'](_0xf06400,_0x556f0c);}const _0x499e18=new Set(),_0x41def8=new Set();for(const [_0x3682b3,_0x5b0a35]of _0x2eb53a[_0x4cb1f9(0x191)]()){const _0x3ac892=validateRelation(_0x5b0a35,_0x3682b3,_0x5d9dc2,_0x575406);if(_0x499e18[_0x4cb1f9(0x1d1)](_0x3ac892))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0x499e18[_0x4cb1f9(0x1df)](_0x3ac892);const _0x59ff86=_0x3ac892['split']('\x00',0x2)[_0x4cb1f9(0x188)]('\x00');if(_0x41def8['has'](_0x59ff86))fail(_0x4cb1f9(0x1b7));_0x41def8[_0x4cb1f9(0x1df)](_0x59ff86);}for(const [_0x28e2df,_0x113f8d]of _0x2d3b51[_0x4cb1f9(0x191)]()){requiredString(_0x113f8d[_0x4cb1f9(0x19c)],'unresolvedRelations['+_0x28e2df+_0x4cb1f9(0x198)),validateConfidence(_0x113f8d[_0x4cb1f9(0x1a3)],_0x4cb1f9(0x1bf)+_0x28e2df+_0x4cb1f9(0x1db));}return _0x2d25fb;}export function reconcileBatchResult(_0xd32729){const _0x4ab248=a64_0x2a35de;if(!isObject(_0xd32729))return null;try{const _0x413249=stringArray(_0xd32729[_0x4ab248(0x1ae)],_0x4ab248(0x1ae),0x1,0x14),_0x3c876a=new Set(_0x413249);if(_0x3c876a[_0x4ab248(0x197)]!==_0x413249[_0x4ab248(0x17a)]||_0x413249['some'](_0xfd70ef=>!LOCAL_KEY['test'](_0xfd70ef)))return null;const _0x398c9b=objectArray(_0xd32729[_0x4ab248(0x1e3)],_0x4ab248(0x1e3),0x1,0x14),_0x205166=new Map(),_0x594f02=new Set();for(const _0x1ec35d of _0x398c9b){const _0x46ba36=requiredString(_0x1ec35d[_0x4ab248(0x1b5)],_0x4ab248(0x1e4)),_0x713d80=requiredString(_0x1ec35d[_0x4ab248(0x1ad)]??_0x1ec35d[_0x4ab248(0x1a2)],_0x4ab248(0x1b2));if(_0x205166[_0x4ab248(0x1d1)](_0x46ba36)||_0x594f02[_0x4ab248(0x1d1)](_0x713d80))return null;_0x205166['set'](_0x46ba36,_0x713d80),_0x594f02['add'](_0x713d80);}if(!sameSet(_0x3c876a,new Set(_0x205166['keys']())))return null;const _0x40f45a=objectArray(_0xd32729[_0x4ab248(0x1b0)],_0x4ab248(0x1b0),0x0,0xc8),_0x19e882=objectArray(_0xd32729[_0x4ab248(0x1bb)],_0x4ab248(0x1bb),0x0,0xc8),_0xf13514=relationTupleSet(_0x40f45a,![],_0x205166),_0xb4881a=relationTupleSet(_0x19e882,!![],_0x205166);if(!_0xf13514||!_0xb4881a||!sameSet(_0xf13514,_0xb4881a))return null;const _0x541a29=objectArray(_0xd32729[_0x4ab248(0x1d0)],'unresolvedRelations',0x0,0xc8);return{'expectedLocalKeys':_0x413249,'expectedRelations':_0x40f45a,'createdDatasets':_0x398c9b,'createdRelations':_0x19e882,'unresolvedRelations':_0x541a29,...isObject(_0xd32729['metrics'])?{'metrics':_0xd32729['metrics']}:{}};}catch{return null;}}function validateRelation(_0x15894a,_0x4c1d17,_0x825885,_0x5c225e){const _0x53b626=a64_0x2a35de,_0x58480f=_0x53b626(0x1c8)+_0x4c1d17+']',_0x3974fb=requiredString(_0x15894a[_0x53b626(0x1e0)],_0x58480f+_0x53b626(0x18b)),_0x97253d=requiredString(_0x15894a['toDatasetKey'],_0x58480f+_0x53b626(0x1b3)),_0x2247a3=requiredString(_0x15894a[_0x53b626(0x1b9)],_0x58480f+'.fromField')['toLowerCase'](),_0x55cbda=requiredString(_0x15894a['toField'],_0x58480f+'.toField')['toLowerCase']();if(!_0x825885['has'](_0x3974fb)||!_0x825885['has'](_0x97253d))fail(_0x58480f+_0x53b626(0x193));const _0x51938a=_0x5c225e[_0x53b626(0x182)](_0x3974fb)?.[_0x53b626(0x182)](_0x2247a3),_0x32627c=_0x5c225e[_0x53b626(0x182)](_0x97253d)?.['get'](_0x55cbda);if(_0x51938a===undefined||_0x32627c===undefined)fail(_0x58480f+_0x53b626(0x17e));if(_0x51938a&&_0x32627c&&_0x51938a!==_0x32627c)fail(_0x58480f+_0x53b626(0x1e5));const _0x290ab3=stringValue(_0x15894a['relationType'])||'lookup';if(_0x290ab3!=='lookup')fail(_0x58480f+_0x53b626(0x1ac));const _0x27739a=stringValue(_0x15894a[_0x53b626(0x1d4)])||'MANY_TO_ONE';if(!SUPPORTED_CARDINALITIES[_0x53b626(0x1d1)](_0x27739a))fail(_0x58480f+_0x53b626(0x1b1));return requiredString(_0x15894a[_0x53b626(0x19c)],_0x58480f+_0x53b626(0x1d8)),validateConfidence(_0x15894a[_0x53b626(0x1a3)],_0x58480f+_0x53b626(0x1c5)),tuple(_0x3974fb,_0x2247a3,_0x97253d,_0x55cbda,_0x53b626(0x173),_0x27739a);}function relationTupleSet(_0x439e06,_0x3f89d8,_0x4c6bb2){const _0x41c5a5=a64_0x2a35de,_0x480631=new Set();for(const _0x4d5b13 of _0x439e06){const _0x167c18=stringValue(_0x4d5b13['fromDatasetKey']),_0x46003c=stringValue(_0x4d5b13[_0x41c5a5(0x1c4)]),_0x568485=stringValue(_0x4d5b13['fromField'])['toLowerCase'](),_0x5bfaff=stringValue(_0x4d5b13[_0x41c5a5(0x199)])[_0x41c5a5(0x1c0)](),_0xb62216=stringValue(_0x4d5b13[_0x41c5a5(0x175)]),_0x360afc=stringValue(_0x4d5b13[_0x41c5a5(0x1d4)]);if(!_0x167c18||!_0x46003c||!_0x568485||!_0x5bfaff||_0xb62216!==_0x41c5a5(0x173)||!SUPPORTED_CARDINALITIES[_0x41c5a5(0x1d1)](_0x360afc))return null;if(!_0x4c6bb2['has'](_0x167c18)||!_0x4c6bb2[_0x41c5a5(0x1d1)](_0x46003c))return null;if(_0x3f89d8&&(stringValue(_0x4d5b13['fromDatasetCode'])!==_0x4c6bb2[_0x41c5a5(0x182)](_0x167c18)||stringValue(_0x4d5b13[_0x41c5a5(0x1da)])!==_0x4c6bb2[_0x41c5a5(0x182)](_0x46003c)))return null;const _0x3971f8=tuple(_0x167c18,_0x568485,_0x46003c,_0x5bfaff,_0xb62216,_0x360afc);if(_0x480631[_0x41c5a5(0x1d1)](_0x3971f8))return null;_0x480631[_0x41c5a5(0x1df)](_0x3971f8);}return _0x480631;}function rejectServerDatasetIdentity(_0x4b8cf7,_0x1f3572){const _0x4c37e9=a64_0x2a35de;for(const _0x3156fa of['id',_0x4c37e9(0x1be),_0x4c37e9(0x1a5),_0x4c37e9(0x1ad),_0x4c37e9(0x1a2),_0x4c37e9(0x1dc)]){if(_0x4b8cf7[_0x3156fa]!==undefined&&_0x4b8cf7[_0x3156fa]!==null&&_0x4b8cf7[_0x3156fa]!=='')fail(_0x1f3572+'.'+_0x3156fa+_0x4c37e9(0x174));}}function objectArray(_0x152411,_0x304a5e,_0xd17d42,_0x4f69ef){const _0x45df4a=a64_0x2a35de;return(!Array[_0x45df4a(0x1d7)](_0x152411)||_0x152411[_0x45df4a(0x17a)]<_0xd17d42||_0x152411['length']>_0x4f69ef||_0x152411['some'](_0x527a8c=>!isObject(_0x527a8c)))&&fail(_0x304a5e+'\x20must\x20contain\x20'+_0xd17d42+'..'+_0x4f69ef+_0x45df4a(0x1e1)),_0x152411;}function stringArray(_0x51bbe0,_0x38adeb,_0x1c7ee2,_0x3e807f){const _0x11ad83=a64_0x2a35de;return(!Array['isArray'](_0x51bbe0)||_0x51bbe0[_0x11ad83(0x17a)]<_0x1c7ee2||_0x51bbe0[_0x11ad83(0x17a)]>_0x3e807f||_0x51bbe0['some'](_0x33db4f=>typeof _0x33db4f!==_0x11ad83(0x194)||!_0x33db4f[_0x11ad83(0x1ca)]()))&&fail(_0x38adeb+_0x11ad83(0x1d3)+_0x1c7ee2+'..'+_0x3e807f+_0x11ad83(0x1cc)),_0x51bbe0;}function a64_0xf2e0(){const _0x466993=['13sgSgKf','307274ZBgeZb','toDatasetKey','.confidence','MANY_TO_ONE','test','relations[','3046716EWkoMf','trim','].design.dataset.datasetName','\x20non-empty\x20strings.','schemaVersion','every','kind','unresolvedRelations','has',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','\x20must\x20contain\x20','cardinality','type','78YsmGpZ','isArray','.reason','dataset','toDatasetCode','].confidence','modelCode','refTable','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','add','fromDatasetKey','\x20objects.','].localKey\x20must\x20match\x20','createdDatasets','createdDatasets[].localKey','\x20connects\x20incompatible\x20field\x20types.','lookup','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','relationType','set','datasets','3MEBAje','].design','length','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','source','\x20references\x20an\x20unknown\x20field.','DATE_RANGE','].design.fields','SELECT','get','datasets[','object','number','dataset-batch','7oriCev','join','UPLOAD','].type\x20is\x20not\x20supported.','.fromDatasetKey','isFinite','1271718fSDTUA','refTableLabelField','8JlVzGU','\x20is\x20required.','entries','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','\x20references\x20an\x20unknown\x20dataset\x20localKey.','string','5728TnPTLf','design','size','].reason','toField','validation','1150250KVRWlR','reason','DATETIME','Dataset\x20','USER','map','MULTI_SELECT','datasetCode','confidence','].design.fields[','modelId','name','relations','1360064eavtCP','fields','TEXT','fieldCode','.relationType\x20must\x20be\x20\x22lookup\x22.','code','expectedLocalKeys','1351782qFzZij','expectedRelations','.cardinality\x20is\x20not\x20supported.','createdDatasets[].code','.toDatasetKey','].localKey','localKey','].design\x20must\x20be\x20an\x20object.','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','refTableField','fromField','some','createdRelations','BOOLEAN','fieldType','datasetId','unresolvedRelations[','toLowerCase','70LiAbDU'];a64_0xf2e0=function(){return _0x466993;};return a64_0xf2e0();}function requiredString(_0xd04245,_0x3a2885){const _0x5c1399=a64_0x2a35de,_0x1ab9d9=stringValue(_0xd04245);if(!_0x1ab9d9)fail(_0x3a2885+_0x5c1399(0x190));return _0x1ab9d9;}function stringValue(_0x19b9b3){const _0x1f4cd8=a64_0x2a35de;return typeof _0x19b9b3===_0x1f4cd8(0x194)?_0x19b9b3[_0x1f4cd8(0x1ca)]():'';}function fieldName(_0x5b2c32){const _0x29b2a1=a64_0x2a35de;return stringValue(_0x5b2c32[_0x29b2a1(0x1ad)]??_0x5b2c32[_0x29b2a1(0x1ab)]??_0x5b2c32[_0x29b2a1(0x1a6)]??_0x5b2c32['fieldName']);}function validateConfidence(_0x4012ee,_0x26e0f4){const _0x225083=a64_0x2a35de;_0x4012ee!==undefined&&_0x4012ee!==null&&(typeof _0x4012ee!==_0x225083(0x185)||!Number[_0x225083(0x18c)](_0x4012ee)||_0x4012ee<0x0||_0x4012ee>0x1)&&fail(_0x26e0f4+'\x20must\x20be\x20between\x200\x20and\x201.');}function tuple(..._0x4a41b9){const _0x4e5c10=a64_0x2a35de;return _0x4a41b9[_0x4e5c10(0x1a0)]((_0x2b54b0,_0x30009e)=>_0x30009e===0x1||_0x30009e===0x3?_0x2b54b0['toLowerCase']():_0x2b54b0)[_0x4e5c10(0x188)]('\x00');}function sameSet(_0x496348,_0x28b67b){const _0x49d49e=a64_0x2a35de;return _0x496348[_0x49d49e(0x197)]===_0x28b67b[_0x49d49e(0x197)]&&[..._0x496348][_0x49d49e(0x1ce)](_0xe5b128=>_0x28b67b[_0x49d49e(0x1d1)](_0xe5b128));}function a64_0x2398(_0x11b317,_0x2fa5ec){_0x11b317=_0x11b317-0x173;const _0xf2e0df=a64_0xf2e0();let _0x2398e0=_0xf2e0df[_0x11b317];return _0x2398e0;}function isObject(_0x11ace8){const _0x36a859=a64_0x2a35de;return typeof _0x11ace8===_0x36a859(0x184)&&_0x11ace8!==null&&!Array['isArray'](_0x11ace8);}function fail(_0x16626a){const _0x2ce201=a64_0x2a35de;throw CliErrors[_0x2ce201(0x19a)](_0x16626a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x3015e4=a65_0x2b46;(function(_0xc56e29,_0x484b5f){const _0x13830b=a65_0x2b46,_0x397c76=_0xc56e29();while(!![]){try{const _0x305afe=-parseInt(_0x13830b(0xd6))/0x1+parseInt(_0x13830b(0x11a))/0x2*(-parseInt(_0x13830b(0x108))/0x3)+-parseInt(_0x13830b(0x11b))/0x4*(-parseInt(_0x13830b(0xda))/0x5)+-parseInt(_0x13830b(0xf2))/0x6*(parseInt(_0x13830b(0xec))/0x7)+-parseInt(_0x13830b(0x104))/0x8+-parseInt(_0x13830b(0xea))/0x9+-parseInt(_0x13830b(0x10c))/0xa*(-parseInt(_0x13830b(0x116))/0xb);if(_0x305afe===_0x484b5f)break;else _0x397c76['push'](_0x397c76['shift']());}catch(_0x539277){_0x397c76['push'](_0x397c76['shift']());}}}(a65_0x4e65,0x69ca5));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH='/smartapi/dblink/updateTableBusinessGroup',METADATA_BACKEND_PATH=a65_0x3015e4(0x119),UNGROUPED_BUSINESS_GROUP=a65_0x3015e4(0x10f);function a65_0x2b46(_0x4cb75b,_0x24699d){_0x4cb75b=_0x4cb75b-0xcf;const _0x4e6558=a65_0x4e65();let _0x2b4631=_0x4e6558[_0x4cb75b];return _0x2b4631;}export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x46d425,input:_0x52788f,dryRun:_0x3c8d65}){const _0x65bd61=a65_0x3015e4;validateInput(_0x52788f);const _0x276174=normalizeBusinessGroupArgument(_0x52788f[_0x65bd61(0xe3)]),_0x2cb119=await getDatasetDetail(_0x52788f[_0x65bd61(0x110)]),_0x370169=resolveBusinessGroupDataset(_0x2cb119,_0x52788f[_0x65bd61(0x110)]);assertBusinessGroupUpdateSupported(_0x370169,_0x276174);const _0x68f523=loadCurrentBusinessGroup(_0x2cb119,_0x370169);assertExpectedBusinessGroup(_0x68f523,_0x52788f[_0x65bd61(0xd7)]);const _0x463754=buildBackendPlan(_0x46d425,_0x370169,_0x276174),_0x53ee2f=_0x68f523!==_0x276174;let _0x26ff93;if(_0x53ee2f&&!_0x3c8d65){_0x463754[_0x65bd61(0x10b)]===_0x65bd61(0x112)?await updateDbTableBusinessGroup(_0x463754['payload']):await updateErBusinessGroup(_0x463754[_0x65bd61(0xd4)]);const _0x4605d5=await getDatasetDetail(_0x370169[_0x65bd61(0x110)]),_0x324367=resolveBusinessGroupDataset(_0x4605d5,_0x370169[_0x65bd61(0x110)]),_0x27f12d=loadCurrentBusinessGroup(_0x4605d5,_0x324367);if(_0x27f12d!==_0x276174)throw CliErrors[_0x65bd61(0x109)](_0x65bd61(0xf8),_0x65bd61(0xe9)+JSON['stringify'](displayBusinessGroup(_0x276174))+_0x65bd61(0xee)+JSON[_0x65bd61(0xff)](displayBusinessGroup(_0x27f12d))+'.');_0x26ff93={'verified':!![],'status':_0x65bd61(0xcf),'afterReadback':{'businessGroup':displayBusinessGroup(_0x27f12d)}};}else!_0x53ee2f&&(_0x26ff93={'verified':!![],'status':_0x65bd61(0xd5),'afterReadback':{'businessGroup':displayBusinessGroup(_0x68f523)}});const _0x39b567={'operation':'update','appCode':_0x46d425,'selector':{'code':_0x370169[_0x65bd61(0x110)]},'dataset':{'id':_0x370169['id'],'code':_0x370169[_0x65bd61(0x110)],'name':_0x370169[_0x65bd61(0xfb)],'sourceType':_0x370169[_0x65bd61(0x117)]},'before':{'businessGroup':displayBusinessGroup(_0x68f523)},'after':{'businessGroup':displayBusinessGroup(_0x276174)},'changed':_0x53ee2f,'dryRun':_0x3c8d65,'submitted':_0x53ee2f&&!_0x3c8d65,'backend':{'method':_0x463754[_0x65bd61(0x10e)],'path':_0x463754[_0x65bd61(0xe0)],'payload':_0x463754[_0x65bd61(0xd4)]},..._0x26ff93?{'verification':_0x26ff93}:{},'warnings':[]};return{'ok':!![],'data':_0x39b567,'message':_0x53ee2f?_0x3c8d65?_0x65bd61(0xfe)+_0x370169[_0x65bd61(0x110)]:_0x65bd61(0x101)+_0x370169[_0x65bd61(0x110)]:_0x65bd61(0xdb)+_0x370169[_0x65bd61(0x110)]};}export const datasetBusinessGroupUpdate={'service':a65_0x3015e4(0xe5),'command':'business-group-update','description':a65_0x3015e4(0xe4),'risk':a65_0x3015e4(0x115),'flags':[CODE_FLAG,{'name':a65_0x3015e4(0x10a),'type':a65_0x3015e4(0xe8),'required':!![],'description':a65_0x3015e4(0x102)},{'name':a65_0x3015e4(0xe1),'type':a65_0x3015e4(0xe8),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x303ef9){validateInput(readBusinessGroupUpdateInput(_0x303ef9));},async 'dryRun'(_0x4b38f6){const _0x55fe0c=a65_0x3015e4,_0xac549f=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x4b38f6['appCode'],'input':readBusinessGroupUpdateInput(_0x4b38f6),'dryRun':!![]});return{'method':_0xac549f[_0x55fe0c(0xf5)][_0x55fe0c(0x11c)]['method'],'url':_0xac549f[_0x55fe0c(0xf5)][_0x55fe0c(0x11c)][_0x55fe0c(0xe0)],'body':_0xac549f[_0x55fe0c(0xf5)][_0x55fe0c(0x11c)]['payload'],'description':_0xac549f['message'],..._0xac549f[_0x55fe0c(0xf5)]};},async 'execute'(_0x25a3ce){const _0x427e54=a65_0x3015e4;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x25a3ce[_0x427e54(0xd3)],'input':readBusinessGroupUpdateInput(_0x25a3ce),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x4721f3){const _0x2b39b0=a65_0x3015e4,_0x3510fa=_0x4721f3[_0x2b39b0(0xde)](_0x2b39b0(0xe1));return{'code':trim(_0x4721f3[_0x2b39b0(0xde)](_0x2b39b0(0x110))),'businessGroup':_0x4721f3[_0x2b39b0(0xde)](_0x2b39b0(0x10a)),'expectBusinessGroup':_0x3510fa===undefined||_0x3510fa===''?undefined:_0x3510fa};}function validateInput(_0x135ae7){const _0x330f23=a65_0x3015e4;if(!trim(_0x135ae7[_0x330f23(0x110)]))throw CliErrors['validation'](_0x330f23(0xf6));if(_0x135ae7[_0x330f23(0xe3)]===undefined)throw CliErrors[_0x330f23(0x100)](_0x330f23(0xfd));if(!trim(_0x135ae7[_0x330f23(0xe3)]))throw CliErrors[_0x330f23(0x100)](_0x330f23(0xdf));}function assertBusinessGroupUpdateSupported(_0x1ac653,_0x283359){const _0x534c52=a65_0x3015e4;if(_0x1ac653[_0x534c52(0x117)]===_0x534c52(0xe6)&&!_0x283359)throw CliErrors['validation'](_0x534c52(0xd1));}function resolveBusinessGroupDataset(_0x5a80b6,_0x16c6b5){const _0x42eaf4=a65_0x3015e4,_0x2b36f0=asPlainObject(_0x5a80b6[_0x42eaf4(0xe5)]),_0x516315=asPlainObject(_0x5a80b6[_0x42eaf4(0x105)]),_0x462b12=resolveSourceType(_0x5a80b6,_0x2b36f0,_0x516315),_0x452f85=firstString(_0x5a80b6[_0x42eaf4(0x103)],_0x5a80b6['code'],_0x2b36f0[_0x42eaf4(0xdc)],_0x16c6b5)||_0x16c6b5;return{'id':firstNumber(_0x5a80b6['modelId'],_0x5a80b6['id'],_0x2b36f0[_0x42eaf4(0x111)])??firstString(_0x5a80b6[_0x42eaf4(0xf7)],_0x5a80b6['id'],_0x2b36f0[_0x42eaf4(0x111)])??null,'code':_0x452f85,'name':firstString(_0x5a80b6[_0x42eaf4(0xfb)],_0x2b36f0[_0x42eaf4(0x106)],_0x2b36f0['name'])||null,'sourceType':_0x462b12,'dbTableSelector':_0x462b12==='DB_TABLE'?{'dbLinkId':firstNumber(_0x516315[_0x42eaf4(0xe7)]),'tableName':firstString(_0x516315['tableName'])||null}:null};}function resolveSourceType(_0x38435e,_0x126506,_0x28132f){const _0x407a9b=a65_0x3015e4,_0x2c3bde=firstString(_0x38435e[_0x407a9b(0xf4)],_0x38435e[_0x407a9b(0x117)],_0x126506[_0x407a9b(0xf4)],_0x126506[_0x407a9b(0x117)])?.[_0x407a9b(0xd0)]()[_0x407a9b(0xf3)]();if(_0x2c3bde===_0x407a9b(0xe6)||_0x2c3bde===_0x407a9b(0x10d))return _0x2c3bde;if(Object['keys'](_0x28132f)['length']>0x0)return'DB_TABLE';throw CliErrors[_0x407a9b(0x100)](_0x407a9b(0xfc));}function loadCurrentBusinessGroup(_0x247982,_0x52bd97){const _0x5c87c3=a65_0x3015e4,_0x4b05b6=readBusinessGroupFromDatasetDetail(_0x247982,_0x52bd97[_0x5c87c3(0x117)]);if(_0x4b05b6[_0x5c87c3(0xf9)])return normalizeBusinessGroup(_0x4b05b6[_0x5c87c3(0x114)]);return'';}function readBusinessGroupFromDatasetDetail(_0x43094e,_0x328306){const _0x265c25=a65_0x3015e4,_0x22d7c5=asPlainObject(_0x43094e[_0x265c25(0xe5)]),_0x11e550=firstPresent(_0x43094e[_0x265c25(0xe3)]);if(_0x11e550[_0x265c25(0xf9)])return _0x11e550;const _0x5f09b5=firstPresent(_0x22d7c5[_0x265c25(0xe3)]);if(_0x5f09b5[_0x265c25(0xf9)])return _0x5f09b5;if(_0x328306===_0x265c25(0xe6))return{'found':![]};const _0x4ecf33=readBusinessGroupFromExtend(_0x43094e[_0x265c25(0xeb)]);if(_0x4ecf33[_0x265c25(0xf9)])return _0x4ecf33;return readBusinessGroupFromExtend(_0x22d7c5[_0x265c25(0xeb)]);}function readBusinessGroupFromExtend(_0x1163cd){const _0x27d893=a65_0x3015e4;if(_0x1163cd===undefined||_0x1163cd===null||_0x1163cd==='')return{'found':![]};if(typeof _0x1163cd===_0x27d893(0xe8))try{const _0x7b4807=JSON[_0x27d893(0xdd)](_0x1163cd);return readBusinessGroupFromExtend(_0x7b4807);}catch{return{'found':![]};}const _0x5b5e8d=asPlainObject(_0x1163cd);if(Object[_0x27d893(0xfa)][_0x27d893(0x107)][_0x27d893(0xed)](_0x5b5e8d,_0x27d893(0xe3)))return{'found':!![],'value':_0x5b5e8d[_0x27d893(0xe3)]};return{'found':![]};}function firstPresent(..._0x333b44){for(const _0x19ae28 of _0x333b44){if(_0x19ae28!==undefined&&_0x19ae28!==null)return{'found':!![],'value':_0x19ae28};}return{'found':![]};}function a65_0x4e65(){const _0x37777f=['db-table','dbTableSelector','value','write','16432559UkMYxn','sourceType','object','/smartapi/question/er-config/business-group/edit','2ojvaMo','28lnMDvT','backend','matched','trim','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','POST','appCode','payload','unchanged','727556ssvzLF','expectBusinessGroup','number','tableName','11965vxaEkD','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','datasetCode','parse','str','--business-group\x20must\x20not\x20be\x20blank','path','expect-business-group','isFinite','businessGroup','Update\x20business\x20scenario\x20group','dataset','DB_TABLE','dbId','string','Expected\x20','1251819CeKXau','extend','3295978CukNcF','call',',\x20actual\x20','dbLinkId','isArray','Expectation\x20mismatch\x20at\x20businessGroup','6VElytr','toUpperCase','source','data','--code\x20is\x20required','modelId','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','found','prototype','name','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','--business-group\x20is\x20required','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','stringify','validation','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','modelCode','3780952EaKpOR','dbtableConfig','datasetName','hasOwnProperty','2283156SyHIhz','apiError','business-group','kind','20jQdBQB','METADATA','method','ungrouped','code','datasetId'];a65_0x4e65=function(){return _0x37777f;};return a65_0x4e65();}function assertExpectedBusinessGroup(_0x237501,_0x1749e1){const _0x505bb8=a65_0x3015e4;if(_0x1749e1===undefined)return;const _0xb8e24f=normalizeBusinessGroupArgument(_0x1749e1);if(_0x237501!==_0xb8e24f)throw CliErrors[_0x505bb8(0x100)](_0x505bb8(0xf1),_0x505bb8(0xe9)+JSON[_0x505bb8(0xff)](_0xb8e24f)+_0x505bb8(0xee)+JSON['stringify'](_0x237501));}function buildBackendPlan(_0x310afd,_0x4c4769,_0x496106){const _0x2a8b16=a65_0x3015e4;if(_0x4c4769[_0x2a8b16(0x117)]==='DB_TABLE'){if(!_0x4c4769[_0x2a8b16(0x113)]||_0x4c4769[_0x2a8b16(0x113)][_0x2a8b16(0xef)]===null||!_0x4c4769[_0x2a8b16(0x113)]['tableName'])throw CliErrors[_0x2a8b16(0x100)]('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.');return{'kind':_0x2a8b16(0x112),'method':_0x2a8b16(0xd2),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x4c4769['dbTableSelector'][_0x2a8b16(0xef)],'tableName':_0x4c4769[_0x2a8b16(0x113)][_0x2a8b16(0xd9)],'businessGroup':_0x496106}};}return{'kind':'metadata','method':_0x2a8b16(0xd2),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x310afd,'datasetCode':_0x4c4769[_0x2a8b16(0x110)],'businessGroup':_0x496106}};}function normalizeBusinessGroup(_0x3f37e0){const _0xe7ef6c=a65_0x3015e4;if(_0x3f37e0===undefined||_0x3f37e0===null)return'';return String(_0x3f37e0)[_0xe7ef6c(0xd0)]();}function normalizeBusinessGroupArgument(_0x2e7abb){const _0x2784d8=normalizeBusinessGroup(_0x2e7abb);return _0x2784d8===UNGROUPED_BUSINESS_GROUP?'':_0x2784d8;}function displayBusinessGroup(_0xedf53a){return _0xedf53a||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x3b35c5){const _0x23c597=a65_0x3015e4;if(!_0x3b35c5||typeof _0x3b35c5!==_0x23c597(0x118)||Array[_0x23c597(0xf0)](_0x3b35c5))return{};return _0x3b35c5;}function firstString(..._0x377053){const _0x4f6901=a65_0x3015e4;for(const _0x4bfade of _0x377053){if(typeof _0x4bfade==='string'&&_0x4bfade[_0x4f6901(0xd0)]())return _0x4bfade[_0x4f6901(0xd0)]();if(typeof _0x4bfade==='number'&&Number[_0x4f6901(0xe2)](_0x4bfade))return String(_0x4bfade);}return undefined;}function firstNumber(..._0x1e84b5){const _0x47da02=a65_0x3015e4;for(const _0x39e1ea of _0x1e84b5){if(typeof _0x39e1ea===_0x47da02(0xd8)&&Number[_0x47da02(0xe2)](_0x39e1ea))return _0x39e1ea;if(typeof _0x39e1ea==='string'&&_0x39e1ea[_0x47da02(0xd0)]()&&Number[_0x47da02(0xe2)](Number(_0x39e1ea)))return Number(_0x39e1ea);}return null;}function trim(_0xbccfc){return String(_0xbccfc||'')['trim']();}
|
|
1
|
+
const a65_0x29055f=a65_0xe7fa;(function(_0x38164d,_0x5bbac2){const _0x40dbed=a65_0xe7fa,_0x177118=_0x38164d();while(!![]){try{const _0x3c2930=-parseInt(_0x40dbed(0xeb))/0x1*(parseInt(_0x40dbed(0xcb))/0x2)+parseInt(_0x40dbed(0xc2))/0x3+parseInt(_0x40dbed(0xb7))/0x4*(-parseInt(_0x40dbed(0xe4))/0x5)+parseInt(_0x40dbed(0xe7))/0x6+parseInt(_0x40dbed(0xac))/0x7*(-parseInt(_0x40dbed(0xc4))/0x8)+-parseInt(_0x40dbed(0xb2))/0x9*(parseInt(_0x40dbed(0xe6))/0xa)+parseInt(_0x40dbed(0xea))/0xb;if(_0x3c2930===_0x5bbac2)break;else _0x177118['push'](_0x177118['shift']());}catch(_0x3fb52c){_0x177118['push'](_0x177118['shift']());}}}(a65_0x33fd,0x947ce));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=a65_0x29055f(0xdb),METADATA_BACKEND_PATH=a65_0x29055f(0xe8),UNGROUPED_BUSINESS_GROUP=a65_0x29055f(0xab);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0xbf8877,input:_0x1b58fa,dryRun:_0x1c2610}){const _0xc5feab=a65_0x29055f;validateInput(_0x1b58fa);const _0x15fbed=normalizeBusinessGroupArgument(_0x1b58fa[_0xc5feab(0xba)]),_0x47ac2d=await getDatasetDetail(_0x1b58fa[_0xc5feab(0xaa)]),_0x59cba7=resolveBusinessGroupDataset(_0x47ac2d,_0x1b58fa[_0xc5feab(0xaa)]);assertBusinessGroupUpdateSupported(_0x59cba7,_0x15fbed);const _0x597a48=loadCurrentBusinessGroup(_0x47ac2d,_0x59cba7);assertExpectedBusinessGroup(_0x597a48,_0x1b58fa[_0xc5feab(0xdc)]);const _0x53acc3=buildBackendPlan(_0xbf8877,_0x59cba7,_0x15fbed),_0x2c2408=_0x597a48!==_0x15fbed;let _0x1305f7;if(_0x2c2408&&!_0x1c2610){_0x53acc3['kind']===_0xc5feab(0xd8)?await updateDbTableBusinessGroup(_0x53acc3[_0xc5feab(0xe2)]):await updateErBusinessGroup(_0x53acc3[_0xc5feab(0xe2)]);const _0x2d86a6=await getDatasetDetail(_0x59cba7[_0xc5feab(0xaa)]),_0x434b07=resolveBusinessGroupDataset(_0x2d86a6,_0x59cba7[_0xc5feab(0xaa)]),_0x2c325f=loadCurrentBusinessGroup(_0x2d86a6,_0x434b07);if(_0x2c325f!==_0x15fbed)throw CliErrors['apiError']('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0xc5feab(0xaf)+JSON[_0xc5feab(0xdf)](displayBusinessGroup(_0x15fbed))+_0xc5feab(0xa8)+JSON['stringify'](displayBusinessGroup(_0x2c325f))+'.');_0x1305f7={'verified':!![],'status':_0xc5feab(0xe0),'afterReadback':{'businessGroup':displayBusinessGroup(_0x2c325f)}};}else!_0x2c2408&&(_0x1305f7={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x597a48)}});const _0x18b67b={'operation':_0xc5feab(0xed),'appCode':_0xbf8877,'selector':{'code':_0x59cba7['code']},'dataset':{'id':_0x59cba7['id'],'code':_0x59cba7[_0xc5feab(0xaa)],'name':_0x59cba7[_0xc5feab(0xee)],'sourceType':_0x59cba7[_0xc5feab(0xb8)]},'before':{'businessGroup':displayBusinessGroup(_0x597a48)},'after':{'businessGroup':displayBusinessGroup(_0x15fbed)},'changed':_0x2c2408,'dryRun':_0x1c2610,'submitted':_0x2c2408&&!_0x1c2610,'backend':{'method':_0x53acc3[_0xc5feab(0xd7)],'path':_0x53acc3[_0xc5feab(0xcd)],'payload':_0x53acc3[_0xc5feab(0xe2)]},..._0x1305f7?{'verification':_0x1305f7}:{},'warnings':[]};return{'ok':!![],'data':_0x18b67b,'message':_0x2c2408?_0x1c2610?_0xc5feab(0xc7)+_0x59cba7[_0xc5feab(0xaa)]:_0xc5feab(0xe5)+_0x59cba7[_0xc5feab(0xaa)]:_0xc5feab(0xb3)+_0x59cba7['code']};}export const datasetBusinessGroupUpdate={'service':a65_0x29055f(0xa9),'command':a65_0x29055f(0xda),'description':a65_0x29055f(0xce),'risk':a65_0x29055f(0xde),'flags':[CODE_FLAG,{'name':'business-group','type':'string','required':!![],'description':a65_0x29055f(0xae)},{'name':a65_0x29055f(0xbc),'type':a65_0x29055f(0xa7),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2d5b8b){validateInput(readBusinessGroupUpdateInput(_0x2d5b8b));},async 'dryRun'(_0x77f199){const _0x11c533=a65_0x29055f,_0x2d4e0c=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x77f199[_0x11c533(0xc9)],'input':readBusinessGroupUpdateInput(_0x77f199),'dryRun':!![]});return{'method':_0x2d4e0c[_0x11c533(0xc3)]['backend'][_0x11c533(0xd7)],'url':_0x2d4e0c[_0x11c533(0xc3)][_0x11c533(0xc8)][_0x11c533(0xcd)],'body':_0x2d4e0c[_0x11c533(0xc3)][_0x11c533(0xc8)][_0x11c533(0xe2)],'description':_0x2d4e0c[_0x11c533(0xd4)],..._0x2d4e0c[_0x11c533(0xc3)]};},async 'execute'(_0x58ba60){const _0x2b481a=a65_0x29055f;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x58ba60[_0x2b481a(0xc9)],'input':readBusinessGroupUpdateInput(_0x58ba60),'dryRun':![]});}};function a65_0xe7fa(_0x5aecad,_0x494e11){_0x5aecad=_0x5aecad-0xa7;const _0x33fdc8=a65_0x33fd();let _0xe7fa1e=_0x33fdc8[_0x5aecad];return _0xe7fa1e;}function readBusinessGroupUpdateInput(_0x1e72d1){const _0x5d02f6=a65_0x29055f,_0x5ba438=_0x1e72d1['str'](_0x5d02f6(0xbc));return{'code':trim(_0x1e72d1[_0x5d02f6(0xc6)]('code')),'businessGroup':_0x1e72d1[_0x5d02f6(0xc6)](_0x5d02f6(0xb1)),'expectBusinessGroup':_0x5ba438===undefined||_0x5ba438===''?undefined:_0x5ba438};}function validateInput(_0x876fe8){const _0x1b4fcc=a65_0x29055f;if(!trim(_0x876fe8[_0x1b4fcc(0xaa)]))throw CliErrors[_0x1b4fcc(0xb4)](_0x1b4fcc(0xb0));if(_0x876fe8[_0x1b4fcc(0xba)]===undefined)throw CliErrors[_0x1b4fcc(0xb4)](_0x1b4fcc(0xca));if(!trim(_0x876fe8[_0x1b4fcc(0xba)]))throw CliErrors['validation'](_0x1b4fcc(0xd0));}function assertBusinessGroupUpdateSupported(_0x4fb142,_0x8ed0bd){const _0x8428d9=a65_0x29055f;if(_0x4fb142[_0x8428d9(0xb8)]==='DB_TABLE'&&!_0x8ed0bd)throw CliErrors['validation'](_0x8428d9(0xdd));}function resolveBusinessGroupDataset(_0x3b2b7c,_0x227672){const _0x54794e=a65_0x29055f,_0x41e7e0=asPlainObject(_0x3b2b7c['dataset']),_0x23dbc1=asPlainObject(_0x3b2b7c[_0x54794e(0xd3)]),_0x565fa1=resolveSourceType(_0x3b2b7c,_0x41e7e0,_0x23dbc1),_0x4214d5=firstString(_0x3b2b7c['modelCode'],_0x3b2b7c[_0x54794e(0xaa)],_0x41e7e0[_0x54794e(0xe3)],_0x227672)||_0x227672;return{'id':firstNumber(_0x3b2b7c[_0x54794e(0xec)],_0x3b2b7c['id'],_0x41e7e0[_0x54794e(0xad)])??firstString(_0x3b2b7c[_0x54794e(0xec)],_0x3b2b7c['id'],_0x41e7e0['datasetId'])??null,'code':_0x4214d5,'name':firstString(_0x3b2b7c['name'],_0x41e7e0['datasetName'],_0x41e7e0[_0x54794e(0xee)])||null,'sourceType':_0x565fa1,'dbTableSelector':_0x565fa1===_0x54794e(0xc5)?{'dbLinkId':firstNumber(_0x23dbc1['dbId']),'tableName':firstString(_0x23dbc1['tableName'])||null}:null};}function resolveSourceType(_0x10f18f,_0x59f0e7,_0x99ef2){const _0x2c846e=a65_0x29055f,_0x45785d=firstString(_0x10f18f[_0x2c846e(0xc1)],_0x10f18f[_0x2c846e(0xb8)],_0x59f0e7[_0x2c846e(0xc1)],_0x59f0e7[_0x2c846e(0xb8)])?.[_0x2c846e(0xbe)]()[_0x2c846e(0xc0)]();if(_0x45785d===_0x2c846e(0xc5)||_0x45785d==='METADATA')return _0x45785d;if(Object[_0x2c846e(0xd2)](_0x99ef2)[_0x2c846e(0xb6)]>0x0)return _0x2c846e(0xc5);throw CliErrors[_0x2c846e(0xb4)](_0x2c846e(0xcc));}function loadCurrentBusinessGroup(_0x259696,_0x3e1081){const _0x1c6dbb=a65_0x29055f,_0x486e36=readBusinessGroupFromDatasetDetail(_0x259696,_0x3e1081[_0x1c6dbb(0xb8)]);if(_0x486e36[_0x1c6dbb(0xcf)])return normalizeBusinessGroup(_0x486e36[_0x1c6dbb(0xd9)]);return'';}function readBusinessGroupFromDatasetDetail(_0x2f207b,_0x4a74c2){const _0x11131b=a65_0x29055f,_0xec1160=asPlainObject(_0x2f207b[_0x11131b(0xa9)]),_0x20737d=firstPresent(_0x2f207b['businessGroup']);if(_0x20737d[_0x11131b(0xcf)])return _0x20737d;const _0x3446b3=firstPresent(_0xec1160[_0x11131b(0xba)]);if(_0x3446b3[_0x11131b(0xcf)])return _0x3446b3;if(_0x4a74c2===_0x11131b(0xc5))return{'found':![]};const _0x47f42c=readBusinessGroupFromExtend(_0x2f207b[_0x11131b(0xbf)]);if(_0x47f42c['found'])return _0x47f42c;return readBusinessGroupFromExtend(_0xec1160[_0x11131b(0xbf)]);}function readBusinessGroupFromExtend(_0xd6dcc8){const _0x3efd1f=a65_0x29055f;if(_0xd6dcc8===undefined||_0xd6dcc8===null||_0xd6dcc8==='')return{'found':![]};if(typeof _0xd6dcc8===_0x3efd1f(0xa7))try{const _0x442e38=JSON['parse'](_0xd6dcc8);return readBusinessGroupFromExtend(_0x442e38);}catch{return{'found':![]};}const _0x51e172=asPlainObject(_0xd6dcc8);if(Object['prototype'][_0x3efd1f(0xd6)]['call'](_0x51e172,'businessGroup'))return{'found':!![],'value':_0x51e172[_0x3efd1f(0xba)]};return{'found':![]};}function firstPresent(..._0x5b3d67){for(const _0x311e0d of _0x5b3d67){if(_0x311e0d!==undefined&&_0x311e0d!==null)return{'found':!![],'value':_0x311e0d};}return{'found':![]};}function assertExpectedBusinessGroup(_0x22d289,_0x22762b){const _0x4fd48f=a65_0x29055f;if(_0x22762b===undefined)return;const _0xfdce79=normalizeBusinessGroupArgument(_0x22762b);if(_0x22d289!==_0xfdce79)throw CliErrors[_0x4fd48f(0xb4)](_0x4fd48f(0xd1),_0x4fd48f(0xaf)+JSON[_0x4fd48f(0xdf)](_0xfdce79)+_0x4fd48f(0xa8)+JSON[_0x4fd48f(0xdf)](_0x22d289));}function buildBackendPlan(_0x4f1627,_0x251259,_0x5a6cd8){const _0x3d79b5=a65_0x29055f;if(_0x251259[_0x3d79b5(0xb8)]===_0x3d79b5(0xc5)){if(!_0x251259[_0x3d79b5(0xb9)]||_0x251259['dbTableSelector']['dbLinkId']===null||!_0x251259[_0x3d79b5(0xb9)][_0x3d79b5(0xbd)])throw CliErrors[_0x3d79b5(0xb4)]('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.',_0x3d79b5(0xb5));return{'kind':_0x3d79b5(0xd8),'method':_0x3d79b5(0xd5),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x251259[_0x3d79b5(0xb9)][_0x3d79b5(0xe1)],'tableName':_0x251259[_0x3d79b5(0xb9)]['tableName'],'businessGroup':_0x5a6cd8}};}return{'kind':'metadata','method':_0x3d79b5(0xd5),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x4f1627,'datasetCode':_0x251259['code'],'businessGroup':_0x5a6cd8}};}function normalizeBusinessGroup(_0x301ef8){const _0x3b2797=a65_0x29055f;if(_0x301ef8===undefined||_0x301ef8===null)return'';return String(_0x301ef8)[_0x3b2797(0xbe)]();}function normalizeBusinessGroupArgument(_0x3839fe){const _0x4290c2=normalizeBusinessGroup(_0x3839fe);return _0x4290c2===UNGROUPED_BUSINESS_GROUP?'':_0x4290c2;}function displayBusinessGroup(_0x330685){return _0x330685||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x4eb989){if(!_0x4eb989||typeof _0x4eb989!=='object'||Array['isArray'](_0x4eb989))return{};return _0x4eb989;}function a65_0x33fd(){const _0x4c6e3c=['source','479460TmRMzg','data','184ozzxio','DB_TABLE','str','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','backend','appCode','--business-group\x20is\x20required','101278nBZdON','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','path','Update\x20business\x20scenario\x20group','found','--business-group\x20must\x20not\x20be\x20blank','Expectation\x20mismatch\x20at\x20businessGroup','keys','dbtableConfig','message','POST','hasOwnProperty','method','db-table','value','business-group-update','/smartapi/dblink/updateTableBusinessGroup','expectBusinessGroup','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','write','stringify','matched','dbLinkId','payload','datasetCode','2250rfujlc','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','900720eklrUV','4962672uOkHkj','/smartapi/question/er-config/business-group/edit','isFinite','27448102DrKMif','23bpXKtV','modelId','update','name','string',',\x20actual\x20','dataset','code','ungrouped','363503WltQix','datasetId','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','Expected\x20','--code\x20is\x20required','business-group','18aZOsIg','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','validation','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','length','2976eUYdlH','sourceType','dbTableSelector','businessGroup','number','expect-business-group','tableName','trim','extend','toUpperCase'];a65_0x33fd=function(){return _0x4c6e3c;};return a65_0x33fd();}function firstString(..._0x40379f){const _0x531e0f=a65_0x29055f;for(const _0x574b23 of _0x40379f){if(typeof _0x574b23===_0x531e0f(0xa7)&&_0x574b23[_0x531e0f(0xbe)]())return _0x574b23['trim']();if(typeof _0x574b23==='number'&&Number[_0x531e0f(0xe9)](_0x574b23))return String(_0x574b23);}return undefined;}function firstNumber(..._0x30b87f){const _0x20ecda=a65_0x29055f;for(const _0x4b3db2 of _0x30b87f){if(typeof _0x4b3db2===_0x20ecda(0xbb)&&Number[_0x20ecda(0xe9)](_0x4b3db2))return _0x4b3db2;if(typeof _0x4b3db2===_0x20ecda(0xa7)&&_0x4b3db2[_0x20ecda(0xbe)]()&&Number[_0x20ecda(0xe9)](Number(_0x4b3db2)))return Number(_0x4b3db2);}return null;}function trim(_0x14f713){const _0x314229=a65_0x29055f;return String(_0x14f713||'')[_0x314229(0xbe)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a66_0x1f91(_0x4779e9,_0x10244c){_0x4779e9=_0x4779e9-0x15f;const _0x408f68=a66_0x408f();let _0x1f91ce=_0x408f68[_0x4779e9];return _0x1f91ce;}function a66_0x408f(){const _0x3b4edf=['176aHyEjM','5650aWxeNV','ungrouped','dbid','\x20business\x20group(s)\x20for\x20database\x20connection\x20','525jliqQc','read','260Ktdubh','map','78978iKtZes','56092zxGYaC','588986FpKqpz','trim','3413124WpkpKD','businessGroup','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','appCode','dataset','num','1384MzMBXZ','24519zktCyT','55077TOGwyc','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','Found\x20'];a66_0x408f=function(){return _0x3b4edf;};return a66_0x408f();}const a66_0x599f3c=a66_0x1f91;(function(_0x5446b9,_0x3755e8){const _0x1a40a7=a66_0x1f91,_0xdd89f3=_0x5446b9();while(!![]){try{const _0x4f88e2=-parseInt(_0x1a40a7(0x173))/0x1+-parseInt(_0x1a40a7(0x174))/0x2+parseInt(_0x1a40a7(0x166))/0x3*(-parseInt(_0x1a40a7(0x169))/0x4)+parseInt(_0x1a40a7(0x170))/0x5*(parseInt(_0x1a40a7(0x172))/0x6)+-parseInt(_0x1a40a7(0x16e))/0x7*(-parseInt(_0x1a40a7(0x164))/0x8)+-parseInt(_0x1a40a7(0x176))/0x9+parseInt(_0x1a40a7(0x16a))/0xa*(parseInt(_0x1a40a7(0x165))/0xb);if(_0x4f88e2===_0x3755e8)break;else _0xdd89f3['push'](_0xdd89f3['shift']());}catch(_0x54d43d){_0xdd89f3['push'](_0xdd89f3['shift']());}}}(a66_0x408f,0x66593));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a66_0x599f3c(0x162),'command':'business-groups','description':a66_0x599f3c(0x160),'risk':a66_0x599f3c(0x16f),'flags':[{'name':'dbid','type':'number','required':!![],'description':a66_0x599f3c(0x167)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x34419f){const _0x351f09=a66_0x599f3c,_0x798651=_0x34419f[_0x351f09(0x163)](_0x351f09(0x16c)),_0x2ca249=await getErBusinessGroupSummary(_0x34419f[_0x351f09(0x161)],_0x798651),_0x1fecb0=_0x2ca249['groups'][_0x351f09(0x171)](_0x50b4ff=>({..._0x50b4ff,'businessGroup':_0x50b4ff[_0x351f09(0x15f)][_0x351f09(0x175)]()||_0x351f09(0x16b)}));return{'ok':!![],'data':{..._0x2ca249,'groups':_0x1fecb0,'scope':'DB_TABLE'},'message':_0x351f09(0x168)+_0x1fecb0['length']+_0x351f09(0x16d)+_0x798651};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a67_0x4518db=a67_0xc793;(function(_0x1e7891,_0x22bc57){const _0x5664ca=a67_0xc793,_0x1b470e=_0x1e7891();while(!![]){try{const _0x48387e=-parseInt(_0x5664ca(0x16c))/0x1+-parseInt(_0x5664ca(0x14f))/0x2*(-parseInt(_0x5664ca(0x15f))/0x3)+-parseInt(_0x5664ca(0x163))/0x4+parseInt(_0x5664ca(0x156))/0x5+-parseInt(_0x5664ca(0x153))/0x6*(-parseInt(_0x5664ca(0x168))/0x7)+parseInt(_0x5664ca(0x160))/0x8+-parseInt(_0x5664ca(0x16a))/0x9;if(_0x48387e===_0x22bc57)break;else _0x1b470e['push'](_0x1b470e['shift']());}catch(_0x5f1c16){_0x1b470e['push'](_0x1b470e['shift']());}}}(a67_0x4912,0xa6274));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a67_0x4518db(0x169),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY=a67_0x4518db(0x15d);function a67_0xc793(_0x3207a9,_0x4edbb5){_0x3207a9=_0x3207a9-0x14f;const _0x49126e=a67_0x4912();let _0xc793dd=_0x49126e[_0x3207a9];return _0xc793dd;}function valueToString(_0x26f69d){const _0x4d9231=a67_0x4518db;return _0x26f69d==null?'':String(_0x26f69d)[_0x4d9231(0x165)]();}function getDatasetCode(_0x4e51e4){const _0x5b59b7=a67_0x4518db;return valueToString(_0x4e51e4['code']??_0x4e51e4[_0x5b59b7(0x158)]??_0x4e51e4[_0x5b59b7(0x152)]?.[_0x5b59b7(0x155)]);}function getDatasetName(_0x4ad838){const _0x3097c6=a67_0x4518db;return valueToString(_0x4ad838[_0x3097c6(0x15c)]??_0x4ad838['dataset']?.[_0x3097c6(0x157)])||_0x3097c6(0x159);}function getDatasetSource(_0xd6c098){const _0x3e1b11=a67_0x4518db;return valueToString(_0xd6c098[_0x3e1b11(0x16d)]??_0xd6c098[_0x3e1b11(0x152)]?.[_0x3e1b11(0x15e)])[_0x3e1b11(0x150)]();}function getDbtableConfig(_0x2267fc){const _0xee471d=a67_0x4518db,_0x83a061=_0x2267fc[_0xee471d(0x154)]??_0x2267fc['dbtable'];return _0x83a061&&typeof _0x83a061===_0xee471d(0x16f)?_0x83a061:{};}export function isDbTableBackedDataset(_0x3478da){const _0x51b35d=a67_0x4518db,_0x43644a=getDatasetSource(_0x3478da);if(_0x43644a==='METADATA')return![];const _0x1cec79=getDbtableConfig(_0x3478da),_0x590eb7=_0x1cec79['dbId']??_0x1cec79['id'],_0x4b4988=valueToString(_0x1cec79[_0x51b35d(0x151)]??_0x3478da[_0x51b35d(0x151)]??_0x3478da['dataset']?.[_0x51b35d(0x151)]);return _0x590eb7!==undefined&&_0x590eb7!==null&&_0x4b4988[_0x51b35d(0x164)]>0x0;}export function filterDbTableBackedDatasets(_0x1a3b1d){const _0x24140c=a67_0x4518db;return _0x1a3b1d[_0x24140c(0x16e)](_0x373111=>isDbTableBackedDataset(_0x373111));}function a67_0x4912(){const _0x4679dc=['getOne','SQL\x20schema\x20validation','335484sUbnmB','length','trim','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','The\x20current\x20dataset\x20\x22','6084176xeICtz','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','18084420FogDbx','validation','223449wwFfzk','source','filter','object','4vzaZKr','toUpperCase','tableName','dataset','6lnvYbv','dbtableConfig','datasetCode','959840tbGRQW','datasetName','modelCode','unknown','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','UNKNOWN','name','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','sourceType','1018200FdmSEX','10058624EcGycA'];a67_0x4912=function(){return _0x4679dc;};return a67_0x4912();}export function buildDbTableBackedRequirementMessage(_0x3765b2,_0x1247aa=a67_0x4518db(0x162)){const _0xd9d69d=a67_0x4518db,_0xb990b4=getDatasetSource(_0x3765b2)||_0xd9d69d(0x15b),_0x3169e7=getDatasetName(_0x3765b2),_0x434ed2=getDatasetCode(_0x3765b2),_0x46732c=_0x434ed2?'\x20('+_0x434ed2+')':'';return[_0xd9d69d(0x167)+_0x3169e7+'\x22'+_0x46732c+'\x20is\x20'+_0xb990b4+_0xd9d69d(0x166)+_0x1247aa+'.',_0xd9d69d(0x15a),'Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0xd9d69d(0x16e)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0xd9d69d(0x161)]+'.']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x29efd1,_0x2ebe4a){const _0x3bcf9c=a67_0x4518db;if(!isDbTableBackedDataset(_0x29efd1))throw CliErrors[_0x3bcf9c(0x16b)](buildDbTableBackedRequirementMessage(_0x29efd1,_0x2ebe4a));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x33563f=a68_0x3681;function a68_0x21d7(){const _0x55f489=['3258jwsLYG','write','3gHblZx','cross-relation-create','8RjSKKg','create','938696GumKMS','73674yyTsOe','2673MGlSmA','136728qXCcGZ','dataset','Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','500011SClnjV','52270dtkyAR','3570SFcstN','1601280jBaQAM'];a68_0x21d7=function(){return _0x55f489;};return a68_0x21d7();}(function(_0x263ad1,_0xa4188d){const _0x51cd5a=a68_0x3681,_0x34ce9e=_0x263ad1();while(!![]){try{const _0x4d1b9c=-parseInt(_0x51cd5a(0x1ad))/0x1+-parseInt(_0x51cd5a(0x1aa))/0x2+parseInt(_0x51cd5a(0x1a3))/0x3*(-parseInt(_0x51cd5a(0x1a7))/0x4)+parseInt(_0x51cd5a(0x1a0))/0x5+parseInt(_0x51cd5a(0x1a1))/0x6*(-parseInt(_0x51cd5a(0x19f))/0x7)+parseInt(_0x51cd5a(0x1a5))/0x8*(-parseInt(_0x51cd5a(0x1a8))/0x9)+-parseInt(_0x51cd5a(0x1ae))/0xa*(-parseInt(_0x51cd5a(0x1a9))/0xb);if(_0x4d1b9c===_0xa4188d)break;else _0x34ce9e['push'](_0x34ce9e['shift']());}catch(_0xbbb174){_0x34ce9e['push'](_0x34ce9e['shift']());}}}(a68_0x21d7,0x7a9ec));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';function a68_0x3681(_0x3aa37e,_0x1abbca){_0x3aa37e=_0x3aa37e-0x19f;const _0x21d72d=a68_0x21d7();let _0x36816d=_0x21d72d[_0x3aa37e];return _0x36816d;}import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationCreate={'service':a68_0x33563f(0x1ab),'command':a68_0x33563f(0x1a4),'description':a68_0x33563f(0x1ac),'risk':a68_0x33563f(0x1a2),'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 _0x5b0282=>validateCrossRelation(_0x5b0282,a68_0x33563f(0x1a6)),'dryRun':_0x127072=>previewCrossRelation(_0x127072,a68_0x33563f(0x1a6)),'execute':_0x16478f=>executeCrossRelation(_0x16478f,a68_0x33563f(0x1a6),createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x55cd8b=a69_0x27fb;function a69_0x27fb(_0x2187a7,_0x6f6ec7){_0x2187a7=_0x2187a7-0x162;const _0x267aa2=a69_0x267a();let _0x27fbaa=_0x267aa2[_0x2187a7];return _0x27fbaa;}(function(_0x152851,_0x1848ac){const _0x3ca393=a69_0x27fb,_0x399149=_0x152851();while(!![]){try{const _0x27469e=parseInt(_0x3ca393(0x169))/0x1*(-parseInt(_0x3ca393(0x16e))/0x2)+-parseInt(_0x3ca393(0x16c))/0x3+parseInt(_0x3ca393(0x16f))/0x4*(-parseInt(_0x3ca393(0x16a))/0x5)+parseInt(_0x3ca393(0x165))/0x6+parseInt(_0x3ca393(0x167))/0x7+-parseInt(_0x3ca393(0x166))/0x8*(-parseInt(_0x3ca393(0x16d))/0x9)+parseInt(_0x3ca393(0x16b))/0xa;if(_0x27469e===_0x1848ac)break;else _0x399149['push'](_0x399149['shift']());}catch(_0x48cd1f){_0x399149['push'](_0x399149['shift']());}}}(a69_0x267a,0xa74da));function a69_0x267a(){const _0x33893f=['cross-relation-delete','593bphhJj','5540065DezAdU','21232100rJwEHe','4061655rTVzSL','492255OQzwPS','1538rakmfv','4yXyZLP','high-risk-write','dataset','delete','4990782xrqZbS','56uSMsLn','1857219saUVHY'];a69_0x267a=function(){return _0x33893f;};return a69_0x267a();}import{deleteCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationDelete={'service':a69_0x55cd8b(0x163),'command':a69_0x55cd8b(0x168),'description':'Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','risk':a69_0x55cd8b(0x162),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x357ffd=>validateCrossRelation(_0x357ffd,a69_0x55cd8b(0x164)),'dryRun':_0x513cd3=>previewCrossRelation(_0x513cd3,a69_0x55cd8b(0x164)),'execute':_0x6b13cd=>executeCrossRelation(_0x6b13cd,'delete',deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x4392d9=a70_0x4665;(function(_0x76de9a,_0x57e1eb){const _0x1168e6=a70_0x4665,_0x32b4c6=_0x76de9a();while(!![]){try{const _0x53c62b=-parseInt(_0x1168e6(0x1e9))/0x1+-parseInt(_0x1168e6(0x1e3))/0x2+parseInt(_0x1168e6(0x1e0))/0x3*(parseInt(_0x1168e6(0x1e6))/0x4)+parseInt(_0x1168e6(0x1e4))/0x5*(-parseInt(_0x1168e6(0x1e7))/0x6)+-parseInt(_0x1168e6(0x1e2))/0x7*(-parseInt(_0x1168e6(0x1de))/0x8)+parseInt(_0x1168e6(0x1ea))/0x9*(-parseInt(_0x1168e6(0x1e1))/0xa)+parseInt(_0x1168e6(0x1df))/0xb;if(_0x53c62b===_0x57e1eb)break;else _0x32b4c6['push'](_0x32b4c6['shift']());}catch(_0x1c1ef5){_0x32b4c6['push'](_0x32b4c6['shift']());}}}(a70_0x7348,0xaf2a3));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 a70_0x4665(_0x29466f,_0x5ed2f4){_0x29466f=_0x29466f-0x1dd;const _0x734867=a70_0x7348();let _0x466598=_0x734867[_0x29466f];return _0x466598;}function a70_0x7348(){const _0x17899d=['2917310qRXCnF','21BVATDC','2406868zqDZwq','465910hvJPWd','list','304MTKbnn','30dgDTzy','dataset','262884gRkMwF','18aylpSm','\x20relation(s)','length','2756456tobxzU','10752390Qyyzlr','48237mkJezu'];a70_0x7348=function(){return _0x17899d;};return a70_0x7348();}import{projectCrossRelation,resolveCrossRelationQuery,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationList={'service':a70_0x4392d9(0x1e8),'command':'cross-relation-list','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 _0x5bed7b=>validateCrossRelation(_0x5bed7b,a70_0x4392d9(0x1e5)),async 'execute'(_0x122029){const _0x3fcbed=a70_0x4392d9,_0x8688ec=await resolveCrossRelationQuery(_0x122029),_0x1d1c04=await queryCrossDbRelations(_0x8688ec);return{'ok':!![],'data':{'appCode':_0x122029['appCode'],'selector':_0x8688ec,'total':_0x1d1c04['length'],'relations':_0x1d1c04['map'](projectCrossRelation)},'message':'Cross-database\x20relations:\x20'+_0x1d1c04[_0x3fcbed(0x1dd)]+_0x3fcbed(0x1eb)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a71_0x5d49(_0x53200c,_0x3fa375){_0x53200c=_0x53200c-0xa7;const _0x3886a1=a71_0x3886();let _0x5d4955=_0x3886a1[_0x53200c];return _0x5d4955;}const a71_0x11fe7b=a71_0x5d49;(function(_0x586ebe,_0x3b63b8){const _0x18ace9=a71_0x5d49,_0x5b011d=_0x586ebe();while(!![]){try{const _0x540f96=parseInt(_0x18ace9(0xd7))/0x1*(parseInt(_0x18ace9(0xab))/0x2)+-parseInt(_0x18ace9(0xe0))/0x3*(parseInt(_0x18ace9(0xdd))/0x4)+parseInt(_0x18ace9(0xf3))/0x5+parseInt(_0x18ace9(0xaf))/0x6*(-parseInt(_0x18ace9(0xe9))/0x7)+-parseInt(_0x18ace9(0xb6))/0x8*(parseInt(_0x18ace9(0xb1))/0x9)+-parseInt(_0x18ace9(0xe4))/0xa*(parseInt(_0x18ace9(0xcb))/0xb)+parseInt(_0x18ace9(0xdc))/0xc;if(_0x540f96===_0x3b63b8)break;else _0x5b011d['push'](_0x5b011d['shift']());}catch(_0x50bd78){_0x5b011d['push'](_0x5b011d['shift']());}}}(a71_0x3886,0x7d2a2));import{getDatasetDetail,queryCrossDbRelations}from'../../core/api-client.js';import{CROSS_DB_RELATION_PATHS}from'../../core/cross-db-relation.js';import{CliError,CliErrors}from'../../errors.js';import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0x484020,_0x4ae762){const _0x396068=a71_0x5d49,_0x29d667=_0x484020['str'](_0x4ae762)['trim']();if(!_0x29d667)throw CliErrors[_0x396068(0xcf)](_0x4ae762);return _0x29d667;}function explicitDblink(_0x484152){const _0x53375d=a71_0x5d49,_0x3e5b5a=_0x484152['flag'](_0x53375d(0xed));if(_0x3e5b5a===undefined||_0x3e5b5a===null)return undefined;const _0x3f69ab=Number(_0x3e5b5a);if(!Number['isSafeInteger'](_0x3f69ab)||_0x3f69ab<=0x0)throw CliErrors[_0x53375d(0xd9)](_0x53375d(0xcc));return _0x3f69ab;}export function validateCrossRelation(_0x1b6e5c,_0x32e056){const _0x243946=a71_0x5d49,_0xff5ae2=explicitDblink(_0x1b6e5c);if(_0x32e056===_0x243946(0xf8)){if(!_0x1b6e5c[_0x243946(0xd5)]('from-datasetcode')[_0x243946(0xa9)]()&&_0xff5ae2===undefined)throw CliErrors['validation'](_0x243946(0xee));return;}required(_0x1b6e5c,_0x243946(0xba)),required(_0x1b6e5c,_0x243946(0xc7));if(_0x32e056!==_0x243946(0xb0)){required(_0x1b6e5c,'to-datasetcode'),required(_0x1b6e5c,_0x243946(0xfc));const _0x18f00a=_0x1b6e5c[_0x243946(0xd5)]('cardinality')[_0x243946(0xa9)]();if(_0x18f00a&&!CROSS_RELATION_CARDINALITY_FLAG['enum'][_0x243946(0xae)](_0x18f00a))throw CliErrors[_0x243946(0xd9)](_0x243946(0xbd));}}async function resolveEndpoint(_0x4ba511){const _0x39055e=a71_0x5d49,_0x24332e=await getDatasetDetail(_0x4ba511),_0x217208=_0x24332e?.[_0x39055e(0xf9)]??{};if((_0x24332e?.[_0x39055e(0xb4)]??_0x217208['sourceType'])!=='DB_TABLE')throw CliErrors[_0x39055e(0xd9)](_0x39055e(0xdf)+_0x4ba511+_0x39055e(0xf1));const _0x2a2e60=_0x24332e['dbtableConfig']??_0x24332e[_0x39055e(0xbf)]??{};let _0xc0f1f9=_0x24332e[_0x39055e(0xf0)]??_0x217208[_0x39055e(0xf0)]??{};if(typeof _0xc0f1f9===_0x39055e(0xc4))try{_0xc0f1f9=_0xc0f1f9[_0x39055e(0xa9)]()?JSON['parse'](_0xc0f1f9):{};}catch{throw CliErrors['validation'](_0x39055e(0xdf)+_0x4ba511+_0x39055e(0xad));}const _0x431a43=Number(_0xc0f1f9?.[_0x39055e(0xc2)]?.['dbId']??_0x24332e[_0x39055e(0xc2)]?.[_0x39055e(0xa8)]??_0x217208[_0x39055e(0xc2)]?.[_0x39055e(0xa8)]??_0x2a2e60[_0x39055e(0xa8)]??_0x217208[_0x39055e(0xa8)]??_0x24332e[_0x39055e(0xa8)]),_0x40528c=String(_0x24332e['tableName']??_0x217208[_0x39055e(0xfd)]??_0x2a2e60['tableName']??'')[_0x39055e(0xa9)]();if(!Number[_0x39055e(0xe6)](_0x431a43)||_0x431a43<=0x0||!_0x40528c)throw CliErrors[_0x39055e(0xd9)](_0x39055e(0xdf)+_0x4ba511+_0x39055e(0xc8));return{'datasetCode':_0x4ba511,'dblinkId':_0x431a43,'table':_0x40528c};}export async function resolveCrossRelationQuery(_0x4bd3d5){const _0x528774=a71_0x5d49,_0x12816d=_0x4bd3d5[_0x528774(0xd5)](_0x528774(0xba))[_0x528774(0xa9)](),_0x2a7f4f=explicitDblink(_0x4bd3d5),_0x55fd4a=_0x12816d?await resolveEndpoint(_0x12816d):undefined;if(_0x55fd4a&&_0x2a7f4f!==undefined&&_0x55fd4a[_0x528774(0xfa)]!==_0x2a7f4f)throw CliErrors[_0x528774(0xd9)]('--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.');const _0x173393=_0x55fd4a?.['dblinkId']??_0x2a7f4f;if(_0x173393===undefined)throw CliErrors[_0x528774(0xd9)]('Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.');return{'appCode':_0x4bd3d5[_0x528774(0xb5)],'fromDblinkId':_0x173393,..._0x12816d?{'fromDatasetCode':_0x12816d}:{},..._0x4bd3d5[_0x528774(0xd5)](_0x528774(0xc7))['trim']()?{'fromField':_0x4bd3d5[_0x528774(0xd5)](_0x528774(0xc7))[_0x528774(0xa9)]()}:{}};}export function projectCrossRelation(_0x1af32d){const _0x35bbb9=a71_0x5d49;return{'relationId':_0x1af32d[_0x35bbb9(0xf5)],'from':{'source':_0x35bbb9(0xb3),'datasetCode':_0x1af32d[_0x35bbb9(0xce)],'datasetName':_0x1af32d[_0x35bbb9(0xc6)],'dblinkId':_0x1af32d[_0x35bbb9(0xd1)],'table':_0x1af32d[_0x35bbb9(0xc3)],'field':_0x1af32d[_0x35bbb9(0xcd)]},'to':{'source':'DB_TABLE','datasetCode':_0x1af32d['toDatasetCode'],'datasetName':_0x1af32d[_0x35bbb9(0xda)],'dblinkId':_0x1af32d[_0x35bbb9(0xd8)],'table':_0x1af32d[_0x35bbb9(0xb7)],'field':_0x1af32d[_0x35bbb9(0xbc)],'labelField':_0x1af32d[_0x35bbb9(0xd0)]},'relation':{'cardinality':_0x1af32d[_0x35bbb9(0xb9)],'relationType':_0x1af32d[_0x35bbb9(0xd6)]}};}function ambiguity(_0x41c3f1){const _0x43edb9=a71_0x5d49,_0x31bbe8=CliErrors['validation'](_0x43edb9(0xfb),'Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.');return Object[_0x43edb9(0xc9)](_0x31bbe8,_0x43edb9(0xd4),{'value':{'candidates':_0x41c3f1['map'](projectCrossRelation)}}),_0x31bbe8;}const sameName=(_0x1303c0,_0x36f28c)=>_0x1303c0[a71_0x11fe7b(0xa7)]()===_0x36f28c['toLowerCase']();function matchesEndpoint(_0x18d3b7,_0x19729b,_0x1573ec,_0x11e39e,_0x496fa2){const _0x47e95e=a71_0x11fe7b;return _0x18d3b7[_0x47e95e(0xd1)]===_0x19729b[_0x47e95e(0xfa)]&&sameName(_0x18d3b7[_0x47e95e(0xc3)],_0x19729b[_0x47e95e(0xc0)])&&sameName(_0x18d3b7['fromField'],_0x1573ec)&&_0x18d3b7[_0x47e95e(0xd8)]===_0x11e39e[_0x47e95e(0xfa)]&&sameName(_0x18d3b7[_0x47e95e(0xb7)],_0x11e39e['table'])&&sameName(_0x18d3b7[_0x47e95e(0xbc)],_0x496fa2);}export async function prepareCrossRelation(_0x44b8dd,_0x5bfb1c){const _0x15bee2=a71_0x11fe7b,_0x5b0fae=await resolveEndpoint(required(_0x44b8dd,_0x15bee2(0xba))),_0x141eb4=explicitDblink(_0x44b8dd);if(_0x141eb4!==undefined&&_0x5b0fae[_0x15bee2(0xfa)]!==_0x141eb4)throw CliErrors[_0x15bee2(0xd9)](_0x15bee2(0xac));const _0x26d4f9={'appCode':_0x44b8dd[_0x15bee2(0xb5)],'fromDatasetCode':_0x5b0fae[_0x15bee2(0xc5)],'fromField':required(_0x44b8dd,_0x15bee2(0xc7)),..._0x141eb4!==undefined?{'fromDblinkId':_0x141eb4}:{}},_0x34eba7={'appCode':_0x44b8dd[_0x15bee2(0xb5)],'fromDblinkId':_0x5b0fae['dblinkId'],'fromDatasetCode':_0x5b0fae[_0x15bee2(0xc5)],'fromField':_0x26d4f9[_0x15bee2(0xcd)]},_0x51aadf=await queryCrossDbRelations(_0x34eba7);let _0x4d5576=null;if(_0x5bfb1c!==_0x15bee2(0xea)){if(_0x51aadf[_0x15bee2(0xd2)]>0x1)throw ambiguity(_0x51aadf);_0x4d5576=_0x51aadf[0x0]??null;if(!_0x4d5576)throw CliErrors[_0x15bee2(0xd9)](_0x15bee2(0xe3));}if(_0x5bfb1c==='delete')return{'operation':_0x5bfb1c,'from':_0x5b0fae,'query':_0x34eba7,'body':_0x26d4f9,'before':_0x4d5576};const _0x37396b=await resolveEndpoint(required(_0x44b8dd,'to-datasetcode'));if(_0x5b0fae[_0x15bee2(0xfa)]===_0x37396b[_0x15bee2(0xfa)])throw CliErrors[_0x15bee2(0xd9)](_0x15bee2(0xd3));const _0x431456=_0x44b8dd['str'](_0x15bee2(0xe5))[_0x15bee2(0xa9)](),_0x57c531=_0x44b8dd['str']('cardinality')[_0x15bee2(0xa9)](),_0x6d0bba={..._0x26d4f9,'toDatasetCode':_0x37396b[_0x15bee2(0xc5)],'toField':required(_0x44b8dd,_0x15bee2(0xfc)),..._0x431456?{'refTableLabelName':_0x431456}:{},..._0x57c531?{'cardinality':_0x57c531}:{}};if(_0x51aadf[_0x15bee2(0xdb)](_0xff4aa8=>_0xff4aa8[_0x15bee2(0xf5)]!==_0x4d5576?.['relationId']&&matchesEndpoint(_0xff4aa8,_0x5b0fae,_0x6d0bba[_0x15bee2(0xcd)],_0x37396b,_0x6d0bba[_0x15bee2(0xbc)])))throw CliErrors[_0x15bee2(0xd9)](_0x15bee2(0xaa));return{'operation':_0x5bfb1c,'from':_0x5b0fae,'to':_0x37396b,'query':_0x34eba7,'body':_0x6d0bba,'before':_0x4d5576,'expectedLabel':_0x431456||_0x4d5576?.['refTableLabelName']||_0x6d0bba[_0x15bee2(0xbc)],'expectedCardinality':_0x57c531||_0x4d5576?.[_0x15bee2(0xb9)]||null};}function mutationData(_0x563865,_0x18cd2c,_0x35b83){const _0x4e2e74=a71_0x11fe7b,{operation:_0x31be11,body:_0x1eec53,before:_0x112beb}=_0x563865;return{'operation':_0x31be11,'selector':{'appCode':_0x1eec53['appCode'],'from':{'datasetCode':_0x1eec53[_0x4e2e74(0xce)],'field':_0x1eec53['fromField'],'dblinkId':_0x563865['from'][_0x4e2e74(0xfa)]}},'before':_0x112beb?projectCrossRelation(_0x112beb):null,'after':_0x35b83,'dryRun':_0x18cd2c,'backend':{'method':_0x4e2e74(0xe8),'path':CROSS_DB_RELATION_PATHS[_0x31be11]},'warnings':_0x31be11==='update'&&!_0x1eec53['refTableLabelName']?[{'code':'label_inherited','message':_0x4e2e74(0xeb)}]:[]};}function a71_0x3886(){const _0x46a859=['2263026ALxkxb','delete','697743TLKsyU','query','DB_TABLE','source','appCode','40nJPDLW','toTableName','expectedCardinality','cardinality','from-datasetcode','matched','toField','Invalid\x20--cardinality.','filter','dbtable','table','expectedLabel','storageProfile','fromTableName','string','datasetCode','fromDatasetName','from-column','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','defineProperty','multiple\x20cross-database\x20relations\x20matched','245443fbsInr','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','fromField','fromDatasetCode','flagMissing','refTableLabelName','fromDblinkId','length','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','data','str','relationType','154034nnMRRk','toDblinkId','validation','toDatasetName','some','17573808KfMeYc','3882108qQvgTo','apiError','Dataset\x20','3QwNLUo','before','body','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','130LGlqWT','to-label-column','isSafeInteger','Would\x20','POST','7taNIDs','create','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','catch','from-dblink-id','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','\x20write\x20was\x20not\x20verified.','extend','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','message','4597790KBcexk','\x20a\x20cross-database\x20relation\x20for\x20','relationId','from','unconfirmed','list','dataset','dblinkId','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','to-column','tableName','map','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','toLowerCase','dbId','trim','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','2bothSo','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','\x20has\x20invalid\x20storage\x20configuration.','includes'];a71_0x3886=function(){return _0x46a859;};return a71_0x3886();}export async function previewCrossRelation(_0x5ce629,_0x3803f8){const _0x55dadb=a71_0x11fe7b,_0x335169=await prepareCrossRelation(_0x5ce629,_0x3803f8),_0x3b6635=_0x335169[_0x55dadb(0xe2)],_0xb96408=_0x3803f8===_0x55dadb(0xb0)?null:{..._0x335169['before']?{'relationId':_0x335169['before'][_0x55dadb(0xf5)]}:{},'from':{'datasetCode':_0x335169[_0x55dadb(0xf6)][_0x55dadb(0xc5)],'dblinkId':_0x335169[_0x55dadb(0xf6)]['dblinkId'],'table':_0x335169[_0x55dadb(0xf6)][_0x55dadb(0xc0)],'field':_0x3b6635[_0x55dadb(0xcd)]},'to':{'datasetCode':_0x335169['to']['datasetCode'],'dblinkId':_0x335169['to'][_0x55dadb(0xfa)],'table':_0x335169['to'][_0x55dadb(0xc0)],'field':_0x3b6635[_0x55dadb(0xbc)],'labelField':_0x335169[_0x55dadb(0xc1)]},'relation':{'cardinality':_0x335169[_0x55dadb(0xb8)],'relationType':0x2}};return{...mutationData(_0x335169,!![],null),'after':_0xb96408,'method':'POST','url':CROSS_DB_RELATION_PATHS[_0x3803f8],'body':_0x335169[_0x55dadb(0xe2)],'description':_0x55dadb(0xe7)+_0x3803f8+_0x55dadb(0xf4)+_0x3b6635[_0x55dadb(0xce)]+'.'+_0x3b6635['fromField']};}export async function executeCrossRelation(_0x171a52,_0x4f764f,_0xe89347){const _0x14dae4=a71_0x11fe7b,_0x7d558b=await prepareCrossRelation(_0x171a52,_0x4f764f);try{await _0xe89347(_0x7d558b[_0x14dae4(0xe2)]);}catch(_0x3b41c1){if(_0x3b41c1 instanceof CliError&&_0x3b41c1[_0x14dae4(0xf2)][_0x14dae4(0xae)](_0x14dae4(0xca))){const _0x2db47b=await queryCrossDbRelations(_0x7d558b[_0x14dae4(0xb2)])[_0x14dae4(0xec)](()=>[]);throw ambiguity(_0x2db47b);}throw _0x3b41c1;}let _0xb901a3=[],_0x19fe78,_0x255260=![];try{_0xb901a3=await queryCrossDbRelations(_0x7d558b[_0x14dae4(0xb2)]);if(_0x4f764f===_0x14dae4(0xb0))_0x255260=!_0xb901a3[_0x14dae4(0xdb)](_0x1d89da=>_0x1d89da[_0x14dae4(0xf5)]===_0x7d558b[_0x14dae4(0xe1)][_0x14dae4(0xf5)]);else{const _0x388302=_0x7d558b[_0x14dae4(0xe2)],_0x354707=_0xb901a3[_0x14dae4(0xbe)](_0x24bfca=>matchesEndpoint(_0x24bfca,_0x7d558b['from'],_0x388302['fromField'],_0x7d558b['to'],_0x388302['toField'])&&(_0x4f764f==='create'||_0x24bfca[_0x14dae4(0xf5)]===_0x7d558b['before']['relationId']));_0x19fe78=_0x354707[_0x14dae4(0xd2)]===0x1?_0x354707[0x0]:undefined,_0x255260=!!_0x19fe78&&_0x19fe78[_0x14dae4(0xd0)]===_0x7d558b['expectedLabel']&&_0x19fe78[_0x14dae4(0xb9)]===_0x7d558b[_0x14dae4(0xb8)]&&_0x19fe78[_0x14dae4(0xd6)]===0x2;}}catch{}const _0x2ac470={...mutationData(_0x7d558b,![],_0x19fe78?projectCrossRelation(_0x19fe78):null),'verification':{'status':_0x255260?_0x14dae4(0xbb):_0x14dae4(0xf7),'verified':_0x255260}};if(!_0x255260){const _0x3e717b=CliErrors[_0x14dae4(0xde)]('Cross-database\x20relation\x20'+_0x4f764f+_0x14dae4(0xef),_0x14dae4(0xff));Object['defineProperty'](_0x3e717b,_0x14dae4(0xd4),{'value':{..._0x2ac470,'candidates':_0xb901a3[_0x14dae4(0xfe)](projectCrossRelation)}});throw _0x3e717b;}return{'ok':!![],'data':_0x2ac470,'message':'Cross-database\x20relation\x20'+_0x4f764f+'\x20verified.'};}
|
|
1
|
+
const a71_0x56147e=a71_0x4538;function a71_0x4538(_0x528588,_0x4abaaf){_0x528588=_0x528588-0x184;const _0x2e9c9d=a71_0x2e9c();let _0x453875=_0x2e9c9d[_0x528588];return _0x453875;}(function(_0x30c0b9,_0x56504f){const _0x18a8be=a71_0x4538,_0x393b3e=_0x30c0b9();while(!![]){try{const _0x19dc52=parseInt(_0x18a8be(0x1bf))/0x1+parseInt(_0x18a8be(0x1d5))/0x2+parseInt(_0x18a8be(0x185))/0x3+parseInt(_0x18a8be(0x1d7))/0x4*(-parseInt(_0x18a8be(0x1c8))/0x5)+-parseInt(_0x18a8be(0x1c1))/0x6+-parseInt(_0x18a8be(0x1c5))/0x7*(parseInt(_0x18a8be(0x195))/0x8)+-parseInt(_0x18a8be(0x19c))/0x9;if(_0x19dc52===_0x56504f)break;else _0x393b3e['push'](_0x393b3e['shift']());}catch(_0x4e9110){_0x393b3e['push'](_0x393b3e['shift']());}}}(a71_0x2e9c,0xd82c9));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(_0x1f286b,_0x44dc91){const _0x42a735=a71_0x4538,_0x485a68=_0x1f286b[_0x42a735(0x187)](_0x44dc91)[_0x42a735(0x1c2)]();if(!_0x485a68)throw CliErrors[_0x42a735(0x191)](_0x44dc91);return _0x485a68;}function explicitDblink(_0x455efa){const _0x3bc7b7=a71_0x4538,_0x36e381=_0x455efa[_0x3bc7b7(0x1ce)]('from-dblink-id');if(_0x36e381===undefined||_0x36e381===null)return undefined;const _0x5728f0=Number(_0x36e381);if(!Number['isSafeInteger'](_0x5728f0)||_0x5728f0<=0x0)throw CliErrors['validation'](_0x3bc7b7(0x1b6));return _0x5728f0;}export function validateCrossRelation(_0x536968,_0x1206b9){const _0x2518a7=a71_0x4538,_0x9cd1f1=explicitDblink(_0x536968);if(_0x1206b9===_0x2518a7(0x1b8)){if(!_0x536968[_0x2518a7(0x187)]('from-datasetcode')[_0x2518a7(0x1c2)]()&&_0x9cd1f1===undefined)throw CliErrors[_0x2518a7(0x19e)](_0x2518a7(0x1cf));return;}required(_0x536968,'from-datasetcode'),required(_0x536968,_0x2518a7(0x1d2));if(_0x1206b9!==_0x2518a7(0x190)){required(_0x536968,_0x2518a7(0x1c9)),required(_0x536968,_0x2518a7(0x1c4));const _0x250fd9=_0x536968['str']('cardinality')[_0x2518a7(0x1c2)]();if(_0x250fd9&&!CROSS_RELATION_CARDINALITY_FLAG[_0x2518a7(0x1c0)]['includes'](_0x250fd9))throw CliErrors[_0x2518a7(0x19e)]('Invalid\x20--cardinality.');}}async function resolveEndpoint(_0x1c2265){const _0x91aae6=a71_0x4538,_0x1db97f=await getDatasetDetail(_0x1c2265),_0x1f005f=_0x1db97f?.[_0x91aae6(0x186)]??{};if((_0x1db97f?.[_0x91aae6(0x1be)]??_0x1f005f[_0x91aae6(0x1af)])!==_0x91aae6(0x1ae))throw CliErrors[_0x91aae6(0x19e)](_0x91aae6(0x188)+_0x1c2265+_0x91aae6(0x1a4));const _0x374fa2=_0x1db97f[_0x91aae6(0x1cd)]??_0x1db97f['dbtable']??{};let _0x5d1662=_0x1db97f[_0x91aae6(0x1a9)]??_0x1f005f[_0x91aae6(0x1a9)]??{};if(typeof _0x5d1662===_0x91aae6(0x19f))try{_0x5d1662=_0x5d1662[_0x91aae6(0x1c2)]()?JSON['parse'](_0x5d1662):{};}catch{throw CliErrors[_0x91aae6(0x19e)](_0x91aae6(0x188)+_0x1c2265+_0x91aae6(0x1b7));}const _0x47ecda=Number(_0x5d1662?.[_0x91aae6(0x1ad)]?.[_0x91aae6(0x1b1)]??_0x1db97f[_0x91aae6(0x1ad)]?.[_0x91aae6(0x1b1)]??_0x1f005f[_0x91aae6(0x1ad)]?.[_0x91aae6(0x1b1)]??_0x374fa2['dbId']??_0x1f005f[_0x91aae6(0x1b1)]??_0x1db97f[_0x91aae6(0x1b1)]),_0x13dca5=String(_0x1db97f[_0x91aae6(0x19b)]??_0x1f005f[_0x91aae6(0x19b)]??_0x374fa2[_0x91aae6(0x19b)]??'')[_0x91aae6(0x1c2)]();if(!Number[_0x91aae6(0x1bd)](_0x47ecda)||_0x47ecda<=0x0||!_0x13dca5)throw CliErrors[_0x91aae6(0x19e)](_0x91aae6(0x188)+_0x1c2265+_0x91aae6(0x1b0));return{'datasetCode':_0x1c2265,'dblinkId':_0x47ecda,'table':_0x13dca5};}export async function resolveCrossRelationQuery(_0x4cefc5){const _0x425d47=a71_0x4538,_0x34c52d=_0x4cefc5[_0x425d47(0x187)]('from-datasetcode')[_0x425d47(0x1c2)](),_0x4fa3cb=explicitDblink(_0x4cefc5),_0x4c29a6=_0x34c52d?await resolveEndpoint(_0x34c52d):undefined;if(_0x4c29a6&&_0x4fa3cb!==undefined&&_0x4c29a6[_0x425d47(0x1ab)]!==_0x4fa3cb)throw CliErrors[_0x425d47(0x19e)](_0x425d47(0x19a));const _0x18533b=_0x4c29a6?.[_0x425d47(0x1ab)]??_0x4fa3cb;if(_0x18533b===undefined)throw CliErrors[_0x425d47(0x19e)](_0x425d47(0x1cf));return{'appCode':_0x4cefc5[_0x425d47(0x194)],'fromDblinkId':_0x18533b,..._0x34c52d?{'fromDatasetCode':_0x34c52d}:{},..._0x4cefc5['str']('from-column')[_0x425d47(0x1c2)]()?{'fromField':_0x4cefc5[_0x425d47(0x187)](_0x425d47(0x1d2))[_0x425d47(0x1c2)]()}:{}};}export function projectCrossRelation(_0xc41ac4){const _0x3e37e7=a71_0x4538;return{'relationId':_0xc41ac4[_0x3e37e7(0x1d3)],'from':{'source':_0x3e37e7(0x1ae),'datasetCode':_0xc41ac4[_0x3e37e7(0x196)],'datasetName':_0xc41ac4[_0x3e37e7(0x1ac)],'dblinkId':_0xc41ac4[_0x3e37e7(0x1d0)],'table':_0xc41ac4[_0x3e37e7(0x1a6)],'field':_0xc41ac4[_0x3e37e7(0x189)]},'to':{'source':'DB_TABLE','datasetCode':_0xc41ac4['toDatasetCode'],'datasetName':_0xc41ac4[_0x3e37e7(0x1cc)],'dblinkId':_0xc41ac4[_0x3e37e7(0x1a1)],'table':_0xc41ac4['toTableName'],'field':_0xc41ac4[_0x3e37e7(0x1a2)],'labelField':_0xc41ac4[_0x3e37e7(0x19d)]},'relation':{'cardinality':_0xc41ac4[_0x3e37e7(0x197)],'relationType':_0xc41ac4[_0x3e37e7(0x18b)]}};}function ambiguity(_0x4d1156){const _0x5c6798=a71_0x4538,_0x555ae8=CliErrors[_0x5c6798(0x19e)](_0x5c6798(0x199),'Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.');return Object['defineProperty'](_0x555ae8,'data',{'value':{'candidates':_0x4d1156[_0x5c6798(0x193)](projectCrossRelation)}}),_0x555ae8;}const sameName=(_0x44bffb,_0x5c6d66)=>_0x44bffb[a71_0x56147e(0x1a5)]()===_0x5c6d66[a71_0x56147e(0x1a5)]();function matchesEndpoint(_0x30c1f8,_0x591663,_0x3b6a93,_0x4f0ccd,_0x5329c5){const _0x47be61=a71_0x56147e;return _0x30c1f8[_0x47be61(0x1d0)]===_0x591663[_0x47be61(0x1ab)]&&sameName(_0x30c1f8[_0x47be61(0x1a6)],_0x591663[_0x47be61(0x1cb)])&&sameName(_0x30c1f8[_0x47be61(0x189)],_0x3b6a93)&&_0x30c1f8['toDblinkId']===_0x4f0ccd[_0x47be61(0x1ab)]&&sameName(_0x30c1f8[_0x47be61(0x1b4)],_0x4f0ccd[_0x47be61(0x1cb)])&&sameName(_0x30c1f8[_0x47be61(0x1a2)],_0x5329c5);}export async function prepareCrossRelation(_0x41e75b,_0x2e3732){const _0x2585b9=a71_0x56147e,_0x2786bd=await resolveEndpoint(required(_0x41e75b,'from-datasetcode')),_0x11dfd1=explicitDblink(_0x41e75b);if(_0x11dfd1!==undefined&&_0x2786bd[_0x2585b9(0x1ab)]!==_0x11dfd1)throw CliErrors[_0x2585b9(0x19e)]('--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.');const _0x5b6668={'appCode':_0x41e75b['appCode'],'fromDatasetCode':_0x2786bd[_0x2585b9(0x1a7)],'fromField':required(_0x41e75b,_0x2585b9(0x1d2)),..._0x11dfd1!==undefined?{'fromDblinkId':_0x11dfd1}:{}},_0x10e8a5={'appCode':_0x41e75b['appCode'],'fromDblinkId':_0x2786bd[_0x2585b9(0x1ab)],'fromDatasetCode':_0x2786bd[_0x2585b9(0x1a7)],'fromField':_0x5b6668[_0x2585b9(0x189)]},_0x269bf4=await queryCrossDbRelations(_0x10e8a5);let _0x5eec37=null;if(_0x2e3732!==_0x2585b9(0x1a0)){if(_0x269bf4[_0x2585b9(0x1a8)]>0x1)throw ambiguity(_0x269bf4);_0x5eec37=_0x269bf4[0x0]??null;if(!_0x5eec37)throw CliErrors[_0x2585b9(0x19e)](_0x2585b9(0x1d8));}if(_0x2e3732===_0x2585b9(0x190))return{'operation':_0x2e3732,'from':_0x2786bd,'query':_0x10e8a5,'body':_0x5b6668,'before':_0x5eec37};const _0x1ba774=await resolveEndpoint(required(_0x41e75b,_0x2585b9(0x1c9)));if(_0x2786bd[_0x2585b9(0x1ab)]===_0x1ba774[_0x2585b9(0x1ab)])throw CliErrors[_0x2585b9(0x19e)](_0x2585b9(0x1bc));const _0x1f72a5=_0x41e75b[_0x2585b9(0x187)](_0x2585b9(0x1c6))[_0x2585b9(0x1c2)](),_0x1225f9=_0x41e75b[_0x2585b9(0x187)](_0x2585b9(0x197))[_0x2585b9(0x1c2)](),_0x52c361={..._0x5b6668,'toDatasetCode':_0x1ba774['datasetCode'],'toField':required(_0x41e75b,_0x2585b9(0x1c4)),..._0x1f72a5?{'refTableLabelName':_0x1f72a5}:{},..._0x1225f9?{'cardinality':_0x1225f9}:{}};if(_0x269bf4['some'](_0x31b1e8=>_0x31b1e8[_0x2585b9(0x1d3)]!==_0x5eec37?.['relationId']&&matchesEndpoint(_0x31b1e8,_0x2786bd,_0x52c361['fromField'],_0x1ba774,_0x52c361[_0x2585b9(0x1a2)])))throw CliErrors[_0x2585b9(0x19e)](_0x2585b9(0x184));return{'operation':_0x2e3732,'from':_0x2786bd,'to':_0x1ba774,'query':_0x10e8a5,'body':_0x52c361,'before':_0x5eec37,'expectedLabel':_0x1f72a5||_0x5eec37?.[_0x2585b9(0x19d)]||_0x52c361[_0x2585b9(0x1a2)],'expectedCardinality':_0x1225f9||_0x5eec37?.['cardinality']||null};}function a71_0x2e9c(){const _0x3c3705=['delete','flagMissing','POST','map','appCode','1444696iSCzpH','fromDatasetCode','cardinality','\x20a\x20cross-database\x20relation\x20for\x20','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','tableName','6151527GQznLw','refTableLabelName','validation','string','create','toDblinkId','toField','some','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','toLowerCase','fromTableName','datasetCode','length','extend','label_inherited','dblinkId','fromDatasetName','storageProfile','DB_TABLE','sourceType','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','dbId','body','data','toTableName','Cross-database\x20relation\x20','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20has\x20invalid\x20storage\x20configuration.','list','from','catch','query','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','isSafeInteger','source','411561OQgkGy','enum','2255028VlgQpo','trim','apiError','to-column','7eStcTz','to-label-column','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','122885EElwLX','to-datasetcode','message','table','toDatasetName','dbtableConfig','flag','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','fromDblinkId','\x20verified.','from-column','relationId','multiple\x20cross-database\x20relations\x20matched','832892aJYIJn','filter','20VQgzHM','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','4260765TaoPwa','dataset','str','Dataset\x20','fromField','Would\x20','relationType','update','expectedLabel','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','before'];a71_0x2e9c=function(){return _0x3c3705;};return a71_0x2e9c();}function mutationData(_0x167c7d,_0x1bca8d,_0x410a44){const _0x11bead=a71_0x56147e,{operation:_0x8bbda5,body:_0x22be8e,before:_0xa1c0d4}=_0x167c7d;return{'operation':_0x8bbda5,'selector':{'appCode':_0x22be8e[_0x11bead(0x194)],'from':{'datasetCode':_0x22be8e['fromDatasetCode'],'field':_0x22be8e[_0x11bead(0x189)],'dblinkId':_0x167c7d[_0x11bead(0x1b9)]['dblinkId']}},'before':_0xa1c0d4?projectCrossRelation(_0xa1c0d4):null,'after':_0x410a44,'dryRun':_0x1bca8d,'backend':{'method':'POST','path':CROSS_DB_RELATION_PATHS[_0x8bbda5]},'warnings':_0x8bbda5===_0x11bead(0x18c)&&!_0x22be8e['refTableLabelName']?[{'code':_0x11bead(0x1aa),'message':_0x11bead(0x1c7)}]:[]};}export async function previewCrossRelation(_0x45d33e,_0x492a08){const _0x1e40d0=a71_0x56147e,_0x5dd886=await prepareCrossRelation(_0x45d33e,_0x492a08),_0x2cbd04=_0x5dd886[_0x1e40d0(0x1b2)],_0x2bcfaf=_0x492a08==='delete'?null:{..._0x5dd886[_0x1e40d0(0x18f)]?{'relationId':_0x5dd886[_0x1e40d0(0x18f)]['relationId']}:{},'from':{'datasetCode':_0x5dd886[_0x1e40d0(0x1b9)][_0x1e40d0(0x1a7)],'dblinkId':_0x5dd886['from'][_0x1e40d0(0x1ab)],'table':_0x5dd886[_0x1e40d0(0x1b9)][_0x1e40d0(0x1cb)],'field':_0x2cbd04[_0x1e40d0(0x189)]},'to':{'datasetCode':_0x5dd886['to'][_0x1e40d0(0x1a7)],'dblinkId':_0x5dd886['to'][_0x1e40d0(0x1ab)],'table':_0x5dd886['to']['table'],'field':_0x2cbd04[_0x1e40d0(0x1a2)],'labelField':_0x5dd886['expectedLabel']},'relation':{'cardinality':_0x5dd886['expectedCardinality'],'relationType':0x2}};return{...mutationData(_0x5dd886,!![],null),'after':_0x2bcfaf,'method':_0x1e40d0(0x192),'url':CROSS_DB_RELATION_PATHS[_0x492a08],'body':_0x5dd886['body'],'description':_0x1e40d0(0x18a)+_0x492a08+_0x1e40d0(0x198)+_0x2cbd04['fromDatasetCode']+'.'+_0x2cbd04[_0x1e40d0(0x189)]};}export async function executeCrossRelation(_0x1e87af,_0x50965a,_0x39ce3a){const _0x2dca81=a71_0x56147e,_0x2c3dcf=await prepareCrossRelation(_0x1e87af,_0x50965a);try{await _0x39ce3a(_0x2c3dcf['body']);}catch(_0xcf0a25){if(_0xcf0a25 instanceof CliError&&_0xcf0a25[_0x2dca81(0x1ca)]['includes'](_0x2dca81(0x1d4))){const _0x120a2f=await queryCrossDbRelations(_0x2c3dcf[_0x2dca81(0x1bb)])[_0x2dca81(0x1ba)](()=>[]);throw ambiguity(_0x120a2f);}throw _0xcf0a25;}let _0x2a5c0a=[],_0x299880,_0x509621=![];try{_0x2a5c0a=await queryCrossDbRelations(_0x2c3dcf[_0x2dca81(0x1bb)]);if(_0x50965a===_0x2dca81(0x190))_0x509621=!_0x2a5c0a[_0x2dca81(0x1a3)](_0x510125=>_0x510125['relationId']===_0x2c3dcf['before'][_0x2dca81(0x1d3)]);else{const _0x4af055=_0x2c3dcf[_0x2dca81(0x1b2)],_0x39d25f=_0x2a5c0a[_0x2dca81(0x1d6)](_0x3863f0=>matchesEndpoint(_0x3863f0,_0x2c3dcf[_0x2dca81(0x1b9)],_0x4af055[_0x2dca81(0x189)],_0x2c3dcf['to'],_0x4af055['toField'])&&(_0x50965a===_0x2dca81(0x1a0)||_0x3863f0[_0x2dca81(0x1d3)]===_0x2c3dcf[_0x2dca81(0x18f)][_0x2dca81(0x1d3)]));_0x299880=_0x39d25f[_0x2dca81(0x1a8)]===0x1?_0x39d25f[0x0]:undefined,_0x509621=!!_0x299880&&_0x299880[_0x2dca81(0x19d)]===_0x2c3dcf[_0x2dca81(0x18d)]&&_0x299880[_0x2dca81(0x197)]===_0x2c3dcf['expectedCardinality']&&_0x299880[_0x2dca81(0x18b)]===0x2;}}catch{}const _0x25237f={...mutationData(_0x2c3dcf,![],_0x299880?projectCrossRelation(_0x299880):null),'verification':{'status':_0x509621?'matched':'unconfirmed','verified':_0x509621}};if(!_0x509621){const _0x237dd8=CliErrors[_0x2dca81(0x1c3)](_0x2dca81(0x1b5)+_0x50965a+'\x20write\x20was\x20not\x20verified.',_0x2dca81(0x18e));Object['defineProperty'](_0x237dd8,_0x2dca81(0x1b3),{'value':{..._0x25237f,'candidates':_0x2a5c0a[_0x2dca81(0x193)](projectCrossRelation)}});throw _0x237dd8;}return{'ok':!![],'data':_0x25237f,'message':'Cross-database\x20relation\x20'+_0x50965a+_0x2dca81(0x1d1)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x36ca74=a72_0x25a0;function a72_0x222c(){const _0x1461a7=['cross-relation-update','1224336NQaqSy','11WcGtaX','1130AtSHCo','15700608EcaXak','1770nfOizs','dataset','update','9808580TedMfV','3353ygFRmB','Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','351382BpCdHJ','298422dLdyZz','4371584yhVWuG'];a72_0x222c=function(){return _0x1461a7;};return a72_0x222c();}(function(_0x1eec4f,_0x400343){const _0x19949a=a72_0x25a0,_0x892141=_0x1eec4f();while(!![]){try{const _0x2ddcf0=-parseInt(_0x19949a(0x10a))/0x1*(parseInt(_0x19949a(0x113))/0x2)+parseInt(_0x19949a(0x109))/0x3+-parseInt(_0x19949a(0x115))/0x4+parseInt(_0x19949a(0x110))/0x5+parseInt(_0x19949a(0x10d))/0x6*(-parseInt(_0x19949a(0x111))/0x7)+-parseInt(_0x19949a(0x10c))/0x8+parseInt(_0x19949a(0x114))/0x9*(parseInt(_0x19949a(0x10b))/0xa);if(_0x2ddcf0===_0x400343)break;else _0x892141['push'](_0x892141['shift']());}catch(_0x1f411c){_0x892141['push'](_0x892141['shift']());}}}(a72_0x222c,0xf10a8));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';function a72_0x25a0(_0x405d7a,_0x1256a9){_0x405d7a=_0x405d7a-0x108;const _0x222c82=a72_0x222c();let _0x25a004=_0x222c82[_0x405d7a];return _0x25a004;}export const datasetCrossRelationUpdate={'service':a72_0x36ca74(0x10e),'command':a72_0x36ca74(0x108),'description':a72_0x36ca74(0x112),'risk':'write','strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x3c8371=>validateCrossRelation(_0x3c8371,a72_0x36ca74(0x10f)),'dryRun':_0x4205d7=>previewCrossRelation(_0x4205d7,a72_0x36ca74(0x10f)),'execute':_0x43d808=>executeCrossRelation(_0x43d808,a72_0x36ca74(0x10f),updateCrossDbRelation)};
|