@lovrabet/rabetbase-cli 2.5.8 → 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/README.md +6 -6
- 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.d.ts +8 -5
- 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.d.ts +5 -3
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +14 -11
- 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.d.ts +2 -2
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +3 -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/references/rabetbase-kb.md +17 -15
- package/skills/rabetbase/references/rabetbase-rule.md +8 -6
- 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_0x589f6e=a65_0x53f6;(function(_0x39f791,_0x5ab111){const _0x15c1ae=a65_0x53f6,_0x80a4fc=_0x39f791();while(!![]){try{const _0x32d46c=parseInt(_0x15c1ae(0x224))/0x1+parseInt(_0x15c1ae(0x1f1))/0x2*(parseInt(_0x15c1ae(0x233))/0x3)+parseInt(_0x15c1ae(0x22b))/0x4+-parseInt(_0x15c1ae(0x23c))/0x5+parseInt(_0x15c1ae(0x221))/0x6*(parseInt(_0x15c1ae(0x231))/0x7)+-parseInt(_0x15c1ae(0x1f3))/0x8+-parseInt(_0x15c1ae(0x245))/0x9*(parseInt(_0x15c1ae(0x1e1))/0xa);if(_0x32d46c===_0x5ab111)break;else _0x80a4fc['push'](_0x80a4fc['shift']());}catch(_0x2341cd){_0x80a4fc['push'](_0x80a4fc['shift']());}}}(a65_0x2bdb,0x9e6e5));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x589f6e(0x1ef),a65_0x589f6e(0x20c)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x589f6e(0x1f9),'NUMBER',a65_0x589f6e(0x237),a65_0x589f6e(0x248),a65_0x589f6e(0x219),a65_0x589f6e(0x21f),a65_0x589f6e(0x23d),a65_0x589f6e(0x1f0),'ADDRESS',a65_0x589f6e(0x214)]);export function isDatasetBatchDesign(_0x8f8492){const _0x25a292=a65_0x589f6e;return isObject(_0x8f8492)&&_0x8f8492[_0x25a292(0x1e3)]===_0x25a292(0x24b);}export function validateDatasetBatchDesign(_0x2d7e14){const _0x5e8835=a65_0x589f6e;(!isObject(_0x2d7e14)||_0x2d7e14[_0x5e8835(0x1e3)]!=='dataset-batch')&&fail(_0x5e8835(0x1e4));_0x2d7e14[_0x5e8835(0x204)]!==0x1&&fail(_0x5e8835(0x238));const _0x1499db=objectArray(_0x2d7e14[_0x5e8835(0x22c)],_0x5e8835(0x22c),0x1,0x14),_0x354264=objectArray(_0x2d7e14[_0x5e8835(0x1f5)],_0x5e8835(0x1f5),0x0,0xc8),_0x20a878=objectArray(_0x2d7e14['unresolvedRelations'],_0x5e8835(0x1fc),0x0,0xc8),_0xff2b72=new Set(),_0x27beb2=new Map();for(const [_0x5b7bc9,_0x52ab78]of _0x1499db[_0x5e8835(0x1ea)]()){const _0x1ab375=requiredString(_0x52ab78[_0x5e8835(0x206)],_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x200));!LOCAL_KEY['test'](_0x1ab375)&&fail(_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x225)+LOCAL_KEY[_0x5e8835(0x23f)]+'.');_0xff2b72['has'](_0x1ab375)&&fail(_0x5e8835(0x207));_0xff2b72[_0x5e8835(0x1ee)](_0x1ab375);!isObject(_0x52ab78[_0x5e8835(0x247)])&&fail(_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x24e));rejectServerDatasetIdentity(_0x52ab78[_0x5e8835(0x247)],_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x1ff));if(!isObject(_0x52ab78[_0x5e8835(0x247)]['dataset']))fail(_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x243));rejectServerDatasetIdentity(_0x52ab78[_0x5e8835(0x247)][_0x5e8835(0x1ec)],_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x24a)),requiredString(_0x52ab78[_0x5e8835(0x247)][_0x5e8835(0x1ec)][_0x5e8835(0x216)],_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x222));_0x5e8835(0x1f5)in _0x52ab78[_0x5e8835(0x247)]&&(!Array[_0x5e8835(0x1f6)](_0x52ab78['design']['relations'])||_0x52ab78[_0x5e8835(0x247)][_0x5e8835(0x1f5)][_0x5e8835(0x24c)]!==0x0)&&fail('datasets['+_0x5b7bc9+_0x5e8835(0x1e0));const _0x3411e9=objectArray(_0x52ab78[_0x5e8835(0x247)]['fields'],_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x205),0x1,0xc8),_0x58cb4d=new Map();for(const [_0x4237c5,_0x364f40]of _0x3411e9['entries']()){const _0x495892=fieldName(_0x364f40);if(!_0x495892)fail(_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x1df)+_0x4237c5+_0x5e8835(0x215));const _0xae07a8=_0x495892['toLowerCase']();if(_0x58cb4d[_0x5e8835(0x1f2)](_0xae07a8))fail(_0x5e8835(0x226)+_0x1ab375+_0x5e8835(0x249));const _0x762266=stringValue(_0x364f40[_0x5e8835(0x239)]??_0x364f40[_0x5e8835(0x209)])[_0x5e8835(0x1e7)]();if(!SUPPORTED_FIELD_TYPES[_0x5e8835(0x1f2)](_0x762266))fail(_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x1df)+_0x4237c5+'].type\x20is\x20not\x20supported.');_0x58cb4d[_0x5e8835(0x210)](_0xae07a8,_0x762266),[_0x364f40['refTable'],_0x364f40[_0x5e8835(0x244)],_0x364f40[_0x5e8835(0x20f)]][_0x5e8835(0x208)](_0x434785=>stringValue(_0x434785))&&fail('datasets['+_0x5b7bc9+_0x5e8835(0x1df)+_0x4237c5+']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.');}_0x27beb2[_0x5e8835(0x210)](_0x1ab375,_0x58cb4d);}const _0x4dc414=new Set(),_0x549b4d=new Set();for(const [_0x35233f,_0x3ea5c4]of _0x354264[_0x5e8835(0x1ea)]()){const _0x721996=validateRelation(_0x3ea5c4,_0x35233f,_0xff2b72,_0x27beb2);if(_0x4dc414[_0x5e8835(0x1f2)](_0x721996))fail(_0x5e8835(0x213));_0x4dc414[_0x5e8835(0x1ee)](_0x721996);const _0x1e2e17=_0x721996['split']('\x00',0x2)[_0x5e8835(0x1e6)]('\x00');if(_0x549b4d[_0x5e8835(0x1f2)](_0x1e2e17))fail(_0x5e8835(0x1eb));_0x549b4d[_0x5e8835(0x1ee)](_0x1e2e17);}for(const [_0x35f40f,_0x14f704]of _0x20a878[_0x5e8835(0x1ea)]()){requiredString(_0x14f704[_0x5e8835(0x22f)],_0x5e8835(0x21d)+_0x35f40f+_0x5e8835(0x21e)),validateConfidence(_0x14f704[_0x5e8835(0x242)],'unresolvedRelations['+_0x35f40f+_0x5e8835(0x223));}return _0x2d7e14;}export function reconcileBatchResult(_0x213296){const _0x4a8ab5=a65_0x589f6e;if(!isObject(_0x213296))return null;try{const _0x55ab02=stringArray(_0x213296['expectedLocalKeys'],_0x4a8ab5(0x228),0x1,0x14),_0x13f86b=new Set(_0x55ab02);if(_0x13f86b['size']!==_0x55ab02[_0x4a8ab5(0x24c)]||_0x55ab02[_0x4a8ab5(0x208)](_0x354078=>!LOCAL_KEY[_0x4a8ab5(0x1e8)](_0x354078)))return null;const _0x4b0668=objectArray(_0x213296[_0x4a8ab5(0x20a)],_0x4a8ab5(0x20a),0x1,0x14),_0x3cfb51=new Map(),_0x5d646d=new Set();for(const _0x26141f of _0x4b0668){const _0x25a018=requiredString(_0x26141f[_0x4a8ab5(0x206)],_0x4a8ab5(0x235)),_0x2a4ca3=requiredString(_0x26141f[_0x4a8ab5(0x211)]??_0x26141f[_0x4a8ab5(0x1ed)],'createdDatasets[].code');if(_0x3cfb51[_0x4a8ab5(0x1f2)](_0x25a018)||_0x5d646d[_0x4a8ab5(0x1f2)](_0x2a4ca3))return null;_0x3cfb51[_0x4a8ab5(0x210)](_0x25a018,_0x2a4ca3),_0x5d646d[_0x4a8ab5(0x1ee)](_0x2a4ca3);}if(!sameSet(_0x13f86b,new Set(_0x3cfb51[_0x4a8ab5(0x1f8)]())))return null;const _0x56a2db=objectArray(_0x213296['expectedRelations'],_0x4a8ab5(0x23a),0x0,0xc8),_0x462df4=objectArray(_0x213296[_0x4a8ab5(0x1fb)],_0x4a8ab5(0x1fb),0x0,0xc8),_0xdf9859=relationTupleSet(_0x56a2db,![],_0x3cfb51),_0x31d58d=relationTupleSet(_0x462df4,!![],_0x3cfb51);if(!_0xdf9859||!_0x31d58d||!sameSet(_0xdf9859,_0x31d58d))return null;const _0x5298df=objectArray(_0x213296[_0x4a8ab5(0x1fc)],_0x4a8ab5(0x1fc),0x0,0xc8);return{'expectedLocalKeys':_0x55ab02,'expectedRelations':_0x56a2db,'createdDatasets':_0x4b0668,'createdRelations':_0x462df4,'unresolvedRelations':_0x5298df,...isObject(_0x213296[_0x4a8ab5(0x1f4)])?{'metrics':_0x213296[_0x4a8ab5(0x1f4)]}:{}};}catch{return null;}}function validateRelation(_0xa48130,_0x2bbd28,_0x3ef594,_0x556010){const _0x21dbae=a65_0x589f6e,_0x2de03d=_0x21dbae(0x227)+_0x2bbd28+']',_0x148a44=requiredString(_0xa48130['fromDatasetKey'],_0x2de03d+_0x21dbae(0x1fa)),_0xe16075=requiredString(_0xa48130[_0x21dbae(0x229)],_0x2de03d+_0x21dbae(0x21a)),_0x58f533=requiredString(_0xa48130['fromField'],_0x2de03d+'.fromField')[_0x21dbae(0x241)](),_0x4528ea=requiredString(_0xa48130[_0x21dbae(0x23e)],_0x2de03d+'.toField')[_0x21dbae(0x241)]();if(!_0x3ef594['has'](_0x148a44)||!_0x3ef594[_0x21dbae(0x1f2)](_0xe16075))fail(_0x2de03d+'\x20references\x20an\x20unknown\x20dataset\x20localKey.');const _0x25c823=_0x556010[_0x21dbae(0x218)](_0x148a44)?.[_0x21dbae(0x218)](_0x58f533),_0x43223a=_0x556010['get'](_0xe16075)?.[_0x21dbae(0x218)](_0x4528ea);if(_0x25c823===undefined||_0x43223a===undefined)fail(_0x2de03d+_0x21dbae(0x1e9));if(_0x25c823&&_0x43223a&&_0x25c823!==_0x43223a)fail(_0x2de03d+_0x21dbae(0x24d));const _0x4a2ed5=stringValue(_0xa48130['relationType'])||_0x21dbae(0x24f);if(_0x4a2ed5!==_0x21dbae(0x24f))fail(_0x2de03d+_0x21dbae(0x246));const _0x4e6d8c=stringValue(_0xa48130[_0x21dbae(0x220)])||_0x21dbae(0x1ef);if(!SUPPORTED_CARDINALITIES['has'](_0x4e6d8c))fail(_0x2de03d+_0x21dbae(0x22a));return requiredString(_0xa48130[_0x21dbae(0x22f)],_0x2de03d+'.reason'),validateConfidence(_0xa48130[_0x21dbae(0x242)],_0x2de03d+_0x21dbae(0x22e)),tuple(_0x148a44,_0x58f533,_0xe16075,_0x4528ea,_0x21dbae(0x24f),_0x4e6d8c);}function relationTupleSet(_0x3df333,_0x4f8577,_0x513207){const _0x263f1d=a65_0x589f6e,_0x4a8df7=new Set();for(const _0x14e38c of _0x3df333){const _0x50c2be=stringValue(_0x14e38c[_0x263f1d(0x230)]),_0x1855cc=stringValue(_0x14e38c[_0x263f1d(0x229)]),_0x104353=stringValue(_0x14e38c[_0x263f1d(0x1e2)])[_0x263f1d(0x241)](),_0x89f36c=stringValue(_0x14e38c['toField'])[_0x263f1d(0x241)](),_0x3fe714=stringValue(_0x14e38c[_0x263f1d(0x201)]),_0x534726=stringValue(_0x14e38c[_0x263f1d(0x220)]);if(!_0x50c2be||!_0x1855cc||!_0x104353||!_0x89f36c||_0x3fe714!==_0x263f1d(0x24f)||!SUPPORTED_CARDINALITIES[_0x263f1d(0x1f2)](_0x534726))return null;if(!_0x513207[_0x263f1d(0x1f2)](_0x50c2be)||!_0x513207[_0x263f1d(0x1f2)](_0x1855cc))return null;if(_0x4f8577&&(stringValue(_0x14e38c['fromDatasetCode'])!==_0x513207['get'](_0x50c2be)||stringValue(_0x14e38c['toDatasetCode'])!==_0x513207['get'](_0x1855cc)))return null;const _0x29fa31=tuple(_0x50c2be,_0x104353,_0x1855cc,_0x89f36c,_0x3fe714,_0x534726);if(_0x4a8df7['has'](_0x29fa31))return null;_0x4a8df7[_0x263f1d(0x1ee)](_0x29fa31);}return _0x4a8df7;}function rejectServerDatasetIdentity(_0x178d19,_0x2f026){const _0x2a78bf=a65_0x589f6e;for(const _0x337a8a of['id',_0x2a78bf(0x217),_0x2a78bf(0x20e),'code',_0x2a78bf(0x1ed),_0x2a78bf(0x23b)]){if(_0x178d19[_0x337a8a]!==undefined&&_0x178d19[_0x337a8a]!==null&&_0x178d19[_0x337a8a]!=='')fail(_0x2f026+'.'+_0x337a8a+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function objectArray(_0x8e6d47,_0x6405c,_0x32f911,_0x1090ab){const _0x480ff7=a65_0x589f6e;return(!Array[_0x480ff7(0x1f6)](_0x8e6d47)||_0x8e6d47[_0x480ff7(0x24c)]<_0x32f911||_0x8e6d47[_0x480ff7(0x24c)]>_0x1090ab||_0x8e6d47[_0x480ff7(0x208)](_0x14a1e8=>!isObject(_0x14a1e8)))&&fail(_0x6405c+'\x20must\x20contain\x20'+_0x32f911+'..'+_0x1090ab+_0x480ff7(0x1de)),_0x8e6d47;}function stringArray(_0x513595,_0x101e80,_0x69a373,_0x43fe6b){const _0x16954b=a65_0x589f6e;return(!Array['isArray'](_0x513595)||_0x513595['length']<_0x69a373||_0x513595[_0x16954b(0x24c)]>_0x43fe6b||_0x513595[_0x16954b(0x208)](_0x59fe8b=>typeof _0x59fe8b!==_0x16954b(0x22d)||!_0x59fe8b[_0x16954b(0x1e5)]()))&&fail(_0x101e80+_0x16954b(0x240)+_0x69a373+'..'+_0x43fe6b+_0x16954b(0x1fd)),_0x513595;}function requiredString(_0x50cf47,_0x1301bf){const _0x10ea92=a65_0x589f6e,_0x1e7f06=stringValue(_0x50cf47);if(!_0x1e7f06)fail(_0x1301bf+_0x10ea92(0x20b));return _0x1e7f06;}function stringValue(_0x40c04b){const _0x5a5491=a65_0x589f6e;return typeof _0x40c04b===_0x5a5491(0x22d)?_0x40c04b[_0x5a5491(0x1e5)]():'';}function a65_0x2bdb(){const _0x427ba3=['\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','].design.dataset','dataset-batch','length','\x20connects\x20incompatible\x20field\x20types.','].design\x20must\x20be\x20an\x20object.','lookup','\x20objects.','].design.fields[','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','1002640bRtZxW','fromField','kind','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','trim','join','toUpperCase','test','\x20references\x20an\x20unknown\x20field.','entries','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','dataset','datasetCode','add','MANY_TO_ONE','USER','4598fJDTzn','has','7635976EGjFgx','metrics','relations','isArray','number','keys','TEXT','.fromDatasetKey','createdRelations','unresolvedRelations','\x20non-empty\x20strings.','validation','].design','].localKey','relationType','size','name','schemaVersion','].design.fields','localKey','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','some','fieldType','createdDatasets','\x20is\x20required.','ONE_TO_ONE','fieldCode','modelId','refTableLabelField','set','code','isFinite','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','UPLOAD',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','datasetName','datasetId','get','SELECT','.toDatasetKey','\x20must\x20be\x20between\x200\x20and\x201.','every','unresolvedRelations[','].reason','MULTI_SELECT','cardinality','1552416sEWgVr','].design.dataset.datasetName','].confidence','60005wwuMmo','].localKey\x20must\x20match\x20','Dataset\x20','relations[','expectedLocalKeys','toDatasetKey','.cardinality\x20is\x20not\x20supported.','3615868TwpRrw','datasets','string','.confidence','reason','fromDatasetKey','7usxedy','fieldName','771djUAMW','datasets[','createdDatasets[].localKey','map','DATETIME','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','type','expectedRelations','modelCode','47965qeTKou','DATE_RANGE','toField','source','\x20must\x20contain\x20','toLowerCase','confidence','].design.dataset\x20must\x20be\x20an\x20object.','refTableField','18fbhmrM','.relationType\x20must\x20be\x20\x22lookup\x22.','design','BOOLEAN'];a65_0x2bdb=function(){return _0x427ba3;};return a65_0x2bdb();}function fieldName(_0x3ef60d){const _0x4c334b=a65_0x589f6e;return stringValue(_0x3ef60d[_0x4c334b(0x211)]??_0x3ef60d[_0x4c334b(0x20d)]??_0x3ef60d[_0x4c334b(0x203)]??_0x3ef60d[_0x4c334b(0x232)]);}function a65_0x53f6(_0x348619,_0x520a6c){_0x348619=_0x348619-0x1de;const _0x2bdbd0=a65_0x2bdb();let _0x53f695=_0x2bdbd0[_0x348619];return _0x53f695;}function validateConfidence(_0x410413,_0x3d758d){const _0x1a52b0=a65_0x589f6e;_0x410413!==undefined&&_0x410413!==null&&(typeof _0x410413!==_0x1a52b0(0x1f7)||!Number[_0x1a52b0(0x212)](_0x410413)||_0x410413<0x0||_0x410413>0x1)&&fail(_0x3d758d+_0x1a52b0(0x21b));}function tuple(..._0x534aba){const _0xcb4da9=a65_0x589f6e;return _0x534aba[_0xcb4da9(0x236)]((_0x1df801,_0x22bd95)=>_0x22bd95===0x1||_0x22bd95===0x3?_0x1df801[_0xcb4da9(0x241)]():_0x1df801)[_0xcb4da9(0x1e6)]('\x00');}function sameSet(_0x2a7473,_0xf1c70){const _0x281bdf=a65_0x589f6e;return _0x2a7473['size']===_0xf1c70[_0x281bdf(0x202)]&&[..._0x2a7473][_0x281bdf(0x21c)](_0x4d8cac=>_0xf1c70[_0x281bdf(0x1f2)](_0x4d8cac));}function isObject(_0x2211f1){return typeof _0x2211f1==='object'&&_0x2211f1!==null&&!Array['isArray'](_0x2211f1);}function fail(_0x522408){const _0x5101e4=a65_0x589f6e;throw CliErrors[_0x5101e4(0x1fe)](_0x522408);}
|
|
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_0x16846e=a66_0x7d9a;(function(_0x3ef10d,_0x564a4a){const _0x249d1f=a66_0x7d9a,_0x3b5d4f=_0x3ef10d();while(!![]){try{const _0x11f77a=parseInt(_0x249d1f(0x193))/0x1*(parseInt(_0x249d1f(0x1b7))/0x2)+parseInt(_0x249d1f(0x181))/0x3*(parseInt(_0x249d1f(0x1a0))/0x4)+-parseInt(_0x249d1f(0x19a))/0x5+-parseInt(_0x249d1f(0x1ac))/0x6+parseInt(_0x249d1f(0x1b6))/0x7*(-parseInt(_0x249d1f(0x171))/0x8)+parseInt(_0x249d1f(0x19f))/0x9*(-parseInt(_0x249d1f(0x18d))/0xa)+parseInt(_0x249d1f(0x19e))/0xb;if(_0x11f77a===_0x564a4a)break;else _0x3b5d4f['push'](_0x3b5d4f['shift']());}catch(_0x5e9743){_0x3b5d4f['push'](_0x3b5d4f['shift']());}}}(a66_0x9cf5,0xcd0d1));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_0x16846e(0x1bb),METADATA_BACKEND_PATH=a66_0x16846e(0x189),UNGROUPED_BUSINESS_GROUP='ungrouped';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x44d8d8,input:_0x469d24,dryRun:_0x5a28a1}){const _0x54680c=a66_0x16846e;validateInput(_0x469d24);const _0x5415bb=normalizeBusinessGroupArgument(_0x469d24[_0x54680c(0x196)]),_0xb3216b=await getDatasetDetail(_0x469d24[_0x54680c(0x17f)]),_0x8622af=resolveBusinessGroupDataset(_0xb3216b,_0x469d24['code']);assertBusinessGroupUpdateSupported(_0x8622af,_0x5415bb);const _0x3af7a1=loadCurrentBusinessGroup(_0xb3216b,_0x8622af);assertExpectedBusinessGroup(_0x3af7a1,_0x469d24[_0x54680c(0x199)]);const _0xc2c087=buildBackendPlan(_0x44d8d8,_0x8622af,_0x5415bb),_0x8b2433=_0x3af7a1!==_0x5415bb;let _0x5ee6f1;if(_0x8b2433&&!_0x5a28a1){_0xc2c087[_0x54680c(0x186)]==='db-table'?await updateDbTableBusinessGroup(_0xc2c087[_0x54680c(0x19b)]):await updateErBusinessGroup(_0xc2c087[_0x54680c(0x19b)]);const _0x111625=await getDatasetDetail(_0x8622af[_0x54680c(0x17f)]),_0x268dd2=resolveBusinessGroupDataset(_0x111625,_0x8622af[_0x54680c(0x17f)]),_0x101278=loadCurrentBusinessGroup(_0x111625,_0x268dd2);if(_0x101278!==_0x5415bb)throw CliErrors['apiError'](_0x54680c(0x172),_0x54680c(0x174)+JSON[_0x54680c(0x1a9)](displayBusinessGroup(_0x5415bb))+_0x54680c(0x1ba)+JSON[_0x54680c(0x1a9)](displayBusinessGroup(_0x101278))+'.');_0x5ee6f1={'verified':!![],'status':_0x54680c(0x1af),'afterReadback':{'businessGroup':displayBusinessGroup(_0x101278)}};}else!_0x8b2433&&(_0x5ee6f1={'verified':!![],'status':_0x54680c(0x17e),'afterReadback':{'businessGroup':displayBusinessGroup(_0x3af7a1)}});const _0x35bb20={'operation':_0x54680c(0x184),'appCode':_0x44d8d8,'selector':{'code':_0x8622af[_0x54680c(0x17f)]},'dataset':{'id':_0x8622af['id'],'code':_0x8622af[_0x54680c(0x17f)],'name':_0x8622af['name'],'sourceType':_0x8622af[_0x54680c(0x1b2)]},'before':{'businessGroup':displayBusinessGroup(_0x3af7a1)},'after':{'businessGroup':displayBusinessGroup(_0x5415bb)},'changed':_0x8b2433,'dryRun':_0x5a28a1,'submitted':_0x8b2433&&!_0x5a28a1,'backend':{'method':_0xc2c087['method'],'path':_0xc2c087[_0x54680c(0x1a6)],'payload':_0xc2c087[_0x54680c(0x19b)]},..._0x5ee6f1?{'verification':_0x5ee6f1}:{},'warnings':[]};return{'ok':!![],'data':_0x35bb20,'message':_0x8b2433?_0x5a28a1?_0x54680c(0x175)+_0x8622af[_0x54680c(0x17f)]:_0x54680c(0x1a7)+_0x8622af[_0x54680c(0x17f)]:_0x54680c(0x1ad)+_0x8622af[_0x54680c(0x17f)]};}export const datasetBusinessGroupUpdate={'service':a66_0x16846e(0x1b5),'command':'business-group-update','description':a66_0x16846e(0x1b8),'risk':'write','flags':[CODE_FLAG,{'name':a66_0x16846e(0x178),'type':'string','required':!![],'description':a66_0x16846e(0x1b4)},{'name':a66_0x16846e(0x188),'type':a66_0x16846e(0x1a4),'required':![],'description':a66_0x16846e(0x194)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5a0a66){validateInput(readBusinessGroupUpdateInput(_0x5a0a66));},async 'dryRun'(_0x1b5df2){const _0x2637d9=a66_0x16846e,_0x44d0ce=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x1b5df2[_0x2637d9(0x1b3)],'input':readBusinessGroupUpdateInput(_0x1b5df2),'dryRun':!![]});return{'method':_0x44d0ce[_0x2637d9(0x1a8)][_0x2637d9(0x18e)][_0x2637d9(0x191)],'url':_0x44d0ce[_0x2637d9(0x1a8)][_0x2637d9(0x18e)][_0x2637d9(0x1a6)],'body':_0x44d0ce[_0x2637d9(0x1a8)][_0x2637d9(0x18e)]['payload'],'description':_0x44d0ce[_0x2637d9(0x1b9)],..._0x44d0ce[_0x2637d9(0x1a8)]};},async 'execute'(_0x199716){const _0x1a656e=a66_0x16846e;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x199716[_0x1a656e(0x1b3)],'input':readBusinessGroupUpdateInput(_0x199716),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x1ea188){const _0x105733=a66_0x16846e,_0x272872=_0x1ea188[_0x105733(0x182)](_0x105733(0x188));return{'code':trim(_0x1ea188[_0x105733(0x182)](_0x105733(0x17f))),'businessGroup':_0x1ea188[_0x105733(0x182)](_0x105733(0x178)),'expectBusinessGroup':_0x272872===undefined||_0x272872===''?undefined:_0x272872};}function validateInput(_0x12cfe7){const _0x4a31c5=a66_0x16846e;if(!trim(_0x12cfe7[_0x4a31c5(0x17f)]))throw CliErrors[_0x4a31c5(0x198)]('--code\x20is\x20required');if(_0x12cfe7[_0x4a31c5(0x196)]===undefined)throw CliErrors[_0x4a31c5(0x198)](_0x4a31c5(0x183));if(!trim(_0x12cfe7['businessGroup']))throw CliErrors[_0x4a31c5(0x198)](_0x4a31c5(0x1a2));}function assertBusinessGroupUpdateSupported(_0x59ff6f,_0xfc3116){const _0x356f09=a66_0x16846e;if(_0x59ff6f[_0x356f09(0x1b2)]===_0x356f09(0x1aa)&&!_0xfc3116)throw CliErrors[_0x356f09(0x198)](_0x356f09(0x176));}function resolveBusinessGroupDataset(_0x4fe5fb,_0xb8bd26){const _0x9ea0c5=a66_0x16846e,_0x5531fa=asPlainObject(_0x4fe5fb[_0x9ea0c5(0x1b5)]),_0x2f9570=asPlainObject(_0x4fe5fb['dbtableConfig']),_0x3d7d25=resolveSourceType(_0x4fe5fb,_0x5531fa,_0x2f9570),_0x346a1c=firstString(_0x4fe5fb['modelCode'],_0x4fe5fb['code'],_0x5531fa[_0x9ea0c5(0x17c)],_0xb8bd26)||_0xb8bd26;return{'id':firstNumber(_0x4fe5fb['modelId'],_0x4fe5fb['id'],_0x5531fa[_0x9ea0c5(0x17d)])??firstString(_0x4fe5fb[_0x9ea0c5(0x187)],_0x4fe5fb['id'],_0x5531fa[_0x9ea0c5(0x17d)])??null,'code':_0x346a1c,'name':firstString(_0x4fe5fb[_0x9ea0c5(0x1a3)],_0x5531fa[_0x9ea0c5(0x185)],_0x5531fa[_0x9ea0c5(0x1a3)])||null,'sourceType':_0x3d7d25,'dbTableSelector':_0x3d7d25===_0x9ea0c5(0x1aa)?{'dbLinkId':firstNumber(_0x2f9570['dbId']),'tableName':firstString(_0x2f9570['tableName'])||null}:null};}function a66_0x9cf5(){const _0x19e39b=['unchanged','code','parse','564201BRMhEn','str','--business-group\x20is\x20required','update','datasetName','kind','modelId','expect-business-group','/smartapi/question/er-config/business-group/edit','tableName','extend','number','410OVBFFu','backend','prototype','source','method','object','12OUdUpI','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','isFinite','businessGroup','Expectation\x20mismatch\x20at\x20businessGroup','validation','expectBusinessGroup','4304685NDVIzo','payload','dbLinkId','METADATA','42028283wVYLOT','210861HtYOUJ','8JwUvED','POST','--business-group\x20must\x20not\x20be\x20blank','name','string','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','path','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','data','stringify','DB_TABLE','trim','9391362BZUxOI','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','found','matched','hasOwnProperty','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','sourceType','appCode','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','dataset','1053815GOrzHt','30050YGZGAk','Update\x20business\x20scenario\x20group','message',',\x20actual\x20','/smartapi/dblink/updateTableBusinessGroup','dbTableSelector','8JKRjbd','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','value','Expected\x20','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','business-group','isArray','length','toUpperCase','datasetCode','datasetId'];a66_0x9cf5=function(){return _0x19e39b;};return a66_0x9cf5();}function resolveSourceType(_0x301f2,_0x28166d,_0x2ba73a){const _0x227e25=a66_0x16846e,_0x96b535=firstString(_0x301f2[_0x227e25(0x190)],_0x301f2[_0x227e25(0x1b2)],_0x28166d[_0x227e25(0x190)],_0x28166d[_0x227e25(0x1b2)])?.[_0x227e25(0x1ab)]()[_0x227e25(0x17b)]();if(_0x96b535==='DB_TABLE'||_0x96b535===_0x227e25(0x19d))return _0x96b535;if(Object['keys'](_0x2ba73a)[_0x227e25(0x17a)]>0x0)return _0x227e25(0x1aa);throw CliErrors[_0x227e25(0x198)](_0x227e25(0x1a5));}function loadCurrentBusinessGroup(_0x5d5203,_0x399a4a){const _0x20dc57=a66_0x16846e,_0x103fad=readBusinessGroupFromDatasetDetail(_0x5d5203,_0x399a4a['sourceType']);if(_0x103fad[_0x20dc57(0x1ae)])return normalizeBusinessGroup(_0x103fad[_0x20dc57(0x173)]);return'';}function readBusinessGroupFromDatasetDetail(_0x43d7e9,_0x4d3cab){const _0x3f3efe=a66_0x16846e,_0x310c09=asPlainObject(_0x43d7e9[_0x3f3efe(0x1b5)]),_0x8ad4e1=firstPresent(_0x43d7e9[_0x3f3efe(0x196)]);if(_0x8ad4e1['found'])return _0x8ad4e1;const _0x5216c0=firstPresent(_0x310c09[_0x3f3efe(0x196)]);if(_0x5216c0[_0x3f3efe(0x1ae)])return _0x5216c0;if(_0x4d3cab==='DB_TABLE')return{'found':![]};const _0x4f4272=readBusinessGroupFromExtend(_0x43d7e9[_0x3f3efe(0x18b)]);if(_0x4f4272[_0x3f3efe(0x1ae)])return _0x4f4272;return readBusinessGroupFromExtend(_0x310c09[_0x3f3efe(0x18b)]);}function readBusinessGroupFromExtend(_0x29b795){const _0x4d79f5=a66_0x16846e;if(_0x29b795===undefined||_0x29b795===null||_0x29b795==='')return{'found':![]};if(typeof _0x29b795===_0x4d79f5(0x1a4))try{const _0x46c441=JSON[_0x4d79f5(0x180)](_0x29b795);return readBusinessGroupFromExtend(_0x46c441);}catch{return{'found':![]};}const _0x3072eb=asPlainObject(_0x29b795);if(Object[_0x4d79f5(0x18f)][_0x4d79f5(0x1b0)]['call'](_0x3072eb,'businessGroup'))return{'found':!![],'value':_0x3072eb['businessGroup']};return{'found':![]};}function firstPresent(..._0x21a126){for(const _0x207891 of _0x21a126){if(_0x207891!==undefined&&_0x207891!==null)return{'found':!![],'value':_0x207891};}return{'found':![]};}function assertExpectedBusinessGroup(_0x1e2f1f,_0x3587e6){const _0x19c593=a66_0x16846e;if(_0x3587e6===undefined)return;const _0x216f8d=normalizeBusinessGroupArgument(_0x3587e6);if(_0x1e2f1f!==_0x216f8d)throw CliErrors[_0x19c593(0x198)](_0x19c593(0x197),_0x19c593(0x174)+JSON['stringify'](_0x216f8d)+',\x20actual\x20'+JSON[_0x19c593(0x1a9)](_0x1e2f1f));}function buildBackendPlan(_0x1d33eb,_0x454493,_0x40031b){const _0x5e3f6a=a66_0x16846e;if(_0x454493[_0x5e3f6a(0x1b2)]===_0x5e3f6a(0x1aa)){if(!_0x454493[_0x5e3f6a(0x1bc)]||_0x454493[_0x5e3f6a(0x1bc)][_0x5e3f6a(0x19c)]===null||!_0x454493[_0x5e3f6a(0x1bc)][_0x5e3f6a(0x18a)])throw CliErrors[_0x5e3f6a(0x198)](_0x5e3f6a(0x1b1),_0x5e3f6a(0x177));return{'kind':'db-table','method':_0x5e3f6a(0x1a1),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x454493['dbTableSelector'][_0x5e3f6a(0x19c)],'tableName':_0x454493['dbTableSelector'][_0x5e3f6a(0x18a)],'businessGroup':_0x40031b}};}return{'kind':'metadata','method':_0x5e3f6a(0x1a1),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x1d33eb,'datasetCode':_0x454493[_0x5e3f6a(0x17f)],'businessGroup':_0x40031b}};}function normalizeBusinessGroup(_0xf0fba4){if(_0xf0fba4===undefined||_0xf0fba4===null)return'';return String(_0xf0fba4)['trim']();}function normalizeBusinessGroupArgument(_0x193c11){const _0x41a27d=normalizeBusinessGroup(_0x193c11);return _0x41a27d===UNGROUPED_BUSINESS_GROUP?'':_0x41a27d;}function displayBusinessGroup(_0x19827){return _0x19827||UNGROUPED_BUSINESS_GROUP;}function a66_0x7d9a(_0x17bbb4,_0x58803d){_0x17bbb4=_0x17bbb4-0x171;const _0x9cf50b=a66_0x9cf5();let _0x7d9a55=_0x9cf50b[_0x17bbb4];return _0x7d9a55;}function asPlainObject(_0x63fd10){const _0x56223e=a66_0x16846e;if(!_0x63fd10||typeof _0x63fd10!==_0x56223e(0x192)||Array[_0x56223e(0x179)](_0x63fd10))return{};return _0x63fd10;}function firstString(..._0x23d037){const _0x194548=a66_0x16846e;for(const _0x2e91b8 of _0x23d037){if(typeof _0x2e91b8===_0x194548(0x1a4)&&_0x2e91b8['trim']())return _0x2e91b8[_0x194548(0x1ab)]();if(typeof _0x2e91b8===_0x194548(0x18c)&&Number[_0x194548(0x195)](_0x2e91b8))return String(_0x2e91b8);}return undefined;}function firstNumber(..._0x15b202){const _0x1ccfc6=a66_0x16846e;for(const _0x564052 of _0x15b202){if(typeof _0x564052===_0x1ccfc6(0x18c)&&Number[_0x1ccfc6(0x195)](_0x564052))return _0x564052;if(typeof _0x564052===_0x1ccfc6(0x1a4)&&_0x564052[_0x1ccfc6(0x1ab)]()&&Number[_0x1ccfc6(0x195)](Number(_0x564052)))return Number(_0x564052);}return null;}function trim(_0x295b45){const _0x125608=a66_0x16846e;return String(_0x295b45||'')[_0x125608(0x1ab)]();}
|
|
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
|
-
|
|
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
|
-
const
|
|
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
|
-
const a72_0xc32d68=a72_0x8856;(function(_0x338cb9,_0x3ad0ca){const _0x433df7=a72_0x8856,_0x5b4e6b=_0x338cb9();while(!![]){try{const _0x434e9f=-parseInt(_0x433df7(0x186))/0x1*(parseInt(_0x433df7(0x172))/0x2)+parseInt(_0x433df7(0x171))/0x3+-parseInt(_0x433df7(0x178))/0x4*(parseInt(_0x433df7(0x18e))/0x5)+-parseInt(_0x433df7(0x16c))/0x6+-parseInt(_0x433df7(0x149))/0x7+parseInt(_0x433df7(0x187))/0x8*(parseInt(_0x433df7(0x152))/0x9)+parseInt(_0x433df7(0x156))/0xa;if(_0x434e9f===_0x3ad0ca)break;else _0x5b4e6b['push'](_0x5b4e6b['shift']());}catch(_0x1c9660){_0x5b4e6b['push'](_0x5b4e6b['shift']());}}}(a72_0x3128,0xc735f));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(_0x2d5455,_0x2ab03a){const _0x148d5d=a72_0x8856,_0x1ad569=_0x2d5455[_0x148d5d(0x15e)](_0x2ab03a)[_0x148d5d(0x150)]();if(!_0x1ad569)throw CliErrors[_0x148d5d(0x14d)](_0x2ab03a);return _0x1ad569;}function a72_0x3128(){const _0x40ccaa=['Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','sourceType','7olzAbo','8zdhUjl','relationId','storageProfile','tableName','label_inherited','multiple\x20cross-database\x20relations\x20matched','fromDatasetCode','60ykwjNh','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','some','includes','Would\x20','dataset','isSafeInteger','update','fromDblinkId','delete','from-datasetcode','body','query','validation','datasetCode','dblinkId','fromField','catch','DB_TABLE','dbtable','1388163tZzlJA','from-dblink-id','Dataset\x20','fromTableName','flagMissing','before','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','trim','parse','9470367ReviBN','toLowerCase','from-column','matched','20730470JQQwXi','defineProperty','expectedLabel','expectedCardinality','\x20write\x20was\x20not\x20verified.','length','\x20a\x20cross-database\x20relation\x20for\x20','relationType','str','to-label-column','refTableLabelName','create','Invalid\x20--cardinality.','data','extend','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','to-column','string','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','flag','Cross-database\x20relation\x20','toTableName','6277176CYrBZs','cardinality','toDblinkId','map','dbId','2130492AbcKxZ','108980JSyMnt','appCode','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','enum','apiError','464524rNKstN','list','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','to-datasetcode','from','\x20has\x20invalid\x20storage\x20configuration.','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','table','dbtableConfig','source','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','toField'];a72_0x3128=function(){return _0x40ccaa;};return a72_0x3128();}function explicitDblink(_0x255650){const _0x2bb2c3=a72_0x8856,_0x4a15c8=_0x255650[_0x2bb2c3(0x169)](_0x2bb2c3(0x14a));if(_0x4a15c8===undefined||_0x4a15c8===null)return undefined;const _0x3c76f9=Number(_0x4a15c8);if(!Number[_0x2bb2c3(0x13b)](_0x3c76f9)||_0x3c76f9<=0x0)throw CliErrors[_0x2bb2c3(0x142)]('--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x3c76f9;}export function validateCrossRelation(_0x160b24,_0x204c81){const _0x83df89=a72_0x8856,_0x3fa2f1=explicitDblink(_0x160b24);if(_0x204c81===_0x83df89(0x179)){if(!_0x160b24['str'](_0x83df89(0x13f))[_0x83df89(0x150)]()&&_0x3fa2f1===undefined)throw CliErrors[_0x83df89(0x142)](_0x83df89(0x184));return;}required(_0x160b24,'from-datasetcode'),required(_0x160b24,_0x83df89(0x154));if(_0x204c81!==_0x83df89(0x13e)){required(_0x160b24,_0x83df89(0x17b)),required(_0x160b24,_0x83df89(0x166));const _0x1357c2=_0x160b24[_0x83df89(0x15e)]('cardinality')[_0x83df89(0x150)]();if(_0x1357c2&&!CROSS_RELATION_CARDINALITY_FLAG[_0x83df89(0x176)][_0x83df89(0x191)](_0x1357c2))throw CliErrors[_0x83df89(0x142)](_0x83df89(0x162));}}async function resolveEndpoint(_0x17d462){const _0x4dd250=a72_0x8856,_0x2c81ee=await getDatasetDetail(_0x17d462),_0x1c9147=_0x2c81ee?.[_0x4dd250(0x193)]??{};if((_0x2c81ee?.[_0x4dd250(0x181)]??_0x1c9147[_0x4dd250(0x185)])!=='DB_TABLE')throw CliErrors['validation'](_0x4dd250(0x14b)+_0x17d462+_0x4dd250(0x14f));const _0x2f8fe6=_0x2c81ee[_0x4dd250(0x180)]??_0x2c81ee[_0x4dd250(0x148)]??{};let _0x749b35=_0x2c81ee[_0x4dd250(0x164)]??_0x1c9147['extend']??{};if(typeof _0x749b35===_0x4dd250(0x167))try{_0x749b35=_0x749b35[_0x4dd250(0x150)]()?JSON[_0x4dd250(0x151)](_0x749b35):{};}catch{throw CliErrors[_0x4dd250(0x142)](_0x4dd250(0x14b)+_0x17d462+_0x4dd250(0x17d));}const _0x25d5df=Number(_0x749b35?.[_0x4dd250(0x189)]?.[_0x4dd250(0x170)]??_0x2c81ee[_0x4dd250(0x189)]?.['dbId']??_0x1c9147['storageProfile']?.[_0x4dd250(0x170)]??_0x2f8fe6[_0x4dd250(0x170)]??_0x1c9147[_0x4dd250(0x170)]??_0x2c81ee[_0x4dd250(0x170)]),_0x40f3f1=String(_0x2c81ee[_0x4dd250(0x18a)]??_0x1c9147['tableName']??_0x2f8fe6[_0x4dd250(0x18a)]??'')[_0x4dd250(0x150)]();if(!Number[_0x4dd250(0x13b)](_0x25d5df)||_0x25d5df<=0x0||!_0x40f3f1)throw CliErrors[_0x4dd250(0x142)]('Dataset\x20'+_0x17d462+_0x4dd250(0x165));return{'datasetCode':_0x17d462,'dblinkId':_0x25d5df,'table':_0x40f3f1};}export async function resolveCrossRelationQuery(_0x47f45f){const _0x3ff655=a72_0x8856,_0x3b26ea=_0x47f45f[_0x3ff655(0x15e)](_0x3ff655(0x13f))[_0x3ff655(0x150)](),_0x5ce15a=explicitDblink(_0x47f45f),_0x4bc8fe=_0x3b26ea?await resolveEndpoint(_0x3b26ea):undefined;if(_0x4bc8fe&&_0x5ce15a!==undefined&&_0x4bc8fe[_0x3ff655(0x144)]!==_0x5ce15a)throw CliErrors['validation'](_0x3ff655(0x168));const _0x3cd71d=_0x4bc8fe?.['dblinkId']??_0x5ce15a;if(_0x3cd71d===undefined)throw CliErrors[_0x3ff655(0x142)](_0x3ff655(0x184));return{'appCode':_0x47f45f[_0x3ff655(0x173)],'fromDblinkId':_0x3cd71d,..._0x3b26ea?{'fromDatasetCode':_0x3b26ea}:{},..._0x47f45f[_0x3ff655(0x15e)](_0x3ff655(0x154))['trim']()?{'fromField':_0x47f45f[_0x3ff655(0x15e)](_0x3ff655(0x154))['trim']()}:{}};}export function projectCrossRelation(_0x5451c2){const _0x57b6f9=a72_0x8856;return{'relationId':_0x5451c2[_0x57b6f9(0x188)],'from':{'source':_0x57b6f9(0x147),'datasetCode':_0x5451c2[_0x57b6f9(0x18d)],'datasetName':_0x5451c2['fromDatasetName'],'dblinkId':_0x5451c2[_0x57b6f9(0x13d)],'table':_0x5451c2[_0x57b6f9(0x14c)],'field':_0x5451c2['fromField']},'to':{'source':_0x57b6f9(0x147),'datasetCode':_0x5451c2['toDatasetCode'],'datasetName':_0x5451c2['toDatasetName'],'dblinkId':_0x5451c2[_0x57b6f9(0x16e)],'table':_0x5451c2['toTableName'],'field':_0x5451c2['toField'],'labelField':_0x5451c2[_0x57b6f9(0x160)]},'relation':{'cardinality':_0x5451c2[_0x57b6f9(0x16d)],'relationType':_0x5451c2[_0x57b6f9(0x15d)]}};}function a72_0x8856(_0x69e93b,_0x4ee09f){_0x69e93b=_0x69e93b-0x13b;const _0x31285c=a72_0x3128();let _0x8856e2=_0x31285c[_0x69e93b];return _0x8856e2;}function ambiguity(_0xc006df){const _0x5c3598=a72_0x8856,_0x12619=CliErrors[_0x5c3598(0x142)](_0x5c3598(0x18f),_0x5c3598(0x175));return Object[_0x5c3598(0x157)](_0x12619,_0x5c3598(0x163),{'value':{'candidates':_0xc006df[_0x5c3598(0x16f)](projectCrossRelation)}}),_0x12619;}const sameName=(_0x1b8134,_0x36ea79)=>_0x1b8134[a72_0xc32d68(0x153)]()===_0x36ea79['toLowerCase']();function matchesEndpoint(_0x877c7f,_0xe98520,_0x2ffe7e,_0x84626b,_0x31fab7){const _0x5e8995=a72_0xc32d68;return _0x877c7f[_0x5e8995(0x13d)]===_0xe98520['dblinkId']&&sameName(_0x877c7f['fromTableName'],_0xe98520[_0x5e8995(0x17f)])&&sameName(_0x877c7f[_0x5e8995(0x145)],_0x2ffe7e)&&_0x877c7f[_0x5e8995(0x16e)]===_0x84626b['dblinkId']&&sameName(_0x877c7f[_0x5e8995(0x16b)],_0x84626b['table'])&&sameName(_0x877c7f[_0x5e8995(0x183)],_0x31fab7);}export async function prepareCrossRelation(_0x11f81c,_0x45ee22){const _0x44f840=a72_0xc32d68,_0x5840c5=await resolveEndpoint(required(_0x11f81c,_0x44f840(0x13f))),_0x34d3a1=explicitDblink(_0x11f81c);if(_0x34d3a1!==undefined&&_0x5840c5['dblinkId']!==_0x34d3a1)throw CliErrors[_0x44f840(0x142)](_0x44f840(0x168));const _0x2836ea={'appCode':_0x11f81c[_0x44f840(0x173)],'fromDatasetCode':_0x5840c5[_0x44f840(0x143)],'fromField':required(_0x11f81c,'from-column'),..._0x34d3a1!==undefined?{'fromDblinkId':_0x34d3a1}:{}},_0x4b2366={'appCode':_0x11f81c[_0x44f840(0x173)],'fromDblinkId':_0x5840c5[_0x44f840(0x144)],'fromDatasetCode':_0x5840c5[_0x44f840(0x143)],'fromField':_0x2836ea[_0x44f840(0x145)]},_0x23942f=await queryCrossDbRelations(_0x4b2366);let _0x5073ce=null;if(_0x45ee22!==_0x44f840(0x161)){if(_0x23942f[_0x44f840(0x15b)]>0x1)throw ambiguity(_0x23942f);_0x5073ce=_0x23942f[0x0]??null;if(!_0x5073ce)throw CliErrors['validation'](_0x44f840(0x17a));}if(_0x45ee22===_0x44f840(0x13e))return{'operation':_0x45ee22,'from':_0x5840c5,'query':_0x4b2366,'body':_0x2836ea,'before':_0x5073ce};const _0x52e2d8=await resolveEndpoint(required(_0x11f81c,_0x44f840(0x17b)));if(_0x5840c5['dblinkId']===_0x52e2d8[_0x44f840(0x144)])throw CliErrors[_0x44f840(0x142)](_0x44f840(0x182));const _0x5ad431=_0x11f81c['str'](_0x44f840(0x15f))[_0x44f840(0x150)](),_0x4026cf=_0x11f81c[_0x44f840(0x15e)](_0x44f840(0x16d))[_0x44f840(0x150)](),_0x1d141a={..._0x2836ea,'toDatasetCode':_0x52e2d8[_0x44f840(0x143)],'toField':required(_0x11f81c,_0x44f840(0x166)),..._0x5ad431?{'refTableLabelName':_0x5ad431}:{},..._0x4026cf?{'cardinality':_0x4026cf}:{}};if(_0x23942f[_0x44f840(0x190)](_0x108376=>_0x108376['relationId']!==_0x5073ce?.[_0x44f840(0x188)]&&matchesEndpoint(_0x108376,_0x5840c5,_0x1d141a[_0x44f840(0x145)],_0x52e2d8,_0x1d141a[_0x44f840(0x183)])))throw CliErrors[_0x44f840(0x142)](_0x44f840(0x17e));return{'operation':_0x45ee22,'from':_0x5840c5,'to':_0x52e2d8,'query':_0x4b2366,'body':_0x1d141a,'before':_0x5073ce,'expectedLabel':_0x5ad431||_0x5073ce?.['refTableLabelName']||_0x1d141a['toField'],'expectedCardinality':_0x4026cf||_0x5073ce?.[_0x44f840(0x16d)]||null};}function mutationData(_0x5aefdb,_0x12196a,_0x1961d5){const _0x5b765d=a72_0xc32d68,{operation:_0x50b00b,body:_0x175412,before:_0x3b8099}=_0x5aefdb;return{'operation':_0x50b00b,'selector':{'appCode':_0x175412[_0x5b765d(0x173)],'from':{'datasetCode':_0x175412['fromDatasetCode'],'field':_0x175412[_0x5b765d(0x145)],'dblinkId':_0x5aefdb['from'][_0x5b765d(0x144)]}},'before':_0x3b8099?projectCrossRelation(_0x3b8099):null,'after':_0x1961d5,'dryRun':_0x12196a,'backend':{'method':'POST','path':CROSS_DB_RELATION_PATHS[_0x50b00b]},'warnings':_0x50b00b===_0x5b765d(0x13c)&&!_0x175412['refTableLabelName']?[{'code':_0x5b765d(0x18b),'message':_0x5b765d(0x174)}]:[]};}export async function previewCrossRelation(_0xd1c4b6,_0x1efbd9){const _0x379f3a=a72_0xc32d68,_0xc8d5af=await prepareCrossRelation(_0xd1c4b6,_0x1efbd9),_0x5a5cf9=_0xc8d5af['body'],_0x3f52d8=_0x1efbd9===_0x379f3a(0x13e)?null:{..._0xc8d5af[_0x379f3a(0x14e)]?{'relationId':_0xc8d5af['before']['relationId']}:{},'from':{'datasetCode':_0xc8d5af[_0x379f3a(0x17c)][_0x379f3a(0x143)],'dblinkId':_0xc8d5af['from']['dblinkId'],'table':_0xc8d5af[_0x379f3a(0x17c)][_0x379f3a(0x17f)],'field':_0x5a5cf9['fromField']},'to':{'datasetCode':_0xc8d5af['to'][_0x379f3a(0x143)],'dblinkId':_0xc8d5af['to'][_0x379f3a(0x144)],'table':_0xc8d5af['to'][_0x379f3a(0x17f)],'field':_0x5a5cf9[_0x379f3a(0x183)],'labelField':_0xc8d5af[_0x379f3a(0x158)]},'relation':{'cardinality':_0xc8d5af[_0x379f3a(0x159)],'relationType':0x2}};return{...mutationData(_0xc8d5af,!![],null),'after':_0x3f52d8,'method':'POST','url':CROSS_DB_RELATION_PATHS[_0x1efbd9],'body':_0xc8d5af['body'],'description':_0x379f3a(0x192)+_0x1efbd9+_0x379f3a(0x15c)+_0x5a5cf9[_0x379f3a(0x18d)]+'.'+_0x5a5cf9['fromField']};}export async function executeCrossRelation(_0x578730,_0x3e8b04,_0x221919){const _0x40b70b=a72_0xc32d68,_0x3303b8=await prepareCrossRelation(_0x578730,_0x3e8b04);try{await _0x221919(_0x3303b8['body']);}catch(_0x24380f){if(_0x24380f instanceof CliError&&_0x24380f['message'][_0x40b70b(0x191)](_0x40b70b(0x18c))){const _0x53d1a8=await queryCrossDbRelations(_0x3303b8[_0x40b70b(0x141)])[_0x40b70b(0x146)](()=>[]);throw ambiguity(_0x53d1a8);}throw _0x24380f;}let _0x244f78=[],_0x1cc3e8,_0x3ef1c7=![];try{_0x244f78=await queryCrossDbRelations(_0x3303b8['query']);if(_0x3e8b04===_0x40b70b(0x13e))_0x3ef1c7=!_0x244f78[_0x40b70b(0x190)](_0xb19a0=>_0xb19a0[_0x40b70b(0x188)]===_0x3303b8[_0x40b70b(0x14e)][_0x40b70b(0x188)]);else{const _0xc782e3=_0x3303b8[_0x40b70b(0x140)],_0x10a7ec=_0x244f78['filter'](_0x47afe6=>matchesEndpoint(_0x47afe6,_0x3303b8['from'],_0xc782e3[_0x40b70b(0x145)],_0x3303b8['to'],_0xc782e3['toField'])&&(_0x3e8b04===_0x40b70b(0x161)||_0x47afe6[_0x40b70b(0x188)]===_0x3303b8[_0x40b70b(0x14e)]['relationId']));_0x1cc3e8=_0x10a7ec[_0x40b70b(0x15b)]===0x1?_0x10a7ec[0x0]:undefined,_0x3ef1c7=!!_0x1cc3e8&&_0x1cc3e8[_0x40b70b(0x160)]===_0x3303b8[_0x40b70b(0x158)]&&_0x1cc3e8['cardinality']===_0x3303b8[_0x40b70b(0x159)]&&_0x1cc3e8['relationType']===0x2;}}catch{}const _0x31195f={...mutationData(_0x3303b8,![],_0x1cc3e8?projectCrossRelation(_0x1cc3e8):null),'verification':{'status':_0x3ef1c7?_0x40b70b(0x155):'unconfirmed','verified':_0x3ef1c7}};if(!_0x3ef1c7){const _0x2d0fa4=CliErrors[_0x40b70b(0x177)](_0x40b70b(0x16a)+_0x3e8b04+_0x40b70b(0x15a),'The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.');Object[_0x40b70b(0x157)](_0x2d0fa4,'data',{'value':{..._0x31195f,'candidates':_0x244f78[_0x40b70b(0x16f)](projectCrossRelation)}});throw _0x2d0fa4;}return{'ok':!![],'data':_0x31195f,'message':_0x40b70b(0x16a)+_0x3e8b04+'\x20verified.'};}
|
|
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
|
-
const
|
|
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();}
|