@lovrabet/rabetbase-cli 2.5.10-beta.3 → 2.5.10-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/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x5833ac=a59_0x1fab;(function(_0x386ee0,_0x45a5ef){const _0x145ad8=a59_0x1fab,_0x5f2dbc=_0x386ee0();while(!![]){try{const _0x2f83e6=parseInt(_0x145ad8(0xd7))/0x1*(-parseInt(_0x145ad8(0xd1))/0x2)+-parseInt(_0x145ad8(0xca))/0x3*(parseInt(_0x145ad8(0xcf))/0x4)+-parseInt(_0x145ad8(0xcd))/0x5+parseInt(_0x145ad8(0xcb))/0x6+-parseInt(_0x145ad8(0xcc))/0x7+parseInt(_0x145ad8(0xd5))/0x8+parseInt(_0x145ad8(0xde))/0x9;if(_0x2f83e6===_0x45a5ef)break;else _0x5f2dbc['push'](_0x5f2dbc['shift']());}catch(_0x3b326d){_0x5f2dbc['push'](_0x5f2dbc['shift']());}}}(a59_0x4f4c,0x7eb63));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a59_0x4f4c(){const _0x2ab84b=['1611400VDwlJK','str','8TOBFFF','appcode','446ohEHtc','Get\x20a\x20config\x20value\x20by\x20key','get','app','764536orPNEd','Key\x20not\x20found:\x20','3779IwxfYW','\x20config\x20get\x20--key\x20<key>','key','object','validation','config','read','23949495fKGDQs','1525029NnSFZW','2287926nUtOxu','3060743lSbjmH'];a59_0x4f4c=function(){return _0x2ab84b;};return a59_0x4f4c();}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3a44ee){const _0x3d8bce=a59_0x1fab,_0x436a2b=_0x3a44ee[_0x3d8bce(0xce)](_0x3d8bce(0xd9));if(!_0x436a2b)throw CliErrors[_0x3d8bce(0xdb)]('Missing\x20key.','Usage:\x20'+CLI_BIN_NAME+_0x3d8bce(0xd8));const _0x9b002e=readConfig(),_0x474ae5=_0x436a2b===_0x3d8bce(0xd4)?_0x3d8bce(0xd0):_0x436a2b,_0x385e2e=_0x9b002e[_0x474ae5];if(_0x385e2e===undefined)throw CliErrors[_0x3d8bce(0xdb)](_0x3d8bce(0xd6)+_0x436a2b);return{'ok':!![],'data':typeof _0x385e2e==='object'?_0x385e2e:{[_0x474ae5]:_0x385e2e},'message':typeof _0x385e2e===_0x3d8bce(0xda)?undefined:String(_0x385e2e)};}function a59_0x1fab(_0x2ce743,_0x417f98){_0x2ce743=_0x2ce743-0xca;const _0x4f4c02=a59_0x4f4c();let _0x1fabab=_0x4f4c02[_0x2ce743];return _0x1fabab;}export const configGetDefinition={'service':a59_0x5833ac(0xdc),'command':a59_0x5833ac(0xd3),'description':a59_0x5833ac(0xd2),'risk':a59_0x5833ac(0xdd),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3dc7b5,_0x13e79a){const _0xc7f3d6=a60_0x59e8,_0x390822=_0x3dc7b5();while(!![]){try{const _0x1118cc=parseInt(_0xc7f3d6(0x19a))/0x1+-parseInt(_0xc7f3d6(0x197))/0x2*(parseInt(_0xc7f3d6(0x196))/0x3)+parseInt(_0xc7f3d6(0x19b))/0x4+parseInt(_0xc7f3d6(0x198))/0x5+parseInt(_0xc7f3d6(0x19c))/0x6+-parseInt(_0xc7f3d6(0x199))/0x7*(-parseInt(_0xc7f3d6(0x195))/0x8)+-parseInt(_0xc7f3d6(0x19d))/0x9*(parseInt(_0xc7f3d6(0x194))/0xa);if(_0x1118cc===_0x13e79a)break;else _0x390822['push'](_0x390822['shift']());}catch(_0x47a3b2){_0x390822['push'](_0x390822['shift']());}}}(a60_0xb5d3,0xb3df8));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a60_0xb5d3(){const _0x512ba8=['2288014BDownr','1028630TQUIJG','464114eUGkfq','1187279mKAEiL','1193744AEHpnm','7233126SiLWTr','19289961KFgSqU','10CsLFYF','136UFejit','3kFJTZv'];a60_0xb5d3=function(){return _0x512ba8;};return a60_0xb5d3();}import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';function a60_0x59e8(_0x333e29,_0x2288b5){_0x333e29=_0x333e29-0x194;const _0xb5d347=a60_0xb5d3();let _0x59e883=_0xb5d347[_0x333e29];return _0x59e883;}export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x2f604b=a61_0xe153;(function(_0x8d4b8,_0x41e1c2){const _0x520b15=a61_0xe153,_0x31a3d7=_0x8d4b8();while(!![]){try{const _0x4ef48d=parseInt(_0x520b15(0x1d7))/0x1+-parseInt(_0x520b15(0x1a1))/0x2+-parseInt(_0x520b15(0x1d8))/0x3*(-parseInt(_0x520b15(0x1ad))/0x4)+-parseInt(_0x520b15(0x1be))/0x5*(-parseInt(_0x520b15(0x1ca))/0x6)+-parseInt(_0x520b15(0x1d4))/0x7*(parseInt(_0x520b15(0x1c7))/0x8)+-parseInt(_0x520b15(0x1cd))/0x9*(-parseInt(_0x520b15(0x1b6))/0xa)+-parseInt(_0x520b15(0x1c9))/0xb;if(_0x4ef48d===_0x41e1c2)break;else _0x31a3d7['push'](_0x31a3d7['shift']());}catch(_0xe56cab){_0x31a3d7['push'](_0x31a3d7['shift']());}}}(a61_0x5467,0x6e60d));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';function a61_0x5467(){const _0x46e2c1=['routing','runtime-domain','manifestDomains','235owEUrM','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','join','local-domain','localDomain','length','domain-config','Custom\x20local\x20callback\x20HTTPS\x20origin','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','24vFUPvO','skill-domain','4973507OJYOyz','47940BNfnbP','label','Independent-deployment\x20Domain\x20JSON\x20file','4322727WtaHUH','ExitPromptError','Custom\x20Runtime\x20HTTPS\x20origin','Custom\x20knowledge-base\x20HTTPS\x20origin','certificateDomain','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','region','345842NwEjNz','kb-domain','official','226095OIEOzG','3WhQUoQ','str','626806GsjvLE','keys','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','assign','Official\x20Lovrabet\x20region:\x20','string','nonInteractive','mode','validation','Select\x20Lovrabet\x20region','Custom\x20User\x20HTTPS\x20origin','1135756NphcUG','name','project','enterprise-v1','init','global','cdn','map','Custom\x20SkillHub\x20HTTPS\x20origin','10pqDTQU','config','kb-service-domain','user-domain','domains'];a61_0x5467=function(){return _0x46e2c1;};return a61_0x5467();}import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';function a61_0xe153(_0x4803c2,_0x5c06ee){_0x4803c2=_0x4803c2-0x1a0;const _0x546746=a61_0x5467();let _0xe15307=_0x546746[_0x4803c2];return _0xe15307;}export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a61_0x2f604b(0x1d3),'type':a61_0x2f604b(0x1a7),'description':a61_0x2f604b(0x1a6)+ENABLED_LOVRABET_REGION_VALUES[a61_0x2f604b(0x1c0)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a61_0x2f604b(0x1c4),'type':a61_0x2f604b(0x1a7),'description':a61_0x2f604b(0x1cc)},{'name':a61_0x2f604b(0x1b9),'type':a61_0x2f604b(0x1a7),'description':a61_0x2f604b(0x1ac)},{'name':'api-domain','type':a61_0x2f604b(0x1a7),'description':'Custom\x20platform\x20API\x20HTTPS\x20origin'},{'name':a61_0x2f604b(0x1bc),'type':a61_0x2f604b(0x1a7),'description':a61_0x2f604b(0x1cf)},{'name':a61_0x2f604b(0x1c8),'type':a61_0x2f604b(0x1a7),'description':a61_0x2f604b(0x1b5)},{'name':a61_0x2f604b(0x1d5),'type':a61_0x2f604b(0x1a7),'description':a61_0x2f604b(0x1d0)},{'name':a61_0x2f604b(0x1b8),'type':'string','description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'},{'name':'app-domain','type':a61_0x2f604b(0x1a7),'description':a61_0x2f604b(0x1c6)},{'name':a61_0x2f604b(0x1c1),'type':a61_0x2f604b(0x1a7),'description':a61_0x2f604b(0x1c5)},{'name':'certificate-domain','type':'string','description':'Custom\x20certificate\x20service\x20HTTPS\x20origin'}];async function resolveRegion(_0x4afe73){const _0x389514=a61_0x2f604b,_0x414b04=_0x4afe73[_0x389514(0x1a0)](_0x389514(0x1d3));if(_0x414b04){if(!isEnabledLovrabetRegion(_0x414b04))throw CliErrors['validation']('Region\x20\x22'+_0x414b04+'\x22\x20is\x20not\x20currently\x20available.','Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'));return _0x414b04;}if(_0x4afe73[_0x389514(0x1a8)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x389514(0x1ab),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x389514(0x1b4)](_0x2b4cd3=>({'name':getOfficialRoutingProfile(_0x2b4cd3)[_0x389514(0x1cb)]+'\x20('+_0x2b4cd3+')','value':_0x2b4cd3}))});}catch(_0x36cc6f){if(_0x36cc6f?.[_0x389514(0x1ae)]===_0x389514(0x1ce))throw CliErrors['cancelled']();throw _0x36cc6f;}}export async function executeConfigInit(_0x2e6ec5){const _0xe07270=a61_0x2f604b,_0x221733=resolveDomainConfigInput(_0x2e6ec5),_0x5ddf6b=_0x221733[_0xe07270(0x1ba)],_0x3a1516=Object['keys'](_0x5ddf6b)[_0xe07270(0x1c3)]>0x0;if(_0x3a1516&&_0x2e6ec5[_0xe07270(0x1a0)](_0xe07270(0x1d3)))throw CliErrors[_0xe07270(0x1aa)](_0xe07270(0x1a3));if(!!_0x5ddf6b[_0xe07270(0x1c2)]!==!!_0x5ddf6b[_0xe07270(0x1d1)])throw CliErrors[_0xe07270(0x1aa)]('Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.');const _0x196747=_0x2e6ec5['bool'](_0xe07270(0x1b2))?'global':_0xe07270(0x1af),_0x265b13=readScopedConfig(_0x196747);for(const _0x3c3565 of DOMAIN_CONFIG_FIELDS)delete _0x265b13[_0x3c3565];for(const _0x4ab80e of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x265b13[_0x4ab80e];delete _0x265b13[_0xe07270(0x1bb)];let _0xfad0a=null;if(_0x3a1516)delete _0x265b13['region'],_0x221733[_0xe07270(0x1a9)]==='enterprise-v1'?_0x265b13[_0xe07270(0x1bb)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x221733[_0xe07270(0x1bd)],'cdn':_0x221733[_0xe07270(0x1b3)]}:Object[_0xe07270(0x1a5)](_0x265b13,_0x5ddf6b);else{_0xfad0a=await resolveRegion(_0x2e6ec5);if(_0xfad0a===DEFAULT_LOVRABET_REGION)delete _0x265b13[_0xe07270(0x1d3)];else _0x265b13[_0xe07270(0x1d3)]=_0xfad0a;}return writeScopedConfig(_0x265b13,_0x196747),{'ok':!![],'message':_0x3a1516?_0xe07270(0x1a4)+Object[_0xe07270(0x1a2)](_0x221733['mode']===_0xe07270(0x1b0)?_0x221733['manifestDomains']:_0x5ddf6b)['join'](',\x20')+'.':_0xe07270(0x1d2)+_0xfad0a+'.','data':{'mode':_0x3a1516?'independent':_0xe07270(0x1d6),'protocol':_0x221733[_0xe07270(0x1a9)]===_0xe07270(0x1b0)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0xfad0a,'domains':_0x5ddf6b,'cdn':_0x221733['mode']===_0xe07270(0x1b0)?_0x221733[_0xe07270(0x1b3)]:undefined}};}export const configInitDefinition={'service':a61_0x2f604b(0x1b7),'command':a61_0x2f604b(0x1b1),'description':'Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':'write','confirmationDescription':a61_0x2f604b(0x1bf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x5145df=a62_0x4c03;(function(_0x4d5b87,_0xe769df){const _0x279129=a62_0x4c03,_0x58536c=_0x4d5b87();while(!![]){try{const _0x45298e=-parseInt(_0x279129(0x1bd))/0x1*(-parseInt(_0x279129(0x1c5))/0x2)+-parseInt(_0x279129(0x1c8))/0x3+parseInt(_0x279129(0x1c4))/0x4*(parseInt(_0x279129(0x1cb))/0x5)+-parseInt(_0x279129(0x1bf))/0x6*(-parseInt(_0x279129(0x1c0))/0x7)+parseInt(_0x279129(0x1c9))/0x8+parseInt(_0x279129(0x1cc))/0x9*(-parseInt(_0x279129(0x1c7))/0xa)+-parseInt(_0x279129(0x1c2))/0xb;if(_0x45298e===_0xe769df)break;else _0x58536c['push'](_0x58536c['shift']());}catch(_0x185e7b){_0x58536c['push'](_0x58536c['shift']());}}}(a62_0x32f8,0x1f9c2));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a62_0x4c03(_0x4c76e1,_0x4c280f){_0x4c76e1=_0x4c76e1-0x1bc;const _0x32f803=a62_0x32f8();let _0x4c034d=_0x32f803[_0x4c76e1];return _0x4c034d;}async function execute(_0x3a4597){const _0x3be697=a62_0x4c03,_0x569de1=_0x3a4597[_0x3be697(0x1c3)]('global')?readScopedConfig(_0x3be697(0x1ca)):readConfig();return{'ok':!![],'data':_0x569de1};}function a62_0x32f8(){const _0x3ae9b8=['6frgeIk','config','440QtbqQx','621894suGKJf','1044480NDqhgS','global','45WNYBeX','38646qxlBMd','read','List\x20all\x20config\x20values','68721yCokzK','boolean','456MekrUr','12929BAeiEI','list','1076680XMlThg','bool','65108NgMJyQ'];a62_0x32f8=function(){return _0x3ae9b8;};return a62_0x32f8();}export const configListDefinition={'service':a62_0x5145df(0x1c6),'command':a62_0x5145df(0x1c1),'description':a62_0x5145df(0x1bc),'risk':a62_0x5145df(0x1cd),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x5145df(0x1ca),'type':a62_0x5145df(0x1be),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a63_0x1235(){const _0x464ace=['Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','Top-level\x20key\x20\x22','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','app','\x20workspace\x20add\x20<name>\x20--appcode\x20','6060234UrcOGI','global','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','145564JZJMol','key','string','Settable\x20top-level\x20keys:\x20','riskLevel','join','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Config\x20value','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Missing\x20value.','50jUbNay','config','Usage:\x20','\x20set\x20to:\x20','Set\x20a\x20config\x20value','Use\x20`','4189698IoYrBv','Global','str','length','1232PomQYb','locale','bool','appcode','1250907rpAcPl','env','2401040dpjxAl','write','keys','apps','\x22.\x20Allowed:\x20','validation','value','394554qxmSZz','7IiKRsF','4955CnbcUL','includes','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','`,\x20`','object'];a63_0x1235=function(){return _0x464ace;};return a63_0x1235();}const a63_0x59d389=a63_0x473c;(function(_0x189a67,_0x9e5c04){const _0x4a9caa=a63_0x473c,_0x19dd37=_0x189a67();while(!![]){try{const _0x3b2ccf=-parseInt(_0x4a9caa(0x125))/0x1+parseInt(_0x4a9caa(0x135))/0x2+-parseInt(_0x4a9caa(0x14d))/0x3+-parseInt(_0x4a9caa(0x149))/0x4*(-parseInt(_0x4a9caa(0x127))/0x5)+-parseInt(_0x4a9caa(0x132))/0x6+-parseInt(_0x4a9caa(0x126))/0x7*(parseInt(_0x4a9caa(0x14f))/0x8)+parseInt(_0x4a9caa(0x145))/0x9*(parseInt(_0x4a9caa(0x13f))/0xa);if(_0x3b2ccf===_0x9e5c04)break;else _0x19dd37['push'](_0x19dd37['shift']());}catch(_0x1783d4){_0x19dd37['push'](_0x19dd37['shift']());}}}(a63_0x1235,0x8e8f8));import{CliErrors}from'../../errors.js';function a63_0x473c(_0x53e529,_0x5ec40c){_0x53e529=_0x53e529-0x120;const _0x123576=a63_0x1235();let _0x473c9d=_0x123576[_0x53e529];return _0x473c9d;}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(_0x2c0ee9){const _0x563a4c=a63_0x473c,_0x50939d=_0x2c0ee9[_0x563a4c(0x147)](_0x563a4c(0x136)),_0x1b6a95=_0x2c0ee9['str'](_0x563a4c(0x124));if(!_0x50939d)throw CliErrors['validation']('Missing\x20key.',_0x563a4c(0x141)+CLI_BIN_NAME+_0x563a4c(0x13d));if(_0x1b6a95===undefined||_0x1b6a95==='')throw CliErrors['validation'](_0x563a4c(0x13e),_0x563a4c(0x141)+CLI_BIN_NAME+_0x563a4c(0x13d));let _0x11d77b=_0x50939d,_0x89f6a9=_0x1b6a95;if(_0x1b6a95[_0x563a4c(0x148)]>0x1f4)throw CliErrors['validation'](_0x563a4c(0x13b));if(_0x50939d===_0x563a4c(0x139))throw CliErrors[_0x563a4c(0x123)](_0x563a4c(0x12f));if(!isTopLevelConfigKey(_0x50939d))throw CliErrors[_0x563a4c(0x123)](_0x563a4c(0x12e)+_0x50939d+'\x22\x20is\x20not\x20settable.',_0x563a4c(0x138)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x50939d]&&!CONFIG_ENUM_VALUES[_0x50939d][_0x563a4c(0x128)](_0x1b6a95))throw CliErrors[_0x563a4c(0x123)]('Invalid\x20value\x20for\x20\x22'+_0x50939d+_0x563a4c(0x122)+CONFIG_ENUM_VALUES[_0x50939d][_0x563a4c(0x13a)](',\x20'));if(_0x50939d===_0x563a4c(0x14a)&&!normalizeLocale(_0x1b6a95))throw CliErrors[_0x563a4c(0x123)]('Invalid\x20locale\x20value.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');DOMAIN_CONFIG_FIELDS[_0x563a4c(0x128)](_0x50939d)&&(_0x89f6a9=normalizeDomainOrigin(_0x50939d,_0x1b6a95));const _0x222260={'global':_0x2c0ee9[_0x563a4c(0x14b)](_0x563a4c(0x133))},_0x317888=resolveWriteScope(_0x222260),_0x4f09fe=readScopedConfig(_0x317888);_0x50939d===_0x563a4c(0x130)&&(_0x11d77b=_0x563a4c(0x14c),delete _0x4f09fe['app']);_0x50939d===_0x563a4c(0x14a)&&(_0x89f6a9=normalizeLocale(_0x1b6a95));if(_0x50939d===_0x563a4c(0x14e)){_0x89f6a9=normalizeEnv(_0x1b6a95);if(!isProduction(_0x89f6a9)&&!isDaily(_0x89f6a9))throw CliErrors[_0x563a4c(0x123)](_0x563a4c(0x12c),_0x563a4c(0x129));}if(_0x50939d==='appcode'){const _0x25b6fd=_0x4f09fe['apps']&&typeof _0x4f09fe[_0x563a4c(0x121)]===_0x563a4c(0x12b)?Object[_0x563a4c(0x120)](_0x4f09fe[_0x563a4c(0x121)]):[];if(_0x25b6fd[_0x563a4c(0x148)]>0x0)throw CliErrors[_0x563a4c(0x123)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x563a4c(0x144)+CLI_BIN_NAME+_0x563a4c(0x131)+_0x89f6a9+_0x563a4c(0x12a)+CLI_BIN_NAME+_0x563a4c(0x134));const _0x2f571f=buildCanonicalProjectConfig({..._0x4f09fe},{'appCodes':[_0x89f6a9],'env':typeof _0x4f09fe[_0x563a4c(0x14e)]===_0x563a4c(0x137)?_0x4f09fe[_0x563a4c(0x14e)]:undefined});writeScopedConfig(_0x2f571f,_0x317888);const _0xd468e8=_0x317888==='global'?_0x563a4c(0x146):'Project';return{'ok':!![],'message':'✓\x20'+_0xd468e8+'\x20appcode\x20set\x20to:\x20'+_0x89f6a9+_0x563a4c(0x12d)};}_0x4f09fe[_0x11d77b]=_0x89f6a9,writeScopedConfig(_0x4f09fe,_0x317888);const _0x1cae93=_0x317888===_0x563a4c(0x133)?_0x563a4c(0x146):'Project';return{'ok':!![],'message':'✓\x20'+_0x1cae93+'\x20'+_0x11d77b+_0x563a4c(0x142)+_0x89f6a9};}export const configSetDefinition={'service':a63_0x59d389(0x140),'command':'set','description':a63_0x59d389(0x143),'risk':a63_0x59d389(0x150),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a63_0x59d389(0x137),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a63_0x59d389(0x124),'type':a63_0x59d389(0x137),'description':a63_0x59d389(0x13c),'required':!![]},{'name':a63_0x59d389(0x133),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1cb182,_0x1aec51){var _0x3628d8=a64_0x4493,_0x51cab3=_0x1cb182();while(!![]){try{var _0x3c3795=-parseInt(_0x3628d8(0x17c))/0x1*(-parseInt(_0x3628d8(0x174))/0x2)+-parseInt(_0x3628d8(0x176))/0x3*(parseInt(_0x3628d8(0x171))/0x4)+parseInt(_0x3628d8(0x17e))/0x5*(-parseInt(_0x3628d8(0x179))/0x6)+-parseInt(_0x3628d8(0x17a))/0x7+parseInt(_0x3628d8(0x177))/0x8+parseInt(_0x3628d8(0x17d))/0x9+parseInt(_0x3628d8(0x172))/0xa;if(_0x3c3795===_0x1aec51)break;else _0x51cab3['push'](_0x51cab3['shift']());}catch(_0x37da23){_0x51cab3['push'](_0x51cab3['shift']());}}}(a64_0x45c7,0x8bb1a));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a64_0x4493(_0x281721,_0x62fa3){_0x281721=_0x281721-0x171;var _0x45c7ce=a64_0x45c7();var _0x449382=_0x45c7ce[_0x281721];return _0x449382;}import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};function a64_0x45c7(){var _0x75f1c5=['10181800fMcRXO','global','12NIqmkI','project','3ZOmcXN','1928896BDUYEr','validation','74826YpxQBF','6667864nodoAX','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','104902MfDgdh','5083353WsTGLh','155VCXkbj','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','2168728FlHhHn'];a64_0x45c7=function(){return _0x75f1c5;};return a64_0x45c7();}export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x520d18){var _0xd77d0b=a64_0x4493;if(_0x520d18[_0xd77d0b(0x173)])return'global';if(!isInProject())throw CliErrors[_0xd77d0b(0x178)](_0xd77d0b(0x17b),_0xd77d0b(0x180)+CLI_BIN_NAME+_0xd77d0b(0x17f));return _0xd77d0b(0x175);}export function readScopedConfig(_0x4e2f4c){return readConfigFile(resolveWriteConfigPath(_0x4e2f4c));}export function writeScopedConfig(_0x59a73a,_0x186497){writeConfigFile(resolveWriteConfigPath(_0x186497),_0x59a73a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x4d50d2=a65_0x17ae;(function(_0x138346,_0x226013){const _0x4c5ed6=a65_0x17ae,_0x3ea3d4=_0x138346();while(!![]){try{const _0x3320d0=parseInt(_0x4c5ed6(0x83))/0x1+-parseInt(_0x4c5ed6(0x8c))/0x2*(parseInt(_0x4c5ed6(0xd0))/0x3)+-parseInt(_0x4c5ed6(0xbe))/0x4*(-parseInt(_0x4c5ed6(0x73))/0x5)+-parseInt(_0x4c5ed6(0x71))/0x6+parseInt(_0x4c5ed6(0xc9))/0x7+-parseInt(_0x4c5ed6(0xcb))/0x8*(-parseInt(_0x4c5ed6(0xc7))/0x9)+-parseInt(_0x4c5ed6(0xc8))/0xa;if(_0x3320d0===_0x226013)break;else _0x3ea3d4['push'](_0x3ea3d4['shift']());}catch(_0x2060bc){_0x3ea3d4['push'](_0x3ea3d4['shift']());}}}(a65_0x41f0,0x74b91));import{CliErrors}from'../../errors.js';function a65_0x17ae(_0x2d310d,_0x4e9d08){_0x2d310d=_0x2d310d-0x66;const _0x41f006=a65_0x41f0();let _0x17aeea=_0x41f006[_0x2d310d];return _0x17aeea;}const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x4d50d2(0x88),'ONE_TO_ONE']),SUPPORTED_FIELD_TYPES=new Set([a65_0x4d50d2(0xbf),a65_0x4d50d2(0xb0),a65_0x4d50d2(0xb8),a65_0x4d50d2(0x82),a65_0x4d50d2(0x68),a65_0x4d50d2(0x9c),a65_0x4d50d2(0x99),a65_0x4d50d2(0xaa),'ADDRESS',a65_0x4d50d2(0xba)]);export function isDatasetBatchDesign(_0x540747){const _0x4b7d7a=a65_0x4d50d2;return isObject(_0x540747)&&_0x540747[_0x4b7d7a(0x7f)]===_0x4b7d7a(0xc3);}function a65_0x41f0(){const _0x346131=['UPLOAD','code','refTableLabelField','refTable','2325404jNWsiY','TEXT','every','\x20connects\x20incompatible\x20field\x20types.','\x20non-empty\x20strings.','dataset-batch','fields','cardinality','modelCode','1638477mTShfs','1145450AWcHTE','635754xPLohH','length','32zBYGLM','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','].type\x20is\x20not\x20supported.','relations[','datasetCode','252qSfyJZ','toLowerCase','\x20is\x20required.','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','].design.dataset','unresolvedRelations','SELECT','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','.relationType\x20must\x20be\x20\x22lookup\x22.','unresolvedRelations[','fieldCode','expectedRelations','\x20references\x20an\x20unknown\x20field.','.toDatasetKey','fromDatasetKey','541470NBbdkm','metrics','5ZVNyKx','relations',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','createdDatasets[].localKey','].localKey\x20must\x20match\x20','toDatasetCode','fieldType','].design.dataset\x20must\x20be\x20an\x20object.','type','.cardinality\x20is\x20not\x20supported.','toUpperCase','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','kind','toField','name','BOOLEAN','174582Mcnhof','keys','test','].design.fields[','].design.fields','MANY_TO_ONE','lookup','].confidence','\x20references\x20an\x20unknown\x20dataset\x20localKey.','21240rEUkqk','localKey','design','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','string','relationType','].design','.confidence','\x20objects.','dataset','entries','has','DATE_RANGE','.reason','set','MULTI_SELECT','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','datasetName','expectedLocalKeys','validation','trim','\x20must\x20contain\x20','fieldName','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','join','some','createdRelations','isArray','schemaVersion','USER','size','createdDatasets','fromField','get','modelId','NUMBER','datasets','datasets[','].localKey','map','number','datasetId','].design\x20must\x20be\x20an\x20object.','DATETIME','add'];a65_0x41f0=function(){return _0x346131;};return a65_0x41f0();}export function validateDatasetBatchDesign(_0x1cf2b9){const _0x569efc=a65_0x4d50d2;(!isObject(_0x1cf2b9)||_0x1cf2b9[_0x569efc(0x7f)]!==_0x569efc(0xc3))&&fail(_0x569efc(0x7e));_0x1cf2b9[_0x569efc(0xa9)]!==0x1&&fail(_0x569efc(0xcc));const _0x25416d=objectArray(_0x1cf2b9[_0x569efc(0xb1)],_0x569efc(0xb1),0x1,0x14),_0x292ea1=objectArray(_0x1cf2b9[_0x569efc(0x74)],_0x569efc(0x74),0x0,0xc8),_0x59e201=objectArray(_0x1cf2b9[_0x569efc(0x67)],_0x569efc(0x67),0x0,0xc8),_0x482e06=new Set(),_0x24471e=new Map();for(const [_0x3028e3,_0x592e14]of _0x25416d[_0x569efc(0x97)]()){const _0x2b6b66=requiredString(_0x592e14[_0x569efc(0x8d)],_0x569efc(0xb2)+_0x3028e3+_0x569efc(0xb3));!LOCAL_KEY[_0x569efc(0x85)](_0x2b6b66)&&fail('datasets['+_0x3028e3+_0x569efc(0x77)+LOCAL_KEY['source']+'.');_0x482e06['has'](_0x2b6b66)&&fail(_0x569efc(0x8f));_0x482e06[_0x569efc(0xb9)](_0x2b6b66);!isObject(_0x592e14[_0x569efc(0x8e)])&&fail('datasets['+_0x3028e3+_0x569efc(0xb7));rejectServerDatasetIdentity(_0x592e14[_0x569efc(0x8e)],_0x569efc(0xb2)+_0x3028e3+_0x569efc(0x93));if(!isObject(_0x592e14[_0x569efc(0x8e)][_0x569efc(0x96)]))fail(_0x569efc(0xb2)+_0x3028e3+_0x569efc(0x7a));rejectServerDatasetIdentity(_0x592e14[_0x569efc(0x8e)][_0x569efc(0x96)],'datasets['+_0x3028e3+_0x569efc(0x66)),requiredString(_0x592e14[_0x569efc(0x8e)][_0x569efc(0x96)][_0x569efc(0x9e)],'datasets['+_0x3028e3+'].design.dataset.datasetName');'relations'in _0x592e14['design']&&(!Array[_0x569efc(0xa8)](_0x592e14['design'][_0x569efc(0x74)])||_0x592e14['design'][_0x569efc(0x74)]['length']!==0x0)&&fail(_0x569efc(0xb2)+_0x3028e3+_0x569efc(0x9d));const _0x45f31e=objectArray(_0x592e14[_0x569efc(0x8e)][_0x569efc(0xc4)],_0x569efc(0xb2)+_0x3028e3+_0x569efc(0x87),0x1,0xc8),_0x20edd5=new Map();for(const [_0x12bd31,_0x72f3c5]of _0x45f31e[_0x569efc(0x97)]()){const _0x33f763=fieldName(_0x72f3c5);if(!_0x33f763)fail(_0x569efc(0xb2)+_0x3028e3+_0x569efc(0x86)+_0x12bd31+_0x569efc(0x75));const _0x163d34=_0x33f763[_0x569efc(0xd1)]();if(_0x20edd5[_0x569efc(0x98)](_0x163d34))fail('Dataset\x20'+_0x2b6b66+_0x569efc(0xa4));const _0xd73c00=stringValue(_0x72f3c5[_0x569efc(0x7b)]??_0x72f3c5[_0x569efc(0x79)])[_0x569efc(0x7d)]();if(!SUPPORTED_FIELD_TYPES[_0x569efc(0x98)](_0xd73c00))fail('datasets['+_0x3028e3+_0x569efc(0x86)+_0x12bd31+_0x569efc(0xcd));_0x20edd5[_0x569efc(0x9b)](_0x163d34,_0xd73c00),[_0x72f3c5[_0x569efc(0xbd)],_0x72f3c5['refTableField'],_0x72f3c5[_0x569efc(0xbc)]][_0x569efc(0xa6)](_0x255850=>stringValue(_0x255850))&&fail(_0x569efc(0xb2)+_0x3028e3+_0x569efc(0x86)+_0x12bd31+_0x569efc(0x90));}_0x24471e[_0x569efc(0x9b)](_0x2b6b66,_0x20edd5);}const _0x4b7a7b=new Set(),_0x357f7f=new Set();for(const [_0x2a8586,_0x6993f5]of _0x292ea1[_0x569efc(0x97)]()){const _0xd8b2d9=validateRelation(_0x6993f5,_0x2a8586,_0x482e06,_0x24471e);if(_0x4b7a7b[_0x569efc(0x98)](_0xd8b2d9))fail(_0x569efc(0x69));_0x4b7a7b['add'](_0xd8b2d9);const _0x331475=_0xd8b2d9['split']('\x00',0x2)[_0x569efc(0xa5)]('\x00');if(_0x357f7f['has'](_0x331475))fail('Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.');_0x357f7f[_0x569efc(0xb9)](_0x331475);}for(const [_0x44895a,_0x13f7c1]of _0x59e201[_0x569efc(0x97)]()){requiredString(_0x13f7c1['reason'],_0x569efc(0x6b)+_0x44895a+'].reason'),validateConfidence(_0x13f7c1['confidence'],_0x569efc(0x6b)+_0x44895a+_0x569efc(0x8a));}return _0x1cf2b9;}export function reconcileBatchResult(_0x3c2001){const _0x325e3a=a65_0x4d50d2;if(!isObject(_0x3c2001))return null;try{const _0x2ccd36=stringArray(_0x3c2001[_0x325e3a(0x9f)],_0x325e3a(0x9f),0x1,0x14),_0x2c0d48=new Set(_0x2ccd36);if(_0x2c0d48[_0x325e3a(0xab)]!==_0x2ccd36['length']||_0x2ccd36['some'](_0x32ebe0=>!LOCAL_KEY['test'](_0x32ebe0)))return null;const _0x118ea4=objectArray(_0x3c2001[_0x325e3a(0xac)],_0x325e3a(0xac),0x1,0x14),_0x1787f1=new Map(),_0x15a845=new Set();for(const _0x12ced3 of _0x118ea4){const _0x4b61aa=requiredString(_0x12ced3[_0x325e3a(0x8d)],_0x325e3a(0x76)),_0x130b6b=requiredString(_0x12ced3[_0x325e3a(0xbb)]??_0x12ced3[_0x325e3a(0xcf)],'createdDatasets[].code');if(_0x1787f1[_0x325e3a(0x98)](_0x4b61aa)||_0x15a845[_0x325e3a(0x98)](_0x130b6b))return null;_0x1787f1[_0x325e3a(0x9b)](_0x4b61aa,_0x130b6b),_0x15a845['add'](_0x130b6b);}if(!sameSet(_0x2c0d48,new Set(_0x1787f1[_0x325e3a(0x84)]())))return null;const _0x502dce=objectArray(_0x3c2001[_0x325e3a(0x6d)],_0x325e3a(0x6d),0x0,0xc8),_0xc0d30d=objectArray(_0x3c2001[_0x325e3a(0xa7)],'createdRelations',0x0,0xc8),_0x4dbb7d=relationTupleSet(_0x502dce,![],_0x1787f1),_0xb992c4=relationTupleSet(_0xc0d30d,!![],_0x1787f1);if(!_0x4dbb7d||!_0xb992c4||!sameSet(_0x4dbb7d,_0xb992c4))return null;const _0x51b222=objectArray(_0x3c2001[_0x325e3a(0x67)],_0x325e3a(0x67),0x0,0xc8);return{'expectedLocalKeys':_0x2ccd36,'expectedRelations':_0x502dce,'createdDatasets':_0x118ea4,'createdRelations':_0xc0d30d,'unresolvedRelations':_0x51b222,...isObject(_0x3c2001[_0x325e3a(0x72)])?{'metrics':_0x3c2001[_0x325e3a(0x72)]}:{}};}catch{return null;}}function validateRelation(_0x57e730,_0x5cac01,_0x1e76aa,_0x3dc720){const _0x5b185b=a65_0x4d50d2,_0x3b3bd2=_0x5b185b(0xce)+_0x5cac01+']',_0x5d4001=requiredString(_0x57e730[_0x5b185b(0x70)],_0x3b3bd2+'.fromDatasetKey'),_0x3fab50=requiredString(_0x57e730['toDatasetKey'],_0x3b3bd2+_0x5b185b(0x6f)),_0x52f487=requiredString(_0x57e730[_0x5b185b(0xad)],_0x3b3bd2+'.fromField')[_0x5b185b(0xd1)](),_0x61cf81=requiredString(_0x57e730[_0x5b185b(0x80)],_0x3b3bd2+'.toField')[_0x5b185b(0xd1)]();if(!_0x1e76aa[_0x5b185b(0x98)](_0x5d4001)||!_0x1e76aa[_0x5b185b(0x98)](_0x3fab50))fail(_0x3b3bd2+_0x5b185b(0x8b));const _0x1d55c4=_0x3dc720[_0x5b185b(0xae)](_0x5d4001)?.['get'](_0x52f487),_0x255c07=_0x3dc720[_0x5b185b(0xae)](_0x3fab50)?.[_0x5b185b(0xae)](_0x61cf81);if(_0x1d55c4===undefined||_0x255c07===undefined)fail(_0x3b3bd2+_0x5b185b(0x6e));if(_0x1d55c4&&_0x255c07&&_0x1d55c4!==_0x255c07)fail(_0x3b3bd2+_0x5b185b(0xc1));const _0x743beb=stringValue(_0x57e730[_0x5b185b(0x92)])||_0x5b185b(0x89);if(_0x743beb!==_0x5b185b(0x89))fail(_0x3b3bd2+_0x5b185b(0x6a));const _0x5092dc=stringValue(_0x57e730['cardinality'])||'MANY_TO_ONE';if(!SUPPORTED_CARDINALITIES[_0x5b185b(0x98)](_0x5092dc))fail(_0x3b3bd2+_0x5b185b(0x7c));return requiredString(_0x57e730['reason'],_0x3b3bd2+_0x5b185b(0x9a)),validateConfidence(_0x57e730['confidence'],_0x3b3bd2+_0x5b185b(0x94)),tuple(_0x5d4001,_0x52f487,_0x3fab50,_0x61cf81,_0x5b185b(0x89),_0x5092dc);}function relationTupleSet(_0x183714,_0x5267ef,_0xc4d0c2){const _0x4b80e5=a65_0x4d50d2,_0x106016=new Set();for(const _0x542496 of _0x183714){const _0x69155c=stringValue(_0x542496['fromDatasetKey']),_0x17b2a1=stringValue(_0x542496['toDatasetKey']),_0x1c7d6e=stringValue(_0x542496[_0x4b80e5(0xad)])[_0x4b80e5(0xd1)](),_0x5c4a0b=stringValue(_0x542496[_0x4b80e5(0x80)])[_0x4b80e5(0xd1)](),_0x40ec61=stringValue(_0x542496[_0x4b80e5(0x92)]),_0x2f2c10=stringValue(_0x542496[_0x4b80e5(0xc5)]);if(!_0x69155c||!_0x17b2a1||!_0x1c7d6e||!_0x5c4a0b||_0x40ec61!=='lookup'||!SUPPORTED_CARDINALITIES[_0x4b80e5(0x98)](_0x2f2c10))return null;if(!_0xc4d0c2[_0x4b80e5(0x98)](_0x69155c)||!_0xc4d0c2[_0x4b80e5(0x98)](_0x17b2a1))return null;if(_0x5267ef&&(stringValue(_0x542496['fromDatasetCode'])!==_0xc4d0c2[_0x4b80e5(0xae)](_0x69155c)||stringValue(_0x542496[_0x4b80e5(0x78)])!==_0xc4d0c2['get'](_0x17b2a1)))return null;const _0x4a3078=tuple(_0x69155c,_0x1c7d6e,_0x17b2a1,_0x5c4a0b,_0x40ec61,_0x2f2c10);if(_0x106016[_0x4b80e5(0x98)](_0x4a3078))return null;_0x106016['add'](_0x4a3078);}return _0x106016;}function rejectServerDatasetIdentity(_0x487b5a,_0x436ef4){const _0x7297cd=a65_0x4d50d2;for(const _0x2a853d of['id',_0x7297cd(0xb6),_0x7297cd(0xaf),_0x7297cd(0xbb),_0x7297cd(0xcf),_0x7297cd(0xc6)]){if(_0x487b5a[_0x2a853d]!==undefined&&_0x487b5a[_0x2a853d]!==null&&_0x487b5a[_0x2a853d]!=='')fail(_0x436ef4+'.'+_0x2a853d+_0x7297cd(0xd3));}}function objectArray(_0x16b2b8,_0x4cedee,_0x1a84a9,_0xbcb0db){const _0x2fcff0=a65_0x4d50d2;return(!Array[_0x2fcff0(0xa8)](_0x16b2b8)||_0x16b2b8[_0x2fcff0(0xca)]<_0x1a84a9||_0x16b2b8[_0x2fcff0(0xca)]>_0xbcb0db||_0x16b2b8[_0x2fcff0(0xa6)](_0x54525c=>!isObject(_0x54525c)))&&fail(_0x4cedee+'\x20must\x20contain\x20'+_0x1a84a9+'..'+_0xbcb0db+_0x2fcff0(0x95)),_0x16b2b8;}function stringArray(_0x18e8e7,_0x15c77f,_0x4af3fe,_0x1285c2){const _0x10371c=a65_0x4d50d2;return(!Array['isArray'](_0x18e8e7)||_0x18e8e7[_0x10371c(0xca)]<_0x4af3fe||_0x18e8e7[_0x10371c(0xca)]>_0x1285c2||_0x18e8e7[_0x10371c(0xa6)](_0x1de121=>typeof _0x1de121!==_0x10371c(0x91)||!_0x1de121[_0x10371c(0xa1)]()))&&fail(_0x15c77f+_0x10371c(0xa2)+_0x4af3fe+'..'+_0x1285c2+_0x10371c(0xc2)),_0x18e8e7;}function requiredString(_0x2b7ecd,_0x2dc378){const _0x41f834=a65_0x4d50d2,_0x14b6dd=stringValue(_0x2b7ecd);if(!_0x14b6dd)fail(_0x2dc378+_0x41f834(0xd2));return _0x14b6dd;}function stringValue(_0x300285){const _0x20cc34=a65_0x4d50d2;return typeof _0x300285===_0x20cc34(0x91)?_0x300285[_0x20cc34(0xa1)]():'';}function fieldName(_0x338dde){const _0x4e03ce=a65_0x4d50d2;return stringValue(_0x338dde['code']??_0x338dde[_0x4e03ce(0x6c)]??_0x338dde[_0x4e03ce(0x81)]??_0x338dde[_0x4e03ce(0xa3)]);}function validateConfidence(_0x4d23ed,_0x441bab){const _0x1e529b=a65_0x4d50d2;_0x4d23ed!==undefined&&_0x4d23ed!==null&&(typeof _0x4d23ed!==_0x1e529b(0xb5)||!Number['isFinite'](_0x4d23ed)||_0x4d23ed<0x0||_0x4d23ed>0x1)&&fail(_0x441bab+'\x20must\x20be\x20between\x200\x20and\x201.');}function tuple(..._0x50786c){const _0x481c91=a65_0x4d50d2;return _0x50786c[_0x481c91(0xb4)]((_0x1458b9,_0xc4b4db)=>_0xc4b4db===0x1||_0xc4b4db===0x3?_0x1458b9[_0x481c91(0xd1)]():_0x1458b9)[_0x481c91(0xa5)]('\x00');}function sameSet(_0x4f4f17,_0x42ba07){const _0x59ed5f=a65_0x4d50d2;return _0x4f4f17['size']===_0x42ba07[_0x59ed5f(0xab)]&&[..._0x4f4f17][_0x59ed5f(0xc0)](_0x4b40b9=>_0x42ba07[_0x59ed5f(0x98)](_0x4b40b9));}function isObject(_0x30c981){const _0x2a0e07=a65_0x4d50d2;return typeof _0x30c981==='object'&&_0x30c981!==null&&!Array[_0x2a0e07(0xa8)](_0x30c981);}function fail(_0x1b84d7){const _0x50eb83=a65_0x4d50d2;throw CliErrors[_0x50eb83(0xa0)](_0x1b84d7);}
|
|
1
|
+
const a65_0x15d796=a65_0xdb62;(function(_0x4ec153,_0x48890a){const _0x4abb89=a65_0xdb62,_0xa03e7d=_0x4ec153();while(!![]){try{const _0x23643f=-parseInt(_0x4abb89(0x1cb))/0x1+parseInt(_0x4abb89(0x1ad))/0x2+parseInt(_0x4abb89(0x1dc))/0x3+-parseInt(_0x4abb89(0x1cd))/0x4+parseInt(_0x4abb89(0x1d2))/0x5+parseInt(_0x4abb89(0x1d4))/0x6*(parseInt(_0x4abb89(0x1a6))/0x7)+parseInt(_0x4abb89(0x1e7))/0x8*(-parseInt(_0x4abb89(0x1e8))/0x9);if(_0x23643f===_0x48890a)break;else _0xa03e7d['push'](_0xa03e7d['shift']());}catch(_0x5eda9e){_0xa03e7d['push'](_0xa03e7d['shift']());}}}(a65_0x5ec9,0x5fdb4));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set(['MANY_TO_ONE',a65_0x15d796(0x1e4)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x15d796(0x1ef),a65_0x15d796(0x1d8),a65_0x15d796(0x1f1),'BOOLEAN',a65_0x15d796(0x19e),'MULTI_SELECT',a65_0x15d796(0x1c3),'USER',a65_0x15d796(0x1ca),a65_0x15d796(0x1b2)]);export function isDatasetBatchDesign(_0x16e56a){const _0x371752=a65_0x15d796;return isObject(_0x16e56a)&&_0x16e56a[_0x371752(0x1be)]===_0x371752(0x1df);}export function validateDatasetBatchDesign(_0x550467){const _0x381c25=a65_0x15d796;(!isObject(_0x550467)||_0x550467[_0x381c25(0x1be)]!=='dataset-batch')&&fail(_0x381c25(0x1a5));_0x550467[_0x381c25(0x1e2)]!==0x1&&fail(_0x381c25(0x199));const _0x42234f=objectArray(_0x550467[_0x381c25(0x1f4)],_0x381c25(0x1f4),0x1,0x14),_0x38aafa=objectArray(_0x550467[_0x381c25(0x1f7)],_0x381c25(0x1f7),0x0,0xc8),_0x1b8831=objectArray(_0x550467['unresolvedRelations'],'unresolvedRelations',0x0,0xc8),_0x1e9571=new Set(),_0x471ab6=new Map();for(const [_0x5f1c1c,_0x1d5a19]of _0x42234f[_0x381c25(0x1ea)]()){const _0x2136df=requiredString(_0x1d5a19['localKey'],_0x381c25(0x1c6)+_0x5f1c1c+_0x381c25(0x1ec));!LOCAL_KEY[_0x381c25(0x1f8)](_0x2136df)&&fail(_0x381c25(0x1c6)+_0x5f1c1c+_0x381c25(0x1e5)+LOCAL_KEY[_0x381c25(0x1fa)]+'.');_0x1e9571[_0x381c25(0x1cc)](_0x2136df)&&fail(_0x381c25(0x1b8));_0x1e9571[_0x381c25(0x1a4)](_0x2136df);!isObject(_0x1d5a19[_0x381c25(0x1b9)])&&fail(_0x381c25(0x1c6)+_0x5f1c1c+'].design\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x1d5a19[_0x381c25(0x1b9)],_0x381c25(0x1c6)+_0x5f1c1c+_0x381c25(0x1a3));if(!isObject(_0x1d5a19[_0x381c25(0x1b9)][_0x381c25(0x19b)]))fail(_0x381c25(0x1c6)+_0x5f1c1c+'].design.dataset\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x1d5a19[_0x381c25(0x1b9)][_0x381c25(0x19b)],_0x381c25(0x1c6)+_0x5f1c1c+_0x381c25(0x1a9)),requiredString(_0x1d5a19['design'][_0x381c25(0x19b)]['datasetName'],_0x381c25(0x1c6)+_0x5f1c1c+'].design.dataset.datasetName');_0x381c25(0x1f7)in _0x1d5a19[_0x381c25(0x1b9)]&&(!Array[_0x381c25(0x1d6)](_0x1d5a19[_0x381c25(0x1b9)]['relations'])||_0x1d5a19[_0x381c25(0x1b9)][_0x381c25(0x1f7)]['length']!==0x0)&&fail(_0x381c25(0x1c6)+_0x5f1c1c+_0x381c25(0x1f5));const _0x1cc731=objectArray(_0x1d5a19[_0x381c25(0x1b9)]['fields'],_0x381c25(0x1c6)+_0x5f1c1c+'].design.fields',0x1,0xc8),_0x4d017f=new Map();for(const [_0x2fce23,_0xd6e67d]of _0x1cc731[_0x381c25(0x1ea)]()){const _0x27ffe6=fieldName(_0xd6e67d);if(!_0x27ffe6)fail(_0x381c25(0x1c6)+_0x5f1c1c+'].design.fields['+_0x2fce23+_0x381c25(0x1ce));const _0x1d2ef1=_0x27ffe6[_0x381c25(0x1c7)]();if(_0x4d017f[_0x381c25(0x1cc)](_0x1d2ef1))fail(_0x381c25(0x1e1)+_0x2136df+_0x381c25(0x1f0));const _0x158c45=stringValue(_0xd6e67d[_0x381c25(0x1c0)]??_0xd6e67d[_0x381c25(0x1a8)])[_0x381c25(0x195)]();if(!SUPPORTED_FIELD_TYPES[_0x381c25(0x1cc)](_0x158c45))fail(_0x381c25(0x1c6)+_0x5f1c1c+_0x381c25(0x1de)+_0x2fce23+_0x381c25(0x1b1));_0x4d017f['set'](_0x1d2ef1,_0x158c45),[_0xd6e67d['refTable'],_0xd6e67d[_0x381c25(0x1ee)],_0xd6e67d['refTableLabelField']]['some'](_0xc05995=>stringValue(_0xc05995))&&fail(_0x381c25(0x1c6)+_0x5f1c1c+'].design.fields['+_0x2fce23+']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.');}_0x471ab6[_0x381c25(0x1a2)](_0x2136df,_0x4d017f);}const _0x3c934b=new Set(),_0x24e95c=new Set();for(const [_0x53abf5,_0x22e51e]of _0x38aafa['entries']()){const _0x13a9e2=validateRelation(_0x22e51e,_0x53abf5,_0x1e9571,_0x471ab6);if(_0x3c934b['has'](_0x13a9e2))fail(_0x381c25(0x1c2));_0x3c934b['add'](_0x13a9e2);const _0x9d6a03=_0x13a9e2[_0x381c25(0x1f6)]('\x00',0x2)[_0x381c25(0x1ba)]('\x00');if(_0x24e95c[_0x381c25(0x1cc)](_0x9d6a03))fail('Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.');_0x24e95c[_0x381c25(0x1a4)](_0x9d6a03);}for(const [_0x182a39,_0x11c8ac]of _0x1b8831[_0x381c25(0x1ea)]()){requiredString(_0x11c8ac[_0x381c25(0x1f9)],_0x381c25(0x1a7)+_0x182a39+_0x381c25(0x1b4)),validateConfidence(_0x11c8ac[_0x381c25(0x1ae)],_0x381c25(0x1a7)+_0x182a39+_0x381c25(0x1eb));}return _0x550467;}export function reconcileBatchResult(_0x3d5d9b){const _0xe97ac1=a65_0x15d796;if(!isObject(_0x3d5d9b))return null;try{const _0x20aae2=stringArray(_0x3d5d9b[_0xe97ac1(0x1ac)],_0xe97ac1(0x1ac),0x1,0x14),_0x1ad0f8=new Set(_0x20aae2);if(_0x1ad0f8[_0xe97ac1(0x1f2)]!==_0x20aae2[_0xe97ac1(0x1d5)]||_0x20aae2[_0xe97ac1(0x1d0)](_0x3d4c15=>!LOCAL_KEY['test'](_0x3d4c15)))return null;const _0x32adc6=objectArray(_0x3d5d9b[_0xe97ac1(0x1ab)],'createdDatasets',0x1,0x14),_0x520af5=new Map(),_0x51263d=new Set();for(const _0x51f0b of _0x32adc6){const _0x5540a7=requiredString(_0x51f0b[_0xe97ac1(0x1d7)],_0xe97ac1(0x1fb)),_0x58319e=requiredString(_0x51f0b['code']??_0x51f0b['datasetCode'],_0xe97ac1(0x1d1));if(_0x520af5[_0xe97ac1(0x1cc)](_0x5540a7)||_0x51263d[_0xe97ac1(0x1cc)](_0x58319e))return null;_0x520af5['set'](_0x5540a7,_0x58319e),_0x51263d['add'](_0x58319e);}if(!sameSet(_0x1ad0f8,new Set(_0x520af5[_0xe97ac1(0x1bb)]())))return null;const _0x47be95=objectArray(_0x3d5d9b[_0xe97ac1(0x1aa)],'expectedRelations',0x0,0xc8),_0x1527b3=objectArray(_0x3d5d9b[_0xe97ac1(0x1da)],_0xe97ac1(0x1da),0x0,0xc8),_0x29a6f8=relationTupleSet(_0x47be95,![],_0x520af5),_0x11c551=relationTupleSet(_0x1527b3,!![],_0x520af5);if(!_0x29a6f8||!_0x11c551||!sameSet(_0x29a6f8,_0x11c551))return null;const _0x28385a=objectArray(_0x3d5d9b[_0xe97ac1(0x1a0)],_0xe97ac1(0x1a0),0x0,0xc8);return{'expectedLocalKeys':_0x20aae2,'expectedRelations':_0x47be95,'createdDatasets':_0x32adc6,'createdRelations':_0x1527b3,'unresolvedRelations':_0x28385a,...isObject(_0x3d5d9b[_0xe97ac1(0x1f3)])?{'metrics':_0x3d5d9b[_0xe97ac1(0x1f3)]}:{}};}catch{return null;}}function validateRelation(_0x1aa3fd,_0x54afce,_0x2fcebd,_0xd6e71){const _0x2018b7=a65_0x15d796,_0x12a832='relations['+_0x54afce+']',_0x5de95b=requiredString(_0x1aa3fd['fromDatasetKey'],_0x12a832+_0x2018b7(0x1c9)),_0x311d34=requiredString(_0x1aa3fd[_0x2018b7(0x196)],_0x12a832+_0x2018b7(0x1e0)),_0x354fe9=requiredString(_0x1aa3fd['fromField'],_0x12a832+'.fromField')[_0x2018b7(0x1c7)](),_0x36522d=requiredString(_0x1aa3fd[_0x2018b7(0x194)],_0x12a832+_0x2018b7(0x1e9))[_0x2018b7(0x1c7)]();if(!_0x2fcebd['has'](_0x5de95b)||!_0x2fcebd[_0x2018b7(0x1cc)](_0x311d34))fail(_0x12a832+'\x20references\x20an\x20unknown\x20dataset\x20localKey.');const _0x375fdc=_0xd6e71[_0x2018b7(0x1fc)](_0x5de95b)?.[_0x2018b7(0x1fc)](_0x354fe9),_0x371e35=_0xd6e71[_0x2018b7(0x1fc)](_0x311d34)?.[_0x2018b7(0x1fc)](_0x36522d);if(_0x375fdc===undefined||_0x371e35===undefined)fail(_0x12a832+_0x2018b7(0x1cf));if(_0x375fdc&&_0x371e35&&_0x375fdc!==_0x371e35)fail(_0x12a832+_0x2018b7(0x1dd));const _0x2344a7=stringValue(_0x1aa3fd[_0x2018b7(0x1a1)])||_0x2018b7(0x19f);if(_0x2344a7!==_0x2018b7(0x19f))fail(_0x12a832+'.relationType\x20must\x20be\x20\x22lookup\x22.');const _0xa0881e=stringValue(_0x1aa3fd[_0x2018b7(0x1d3)])||'MANY_TO_ONE';if(!SUPPORTED_CARDINALITIES['has'](_0xa0881e))fail(_0x12a832+_0x2018b7(0x1ed));return requiredString(_0x1aa3fd['reason'],_0x12a832+_0x2018b7(0x1c4)),validateConfidence(_0x1aa3fd[_0x2018b7(0x1ae)],_0x12a832+_0x2018b7(0x1e6)),tuple(_0x5de95b,_0x354fe9,_0x311d34,_0x36522d,_0x2018b7(0x19f),_0xa0881e);}function relationTupleSet(_0x3f37d6,_0x48e1f8,_0x4f699c){const _0x8bb874=a65_0x15d796,_0x1766e4=new Set();for(const _0x460da1 of _0x3f37d6){const _0x3876c2=stringValue(_0x460da1[_0x8bb874(0x1db)]),_0xa1b70f=stringValue(_0x460da1[_0x8bb874(0x196)]),_0x4405ca=stringValue(_0x460da1[_0x8bb874(0x1af)])[_0x8bb874(0x1c7)](),_0x30af4b=stringValue(_0x460da1[_0x8bb874(0x194)])[_0x8bb874(0x1c7)](),_0x483889=stringValue(_0x460da1[_0x8bb874(0x1a1)]),_0x335cc7=stringValue(_0x460da1['cardinality']);if(!_0x3876c2||!_0xa1b70f||!_0x4405ca||!_0x30af4b||_0x483889!==_0x8bb874(0x19f)||!SUPPORTED_CARDINALITIES[_0x8bb874(0x1cc)](_0x335cc7))return null;if(!_0x4f699c[_0x8bb874(0x1cc)](_0x3876c2)||!_0x4f699c[_0x8bb874(0x1cc)](_0xa1b70f))return null;if(_0x48e1f8&&(stringValue(_0x460da1[_0x8bb874(0x1b3)])!==_0x4f699c['get'](_0x3876c2)||stringValue(_0x460da1[_0x8bb874(0x19d)])!==_0x4f699c['get'](_0xa1b70f)))return null;const _0xdf4a4a=tuple(_0x3876c2,_0x4405ca,_0xa1b70f,_0x30af4b,_0x483889,_0x335cc7);if(_0x1766e4[_0x8bb874(0x1cc)](_0xdf4a4a))return null;_0x1766e4[_0x8bb874(0x1a4)](_0xdf4a4a);}return _0x1766e4;}function a65_0xdb62(_0xfd1df0,_0x1078d8){_0xfd1df0=_0xfd1df0-0x194;const _0x5ec95b=a65_0x5ec9();let _0xdb624c=_0x5ec95b[_0xfd1df0];return _0xdb624c;}function rejectServerDatasetIdentity(_0x41494f,_0x3addd4){const _0x14f5bf=a65_0x15d796;for(const _0x212ea9 of['id',_0x14f5bf(0x197),_0x14f5bf(0x1bf),_0x14f5bf(0x198),'datasetCode','modelCode']){if(_0x41494f[_0x212ea9]!==undefined&&_0x41494f[_0x212ea9]!==null&&_0x41494f[_0x212ea9]!=='')fail(_0x3addd4+'.'+_0x212ea9+_0x14f5bf(0x19a));}}function objectArray(_0x184c2b,_0x1d6842,_0x4c2322,_0x5eb6da){const _0x301672=a65_0x15d796;return(!Array['isArray'](_0x184c2b)||_0x184c2b[_0x301672(0x1d5)]<_0x4c2322||_0x184c2b[_0x301672(0x1d5)]>_0x5eb6da||_0x184c2b[_0x301672(0x1d0)](_0x8acd4=>!isObject(_0x8acd4)))&&fail(_0x1d6842+'\x20must\x20contain\x20'+_0x4c2322+'..'+_0x5eb6da+_0x301672(0x1c8)),_0x184c2b;}function stringArray(_0x1dfdbc,_0x2778a8,_0x259b68,_0x181e57){const _0x5cfe04=a65_0x15d796;return(!Array[_0x5cfe04(0x1d6)](_0x1dfdbc)||_0x1dfdbc['length']<_0x259b68||_0x1dfdbc['length']>_0x181e57||_0x1dfdbc['some'](_0x38d30c=>typeof _0x38d30c!==_0x5cfe04(0x1b7)||!_0x38d30c[_0x5cfe04(0x19c)]()))&&fail(_0x2778a8+_0x5cfe04(0x1bc)+_0x259b68+'..'+_0x181e57+_0x5cfe04(0x1e3)),_0x1dfdbc;}function requiredString(_0x304ae0,_0x57c4e8){const _0x503e1c=stringValue(_0x304ae0);if(!_0x503e1c)fail(_0x57c4e8+'\x20is\x20required.');return _0x503e1c;}function a65_0x5ec9(){const _0xb9ab4d=['DATETIME','size','metrics','datasets','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','split','relations','test','reason','source','createdDatasets[].localKey','get','toField','toUpperCase','toDatasetKey','datasetId','code','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','dataset','trim','toDatasetCode','SELECT','lookup','unresolvedRelations','relationType','set','].design','add','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','5019308ZCJStx','unresolvedRelations[','fieldType','].design.dataset','expectedRelations','createdDatasets','expectedLocalKeys','1176880yOMwPK','confidence','fromField','map','].type\x20is\x20not\x20supported.','UPLOAD','fromDatasetCode','].reason','\x20must\x20be\x20between\x200\x20and\x201.','name','string','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','design','join','keys','\x20must\x20contain\x20','object','kind','modelId','type','fieldCode','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','DATE_RANGE','.reason','number','datasets[','toLowerCase','\x20objects.','.fromDatasetKey','ADDRESS','644696CbIGCh','has','2433588opLwfq',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','\x20references\x20an\x20unknown\x20field.','some','createdDatasets[].code','468850VRdROa','cardinality','6qLQRZH','length','isArray','localKey','NUMBER','fieldName','createdRelations','fromDatasetKey','2260266wvicjM','\x20connects\x20incompatible\x20field\x20types.','].design.fields[','dataset-batch','.toDatasetKey','Dataset\x20','schemaVersion','\x20non-empty\x20strings.','ONE_TO_ONE','].localKey\x20must\x20match\x20','.confidence','4055640zBXoSR','9HmBJEG','.toField','entries','].confidence','].localKey','.cardinality\x20is\x20not\x20supported.','refTableField','TEXT','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.'];a65_0x5ec9=function(){return _0xb9ab4d;};return a65_0x5ec9();}function stringValue(_0x1f8e4d){const _0x1e5aba=a65_0x15d796;return typeof _0x1f8e4d===_0x1e5aba(0x1b7)?_0x1f8e4d[_0x1e5aba(0x19c)]():'';}function fieldName(_0x4d8e74){const _0x26edc1=a65_0x15d796;return stringValue(_0x4d8e74[_0x26edc1(0x198)]??_0x4d8e74[_0x26edc1(0x1c1)]??_0x4d8e74[_0x26edc1(0x1b6)]??_0x4d8e74[_0x26edc1(0x1d9)]);}function validateConfidence(_0x408eb4,_0x2c0f05){const _0x48917a=a65_0x15d796;_0x408eb4!==undefined&&_0x408eb4!==null&&(typeof _0x408eb4!==_0x48917a(0x1c5)||!Number['isFinite'](_0x408eb4)||_0x408eb4<0x0||_0x408eb4>0x1)&&fail(_0x2c0f05+_0x48917a(0x1b5));}function tuple(..._0x4cc9c8){const _0x2a4ab1=a65_0x15d796;return _0x4cc9c8[_0x2a4ab1(0x1b0)]((_0x1d452f,_0x4fcdfd)=>_0x4fcdfd===0x1||_0x4fcdfd===0x3?_0x1d452f[_0x2a4ab1(0x1c7)]():_0x1d452f)[_0x2a4ab1(0x1ba)]('\x00');}function sameSet(_0x47b936,_0x1d7105){const _0x565668=a65_0x15d796;return _0x47b936[_0x565668(0x1f2)]===_0x1d7105[_0x565668(0x1f2)]&&[..._0x47b936]['every'](_0x3b06a9=>_0x1d7105[_0x565668(0x1cc)](_0x3b06a9));}function isObject(_0x63b2d7){const _0x5cd82d=a65_0x15d796;return typeof _0x63b2d7===_0x5cd82d(0x1bd)&&_0x63b2d7!==null&&!Array['isArray'](_0x63b2d7);}function fail(_0x2f9a72){throw CliErrors['validation'](_0x2f9a72);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a66_0x5e998c=a66_0x5895;(function(_0x400744,_0x30334d){const _0x3d9884=a66_0x5895,_0x3c1b80=_0x400744();while(!![]){try{const _0x3746a1=parseInt(_0x3d9884(0x1df))/0x1+parseInt(_0x3d9884(0x1fc))/0x2+parseInt(_0x3d9884(0x1e3))/0x3+-parseInt(_0x3d9884(0x1f2))/0x4+parseInt(_0x3d9884(0x1e5))/0x5+parseInt(_0x3d9884(0x1d1))/0x6+-parseInt(_0x3d9884(0x1c4))/0x7*(parseInt(_0x3d9884(0x1ed))/0x8);if(_0x3746a1===_0x30334d)break;else _0x3c1b80['push'](_0x3c1b80['shift']());}catch(_0xa98191){_0x3c1b80['push'](_0x3c1b80['shift']());}}}(a66_0x3b85,0x461cc));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a66_0x5e998c(0x1dd),METADATA_BACKEND_PATH=a66_0x5e998c(0x1cf),UNGROUPED_BUSINESS_GROUP=a66_0x5e998c(0x1cb);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x12eb9a,input:_0x183c7d,dryRun:_0x160701}){const _0x359dbc=a66_0x5e998c;validateInput(_0x183c7d);const _0x2f5dba=normalizeBusinessGroupArgument(_0x183c7d['businessGroup']),_0x506619=await getDatasetDetail(_0x183c7d[_0x359dbc(0x1e0)]),_0x5b0f94=resolveBusinessGroupDataset(_0x506619,_0x183c7d[_0x359dbc(0x1e0)]);assertBusinessGroupUpdateSupported(_0x5b0f94,_0x2f5dba);const _0x4be657=loadCurrentBusinessGroup(_0x506619,_0x5b0f94);assertExpectedBusinessGroup(_0x4be657,_0x183c7d[_0x359dbc(0x1fe)]);const _0x3fbf41=buildBackendPlan(_0x12eb9a,_0x5b0f94,_0x2f5dba),_0xadfb87=_0x4be657!==_0x2f5dba;let _0x227466;if(_0xadfb87&&!_0x160701){_0x3fbf41['kind']===_0x359dbc(0x1db)?await updateDbTableBusinessGroup(_0x3fbf41[_0x359dbc(0x1f0)]):await updateErBusinessGroup(_0x3fbf41['payload']);const _0x427633=await getDatasetDetail(_0x5b0f94[_0x359dbc(0x1e0)]),_0x1492e7=resolveBusinessGroupDataset(_0x427633,_0x5b0f94[_0x359dbc(0x1e0)]),_0x42ffe6=loadCurrentBusinessGroup(_0x427633,_0x1492e7);if(_0x42ffe6!==_0x2f5dba)throw CliErrors[_0x359dbc(0x1f1)](_0x359dbc(0x1f6),_0x359dbc(0x1ef)+JSON[_0x359dbc(0x1dc)](displayBusinessGroup(_0x2f5dba))+_0x359dbc(0x1c8)+JSON['stringify'](displayBusinessGroup(_0x42ffe6))+'.');_0x227466={'verified':!![],'status':'matched','afterReadback':{'businessGroup':displayBusinessGroup(_0x42ffe6)}};}else!_0xadfb87&&(_0x227466={'verified':!![],'status':_0x359dbc(0x1e1),'afterReadback':{'businessGroup':displayBusinessGroup(_0x4be657)}});const _0x3eaa2f={'operation':_0x359dbc(0x1c7),'appCode':_0x12eb9a,'selector':{'code':_0x5b0f94['code']},'dataset':{'id':_0x5b0f94['id'],'code':_0x5b0f94['code'],'name':_0x5b0f94[_0x359dbc(0x1cd)],'sourceType':_0x5b0f94['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x4be657)},'after':{'businessGroup':displayBusinessGroup(_0x2f5dba)},'changed':_0xadfb87,'dryRun':_0x160701,'submitted':_0xadfb87&&!_0x160701,'backend':{'method':_0x3fbf41['method'],'path':_0x3fbf41[_0x359dbc(0x1fd)],'payload':_0x3fbf41['payload']},..._0x227466?{'verification':_0x227466}:{},'warnings':[]};return{'ok':!![],'data':_0x3eaa2f,'message':_0xadfb87?_0x160701?_0x359dbc(0x1c2)+_0x5b0f94[_0x359dbc(0x1e0)]:_0x359dbc(0x1ff)+_0x5b0f94['code']:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x5b0f94[_0x359dbc(0x1e0)]};}export const datasetBusinessGroupUpdate={'service':a66_0x5e998c(0x1d6),'command':a66_0x5e998c(0x1e2),'description':'Update\x20business\x20scenario\x20group','risk':'write','flags':[CODE_FLAG,{'name':a66_0x5e998c(0x1e7),'type':a66_0x5e998c(0x1d7),'required':!![],'description':a66_0x5e998c(0x1d0)},{'name':a66_0x5e998c(0x205),'type':a66_0x5e998c(0x1d7),'required':![],'description':a66_0x5e998c(0x1fb)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x46c6b6){validateInput(readBusinessGroupUpdateInput(_0x46c6b6));},async 'dryRun'(_0x1e6703){const _0x1a84a3=a66_0x5e998c,_0x418268=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x1e6703[_0x1a84a3(0x203)],'input':readBusinessGroupUpdateInput(_0x1e6703),'dryRun':!![]});return{'method':_0x418268[_0x1a84a3(0x1d4)][_0x1a84a3(0x1fa)]['method'],'url':_0x418268[_0x1a84a3(0x1d4)][_0x1a84a3(0x1fa)][_0x1a84a3(0x1fd)],'body':_0x418268['data'][_0x1a84a3(0x1fa)]['payload'],'description':_0x418268[_0x1a84a3(0x1d3)],..._0x418268[_0x1a84a3(0x1d4)]};},async 'execute'(_0x38e58c){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x38e58c['appCode'],'input':readBusinessGroupUpdateInput(_0x38e58c),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0xff9ee4){const _0x3ddaf7=a66_0x5e998c,_0x34d189=_0xff9ee4['str'](_0x3ddaf7(0x205));return{'code':trim(_0xff9ee4[_0x3ddaf7(0x1f9)](_0x3ddaf7(0x1e0))),'businessGroup':_0xff9ee4[_0x3ddaf7(0x1f9)]('business-group'),'expectBusinessGroup':_0x34d189===undefined||_0x34d189===''?undefined:_0x34d189};}function validateInput(_0x1c857e){const _0x12f9f4=a66_0x5e998c;if(!trim(_0x1c857e[_0x12f9f4(0x1e0)]))throw CliErrors[_0x12f9f4(0x1cc)](_0x12f9f4(0x1d2));if(_0x1c857e['businessGroup']===undefined)throw CliErrors[_0x12f9f4(0x1cc)]('--business-group\x20is\x20required');if(!trim(_0x1c857e[_0x12f9f4(0x1da)]))throw CliErrors[_0x12f9f4(0x1cc)](_0x12f9f4(0x1de));}function assertBusinessGroupUpdateSupported(_0x43cc55,_0x5cd39d){const _0x31eb53=a66_0x5e998c;if(_0x43cc55['sourceType']==='DB_TABLE'&&!_0x5cd39d)throw CliErrors[_0x31eb53(0x1cc)](_0x31eb53(0x1ce));}function resolveBusinessGroupDataset(_0x2c6cbb,_0x46b8fc){const _0x2414f9=a66_0x5e998c,_0x521e63=asPlainObject(_0x2c6cbb[_0x2414f9(0x1d6)]),_0x470efd=asPlainObject(_0x2c6cbb['dbtableConfig']),_0x5b8464=resolveSourceType(_0x2c6cbb,_0x521e63,_0x470efd),_0x11bb75=firstString(_0x2c6cbb[_0x2414f9(0x1f7)],_0x2c6cbb[_0x2414f9(0x1e0)],_0x521e63[_0x2414f9(0x1c5)],_0x46b8fc)||_0x46b8fc;return{'id':firstNumber(_0x2c6cbb[_0x2414f9(0x201)],_0x2c6cbb['id'],_0x521e63[_0x2414f9(0x1c9)])??firstString(_0x2c6cbb['modelId'],_0x2c6cbb['id'],_0x521e63[_0x2414f9(0x1c9)])??null,'code':_0x11bb75,'name':firstString(_0x2c6cbb[_0x2414f9(0x1cd)],_0x521e63[_0x2414f9(0x1d8)],_0x521e63[_0x2414f9(0x1cd)])||null,'sourceType':_0x5b8464,'dbTableSelector':_0x5b8464===_0x2414f9(0x1c3)?{'dbLinkId':firstNumber(_0x470efd[_0x2414f9(0x1d5)]),'tableName':firstString(_0x470efd[_0x2414f9(0x1f5)])||null}:null};}function resolveSourceType(_0x20998f,_0xeec72e,_0x1d3569){const _0xc79630=a66_0x5e998c,_0x1facb4=firstString(_0x20998f[_0xc79630(0x1e6)],_0x20998f[_0xc79630(0x207)],_0xeec72e[_0xc79630(0x1e6)],_0xeec72e[_0xc79630(0x207)])?.[_0xc79630(0x202)]()[_0xc79630(0x1f8)]();if(_0x1facb4===_0xc79630(0x1c3)||_0x1facb4===_0xc79630(0x1ee))return _0x1facb4;if(Object[_0xc79630(0x1f3)](_0x1d3569)[_0xc79630(0x1e8)]>0x0)return'DB_TABLE';throw CliErrors[_0xc79630(0x1cc)](_0xc79630(0x204));}function a66_0x3b85(){const _0x44dd1c=['toUpperCase','str','backend','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','655280zAIbIS','path','expectBusinessGroup','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','found','modelId','trim','appCode','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','expect-business-group','number','sourceType','dbTableSelector','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','DB_TABLE','788403bJClZR','datasetCode','parse','update',',\x20actual\x20','datasetId','Expectation\x20mismatch\x20at\x20businessGroup','ungrouped','validation','name','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','/smartapi/question/er-config/business-group/edit','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','986574HIapEC','--code\x20is\x20required','message','data','dbId','dataset','string','datasetName','isFinite','businessGroup','db-table','stringify','/smartapi/dblink/updateTableBusinessGroup','--business-group\x20must\x20not\x20be\x20blank','354278vQylOv','code','unchanged','business-group-update','1322505hiAXyA','object','582345rIFYBb','source','business-group','length','dbLinkId','isArray','value','prototype','56obgCBB','METADATA','Expected\x20','payload','apiError','1312272NlZkNK','keys','extend','tableName','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','modelCode'];a66_0x3b85=function(){return _0x44dd1c;};return a66_0x3b85();}function loadCurrentBusinessGroup(_0x4c0184,_0x55ecd4){const _0x5c97ee=a66_0x5e998c,_0x456e43=readBusinessGroupFromDatasetDetail(_0x4c0184,_0x55ecd4[_0x5c97ee(0x207)]);if(_0x456e43[_0x5c97ee(0x200)])return normalizeBusinessGroup(_0x456e43[_0x5c97ee(0x1eb)]);return'';}function readBusinessGroupFromDatasetDetail(_0x2ca011,_0x34f381){const _0x146105=a66_0x5e998c,_0x398793=asPlainObject(_0x2ca011[_0x146105(0x1d6)]),_0x13bd6b=firstPresent(_0x2ca011[_0x146105(0x1da)]);if(_0x13bd6b['found'])return _0x13bd6b;const _0x4abe2d=firstPresent(_0x398793[_0x146105(0x1da)]);if(_0x4abe2d[_0x146105(0x200)])return _0x4abe2d;if(_0x34f381===_0x146105(0x1c3))return{'found':![]};const _0x2a4952=readBusinessGroupFromExtend(_0x2ca011['extend']);if(_0x2a4952['found'])return _0x2a4952;return readBusinessGroupFromExtend(_0x398793[_0x146105(0x1f4)]);}function readBusinessGroupFromExtend(_0x59aefc){const _0x2eb009=a66_0x5e998c;if(_0x59aefc===undefined||_0x59aefc===null||_0x59aefc==='')return{'found':![]};if(typeof _0x59aefc===_0x2eb009(0x1d7))try{const _0x2a37c0=JSON[_0x2eb009(0x1c6)](_0x59aefc);return readBusinessGroupFromExtend(_0x2a37c0);}catch{return{'found':![]};}const _0x4d2db0=asPlainObject(_0x59aefc);if(Object[_0x2eb009(0x1ec)]['hasOwnProperty']['call'](_0x4d2db0,_0x2eb009(0x1da)))return{'found':!![],'value':_0x4d2db0['businessGroup']};return{'found':![]};}function firstPresent(..._0x54b9ee){for(const _0xe4924e of _0x54b9ee){if(_0xe4924e!==undefined&&_0xe4924e!==null)return{'found':!![],'value':_0xe4924e};}return{'found':![]};}function assertExpectedBusinessGroup(_0x576ac0,_0xaf4268){const _0x58ea91=a66_0x5e998c;if(_0xaf4268===undefined)return;const _0x109200=normalizeBusinessGroupArgument(_0xaf4268);if(_0x576ac0!==_0x109200)throw CliErrors[_0x58ea91(0x1cc)](_0x58ea91(0x1ca),_0x58ea91(0x1ef)+JSON[_0x58ea91(0x1dc)](_0x109200)+',\x20actual\x20'+JSON[_0x58ea91(0x1dc)](_0x576ac0));}function buildBackendPlan(_0x42286a,_0x21f30d,_0xb223e3){const _0x2682be=a66_0x5e998c;if(_0x21f30d[_0x2682be(0x207)]==='DB_TABLE'){if(!_0x21f30d[_0x2682be(0x208)]||_0x21f30d[_0x2682be(0x208)][_0x2682be(0x1e9)]===null||!_0x21f30d['dbTableSelector']['tableName'])throw CliErrors['validation']('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.');return{'kind':_0x2682be(0x1db),'method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x21f30d[_0x2682be(0x208)][_0x2682be(0x1e9)],'tableName':_0x21f30d[_0x2682be(0x208)][_0x2682be(0x1f5)],'businessGroup':_0xb223e3}};}return{'kind':'metadata','method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x42286a,'datasetCode':_0x21f30d[_0x2682be(0x1e0)],'businessGroup':_0xb223e3}};}function normalizeBusinessGroup(_0x17b475){const _0x358f3f=a66_0x5e998c;if(_0x17b475===undefined||_0x17b475===null)return'';return String(_0x17b475)[_0x358f3f(0x202)]();}function normalizeBusinessGroupArgument(_0xe5e834){const _0xfd3070=normalizeBusinessGroup(_0xe5e834);return _0xfd3070===UNGROUPED_BUSINESS_GROUP?'':_0xfd3070;}function displayBusinessGroup(_0xb2bb0){return _0xb2bb0||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x489372){const _0x67bc7c=a66_0x5e998c;if(!_0x489372||typeof _0x489372!==_0x67bc7c(0x1e4)||Array[_0x67bc7c(0x1ea)](_0x489372))return{};return _0x489372;}function a66_0x5895(_0x5d0fe4,_0x3f29e4){_0x5d0fe4=_0x5d0fe4-0x1c2;const _0x3b85df=a66_0x3b85();let _0x589506=_0x3b85df[_0x5d0fe4];return _0x589506;}function firstString(..._0x11ad62){const _0x26cb76=a66_0x5e998c;for(const _0x5e17e0 of _0x11ad62){if(typeof _0x5e17e0===_0x26cb76(0x1d7)&&_0x5e17e0[_0x26cb76(0x202)]())return _0x5e17e0[_0x26cb76(0x202)]();if(typeof _0x5e17e0==='number'&&Number[_0x26cb76(0x1d9)](_0x5e17e0))return String(_0x5e17e0);}return undefined;}function firstNumber(..._0x845621){const _0xa39e44=a66_0x5e998c;for(const _0xb28123 of _0x845621){if(typeof _0xb28123===_0xa39e44(0x206)&&Number[_0xa39e44(0x1d9)](_0xb28123))return _0xb28123;if(typeof _0xb28123===_0xa39e44(0x1d7)&&_0xb28123['trim']()&&Number[_0xa39e44(0x1d9)](Number(_0xb28123)))return Number(_0xb28123);}return null;}function trim(_0x5a08fe){return String(_0x5a08fe||'')['trim']();}
|
|
1
|
+
const a66_0x56f8ad=a66_0x1492;(function(_0x38a48f,_0x3ef1be){const _0x59247d=a66_0x1492,_0x5bc0ac=_0x38a48f();while(!![]){try{const _0x45c293=parseInt(_0x59247d(0x112))/0x1+-parseInt(_0x59247d(0x150))/0x2*(-parseInt(_0x59247d(0x156))/0x3)+-parseInt(_0x59247d(0x135))/0x4*(-parseInt(_0x59247d(0x142))/0x5)+parseInt(_0x59247d(0x157))/0x6*(parseInt(_0x59247d(0x146))/0x7)+-parseInt(_0x59247d(0x138))/0x8*(-parseInt(_0x59247d(0x14e))/0x9)+-parseInt(_0x59247d(0x134))/0xa+-parseInt(_0x59247d(0x13e))/0xb;if(_0x45c293===_0x3ef1be)break;else _0x5bc0ac['push'](_0x5bc0ac['shift']());}catch(_0x46c79e){_0x5bc0ac['push'](_0x5bc0ac['shift']());}}}(a66_0x49d0,0x3d534));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a66_0x56f8ad(0x153),METADATA_BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP=a66_0x56f8ad(0x11d);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x232289,input:_0x3db4d5,dryRun:_0x91e2cb}){const _0x4a420d=a66_0x56f8ad;validateInput(_0x3db4d5);const _0x5ac34e=normalizeBusinessGroupArgument(_0x3db4d5[_0x4a420d(0x110)]),_0x4bd1ef=await getDatasetDetail(_0x3db4d5['code']),_0x23cff8=resolveBusinessGroupDataset(_0x4bd1ef,_0x3db4d5['code']);assertBusinessGroupUpdateSupported(_0x23cff8,_0x5ac34e);const _0x4bbbb1=loadCurrentBusinessGroup(_0x4bd1ef,_0x23cff8);assertExpectedBusinessGroup(_0x4bbbb1,_0x3db4d5[_0x4a420d(0x12f)]);const _0x25bdde=buildBackendPlan(_0x232289,_0x23cff8,_0x5ac34e),_0x2bc886=_0x4bbbb1!==_0x5ac34e;let _0xf2e1b3;if(_0x2bc886&&!_0x91e2cb){_0x25bdde[_0x4a420d(0x11e)]==='db-table'?await updateDbTableBusinessGroup(_0x25bdde[_0x4a420d(0x117)]):await updateErBusinessGroup(_0x25bdde['payload']);const _0x55de0d=await getDatasetDetail(_0x23cff8[_0x4a420d(0x145)]),_0x4192dc=resolveBusinessGroupDataset(_0x55de0d,_0x23cff8[_0x4a420d(0x145)]),_0x23475b=loadCurrentBusinessGroup(_0x55de0d,_0x4192dc);if(_0x23475b!==_0x5ac34e)throw CliErrors[_0x4a420d(0x151)](_0x4a420d(0x155),'Expected\x20'+JSON[_0x4a420d(0x144)](displayBusinessGroup(_0x5ac34e))+_0x4a420d(0x127)+JSON[_0x4a420d(0x144)](displayBusinessGroup(_0x23475b))+'.');_0xf2e1b3={'verified':!![],'status':'matched','afterReadback':{'businessGroup':displayBusinessGroup(_0x23475b)}};}else!_0x2bc886&&(_0xf2e1b3={'verified':!![],'status':_0x4a420d(0x120),'afterReadback':{'businessGroup':displayBusinessGroup(_0x4bbbb1)}});const _0x2ec7bc={'operation':_0x4a420d(0x121),'appCode':_0x232289,'selector':{'code':_0x23cff8[_0x4a420d(0x145)]},'dataset':{'id':_0x23cff8['id'],'code':_0x23cff8['code'],'name':_0x23cff8[_0x4a420d(0x141)],'sourceType':_0x23cff8[_0x4a420d(0x131)]},'before':{'businessGroup':displayBusinessGroup(_0x4bbbb1)},'after':{'businessGroup':displayBusinessGroup(_0x5ac34e)},'changed':_0x2bc886,'dryRun':_0x91e2cb,'submitted':_0x2bc886&&!_0x91e2cb,'backend':{'method':_0x25bdde[_0x4a420d(0x111)],'path':_0x25bdde[_0x4a420d(0x14d)],'payload':_0x25bdde[_0x4a420d(0x117)]},..._0xf2e1b3?{'verification':_0xf2e1b3}:{},'warnings':[]};return{'ok':!![],'data':_0x2ec7bc,'message':_0x2bc886?_0x91e2cb?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x23cff8['code']:_0x4a420d(0x14c)+_0x23cff8[_0x4a420d(0x145)]:_0x4a420d(0x11a)+_0x23cff8[_0x4a420d(0x145)]};}export const datasetBusinessGroupUpdate={'service':a66_0x56f8ad(0x118),'command':a66_0x56f8ad(0x147),'description':'Update\x20business\x20scenario\x20group','risk':'write','flags':[CODE_FLAG,{'name':'business-group','type':a66_0x56f8ad(0x119),'required':!![],'description':a66_0x56f8ad(0x125)},{'name':a66_0x56f8ad(0x149),'type':a66_0x56f8ad(0x119),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x53892c){validateInput(readBusinessGroupUpdateInput(_0x53892c));},async 'dryRun'(_0x8df3ee){const _0x1cee54=a66_0x56f8ad,_0x82a872=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x8df3ee[_0x1cee54(0x11b)],'input':readBusinessGroupUpdateInput(_0x8df3ee),'dryRun':!![]});return{'method':_0x82a872[_0x1cee54(0x123)][_0x1cee54(0x136)][_0x1cee54(0x111)],'url':_0x82a872[_0x1cee54(0x123)][_0x1cee54(0x136)][_0x1cee54(0x14d)],'body':_0x82a872[_0x1cee54(0x123)][_0x1cee54(0x136)]['payload'],'description':_0x82a872[_0x1cee54(0x132)],..._0x82a872[_0x1cee54(0x123)]};},async 'execute'(_0x265109){const _0x47e63c=a66_0x56f8ad;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x265109[_0x47e63c(0x11b)],'input':readBusinessGroupUpdateInput(_0x265109),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x2f4574){const _0x3f5988=a66_0x56f8ad,_0x431b88=_0x2f4574[_0x3f5988(0x130)](_0x3f5988(0x149));return{'code':trim(_0x2f4574[_0x3f5988(0x130)](_0x3f5988(0x145))),'businessGroup':_0x2f4574[_0x3f5988(0x130)](_0x3f5988(0x140)),'expectBusinessGroup':_0x431b88===undefined||_0x431b88===''?undefined:_0x431b88};}function validateInput(_0x33e4e3){const _0x1ebacd=a66_0x56f8ad;if(!trim(_0x33e4e3[_0x1ebacd(0x145)]))throw CliErrors['validation'](_0x1ebacd(0x139));if(_0x33e4e3[_0x1ebacd(0x110)]===undefined)throw CliErrors[_0x1ebacd(0x13b)]('--business-group\x20is\x20required');if(!trim(_0x33e4e3[_0x1ebacd(0x110)]))throw CliErrors[_0x1ebacd(0x13b)](_0x1ebacd(0x113));}function assertBusinessGroupUpdateSupported(_0x4bfbd5,_0x199f9f){const _0x542c57=a66_0x56f8ad;if(_0x4bfbd5[_0x542c57(0x131)]===_0x542c57(0x12c)&&!_0x199f9f)throw CliErrors[_0x542c57(0x13b)]('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function resolveBusinessGroupDataset(_0x5ce44a,_0x2e6ddc){const _0x5a9883=a66_0x56f8ad,_0x37267e=asPlainObject(_0x5ce44a[_0x5a9883(0x118)]),_0xd32c47=asPlainObject(_0x5ce44a['dbtableConfig']),_0x996a47=resolveSourceType(_0x5ce44a,_0x37267e,_0xd32c47),_0x484f57=firstString(_0x5ce44a['modelCode'],_0x5ce44a[_0x5a9883(0x145)],_0x37267e[_0x5a9883(0x14b)],_0x2e6ddc)||_0x2e6ddc;return{'id':firstNumber(_0x5ce44a[_0x5a9883(0x11f)],_0x5ce44a['id'],_0x37267e[_0x5a9883(0x12d)])??firstString(_0x5ce44a['modelId'],_0x5ce44a['id'],_0x37267e[_0x5a9883(0x12d)])??null,'code':_0x484f57,'name':firstString(_0x5ce44a[_0x5a9883(0x141)],_0x37267e[_0x5a9883(0x13c)],_0x37267e[_0x5a9883(0x141)])||null,'sourceType':_0x996a47,'dbTableSelector':_0x996a47==='DB_TABLE'?{'dbLinkId':firstNumber(_0xd32c47['dbId']),'tableName':firstString(_0xd32c47[_0x5a9883(0x12b)])||null}:null};}function resolveSourceType(_0x57f74f,_0x2c355c,_0x293ae1){const _0x3f16e6=a66_0x56f8ad,_0x376517=firstString(_0x57f74f[_0x3f16e6(0x10f)],_0x57f74f[_0x3f16e6(0x131)],_0x2c355c[_0x3f16e6(0x10f)],_0x2c355c[_0x3f16e6(0x131)])?.['trim']()[_0x3f16e6(0x133)]();if(_0x376517===_0x3f16e6(0x12c)||_0x376517==='METADATA')return _0x376517;if(Object[_0x3f16e6(0x14f)](_0x293ae1)['length']>0x0)return _0x3f16e6(0x12c);throw CliErrors[_0x3f16e6(0x13b)](_0x3f16e6(0x13d));}function loadCurrentBusinessGroup(_0xec3c70,_0x5652e0){const _0x20a7de=a66_0x56f8ad,_0x36e85e=readBusinessGroupFromDatasetDetail(_0xec3c70,_0x5652e0[_0x20a7de(0x131)]);if(_0x36e85e['found'])return normalizeBusinessGroup(_0x36e85e[_0x20a7de(0x129)]);return'';}function readBusinessGroupFromDatasetDetail(_0x564ca8,_0x33c988){const _0x23bc37=a66_0x56f8ad,_0x1ddf72=asPlainObject(_0x564ca8[_0x23bc37(0x118)]),_0x333b68=firstPresent(_0x564ca8[_0x23bc37(0x110)]);if(_0x333b68[_0x23bc37(0x143)])return _0x333b68;const _0x4ccf5e=firstPresent(_0x1ddf72[_0x23bc37(0x110)]);if(_0x4ccf5e[_0x23bc37(0x143)])return _0x4ccf5e;if(_0x33c988==='DB_TABLE')return{'found':![]};const _0x45cbde=readBusinessGroupFromExtend(_0x564ca8['extend']);if(_0x45cbde['found'])return _0x45cbde;return readBusinessGroupFromExtend(_0x1ddf72['extend']);}function readBusinessGroupFromExtend(_0x5d0c26){const _0x507f28=a66_0x56f8ad;if(_0x5d0c26===undefined||_0x5d0c26===null||_0x5d0c26==='')return{'found':![]};if(typeof _0x5d0c26===_0x507f28(0x119))try{const _0x153e39=JSON[_0x507f28(0x122)](_0x5d0c26);return readBusinessGroupFromExtend(_0x153e39);}catch{return{'found':![]};}const _0x4e0550=asPlainObject(_0x5d0c26);if(Object[_0x507f28(0x114)][_0x507f28(0x154)][_0x507f28(0x12a)](_0x4e0550,'businessGroup'))return{'found':!![],'value':_0x4e0550['businessGroup']};return{'found':![]};}function a66_0x1492(_0x51b98b,_0x2b611e){_0x51b98b=_0x51b98b-0x10f;const _0x49d0ef=a66_0x49d0();let _0x1492ca=_0x49d0ef[_0x51b98b];return _0x1492ca;}function firstPresent(..._0x1b7a42){for(const _0x4b2f1a of _0x1b7a42){if(_0x4b2f1a!==undefined&&_0x4b2f1a!==null)return{'found':!![],'value':_0x4b2f1a};}return{'found':![]};}function assertExpectedBusinessGroup(_0x271cb6,_0x1f87bf){const _0x1d7e8e=a66_0x56f8ad;if(_0x1f87bf===undefined)return;const _0x377b65=normalizeBusinessGroupArgument(_0x1f87bf);if(_0x271cb6!==_0x377b65)throw CliErrors[_0x1d7e8e(0x13b)](_0x1d7e8e(0x128),_0x1d7e8e(0x148)+JSON[_0x1d7e8e(0x144)](_0x377b65)+_0x1d7e8e(0x127)+JSON[_0x1d7e8e(0x144)](_0x271cb6));}function buildBackendPlan(_0x4cfd37,_0x1e98c4,_0x13e84b){const _0x473895=a66_0x56f8ad;if(_0x1e98c4[_0x473895(0x131)]===_0x473895(0x12c)){if(!_0x1e98c4[_0x473895(0x115)]||_0x1e98c4[_0x473895(0x115)]['dbLinkId']===null||!_0x1e98c4[_0x473895(0x115)][_0x473895(0x12b)])throw CliErrors[_0x473895(0x13b)](_0x473895(0x12e),_0x473895(0x152));return{'kind':_0x473895(0x14a),'method':_0x473895(0x124),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x1e98c4[_0x473895(0x115)][_0x473895(0x13f)],'tableName':_0x1e98c4[_0x473895(0x115)]['tableName'],'businessGroup':_0x13e84b}};}return{'kind':_0x473895(0x11c),'method':_0x473895(0x124),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x4cfd37,'datasetCode':_0x1e98c4[_0x473895(0x145)],'businessGroup':_0x13e84b}};}function normalizeBusinessGroup(_0x52e41a){if(_0x52e41a===undefined||_0x52e41a===null)return'';return String(_0x52e41a)['trim']();}function normalizeBusinessGroupArgument(_0x25ef57){const _0x5e6128=normalizeBusinessGroup(_0x25ef57);return _0x5e6128===UNGROUPED_BUSINESS_GROUP?'':_0x5e6128;}function displayBusinessGroup(_0x14d71b){return _0x14d71b||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x3632dd){const _0x371295=a66_0x56f8ad;if(!_0x3632dd||typeof _0x3632dd!=='object'||Array[_0x371295(0x116)](_0x3632dd))return{};return _0x3632dd;}function a66_0x49d0(){const _0x198e12=['keys','16wTccMX','apiError','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','/smartapi/dblink/updateTableBusinessGroup','hasOwnProperty','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','181125HRoRrX','1002eAwJXm','source','businessGroup','method','234492KvWsgK','--business-group\x20must\x20not\x20be\x20blank','prototype','dbTableSelector','isArray','payload','dataset','string','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','appCode','metadata','ungrouped','kind','modelId','unchanged','update','parse','data','POST','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','isFinite',',\x20actual\x20','Expectation\x20mismatch\x20at\x20businessGroup','value','call','tableName','DB_TABLE','datasetId','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','expectBusinessGroup','str','sourceType','message','toUpperCase','718860BnvFir','4MZAdmW','backend','trim','8AsIsDQ','--code\x20is\x20required','number','validation','datasetName','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','18479890OshPoG','dbLinkId','business-group','name','2167880JNmXIw','found','stringify','code','19439QlScCj','business-group-update','Expected\x20','expect-business-group','db-table','datasetCode','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','path','3494133xiaOKU'];a66_0x49d0=function(){return _0x198e12;};return a66_0x49d0();}function firstString(..._0x2b5884){const _0x5c28f1=a66_0x56f8ad;for(const _0x737104 of _0x2b5884){if(typeof _0x737104===_0x5c28f1(0x119)&&_0x737104[_0x5c28f1(0x137)]())return _0x737104[_0x5c28f1(0x137)]();if(typeof _0x737104===_0x5c28f1(0x13a)&&Number[_0x5c28f1(0x126)](_0x737104))return String(_0x737104);}return undefined;}function firstNumber(..._0x45b5c8){const _0x152e21=a66_0x56f8ad;for(const _0x284682 of _0x45b5c8){if(typeof _0x284682===_0x152e21(0x13a)&&Number[_0x152e21(0x126)](_0x284682))return _0x284682;if(typeof _0x284682==='string'&&_0x284682['trim']()&&Number[_0x152e21(0x126)](Number(_0x284682)))return Number(_0x284682);}return null;}function trim(_0xd8df54){return String(_0xd8df54||'')['trim']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a67_0x2ea0(_0x45d271,_0x5dabc0){_0x45d271=_0x45d271-0x145;const _0x13d409=a67_0x13d4();let _0x2ea0ad=_0x13d409[_0x45d271];return _0x2ea0ad;}const a67_0x1a0d17=a67_0x2ea0;(function(_0x2cf779,_0x1c01ce){const _0x14a9d7=a67_0x2ea0,_0x4fbf47=_0x2cf779();while(!![]){try{const _0x4ee3c3=parseInt(_0x14a9d7(0x152))/0x1*(-parseInt(_0x14a9d7(0x157))/0x2)+-parseInt(_0x14a9d7(0x14b))/0x3+parseInt(_0x14a9d7(0x14e))/0x4*(parseInt(_0x14a9d7(0x14c))/0x5)+-parseInt(_0x14a9d7(0x150))/0x6*(-parseInt(_0x14a9d7(0x14f))/0x7)+-parseInt(_0x14a9d7(0x158))/0x8+parseInt(_0x14a9d7(0x14a))/0x9+parseInt(_0x14a9d7(0x151))/0xa;if(_0x4ee3c3===_0x1c01ce)break;else _0x4fbf47['push'](_0x4fbf47['shift']());}catch(_0x2b7597){_0x4fbf47['push'](_0x4fbf47['shift']());}}}(a67_0x13d4,0x84a0f));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a67_0x13d4(){const _0x4515a0=['groups','read','trim','length','4uhTeZj','908056DhelsD','appCode','map','dataset','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','\x20business\x20group(s)\x20for\x20database\x20connection\x20','ungrouped','num','businessGroup','2720556LGebfS','836529aHHtqX','1131615ZBOoAj','dbid','12IYYFcB','75817RsYnRQ','30cMLGuP','2409550SMellz','170383KCyvzN'];a67_0x13d4=function(){return _0x4515a0;};return a67_0x13d4();}export const datasetBusinessGroups={'service':a67_0x1a0d17(0x15b),'command':'business-groups','description':'List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','risk':a67_0x1a0d17(0x154),'flags':[{'name':a67_0x1a0d17(0x14d),'type':'number','required':!![],'description':a67_0x1a0d17(0x145)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3b71e5){const _0x21e42=a67_0x1a0d17,_0x3b746e=_0x3b71e5[_0x21e42(0x148)](_0x21e42(0x14d)),_0x40adc4=await getErBusinessGroupSummary(_0x3b71e5[_0x21e42(0x159)],_0x3b746e),_0x3401fc=_0x40adc4[_0x21e42(0x153)][_0x21e42(0x15a)](_0x1feab4=>({..._0x1feab4,'businessGroup':_0x1feab4[_0x21e42(0x149)][_0x21e42(0x155)]()||_0x21e42(0x147)}));return{'ok':!![],'data':{..._0x40adc4,'groups':_0x3401fc,'scope':'DB_TABLE'},'message':'Found\x20'+_0x3401fc[_0x21e42(0x156)]+_0x21e42(0x146)+_0x3b746e};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x1b5994=a68_0x3fe6;(function(_0xd21349,_0x24dd2a){const _0x33c4d9=a68_0x3fe6,_0x1a6db9=_0xd21349();while(!![]){try{const _0xcec3a4=-parseInt(_0x33c4d9(0xb9))/0x1+-parseInt(_0x33c4d9(0xc1))/0x2*(-parseInt(_0x33c4d9(0xaf))/0x3)+parseInt(_0x33c4d9(0xbe))/0x4*(-parseInt(_0x33c4d9(0xb6))/0x5)+parseInt(_0x33c4d9(0xc6))/0x6+parseInt(_0x33c4d9(0xbb))/0x7+parseInt(_0x33c4d9(0xc0))/0x8+-parseInt(_0x33c4d9(0xb3))/0x9*(parseInt(_0x33c4d9(0xb2))/0xa);if(_0xcec3a4===_0x24dd2a)break;else _0x1a6db9['push'](_0x1a6db9['shift']());}catch(_0x3eb2fc){_0x1a6db9['push'](_0x1a6db9['shift']());}}}(a68_0x26ba,0x9882b));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':a68_0x1b5994(0xc7)};export const RUNTIME_DATA_ACCESS_SUMMARY=a68_0x1b5994(0xbf);function valueToString(_0x380707){const _0x16a884=a68_0x1b5994;return _0x380707==null?'':String(_0x380707)[_0x16a884(0xc9)]();}function getDatasetCode(_0x1b7612){const _0x3a4587=a68_0x1b5994;return valueToString(_0x1b7612[_0x3a4587(0xc3)]??_0x1b7612[_0x3a4587(0xb7)]??_0x1b7612[_0x3a4587(0xc5)]?.[_0x3a4587(0xb8)]);}function getDatasetName(_0x165887){const _0x3991e5=a68_0x1b5994;return valueToString(_0x165887[_0x3991e5(0xc2)]??_0x165887['dataset']?.['datasetName'])||'unknown';}function a68_0x26ba(){const _0x3457b7=['\x20is\x20','METADATA','object','getOne','join','The\x20current\x20dataset\x20\x22','3VpEfhJ','tableName','validation','7430XiaZPg','9351zMEHzi','sourceType','dbId','939255ugUZnl','modelCode','datasetCode','881933OyuEfr','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','3521462ZDPpQw','filter','length','4FlNxUr','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','2283824oJFUNl','1287178KmwhZw','name','code','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','dataset','6205866OIqwXQ','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','dbtableConfig','trim'];a68_0x26ba=function(){return _0x3457b7;};return a68_0x26ba();}function getDatasetSource(_0x5b6349){const _0x40482c=a68_0x1b5994;return valueToString(_0x5b6349['source']??_0x5b6349[_0x40482c(0xc5)]?.[_0x40482c(0xb4)])['toUpperCase']();}function a68_0x3fe6(_0x8b5bd5,_0x111a49){_0x8b5bd5=_0x8b5bd5-0xaa;const _0x26baa1=a68_0x26ba();let _0x3fe6d1=_0x26baa1[_0x8b5bd5];return _0x3fe6d1;}function getDbtableConfig(_0x4564ad){const _0x44512f=a68_0x1b5994,_0x2ad5a0=_0x4564ad[_0x44512f(0xc8)]??_0x4564ad['dbtable'];return _0x2ad5a0&&typeof _0x2ad5a0===_0x44512f(0xab)?_0x2ad5a0:{};}export function isDbTableBackedDataset(_0x4e2a10){const _0x5cd997=a68_0x1b5994,_0x4dc725=getDatasetSource(_0x4e2a10);if(_0x4dc725===_0x5cd997(0xaa))return![];const _0x2be47c=getDbtableConfig(_0x4e2a10),_0x264018=_0x2be47c[_0x5cd997(0xb5)]??_0x2be47c['id'],_0x229504=valueToString(_0x2be47c['tableName']??_0x4e2a10[_0x5cd997(0xb0)]??_0x4e2a10['dataset']?.[_0x5cd997(0xb0)]);return _0x264018!==undefined&&_0x264018!==null&&_0x229504[_0x5cd997(0xbd)]>0x0;}export function filterDbTableBackedDatasets(_0x4d707b){const _0x4acf0c=a68_0x1b5994;return _0x4d707b[_0x4acf0c(0xbc)](_0x3f4506=>isDbTableBackedDataset(_0x3f4506));}export function buildDbTableBackedRequirementMessage(_0x2eb49d,_0x234103='SQL\x20schema\x20validation'){const _0xdffae9=a68_0x1b5994,_0x4fde9c=getDatasetSource(_0x2eb49d)||'UNKNOWN',_0x36f5d7=getDatasetName(_0x2eb49d),_0x1b64a1=getDatasetCode(_0x2eb49d),_0x210dcb=_0x1b64a1?'\x20('+_0x1b64a1+')':'';return[_0xdffae9(0xae)+_0x36f5d7+'\x22'+_0x210dcb+_0xdffae9(0xca)+_0x4fde9c+'\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20'+_0x234103+'.',_0xdffae9(0xc4),'Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.',_0xdffae9(0xba)+RUNTIME_DATA_ACCESS_COMMANDS[_0xdffae9(0xbc)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0xdffae9(0xac)]+'.'][_0xdffae9(0xad)]('\x20');}export function assertDatasetIsDbTableBacked(_0x1b8ce,_0x5e4c21){const _0x5ebbf6=a68_0x1b5994;if(!isDbTableBackedDataset(_0x1b8ce))throw CliErrors[_0x5ebbf6(0xb1)](buildDbTableBackedRequirementMessage(_0x1b8ce,_0x5e4c21));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x516fb4=a69_0x3ad2;(function(_0x2170fe,_0x44034c){const _0x465518=a69_0x3ad2,_0x467cdf=_0x2170fe();while(!![]){try{const _0x3875ec=parseInt(_0x465518(0x13b))/0x1+parseInt(_0x465518(0x132))/0x2*(-parseInt(_0x465518(0x13c))/0x3)+parseInt(_0x465518(0x133))/0x4*(parseInt(_0x465518(0x134))/0x5)+-parseInt(_0x465518(0x13f))/0x6*(-parseInt(_0x465518(0x130))/0x7)+parseInt(_0x465518(0x131))/0x8*(-parseInt(_0x465518(0x138))/0x9)+-parseInt(_0x465518(0x139))/0xa*(-parseInt(_0x465518(0x135))/0xb)+parseInt(_0x465518(0x13d))/0xc;if(_0x3875ec===_0x44034c)break;else _0x467cdf['push'](_0x467cdf['shift']());}catch(_0x591919){_0x467cdf['push'](_0x467cdf['shift']());}}}(a69_0x5178,0x5dd7e));import{createCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';function a69_0x3ad2(_0x2de239,_0x46266d){_0x2de239=_0x2de239-0x12f;const _0x517803=a69_0x5178();let _0x3ad279=_0x517803[_0x2de239];return _0x3ad279;}function a69_0x5178(){const _0xbe1314=['cross-relation-create','dataset','2755926sPvhjP','130zVHBqi','Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','363278PggFWs','92592tZZcfG','758376mpJHzJ','create','6xYGzlf','write','905548auvsXk','16qzGJlB','4zbnEJw','4ZvhoJt','2125180bBwljs','65714EEJGFb'];a69_0x5178=function(){return _0xbe1314;};return a69_0x5178();}export const datasetCrossRelationCreate={'service':a69_0x516fb4(0x137),'command':a69_0x516fb4(0x136),'description':a69_0x516fb4(0x13a),'risk':a69_0x516fb4(0x12f),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x2f28a4=>validateCrossRelation(_0x2f28a4,'create'),'dryRun':_0x1e9237=>previewCrossRelation(_0x1e9237,a69_0x516fb4(0x13e)),'execute':_0x344e3f=>executeCrossRelation(_0x344e3f,a69_0x516fb4(0x13e),createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a70_0x31906c=a70_0x4145;function a70_0x2245(){const _0x2c597f=['cross-relation-delete','4101430drbUgK','2418615moTQLz','10927196JWWQrG','304340KnCBPP','33yNpxIC','1536448zyblmk','423ZCccbE','267400Csetef','4926138JnYXzz','high-risk-write','delete','dataset','66NKeaLA','Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','1XKuWMj'];a70_0x2245=function(){return _0x2c597f;};return a70_0x2245();}(function(_0x12d0df,_0x325ca8){const _0xfca67f=a70_0x4145,_0x138fc6=_0x12d0df();while(!![]){try{const _0x119ed3=parseInt(_0xfca67f(0x167))/0x1*(parseInt(_0xfca67f(0x15e))/0x2)+parseInt(_0xfca67f(0x165))/0x3*(parseInt(_0xfca67f(0x15c))/0x4)+parseInt(_0xfca67f(0x16a))/0x5+-parseInt(_0xfca67f(0x161))/0x6+parseInt(_0xfca67f(0x16b))/0x7+-parseInt(_0xfca67f(0x160))/0x8*(parseInt(_0xfca67f(0x15f))/0x9)+parseInt(_0xfca67f(0x169))/0xa*(-parseInt(_0xfca67f(0x15d))/0xb);if(_0x119ed3===_0x325ca8)break;else _0x138fc6['push'](_0x138fc6['shift']());}catch(_0x5da390){_0x138fc6['push'](_0x138fc6['shift']());}}}(a70_0x2245,0xd30a2));import{deleteCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';function a70_0x4145(_0x180cad,_0x1e54c1){_0x180cad=_0x180cad-0x15c;const _0x2245aa=a70_0x2245();let _0x4145b0=_0x2245aa[_0x180cad];return _0x4145b0;}export const datasetCrossRelationDelete={'service':a70_0x31906c(0x164),'command':a70_0x31906c(0x168),'description':a70_0x31906c(0x166),'risk':a70_0x31906c(0x162),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x1bb09e=>validateCrossRelation(_0x1bb09e,'delete'),'dryRun':_0x4d7f3f=>previewCrossRelation(_0x4d7f3f,a70_0x31906c(0x163)),'execute':_0x1bc571=>executeCrossRelation(_0x1bc571,a70_0x31906c(0x163),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x21b002=a71_0x1f01;(function(_0xc7afb0,_0x26a06b){const _0x362a0e=a71_0x1f01,_0x482598=_0xc7afb0();while(!![]){try{const _0x5ea302=parseInt(_0x362a0e(0x10f))/0x1*(parseInt(_0x362a0e(0x110))/0x2)+-parseInt(_0x362a0e(0x10d))/0x3+-parseInt(_0x362a0e(0x111))/0x4*(parseInt(_0x362a0e(0x106))/0x5)+-parseInt(_0x362a0e(0x101))/0x6*(-parseInt(_0x362a0e(0x109))/0x7)+-parseInt(_0x362a0e(0x113))/0x8*(parseInt(_0x362a0e(0x10e))/0x9)+parseInt(_0x362a0e(0x10b))/0xa+-parseInt(_0x362a0e(0x10a))/0xb;if(_0x5ea302===_0x26a06b)break;else _0x482598['push'](_0x482598['shift']());}catch(_0x397120){_0x482598['push'](_0x482598['shift']());}}}(a71_0x4c09,0xefa34));import{queryCrossDbRelations}from'../../core/api-client.js';function a71_0x4c09(){const _0x348ede=['10366122tDHhfZ','dataset','read','cross-relation-list','List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','181765ixQZjg','appCode','\x20relation(s)','7ECnywp','15324287pfVAqk','15577330oWzDDt','length','1628832RkHyDQ','459kXvNnA','255083pIQqMi','2MAiTFE','52qKHgRe','list','23576JSjLLV','map'];a71_0x4c09=function(){return _0x348ede;};return a71_0x4c09();}function a71_0x1f01(_0x34b742,_0x4b31c7){_0x34b742=_0x34b742-0x101;const _0x4c0984=a71_0x4c09();let _0x1f01f0=_0x4c0984[_0x34b742];return _0x1f01f0;}import{APPCODE_FLAG_OPTIONAL,CROSS_RELATION_DBLINK_FLAG,CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG}from'../../commands/common/flags.js';import{projectCrossRelation,resolveCrossRelationQuery,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationList={'service':a71_0x21b002(0x102),'command':a71_0x21b002(0x104),'description':a71_0x21b002(0x105),'risk':a71_0x21b002(0x103),'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 _0x3ce21a=>validateCrossRelation(_0x3ce21a,a71_0x21b002(0x112)),async 'execute'(_0x1184a9){const _0xac30f2=a71_0x21b002,_0x28ffaf=await resolveCrossRelationQuery(_0x1184a9),_0x3cfad6=await queryCrossDbRelations(_0x28ffaf);return{'ok':!![],'data':{'appCode':_0x1184a9[_0xac30f2(0x107)],'selector':_0x28ffaf,'total':_0x3cfad6[_0xac30f2(0x10c)],'relations':_0x3cfad6[_0xac30f2(0x114)](projectCrossRelation)},'message':'Cross-database\x20relations:\x20'+_0x3cfad6['length']+_0xac30f2(0x108)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a72_0x1ad704=a72_0x2b4a;(function(_0x4894b9,_0x2515e4){const _0x1fdca7=a72_0x2b4a,_0x3ee75e=_0x4894b9();while(!![]){try{const _0x5476ea=parseInt(_0x1fdca7(0x14e))/0x1*(-parseInt(_0x1fdca7(0x154))/0x2)+-parseInt(_0x1fdca7(0x11a))/0x3+-parseInt(_0x1fdca7(0x159))/0x4+parseInt(_0x1fdca7(0x146))/0x5*(parseInt(_0x1fdca7(0x141))/0x6)+parseInt(_0x1fdca7(0x129))/0x7*(-parseInt(_0x1fdca7(0x134))/0x8)+parseInt(_0x1fdca7(0x111))/0x9*(parseInt(_0x1fdca7(0x14b))/0xa)+parseInt(_0x1fdca7(0x126))/0xb*(parseInt(_0x1fdca7(0x151))/0xc);if(_0x5476ea===_0x2515e4)break;else _0x3ee75e['push'](_0x3ee75e['shift']());}catch(_0xff77c6){_0x3ee75e['push'](_0x3ee75e['shift']());}}}(a72_0x46ce,0xe22e6));function a72_0x2b4a(_0x1212a3,_0x389ee4){_0x1212a3=_0x1212a3-0x107;const _0x46ce69=a72_0x46ce();let _0x2b4a72=_0x46ce69[_0x1212a3];return _0x2b4a72;}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(_0x4d0476,_0x124cde){const _0x2bfabe=a72_0x2b4a,_0x56d0a3=_0x4d0476[_0x2bfabe(0x11e)](_0x124cde)[_0x2bfabe(0x132)]();if(!_0x56d0a3)throw CliErrors[_0x2bfabe(0x148)](_0x124cde);return _0x56d0a3;}function explicitDblink(_0x5bc433){const _0x345a81=a72_0x2b4a,_0x326ea2=_0x5bc433[_0x345a81(0x122)](_0x345a81(0x12f));if(_0x326ea2===undefined||_0x326ea2===null)return undefined;const _0x384074=Number(_0x326ea2);if(!Number['isSafeInteger'](_0x384074)||_0x384074<=0x0)throw CliErrors[_0x345a81(0x13e)](_0x345a81(0x121));return _0x384074;}export function validateCrossRelation(_0x4a371a,_0x3c5893){const _0x28dd1a=a72_0x2b4a,_0x55cf59=explicitDblink(_0x4a371a);if(_0x3c5893==='list'){if(!_0x4a371a[_0x28dd1a(0x11e)](_0x28dd1a(0x13c))[_0x28dd1a(0x132)]()&&_0x55cf59===undefined)throw CliErrors['validation'](_0x28dd1a(0x112));return;}required(_0x4a371a,_0x28dd1a(0x13c)),required(_0x4a371a,'from-column');if(_0x3c5893!=='delete'){required(_0x4a371a,'to-datasetcode'),required(_0x4a371a,_0x28dd1a(0x142));const _0x4141b3=_0x4a371a[_0x28dd1a(0x11e)](_0x28dd1a(0x15a))[_0x28dd1a(0x132)]();if(_0x4141b3&&!CROSS_RELATION_CARDINALITY_FLAG[_0x28dd1a(0x116)]['includes'](_0x4141b3))throw CliErrors['validation'](_0x28dd1a(0x13f));}}async function resolveEndpoint(_0x1cb9b9){const _0x5c0b12=a72_0x2b4a,_0x24f5c9=await getDatasetDetail(_0x1cb9b9),_0x27bbcd=_0x24f5c9?.[_0x5c0b12(0x14f)]??{};if((_0x24f5c9?.['source']??_0x27bbcd[_0x5c0b12(0x133)])!=='DB_TABLE')throw CliErrors[_0x5c0b12(0x13e)](_0x5c0b12(0x10d)+_0x1cb9b9+_0x5c0b12(0x117));const _0x596937=_0x24f5c9[_0x5c0b12(0x10c)]??_0x24f5c9[_0x5c0b12(0x11d)]??{};let _0x4e0423=_0x24f5c9['extend']??_0x27bbcd[_0x5c0b12(0x12a)]??{};if(typeof _0x4e0423===_0x5c0b12(0x107))try{_0x4e0423=_0x4e0423[_0x5c0b12(0x132)]()?JSON[_0x5c0b12(0x110)](_0x4e0423):{};}catch{throw CliErrors['validation'](_0x5c0b12(0x10d)+_0x1cb9b9+'\x20has\x20invalid\x20storage\x20configuration.');}const _0x50bd38=Number(_0x4e0423?.['storageProfile']?.[_0x5c0b12(0x158)]??_0x24f5c9[_0x5c0b12(0x138)]?.['dbId']??_0x27bbcd[_0x5c0b12(0x138)]?.[_0x5c0b12(0x158)]??_0x596937[_0x5c0b12(0x158)]??_0x27bbcd['dbId']??_0x24f5c9[_0x5c0b12(0x158)]),_0x3e4196=String(_0x24f5c9[_0x5c0b12(0x153)]??_0x27bbcd[_0x5c0b12(0x153)]??_0x596937[_0x5c0b12(0x153)]??'')[_0x5c0b12(0x132)]();if(!Number[_0x5c0b12(0x149)](_0x50bd38)||_0x50bd38<=0x0||!_0x3e4196)throw CliErrors[_0x5c0b12(0x13e)]('Dataset\x20'+_0x1cb9b9+_0x5c0b12(0x12e));return{'datasetCode':_0x1cb9b9,'dblinkId':_0x50bd38,'table':_0x3e4196};}export async function resolveCrossRelationQuery(_0x1fc134){const _0x167c4b=a72_0x2b4a,_0x22a546=_0x1fc134['str'](_0x167c4b(0x13c))[_0x167c4b(0x132)](),_0x36cf35=explicitDblink(_0x1fc134),_0x4858b9=_0x22a546?await resolveEndpoint(_0x22a546):undefined;if(_0x4858b9&&_0x36cf35!==undefined&&_0x4858b9['dblinkId']!==_0x36cf35)throw CliErrors[_0x167c4b(0x13e)](_0x167c4b(0x155));const _0x1ac641=_0x4858b9?.[_0x167c4b(0x15b)]??_0x36cf35;if(_0x1ac641===undefined)throw CliErrors[_0x167c4b(0x13e)](_0x167c4b(0x112));return{'appCode':_0x1fc134['appCode'],'fromDblinkId':_0x1ac641,..._0x22a546?{'fromDatasetCode':_0x22a546}:{},..._0x1fc134[_0x167c4b(0x11e)](_0x167c4b(0x152))[_0x167c4b(0x132)]()?{'fromField':_0x1fc134[_0x167c4b(0x11e)]('from-column')[_0x167c4b(0x132)]()}:{}};}export function projectCrossRelation(_0x46ff39){const _0x4aa9ad=a72_0x2b4a;return{'relationId':_0x46ff39['relationId'],'from':{'source':_0x4aa9ad(0x11c),'datasetCode':_0x46ff39[_0x4aa9ad(0x109)],'datasetName':_0x46ff39['fromDatasetName'],'dblinkId':_0x46ff39['fromDblinkId'],'table':_0x46ff39[_0x4aa9ad(0x147)],'field':_0x46ff39[_0x4aa9ad(0x143)]},'to':{'source':_0x4aa9ad(0x11c),'datasetCode':_0x46ff39[_0x4aa9ad(0x124)],'datasetName':_0x46ff39['toDatasetName'],'dblinkId':_0x46ff39[_0x4aa9ad(0x13d)],'table':_0x46ff39[_0x4aa9ad(0x150)],'field':_0x46ff39[_0x4aa9ad(0x11f)],'labelField':_0x46ff39[_0x4aa9ad(0x119)]},'relation':{'cardinality':_0x46ff39['cardinality'],'relationType':_0x46ff39[_0x4aa9ad(0x113)]}};}function ambiguity(_0xaa850){const _0x304425=a72_0x2b4a,_0x5239ff=CliErrors[_0x304425(0x13e)](_0x304425(0x12c),_0x304425(0x13a));return Object[_0x304425(0x156)](_0x5239ff,_0x304425(0x15e),{'value':{'candidates':_0xaa850[_0x304425(0x10a)](projectCrossRelation)}}),_0x5239ff;}const sameName=(_0x358883,_0x17a4d0)=>_0x358883[a72_0x1ad704(0x144)]()===_0x17a4d0[a72_0x1ad704(0x144)]();function matchesEndpoint(_0x28e2e4,_0x1ba0d3,_0x5b6ee8,_0xbef0b3,_0x26bf5c){const _0x1cf9d5=a72_0x1ad704;return _0x28e2e4[_0x1cf9d5(0x130)]===_0x1ba0d3['dblinkId']&&sameName(_0x28e2e4['fromTableName'],_0x1ba0d3[_0x1cf9d5(0x13b)])&&sameName(_0x28e2e4[_0x1cf9d5(0x143)],_0x5b6ee8)&&_0x28e2e4['toDblinkId']===_0xbef0b3[_0x1cf9d5(0x15b)]&&sameName(_0x28e2e4['toTableName'],_0xbef0b3[_0x1cf9d5(0x13b)])&&sameName(_0x28e2e4[_0x1cf9d5(0x11f)],_0x26bf5c);}function a72_0x46ce(){const _0x1cc732=['matched','\x20write\x20was\x20not\x20verified.','storageProfile','expectedCardinality','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','table','from-datasetcode','toDblinkId','validation','Invalid\x20--cardinality.','relationId','12hGjOwy','to-column','fromField','toLowerCase','to-datasetcode','2967485lngCad','fromTableName','flagMissing','isSafeInteger','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','20ldbNGw','unconfirmed','body','33563NAvcQt','dataset','toTableName','94632ijEixQ','from-column','tableName','104KrMiMn','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','defineProperty','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','dbId','2497448MTtfTE','cardinality','dblinkId','from','length','data','string','label_inherited','fromDatasetCode','map','appCode','dbtableConfig','Dataset\x20','filter','multiple\x20cross-database\x20relations\x20matched','parse','5318289eyJKNa','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','relationType','message','delete','enum','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','\x20verified.','refTableLabelName','1102923hdUzoP','expectedLabel','DB_TABLE','dbtable','str','toField','Cross-database\x20relation\x20','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','flag','query','toDatasetCode','some','2101zhMepE','POST','to-label-column','34405vwXglr','extend','before','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','datasetCode','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','from-dblink-id','fromDblinkId','Would\x20','trim','sourceType','344DLYece','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.'];a72_0x46ce=function(){return _0x1cc732;};return a72_0x46ce();}export async function prepareCrossRelation(_0x4bf165,_0xc2c09c){const _0x14ddfd=a72_0x1ad704,_0x238495=await resolveEndpoint(required(_0x4bf165,_0x14ddfd(0x13c))),_0x351fe5=explicitDblink(_0x4bf165);if(_0x351fe5!==undefined&&_0x238495[_0x14ddfd(0x15b)]!==_0x351fe5)throw CliErrors[_0x14ddfd(0x13e)](_0x14ddfd(0x155));const _0x20680e={'appCode':_0x4bf165[_0x14ddfd(0x10b)],'fromDatasetCode':_0x238495['datasetCode'],'fromField':required(_0x4bf165,_0x14ddfd(0x152)),..._0x351fe5!==undefined?{'fromDblinkId':_0x351fe5}:{}},_0x4fc5d2={'appCode':_0x4bf165['appCode'],'fromDblinkId':_0x238495['dblinkId'],'fromDatasetCode':_0x238495[_0x14ddfd(0x12d)],'fromField':_0x20680e[_0x14ddfd(0x143)]},_0x2429cb=await queryCrossDbRelations(_0x4fc5d2);let _0x4d6d33=null;if(_0xc2c09c!=='create'){if(_0x2429cb[_0x14ddfd(0x15d)]>0x1)throw ambiguity(_0x2429cb);_0x4d6d33=_0x2429cb[0x0]??null;if(!_0x4d6d33)throw CliErrors['validation'](_0x14ddfd(0x14a));}if(_0xc2c09c===_0x14ddfd(0x115))return{'operation':_0xc2c09c,'from':_0x238495,'query':_0x4fc5d2,'body':_0x20680e,'before':_0x4d6d33};const _0x3c66e9=await resolveEndpoint(required(_0x4bf165,_0x14ddfd(0x145)));if(_0x238495[_0x14ddfd(0x15b)]===_0x3c66e9[_0x14ddfd(0x15b)])throw CliErrors[_0x14ddfd(0x13e)](_0x14ddfd(0x135));const _0x340719=_0x4bf165[_0x14ddfd(0x11e)](_0x14ddfd(0x128))[_0x14ddfd(0x132)](),_0x1ebcf1=_0x4bf165[_0x14ddfd(0x11e)]('cardinality')[_0x14ddfd(0x132)](),_0x2b2dfe={..._0x20680e,'toDatasetCode':_0x3c66e9[_0x14ddfd(0x12d)],'toField':required(_0x4bf165,_0x14ddfd(0x142)),..._0x340719?{'refTableLabelName':_0x340719}:{},..._0x1ebcf1?{'cardinality':_0x1ebcf1}:{}};if(_0x2429cb[_0x14ddfd(0x125)](_0x5a2c25=>_0x5a2c25[_0x14ddfd(0x140)]!==_0x4d6d33?.['relationId']&&matchesEndpoint(_0x5a2c25,_0x238495,_0x2b2dfe[_0x14ddfd(0x143)],_0x3c66e9,_0x2b2dfe[_0x14ddfd(0x11f)])))throw CliErrors[_0x14ddfd(0x13e)](_0x14ddfd(0x157));return{'operation':_0xc2c09c,'from':_0x238495,'to':_0x3c66e9,'query':_0x4fc5d2,'body':_0x2b2dfe,'before':_0x4d6d33,'expectedLabel':_0x340719||_0x4d6d33?.['refTableLabelName']||_0x2b2dfe['toField'],'expectedCardinality':_0x1ebcf1||_0x4d6d33?.[_0x14ddfd(0x15a)]||null};}function mutationData(_0x1ecff0,_0x201092,_0x583baa){const _0x38e083=a72_0x1ad704,{operation:_0x5161e6,body:_0x36523e,before:_0x354a88}=_0x1ecff0;return{'operation':_0x5161e6,'selector':{'appCode':_0x36523e[_0x38e083(0x10b)],'from':{'datasetCode':_0x36523e[_0x38e083(0x109)],'field':_0x36523e[_0x38e083(0x143)],'dblinkId':_0x1ecff0['from'][_0x38e083(0x15b)]}},'before':_0x354a88?projectCrossRelation(_0x354a88):null,'after':_0x583baa,'dryRun':_0x201092,'backend':{'method':_0x38e083(0x127),'path':CROSS_DB_RELATION_PATHS[_0x5161e6]},'warnings':_0x5161e6==='update'&&!_0x36523e[_0x38e083(0x119)]?[{'code':_0x38e083(0x108),'message':'The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.'}]:[]};}export async function previewCrossRelation(_0x24cc7e,_0x54a699){const _0x1bebef=a72_0x1ad704,_0x9d3c03=await prepareCrossRelation(_0x24cc7e,_0x54a699),_0x2bbb56=_0x9d3c03[_0x1bebef(0x14d)],_0x498d38=_0x54a699===_0x1bebef(0x115)?null:{..._0x9d3c03[_0x1bebef(0x12b)]?{'relationId':_0x9d3c03[_0x1bebef(0x12b)][_0x1bebef(0x140)]}:{},'from':{'datasetCode':_0x9d3c03[_0x1bebef(0x15c)][_0x1bebef(0x12d)],'dblinkId':_0x9d3c03[_0x1bebef(0x15c)][_0x1bebef(0x15b)],'table':_0x9d3c03['from']['table'],'field':_0x2bbb56['fromField']},'to':{'datasetCode':_0x9d3c03['to']['datasetCode'],'dblinkId':_0x9d3c03['to'][_0x1bebef(0x15b)],'table':_0x9d3c03['to'][_0x1bebef(0x13b)],'field':_0x2bbb56[_0x1bebef(0x11f)],'labelField':_0x9d3c03[_0x1bebef(0x11b)]},'relation':{'cardinality':_0x9d3c03['expectedCardinality'],'relationType':0x2}};return{...mutationData(_0x9d3c03,!![],null),'after':_0x498d38,'method':_0x1bebef(0x127),'url':CROSS_DB_RELATION_PATHS[_0x54a699],'body':_0x9d3c03['body'],'description':_0x1bebef(0x131)+_0x54a699+'\x20a\x20cross-database\x20relation\x20for\x20'+_0x2bbb56[_0x1bebef(0x109)]+'.'+_0x2bbb56[_0x1bebef(0x143)]};}export async function executeCrossRelation(_0x562f81,_0x5670be,_0x29dca4){const _0x2279f5=a72_0x1ad704,_0x4a8513=await prepareCrossRelation(_0x562f81,_0x5670be);try{await _0x29dca4(_0x4a8513[_0x2279f5(0x14d)]);}catch(_0x550a44){if(_0x550a44 instanceof CliError&&_0x550a44[_0x2279f5(0x114)]['includes'](_0x2279f5(0x10f))){const _0x2e8c2e=await queryCrossDbRelations(_0x4a8513[_0x2279f5(0x123)])['catch'](()=>[]);throw ambiguity(_0x2e8c2e);}throw _0x550a44;}let _0x30c798=[],_0x1798a2,_0x22f06c=![];try{_0x30c798=await queryCrossDbRelations(_0x4a8513[_0x2279f5(0x123)]);if(_0x5670be===_0x2279f5(0x115))_0x22f06c=!_0x30c798['some'](_0x542027=>_0x542027[_0x2279f5(0x140)]===_0x4a8513[_0x2279f5(0x12b)]['relationId']);else{const _0x2f6d29=_0x4a8513['body'],_0x28a3b8=_0x30c798[_0x2279f5(0x10e)](_0x5842e2=>matchesEndpoint(_0x5842e2,_0x4a8513[_0x2279f5(0x15c)],_0x2f6d29[_0x2279f5(0x143)],_0x4a8513['to'],_0x2f6d29[_0x2279f5(0x11f)])&&(_0x5670be==='create'||_0x5842e2[_0x2279f5(0x140)]===_0x4a8513['before'][_0x2279f5(0x140)]));_0x1798a2=_0x28a3b8[_0x2279f5(0x15d)]===0x1?_0x28a3b8[0x0]:undefined,_0x22f06c=!!_0x1798a2&&_0x1798a2[_0x2279f5(0x119)]===_0x4a8513[_0x2279f5(0x11b)]&&_0x1798a2[_0x2279f5(0x15a)]===_0x4a8513[_0x2279f5(0x139)]&&_0x1798a2[_0x2279f5(0x113)]===0x2;}}catch{}const _0xc4f843={...mutationData(_0x4a8513,![],_0x1798a2?projectCrossRelation(_0x1798a2):null),'verification':{'status':_0x22f06c?_0x2279f5(0x136):_0x2279f5(0x14c),'verified':_0x22f06c}};if(!_0x22f06c){const _0x4a5f9c=CliErrors['apiError'](_0x2279f5(0x120)+_0x5670be+_0x2279f5(0x137),'The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.');Object[_0x2279f5(0x156)](_0x4a5f9c,_0x2279f5(0x15e),{'value':{..._0xc4f843,'candidates':_0x30c798[_0x2279f5(0x10a)](projectCrossRelation)}});throw _0x4a5f9c;}return{'ok':!![],'data':_0xc4f843,'message':_0x2279f5(0x120)+_0x5670be+_0x2279f5(0x118)};}
|
|
1
|
+
const a72_0xa2c321=a72_0x14fc;(function(_0x1784ac,_0x1ba4eb){const _0x4e0f3f=a72_0x14fc,_0x500ae8=_0x1784ac();while(!![]){try{const _0x1c577f=parseInt(_0x4e0f3f(0x80))/0x1*(-parseInt(_0x4e0f3f(0x91))/0x2)+-parseInt(_0x4e0f3f(0x7c))/0x3*(-parseInt(_0x4e0f3f(0x84))/0x4)+-parseInt(_0x4e0f3f(0x95))/0x5+parseInt(_0x4e0f3f(0x97))/0x6+-parseInt(_0x4e0f3f(0x8b))/0x7+-parseInt(_0x4e0f3f(0x8c))/0x8*(-parseInt(_0x4e0f3f(0x73))/0x9)+-parseInt(_0x4e0f3f(0x8f))/0xa*(-parseInt(_0x4e0f3f(0x86))/0xb);if(_0x1c577f===_0x1ba4eb)break;else _0x500ae8['push'](_0x500ae8['shift']());}catch(_0x27533d){_0x500ae8['push'](_0x500ae8['shift']());}}}(a72_0x507a,0x971ec));function a72_0x507a(){const _0x1ccead=['Dataset\x20','2YveZJL','toDblinkId','toTableName','filter','3417735VszUdg','extend','1678626dkMjgQ','from','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','cardinality','delete','before','relationId','expectedCardinality','flag','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Would\x20','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','datasetCode','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','Cross-database\x20relation\x20','from-datasetcode','toField','list','apiError','from-dblink-id','fromDatasetCode','appCode','multiple\x20cross-database\x20relations\x20matched','length','dbtable','matched','dbId','string','dbtableConfig','DB_TABLE','to-label-column','label_inherited','validation','Invalid\x20--cardinality.','to-column','fromTableName','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','fromField','catch','update','trim','refTableLabelName','includes','\x20write\x20was\x20not\x20verified.','map','POST','flagMissing','dblinkId','1154313gTGzke','storageProfile','toLowerCase','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','some','tableName','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','sourceType','table','154533WjOeqy','defineProperty','fromDatasetName','from-column','990536lIrjQj','to-datasetcode','relationType','isSafeInteger','20qyTWSh','expectedLabel','22782089AkwoZF','body','data','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','toDatasetName','5798674okdneo','32eKtWji','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','str','10zGqSPM'];a72_0x507a=function(){return _0x1ccead;};return a72_0x507a();}import{getDatasetDetail,queryCrossDbRelations}from'../../core/api-client.js';import{CROSS_DB_RELATION_PATHS}from'../../core/cross-db-relation.js';function a72_0x14fc(_0xc28cda,_0x51ca1f){_0xc28cda=_0xc28cda-0x6e;const _0x507a3d=a72_0x507a();let _0x14fc62=_0x507a3d[_0xc28cda];return _0x14fc62;}import{CliError,CliErrors}from'../../errors.js';import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0x1b91de,_0x41fd84){const _0x3a6e92=a72_0x14fc,_0x1167b9=_0x1b91de[_0x3a6e92(0x8e)](_0x41fd84)[_0x3a6e92(0xc0)]();if(!_0x1167b9)throw CliErrors[_0x3a6e92(0x71)](_0x41fd84);return _0x1167b9;}function explicitDblink(_0x278fc){const _0x5b207e=a72_0x14fc,_0x441462=_0x278fc[_0x5b207e(0x9f)](_0x5b207e(0xab));if(_0x441462===undefined||_0x441462===null)return undefined;const _0x121dda=Number(_0x441462);if(!Number[_0x5b207e(0x83)](_0x121dda)||_0x121dda<=0x0)throw CliErrors[_0x5b207e(0xb8)](_0x5b207e(0xa0));return _0x121dda;}export function validateCrossRelation(_0x16e8f2,_0x2b563e){const _0x588202=a72_0x14fc,_0x85bf39=explicitDblink(_0x16e8f2);if(_0x2b563e===_0x588202(0xa9)){if(!_0x16e8f2[_0x588202(0x8e)](_0x588202(0xa7))[_0x588202(0xc0)]()&&_0x85bf39===undefined)throw CliErrors[_0x588202(0xb8)](_0x588202(0x76));return;}required(_0x16e8f2,_0x588202(0xa7)),required(_0x16e8f2,'from-column');if(_0x2b563e!==_0x588202(0x9b)){required(_0x16e8f2,_0x588202(0x81)),required(_0x16e8f2,_0x588202(0xba));const _0x40d348=_0x16e8f2[_0x588202(0x8e)](_0x588202(0x9a))[_0x588202(0xc0)]();if(_0x40d348&&!CROSS_RELATION_CARDINALITY_FLAG['enum'][_0x588202(0xc2)](_0x40d348))throw CliErrors['validation'](_0x588202(0xb9));}}async function resolveEndpoint(_0x16e0d0){const _0x19801a=a72_0x14fc,_0x3d7f8e=await getDatasetDetail(_0x16e0d0),_0x3ea0a2=_0x3d7f8e?.['dataset']??{};if((_0x3d7f8e?.['source']??_0x3ea0a2[_0x19801a(0x7a)])!==_0x19801a(0xb5))throw CliErrors[_0x19801a(0xb8)](_0x19801a(0x90)+_0x16e0d0+'\x20must\x20be\x20a\x20DB_TABLE\x20dataset.');const _0x5297cf=_0x3d7f8e[_0x19801a(0xb4)]??_0x3d7f8e[_0x19801a(0xb0)]??{};let _0x2ce16b=_0x3d7f8e['extend']??_0x3ea0a2[_0x19801a(0x96)]??{};if(typeof _0x2ce16b===_0x19801a(0xb3))try{_0x2ce16b=_0x2ce16b[_0x19801a(0xc0)]()?JSON['parse'](_0x2ce16b):{};}catch{throw CliErrors[_0x19801a(0xb8)](_0x19801a(0x90)+_0x16e0d0+'\x20has\x20invalid\x20storage\x20configuration.');}const _0x225d81=Number(_0x2ce16b?.['storageProfile']?.[_0x19801a(0xb2)]??_0x3d7f8e[_0x19801a(0x74)]?.[_0x19801a(0xb2)]??_0x3ea0a2['storageProfile']?.[_0x19801a(0xb2)]??_0x5297cf['dbId']??_0x3ea0a2[_0x19801a(0xb2)]??_0x3d7f8e[_0x19801a(0xb2)]),_0x1fc37a=String(_0x3d7f8e[_0x19801a(0x78)]??_0x3ea0a2[_0x19801a(0x78)]??_0x5297cf[_0x19801a(0x78)]??'')[_0x19801a(0xc0)]();if(!Number[_0x19801a(0x83)](_0x225d81)||_0x225d81<=0x0||!_0x1fc37a)throw CliErrors[_0x19801a(0xb8)](_0x19801a(0x90)+_0x16e0d0+'\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.');return{'datasetCode':_0x16e0d0,'dblinkId':_0x225d81,'table':_0x1fc37a};}export async function resolveCrossRelationQuery(_0x2ba8a6){const _0x4f5e41=a72_0x14fc,_0xde3ab6=_0x2ba8a6['str'](_0x4f5e41(0xa7))['trim'](),_0x15529c=explicitDblink(_0x2ba8a6),_0x13b560=_0xde3ab6?await resolveEndpoint(_0xde3ab6):undefined;if(_0x13b560&&_0x15529c!==undefined&&_0x13b560['dblinkId']!==_0x15529c)throw CliErrors['validation'](_0x4f5e41(0xbc));const _0x389942=_0x13b560?.[_0x4f5e41(0x72)]??_0x15529c;if(_0x389942===undefined)throw CliErrors['validation'](_0x4f5e41(0x76));return{'appCode':_0x2ba8a6[_0x4f5e41(0xad)],'fromDblinkId':_0x389942,..._0xde3ab6?{'fromDatasetCode':_0xde3ab6}:{},..._0x2ba8a6[_0x4f5e41(0x8e)](_0x4f5e41(0x7f))[_0x4f5e41(0xc0)]()?{'fromField':_0x2ba8a6[_0x4f5e41(0x8e)]('from-column')[_0x4f5e41(0xc0)]()}:{}};}export function projectCrossRelation(_0x5dcfed){const _0x5c9757=a72_0x14fc;return{'relationId':_0x5dcfed[_0x5c9757(0x9d)],'from':{'source':_0x5c9757(0xb5),'datasetCode':_0x5dcfed['fromDatasetCode'],'datasetName':_0x5dcfed[_0x5c9757(0x7e)],'dblinkId':_0x5dcfed['fromDblinkId'],'table':_0x5dcfed[_0x5c9757(0xbb)],'field':_0x5dcfed[_0x5c9757(0xbd)]},'to':{'source':_0x5c9757(0xb5),'datasetCode':_0x5dcfed['toDatasetCode'],'datasetName':_0x5dcfed[_0x5c9757(0x8a)],'dblinkId':_0x5dcfed['toDblinkId'],'table':_0x5dcfed[_0x5c9757(0x93)],'field':_0x5dcfed[_0x5c9757(0xa8)],'labelField':_0x5dcfed['refTableLabelName']},'relation':{'cardinality':_0x5dcfed[_0x5c9757(0x9a)],'relationType':_0x5dcfed['relationType']}};}function ambiguity(_0x39b757){const _0x1e3352=a72_0x14fc,_0x265607=CliErrors['validation'](_0x1e3352(0x79),_0x1e3352(0x8d));return Object['defineProperty'](_0x265607,_0x1e3352(0x88),{'value':{'candidates':_0x39b757[_0x1e3352(0x6f)](projectCrossRelation)}}),_0x265607;}const sameName=(_0x21ffb4,_0x26c678)=>_0x21ffb4[a72_0xa2c321(0x75)]()===_0x26c678[a72_0xa2c321(0x75)]();function matchesEndpoint(_0xac94b9,_0x2a7ea9,_0x44cfbc,_0x2695db,_0x30161a){const _0xd2ed8c=a72_0xa2c321;return _0xac94b9['fromDblinkId']===_0x2a7ea9[_0xd2ed8c(0x72)]&&sameName(_0xac94b9[_0xd2ed8c(0xbb)],_0x2a7ea9[_0xd2ed8c(0x7b)])&&sameName(_0xac94b9[_0xd2ed8c(0xbd)],_0x44cfbc)&&_0xac94b9[_0xd2ed8c(0x92)]===_0x2695db[_0xd2ed8c(0x72)]&&sameName(_0xac94b9['toTableName'],_0x2695db[_0xd2ed8c(0x7b)])&&sameName(_0xac94b9[_0xd2ed8c(0xa8)],_0x30161a);}export async function prepareCrossRelation(_0x46daf8,_0x2699e2){const _0x305820=a72_0xa2c321,_0x2bfdf1=await resolveEndpoint(required(_0x46daf8,_0x305820(0xa7))),_0x2ffc35=explicitDblink(_0x46daf8);if(_0x2ffc35!==undefined&&_0x2bfdf1[_0x305820(0x72)]!==_0x2ffc35)throw CliErrors[_0x305820(0xb8)](_0x305820(0xbc));const _0x4f1d5b={'appCode':_0x46daf8['appCode'],'fromDatasetCode':_0x2bfdf1[_0x305820(0xa4)],'fromField':required(_0x46daf8,_0x305820(0x7f)),..._0x2ffc35!==undefined?{'fromDblinkId':_0x2ffc35}:{}},_0x41f3d8={'appCode':_0x46daf8['appCode'],'fromDblinkId':_0x2bfdf1[_0x305820(0x72)],'fromDatasetCode':_0x2bfdf1['datasetCode'],'fromField':_0x4f1d5b[_0x305820(0xbd)]},_0x38ae8c=await queryCrossDbRelations(_0x41f3d8);let _0x939528=null;if(_0x2699e2!=='create'){if(_0x38ae8c[_0x305820(0xaf)]>0x1)throw ambiguity(_0x38ae8c);_0x939528=_0x38ae8c[0x0]??null;if(!_0x939528)throw CliErrors[_0x305820(0xb8)](_0x305820(0xa2));}if(_0x2699e2===_0x305820(0x9b))return{'operation':_0x2699e2,'from':_0x2bfdf1,'query':_0x41f3d8,'body':_0x4f1d5b,'before':_0x939528};const _0x543223=await resolveEndpoint(required(_0x46daf8,_0x305820(0x81)));if(_0x2bfdf1['dblinkId']===_0x543223[_0x305820(0x72)])throw CliErrors[_0x305820(0xb8)](_0x305820(0xa3));const _0xd10d9=_0x46daf8['str'](_0x305820(0xb6))[_0x305820(0xc0)](),_0x4b54f8=_0x46daf8['str'](_0x305820(0x9a))[_0x305820(0xc0)](),_0x34a01d={..._0x4f1d5b,'toDatasetCode':_0x543223[_0x305820(0xa4)],'toField':required(_0x46daf8,_0x305820(0xba)),..._0xd10d9?{'refTableLabelName':_0xd10d9}:{},..._0x4b54f8?{'cardinality':_0x4b54f8}:{}};if(_0x38ae8c['some'](_0x1396ef=>_0x1396ef[_0x305820(0x9d)]!==_0x939528?.['relationId']&&matchesEndpoint(_0x1396ef,_0x2bfdf1,_0x34a01d['fromField'],_0x543223,_0x34a01d[_0x305820(0xa8)])))throw CliErrors[_0x305820(0xb8)](_0x305820(0xa5));return{'operation':_0x2699e2,'from':_0x2bfdf1,'to':_0x543223,'query':_0x41f3d8,'body':_0x34a01d,'before':_0x939528,'expectedLabel':_0xd10d9||_0x939528?.[_0x305820(0xc1)]||_0x34a01d[_0x305820(0xa8)],'expectedCardinality':_0x4b54f8||_0x939528?.[_0x305820(0x9a)]||null};}function mutationData(_0x3ee5bb,_0x5e76ce,_0x3ad0b0){const _0x39cb8e=a72_0xa2c321,{operation:_0x404e83,body:_0x121c92,before:_0x13973a}=_0x3ee5bb;return{'operation':_0x404e83,'selector':{'appCode':_0x121c92['appCode'],'from':{'datasetCode':_0x121c92['fromDatasetCode'],'field':_0x121c92[_0x39cb8e(0xbd)],'dblinkId':_0x3ee5bb[_0x39cb8e(0x98)][_0x39cb8e(0x72)]}},'before':_0x13973a?projectCrossRelation(_0x13973a):null,'after':_0x3ad0b0,'dryRun':_0x5e76ce,'backend':{'method':'POST','path':CROSS_DB_RELATION_PATHS[_0x404e83]},'warnings':_0x404e83===_0x39cb8e(0xbf)&&!_0x121c92[_0x39cb8e(0xc1)]?[{'code':_0x39cb8e(0xb7),'message':_0x39cb8e(0x99)}]:[]};}export async function previewCrossRelation(_0x1f3ec9,_0x36a3eb){const _0x48fe8a=a72_0xa2c321,_0x1e265f=await prepareCrossRelation(_0x1f3ec9,_0x36a3eb),_0x4c8805=_0x1e265f[_0x48fe8a(0x87)],_0x2398e6=_0x36a3eb===_0x48fe8a(0x9b)?null:{..._0x1e265f[_0x48fe8a(0x9c)]?{'relationId':_0x1e265f[_0x48fe8a(0x9c)][_0x48fe8a(0x9d)]}:{},'from':{'datasetCode':_0x1e265f[_0x48fe8a(0x98)]['datasetCode'],'dblinkId':_0x1e265f[_0x48fe8a(0x98)][_0x48fe8a(0x72)],'table':_0x1e265f[_0x48fe8a(0x98)][_0x48fe8a(0x7b)],'field':_0x4c8805[_0x48fe8a(0xbd)]},'to':{'datasetCode':_0x1e265f['to']['datasetCode'],'dblinkId':_0x1e265f['to'][_0x48fe8a(0x72)],'table':_0x1e265f['to'][_0x48fe8a(0x7b)],'field':_0x4c8805[_0x48fe8a(0xa8)],'labelField':_0x1e265f['expectedLabel']},'relation':{'cardinality':_0x1e265f[_0x48fe8a(0x9e)],'relationType':0x2}};return{...mutationData(_0x1e265f,!![],null),'after':_0x2398e6,'method':_0x48fe8a(0x70),'url':CROSS_DB_RELATION_PATHS[_0x36a3eb],'body':_0x1e265f[_0x48fe8a(0x87)],'description':_0x48fe8a(0xa1)+_0x36a3eb+'\x20a\x20cross-database\x20relation\x20for\x20'+_0x4c8805[_0x48fe8a(0xac)]+'.'+_0x4c8805[_0x48fe8a(0xbd)]};}export async function executeCrossRelation(_0x372093,_0x103122,_0x46c8b7){const _0x382a05=a72_0xa2c321,_0x31922a=await prepareCrossRelation(_0x372093,_0x103122);try{await _0x46c8b7(_0x31922a[_0x382a05(0x87)]);}catch(_0x16d428){if(_0x16d428 instanceof CliError&&_0x16d428['message'][_0x382a05(0xc2)](_0x382a05(0xae))){const _0x10d460=await queryCrossDbRelations(_0x31922a['query'])[_0x382a05(0xbe)](()=>[]);throw ambiguity(_0x10d460);}throw _0x16d428;}let _0x1497e5=[],_0x47ab6b,_0x5b79c8=![];try{_0x1497e5=await queryCrossDbRelations(_0x31922a['query']);if(_0x103122===_0x382a05(0x9b))_0x5b79c8=!_0x1497e5[_0x382a05(0x77)](_0x8d63f9=>_0x8d63f9['relationId']===_0x31922a[_0x382a05(0x9c)][_0x382a05(0x9d)]);else{const _0x4761d0=_0x31922a['body'],_0xd86dfc=_0x1497e5[_0x382a05(0x94)](_0x11a5e8=>matchesEndpoint(_0x11a5e8,_0x31922a[_0x382a05(0x98)],_0x4761d0[_0x382a05(0xbd)],_0x31922a['to'],_0x4761d0['toField'])&&(_0x103122==='create'||_0x11a5e8[_0x382a05(0x9d)]===_0x31922a[_0x382a05(0x9c)][_0x382a05(0x9d)]));_0x47ab6b=_0xd86dfc[_0x382a05(0xaf)]===0x1?_0xd86dfc[0x0]:undefined,_0x5b79c8=!!_0x47ab6b&&_0x47ab6b['refTableLabelName']===_0x31922a[_0x382a05(0x85)]&&_0x47ab6b[_0x382a05(0x9a)]===_0x31922a['expectedCardinality']&&_0x47ab6b[_0x382a05(0x82)]===0x2;}}catch{}const _0xb28cc8={...mutationData(_0x31922a,![],_0x47ab6b?projectCrossRelation(_0x47ab6b):null),'verification':{'status':_0x5b79c8?_0x382a05(0xb1):'unconfirmed','verified':_0x5b79c8}};if(!_0x5b79c8){const _0x5c921e=CliErrors[_0x382a05(0xaa)](_0x382a05(0xa6)+_0x103122+_0x382a05(0x6e),_0x382a05(0x89));Object[_0x382a05(0x7d)](_0x5c921e,_0x382a05(0x88),{'value':{..._0xb28cc8,'candidates':_0x1497e5['map'](projectCrossRelation)}});throw _0x5c921e;}return{'ok':!![],'data':_0xb28cc8,'message':_0x382a05(0xa6)+_0x103122+'\x20verified.'};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a73_0x2f84(_0x840d98,_0x2fe1fa){_0x840d98=_0x840d98-0x159;const _0x32ccb1=a73_0x32cc();let _0x2f8455=_0x32ccb1[_0x840d98];return _0x2f8455;}const a73_0x304359=a73_0x2f84;(function(_0x438c7a,_0x39c42d){const _0x267487=a73_0x2f84,_0x18abe8=_0x438c7a();while(!![]){try{const _0x4ee423=parseInt(_0x267487(0x15b))/0x1+parseInt(_0x267487(0x165))/0x2+parseInt(_0x267487(0x15d))/0x3+-parseInt(_0x267487(0x164))/0x4*(-parseInt(_0x267487(0x162))/0x5)+parseInt(_0x267487(0x15e))/0x6+-parseInt(_0x267487(0x15c))/0x7*(-parseInt(_0x267487(0x15f))/0x8)+parseInt(_0x267487(0x161))/0x9*(-parseInt(_0x267487(0x163))/0xa);if(_0x4ee423===_0x39c42d)break;else _0x18abe8['push'](_0x18abe8['shift']());}catch(_0x46d105){_0x18abe8['push'](_0x18abe8['shift']());}}}(a73_0x32cc,0x1a389));import{updateCrossDbRelation}from'../../core/api-client.js';function a73_0x32cc(){const _0x2b11d0=['116828tauHhw','215754bagkBB','update','write','75368jktLGy','14567tKhGEl','598749wpsGeP','913938rMFOzy','392wiDhIC','dataset','9981YnxZCi','20zZTBHe','5830UHQEJG'];a73_0x32cc=function(){return _0x2b11d0;};return a73_0x32cc();}import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationUpdate={'service':a73_0x304359(0x160),'command':'cross-relation-update','description':'Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','risk':a73_0x304359(0x15a),'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 _0x428fd1=>validateCrossRelation(_0x428fd1,a73_0x304359(0x159)),'dryRun':_0x10de49=>previewCrossRelation(_0x10de49,a73_0x304359(0x159)),'execute':_0x1d73e3=>executeCrossRelation(_0x1d73e3,a73_0x304359(0x159),updateCrossDbRelation)};
|