@lovrabet/rabetbase-cli 2.5.9-beta.1 → 2.5.9
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/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-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/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/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +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_0x11a658=a59_0x19dc;(function(_0x3e8a22,_0x3095a3){const _0x3e3651=a59_0x19dc,_0x1ca401=_0x3e8a22();while(!![]){try{const _0x529597=parseInt(_0x3e3651(0x1c1))/0x1+parseInt(_0x3e3651(0x1b2))/0x2*(parseInt(_0x3e3651(0x1ba))/0x3)+-parseInt(_0x3e3651(0x1b8))/0x4*(-parseInt(_0x3e3651(0x1c6))/0x5)+-parseInt(_0x3e3651(0x1c3))/0x6*(-parseInt(_0x3e3651(0x1b7))/0x7)+parseInt(_0x3e3651(0x1c2))/0x8+-parseInt(_0x3e3651(0x1b1))/0x9*(-parseInt(_0x3e3651(0x1bb))/0xa)+-parseInt(_0x3e3651(0x1bd))/0xb;if(_0x529597===_0x3095a3)break;else _0x1ca401['push'](_0x1ca401['shift']());}catch(_0x26c708){_0x1ca401['push'](_0x1ca401['shift']());}}}(a59_0x2329,0x99e42));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a59_0x19dc(_0x425a49,_0x5158c8){_0x425a49=_0x425a49-0x1b1;const _0x2329ac=a59_0x2329();let _0x19dcd5=_0x2329ac[_0x425a49];return _0x19dcd5;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x250531){const _0x1c9a4f=a59_0x19dc,_0x41bd4a=_0x250531[_0x1c9a4f(0x1c7)](_0x1c9a4f(0x1b6));if(!_0x41bd4a)throw CliErrors[_0x1c9a4f(0x1b5)](_0x1c9a4f(0x1c4),_0x1c9a4f(0x1c5)+CLI_BIN_NAME+_0x1c9a4f(0x1c8));const _0x2d2e5b=readConfig(),_0xd59d18=_0x41bd4a===_0x1c9a4f(0x1b4)?_0x1c9a4f(0x1c9):_0x41bd4a,_0x13dd34=_0x2d2e5b[_0xd59d18];if(_0x13dd34===undefined)throw CliErrors['validation'](_0x1c9a4f(0x1bf)+_0x41bd4a);return{'ok':!![],'data':typeof _0x13dd34===_0x1c9a4f(0x1b3)?_0x13dd34:{[_0xd59d18]:_0x13dd34},'message':typeof _0x13dd34===_0x1c9a4f(0x1b3)?undefined:String(_0x13dd34)};}export const configGetDefinition={'service':a59_0x11a658(0x1b9),'command':a59_0x11a658(0x1ca),'description':a59_0x11a658(0x1c0),'risk':a59_0x11a658(0x1be),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a59_0x11a658(0x1b6),'type':a59_0x11a658(0x1bc),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};function a59_0x2329(){const _0x38604f=['19674prAQCV','4338erOOye','object','app','validation','key','86639FuIqpm','5468aFTdPK','config','135zYkpzQ','4190ffIEmA','string','45719311beYWmy','read','Key\x20not\x20found:\x20','Get\x20a\x20config\x20value\x20by\x20key','910712xjrUvI','9002064XmIiBh','306mrrwgd','Missing\x20key.','Usage:\x20','4045tZnsyi','str','\x20config\x20get\x20--key\x20<key>','appcode','get'];a59_0x2329=function(){return _0x38604f;};return a59_0x2329();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a60_0x5126(_0x9c67c0,_0x7db78c){_0x9c67c0=_0x9c67c0-0x147;const _0xc3fdbf=a60_0xc3fd();let _0x5126b6=_0xc3fdbf[_0x9c67c0];return _0x5126b6;}(function(_0x12c8d6,_0x352108){const _0x55cedc=a60_0x5126,_0x384aec=_0x12c8d6();while(!![]){try{const _0x4ab010=parseInt(_0x55cedc(0x14e))/0x1*(parseInt(_0x55cedc(0x147))/0x2)+parseInt(_0x55cedc(0x14f))/0x3+parseInt(_0x55cedc(0x14a))/0x4+-parseInt(_0x55cedc(0x14b))/0x5+parseInt(_0x55cedc(0x149))/0x6+-parseInt(_0x55cedc(0x150))/0x7*(parseInt(_0x55cedc(0x14c))/0x8)+parseInt(_0x55cedc(0x14d))/0x9*(parseInt(_0x55cedc(0x148))/0xa);if(_0x4ab010===_0x352108)break;else _0x384aec['push'](_0x384aec['shift']());}catch(_0x57faf7){_0x384aec['push'](_0x384aec['shift']());}}}(a60_0xc3fd,0xc5590));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a60_0xc3fd(){const _0x301331=['7604072XdHHtB','32156Ptnuac','527290vuxRao','2184348yKHCwX','628164KYCJZF','5247555VYYHVY','8VotIpA','171IKWMgt','47nRlDxK','1996581gRONfv'];a60_0xc3fd=function(){return _0x301331;};return a60_0xc3fd();}import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x4b3c56=a61_0x2c24;(function(_0x2ce329,_0x58fcad){const _0x170057=a61_0x2c24,_0x2bae6d=_0x2ce329();while(!![]){try{const _0xe7737f=-parseInt(_0x170057(0x108))/0x1*(-parseInt(_0x170057(0x115))/0x2)+-parseInt(_0x170057(0x101))/0x3*(parseInt(_0x170057(0xff))/0x4)+-parseInt(_0x170057(0x118))/0x5+-parseInt(_0x170057(0x128))/0x6+-parseInt(_0x170057(0x114))/0x7+parseInt(_0x170057(0x12b))/0x8*(parseInt(_0x170057(0x12a))/0x9)+-parseInt(_0x170057(0x111))/0xa*(-parseInt(_0x170057(0x113))/0xb);if(_0xe7737f===_0x58fcad)break;else _0x2bae6d['push'](_0x2bae6d['shift']());}catch(_0x10e80b){_0x2bae6d['push'](_0x2bae6d['shift']());}}}(a61_0x4a7b,0xaaa9f));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a61_0x4a7b(){const _0x464e02=['Independent-deployment\x20Domain\x20JSON\x20file','Custom\x20local\x20callback\x20HTTPS\x20origin','official','mode','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','kb-domain','110djrnSx','validation','458139bApBic','2376465qkzCZx','41792vgrxvb','cdn','str','5383375hpxBNn','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','Custom\x20User\x20HTTPS\x20origin','length','Region\x20\x22','config','skill-domain','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','independent','manifestDomains','write','enterprise-v1','api-domain','cancelled','domain-config','73140ZummQE','keys','9uRXkIp','3658184SNNVdu','label','user-domain','ExitPromptError','name','local-domain','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','Custom\x20SkillHub\x20HTTPS\x20origin','certificateDomain','Custom\x20knowledge-base\x20HTTPS\x20origin','Custom\x20platform\x20API\x20HTTPS\x20origin','project','join','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','certificate-domain','4baarng','string','250695AMWUyP','global','Available\x20regions:\x20','Custom\x20certificate\x20service\x20HTTPS\x20origin','bool','region','localDomain','62XZcVeB','routing','runtime-domain'];a61_0x4a7b=function(){return _0x464e02;};return a61_0x4a7b();}import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':'region','type':'string','description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES[a61_0x4b3c56(0x137)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a61_0x4b3c56(0x127),'type':'string','description':a61_0x4b3c56(0x10b)},{'name':a61_0x4b3c56(0x12d),'type':a61_0x4b3c56(0x100),'description':a61_0x4b3c56(0x11a)},{'name':a61_0x4b3c56(0x125),'type':a61_0x4b3c56(0x100),'description':a61_0x4b3c56(0x135)},{'name':a61_0x4b3c56(0x10a),'type':'string','description':'Custom\x20Runtime\x20HTTPS\x20origin'},{'name':a61_0x4b3c56(0x11e),'type':a61_0x4b3c56(0x100),'description':a61_0x4b3c56(0x132)},{'name':a61_0x4b3c56(0x110),'type':a61_0x4b3c56(0x100),'description':a61_0x4b3c56(0x134)},{'name':'kb-service-domain','type':a61_0x4b3c56(0x100),'description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'},{'name':'app-domain','type':a61_0x4b3c56(0x100),'description':a61_0x4b3c56(0x120)},{'name':a61_0x4b3c56(0x130),'type':a61_0x4b3c56(0x100),'description':a61_0x4b3c56(0x10c)},{'name':a61_0x4b3c56(0xfe),'type':'string','description':a61_0x4b3c56(0x104)}];async function resolveRegion(_0x17d2b4){const _0xa55650=a61_0x4b3c56,_0x20fd7f=_0x17d2b4[_0xa55650(0x117)](_0xa55650(0x106));if(_0x20fd7f){if(!isEnabledLovrabetRegion(_0x20fd7f))throw CliErrors[_0xa55650(0x112)](_0xa55650(0x11c)+_0x20fd7f+'\x22\x20is\x20not\x20currently\x20available.',_0xa55650(0x103)+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'));return _0x20fd7f;}if(_0x17d2b4['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x46fd8f=>({'name':getOfficialRoutingProfile(_0x46fd8f)[_0xa55650(0x12c)]+'\x20('+_0x46fd8f+')','value':_0x46fd8f}))});}catch(_0x346d77){if(_0x346d77?.[_0xa55650(0x12f)]===_0xa55650(0x12e))throw CliErrors[_0xa55650(0x126)]();throw _0x346d77;}}function a61_0x2c24(_0xa295f2,_0x5a58fa){_0xa295f2=_0xa295f2-0xfe;const _0x4a7b49=a61_0x4a7b();let _0x2c2440=_0x4a7b49[_0xa295f2];return _0x2c2440;}export async function executeConfigInit(_0x371a4f){const _0x306917=a61_0x4b3c56,_0x3896d6=resolveDomainConfigInput(_0x371a4f),_0x1df72d=_0x3896d6['domains'],_0x15acfd=Object['keys'](_0x1df72d)[_0x306917(0x11b)]>0x0;if(_0x15acfd&&_0x371a4f[_0x306917(0x117)](_0x306917(0x106)))throw CliErrors[_0x306917(0x112)](_0x306917(0x119));if(!!_0x1df72d[_0x306917(0x107)]!==!!_0x1df72d[_0x306917(0x133)])throw CliErrors[_0x306917(0x112)](_0x306917(0x131));const _0x243d7d=_0x371a4f[_0x306917(0x105)](_0x306917(0x102))?_0x306917(0x102):_0x306917(0x136),_0x39d943=readScopedConfig(_0x243d7d);for(const _0x17c205 of DOMAIN_CONFIG_FIELDS)delete _0x39d943[_0x17c205];for(const _0x467274 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x39d943[_0x467274];delete _0x39d943[_0x306917(0x109)];let _0x35f34b=null;if(_0x15acfd)delete _0x39d943[_0x306917(0x106)],_0x3896d6['mode']==='enterprise-v1'?_0x39d943['routing']={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x3896d6[_0x306917(0x122)],'cdn':_0x3896d6[_0x306917(0x116)]}:Object['assign'](_0x39d943,_0x1df72d);else{_0x35f34b=await resolveRegion(_0x371a4f);if(_0x35f34b===DEFAULT_LOVRABET_REGION)delete _0x39d943[_0x306917(0x106)];else _0x39d943[_0x306917(0x106)]=_0x35f34b;}return writeScopedConfig(_0x39d943,_0x243d7d),{'ok':!![],'message':_0x15acfd?_0x306917(0x138)+Object[_0x306917(0x129)](_0x3896d6[_0x306917(0x10e)]===_0x306917(0x124)?_0x3896d6[_0x306917(0x122)]:_0x1df72d)[_0x306917(0x137)](',\x20')+'.':_0x306917(0x11f)+_0x35f34b+'.','data':{'mode':_0x15acfd?_0x306917(0x121):_0x306917(0x10d),'protocol':_0x3896d6[_0x306917(0x10e)]===_0x306917(0x124)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x35f34b,'domains':_0x1df72d,'cdn':_0x3896d6['mode']==='enterprise-v1'?_0x3896d6[_0x306917(0x116)]:undefined}};}export const configInitDefinition={'service':a61_0x4b3c56(0x11d),'command':'init','description':a61_0x4b3c56(0x10f),'risk':a61_0x4b3c56(0x123),'confirmationDescription':'Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x460fe6=a62_0x3506;function a62_0x3506(_0x450886,_0x51e1ce){_0x450886=_0x450886-0x13b;const _0x41654e=a62_0x4165();let _0x35065f=_0x41654e[_0x450886];return _0x35065f;}(function(_0x2d8e34,_0x29f39d){const _0x5a719d=a62_0x3506,_0x205967=_0x2d8e34();while(!![]){try{const _0x5ab028=parseInt(_0x5a719d(0x14a))/0x1*(parseInt(_0x5a719d(0x13b))/0x2)+parseInt(_0x5a719d(0x146))/0x3*(-parseInt(_0x5a719d(0x142))/0x4)+parseInt(_0x5a719d(0x149))/0x5*(-parseInt(_0x5a719d(0x141))/0x6)+-parseInt(_0x5a719d(0x145))/0x7+-parseInt(_0x5a719d(0x13e))/0x8*(-parseInt(_0x5a719d(0x13c))/0x9)+parseInt(_0x5a719d(0x147))/0xa*(-parseInt(_0x5a719d(0x143))/0xb)+parseInt(_0x5a719d(0x148))/0xc*(parseInt(_0x5a719d(0x140))/0xd);if(_0x5ab028===_0x29f39d)break;else _0x205967['push'](_0x205967['shift']());}catch(_0x1fcf91){_0x205967['push'](_0x205967['shift']());}}}(a62_0x4165,0x442df));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a62_0x4165(){const _0x2b3f22=['562446eRiPsj','241884WujnKR','bool','128auOmvA','read','2395211bycbqe','12SCnICh','7064vImqMU','8173agvugT','config','2653196fUjPgW','180nKSJKS','630FwTDLd','12rxQTmE','211065TQCUog','1amXVNg','global','List\x20all\x20config\x20values'];a62_0x4165=function(){return _0x2b3f22;};return a62_0x4165();}async function execute(_0x359d9b){const _0x46a7c9=a62_0x3506,_0x5c8a90=_0x359d9b[_0x46a7c9(0x13d)](_0x46a7c9(0x14b))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x5c8a90};}export const configListDefinition={'service':a62_0x460fe6(0x144),'command':'list','description':a62_0x460fe6(0x14c),'risk':a62_0x460fe6(0x13f),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x460fe6(0x14b),'type':'boolean','description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x32d59a=a63_0x4865;(function(_0x290eda,_0xc27609){const _0x31ae97=a63_0x4865,_0x1978e6=_0x290eda();while(!![]){try{const _0x4e449e=-parseInt(_0x31ae97(0x15e))/0x1+parseInt(_0x31ae97(0x157))/0x2*(-parseInt(_0x31ae97(0x14b))/0x3)+-parseInt(_0x31ae97(0x14a))/0x4*(parseInt(_0x31ae97(0x155))/0x5)+-parseInt(_0x31ae97(0x15c))/0x6*(parseInt(_0x31ae97(0x151))/0x7)+-parseInt(_0x31ae97(0x15b))/0x8+parseInt(_0x31ae97(0x14e))/0x9*(parseInt(_0x31ae97(0x16e))/0xa)+parseInt(_0x31ae97(0x161))/0xb;if(_0x4e449e===_0xc27609)break;else _0x1978e6['push'](_0x1978e6['shift']());}catch(_0x6ba854){_0x1978e6['push'](_0x1978e6['shift']());}}}(a63_0xd003,0xd8434));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';function a63_0x4865(_0xbd81fe,_0x4788b6){_0xbd81fe=_0xbd81fe-0x147;const _0xd00385=a63_0xd003();let _0x48651c=_0xd00385[_0xbd81fe];return _0x48651c;}import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x542cfd){const _0xa6c12=a63_0x4865,_0x1bb3df=_0x542cfd[_0xa6c12(0x169)]('key'),_0x19f184=_0x542cfd['str'](_0xa6c12(0x14c));if(!_0x1bb3df)throw CliErrors['validation'](_0xa6c12(0x14f),_0xa6c12(0x15a)+CLI_BIN_NAME+_0xa6c12(0x164));if(_0x19f184===undefined||_0x19f184==='')throw CliErrors[_0xa6c12(0x178)](_0xa6c12(0x163),_0xa6c12(0x15a)+CLI_BIN_NAME+_0xa6c12(0x164));let _0x2fb1f7=_0x1bb3df,_0x4f8457=_0x19f184;if(_0x19f184[_0xa6c12(0x16f)]>0x1f4)throw CliErrors[_0xa6c12(0x178)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(_0x1bb3df==='riskLevel')throw CliErrors[_0xa6c12(0x178)](_0xa6c12(0x16d));if(!isTopLevelConfigKey(_0x1bb3df))throw CliErrors[_0xa6c12(0x178)](_0xa6c12(0x168)+_0x1bb3df+_0xa6c12(0x173),_0xa6c12(0x14d)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x1bb3df]&&!CONFIG_ENUM_VALUES[_0x1bb3df][_0xa6c12(0x153)](_0x19f184))throw CliErrors[_0xa6c12(0x178)](_0xa6c12(0x149)+_0x1bb3df+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x1bb3df][_0xa6c12(0x152)](',\x20'));if(_0x1bb3df===_0xa6c12(0x159)&&!normalizeLocale(_0x19f184))throw CliErrors[_0xa6c12(0x178)](_0xa6c12(0x176),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');DOMAIN_CONFIG_FIELDS[_0xa6c12(0x153)](_0x1bb3df)&&(_0x4f8457=normalizeDomainOrigin(_0x1bb3df,_0x19f184));const _0x4d02d4={'global':_0x542cfd['bool'](_0xa6c12(0x177))},_0x29925b=resolveWriteScope(_0x4d02d4),_0x58e52e=readScopedConfig(_0x29925b);_0x1bb3df===_0xa6c12(0x16b)&&(_0x2fb1f7=_0xa6c12(0x150),delete _0x58e52e[_0xa6c12(0x16b)]);_0x1bb3df===_0xa6c12(0x159)&&(_0x4f8457=normalizeLocale(_0x19f184));if(_0x1bb3df===_0xa6c12(0x167)){_0x4f8457=normalizeEnv(_0x19f184);if(!isProduction(_0x4f8457)&&!isDaily(_0x4f8457))throw CliErrors[_0xa6c12(0x178)](_0xa6c12(0x174),_0xa6c12(0x16c));}if(_0x1bb3df===_0xa6c12(0x150)){const _0x102820=_0x58e52e[_0xa6c12(0x162)]&&typeof _0x58e52e[_0xa6c12(0x162)]===_0xa6c12(0x171)?Object[_0xa6c12(0x175)](_0x58e52e['apps']):[];if(_0x102820['length']>0x0)throw CliErrors[_0xa6c12(0x178)](_0xa6c12(0x156),_0xa6c12(0x148)+CLI_BIN_NAME+_0xa6c12(0x170)+_0x4f8457+_0xa6c12(0x15f)+CLI_BIN_NAME+_0xa6c12(0x15d));const _0x5c9d34=buildCanonicalProjectConfig({..._0x58e52e},{'appCodes':[_0x4f8457],'env':typeof _0x58e52e[_0xa6c12(0x167)]===_0xa6c12(0x166)?_0x58e52e[_0xa6c12(0x167)]:undefined});writeScopedConfig(_0x5c9d34,_0x29925b);const _0x3ede7a=_0x29925b===_0xa6c12(0x177)?_0xa6c12(0x154):_0xa6c12(0x172);return{'ok':!![],'message':'✓\x20'+_0x3ede7a+'\x20appcode\x20set\x20to:\x20'+_0x4f8457+_0xa6c12(0x179)};}_0x58e52e[_0x2fb1f7]=_0x4f8457,writeScopedConfig(_0x58e52e,_0x29925b);const _0x2232c8=_0x29925b===_0xa6c12(0x177)?'Global':_0xa6c12(0x172);return{'ok':!![],'message':'✓\x20'+_0x2232c8+'\x20'+_0x2fb1f7+'\x20set\x20to:\x20'+_0x4f8457};}function a63_0xd003(){const _0x308552=['str','Set\x20a\x20config\x20value','app','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','2843390ziYPtr','length','\x20workspace\x20add\x20<name>\x20--appcode\x20','object','Project','\x22\x20is\x20not\x20settable.','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','keys','Invalid\x20locale\x20value.','global','validation','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','key','Use\x20`','Invalid\x20value\x20for\x20\x22','728932EdEkgh','27cJsHCy','value','Settable\x20top-level\x20keys:\x20','45GfPuSN','Missing\x20key.','appcode','1426159hOkltu','join','includes','Global','30CiUzWz','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','3918ebFYmM','set','locale','Usage:\x20','943208vYttWp','42PqRKej','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','1226487ygsVZD','`,\x20`','Config\x20value','36802623UsTYyl','apps','Missing\x20value.','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','config','string','env','Top-level\x20key\x20\x22'];a63_0xd003=function(){return _0x308552;};return a63_0xd003();}export const configSetDefinition={'service':a63_0x32d59a(0x165),'command':a63_0x32d59a(0x158),'description':a63_0x32d59a(0x16a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a63_0x32d59a(0x147),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a63_0x32d59a(0x166),'description':a63_0x32d59a(0x160),'required':!![]},{'name':a63_0x32d59a(0x177),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x292362,_0x181b73){var _0xbc45f=a64_0x4f9d,_0xa9bbe9=_0x292362();while(!![]){try{var _0x1dd929=-parseInt(_0xbc45f(0x14a))/0x1*(-parseInt(_0xbc45f(0x145))/0x2)+parseInt(_0xbc45f(0x141))/0x3+parseInt(_0xbc45f(0x149))/0x4+parseInt(_0xbc45f(0x144))/0x5+-parseInt(_0xbc45f(0x140))/0x6+-parseInt(_0xbc45f(0x14d))/0x7+parseInt(_0xbc45f(0x142))/0x8*(-parseInt(_0xbc45f(0x147))/0x9);if(_0x1dd929===_0x181b73)break;else _0xa9bbe9['push'](_0xa9bbe9['shift']());}catch(_0x4cc763){_0xa9bbe9['push'](_0xa9bbe9['shift']());}}}(a64_0x1598,0xb4dbf));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a64_0x4f9d(_0x423904,_0x286271){_0x423904=_0x423904-0x140;var _0x1598ca=a64_0x1598();var _0x4f9df3=_0x1598ca[_0x423904];return _0x4f9df3;}import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x18f009){var _0x5bd07d=a64_0x4f9d;if(_0x18f009[_0x5bd07d(0x148)])return _0x5bd07d(0x148);if(!isInProject())throw CliErrors[_0x5bd07d(0x14b)](_0x5bd07d(0x14c),_0x5bd07d(0x146)+CLI_BIN_NAME+_0x5bd07d(0x143));return'project';}function a64_0x1598(){var _0x10158a=['Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','567MaiXKV','global','598736QSxQMH','280652bvGUSu','validation','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','364133nyXgZe','2720982RVyyWl','2891073zmsFFr','105416UFekXC','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','2008935iHmEVE','4uMncRe'];a64_0x1598=function(){return _0x10158a;};return a64_0x1598();}export function readScopedConfig(_0x11ec85){return readConfigFile(resolveWriteConfigPath(_0x11ec85));}export function writeScopedConfig(_0xf7522e,_0x271d57){writeConfigFile(resolveWriteConfigPath(_0x271d57),_0xf7522e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x4f5b8f=a65_0x2e94;(function(_0xe6a949,_0x3096b9){const _0x41a864=a65_0x2e94,_0x36c75c=_0xe6a949();while(!![]){try{const _0x259d2e=-parseInt(_0x41a864(0x1fc))/0x1+parseInt(_0x41a864(0x1aa))/0x2+-parseInt(_0x41a864(0x1bc))/0x3*(parseInt(_0x41a864(0x1bf))/0x4)+-parseInt(_0x41a864(0x1ac))/0x5*(-parseInt(_0x41a864(0x1e1))/0x6)+parseInt(_0x41a864(0x1f5))/0x7+parseInt(_0x41a864(0x1a1))/0x8*(parseInt(_0x41a864(0x191))/0x9)+-parseInt(_0x41a864(0x1bb))/0xa;if(_0x259d2e===_0x3096b9)break;else _0x36c75c['push'](_0x36c75c['shift']());}catch(_0x2228a1){_0x36c75c['push'](_0x36c75c['shift']());}}}(a65_0x2d22,0xd2a22));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x4f5b8f(0x1bd),a65_0x4f5b8f(0x1ed)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x4f5b8f(0x1cf),a65_0x4f5b8f(0x1c0),a65_0x4f5b8f(0x1d7),a65_0x4f5b8f(0x1ce),a65_0x4f5b8f(0x1a5),'MULTI_SELECT',a65_0x4f5b8f(0x1d1),a65_0x4f5b8f(0x198),a65_0x4f5b8f(0x1d5),a65_0x4f5b8f(0x1b9)]);export function isDatasetBatchDesign(_0x10528c){const _0x49419b=a65_0x4f5b8f;return isObject(_0x10528c)&&_0x10528c[_0x49419b(0x1a8)]===_0x49419b(0x190);}export function validateDatasetBatchDesign(_0x3d77c8){const _0x5e0812=a65_0x4f5b8f;(!isObject(_0x3d77c8)||_0x3d77c8['kind']!==_0x5e0812(0x190))&&fail(_0x5e0812(0x1ab));_0x3d77c8['schemaVersion']!==0x1&&fail(_0x5e0812(0x193));const _0x370e73=objectArray(_0x3d77c8[_0x5e0812(0x1a4)],_0x5e0812(0x1a4),0x1,0x14),_0x1a5afe=objectArray(_0x3d77c8[_0x5e0812(0x1a7)],_0x5e0812(0x1a7),0x0,0xc8),_0x3307a1=objectArray(_0x3d77c8[_0x5e0812(0x195)],_0x5e0812(0x195),0x0,0xc8),_0x1af27c=new Set(),_0x5c7042=new Map();for(const [_0x55bc44,_0x269412]of _0x370e73['entries']()){const _0x24e1f6=requiredString(_0x269412[_0x5e0812(0x1c7)],'datasets['+_0x55bc44+_0x5e0812(0x1c5));!LOCAL_KEY[_0x5e0812(0x1c8)](_0x24e1f6)&&fail(_0x5e0812(0x199)+_0x55bc44+_0x5e0812(0x19a)+LOCAL_KEY[_0x5e0812(0x1de)]+'.');_0x1af27c['has'](_0x24e1f6)&&fail(_0x5e0812(0x1d9));_0x1af27c[_0x5e0812(0x1da)](_0x24e1f6);!isObject(_0x269412[_0x5e0812(0x1dc)])&&fail(_0x5e0812(0x199)+_0x55bc44+_0x5e0812(0x1ca));rejectServerDatasetIdentity(_0x269412[_0x5e0812(0x1dc)],_0x5e0812(0x199)+_0x55bc44+_0x5e0812(0x1e5));if(!isObject(_0x269412['design'][_0x5e0812(0x1dd)]))fail(_0x5e0812(0x199)+_0x55bc44+_0x5e0812(0x1c4));rejectServerDatasetIdentity(_0x269412[_0x5e0812(0x1dc)][_0x5e0812(0x1dd)],_0x5e0812(0x199)+_0x55bc44+'].design.dataset'),requiredString(_0x269412[_0x5e0812(0x1dc)]['dataset'][_0x5e0812(0x19c)],'datasets['+_0x55bc44+_0x5e0812(0x1b6));'relations'in _0x269412['design']&&(!Array[_0x5e0812(0x1c3)](_0x269412[_0x5e0812(0x1dc)][_0x5e0812(0x1a7)])||_0x269412['design'][_0x5e0812(0x1a7)][_0x5e0812(0x197)]!==0x0)&&fail(_0x5e0812(0x199)+_0x55bc44+'].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.');const _0xd6038a=objectArray(_0x269412[_0x5e0812(0x1dc)][_0x5e0812(0x1e6)],_0x5e0812(0x199)+_0x55bc44+_0x5e0812(0x192),0x1,0xc8),_0x4f453b=new Map();for(const [_0x285ce1,_0x5c2f81]of _0xd6038a[_0x5e0812(0x1b7)]()){const _0x487aab=fieldName(_0x5c2f81);if(!_0x487aab)fail(_0x5e0812(0x199)+_0x55bc44+_0x5e0812(0x1e9)+_0x285ce1+']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.');const _0x3810d6=_0x487aab['toLowerCase']();if(_0x4f453b[_0x5e0812(0x1c6)](_0x3810d6))fail(_0x5e0812(0x1e8)+_0x24e1f6+_0x5e0812(0x1f1));const _0x460bd6=stringValue(_0x5c2f81['type']??_0x5c2f81[_0x5e0812(0x1eb)])['toUpperCase']();if(!SUPPORTED_FIELD_TYPES[_0x5e0812(0x1c6)](_0x460bd6))fail(_0x5e0812(0x199)+_0x55bc44+'].design.fields['+_0x285ce1+'].type\x20is\x20not\x20supported.');_0x4f453b[_0x5e0812(0x1cc)](_0x3810d6,_0x460bd6),[_0x5c2f81[_0x5e0812(0x1f8)],_0x5c2f81[_0x5e0812(0x1fa)],_0x5c2f81['refTableLabelField']][_0x5e0812(0x1ec)](_0x2dfb5d=>stringValue(_0x2dfb5d))&&fail('datasets['+_0x55bc44+_0x5e0812(0x1e9)+_0x285ce1+']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.');}_0x5c7042[_0x5e0812(0x1cc)](_0x24e1f6,_0x4f453b);}const _0x5608f9=new Set(),_0x22294e=new Set();for(const [_0x555fcb,_0x1ca0e1]of _0x1a5afe[_0x5e0812(0x1b7)]()){const _0x388e3d=validateRelation(_0x1ca0e1,_0x555fcb,_0x1af27c,_0x5c7042);if(_0x5608f9['has'](_0x388e3d))fail(_0x5e0812(0x1ad));_0x5608f9[_0x5e0812(0x1da)](_0x388e3d);const _0x582519=_0x388e3d[_0x5e0812(0x1e0)]('\x00',0x2)[_0x5e0812(0x1cd)]('\x00');if(_0x22294e[_0x5e0812(0x1c6)](_0x582519))fail(_0x5e0812(0x1fb));_0x22294e[_0x5e0812(0x1da)](_0x582519);}for(const [_0x43e467,_0x28eb28]of _0x3307a1[_0x5e0812(0x1b7)]()){requiredString(_0x28eb28[_0x5e0812(0x1b2)],_0x5e0812(0x1ba)+_0x43e467+_0x5e0812(0x1d3)),validateConfidence(_0x28eb28[_0x5e0812(0x18f)],_0x5e0812(0x1ba)+_0x43e467+_0x5e0812(0x1b3));}return _0x3d77c8;}export function reconcileBatchResult(_0x23812b){const _0x364f2a=a65_0x4f5b8f;if(!isObject(_0x23812b))return null;try{const _0x2dee03=stringArray(_0x23812b[_0x364f2a(0x19f)],_0x364f2a(0x19f),0x1,0x14),_0x3a9576=new Set(_0x2dee03);if(_0x3a9576[_0x364f2a(0x1d2)]!==_0x2dee03[_0x364f2a(0x197)]||_0x2dee03[_0x364f2a(0x1ec)](_0x10af9d=>!LOCAL_KEY[_0x364f2a(0x1c8)](_0x10af9d)))return null;const _0x41d754=objectArray(_0x23812b[_0x364f2a(0x1b8)],_0x364f2a(0x1b8),0x1,0x14),_0x3a6260=new Map(),_0x24a3cd=new Set();for(const _0x5597d7 of _0x41d754){const _0x3e1912=requiredString(_0x5597d7['localKey'],_0x364f2a(0x1ea)),_0x3b7ac7=requiredString(_0x5597d7['code']??_0x5597d7[_0x364f2a(0x1f2)],_0x364f2a(0x1f4));if(_0x3a6260[_0x364f2a(0x1c6)](_0x3e1912)||_0x24a3cd[_0x364f2a(0x1c6)](_0x3b7ac7))return null;_0x3a6260['set'](_0x3e1912,_0x3b7ac7),_0x24a3cd[_0x364f2a(0x1da)](_0x3b7ac7);}if(!sameSet(_0x3a9576,new Set(_0x3a6260[_0x364f2a(0x1ef)]())))return null;const _0x419ec7=objectArray(_0x23812b[_0x364f2a(0x1ee)],_0x364f2a(0x1ee),0x0,0xc8),_0x1d4fd3=objectArray(_0x23812b[_0x364f2a(0x1b5)],_0x364f2a(0x1b5),0x0,0xc8),_0x39fa45=relationTupleSet(_0x419ec7,![],_0x3a6260),_0x3ddac4=relationTupleSet(_0x1d4fd3,!![],_0x3a6260);if(!_0x39fa45||!_0x3ddac4||!sameSet(_0x39fa45,_0x3ddac4))return null;const _0x37d438=objectArray(_0x23812b['unresolvedRelations'],_0x364f2a(0x195),0x0,0xc8);return{'expectedLocalKeys':_0x2dee03,'expectedRelations':_0x419ec7,'createdDatasets':_0x41d754,'createdRelations':_0x1d4fd3,'unresolvedRelations':_0x37d438,...isObject(_0x23812b[_0x364f2a(0x19b)])?{'metrics':_0x23812b[_0x364f2a(0x19b)]}:{}};}catch{return null;}}function validateRelation(_0x49c42f,_0x22ccff,_0x1386f2,_0x3c34b8){const _0x534417=a65_0x4f5b8f,_0x1d6882='relations['+_0x22ccff+']',_0x2bdc1f=requiredString(_0x49c42f['fromDatasetKey'],_0x1d6882+'.fromDatasetKey'),_0x4b710a=requiredString(_0x49c42f[_0x534417(0x1a3)],_0x1d6882+_0x534417(0x1fd)),_0x556138=requiredString(_0x49c42f['fromField'],_0x1d6882+'.fromField')['toLowerCase'](),_0xb07bcf=requiredString(_0x49c42f[_0x534417(0x1df)],_0x1d6882+_0x534417(0x1f3))['toLowerCase']();if(!_0x1386f2[_0x534417(0x1c6)](_0x2bdc1f)||!_0x1386f2['has'](_0x4b710a))fail(_0x1d6882+_0x534417(0x19e));const _0x1ed96e=_0x3c34b8[_0x534417(0x1d0)](_0x2bdc1f)?.[_0x534417(0x1d0)](_0x556138),_0xa6227c=_0x3c34b8[_0x534417(0x1d0)](_0x4b710a)?.[_0x534417(0x1d0)](_0xb07bcf);if(_0x1ed96e===undefined||_0xa6227c===undefined)fail(_0x1d6882+'\x20references\x20an\x20unknown\x20field.');if(_0x1ed96e&&_0xa6227c&&_0x1ed96e!==_0xa6227c)fail(_0x1d6882+_0x534417(0x1be));const _0x489d61=stringValue(_0x49c42f[_0x534417(0x1a9)])||'lookup';if(_0x489d61!==_0x534417(0x1e7))fail(_0x1d6882+_0x534417(0x1d8));const _0x406bc9=stringValue(_0x49c42f[_0x534417(0x1a0)])||_0x534417(0x1bd);if(!SUPPORTED_CARDINALITIES[_0x534417(0x1c6)](_0x406bc9))fail(_0x1d6882+_0x534417(0x194));return requiredString(_0x49c42f[_0x534417(0x1b2)],_0x1d6882+_0x534417(0x1b4)),validateConfidence(_0x49c42f['confidence'],_0x1d6882+_0x534417(0x1c9)),tuple(_0x2bdc1f,_0x556138,_0x4b710a,_0xb07bcf,'lookup',_0x406bc9);}function relationTupleSet(_0x13d41e,_0x2ddf82,_0x4f480a){const _0x57a891=a65_0x4f5b8f,_0x27d741=new Set();for(const _0x8dd25d of _0x13d41e){const _0xc064a2=stringValue(_0x8dd25d[_0x57a891(0x1e2)]),_0x56947c=stringValue(_0x8dd25d[_0x57a891(0x1a3)]),_0x1c06e=stringValue(_0x8dd25d[_0x57a891(0x1af)])[_0x57a891(0x1b0)](),_0x594998=stringValue(_0x8dd25d[_0x57a891(0x1df)])[_0x57a891(0x1b0)](),_0x156f23=stringValue(_0x8dd25d[_0x57a891(0x1a9)]),_0x19e1c5=stringValue(_0x8dd25d['cardinality']);if(!_0xc064a2||!_0x56947c||!_0x1c06e||!_0x594998||_0x156f23!==_0x57a891(0x1e7)||!SUPPORTED_CARDINALITIES['has'](_0x19e1c5))return null;if(!_0x4f480a['has'](_0xc064a2)||!_0x4f480a['has'](_0x56947c))return null;if(_0x2ddf82&&(stringValue(_0x8dd25d['fromDatasetCode'])!==_0x4f480a['get'](_0xc064a2)||stringValue(_0x8dd25d[_0x57a891(0x1d4)])!==_0x4f480a[_0x57a891(0x1d0)](_0x56947c)))return null;const _0x14d54b=tuple(_0xc064a2,_0x1c06e,_0x56947c,_0x594998,_0x156f23,_0x19e1c5);if(_0x27d741['has'](_0x14d54b))return null;_0x27d741['add'](_0x14d54b);}return _0x27d741;}function rejectServerDatasetIdentity(_0x416c3f,_0x2ec1a7){const _0x21cbff=a65_0x4f5b8f;for(const _0x296922 of['id',_0x21cbff(0x1c1),'modelId',_0x21cbff(0x196),_0x21cbff(0x1f2),_0x21cbff(0x1e4)]){if(_0x416c3f[_0x296922]!==undefined&&_0x416c3f[_0x296922]!==null&&_0x416c3f[_0x296922]!=='')fail(_0x2ec1a7+'.'+_0x296922+_0x21cbff(0x1c2));}}function objectArray(_0x1bd7e6,_0x48fb80,_0x253d08,_0x2b15f3){const _0x574e82=a65_0x4f5b8f;return(!Array[_0x574e82(0x1c3)](_0x1bd7e6)||_0x1bd7e6[_0x574e82(0x197)]<_0x253d08||_0x1bd7e6[_0x574e82(0x197)]>_0x2b15f3||_0x1bd7e6['some'](_0x2e6cb2=>!isObject(_0x2e6cb2)))&&fail(_0x48fb80+_0x574e82(0x1db)+_0x253d08+'..'+_0x2b15f3+_0x574e82(0x1d6)),_0x1bd7e6;}function stringArray(_0x6c3e6d,_0x1343b2,_0x5e81c7,_0x1c0633){const _0x276941=a65_0x4f5b8f;return(!Array[_0x276941(0x1c3)](_0x6c3e6d)||_0x6c3e6d[_0x276941(0x197)]<_0x5e81c7||_0x6c3e6d[_0x276941(0x197)]>_0x1c0633||_0x6c3e6d[_0x276941(0x1ec)](_0x4743c3=>typeof _0x4743c3!==_0x276941(0x19d)||!_0x4743c3[_0x276941(0x1a2)]()))&&fail(_0x1343b2+_0x276941(0x1db)+_0x5e81c7+'..'+_0x1c0633+_0x276941(0x1f7)),_0x6c3e6d;}function requiredString(_0x45891e,_0x2611d5){const _0x406274=a65_0x4f5b8f,_0x3918e4=stringValue(_0x45891e);if(!_0x3918e4)fail(_0x2611d5+_0x406274(0x1f6));return _0x3918e4;}function stringValue(_0x4b7cc4){const _0x566ba6=a65_0x4f5b8f;return typeof _0x4b7cc4===_0x566ba6(0x19d)?_0x4b7cc4[_0x566ba6(0x1a2)]():'';}function a65_0x2e94(_0x24e48c,_0x41bc77){_0x24e48c=_0x24e48c-0x18f;const _0x2d2245=a65_0x2d22();let _0x2e941c=_0x2d2245[_0x24e48c];return _0x2e941c;}function fieldName(_0x476731){const _0x586c3d=a65_0x4f5b8f;return stringValue(_0x476731[_0x586c3d(0x196)]??_0x476731[_0x586c3d(0x1f0)]??_0x476731[_0x586c3d(0x1a6)]??_0x476731[_0x586c3d(0x1ae)]);}function a65_0x2d22(){const _0x199863=['fieldCode','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','datasetCode','.toField','createdDatasets[].code','2121280UYtvPy','\x20is\x20required.','\x20non-empty\x20strings.','refTable','map','refTableField','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','911688uWjvvF','.toDatasetKey','confidence','dataset-batch','2060109XOkNGW','].design.fields','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','.cardinality\x20is\x20not\x20supported.','unresolvedRelations','code','length','USER','datasets[','].localKey\x20must\x20match\x20','metrics','datasetName','string','\x20references\x20an\x20unknown\x20dataset\x20localKey.','expectedLocalKeys','cardinality','8qmOBZo','trim','toDatasetKey','datasets','SELECT','name','relations','kind','relationType','2335078IJdyXJ','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','193940idqVan','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','fieldName','fromField','toLowerCase','isFinite','reason','].confidence','.reason','createdRelations','].design.dataset.datasetName','entries','createdDatasets','UPLOAD','unresolvedRelations[','8642970HBroyX','243vTzcAT','MANY_TO_ONE','\x20connects\x20incompatible\x20field\x20types.','12996FBUtnQ','NUMBER','datasetId','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','isArray','].design.dataset\x20must\x20be\x20an\x20object.','].localKey','has','localKey','test','.confidence','].design\x20must\x20be\x20an\x20object.','object','set','join','BOOLEAN','TEXT','get','DATE_RANGE','size','].reason','toDatasetCode','ADDRESS','\x20objects.','DATETIME','.relationType\x20must\x20be\x20\x22lookup\x22.','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','add','\x20must\x20contain\x20','design','dataset','source','toField','split','186evUCzO','fromDatasetKey','\x20must\x20be\x20between\x200\x20and\x201.','modelCode','].design','fields','lookup','Dataset\x20','].design.fields[','createdDatasets[].localKey','fieldType','some','ONE_TO_ONE','expectedRelations','keys'];a65_0x2d22=function(){return _0x199863;};return a65_0x2d22();}function validateConfidence(_0x2827b6,_0x5a291e){const _0x93df00=a65_0x4f5b8f;_0x2827b6!==undefined&&_0x2827b6!==null&&(typeof _0x2827b6!=='number'||!Number[_0x93df00(0x1b1)](_0x2827b6)||_0x2827b6<0x0||_0x2827b6>0x1)&&fail(_0x5a291e+_0x93df00(0x1e3));}function tuple(..._0x4dfa46){const _0x3c8c56=a65_0x4f5b8f;return _0x4dfa46[_0x3c8c56(0x1f9)]((_0xfaf771,_0x21a18d)=>_0x21a18d===0x1||_0x21a18d===0x3?_0xfaf771['toLowerCase']():_0xfaf771)['join']('\x00');}function sameSet(_0x26774f,_0x8bed32){const _0x573802=a65_0x4f5b8f;return _0x26774f[_0x573802(0x1d2)]===_0x8bed32[_0x573802(0x1d2)]&&[..._0x26774f]['every'](_0x4d026f=>_0x8bed32[_0x573802(0x1c6)](_0x4d026f));}function isObject(_0x5f1fad){const _0x471a0b=a65_0x4f5b8f;return typeof _0x5f1fad===_0x471a0b(0x1cb)&&_0x5f1fad!==null&&!Array[_0x471a0b(0x1c3)](_0x5f1fad);}function fail(_0x22cdc0){throw CliErrors['validation'](_0x22cdc0);}
|
|
1
|
+
const a65_0x158720=a65_0x5d2e;(function(_0xe7ce1f,_0x1466a0){const _0x56ecba=a65_0x5d2e,_0x1c9fd5=_0xe7ce1f();while(!![]){try{const _0x28e7f1=-parseInt(_0x56ecba(0x9e))/0x1*(parseInt(_0x56ecba(0x100))/0x2)+-parseInt(_0x56ecba(0xc5))/0x3*(-parseInt(_0x56ecba(0xef))/0x4)+parseInt(_0x56ecba(0xba))/0x5*(-parseInt(_0x56ecba(0xc1))/0x6)+parseInt(_0x56ecba(0xdb))/0x7+parseInt(_0x56ecba(0xd6))/0x8+parseInt(_0x56ecba(0xc4))/0x9*(parseInt(_0x56ecba(0xc8))/0xa)+-parseInt(_0x56ecba(0xd1))/0xb;if(_0x28e7f1===_0x1466a0)break;else _0x1c9fd5['push'](_0x1c9fd5['shift']());}catch(_0x22af17){_0x1c9fd5['push'](_0x1c9fd5['shift']());}}}(a65_0x2138,0xcd7e1));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x158720(0xad),'ONE_TO_ONE']),SUPPORTED_FIELD_TYPES=new Set(['TEXT',a65_0x158720(0xfa),a65_0x158720(0xd0),'BOOLEAN',a65_0x158720(0x9f),'MULTI_SELECT',a65_0x158720(0xb4),a65_0x158720(0xd8),a65_0x158720(0x9b),a65_0x158720(0xf2)]);export function isDatasetBatchDesign(_0x1dca79){const _0x6b917d=a65_0x158720;return isObject(_0x1dca79)&&_0x1dca79[_0x6b917d(0xe6)]===_0x6b917d(0xac);}export function validateDatasetBatchDesign(_0x3f3f8a){const _0x270c52=a65_0x158720;(!isObject(_0x3f3f8a)||_0x3f3f8a['kind']!=='dataset-batch')&&fail('Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.');_0x3f3f8a['schemaVersion']!==0x1&&fail(_0x270c52(0xed));const _0x174429=objectArray(_0x3f3f8a[_0x270c52(0xeb)],'datasets',0x1,0x14),_0x2a53c0=objectArray(_0x3f3f8a[_0x270c52(0xb2)],_0x270c52(0xb2),0x0,0xc8),_0x33fd35=objectArray(_0x3f3f8a[_0x270c52(0xe2)],_0x270c52(0xe2),0x0,0xc8),_0x1033e2=new Set(),_0x4e840f=new Map();for(const [_0x3dc9f7,_0x55fbb9]of _0x174429[_0x270c52(0xf4)]()){const _0x41923e=requiredString(_0x55fbb9[_0x270c52(0xcd)],_0x270c52(0xb3)+_0x3dc9f7+_0x270c52(0xfd));!LOCAL_KEY[_0x270c52(0x106)](_0x41923e)&&fail('datasets['+_0x3dc9f7+'].localKey\x20must\x20match\x20'+LOCAL_KEY[_0x270c52(0xab)]+'.');_0x1033e2[_0x270c52(0xda)](_0x41923e)&&fail(_0x270c52(0xe3));_0x1033e2[_0x270c52(0xc9)](_0x41923e);!isObject(_0x55fbb9[_0x270c52(0xfc)])&&fail(_0x270c52(0xb3)+_0x3dc9f7+_0x270c52(0xe7));rejectServerDatasetIdentity(_0x55fbb9[_0x270c52(0xfc)],_0x270c52(0xb3)+_0x3dc9f7+_0x270c52(0xee));if(!isObject(_0x55fbb9['design']['dataset']))fail(_0x270c52(0xb3)+_0x3dc9f7+_0x270c52(0x107));rejectServerDatasetIdentity(_0x55fbb9[_0x270c52(0xfc)][_0x270c52(0xea)],'datasets['+_0x3dc9f7+_0x270c52(0xe0)),requiredString(_0x55fbb9[_0x270c52(0xfc)][_0x270c52(0xea)]['datasetName'],_0x270c52(0xb3)+_0x3dc9f7+'].design.dataset.datasetName');_0x270c52(0xb2)in _0x55fbb9[_0x270c52(0xfc)]&&(!Array[_0x270c52(0xbe)](_0x55fbb9[_0x270c52(0xfc)]['relations'])||_0x55fbb9[_0x270c52(0xfc)][_0x270c52(0xb2)][_0x270c52(0xb1)]!==0x0)&&fail(_0x270c52(0xb3)+_0x3dc9f7+_0x270c52(0xe9));const _0x3ce8ca=objectArray(_0x55fbb9[_0x270c52(0xfc)][_0x270c52(0xbf)],'datasets['+_0x3dc9f7+_0x270c52(0xa0),0x1,0xc8),_0x3a070b=new Map();for(const [_0x2861f5,_0x28daf4]of _0x3ce8ca[_0x270c52(0xf4)]()){const _0xf87a33=fieldName(_0x28daf4);if(!_0xf87a33)fail(_0x270c52(0xb3)+_0x3dc9f7+_0x270c52(0xa2)+_0x2861f5+_0x270c52(0xca));const _0x3ab914=_0xf87a33[_0x270c52(0xcf)]();if(_0x3a070b[_0x270c52(0xda)](_0x3ab914))fail(_0x270c52(0xd9)+_0x41923e+_0x270c52(0x9a));const _0x420242=stringValue(_0x28daf4[_0x270c52(0xb5)]??_0x28daf4[_0x270c52(0xaa)])[_0x270c52(0xd2)]();if(!SUPPORTED_FIELD_TYPES[_0x270c52(0xda)](_0x420242))fail(_0x270c52(0xb3)+_0x3dc9f7+_0x270c52(0xa2)+_0x2861f5+_0x270c52(0xbd));_0x3a070b[_0x270c52(0xa7)](_0x3ab914,_0x420242),[_0x28daf4[_0x270c52(0xc3)],_0x28daf4[_0x270c52(0xa1)],_0x28daf4[_0x270c52(0xf3)]][_0x270c52(0xb6)](_0xf5ca84=>stringValue(_0xf5ca84))&&fail('datasets['+_0x3dc9f7+'].design.fields['+_0x2861f5+_0x270c52(0xae));}_0x4e840f['set'](_0x41923e,_0x3a070b);}const _0x1c9a91=new Set(),_0x20e42e=new Set();for(const [_0x751e26,_0xfd342e]of _0x2a53c0[_0x270c52(0xf4)]()){const _0x2ed609=validateRelation(_0xfd342e,_0x751e26,_0x1033e2,_0x4e840f);if(_0x1c9a91['has'](_0x2ed609))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0x1c9a91[_0x270c52(0xc9)](_0x2ed609);const _0x234dbd=_0x2ed609[_0x270c52(0x101)]('\x00',0x2)[_0x270c52(0xcc)]('\x00');if(_0x20e42e[_0x270c52(0xda)](_0x234dbd))fail(_0x270c52(0xff));_0x20e42e['add'](_0x234dbd);}for(const [_0x559de5,_0x4dfc86]of _0x33fd35[_0x270c52(0xf4)]()){requiredString(_0x4dfc86['reason'],_0x270c52(0xb8)+_0x559de5+_0x270c52(0xc6)),validateConfidence(_0x4dfc86['confidence'],'unresolvedRelations['+_0x559de5+_0x270c52(0xd4));}return _0x3f3f8a;}export function reconcileBatchResult(_0x5e11c9){const _0x10bcaf=a65_0x158720;if(!isObject(_0x5e11c9))return null;try{const _0xc42609=stringArray(_0x5e11c9['expectedLocalKeys'],_0x10bcaf(0xbb),0x1,0x14),_0x2b6c93=new Set(_0xc42609);if(_0x2b6c93[_0x10bcaf(0xc2)]!==_0xc42609['length']||_0xc42609[_0x10bcaf(0xb6)](_0x47cdb8=>!LOCAL_KEY[_0x10bcaf(0x106)](_0x47cdb8)))return null;const _0x4a6590=objectArray(_0x5e11c9[_0x10bcaf(0xce)],_0x10bcaf(0xce),0x1,0x14),_0x377c44=new Map(),_0x5ce1de=new Set();for(const _0x242907 of _0x4a6590){const _0x3f467c=requiredString(_0x242907[_0x10bcaf(0xcd)],_0x10bcaf(0xf9)),_0x426ec0=requiredString(_0x242907['code']??_0x242907['datasetCode'],_0x10bcaf(0xf0));if(_0x377c44[_0x10bcaf(0xda)](_0x3f467c)||_0x5ce1de[_0x10bcaf(0xda)](_0x426ec0))return null;_0x377c44[_0x10bcaf(0xa7)](_0x3f467c,_0x426ec0),_0x5ce1de['add'](_0x426ec0);}if(!sameSet(_0x2b6c93,new Set(_0x377c44[_0x10bcaf(0x104)]())))return null;const _0x1d6d81=objectArray(_0x5e11c9[_0x10bcaf(0xd3)],'expectedRelations',0x0,0xc8),_0x29ad11=objectArray(_0x5e11c9['createdRelations'],_0x10bcaf(0xa9),0x0,0xc8),_0x56f3ad=relationTupleSet(_0x1d6d81,![],_0x377c44),_0x12dbdd=relationTupleSet(_0x29ad11,!![],_0x377c44);if(!_0x56f3ad||!_0x12dbdd||!sameSet(_0x56f3ad,_0x12dbdd))return null;const _0x1d12e2=objectArray(_0x5e11c9[_0x10bcaf(0xe2)],_0x10bcaf(0xe2),0x0,0xc8);return{'expectedLocalKeys':_0xc42609,'expectedRelations':_0x1d6d81,'createdDatasets':_0x4a6590,'createdRelations':_0x29ad11,'unresolvedRelations':_0x1d12e2,...isObject(_0x5e11c9[_0x10bcaf(0xb0)])?{'metrics':_0x5e11c9[_0x10bcaf(0xb0)]}:{}};}catch{return null;}}function validateRelation(_0x1a7208,_0x25bdae,_0x115845,_0x591698){const _0x19bb28=a65_0x158720,_0x3b871c='relations['+_0x25bdae+']',_0x3ba2bb=requiredString(_0x1a7208[_0x19bb28(0xd5)],_0x3b871c+'.fromDatasetKey'),_0x118b3a=requiredString(_0x1a7208[_0x19bb28(0xa8)],_0x3b871c+_0x19bb28(0xa4)),_0x48e7c2=requiredString(_0x1a7208[_0x19bb28(0xc0)],_0x3b871c+_0x19bb28(0xd7))[_0x19bb28(0xcf)](),_0x57e220=requiredString(_0x1a7208[_0x19bb28(0xe8)],_0x3b871c+'.toField')['toLowerCase']();if(!_0x115845[_0x19bb28(0xda)](_0x3ba2bb)||!_0x115845[_0x19bb28(0xda)](_0x118b3a))fail(_0x3b871c+_0x19bb28(0xa5));const _0x483f9a=_0x591698['get'](_0x3ba2bb)?.[_0x19bb28(0xf5)](_0x48e7c2),_0x4baab7=_0x591698['get'](_0x118b3a)?.[_0x19bb28(0xf5)](_0x57e220);if(_0x483f9a===undefined||_0x4baab7===undefined)fail(_0x3b871c+_0x19bb28(0xdf));if(_0x483f9a&&_0x4baab7&&_0x483f9a!==_0x4baab7)fail(_0x3b871c+'\x20connects\x20incompatible\x20field\x20types.');const _0x25f854=stringValue(_0x1a7208[_0x19bb28(0xdc)])||'lookup';if(_0x25f854!==_0x19bb28(0x9d))fail(_0x3b871c+_0x19bb28(0x102));const _0x1d07ec=stringValue(_0x1a7208[_0x19bb28(0xec)])||_0x19bb28(0xad);if(!SUPPORTED_CARDINALITIES[_0x19bb28(0xda)](_0x1d07ec))fail(_0x3b871c+_0x19bb28(0xcb));return requiredString(_0x1a7208[_0x19bb28(0xb7)],_0x3b871c+_0x19bb28(0xc7)),validateConfidence(_0x1a7208[_0x19bb28(0xe5)],_0x3b871c+'.confidence'),tuple(_0x3ba2bb,_0x48e7c2,_0x118b3a,_0x57e220,_0x19bb28(0x9d),_0x1d07ec);}function relationTupleSet(_0x3fcbd1,_0x181356,_0x3c4f41){const _0x564045=a65_0x158720,_0x1bffa3=new Set();for(const _0x5c8ca2 of _0x3fcbd1){const _0x30fcd7=stringValue(_0x5c8ca2[_0x564045(0xd5)]),_0x55c89d=stringValue(_0x5c8ca2[_0x564045(0xa8)]),_0xb13a4f=stringValue(_0x5c8ca2[_0x564045(0xc0)])['toLowerCase'](),_0x1f9dcf=stringValue(_0x5c8ca2['toField'])['toLowerCase'](),_0x1e6867=stringValue(_0x5c8ca2[_0x564045(0xdc)]),_0x46de52=stringValue(_0x5c8ca2[_0x564045(0xec)]);if(!_0x30fcd7||!_0x55c89d||!_0xb13a4f||!_0x1f9dcf||_0x1e6867!==_0x564045(0x9d)||!SUPPORTED_CARDINALITIES[_0x564045(0xda)](_0x46de52))return null;if(!_0x3c4f41[_0x564045(0xda)](_0x30fcd7)||!_0x3c4f41[_0x564045(0xda)](_0x55c89d))return null;if(_0x181356&&(stringValue(_0x5c8ca2[_0x564045(0x9c)])!==_0x3c4f41[_0x564045(0xf5)](_0x30fcd7)||stringValue(_0x5c8ca2[_0x564045(0xf6)])!==_0x3c4f41[_0x564045(0xf5)](_0x55c89d)))return null;const _0x392f82=tuple(_0x30fcd7,_0xb13a4f,_0x55c89d,_0x1f9dcf,_0x1e6867,_0x46de52);if(_0x1bffa3[_0x564045(0xda)](_0x392f82))return null;_0x1bffa3[_0x564045(0xc9)](_0x392f82);}return _0x1bffa3;}function rejectServerDatasetIdentity(_0x471639,_0xe67f2c){const _0x59c80d=a65_0x158720;for(const _0x31a11a of['id',_0x59c80d(0xfe),_0x59c80d(0xb9),'code',_0x59c80d(0xfb),'modelCode']){if(_0x471639[_0x31a11a]!==undefined&&_0x471639[_0x31a11a]!==null&&_0x471639[_0x31a11a]!=='')fail(_0xe67f2c+'.'+_0x31a11a+_0x59c80d(0xde));}}function objectArray(_0x4c54bd,_0x3168f7,_0xf44cfd,_0x4e640f){const _0x15e945=a65_0x158720;return(!Array['isArray'](_0x4c54bd)||_0x4c54bd[_0x15e945(0xb1)]<_0xf44cfd||_0x4c54bd[_0x15e945(0xb1)]>_0x4e640f||_0x4c54bd['some'](_0x2abec5=>!isObject(_0x2abec5)))&&fail(_0x3168f7+_0x15e945(0xe4)+_0xf44cfd+'..'+_0x4e640f+'\x20objects.'),_0x4c54bd;}function stringArray(_0x886901,_0x4dfc14,_0x2cff0b,_0x424e35){const _0x4c9674=a65_0x158720;return(!Array[_0x4c9674(0xbe)](_0x886901)||_0x886901['length']<_0x2cff0b||_0x886901[_0x4c9674(0xb1)]>_0x424e35||_0x886901[_0x4c9674(0xb6)](_0x452f1a=>typeof _0x452f1a!==_0x4c9674(0xe1)||!_0x452f1a[_0x4c9674(0x103)]()))&&fail(_0x4dfc14+_0x4c9674(0xe4)+_0x2cff0b+'..'+_0x424e35+_0x4c9674(0xf7)),_0x886901;}function requiredString(_0x42ae83,_0x393c1b){const _0x92dfd5=stringValue(_0x42ae83);if(!_0x92dfd5)fail(_0x393c1b+'\x20is\x20required.');return _0x92dfd5;}function stringValue(_0x44fd07){const _0x399fbd=a65_0x158720;return typeof _0x44fd07===_0x399fbd(0xe1)?_0x44fd07[_0x399fbd(0x103)]():'';}function fieldName(_0x3a0c73){const _0x47dcc2=a65_0x158720;return stringValue(_0x3a0c73[_0x47dcc2(0xaf)]??_0x3a0c73[_0x47dcc2(0xdd)]??_0x3a0c73[_0x47dcc2(0xf1)]??_0x3a0c73[_0x47dcc2(0xf8)]);}function a65_0x5d2e(_0x3fca7b,_0x1faffa){_0x3fca7b=_0x3fca7b-0x9a;const _0x213862=a65_0x2138();let _0x5d2ecf=_0x213862[_0x3fca7b];return _0x5d2ecf;}function validateConfidence(_0x3d1663,_0x21b2c4){const _0x21ab9d=a65_0x158720;_0x3d1663!==undefined&&_0x3d1663!==null&&(typeof _0x3d1663!==_0x21ab9d(0x105)||!Number['isFinite'](_0x3d1663)||_0x3d1663<0x0||_0x3d1663>0x1)&&fail(_0x21b2c4+'\x20must\x20be\x20between\x200\x20and\x201.');}function tuple(..._0x3d5e2e){const _0x527ce6=a65_0x158720;return _0x3d5e2e[_0x527ce6(0xbc)]((_0x298df7,_0x189916)=>_0x189916===0x1||_0x189916===0x3?_0x298df7[_0x527ce6(0xcf)]():_0x298df7)['join']('\x00');}function a65_0x2138(){const _0x2727d8=['number','test','].design.dataset\x20must\x20be\x20an\x20object.','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','ADDRESS','fromDatasetCode','lookup','3MEaMkU','SELECT','].design.fields','refTableField','].design.fields[','validation','.toDatasetKey','\x20references\x20an\x20unknown\x20dataset\x20localKey.','every','set','toDatasetKey','createdRelations','fieldType','source','dataset-batch','MANY_TO_ONE',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','code','metrics','length','relations','datasets[','DATE_RANGE','type','some','reason','unresolvedRelations[','modelId','5615nvFEnh','expectedLocalKeys','map','].type\x20is\x20not\x20supported.','isArray','fields','fromField','798JcOVbz','size','refTable','112086ORXfFk','1205727xCFaEO','].reason','.reason','170woPGKL','add',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','.cardinality\x20is\x20not\x20supported.','join','localKey','createdDatasets','toLowerCase','DATETIME','25777004aviGFu','toUpperCase','expectedRelations','].confidence','fromDatasetKey','6421104xrCeTW','.fromField','USER','Dataset\x20','has','7304472FjMdyI','relationType','fieldCode','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','\x20references\x20an\x20unknown\x20field.','].design.dataset','string','unresolvedRelations','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','\x20must\x20contain\x20','confidence','kind','].design\x20must\x20be\x20an\x20object.','toField','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','dataset','datasets','cardinality','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','].design','16PVPmlm','createdDatasets[].code','name','UPLOAD','refTableLabelField','entries','get','toDatasetCode','\x20non-empty\x20strings.','fieldName','createdDatasets[].localKey','NUMBER','datasetCode','design','].localKey','datasetId','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','220712UMbcjN','split','.relationType\x20must\x20be\x20\x22lookup\x22.','trim','keys'];a65_0x2138=function(){return _0x2727d8;};return a65_0x2138();}function sameSet(_0x30ad3c,_0xca23f1){const _0x495357=a65_0x158720;return _0x30ad3c[_0x495357(0xc2)]===_0xca23f1[_0x495357(0xc2)]&&[..._0x30ad3c][_0x495357(0xa6)](_0x391a48=>_0xca23f1[_0x495357(0xda)](_0x391a48));}function isObject(_0x12c0e7){const _0x458e5=a65_0x158720;return typeof _0x12c0e7==='object'&&_0x12c0e7!==null&&!Array[_0x458e5(0xbe)](_0x12c0e7);}function fail(_0x404de4){const _0x44927e=a65_0x158720;throw CliErrors[_0x44927e(0xa3)](_0x404de4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a66_0x3443e7=a66_0x2e67;(function(_0x5ba4f8,_0x4e0134){const _0x394382=a66_0x2e67,_0x1ec958=_0x5ba4f8();while(!![]){try{const _0x3e6f6c=-parseInt(_0x394382(0x1f9))/0x1*(-parseInt(_0x394382(0x230))/0x2)+-parseInt(_0x394382(0x234))/0x3*(parseInt(_0x394382(0x227))/0x4)+-parseInt(_0x394382(0x22d))/0x5+-parseInt(_0x394382(0x1fd))/0x6+-parseInt(_0x394382(0x231))/0x7*(-parseInt(_0x394382(0x1f7))/0x8)+-parseInt(_0x394382(0x233))/0x9+parseInt(_0x394382(0x212))/0xa*(parseInt(_0x394382(0x1f2))/0xb);if(_0x3e6f6c===_0x4e0134)break;else _0x1ec958['push'](_0x1ec958['shift']());}catch(_0x161656){_0x1ec958['push'](_0x1ec958['shift']());}}}(a66_0x3d81,0xd1447));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_0x3443e7(0x208),METADATA_BACKEND_PATH=a66_0x3443e7(0x21c),UNGROUPED_BUSINESS_GROUP=a66_0x3443e7(0x1f8);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x1edfbc,input:_0x24bd35,dryRun:_0x3cf8a4}){const _0x11423a=a66_0x3443e7;validateInput(_0x24bd35);const _0x318b9b=normalizeBusinessGroupArgument(_0x24bd35[_0x11423a(0x1f6)]),_0x3bffb0=await getDatasetDetail(_0x24bd35[_0x11423a(0x202)]),_0x4d3aa3=resolveBusinessGroupDataset(_0x3bffb0,_0x24bd35['code']);assertBusinessGroupUpdateSupported(_0x4d3aa3,_0x318b9b);const _0x7440f3=loadCurrentBusinessGroup(_0x3bffb0,_0x4d3aa3);assertExpectedBusinessGroup(_0x7440f3,_0x24bd35[_0x11423a(0x1f0)]);const _0x67dcbc=buildBackendPlan(_0x1edfbc,_0x4d3aa3,_0x318b9b),_0x3945e5=_0x7440f3!==_0x318b9b;let _0x153768;if(_0x3945e5&&!_0x3cf8a4){_0x67dcbc[_0x11423a(0x229)]===_0x11423a(0x200)?await updateDbTableBusinessGroup(_0x67dcbc[_0x11423a(0x21d)]):await updateErBusinessGroup(_0x67dcbc[_0x11423a(0x21d)]);const _0x5ef8a8=await getDatasetDetail(_0x4d3aa3[_0x11423a(0x202)]),_0xcbc83c=resolveBusinessGroupDataset(_0x5ef8a8,_0x4d3aa3['code']),_0x2003e6=loadCurrentBusinessGroup(_0x5ef8a8,_0xcbc83c);if(_0x2003e6!==_0x318b9b)throw CliErrors['apiError'](_0x11423a(0x21f),_0x11423a(0x1f1)+JSON['stringify'](displayBusinessGroup(_0x318b9b))+_0x11423a(0x20c)+JSON[_0x11423a(0x213)](displayBusinessGroup(_0x2003e6))+'.');_0x153768={'verified':!![],'status':_0x11423a(0x22e),'afterReadback':{'businessGroup':displayBusinessGroup(_0x2003e6)}};}else!_0x3945e5&&(_0x153768={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x7440f3)}});const _0x26fa75={'operation':_0x11423a(0x1f3),'appCode':_0x1edfbc,'selector':{'code':_0x4d3aa3[_0x11423a(0x202)]},'dataset':{'id':_0x4d3aa3['id'],'code':_0x4d3aa3[_0x11423a(0x202)],'name':_0x4d3aa3['name'],'sourceType':_0x4d3aa3[_0x11423a(0x21a)]},'before':{'businessGroup':displayBusinessGroup(_0x7440f3)},'after':{'businessGroup':displayBusinessGroup(_0x318b9b)},'changed':_0x3945e5,'dryRun':_0x3cf8a4,'submitted':_0x3945e5&&!_0x3cf8a4,'backend':{'method':_0x67dcbc[_0x11423a(0x216)],'path':_0x67dcbc[_0x11423a(0x221)],'payload':_0x67dcbc[_0x11423a(0x21d)]},..._0x153768?{'verification':_0x153768}:{},'warnings':[]};return{'ok':!![],'data':_0x26fa75,'message':_0x3945e5?_0x3cf8a4?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x4d3aa3['code']:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x4d3aa3[_0x11423a(0x202)]:_0x11423a(0x20b)+_0x4d3aa3[_0x11423a(0x202)]};}export const datasetBusinessGroupUpdate={'service':a66_0x3443e7(0x1ec),'command':a66_0x3443e7(0x201),'description':a66_0x3443e7(0x223),'risk':a66_0x3443e7(0x1ff),'flags':[CODE_FLAG,{'name':a66_0x3443e7(0x205),'type':a66_0x3443e7(0x211),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':a66_0x3443e7(0x1fb),'type':a66_0x3443e7(0x211),'required':![],'description':a66_0x3443e7(0x1fe)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x133f09){validateInput(readBusinessGroupUpdateInput(_0x133f09));},async 'dryRun'(_0x5ed9cf){const _0x3b6864=a66_0x3443e7,_0x78b58d=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x5ed9cf['appCode'],'input':readBusinessGroupUpdateInput(_0x5ed9cf),'dryRun':!![]});return{'method':_0x78b58d[_0x3b6864(0x22f)][_0x3b6864(0x206)][_0x3b6864(0x216)],'url':_0x78b58d['data']['backend'][_0x3b6864(0x221)],'body':_0x78b58d[_0x3b6864(0x22f)][_0x3b6864(0x206)][_0x3b6864(0x21d)],'description':_0x78b58d['message'],..._0x78b58d[_0x3b6864(0x22f)]};},async 'execute'(_0x118817){const _0x3f0d8c=a66_0x3443e7;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x118817[_0x3f0d8c(0x22c)],'input':readBusinessGroupUpdateInput(_0x118817),'dryRun':![]});}};function a66_0x3d81(){const _0x70ecdd=['matched','data','28862Bvvoxr','2324154pGSFLx','isFinite','4817313gQxfQp','3161061iQgfzs','name','dataset','tableName','source','keys','expectBusinessGroup','Expected\x20','11VWgQpo','update','toUpperCase','value','businessGroup','32kVYFAa','ungrouped','2qOamow','dbLinkId','expect-business-group','METADATA','9922848ajjqbf','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','write','db-table','business-group-update','code','found','number','business-group','backend','datasetId','/smartapi/dblink/updateTableBusinessGroup','dbId','datasetName','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20',',\x20actual\x20','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','Expectation\x20mismatch\x20at\x20businessGroup','prototype','metadata','string','31817010GfEhTn','stringify','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','str','method','POST','--business-group\x20must\x20not\x20be\x20blank','extend','sourceType','length','/smartapi/question/er-config/business-group/edit','payload','dbTableSelector','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','modelId','path','DB_TABLE','Update\x20business\x20scenario\x20group','trim','hasOwnProperty','modelCode','4cNnhwb','call','kind','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','validation','appCode','2193700wsbuSc'];a66_0x3d81=function(){return _0x70ecdd;};return a66_0x3d81();}function readBusinessGroupUpdateInput(_0x20b98f){const _0xf6db09=a66_0x3443e7,_0x295732=_0x20b98f[_0xf6db09(0x215)]('expect-business-group');return{'code':trim(_0x20b98f['str'](_0xf6db09(0x202))),'businessGroup':_0x20b98f[_0xf6db09(0x215)]('business-group'),'expectBusinessGroup':_0x295732===undefined||_0x295732===''?undefined:_0x295732};}function validateInput(_0x528b16){const _0xaf65fb=a66_0x3443e7;if(!trim(_0x528b16[_0xaf65fb(0x202)]))throw CliErrors[_0xaf65fb(0x22b)]('--code\x20is\x20required');if(_0x528b16[_0xaf65fb(0x1f6)]===undefined)throw CliErrors['validation']('--business-group\x20is\x20required');if(!trim(_0x528b16[_0xaf65fb(0x1f6)]))throw CliErrors[_0xaf65fb(0x22b)](_0xaf65fb(0x218));}function assertBusinessGroupUpdateSupported(_0x57c9bd,_0x151e2d){const _0xcd4fb4=a66_0x3443e7;if(_0x57c9bd[_0xcd4fb4(0x21a)]===_0xcd4fb4(0x222)&&!_0x151e2d)throw CliErrors[_0xcd4fb4(0x22b)]('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function resolveBusinessGroupDataset(_0x424c19,_0x4a768a){const _0x210c3f=a66_0x3443e7,_0x2b200a=asPlainObject(_0x424c19[_0x210c3f(0x1ec)]),_0x4c8452=asPlainObject(_0x424c19['dbtableConfig']),_0x183727=resolveSourceType(_0x424c19,_0x2b200a,_0x4c8452),_0x3d596f=firstString(_0x424c19[_0x210c3f(0x226)],_0x424c19[_0x210c3f(0x202)],_0x2b200a['datasetCode'],_0x4a768a)||_0x4a768a;return{'id':firstNumber(_0x424c19[_0x210c3f(0x220)],_0x424c19['id'],_0x2b200a[_0x210c3f(0x207)])??firstString(_0x424c19['modelId'],_0x424c19['id'],_0x2b200a[_0x210c3f(0x207)])??null,'code':_0x3d596f,'name':firstString(_0x424c19[_0x210c3f(0x1eb)],_0x2b200a[_0x210c3f(0x20a)],_0x2b200a['name'])||null,'sourceType':_0x183727,'dbTableSelector':_0x183727===_0x210c3f(0x222)?{'dbLinkId':firstNumber(_0x4c8452[_0x210c3f(0x209)]),'tableName':firstString(_0x4c8452[_0x210c3f(0x1ed)])||null}:null};}function resolveSourceType(_0x56c742,_0xe3cc06,_0x3d7a41){const _0x21b23b=a66_0x3443e7,_0x51adcb=firstString(_0x56c742[_0x21b23b(0x1ee)],_0x56c742[_0x21b23b(0x21a)],_0xe3cc06[_0x21b23b(0x1ee)],_0xe3cc06['sourceType'])?.[_0x21b23b(0x224)]()[_0x21b23b(0x1f4)]();if(_0x51adcb===_0x21b23b(0x222)||_0x51adcb===_0x21b23b(0x1fc))return _0x51adcb;if(Object[_0x21b23b(0x1ef)](_0x3d7a41)[_0x21b23b(0x21b)]>0x0)return _0x21b23b(0x222);throw CliErrors[_0x21b23b(0x22b)](_0x21b23b(0x214));}function loadCurrentBusinessGroup(_0x201b55,_0x367eb9){const _0x59376d=a66_0x3443e7,_0x59d1b5=readBusinessGroupFromDatasetDetail(_0x201b55,_0x367eb9['sourceType']);if(_0x59d1b5[_0x59376d(0x203)])return normalizeBusinessGroup(_0x59d1b5[_0x59376d(0x1f5)]);return'';}function readBusinessGroupFromDatasetDetail(_0x5a1a27,_0x4e0f7d){const _0x877f=a66_0x3443e7,_0x26199a=asPlainObject(_0x5a1a27[_0x877f(0x1ec)]),_0x3abf20=firstPresent(_0x5a1a27[_0x877f(0x1f6)]);if(_0x3abf20['found'])return _0x3abf20;const _0x7e0658=firstPresent(_0x26199a[_0x877f(0x1f6)]);if(_0x7e0658[_0x877f(0x203)])return _0x7e0658;if(_0x4e0f7d===_0x877f(0x222))return{'found':![]};const _0x578d1b=readBusinessGroupFromExtend(_0x5a1a27['extend']);if(_0x578d1b[_0x877f(0x203)])return _0x578d1b;return readBusinessGroupFromExtend(_0x26199a[_0x877f(0x219)]);}function readBusinessGroupFromExtend(_0x4fdc7d){const _0x357cd3=a66_0x3443e7;if(_0x4fdc7d===undefined||_0x4fdc7d===null||_0x4fdc7d==='')return{'found':![]};if(typeof _0x4fdc7d===_0x357cd3(0x211))try{const _0x1004c1=JSON['parse'](_0x4fdc7d);return readBusinessGroupFromExtend(_0x1004c1);}catch{return{'found':![]};}const _0x115af0=asPlainObject(_0x4fdc7d);if(Object[_0x357cd3(0x20f)][_0x357cd3(0x225)][_0x357cd3(0x228)](_0x115af0,_0x357cd3(0x1f6)))return{'found':!![],'value':_0x115af0[_0x357cd3(0x1f6)]};return{'found':![]};}function firstPresent(..._0xfd7576){for(const _0x16874c of _0xfd7576){if(_0x16874c!==undefined&&_0x16874c!==null)return{'found':!![],'value':_0x16874c};}return{'found':![]};}function assertExpectedBusinessGroup(_0x523c97,_0x466b55){const _0xd0a7a0=a66_0x3443e7;if(_0x466b55===undefined)return;const _0x5ef4f2=normalizeBusinessGroupArgument(_0x466b55);if(_0x523c97!==_0x5ef4f2)throw CliErrors['validation'](_0xd0a7a0(0x20e),_0xd0a7a0(0x1f1)+JSON[_0xd0a7a0(0x213)](_0x5ef4f2)+_0xd0a7a0(0x20c)+JSON[_0xd0a7a0(0x213)](_0x523c97));}function buildBackendPlan(_0x9a4fdb,_0x4af92b,_0x364af6){const _0x287712=a66_0x3443e7;if(_0x4af92b['sourceType']===_0x287712(0x222)){if(!_0x4af92b[_0x287712(0x21e)]||_0x4af92b['dbTableSelector'][_0x287712(0x1fa)]===null||!_0x4af92b[_0x287712(0x21e)][_0x287712(0x1ed)])throw CliErrors[_0x287712(0x22b)](_0x287712(0x22a),_0x287712(0x20d));return{'kind':'db-table','method':_0x287712(0x217),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x4af92b['dbTableSelector'][_0x287712(0x1fa)],'tableName':_0x4af92b['dbTableSelector']['tableName'],'businessGroup':_0x364af6}};}return{'kind':_0x287712(0x210),'method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x9a4fdb,'datasetCode':_0x4af92b[_0x287712(0x202)],'businessGroup':_0x364af6}};}function normalizeBusinessGroup(_0x35415d){const _0x469f3b=a66_0x3443e7;if(_0x35415d===undefined||_0x35415d===null)return'';return String(_0x35415d)[_0x469f3b(0x224)]();}function normalizeBusinessGroupArgument(_0x685ad5){const _0x5635a6=normalizeBusinessGroup(_0x685ad5);return _0x5635a6===UNGROUPED_BUSINESS_GROUP?'':_0x5635a6;}function displayBusinessGroup(_0x6715fc){return _0x6715fc||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x1aa4ed){if(!_0x1aa4ed||typeof _0x1aa4ed!=='object'||Array['isArray'](_0x1aa4ed))return{};return _0x1aa4ed;}function firstString(..._0x34ddf3){const _0x91b86e=a66_0x3443e7;for(const _0x393842 of _0x34ddf3){if(typeof _0x393842===_0x91b86e(0x211)&&_0x393842[_0x91b86e(0x224)]())return _0x393842['trim']();if(typeof _0x393842==='number'&&Number['isFinite'](_0x393842))return String(_0x393842);}return undefined;}function firstNumber(..._0x5b1c2f){const _0x4a5fff=a66_0x3443e7;for(const _0x46c6c9 of _0x5b1c2f){if(typeof _0x46c6c9===_0x4a5fff(0x204)&&Number[_0x4a5fff(0x232)](_0x46c6c9))return _0x46c6c9;if(typeof _0x46c6c9===_0x4a5fff(0x211)&&_0x46c6c9[_0x4a5fff(0x224)]()&&Number[_0x4a5fff(0x232)](Number(_0x46c6c9)))return Number(_0x46c6c9);}return null;}function a66_0x2e67(_0x152aeb,_0x146ecf){_0x152aeb=_0x152aeb-0x1eb;const _0x3d81ee=a66_0x3d81();let _0x2e678c=_0x3d81ee[_0x152aeb];return _0x2e678c;}function trim(_0xd51fdd){const _0x3048e7=a66_0x3443e7;return String(_0xd51fdd||'')[_0x3048e7(0x224)]();}
|
|
1
|
+
const a66_0x47e13d=a66_0x2311;(function(_0x412ac6,_0x26e2dd){const _0x1ca9ca=a66_0x2311,_0x161db1=_0x412ac6();while(!![]){try{const _0x472fdb=parseInt(_0x1ca9ca(0x134))/0x1*(parseInt(_0x1ca9ca(0x146))/0x2)+-parseInt(_0x1ca9ca(0x157))/0x3*(parseInt(_0x1ca9ca(0x159))/0x4)+-parseInt(_0x1ca9ca(0x11c))/0x5*(parseInt(_0x1ca9ca(0x12d))/0x6)+-parseInt(_0x1ca9ca(0x126))/0x7*(-parseInt(_0x1ca9ca(0x14e))/0x8)+parseInt(_0x1ca9ca(0x141))/0x9*(parseInt(_0x1ca9ca(0x139))/0xa)+parseInt(_0x1ca9ca(0x120))/0xb*(parseInt(_0x1ca9ca(0x121))/0xc)+-parseInt(_0x1ca9ca(0x145))/0xd*(parseInt(_0x1ca9ca(0x147))/0xe);if(_0x472fdb===_0x26e2dd)break;else _0x161db1['push'](_0x161db1['shift']());}catch(_0x2fcb9f){_0x161db1['push'](_0x161db1['shift']());}}}(a66_0x3381,0xeafa2));function a66_0x2311(_0x7b3c38,_0xd2da4e){_0x7b3c38=_0x7b3c38-0x110;const _0x3381bf=a66_0x3381();let _0x231174=_0x3381bf[_0x7b3c38];return _0x231174;}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_0x47e13d(0x14c),METADATA_BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP=a66_0x47e13d(0x116);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x3f7a91,input:_0x14b322,dryRun:_0x3a73bf}){const _0x19be8f=a66_0x47e13d;validateInput(_0x14b322);const _0x36e3b3=normalizeBusinessGroupArgument(_0x14b322['businessGroup']),_0x58dda0=await getDatasetDetail(_0x14b322[_0x19be8f(0x11d)]),_0x262500=resolveBusinessGroupDataset(_0x58dda0,_0x14b322[_0x19be8f(0x11d)]);assertBusinessGroupUpdateSupported(_0x262500,_0x36e3b3);const _0x5b7237=loadCurrentBusinessGroup(_0x58dda0,_0x262500);assertExpectedBusinessGroup(_0x5b7237,_0x14b322[_0x19be8f(0x15d)]);const _0x59f54f=buildBackendPlan(_0x3f7a91,_0x262500,_0x36e3b3),_0x16045e=_0x5b7237!==_0x36e3b3;let _0x1a0265;if(_0x16045e&&!_0x3a73bf){_0x59f54f['kind']===_0x19be8f(0x12c)?await updateDbTableBusinessGroup(_0x59f54f[_0x19be8f(0x137)]):await updateErBusinessGroup(_0x59f54f[_0x19be8f(0x137)]);const _0x4ef271=await getDatasetDetail(_0x262500['code']),_0x44763a=resolveBusinessGroupDataset(_0x4ef271,_0x262500[_0x19be8f(0x11d)]),_0x52786d=loadCurrentBusinessGroup(_0x4ef271,_0x44763a);if(_0x52786d!==_0x36e3b3)throw CliErrors[_0x19be8f(0x136)](_0x19be8f(0x152),'Expected\x20'+JSON['stringify'](displayBusinessGroup(_0x36e3b3))+_0x19be8f(0x138)+JSON[_0x19be8f(0x115)](displayBusinessGroup(_0x52786d))+'.');_0x1a0265={'verified':!![],'status':_0x19be8f(0x112),'afterReadback':{'businessGroup':displayBusinessGroup(_0x52786d)}};}else!_0x16045e&&(_0x1a0265={'verified':!![],'status':_0x19be8f(0x13e),'afterReadback':{'businessGroup':displayBusinessGroup(_0x5b7237)}});const _0x4cff75={'operation':_0x19be8f(0x158),'appCode':_0x3f7a91,'selector':{'code':_0x262500['code']},'dataset':{'id':_0x262500['id'],'code':_0x262500[_0x19be8f(0x11d)],'name':_0x262500[_0x19be8f(0x13d)],'sourceType':_0x262500[_0x19be8f(0x15f)]},'before':{'businessGroup':displayBusinessGroup(_0x5b7237)},'after':{'businessGroup':displayBusinessGroup(_0x36e3b3)},'changed':_0x16045e,'dryRun':_0x3a73bf,'submitted':_0x16045e&&!_0x3a73bf,'backend':{'method':_0x59f54f['method'],'path':_0x59f54f[_0x19be8f(0x117)],'payload':_0x59f54f[_0x19be8f(0x137)]},..._0x1a0265?{'verification':_0x1a0265}:{},'warnings':[]};return{'ok':!![],'data':_0x4cff75,'message':_0x16045e?_0x3a73bf?_0x19be8f(0x11a)+_0x262500['code']:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x262500[_0x19be8f(0x11d)]:_0x19be8f(0x15b)+_0x262500[_0x19be8f(0x11d)]};}export const datasetBusinessGroupUpdate={'service':a66_0x47e13d(0x110),'command':a66_0x47e13d(0x150),'description':a66_0x47e13d(0x13c),'risk':'write','flags':[CODE_FLAG,{'name':a66_0x47e13d(0x143),'type':a66_0x47e13d(0x14b),'required':!![],'description':a66_0x47e13d(0x127)},{'name':a66_0x47e13d(0x15c),'type':a66_0x47e13d(0x14b),'required':![],'description':a66_0x47e13d(0x114)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x45ba97){validateInput(readBusinessGroupUpdateInput(_0x45ba97));},async 'dryRun'(_0xb6a079){const _0xea172=a66_0x47e13d,_0x356ac1=await buildDatasetBusinessGroupUpdateResult({'appCode':_0xb6a079[_0xea172(0x12e)],'input':readBusinessGroupUpdateInput(_0xb6a079),'dryRun':!![]});return{'method':_0x356ac1['data'][_0xea172(0x140)][_0xea172(0x130)],'url':_0x356ac1[_0xea172(0x119)][_0xea172(0x140)][_0xea172(0x117)],'body':_0x356ac1[_0xea172(0x119)][_0xea172(0x140)][_0xea172(0x137)],'description':_0x356ac1['message'],..._0x356ac1[_0xea172(0x119)]};},async 'execute'(_0x531b40){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x531b40['appCode'],'input':readBusinessGroupUpdateInput(_0x531b40),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x504892){const _0x12240f=a66_0x47e13d,_0x47cdff=_0x504892['str']('expect-business-group');return{'code':trim(_0x504892[_0x12240f(0x154)](_0x12240f(0x11d))),'businessGroup':_0x504892[_0x12240f(0x154)](_0x12240f(0x143)),'expectBusinessGroup':_0x47cdff===undefined||_0x47cdff===''?undefined:_0x47cdff};}function validateInput(_0x63b31c){const _0x44f8fc=a66_0x47e13d;if(!trim(_0x63b31c[_0x44f8fc(0x11d)]))throw CliErrors['validation'](_0x44f8fc(0x123));if(_0x63b31c[_0x44f8fc(0x125)]===undefined)throw CliErrors[_0x44f8fc(0x148)](_0x44f8fc(0x142));if(!trim(_0x63b31c[_0x44f8fc(0x125)]))throw CliErrors['validation'](_0x44f8fc(0x12b));}function assertBusinessGroupUpdateSupported(_0xc86adf,_0x2e33cc){const _0x5e15af=a66_0x47e13d;if(_0xc86adf['sourceType']===_0x5e15af(0x132)&&!_0x2e33cc)throw CliErrors[_0x5e15af(0x148)](_0x5e15af(0x124));}function resolveBusinessGroupDataset(_0xd76abd,_0x499775){const _0x128e60=a66_0x47e13d,_0x5a4c84=asPlainObject(_0xd76abd[_0x128e60(0x110)]),_0x1ea1e4=asPlainObject(_0xd76abd['dbtableConfig']),_0x58dd96=resolveSourceType(_0xd76abd,_0x5a4c84,_0x1ea1e4),_0xfaddc5=firstString(_0xd76abd[_0x128e60(0x11e)],_0xd76abd['code'],_0x5a4c84[_0x128e60(0x14f)],_0x499775)||_0x499775;return{'id':firstNumber(_0xd76abd[_0x128e60(0x129)],_0xd76abd['id'],_0x5a4c84[_0x128e60(0x155)])??firstString(_0xd76abd['modelId'],_0xd76abd['id'],_0x5a4c84[_0x128e60(0x155)])??null,'code':_0xfaddc5,'name':firstString(_0xd76abd[_0x128e60(0x13d)],_0x5a4c84[_0x128e60(0x14d)],_0x5a4c84[_0x128e60(0x13d)])||null,'sourceType':_0x58dd96,'dbTableSelector':_0x58dd96==='DB_TABLE'?{'dbLinkId':firstNumber(_0x1ea1e4[_0x128e60(0x12f)]),'tableName':firstString(_0x1ea1e4[_0x128e60(0x13b)])||null}:null};}function resolveSourceType(_0x349c32,_0x348d2c,_0x51fcee){const _0x4a0ac3=a66_0x47e13d,_0xb1a647=firstString(_0x349c32['source'],_0x349c32['sourceType'],_0x348d2c['source'],_0x348d2c[_0x4a0ac3(0x15f)])?.[_0x4a0ac3(0x13f)]()['toUpperCase']();if(_0xb1a647===_0x4a0ac3(0x132)||_0xb1a647===_0x4a0ac3(0x11f))return _0xb1a647;if(Object[_0x4a0ac3(0x128)](_0x51fcee)[_0x4a0ac3(0x153)]>0x0)return _0x4a0ac3(0x132);throw CliErrors['validation']('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0xdf6903,_0x841700){const _0x39d280=a66_0x47e13d,_0x4678a5=readBusinessGroupFromDatasetDetail(_0xdf6903,_0x841700[_0x39d280(0x15f)]);if(_0x4678a5['found'])return normalizeBusinessGroup(_0x4678a5['value']);return'';}function readBusinessGroupFromDatasetDetail(_0x8f45c0,_0xe271de){const _0x4b5b7d=a66_0x47e13d,_0x15e5bb=asPlainObject(_0x8f45c0['dataset']),_0x2ee10d=firstPresent(_0x8f45c0[_0x4b5b7d(0x125)]);if(_0x2ee10d[_0x4b5b7d(0x113)])return _0x2ee10d;const _0x9766d3=firstPresent(_0x15e5bb[_0x4b5b7d(0x125)]);if(_0x9766d3['found'])return _0x9766d3;if(_0xe271de==='DB_TABLE')return{'found':![]};const _0x157f52=readBusinessGroupFromExtend(_0x8f45c0[_0x4b5b7d(0x15a)]);if(_0x157f52['found'])return _0x157f52;return readBusinessGroupFromExtend(_0x15e5bb['extend']);}function readBusinessGroupFromExtend(_0x246abb){const _0x4c16bd=a66_0x47e13d;if(_0x246abb===undefined||_0x246abb===null||_0x246abb==='')return{'found':![]};if(typeof _0x246abb===_0x4c16bd(0x14b))try{const _0x336b90=JSON[_0x4c16bd(0x135)](_0x246abb);return readBusinessGroupFromExtend(_0x336b90);}catch{return{'found':![]};}const _0x438b38=asPlainObject(_0x246abb);if(Object[_0x4c16bd(0x131)]['hasOwnProperty'][_0x4c16bd(0x156)](_0x438b38,_0x4c16bd(0x125)))return{'found':!![],'value':_0x438b38['businessGroup']};return{'found':![]};}function firstPresent(..._0x2523da){for(const _0x25f8fc of _0x2523da){if(_0x25f8fc!==undefined&&_0x25f8fc!==null)return{'found':!![],'value':_0x25f8fc};}return{'found':![]};}function assertExpectedBusinessGroup(_0x5a99b7,_0x55617b){const _0x220df1=a66_0x47e13d;if(_0x55617b===undefined)return;const _0x1b4a23=normalizeBusinessGroupArgument(_0x55617b);if(_0x5a99b7!==_0x1b4a23)throw CliErrors[_0x220df1(0x148)](_0x220df1(0x15e),_0x220df1(0x122)+JSON[_0x220df1(0x115)](_0x1b4a23)+',\x20actual\x20'+JSON['stringify'](_0x5a99b7));}function buildBackendPlan(_0xc984e8,_0x26eba5,_0x2424a8){const _0x1a46a0=a66_0x47e13d;if(_0x26eba5[_0x1a46a0(0x15f)]===_0x1a46a0(0x132)){if(!_0x26eba5['dbTableSelector']||_0x26eba5[_0x1a46a0(0x14a)][_0x1a46a0(0x111)]===null||!_0x26eba5[_0x1a46a0(0x14a)][_0x1a46a0(0x13b)])throw CliErrors[_0x1a46a0(0x148)](_0x1a46a0(0x149),_0x1a46a0(0x151));return{'kind':_0x1a46a0(0x12c),'method':_0x1a46a0(0x144),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x26eba5[_0x1a46a0(0x14a)]['dbLinkId'],'tableName':_0x26eba5[_0x1a46a0(0x14a)][_0x1a46a0(0x13b)],'businessGroup':_0x2424a8}};}return{'kind':_0x1a46a0(0x118),'method':_0x1a46a0(0x144),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0xc984e8,'datasetCode':_0x26eba5[_0x1a46a0(0x11d)],'businessGroup':_0x2424a8}};}function normalizeBusinessGroup(_0xd7a541){const _0x3eac4f=a66_0x47e13d;if(_0xd7a541===undefined||_0xd7a541===null)return'';return String(_0xd7a541)[_0x3eac4f(0x13f)]();}function a66_0x3381(){const _0x5805b5=['expectBusinessGroup','Expectation\x20mismatch\x20at\x20businessGroup','sourceType','dataset','dbLinkId','matched','found','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','stringify','ungrouped','path','metadata','data','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','object','5AGDQDD','code','modelCode','METADATA','1100cZkKMd','213660TWAuqI','Expected\x20','--code\x20is\x20required','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','businessGroup','14iEsKhe','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','keys','modelId','number','--business-group\x20must\x20not\x20be\x20blank','db-table','4967538svPOUs','appCode','dbId','method','prototype','DB_TABLE','isFinite','262BAPKan','parse','apiError','payload',',\x20actual\x20','64010wgkktc','isArray','tableName','Update\x20business\x20scenario\x20group','name','unchanged','trim','backend','1827QIqlMt','--business-group\x20is\x20required','business-group','POST','26tutDxe','7534COsGZg','5401256dpJLyd','validation','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','dbTableSelector','string','/smartapi/dblink/updateTableBusinessGroup','datasetName','654056TWLDjJ','datasetCode','business-group-update','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','length','str','datasetId','call','2502561oqQkSo','update','8wgODfL','extend','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','expect-business-group'];a66_0x3381=function(){return _0x5805b5;};return a66_0x3381();}function normalizeBusinessGroupArgument(_0x11a1e2){const _0x5ba3b2=normalizeBusinessGroup(_0x11a1e2);return _0x5ba3b2===UNGROUPED_BUSINESS_GROUP?'':_0x5ba3b2;}function displayBusinessGroup(_0x110836){return _0x110836||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x30e4f1){const _0x1f071b=a66_0x47e13d;if(!_0x30e4f1||typeof _0x30e4f1!==_0x1f071b(0x11b)||Array[_0x1f071b(0x13a)](_0x30e4f1))return{};return _0x30e4f1;}function firstString(..._0x52d2fe){const _0x3e6f4a=a66_0x47e13d;for(const _0xd2c118 of _0x52d2fe){if(typeof _0xd2c118==='string'&&_0xd2c118[_0x3e6f4a(0x13f)]())return _0xd2c118[_0x3e6f4a(0x13f)]();if(typeof _0xd2c118===_0x3e6f4a(0x12a)&&Number[_0x3e6f4a(0x133)](_0xd2c118))return String(_0xd2c118);}return undefined;}function firstNumber(..._0x24e870){const _0x2a6940=a66_0x47e13d;for(const _0xd751c9 of _0x24e870){if(typeof _0xd751c9===_0x2a6940(0x12a)&&Number['isFinite'](_0xd751c9))return _0xd751c9;if(typeof _0xd751c9===_0x2a6940(0x14b)&&_0xd751c9[_0x2a6940(0x13f)]()&&Number[_0x2a6940(0x133)](Number(_0xd751c9)))return Number(_0xd751c9);}return null;}function trim(_0x5bca10){const _0x157996=a66_0x47e13d;return String(_0x5bca10||'')[_0x157996(0x13f)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x3e7933=a67_0x1d99;(function(_0x79f8ee,_0x15d89c){const _0x9ef8d5=a67_0x1d99,_0x593c24=_0x79f8ee();while(!![]){try{const _0x39fda8=parseInt(_0x9ef8d5(0xdb))/0x1+parseInt(_0x9ef8d5(0xe7))/0x2+-parseInt(_0x9ef8d5(0xe6))/0x3+parseInt(_0x9ef8d5(0xe0))/0x4+-parseInt(_0x9ef8d5(0xea))/0x5*(parseInt(_0x9ef8d5(0xe5))/0x6)+-parseInt(_0x9ef8d5(0xef))/0x7*(parseInt(_0x9ef8d5(0xde))/0x8)+-parseInt(_0x9ef8d5(0xe3))/0x9;if(_0x39fda8===_0x15d89c)break;else _0x593c24['push'](_0x593c24['shift']());}catch(_0x38ed7a){_0x593c24['push'](_0x593c24['shift']());}}}(a67_0x3437,0x70a5f));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a67_0x3437(){const _0xf18eb8=['appCode','5789223kygJgo','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','18ILragM','733251kAmjWw','968708yUVhXb','num','businessGroup','158665zHdYwa','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','dataset','business-groups','\x20business\x20group(s)\x20for\x20database\x20connection\x20','42nYlpZT','dbid','ungrouped','815144oYioUU','read','groups','167312ekFuUc','number','1081024ipZobD','Found\x20'];a67_0x3437=function(){return _0xf18eb8;};return a67_0x3437();}function a67_0x1d99(_0x2a4773,_0x34f8dd){_0x2a4773=_0x2a4773-0xda;const _0x3437fd=a67_0x3437();let _0x1d99aa=_0x3437fd[_0x2a4773];return _0x1d99aa;}import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a67_0x3e7933(0xec),'command':a67_0x3e7933(0xed),'description':a67_0x3e7933(0xe4),'risk':a67_0x3e7933(0xdc),'flags':[{'name':a67_0x3e7933(0xf0),'type':a67_0x3e7933(0xdf),'required':!![],'description':a67_0x3e7933(0xeb)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5a624a){const _0x4a7f9d=a67_0x3e7933,_0x380674=_0x5a624a[_0x4a7f9d(0xe8)](_0x4a7f9d(0xf0)),_0x4193bd=await getErBusinessGroupSummary(_0x5a624a[_0x4a7f9d(0xe2)],_0x380674),_0x36aecf=_0x4193bd[_0x4a7f9d(0xdd)]['map'](_0x85bc64=>({..._0x85bc64,'businessGroup':_0x85bc64[_0x4a7f9d(0xe9)]['trim']()||_0x4a7f9d(0xda)}));return{'ok':!![],'data':{..._0x4193bd,'groups':_0x36aecf,'scope':'DB_TABLE'},'message':_0x4a7f9d(0xe1)+_0x36aecf['length']+_0x4a7f9d(0xee)+_0x380674};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0xedd86a=a68_0x8862;function a68_0x8862(_0xbd1cba,_0x326f62){_0xbd1cba=_0xbd1cba-0x112;const _0x2e75e8=a68_0x2e75();let _0x88621b=_0x2e75e8[_0xbd1cba];return _0x88621b;}(function(_0x4d88a5,_0x3992aa){const _0xfcbd92=a68_0x8862,_0x3ac60d=_0x4d88a5();while(!![]){try{const _0x51952a=parseInt(_0xfcbd92(0x126))/0x1*(-parseInt(_0xfcbd92(0x134))/0x2)+parseInt(_0xfcbd92(0x118))/0x3+parseInt(_0xfcbd92(0x113))/0x4+-parseInt(_0xfcbd92(0x122))/0x5*(parseInt(_0xfcbd92(0x131))/0x6)+parseInt(_0xfcbd92(0x12b))/0x7+parseInt(_0xfcbd92(0x133))/0x8*(-parseInt(_0xfcbd92(0x120))/0x9)+parseInt(_0xfcbd92(0x123))/0xa;if(_0x51952a===_0x3992aa)break;else _0x3ac60d['push'](_0x3ac60d['shift']());}catch(_0x54bba3){_0x3ac60d['push'](_0x3ac60d['shift']());}}}(a68_0x2e75,0xb547f));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a68_0xedd86a(0x124),'filter':a68_0xedd86a(0x128),'getOne':a68_0xedd86a(0x115)};export const RUNTIME_DATA_ACCESS_SUMMARY=a68_0xedd86a(0x112);function a68_0x2e75(){const _0x1bc854=['name','dbId','toUpperCase','63uoijSK','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','1144420tlHhrC','15411150SdANwh','lovrabet','datasetCode','22ZKrQvd','modelCode','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','unknown','tableName','5832666lbhUak','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','dbtable','validation','\x20is\x20','dataset','12FWVODI','source','849144FIRUwd','114414buCMLM','join','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','432708DEmusp','dbtableConfig','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','filter','The\x20current\x20dataset\x20\x22','2157960LvcvRD','getOne','object','SQL\x20schema\x20validation','UNKNOWN'];a68_0x2e75=function(){return _0x1bc854;};return a68_0x2e75();}function valueToString(_0x5999ea){return _0x5999ea==null?'':String(_0x5999ea)['trim']();}function getDatasetCode(_0x5bebf1){const _0x136a54=a68_0xedd86a;return valueToString(_0x5bebf1['code']??_0x5bebf1[_0x136a54(0x127)]??_0x5bebf1[_0x136a54(0x130)]?.[_0x136a54(0x125)]);}function getDatasetName(_0x52eef2){const _0x22f47c=a68_0xedd86a;return valueToString(_0x52eef2[_0x22f47c(0x11d)]??_0x52eef2['dataset']?.['datasetName'])||_0x22f47c(0x129);}function getDatasetSource(_0x5cde8f){const _0x2db746=a68_0xedd86a;return valueToString(_0x5cde8f[_0x2db746(0x132)]??_0x5cde8f['dataset']?.['sourceType'])[_0x2db746(0x11f)]();}function getDbtableConfig(_0x49cb68){const _0x1f3ff4=a68_0xedd86a,_0x3f72a3=_0x49cb68[_0x1f3ff4(0x114)]??_0x49cb68[_0x1f3ff4(0x12d)];return _0x3f72a3&&typeof _0x3f72a3===_0x1f3ff4(0x11a)?_0x3f72a3:{};}export function isDbTableBackedDataset(_0x1f9482){const _0x6af26d=a68_0xedd86a,_0x18aa5b=getDatasetSource(_0x1f9482);if(_0x18aa5b==='METADATA')return![];const _0x2cb5b2=getDbtableConfig(_0x1f9482),_0x5d5420=_0x2cb5b2[_0x6af26d(0x11e)]??_0x2cb5b2['id'],_0x27ea61=valueToString(_0x2cb5b2[_0x6af26d(0x12a)]??_0x1f9482[_0x6af26d(0x12a)]??_0x1f9482[_0x6af26d(0x130)]?.[_0x6af26d(0x12a)]);return _0x5d5420!==undefined&&_0x5d5420!==null&&_0x27ea61['length']>0x0;}export function filterDbTableBackedDatasets(_0x2e188c){return _0x2e188c['filter'](_0xe87882=>isDbTableBackedDataset(_0xe87882));}export function buildDbTableBackedRequirementMessage(_0x4096b0,_0x3564e8=a68_0xedd86a(0x11b)){const _0x6366de=a68_0xedd86a,_0x38b4cb=getDatasetSource(_0x4096b0)||_0x6366de(0x11c),_0x26d7e1=getDatasetName(_0x4096b0),_0x17310f=getDatasetCode(_0x4096b0),_0x4cfd3e=_0x17310f?'\x20('+_0x17310f+')':'';return[_0x6366de(0x117)+_0x26d7e1+'\x22'+_0x4cfd3e+_0x6366de(0x12f)+_0x38b4cb+_0x6366de(0x121)+_0x3564e8+'.',_0x6366de(0x12c),'Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x6366de(0x116)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x6366de(0x119)]+'.'][_0x6366de(0x135)]('\x20');}export function assertDatasetIsDbTableBacked(_0x1e648a,_0x3266c6){const _0x4023d1=a68_0xedd86a;if(!isDbTableBackedDataset(_0x1e648a))throw CliErrors[_0x4023d1(0x12e)](buildDbTableBackedRequirementMessage(_0x1e648a,_0x3266c6));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x436a32=a69_0x374b;(function(_0x3d9b64,_0x4967aa){const _0x53de22=a69_0x374b,_0x4ff29e=_0x3d9b64();while(!![]){try{const _0x16b67d=-parseInt(_0x53de22(0xd7))/0x1*(parseInt(_0x53de22(0xd0))/0x2)+-parseInt(_0x53de22(0xd2))/0x3+-parseInt(_0x53de22(0xd3))/0x4+-parseInt(_0x53de22(0xd1))/0x5+parseInt(_0x53de22(0xd4))/0x6+-parseInt(_0x53de22(0xd9))/0x7+-parseInt(_0x53de22(0xd6))/0x8*(-parseInt(_0x53de22(0xd5))/0x9);if(_0x16b67d===_0x4967aa)break;else _0x4ff29e['push'](_0x4ff29e['shift']());}catch(_0x43afa1){_0x4ff29e['push'](_0x4ff29e['shift']());}}}(a69_0x466d,0x76d60));function a69_0x374b(_0x37610d,_0x18ef86){_0x37610d=_0x37610d-0xd0;const _0x466d3a=a69_0x466d();let _0x374b90=_0x466d3a[_0x37610d];return _0x374b90;}function a69_0x466d(){const _0x4c50ab=['2262100HrLFng','888573MkBxgf','3131456jXMYBG','4307682AlQFlk','36eGgaWt','3454568ptNLvP','19wcwOnt','dataset','2278143ooBGIK','create','10690dxcGlp'];a69_0x466d=function(){return _0x4c50ab;};return a69_0x466d();}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';export const datasetCrossRelationCreate={'service':a69_0x436a32(0xd8),'command':'cross-relation-create','description':'Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','risk':'write','strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x4fb5cb=>validateCrossRelation(_0x4fb5cb,'create'),'dryRun':_0x1a30c8=>previewCrossRelation(_0x1a30c8,a69_0x436a32(0xda)),'execute':_0x44522f=>executeCrossRelation(_0x44522f,a69_0x436a32(0xda),createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x4e8eb9=a70_0x3737;(function(_0x14cbd1,_0x2e18ae){const _0x28c269=a70_0x3737,_0x31e913=_0x14cbd1();while(!![]){try{const _0x507641=-parseInt(_0x28c269(0x1eb))/0x1*(-parseInt(_0x28c269(0x1e8))/0x2)+parseInt(_0x28c269(0x1f0))/0x3*(-parseInt(_0x28c269(0x1ef))/0x4)+parseInt(_0x28c269(0x1ea))/0x5+parseInt(_0x28c269(0x1f3))/0x6+parseInt(_0x28c269(0x1ee))/0x7*(-parseInt(_0x28c269(0x1ec))/0x8)+parseInt(_0x28c269(0x1e9))/0x9*(-parseInt(_0x28c269(0x1f4))/0xa)+parseInt(_0x28c269(0x1e7))/0xb;if(_0x507641===_0x2e18ae)break;else _0x31e913['push'](_0x31e913['shift']());}catch(_0x27150a){_0x31e913['push'](_0x31e913['shift']());}}}(a70_0x5b59,0x2cd5f));function a70_0x3737(_0x24b6e8,_0xd3c58e){_0x24b6e8=_0x24b6e8-0x1e7;const _0x5b5916=a70_0x5b59();let _0x373733=_0x5b5916[_0x24b6e8];return _0x373733;}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_0x5b59(){const _0xb78ac7=['Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','670986yBNQfg','1490bhgxbD','269214SOEtKM','525622cdRFve','1638qullWB','1320485wYQgyI','1LhIVIQ','40AsRLdW','delete','402115edNUOE','660892EDYfCn','3wvAWdT','high-risk-write'];a70_0x5b59=function(){return _0xb78ac7;};return a70_0x5b59();}export const datasetCrossRelationDelete={'service':'dataset','command':'cross-relation-delete','description':a70_0x4e8eb9(0x1f2),'risk':a70_0x4e8eb9(0x1f1),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x2f6917=>validateCrossRelation(_0x2f6917,a70_0x4e8eb9(0x1ed)),'dryRun':_0xa31fef=>previewCrossRelation(_0xa31fef,a70_0x4e8eb9(0x1ed)),'execute':_0x474a89=>executeCrossRelation(_0x474a89,a70_0x4e8eb9(0x1ed),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a71_0x1bffff=a71_0x280a;function a71_0x280a(_0x21aa3b,_0x4c220d){_0x21aa3b=_0x21aa3b-0x168;const _0x27f68b=a71_0x27f6();let _0x280ac0=_0x27f68b[_0x21aa3b];return _0x280ac0;}function a71_0x27f6(){const _0x24ac0f=['length','dataset','2585534zKLWEk','list','544glMwDn','2973470RPtxrp','2NcbUYA','866163rgMkZj','207193AnWzet','\x20relation(s)','7460canPEz','9HNSZXG','770376lDKckq','2341184lcUrlL'];a71_0x27f6=function(){return _0x24ac0f;};return a71_0x27f6();}(function(_0x477a60,_0x5548ba){const _0x66494d=a71_0x280a,_0x3a5d74=_0x477a60();while(!![]){try{const _0x42f362=parseInt(_0x66494d(0x174))/0x1+parseInt(_0x66494d(0x172))/0x2*(parseInt(_0x66494d(0x173))/0x3)+-parseInt(_0x66494d(0x170))/0x4*(-parseInt(_0x66494d(0x168))/0x5)+-parseInt(_0x66494d(0x16a))/0x6+-parseInt(_0x66494d(0x16e))/0x7+-parseInt(_0x66494d(0x16b))/0x8+-parseInt(_0x66494d(0x169))/0x9*(-parseInt(_0x66494d(0x171))/0xa);if(_0x42f362===_0x5548ba)break;else _0x3a5d74['push'](_0x3a5d74['shift']());}catch(_0x2b0eac){_0x3a5d74['push'](_0x3a5d74['shift']());}}}(a71_0x27f6,0x323c7));import{queryCrossDbRelations}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CROSS_RELATION_DBLINK_FLAG,CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG}from'../../commands/common/flags.js';import{projectCrossRelation,resolveCrossRelationQuery,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationList={'service':a71_0x1bffff(0x16d),'command':'cross-relation-list','description':'List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','risk':'read','strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[{...CROSS_RELATION_FROM_DATASET_FLAG,'required':![]},CROSS_RELATION_DBLINK_FLAG,{...CROSS_RELATION_FROM_COLUMN_FLAG,'required':![]},APPCODE_FLAG_OPTIONAL],'validate':async _0x1ab303=>validateCrossRelation(_0x1ab303,a71_0x1bffff(0x16f)),async 'execute'(_0x5b4ac8){const _0x527214=a71_0x1bffff,_0x22a9c1=await resolveCrossRelationQuery(_0x5b4ac8),_0x243b12=await queryCrossDbRelations(_0x22a9c1);return{'ok':!![],'data':{'appCode':_0x5b4ac8['appCode'],'selector':_0x22a9c1,'total':_0x243b12['length'],'relations':_0x243b12['map'](projectCrossRelation)},'message':'Cross-database\x20relations:\x20'+_0x243b12[_0x527214(0x16c)]+_0x527214(0x175)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a72_0x579e(_0x2e65a7,_0x2e7173){_0x2e65a7=_0x2e65a7-0xa8;const _0xe0f479=a72_0xe0f4();let _0x579e1f=_0xe0f479[_0x2e65a7];return _0x579e1f;}const a72_0x437a82=a72_0x579e;(function(_0x3f4da2,_0x427596){const _0x5b9d68=a72_0x579e,_0x1f4c21=_0x3f4da2();while(!![]){try{const _0x360333=parseInt(_0x5b9d68(0xfe))/0x1+parseInt(_0x5b9d68(0xe8))/0x2*(-parseInt(_0x5b9d68(0xde))/0x3)+-parseInt(_0x5b9d68(0xbf))/0x4+-parseInt(_0x5b9d68(0xab))/0x5*(parseInt(_0x5b9d68(0xfc))/0x6)+-parseInt(_0x5b9d68(0xbc))/0x7+-parseInt(_0x5b9d68(0xce))/0x8*(-parseInt(_0x5b9d68(0xf4))/0x9)+parseInt(_0x5b9d68(0xc4))/0xa;if(_0x360333===_0x427596)break;else _0x1f4c21['push'](_0x1f4c21['shift']());}catch(_0x2334fa){_0x1f4c21['push'](_0x1f4c21['shift']());}}}(a72_0xe0f4,0x18d87));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(_0x545a8d,_0x37d361){const _0x3e96fb=a72_0x579e,_0x2f6f1d=_0x545a8d[_0x3e96fb(0xe7)](_0x37d361)['trim']();if(!_0x2f6f1d)throw CliErrors[_0x3e96fb(0xc5)](_0x37d361);return _0x2f6f1d;}function explicitDblink(_0x496ea8){const _0x2611b6=a72_0x579e,_0x3cb94a=_0x496ea8[_0x2611b6(0xeb)]('from-dblink-id');if(_0x3cb94a===undefined||_0x3cb94a===null)return undefined;const _0x5d99a8=Number(_0x3cb94a);if(!Number[_0x2611b6(0xc3)](_0x5d99a8)||_0x5d99a8<=0x0)throw CliErrors[_0x2611b6(0xb4)](_0x2611b6(0xe0));return _0x5d99a8;}export function validateCrossRelation(_0x1af598,_0x33ad19){const _0x1b2096=a72_0x579e,_0x92099e=explicitDblink(_0x1af598);if(_0x33ad19===_0x1b2096(0xcd)){if(!_0x1af598[_0x1b2096(0xe7)](_0x1b2096(0xc2))[_0x1b2096(0xd6)]()&&_0x92099e===undefined)throw CliErrors[_0x1b2096(0xb4)](_0x1b2096(0xd3));return;}required(_0x1af598,'from-datasetcode'),required(_0x1af598,_0x1b2096(0xc9));if(_0x33ad19!==_0x1b2096(0xd8)){required(_0x1af598,'to-datasetcode'),required(_0x1af598,'to-column');const _0x2ed52c=_0x1af598[_0x1b2096(0xe7)](_0x1b2096(0xc6))[_0x1b2096(0xd6)]();if(_0x2ed52c&&!CROSS_RELATION_CARDINALITY_FLAG[_0x1b2096(0xc8)][_0x1b2096(0xb9)](_0x2ed52c))throw CliErrors[_0x1b2096(0xb4)](_0x1b2096(0xf2));}}async function resolveEndpoint(_0x522cc5){const _0x12a9d=a72_0x579e,_0x4ebd51=await getDatasetDetail(_0x522cc5),_0x2ac89a=_0x4ebd51?.[_0x12a9d(0xbe)]??{};if((_0x4ebd51?.[_0x12a9d(0xb6)]??_0x2ac89a[_0x12a9d(0xe9)])!=='DB_TABLE')throw CliErrors['validation'](_0x12a9d(0xa8)+_0x522cc5+_0x12a9d(0xaa));const _0x1d67df=_0x4ebd51[_0x12a9d(0xb1)]??_0x4ebd51[_0x12a9d(0xb0)]??{};let _0x3f9a1b=_0x4ebd51[_0x12a9d(0xdd)]??_0x2ac89a['extend']??{};if(typeof _0x3f9a1b===_0x12a9d(0xd0))try{_0x3f9a1b=_0x3f9a1b[_0x12a9d(0xd6)]()?JSON[_0x12a9d(0xcb)](_0x3f9a1b):{};}catch{throw CliErrors['validation'](_0x12a9d(0xa8)+_0x522cc5+_0x12a9d(0xfb));}const _0x4fc4c0=Number(_0x3f9a1b?.[_0x12a9d(0xf1)]?.['dbId']??_0x4ebd51[_0x12a9d(0xf1)]?.[_0x12a9d(0xc7)]??_0x2ac89a['storageProfile']?.[_0x12a9d(0xc7)]??_0x1d67df[_0x12a9d(0xc7)]??_0x2ac89a['dbId']??_0x4ebd51['dbId']),_0x208e41=String(_0x4ebd51[_0x12a9d(0xe6)]??_0x2ac89a[_0x12a9d(0xe6)]??_0x1d67df['tableName']??'')[_0x12a9d(0xd6)]();if(!Number[_0x12a9d(0xc3)](_0x4fc4c0)||_0x4fc4c0<=0x0||!_0x208e41)throw CliErrors[_0x12a9d(0xb4)]('Dataset\x20'+_0x522cc5+_0x12a9d(0xae));return{'datasetCode':_0x522cc5,'dblinkId':_0x4fc4c0,'table':_0x208e41};}export async function resolveCrossRelationQuery(_0x3a11de){const _0x38a602=a72_0x579e,_0x18f79a=_0x3a11de['str'](_0x38a602(0xc2))[_0x38a602(0xd6)](),_0x8f4dea=explicitDblink(_0x3a11de),_0x1ab808=_0x18f79a?await resolveEndpoint(_0x18f79a):undefined;if(_0x1ab808&&_0x8f4dea!==undefined&&_0x1ab808[_0x38a602(0xcc)]!==_0x8f4dea)throw CliErrors['validation'](_0x38a602(0xdb));const _0x2408da=_0x1ab808?.[_0x38a602(0xcc)]??_0x8f4dea;if(_0x2408da===undefined)throw CliErrors[_0x38a602(0xb4)]('Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.');return{'appCode':_0x3a11de[_0x38a602(0xd1)],'fromDblinkId':_0x2408da,..._0x18f79a?{'fromDatasetCode':_0x18f79a}:{},..._0x3a11de['str']('from-column')[_0x38a602(0xd6)]()?{'fromField':_0x3a11de[_0x38a602(0xe7)]('from-column')['trim']()}:{}};}export function projectCrossRelation(_0xcf0936){const _0x1059ce=a72_0x579e;return{'relationId':_0xcf0936[_0x1059ce(0xfd)],'from':{'source':_0x1059ce(0xda),'datasetCode':_0xcf0936[_0x1059ce(0xad)],'datasetName':_0xcf0936[_0x1059ce(0xff)],'dblinkId':_0xcf0936[_0x1059ce(0xa9)],'table':_0xcf0936[_0x1059ce(0xed)],'field':_0xcf0936[_0x1059ce(0xec)]},'to':{'source':_0x1059ce(0xda),'datasetCode':_0xcf0936[_0x1059ce(0xe2)],'datasetName':_0xcf0936['toDatasetName'],'dblinkId':_0xcf0936[_0x1059ce(0xb5)],'table':_0xcf0936['toTableName'],'field':_0xcf0936[_0x1059ce(0xf7)],'labelField':_0xcf0936[_0x1059ce(0xb3)]},'relation':{'cardinality':_0xcf0936['cardinality'],'relationType':_0xcf0936[_0x1059ce(0xd4)]}};}function ambiguity(_0x4f6793){const _0x113178=a72_0x579e,_0x540d52=CliErrors[_0x113178(0xb4)](_0x113178(0xcf),_0x113178(0xc1));return Object[_0x113178(0xc0)](_0x540d52,_0x113178(0xe3),{'value':{'candidates':_0x4f6793['map'](projectCrossRelation)}}),_0x540d52;}const sameName=(_0x1bd27f,_0x40a1e0)=>_0x1bd27f[a72_0x437a82(0xb2)]()===_0x40a1e0[a72_0x437a82(0xb2)]();function matchesEndpoint(_0x1f2674,_0x1c5bfd,_0x483b7e,_0x3d3eec,_0x2998d5){const _0x36591e=a72_0x437a82;return _0x1f2674['fromDblinkId']===_0x1c5bfd[_0x36591e(0xcc)]&&sameName(_0x1f2674[_0x36591e(0xed)],_0x1c5bfd[_0x36591e(0xf3)])&&sameName(_0x1f2674[_0x36591e(0xec)],_0x483b7e)&&_0x1f2674[_0x36591e(0xb5)]===_0x3d3eec['dblinkId']&&sameName(_0x1f2674['toTableName'],_0x3d3eec[_0x36591e(0xf3)])&&sameName(_0x1f2674[_0x36591e(0xf7)],_0x2998d5);}export async function prepareCrossRelation(_0x1bc6e7,_0x2348e1){const _0x3bd8bf=a72_0x437a82,_0x117123=await resolveEndpoint(required(_0x1bc6e7,_0x3bd8bf(0xc2))),_0x2442dd=explicitDblink(_0x1bc6e7);if(_0x2442dd!==undefined&&_0x117123['dblinkId']!==_0x2442dd)throw CliErrors[_0x3bd8bf(0xb4)](_0x3bd8bf(0xdb));const _0x593861={'appCode':_0x1bc6e7['appCode'],'fromDatasetCode':_0x117123[_0x3bd8bf(0xef)],'fromField':required(_0x1bc6e7,_0x3bd8bf(0xc9)),..._0x2442dd!==undefined?{'fromDblinkId':_0x2442dd}:{}},_0x46d43a={'appCode':_0x1bc6e7['appCode'],'fromDblinkId':_0x117123[_0x3bd8bf(0xcc)],'fromDatasetCode':_0x117123[_0x3bd8bf(0xef)],'fromField':_0x593861[_0x3bd8bf(0xec)]},_0x4333be=await queryCrossDbRelations(_0x46d43a);let _0x11376e=null;if(_0x2348e1!==_0x3bd8bf(0xf9)){if(_0x4333be[_0x3bd8bf(0xac)]>0x1)throw ambiguity(_0x4333be);_0x11376e=_0x4333be[0x0]??null;if(!_0x11376e)throw CliErrors[_0x3bd8bf(0xb4)](_0x3bd8bf(0xca));}if(_0x2348e1==='delete')return{'operation':_0x2348e1,'from':_0x117123,'query':_0x46d43a,'body':_0x593861,'before':_0x11376e};const _0x23cded=await resolveEndpoint(required(_0x1bc6e7,'to-datasetcode'));if(_0x117123[_0x3bd8bf(0xcc)]===_0x23cded[_0x3bd8bf(0xcc)])throw CliErrors['validation'](_0x3bd8bf(0xd5));const _0x522119=_0x1bc6e7['str'](_0x3bd8bf(0xe1))['trim'](),_0x62130b=_0x1bc6e7[_0x3bd8bf(0xe7)](_0x3bd8bf(0xc6))[_0x3bd8bf(0xd6)](),_0x100b71={..._0x593861,'toDatasetCode':_0x23cded['datasetCode'],'toField':required(_0x1bc6e7,'to-column'),..._0x522119?{'refTableLabelName':_0x522119}:{},..._0x62130b?{'cardinality':_0x62130b}:{}};if(_0x4333be['some'](_0x306a47=>_0x306a47[_0x3bd8bf(0xfd)]!==_0x11376e?.[_0x3bd8bf(0xfd)]&&matchesEndpoint(_0x306a47,_0x117123,_0x100b71['fromField'],_0x23cded,_0x100b71[_0x3bd8bf(0xf7)])))throw CliErrors[_0x3bd8bf(0xb4)](_0x3bd8bf(0xb7));return{'operation':_0x2348e1,'from':_0x117123,'to':_0x23cded,'query':_0x46d43a,'body':_0x100b71,'before':_0x11376e,'expectedLabel':_0x522119||_0x11376e?.[_0x3bd8bf(0xb3)]||_0x100b71['toField'],'expectedCardinality':_0x62130b||_0x11376e?.[_0x3bd8bf(0xc6)]||null};}function mutationData(_0xe9f69d,_0x287b1d,_0x427416){const _0x4b4604=a72_0x437a82,{operation:_0x52b3f1,body:_0x5e6c72,before:_0x3d316c}=_0xe9f69d;return{'operation':_0x52b3f1,'selector':{'appCode':_0x5e6c72[_0x4b4604(0xd1)],'from':{'datasetCode':_0x5e6c72[_0x4b4604(0xad)],'field':_0x5e6c72[_0x4b4604(0xec)],'dblinkId':_0xe9f69d[_0x4b4604(0xe5)][_0x4b4604(0xcc)]}},'before':_0x3d316c?projectCrossRelation(_0x3d316c):null,'after':_0x427416,'dryRun':_0x287b1d,'backend':{'method':_0x4b4604(0xba),'path':CROSS_DB_RELATION_PATHS[_0x52b3f1]},'warnings':_0x52b3f1===_0x4b4604(0xd2)&&!_0x5e6c72['refTableLabelName']?[{'code':_0x4b4604(0xb8),'message':'The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.'}]:[]};}export async function previewCrossRelation(_0x5808bb,_0x4539fc){const _0x176132=a72_0x437a82,_0x3e76d4=await prepareCrossRelation(_0x5808bb,_0x4539fc),_0x2ab988=_0x3e76d4[_0x176132(0xdf)],_0x4471f6=_0x4539fc===_0x176132(0xd8)?null:{..._0x3e76d4[_0x176132(0xfa)]?{'relationId':_0x3e76d4['before'][_0x176132(0xfd)]}:{},'from':{'datasetCode':_0x3e76d4[_0x176132(0xe5)][_0x176132(0xef)],'dblinkId':_0x3e76d4[_0x176132(0xe5)][_0x176132(0xcc)],'table':_0x3e76d4[_0x176132(0xe5)]['table'],'field':_0x2ab988['fromField']},'to':{'datasetCode':_0x3e76d4['to'][_0x176132(0xef)],'dblinkId':_0x3e76d4['to'][_0x176132(0xcc)],'table':_0x3e76d4['to']['table'],'field':_0x2ab988[_0x176132(0xf7)],'labelField':_0x3e76d4[_0x176132(0xd9)]},'relation':{'cardinality':_0x3e76d4[_0x176132(0xe4)],'relationType':0x2}};return{...mutationData(_0x3e76d4,!![],null),'after':_0x4471f6,'method':_0x176132(0xba),'url':CROSS_DB_RELATION_PATHS[_0x4539fc],'body':_0x3e76d4[_0x176132(0xdf)],'description':_0x176132(0xbd)+_0x4539fc+_0x176132(0xd7)+_0x2ab988[_0x176132(0xad)]+'.'+_0x2ab988[_0x176132(0xec)]};}function a72_0xe0f4(){const _0x300ba4=['442500gnPISI','defineProperty','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','from-datasetcode','isSafeInteger','4877940NJqgNK','flagMissing','cardinality','dbId','enum','from-column','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','parse','dblinkId','list','8WevlON','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','string','appCode','update','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','relationType','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','trim','\x20a\x20cross-database\x20relation\x20for\x20','delete','expectedLabel','DB_TABLE','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','\x20write\x20was\x20not\x20verified.','extend','843kKGWYq','body','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','to-label-column','toDatasetCode','data','expectedCardinality','from','tableName','str','1412eamowM','sourceType','filter','flag','fromField','fromTableName','\x20verified.','datasetCode','catch','storageProfile','Invalid\x20--cardinality.','table','1695159JXGCTe','Cross-database\x20relation\x20','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','toField','matched','create','before','\x20has\x20invalid\x20storage\x20configuration.','18dzhIzW','relationId','36592pSeSCP','fromDatasetName','map','Dataset\x20','fromDblinkId','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','265015tAJCjY','length','fromDatasetCode','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','query','dbtable','dbtableConfig','toLowerCase','refTableLabelName','validation','toDblinkId','source','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','label_inherited','includes','POST','apiError','1000650MZNMRA','Would\x20','dataset'];a72_0xe0f4=function(){return _0x300ba4;};return a72_0xe0f4();}export async function executeCrossRelation(_0x70f857,_0x1a379a,_0x8abb98){const _0x269daa=a72_0x437a82,_0x182482=await prepareCrossRelation(_0x70f857,_0x1a379a);try{await _0x8abb98(_0x182482[_0x269daa(0xdf)]);}catch(_0x1c2235){if(_0x1c2235 instanceof CliError&&_0x1c2235['message'][_0x269daa(0xb9)]('multiple\x20cross-database\x20relations\x20matched')){const _0x500ca0=await queryCrossDbRelations(_0x182482[_0x269daa(0xaf)])[_0x269daa(0xf0)](()=>[]);throw ambiguity(_0x500ca0);}throw _0x1c2235;}let _0x114e41=[],_0x11ab08,_0xc803f3=![];try{_0x114e41=await queryCrossDbRelations(_0x182482[_0x269daa(0xaf)]);if(_0x1a379a===_0x269daa(0xd8))_0xc803f3=!_0x114e41['some'](_0x55eeae=>_0x55eeae[_0x269daa(0xfd)]===_0x182482[_0x269daa(0xfa)][_0x269daa(0xfd)]);else{const _0x2b7845=_0x182482['body'],_0x310d22=_0x114e41[_0x269daa(0xea)](_0x315ff7=>matchesEndpoint(_0x315ff7,_0x182482[_0x269daa(0xe5)],_0x2b7845[_0x269daa(0xec)],_0x182482['to'],_0x2b7845[_0x269daa(0xf7)])&&(_0x1a379a==='create'||_0x315ff7[_0x269daa(0xfd)]===_0x182482[_0x269daa(0xfa)][_0x269daa(0xfd)]));_0x11ab08=_0x310d22[_0x269daa(0xac)]===0x1?_0x310d22[0x0]:undefined,_0xc803f3=!!_0x11ab08&&_0x11ab08[_0x269daa(0xb3)]===_0x182482[_0x269daa(0xd9)]&&_0x11ab08[_0x269daa(0xc6)]===_0x182482[_0x269daa(0xe4)]&&_0x11ab08['relationType']===0x2;}}catch{}const _0x3a535c={...mutationData(_0x182482,![],_0x11ab08?projectCrossRelation(_0x11ab08):null),'verification':{'status':_0xc803f3?_0x269daa(0xf8):'unconfirmed','verified':_0xc803f3}};if(!_0xc803f3){const _0x3fa86d=CliErrors[_0x269daa(0xbb)](_0x269daa(0xf5)+_0x1a379a+_0x269daa(0xdc),_0x269daa(0xf6));Object['defineProperty'](_0x3fa86d,_0x269daa(0xe3),{'value':{..._0x3a535c,'candidates':_0x114e41[_0x269daa(0x100)](projectCrossRelation)}});throw _0x3fa86d;}return{'ok':!![],'data':_0x3a535c,'message':_0x269daa(0xf5)+_0x1a379a+_0x269daa(0xee)};}
|
|
1
|
+
const a72_0x281c24=a72_0x27e5;function a72_0x12fb(){const _0x50b80d=['toTableName','query','to-datasetcode','parse','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','16jWoMRe','Dataset\x20','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','enum','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','toDatasetCode','relationId','extend','source','1001168mIWMAC','toLowerCase','appCode','data','6dkbYWJ','\x20a\x20cross-database\x20relation\x20for\x20','from-dblink-id','144790CAomkb','expectedCardinality','from-datasetcode','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','2821340JLDDyt','toDblinkId','dataset','unconfirmed','filter','length','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','refTableLabelName','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','DB_TABLE','cardinality','fromField','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','map','flagMissing','\x20verified.','fromDblinkId','apiError','datasetCode','dbtable','create','relationType','delete','\x20has\x20invalid\x20storage\x20configuration.','list','label_inherited','to-label-column','isSafeInteger','5896890fxlsFb','2524236oEvVzx','fromDatasetCode','message','flag','trim','str','dblinkId','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','sourceType','catch','table','expectedLabel','dbtableConfig','from-column','validation','fromTableName','from','storageProfile','before','includes','16ZxoTgm','2648821xVjliT','POST','tableName','\x20write\x20was\x20not\x20verified.','116306GuVMhX','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','matched','toField','Invalid\x20--cardinality.','dbId','defineProperty','body','string','Cross-database\x20relation\x20','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.'];a72_0x12fb=function(){return _0x50b80d;};return a72_0x12fb();}(function(_0x4667be,_0x3c9071){const _0x4694b2=a72_0x27e5,_0x3162fb=_0x4667be();while(!![]){try{const _0xd0b2a4=-parseInt(_0x4694b2(0xf0))/0x1*(-parseInt(_0x4694b2(0xeb))/0x2)+parseInt(_0x4694b2(0xd7))/0x3+parseInt(_0x4694b2(0x101))/0x4*(-parseInt(_0x4694b2(0x111))/0x5)+-parseInt(_0x4694b2(0x10e))/0x6*(parseInt(_0x4694b2(0xec))/0x7)+parseInt(_0x4694b2(0x10a))/0x8+-parseInt(_0x4694b2(0xd6))/0x9+-parseInt(_0x4694b2(0x115))/0xa;if(_0xd0b2a4===_0x3c9071)break;else _0x3162fb['push'](_0x3162fb['shift']());}catch(_0x4fe67b){_0x3162fb['push'](_0x3162fb['shift']());}}}(a72_0x12fb,0x71a13));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(_0x2509e4,_0x39b93f){const _0x2b7c6c=a72_0x27e5,_0x5ef264=_0x2509e4[_0x2b7c6c(0xdc)](_0x39b93f)['trim']();if(!_0x5ef264)throw CliErrors[_0x2b7c6c(0x124)](_0x39b93f);return _0x5ef264;}function explicitDblink(_0x421767){const _0x19fa9d=a72_0x27e5,_0x17c814=_0x421767[_0x19fa9d(0xda)](_0x19fa9d(0x110));if(_0x17c814===undefined||_0x17c814===null)return undefined;const _0x298d12=Number(_0x17c814);if(!Number[_0x19fa9d(0xd5)](_0x298d12)||_0x298d12<=0x0)throw CliErrors[_0x19fa9d(0xe5)](_0x19fa9d(0x11d));return _0x298d12;}export function validateCrossRelation(_0x26dbe2,_0x3464b8){const _0x42671d=a72_0x27e5,_0x34f4ef=explicitDblink(_0x26dbe2);if(_0x3464b8===_0x42671d(0x12e)){if(!_0x26dbe2[_0x42671d(0xdc)]('from-datasetcode')[_0x42671d(0xdb)]()&&_0x34f4ef===undefined)throw CliErrors[_0x42671d(0xe5)](_0x42671d(0x122));return;}required(_0x26dbe2,_0x42671d(0x113)),required(_0x26dbe2,_0x42671d(0xe4));if(_0x3464b8!==_0x42671d(0x12c)){required(_0x26dbe2,_0x42671d(0xfe)),required(_0x26dbe2,'to-column');const _0x170ab8=_0x26dbe2[_0x42671d(0xdc)](_0x42671d(0x120))[_0x42671d(0xdb)]();if(_0x170ab8&&!CROSS_RELATION_CARDINALITY_FLAG[_0x42671d(0x104)][_0x42671d(0xea)](_0x170ab8))throw CliErrors[_0x42671d(0xe5)](_0x42671d(0xf4));}}async function resolveEndpoint(_0xdf35d3){const _0x52cdd7=a72_0x27e5,_0x1c0aad=await getDatasetDetail(_0xdf35d3),_0x33585f=_0x1c0aad?.[_0x52cdd7(0x117)]??{};if((_0x1c0aad?.[_0x52cdd7(0x109)]??_0x33585f[_0x52cdd7(0xdf)])!==_0x52cdd7(0x11f))throw CliErrors[_0x52cdd7(0xe5)](_0x52cdd7(0x102)+_0xdf35d3+_0x52cdd7(0xfb));const _0x3a2359=_0x1c0aad[_0x52cdd7(0xe3)]??_0x1c0aad[_0x52cdd7(0x129)]??{};let _0x423411=_0x1c0aad['extend']??_0x33585f[_0x52cdd7(0x108)]??{};if(typeof _0x423411===_0x52cdd7(0xf8))try{_0x423411=_0x423411[_0x52cdd7(0xdb)]()?JSON[_0x52cdd7(0xff)](_0x423411):{};}catch{throw CliErrors['validation']('Dataset\x20'+_0xdf35d3+_0x52cdd7(0x12d));}const _0x270f19=Number(_0x423411?.[_0x52cdd7(0xe8)]?.[_0x52cdd7(0xf5)]??_0x1c0aad[_0x52cdd7(0xe8)]?.[_0x52cdd7(0xf5)]??_0x33585f[_0x52cdd7(0xe8)]?.['dbId']??_0x3a2359[_0x52cdd7(0xf5)]??_0x33585f[_0x52cdd7(0xf5)]??_0x1c0aad[_0x52cdd7(0xf5)]),_0x461222=String(_0x1c0aad[_0x52cdd7(0xee)]??_0x33585f[_0x52cdd7(0xee)]??_0x3a2359[_0x52cdd7(0xee)]??'')[_0x52cdd7(0xdb)]();if(!Number[_0x52cdd7(0xd5)](_0x270f19)||_0x270f19<=0x0||!_0x461222)throw CliErrors[_0x52cdd7(0xe5)]('Dataset\x20'+_0xdf35d3+_0x52cdd7(0xfa));return{'datasetCode':_0xdf35d3,'dblinkId':_0x270f19,'table':_0x461222};}function a72_0x27e5(_0xcaa4b0,_0x479f00){_0xcaa4b0=_0xcaa4b0-0xd3;const _0x12fbf9=a72_0x12fb();let _0x27e5b5=_0x12fbf9[_0xcaa4b0];return _0x27e5b5;}export async function resolveCrossRelationQuery(_0x2c0547){const _0x59f5be=a72_0x27e5,_0x1b6c5d=_0x2c0547[_0x59f5be(0xdc)]('from-datasetcode')[_0x59f5be(0xdb)](),_0x30ce70=explicitDblink(_0x2c0547),_0x363490=_0x1b6c5d?await resolveEndpoint(_0x1b6c5d):undefined;if(_0x363490&&_0x30ce70!==undefined&&_0x363490['dblinkId']!==_0x30ce70)throw CliErrors[_0x59f5be(0xe5)](_0x59f5be(0xde));const _0x406891=_0x363490?.[_0x59f5be(0xdd)]??_0x30ce70;if(_0x406891===undefined)throw CliErrors['validation']('Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.');return{'appCode':_0x2c0547[_0x59f5be(0x10c)],'fromDblinkId':_0x406891,..._0x1b6c5d?{'fromDatasetCode':_0x1b6c5d}:{},..._0x2c0547[_0x59f5be(0xdc)](_0x59f5be(0xe4))[_0x59f5be(0xdb)]()?{'fromField':_0x2c0547[_0x59f5be(0xdc)](_0x59f5be(0xe4))['trim']()}:{}};}export function projectCrossRelation(_0x33f5b5){const _0x396940=a72_0x27e5;return{'relationId':_0x33f5b5[_0x396940(0x107)],'from':{'source':_0x396940(0x11f),'datasetCode':_0x33f5b5['fromDatasetCode'],'datasetName':_0x33f5b5['fromDatasetName'],'dblinkId':_0x33f5b5[_0x396940(0x126)],'table':_0x33f5b5[_0x396940(0xe6)],'field':_0x33f5b5[_0x396940(0x121)]},'to':{'source':_0x396940(0x11f),'datasetCode':_0x33f5b5[_0x396940(0x106)],'datasetName':_0x33f5b5['toDatasetName'],'dblinkId':_0x33f5b5[_0x396940(0x116)],'table':_0x33f5b5[_0x396940(0xfc)],'field':_0x33f5b5[_0x396940(0xf3)],'labelField':_0x33f5b5[_0x396940(0x11c)]},'relation':{'cardinality':_0x33f5b5[_0x396940(0x120)],'relationType':_0x33f5b5['relationType']}};}function ambiguity(_0x4d671e){const _0x476eee=a72_0x27e5,_0x2efb61=CliErrors[_0x476eee(0xe5)](_0x476eee(0xf1),_0x476eee(0x105));return Object[_0x476eee(0xf6)](_0x2efb61,_0x476eee(0x10d),{'value':{'candidates':_0x4d671e[_0x476eee(0x123)](projectCrossRelation)}}),_0x2efb61;}const sameName=(_0x1ba03f,_0x30278e)=>_0x1ba03f[a72_0x281c24(0x10b)]()===_0x30278e[a72_0x281c24(0x10b)]();function matchesEndpoint(_0x11e84d,_0x330372,_0x243fd2,_0x586487,_0x145a98){const _0x62e9e9=a72_0x281c24;return _0x11e84d[_0x62e9e9(0x126)]===_0x330372[_0x62e9e9(0xdd)]&&sameName(_0x11e84d['fromTableName'],_0x330372['table'])&&sameName(_0x11e84d[_0x62e9e9(0x121)],_0x243fd2)&&_0x11e84d[_0x62e9e9(0x116)]===_0x586487['dblinkId']&&sameName(_0x11e84d[_0x62e9e9(0xfc)],_0x586487[_0x62e9e9(0xe1)])&&sameName(_0x11e84d[_0x62e9e9(0xf3)],_0x145a98);}export async function prepareCrossRelation(_0x413d32,_0x556e9a){const _0x1a1214=a72_0x281c24,_0x3980e4=await resolveEndpoint(required(_0x413d32,'from-datasetcode')),_0x24499e=explicitDblink(_0x413d32);if(_0x24499e!==undefined&&_0x3980e4['dblinkId']!==_0x24499e)throw CliErrors[_0x1a1214(0xe5)](_0x1a1214(0xde));const _0x2b925f={'appCode':_0x413d32[_0x1a1214(0x10c)],'fromDatasetCode':_0x3980e4[_0x1a1214(0x128)],'fromField':required(_0x413d32,_0x1a1214(0xe4)),..._0x24499e!==undefined?{'fromDblinkId':_0x24499e}:{}},_0x2bd56a={'appCode':_0x413d32[_0x1a1214(0x10c)],'fromDblinkId':_0x3980e4[_0x1a1214(0xdd)],'fromDatasetCode':_0x3980e4[_0x1a1214(0x128)],'fromField':_0x2b925f[_0x1a1214(0x121)]},_0x48d6d1=await queryCrossDbRelations(_0x2bd56a);let _0x32b2d0=null;if(_0x556e9a!=='create'){if(_0x48d6d1[_0x1a1214(0x11a)]>0x1)throw ambiguity(_0x48d6d1);_0x32b2d0=_0x48d6d1[0x0]??null;if(!_0x32b2d0)throw CliErrors[_0x1a1214(0xe5)](_0x1a1214(0x11e));}if(_0x556e9a==='delete')return{'operation':_0x556e9a,'from':_0x3980e4,'query':_0x2bd56a,'body':_0x2b925f,'before':_0x32b2d0};const _0x94dd1=await resolveEndpoint(required(_0x413d32,_0x1a1214(0xfe)));if(_0x3980e4['dblinkId']===_0x94dd1['dblinkId'])throw CliErrors['validation'](_0x1a1214(0x114));const _0x5af903=_0x413d32[_0x1a1214(0xdc)](_0x1a1214(0xd4))[_0x1a1214(0xdb)](),_0x557272=_0x413d32['str'](_0x1a1214(0x120))['trim'](),_0x113bb8={..._0x2b925f,'toDatasetCode':_0x94dd1[_0x1a1214(0x128)],'toField':required(_0x413d32,'to-column'),..._0x5af903?{'refTableLabelName':_0x5af903}:{},..._0x557272?{'cardinality':_0x557272}:{}};if(_0x48d6d1['some'](_0x23cd98=>_0x23cd98[_0x1a1214(0x107)]!==_0x32b2d0?.[_0x1a1214(0x107)]&&matchesEndpoint(_0x23cd98,_0x3980e4,_0x113bb8[_0x1a1214(0x121)],_0x94dd1,_0x113bb8[_0x1a1214(0xf3)])))throw CliErrors['validation'](_0x1a1214(0x100));return{'operation':_0x556e9a,'from':_0x3980e4,'to':_0x94dd1,'query':_0x2bd56a,'body':_0x113bb8,'before':_0x32b2d0,'expectedLabel':_0x5af903||_0x32b2d0?.[_0x1a1214(0x11c)]||_0x113bb8['toField'],'expectedCardinality':_0x557272||_0x32b2d0?.[_0x1a1214(0x120)]||null};}function mutationData(_0x50b5f4,_0x1be934,_0x3b147a){const _0x3c5395=a72_0x281c24,{operation:_0x143e93,body:_0x5bc2b6,before:_0x23a0e4}=_0x50b5f4;return{'operation':_0x143e93,'selector':{'appCode':_0x5bc2b6[_0x3c5395(0x10c)],'from':{'datasetCode':_0x5bc2b6[_0x3c5395(0xd8)],'field':_0x5bc2b6['fromField'],'dblinkId':_0x50b5f4[_0x3c5395(0xe7)]['dblinkId']}},'before':_0x23a0e4?projectCrossRelation(_0x23a0e4):null,'after':_0x3b147a,'dryRun':_0x1be934,'backend':{'method':_0x3c5395(0xed),'path':CROSS_DB_RELATION_PATHS[_0x143e93]},'warnings':_0x143e93==='update'&&!_0x5bc2b6[_0x3c5395(0x11c)]?[{'code':_0x3c5395(0xd3),'message':_0x3c5395(0x103)}]:[]};}export async function previewCrossRelation(_0x34ef62,_0x27d035){const _0x159429=a72_0x281c24,_0x5c221c=await prepareCrossRelation(_0x34ef62,_0x27d035),_0x1fb2eb=_0x5c221c[_0x159429(0xf7)],_0x370135=_0x27d035===_0x159429(0x12c)?null:{..._0x5c221c[_0x159429(0xe9)]?{'relationId':_0x5c221c[_0x159429(0xe9)][_0x159429(0x107)]}:{},'from':{'datasetCode':_0x5c221c[_0x159429(0xe7)]['datasetCode'],'dblinkId':_0x5c221c[_0x159429(0xe7)][_0x159429(0xdd)],'table':_0x5c221c[_0x159429(0xe7)][_0x159429(0xe1)],'field':_0x1fb2eb[_0x159429(0x121)]},'to':{'datasetCode':_0x5c221c['to'][_0x159429(0x128)],'dblinkId':_0x5c221c['to'][_0x159429(0xdd)],'table':_0x5c221c['to'][_0x159429(0xe1)],'field':_0x1fb2eb[_0x159429(0xf3)],'labelField':_0x5c221c['expectedLabel']},'relation':{'cardinality':_0x5c221c[_0x159429(0x112)],'relationType':0x2}};return{...mutationData(_0x5c221c,!![],null),'after':_0x370135,'method':_0x159429(0xed),'url':CROSS_DB_RELATION_PATHS[_0x27d035],'body':_0x5c221c[_0x159429(0xf7)],'description':'Would\x20'+_0x27d035+_0x159429(0x10f)+_0x1fb2eb[_0x159429(0xd8)]+'.'+_0x1fb2eb[_0x159429(0x121)]};}export async function executeCrossRelation(_0x84f44a,_0x4a30ea,_0x13e835){const _0x5d3e6b=a72_0x281c24,_0x1f9f92=await prepareCrossRelation(_0x84f44a,_0x4a30ea);try{await _0x13e835(_0x1f9f92['body']);}catch(_0x5b1e83){if(_0x5b1e83 instanceof CliError&&_0x5b1e83[_0x5d3e6b(0xd9)][_0x5d3e6b(0xea)]('multiple\x20cross-database\x20relations\x20matched')){const _0x32d6b2=await queryCrossDbRelations(_0x1f9f92[_0x5d3e6b(0xfd)])[_0x5d3e6b(0xe0)](()=>[]);throw ambiguity(_0x32d6b2);}throw _0x5b1e83;}let _0x182470=[],_0x32792a,_0x28c283=![];try{_0x182470=await queryCrossDbRelations(_0x1f9f92[_0x5d3e6b(0xfd)]);if(_0x4a30ea===_0x5d3e6b(0x12c))_0x28c283=!_0x182470['some'](_0x24ad78=>_0x24ad78[_0x5d3e6b(0x107)]===_0x1f9f92[_0x5d3e6b(0xe9)][_0x5d3e6b(0x107)]);else{const _0x2e7290=_0x1f9f92[_0x5d3e6b(0xf7)],_0x59b82d=_0x182470[_0x5d3e6b(0x119)](_0x3da26f=>matchesEndpoint(_0x3da26f,_0x1f9f92[_0x5d3e6b(0xe7)],_0x2e7290['fromField'],_0x1f9f92['to'],_0x2e7290[_0x5d3e6b(0xf3)])&&(_0x4a30ea===_0x5d3e6b(0x12a)||_0x3da26f[_0x5d3e6b(0x107)]===_0x1f9f92[_0x5d3e6b(0xe9)][_0x5d3e6b(0x107)]));_0x32792a=_0x59b82d[_0x5d3e6b(0x11a)]===0x1?_0x59b82d[0x0]:undefined,_0x28c283=!!_0x32792a&&_0x32792a[_0x5d3e6b(0x11c)]===_0x1f9f92[_0x5d3e6b(0xe2)]&&_0x32792a['cardinality']===_0x1f9f92['expectedCardinality']&&_0x32792a[_0x5d3e6b(0x12b)]===0x2;}}catch{}const _0x288a3e={...mutationData(_0x1f9f92,![],_0x32792a?projectCrossRelation(_0x32792a):null),'verification':{'status':_0x28c283?_0x5d3e6b(0xf2):_0x5d3e6b(0x118),'verified':_0x28c283}};if(!_0x28c283){const _0x1e9c4b=CliErrors[_0x5d3e6b(0x127)]('Cross-database\x20relation\x20'+_0x4a30ea+_0x5d3e6b(0xef),_0x5d3e6b(0x11b));Object[_0x5d3e6b(0xf6)](_0x1e9c4b,_0x5d3e6b(0x10d),{'value':{..._0x288a3e,'candidates':_0x182470[_0x5d3e6b(0x123)](projectCrossRelation)}});throw _0x1e9c4b;}return{'ok':!![],'data':_0x288a3e,'message':_0x5d3e6b(0xf9)+_0x4a30ea+_0x5d3e6b(0x125)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a73_0xcb2e7d=a73_0x379e;(function(_0x1e88b6,_0x2054ce){const _0x80f34a=a73_0x379e,_0x36517d=_0x1e88b6();while(!![]){try{const _0x385a3d=-parseInt(_0x80f34a(0x8c))/0x1*(-parseInt(_0x80f34a(0x8f))/0x2)+parseInt(_0x80f34a(0x89))/0x3+-parseInt(_0x80f34a(0x88))/0x4*(-parseInt(_0x80f34a(0x86))/0x5)+-parseInt(_0x80f34a(0x8a))/0x6*(-parseInt(_0x80f34a(0x90))/0x7)+-parseInt(_0x80f34a(0x8d))/0x8+parseInt(_0x80f34a(0x92))/0x9+-parseInt(_0x80f34a(0x8e))/0xa*(parseInt(_0x80f34a(0x93))/0xb);if(_0x385a3d===_0x2054ce)break;else _0x36517d['push'](_0x36517d['shift']());}catch(_0x16ba42){_0x36517d['push'](_0x36517d['shift']());}}}(a73_0x3503,0x45dd3));import{updateCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';function a73_0x379e(_0x34aeac,_0x428da2){_0x34aeac=_0x34aeac-0x85;const _0x350357=a73_0x3503();let _0x379eee=_0x350357[_0x34aeac];return _0x379eee;}export const datasetCrossRelationUpdate={'service':'dataset','command':a73_0xcb2e7d(0x85),'description':a73_0xcb2e7d(0x91),'risk':a73_0xcb2e7d(0x87),'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 _0x594e60=>validateCrossRelation(_0x594e60,'update'),'dryRun':_0x3d40c0=>previewCrossRelation(_0x3d40c0,a73_0xcb2e7d(0x8b)),'execute':_0x295dfc=>executeCrossRelation(_0x295dfc,a73_0xcb2e7d(0x8b),updateCrossDbRelation)};function a73_0x3503(){const _0x109c66=['update','246003iMDjTQ','3888816QIdnYC','70YJIXsx','2ibpbCE','133HuYmsO','Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','4065435SvKCzh','903837eajSmK','cross-relation-update','10UCJhyu','write','20192wanCYU','216213QAvfZg','179226bWMGZr'];a73_0x3503=function(){return _0x109c66;};return a73_0x3503();}
|