@lovrabet/rabetbase-cli 2.5.9 → 2.5.10-beta.2
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 +1 -1
- 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.d.ts +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -28
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- 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 +3 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
- package/skills/rabetbase-page-generation/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a59_0x885d(){const _0x9300b3=['816KRBcvs','1588842FOCnrD','\x20config\x20get\x20--key\x20<key>','501819zkJigI','string','2891418ZiJxZG','2367239MchDJP','key','config','10DVIWth','validation','18336070eYJMcg','2iAVTPQ','Get\x20a\x20config\x20value\x20by\x20key','8088oHTotr','9764024SwqsYC','Key\x20not\x20found:\x20','appcode','get','app','object'];a59_0x885d=function(){return _0x9300b3;};return a59_0x885d();}const a59_0x520401=a59_0x1a8b;(function(_0x11a320,_0x723a1e){const _0x98459f=a59_0x1a8b,_0x3cdbd6=_0x11a320();while(!![]){try{const _0x3f3d93=parseInt(_0x98459f(0xba))/0x1*(parseInt(_0x98459f(0xc3))/0x2)+-parseInt(_0x98459f(0xb7))/0x3*(-parseInt(_0x98459f(0xb0))/0x4)+parseInt(_0x98459f(0xc0))/0x5*(parseInt(_0x98459f(0xbc))/0x6)+-parseInt(_0x98459f(0xbd))/0x7+parseInt(_0x98459f(0xb1))/0x8+-parseInt(_0x98459f(0xb8))/0x9+-parseInt(_0x98459f(0xc2))/0xa;if(_0x3f3d93===_0x723a1e)break;else _0x3cdbd6['push'](_0x3cdbd6['shift']());}catch(_0x1446b7){_0x3cdbd6['push'](_0x3cdbd6['shift']());}}}(a59_0x885d,0xd8bee));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a59_0x1a8b(_0x13fba4,_0x5e411a){_0x13fba4=_0x13fba4-0xaf;const _0x885da7=a59_0x885d();let _0x1a8be3=_0x885da7[_0x13fba4];return _0x1a8be3;}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x1dfa9f){const _0x4d7849=a59_0x1a8b,_0xb7deaa=_0x1dfa9f['str']('key');if(!_0xb7deaa)throw CliErrors[_0x4d7849(0xc1)]('Missing\x20key.','Usage:\x20'+CLI_BIN_NAME+_0x4d7849(0xb9));const _0x1d8348=readConfig(),_0x13cf56=_0xb7deaa===_0x4d7849(0xb5)?_0x4d7849(0xb3):_0xb7deaa,_0x170709=_0x1d8348[_0x13cf56];if(_0x170709===undefined)throw CliErrors[_0x4d7849(0xc1)](_0x4d7849(0xb2)+_0xb7deaa);return{'ok':!![],'data':typeof _0x170709===_0x4d7849(0xb6)?_0x170709:{[_0x13cf56]:_0x170709},'message':typeof _0x170709===_0x4d7849(0xb6)?undefined:String(_0x170709)};}export const configGetDefinition={'service':a59_0x520401(0xbf),'command':a59_0x520401(0xb4),'description':a59_0x520401(0xaf),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a59_0x520401(0xbe),'type':a59_0x520401(0xbb),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x544129,_0x57e1c5){const _0xb74bd1=a60_0x5163,_0x142ab=_0x544129();while(!![]){try{const _0x2569d8=-parseInt(_0xb74bd1(0xe8))/0x1+-parseInt(_0xb74bd1(0xe9))/0x2*(-parseInt(_0xb74bd1(0xee))/0x3)+-parseInt(_0xb74bd1(0xea))/0x4*(parseInt(_0xb74bd1(0xef))/0x5)+-parseInt(_0xb74bd1(0xed))/0x6*(parseInt(_0xb74bd1(0xe7))/0x7)+parseInt(_0xb74bd1(0xec))/0x8*(-parseInt(_0xb74bd1(0xe4))/0x9)+-parseInt(_0xb74bd1(0xeb))/0xa+parseInt(_0xb74bd1(0xe6))/0xb*(parseInt(_0xb74bd1(0xe5))/0xc);if(_0x2569d8===_0x57e1c5)break;else _0x142ab['push'](_0x142ab['shift']());}catch(_0x42a5bb){_0x142ab['push'](_0x142ab['shift']());}}}(a60_0x463c,0x2b23a));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a60_0x463c(){const _0x425b25=['107948IYscgf','1680420QMmjBe','2584BytbdH','30036vvRhuE','192CdkcBz','25MaJBba','7605AYzUFd','36ekcGAJ','2908917VamoMD','91KVyOTu','99493nOhhMB','3870eYMcZU'];a60_0x463c=function(){return _0x425b25;};return a60_0x463c();}function a60_0x5163(_0x3bb60f,_0x3df3a4){_0x3bb60f=_0x3bb60f-0xe4;const _0x463c1f=a60_0x463c();let _0x5163cc=_0x463c1f[_0x3bb60f];return _0x5163cc;}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_0x5528bc=a61_0x5814;function a61_0x5814(_0x143250,_0x54dded){_0x143250=_0x143250-0x67;const _0x13d6f9=a61_0x13d6();let _0x581400=_0x13d6f9[_0x143250];return _0x581400;}(function(_0x144a7d,_0x59fab7){const _0x365c66=a61_0x5814,_0x189901=_0x144a7d();while(!![]){try{const _0x42588e=parseInt(_0x365c66(0x92))/0x1*(-parseInt(_0x365c66(0x8f))/0x2)+parseInt(_0x365c66(0x98))/0x3+parseInt(_0x365c66(0x6f))/0x4*(-parseInt(_0x365c66(0x99))/0x5)+-parseInt(_0x365c66(0x7e))/0x6+parseInt(_0x365c66(0x85))/0x7+-parseInt(_0x365c66(0x7c))/0x8+parseInt(_0x365c66(0x7b))/0x9;if(_0x42588e===_0x59fab7)break;else _0x189901['push'](_0x189901['shift']());}catch(_0x5a8b28){_0x189901['push'](_0x189901['shift']());}}}(a61_0x13d6,0x3cc8f));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';function a61_0x13d6(){const _0x4eafbe=['map','project','3731391dSITIo','1948280ZahnKN','enterprise-v1','816660yXicKv','Custom\x20SkillHub\x20HTTPS\x20origin','local-domain','join','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','kb-domain','Custom\x20Runtime\x20HTTPS\x20origin','2692977HzpnGk','certificateDomain','length','config','manifestDomains','routing','Select\x20Lovrabet\x20region','Custom\x20User\x20HTTPS\x20origin','Region\x20\x22','nonInteractive','706516JspmQF','localDomain','global','1iZAsOI','user-domain','app-domain','string','mode','region','1002222rEoeKV','10aLCxkj','name','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','label','cancelled','validation','keys','str','Independent-deployment\x20Domain\x20JSON\x20file','official','ExitPromptError','cdn','303012KXhhjU','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','domains','api-domain','domain-config','Custom\x20knowledge-base\x20HTTPS\x20origin','Custom\x20platform\x20API\x20HTTPS\x20origin','runtime-domain','assign','Available\x20regions:\x20'];a61_0x13d6=function(){return _0x4eafbe;};return a61_0x13d6();}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_0x5528bc(0x81)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a61_0x5528bc(0x73),'type':a61_0x5528bc(0x95),'description':a61_0x5528bc(0x6b)},{'name':a61_0x5528bc(0x93),'type':a61_0x5528bc(0x95),'description':a61_0x5528bc(0x8c)},{'name':a61_0x5528bc(0x72),'type':a61_0x5528bc(0x95),'description':a61_0x5528bc(0x75)},{'name':a61_0x5528bc(0x76),'type':a61_0x5528bc(0x95),'description':a61_0x5528bc(0x84)},{'name':'skill-domain','type':a61_0x5528bc(0x95),'description':a61_0x5528bc(0x7f)},{'name':a61_0x5528bc(0x83),'type':a61_0x5528bc(0x95),'description':a61_0x5528bc(0x74)},{'name':'kb-service-domain','type':a61_0x5528bc(0x95),'description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'},{'name':a61_0x5528bc(0x94),'type':'string','description':a61_0x5528bc(0x9b)},{'name':a61_0x5528bc(0x80),'type':a61_0x5528bc(0x95),'description':'Custom\x20local\x20callback\x20HTTPS\x20origin'},{'name':'certificate-domain','type':'string','description':'Custom\x20certificate\x20service\x20HTTPS\x20origin'}];async function resolveRegion(_0x1504d5){const _0xc13648=a61_0x5528bc,_0x59f9e9=_0x1504d5[_0xc13648(0x6a)](_0xc13648(0x97));if(_0x59f9e9){if(!isEnabledLovrabetRegion(_0x59f9e9))throw CliErrors[_0xc13648(0x68)](_0xc13648(0x8d)+_0x59f9e9+'\x22\x20is\x20not\x20currently\x20available.',_0xc13648(0x78)+ENABLED_LOVRABET_REGION_VALUES[_0xc13648(0x81)](',\x20'));return _0x59f9e9;}if(_0x1504d5[_0xc13648(0x8e)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0xc13648(0x8b),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0xc13648(0x79)](_0x3943f1=>({'name':getOfficialRoutingProfile(_0x3943f1)[_0xc13648(0x9c)]+'\x20('+_0x3943f1+')','value':_0x3943f1}))});}catch(_0x1b2741){if(_0x1b2741?.[_0xc13648(0x9a)]===_0xc13648(0x6d))throw CliErrors[_0xc13648(0x67)]();throw _0x1b2741;}}export async function executeConfigInit(_0x2a005d){const _0x2eeaa0=a61_0x5528bc,_0xb2910=resolveDomainConfigInput(_0x2a005d),_0x5e6edb=_0xb2910[_0x2eeaa0(0x71)],_0x2b4bcf=Object[_0x2eeaa0(0x69)](_0x5e6edb)[_0x2eeaa0(0x87)]>0x0;if(_0x2b4bcf&&_0x2a005d['str'](_0x2eeaa0(0x97)))throw CliErrors[_0x2eeaa0(0x68)](_0x2eeaa0(0x70));if(!!_0x5e6edb[_0x2eeaa0(0x90)]!==!!_0x5e6edb[_0x2eeaa0(0x86)])throw CliErrors['validation']('Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.');const _0xda109c=_0x2a005d['bool'](_0x2eeaa0(0x91))?_0x2eeaa0(0x91):_0x2eeaa0(0x7a),_0x36b4ce=readScopedConfig(_0xda109c);for(const _0x3dec55 of DOMAIN_CONFIG_FIELDS)delete _0x36b4ce[_0x3dec55];for(const _0x53eef1 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x36b4ce[_0x53eef1];delete _0x36b4ce[_0x2eeaa0(0x8a)];let _0x2e3752=null;if(_0x2b4bcf)delete _0x36b4ce[_0x2eeaa0(0x97)],_0xb2910[_0x2eeaa0(0x96)]===_0x2eeaa0(0x7d)?_0x36b4ce[_0x2eeaa0(0x8a)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0xb2910['manifestDomains'],'cdn':_0xb2910['cdn']}:Object[_0x2eeaa0(0x77)](_0x36b4ce,_0x5e6edb);else{_0x2e3752=await resolveRegion(_0x2a005d);if(_0x2e3752===DEFAULT_LOVRABET_REGION)delete _0x36b4ce[_0x2eeaa0(0x97)];else _0x36b4ce['region']=_0x2e3752;}return writeScopedConfig(_0x36b4ce,_0xda109c),{'ok':!![],'message':_0x2b4bcf?_0x2eeaa0(0x82)+Object[_0x2eeaa0(0x69)](_0xb2910[_0x2eeaa0(0x96)]===_0x2eeaa0(0x7d)?_0xb2910[_0x2eeaa0(0x89)]:_0x5e6edb)[_0x2eeaa0(0x81)](',\x20')+'.':'Rabetbase\x20connection\x20configured\x20for\x20region:\x20'+_0x2e3752+'.','data':{'mode':_0x2b4bcf?'independent':_0x2eeaa0(0x6c),'protocol':_0xb2910[_0x2eeaa0(0x96)]==='enterprise-v1'?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x2e3752,'domains':_0x5e6edb,'cdn':_0xb2910[_0x2eeaa0(0x96)]==='enterprise-v1'?_0xb2910[_0x2eeaa0(0x6e)]:undefined}};}export const configInitDefinition={'service':a61_0x5528bc(0x88),'command':'init','description':'Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':'write','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_0x47a635=a62_0x48a3;(function(_0x4b1089,_0x39bbf0){const _0x4cbd4b=a62_0x48a3,_0x13578b=_0x4b1089();while(!![]){try{const _0x534ed2=parseInt(_0x4cbd4b(0x12f))/0x1*(-parseInt(_0x4cbd4b(0x130))/0x2)+parseInt(_0x4cbd4b(0x12e))/0x3+parseInt(_0x4cbd4b(0x13d))/0x4*(parseInt(_0x4cbd4b(0x13a))/0x5)+-parseInt(_0x4cbd4b(0x13b))/0x6*(parseInt(_0x4cbd4b(0x138))/0x7)+-parseInt(_0x4cbd4b(0x131))/0x8*(parseInt(_0x4cbd4b(0x13e))/0x9)+parseInt(_0x4cbd4b(0x13c))/0xa+parseInt(_0x4cbd4b(0x12d))/0xb;if(_0x534ed2===_0x39bbf0)break;else _0x13578b['push'](_0x13578b['shift']());}catch(_0x4c5d89){_0x13578b['push'](_0x13578b['shift']());}}}(a62_0x5c1b,0xee427));function a62_0x5c1b(){const _0x483ee2=['read','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','list','7xLqMpP','List\x20all\x20config\x20values','65Iokdca','3716016QOlgBL','9922580JyliXQ','85588FKOZeY','17083071oPbyPO','28345955KSIxXE','2943603YXLdgV','445053bPCzMS','6jfPXRJ','8pISfxO','bool','global','config'];a62_0x5c1b=function(){return _0x483ee2;};return a62_0x5c1b();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a62_0x48a3(_0xb4cfd2,_0x172d51){_0xb4cfd2=_0xb4cfd2-0x12d;const _0x5c1b6f=a62_0x5c1b();let _0x48a324=_0x5c1b6f[_0xb4cfd2];return _0x48a324;}async function execute(_0x333e8a){const _0x57bf3f=a62_0x48a3,_0x2f3de1=_0x333e8a[_0x57bf3f(0x132)]('global')?readScopedConfig(_0x57bf3f(0x133)):readConfig();return{'ok':!![],'data':_0x2f3de1};}export const configListDefinition={'service':a62_0x47a635(0x134),'command':a62_0x47a635(0x137),'description':a62_0x47a635(0x139),'risk':a62_0x47a635(0x135),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x47a635(0x133),'type':'boolean','description':a62_0x47a635(0x136),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x5d7732=a63_0x229b;function a63_0x34aa(){const _0x4a95ce=['key','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','length','validation','5117442LEwzwV','str','global','760348SYmQtG','value','apps','Use\x20`','\x22\x20is\x20not\x20settable.','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','638496sXabWK','locale','Invalid\x20locale\x20value.','join','10465263PWImNs','\x20appcode\x20set\x20to:\x20','\x20set\x20to:\x20','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','\x22.\x20Allowed:\x20','Invalid\x20value\x20for\x20\x22','Settable\x20top-level\x20keys:\x20','config','Project','includes','49947740yhMnMO','18ptYhEM','bool','appcode','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Config\x20value','Top-level\x20key\x20\x22','set','45rYaZXO','1865408futngg','66889QaVwOu','Global','app','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','keys','`,\x20`','35ejKonY','Missing\x20value.','string','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','\x20workspace\x20add\x20<name>\x20--appcode\x20','Usage:\x20','object','env'];a63_0x34aa=function(){return _0x4a95ce;};return a63_0x34aa();}(function(_0x207ee5,_0x33b928){const _0x12e92c=a63_0x229b,_0x2293d7=_0x207ee5();while(!![]){try{const _0x15b74b=-parseInt(_0x12e92c(0x18d))/0x1*(parseInt(_0x12e92c(0x183))/0x2)+-parseInt(_0x12e92c(0x174))/0x3+-parseInt(_0x12e92c(0x1a2))/0x4*(parseInt(_0x12e92c(0x18b))/0x5)+parseInt(_0x12e92c(0x19f))/0x6+-parseInt(_0x12e92c(0x193))/0x7*(parseInt(_0x12e92c(0x18c))/0x8)+-parseInt(_0x12e92c(0x178))/0x9+parseInt(_0x12e92c(0x182))/0xa;if(_0x15b74b===_0x33b928)break;else _0x2293d7['push'](_0x2293d7['shift']());}catch(_0x5d7a2d){_0x2293d7['push'](_0x2293d7['shift']());}}}(a63_0x34aa,0xf2862));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x4eac5c){const _0x3edf17=a63_0x229b,_0x44ecaf=_0x4eac5c[_0x3edf17(0x1a0)](_0x3edf17(0x19b)),_0x366e8d=_0x4eac5c[_0x3edf17(0x1a0)](_0x3edf17(0x1a3));if(!_0x44ecaf)throw CliErrors[_0x3edf17(0x19e)]('Missing\x20key.','Usage:\x20'+CLI_BIN_NAME+_0x3edf17(0x173));if(_0x366e8d===undefined||_0x366e8d==='')throw CliErrors[_0x3edf17(0x19e)](_0x3edf17(0x194),_0x3edf17(0x198)+CLI_BIN_NAME+_0x3edf17(0x173));let _0x2684c8=_0x44ecaf,_0x2e9485=_0x366e8d;if(_0x366e8d[_0x3edf17(0x19d)]>0x1f4)throw CliErrors['validation']('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(_0x44ecaf==='riskLevel')throw CliErrors[_0x3edf17(0x19e)](_0x3edf17(0x190));if(!isTopLevelConfigKey(_0x44ecaf))throw CliErrors[_0x3edf17(0x19e)](_0x3edf17(0x189)+_0x44ecaf+_0x3edf17(0x172),_0x3edf17(0x17e)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x44ecaf]&&!CONFIG_ENUM_VALUES[_0x44ecaf]['includes'](_0x366e8d))throw CliErrors[_0x3edf17(0x19e)](_0x3edf17(0x17d)+_0x44ecaf+_0x3edf17(0x17c)+CONFIG_ENUM_VALUES[_0x44ecaf][_0x3edf17(0x177)](',\x20'));if(_0x44ecaf===_0x3edf17(0x175)&&!normalizeLocale(_0x366e8d))throw CliErrors[_0x3edf17(0x19e)](_0x3edf17(0x176),_0x3edf17(0x19c));DOMAIN_CONFIG_FIELDS[_0x3edf17(0x181)](_0x44ecaf)&&(_0x2e9485=normalizeDomainOrigin(_0x44ecaf,_0x366e8d));const _0x1762e9={'global':_0x4eac5c[_0x3edf17(0x184)](_0x3edf17(0x1a1))},_0x48b073=resolveWriteScope(_0x1762e9),_0x2d3847=readScopedConfig(_0x48b073);_0x44ecaf===_0x3edf17(0x18f)&&(_0x2684c8='appcode',delete _0x2d3847['app']);_0x44ecaf===_0x3edf17(0x175)&&(_0x2e9485=normalizeLocale(_0x366e8d));if(_0x44ecaf==='env'){_0x2e9485=normalizeEnv(_0x366e8d);if(!isProduction(_0x2e9485)&&!isDaily(_0x2e9485))throw CliErrors[_0x3edf17(0x19e)](_0x3edf17(0x196),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x44ecaf===_0x3edf17(0x185)){const _0x35a02a=_0x2d3847[_0x3edf17(0x1a4)]&&typeof _0x2d3847[_0x3edf17(0x1a4)]===_0x3edf17(0x199)?Object[_0x3edf17(0x191)](_0x2d3847['apps']):[];if(_0x35a02a[_0x3edf17(0x19d)]>0x0)throw CliErrors['validation']('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x3edf17(0x171)+CLI_BIN_NAME+_0x3edf17(0x197)+_0x2e9485+_0x3edf17(0x192)+CLI_BIN_NAME+_0x3edf17(0x17b));const _0x349dd2=buildCanonicalProjectConfig({..._0x2d3847},{'appCodes':[_0x2e9485],'env':typeof _0x2d3847['env']===_0x3edf17(0x195)?_0x2d3847[_0x3edf17(0x19a)]:undefined});writeScopedConfig(_0x349dd2,_0x48b073);const _0x116bfc=_0x48b073==='global'?_0x3edf17(0x18e):'Project';return{'ok':!![],'message':'✓\x20'+_0x116bfc+_0x3edf17(0x179)+_0x2e9485+_0x3edf17(0x186)};}_0x2d3847[_0x2684c8]=_0x2e9485,writeScopedConfig(_0x2d3847,_0x48b073);const _0x1ac86d=_0x48b073===_0x3edf17(0x1a1)?_0x3edf17(0x18e):_0x3edf17(0x180);return{'ok':!![],'message':'✓\x20'+_0x1ac86d+'\x20'+_0x2684c8+_0x3edf17(0x17a)+_0x2e9485};}function a63_0x229b(_0x246862,_0x30bd3d){_0x246862=_0x246862-0x171;const _0x34aa60=a63_0x34aa();let _0x229b4b=_0x34aa60[_0x246862];return _0x229b4b;}export const configSetDefinition={'service':a63_0x5d7732(0x17f),'command':a63_0x5d7732(0x18a),'description':'Set\x20a\x20config\x20value','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a63_0x5d7732(0x19b),'type':a63_0x5d7732(0x195),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a63_0x5d7732(0x195),'description':a63_0x5d7732(0x188),'required':!![]},{'name':a63_0x5d7732(0x1a1),'type':'boolean','description':a63_0x5d7732(0x187),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25906d,_0x2f4afc){var _0x11acd2=a64_0x2dac,_0x3dd268=_0x25906d();while(!![]){try{var _0x35589f=parseInt(_0x11acd2(0x15e))/0x1+-parseInt(_0x11acd2(0x162))/0x2+-parseInt(_0x11acd2(0x164))/0x3*(-parseInt(_0x11acd2(0x163))/0x4)+parseInt(_0x11acd2(0x15c))/0x5+parseInt(_0x11acd2(0x165))/0x6+parseInt(_0x11acd2(0x161))/0x7+-parseInt(_0x11acd2(0x160))/0x8;if(_0x35589f===_0x2f4afc)break;else _0x3dd268['push'](_0x3dd268['shift']());}catch(_0x54e91a){_0x3dd268['push'](_0x3dd268['shift']());}}}(a64_0x2d86,0x9fd24));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x26fe67){var _0xbd5c3a=a64_0x2dac;if(_0x26fe67['global'])return'global';if(!isInProject())throw CliErrors[_0xbd5c3a(0x15f)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0xbd5c3a(0x15d);}function a64_0x2d86(){var _0x69ef6=['362038fUiPNG','8656ZueebO','1356DCiwxc','3367494YCEerI','1505395VHHLFQ','project','604886MTdPqO','validation','17628248tUlxdv','4156852UpImVN'];a64_0x2d86=function(){return _0x69ef6;};return a64_0x2d86();}function a64_0x2dac(_0x576514,_0x224784){_0x576514=_0x576514-0x15c;var _0x2d8669=a64_0x2d86();var _0x2dac4e=_0x2d8669[_0x576514];return _0x2dac4e;}export function readScopedConfig(_0x88ccaa){return readConfigFile(resolveWriteConfigPath(_0x88ccaa));}export function writeScopedConfig(_0x5a1700,_0x41525e){writeConfigFile(resolveWriteConfigPath(_0x41525e),_0x5a1700);}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a65_0x2fce65=a65_0x5952;(function(_0x465937,_0x1b0be7){const _0x3b2b25=a65_0x5952,_0x3f4b86=_0x465937();while(!![]){try{const _0xc75430=parseInt(_0x3b2b25(0xb8))/0x1*(parseInt(_0x3b2b25(0xc6))/0x2)+-parseInt(_0x3b2b25(0x9d))/0x3+parseInt(_0x3b2b25(0xc1))/0x4+parseInt(_0x3b2b25(0x6c))/0x5*(parseInt(_0x3b2b25(0xb5))/0x6)+parseInt(_0x3b2b25(0xae))/0x7+parseInt(_0x3b2b25(0xa6))/0x8*(-parseInt(_0x3b2b25(0xa9))/0x9)+parseInt(_0x3b2b25(0x9e))/0xa*(-parseInt(_0x3b2b25(0x72))/0xb);if(_0xc75430===_0x1b0be7)break;else _0x3f4b86['push'](_0x3f4b86['shift']());}catch(_0x26fabe){_0x3f4b86['push'](_0x3f4b86['shift']());}}}(a65_0x1a84,0x3f361));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x2fce65(0xbb),a65_0x2fce65(0xb9)]),SUPPORTED_FIELD_TYPES=new Set(['TEXT',a65_0x2fce65(0xa2),a65_0x2fce65(0xce),'BOOLEAN',a65_0x2fce65(0xc9),'MULTI_SELECT',a65_0x2fce65(0x7b),a65_0x2fce65(0xb6),a65_0x2fce65(0x90),a65_0x2fce65(0xc4)]);export function isDatasetBatchDesign(_0x5b67ea){const _0x3f1202=a65_0x2fce65;return isObject(_0x5b67ea)&&_0x5b67ea[_0x3f1202(0x8c)]===_0x3f1202(0x7f);}export function validateDatasetBatchDesign(_0x5bf200){const _0x585812=a65_0x2fce65;(!isObject(_0x5bf200)||_0x5bf200[_0x585812(0x8c)]!=='dataset-batch')&&fail(_0x585812(0xd1));_0x5bf200['schemaVersion']!==0x1&&fail(_0x585812(0xb3));const _0x53abd2=objectArray(_0x5bf200['datasets'],_0x585812(0x74),0x1,0x14),_0x28e944=objectArray(_0x5bf200[_0x585812(0xcd)],_0x585812(0xcd),0x0,0xc8),_0x2b8e5d=objectArray(_0x5bf200[_0x585812(0x92)],'unresolvedRelations',0x0,0xc8),_0x5273f4=new Set(),_0x4c6bb0=new Map();for(const [_0x3c5591,_0x3cdaf3]of _0x53abd2[_0x585812(0xa8)]()){const _0x230b5d=requiredString(_0x3cdaf3[_0x585812(0x8d)],'datasets['+_0x3c5591+_0x585812(0xac));!LOCAL_KEY[_0x585812(0xc0)](_0x230b5d)&&fail('datasets['+_0x3c5591+_0x585812(0xbc)+LOCAL_KEY[_0x585812(0x73)]+'.');_0x5273f4[_0x585812(0x93)](_0x230b5d)&&fail(_0x585812(0x9f));_0x5273f4[_0x585812(0x6f)](_0x230b5d);!isObject(_0x3cdaf3['design'])&&fail('datasets['+_0x3c5591+'].design\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x3cdaf3[_0x585812(0xcf)],_0x585812(0x87)+_0x3c5591+_0x585812(0x91));if(!isObject(_0x3cdaf3['design'][_0x585812(0x70)]))fail(_0x585812(0x87)+_0x3c5591+_0x585812(0x94));rejectServerDatasetIdentity(_0x3cdaf3['design'][_0x585812(0x70)],_0x585812(0x87)+_0x3c5591+_0x585812(0x85)),requiredString(_0x3cdaf3[_0x585812(0xcf)][_0x585812(0x70)][_0x585812(0x9a)],_0x585812(0x87)+_0x3c5591+_0x585812(0x8f));_0x585812(0xcd)in _0x3cdaf3['design']&&(!Array[_0x585812(0xa0)](_0x3cdaf3['design'][_0x585812(0xcd)])||_0x3cdaf3['design'][_0x585812(0xcd)][_0x585812(0xc5)]!==0x0)&&fail(_0x585812(0x87)+_0x3c5591+_0x585812(0x82));const _0x3769ba=objectArray(_0x3cdaf3['design'][_0x585812(0x89)],_0x585812(0x87)+_0x3c5591+_0x585812(0xcb),0x1,0xc8),_0x80dcdd=new Map();for(const [_0x447082,_0x15845e]of _0x3769ba[_0x585812(0xa8)]()){const _0xcc6f39=fieldName(_0x15845e);if(!_0xcc6f39)fail(_0x585812(0x87)+_0x3c5591+_0x585812(0xb1)+_0x447082+_0x585812(0xd6));const _0x3648a7=_0xcc6f39[_0x585812(0xa3)]();if(_0x80dcdd[_0x585812(0x93)](_0x3648a7))fail('Dataset\x20'+_0x230b5d+_0x585812(0x78));const _0x2843cb=stringValue(_0x15845e['type']??_0x15845e[_0x585812(0xb7)])['toUpperCase']();if(!SUPPORTED_FIELD_TYPES[_0x585812(0x93)](_0x2843cb))fail(_0x585812(0x87)+_0x3c5591+_0x585812(0xb1)+_0x447082+'].type\x20is\x20not\x20supported.');_0x80dcdd['set'](_0x3648a7,_0x2843cb),[_0x15845e[_0x585812(0xa1)],_0x15845e[_0x585812(0xbf)],_0x15845e['refTableLabelField']][_0x585812(0xb0)](_0x212e42=>stringValue(_0x212e42))&&fail(_0x585812(0x87)+_0x3c5591+_0x585812(0xb1)+_0x447082+_0x585812(0x84));}_0x4c6bb0['set'](_0x230b5d,_0x80dcdd);}const _0x4770a9=new Set(),_0x5aa06f=new Set();for(const [_0x4a9bd8,_0x22d706]of _0x28e944[_0x585812(0xa8)]()){const _0x387bc6=validateRelation(_0x22d706,_0x4a9bd8,_0x5273f4,_0x4c6bb0);if(_0x4770a9[_0x585812(0x93)](_0x387bc6))fail(_0x585812(0xa7));_0x4770a9[_0x585812(0x6f)](_0x387bc6);const _0x2fb129=_0x387bc6[_0x585812(0xcc)]('\x00',0x2)[_0x585812(0x6d)]('\x00');if(_0x5aa06f[_0x585812(0x93)](_0x2fb129))fail(_0x585812(0xd3));_0x5aa06f[_0x585812(0x6f)](_0x2fb129);}for(const [_0x51d806,_0x36e2b1]of _0x2b8e5d['entries']()){requiredString(_0x36e2b1[_0x585812(0x75)],'unresolvedRelations['+_0x51d806+_0x585812(0x76)),validateConfidence(_0x36e2b1['confidence'],_0x585812(0xb2)+_0x51d806+_0x585812(0x86));}return _0x5bf200;}export function reconcileBatchResult(_0x13740e){const _0x30d0be=a65_0x2fce65;if(!isObject(_0x13740e))return null;try{const _0x2111f1=stringArray(_0x13740e[_0x30d0be(0xaf)],_0x30d0be(0xaf),0x1,0x14),_0x4f7082=new Set(_0x2111f1);if(_0x4f7082[_0x30d0be(0x6a)]!==_0x2111f1[_0x30d0be(0xc5)]||_0x2111f1[_0x30d0be(0xb0)](_0xda54a=>!LOCAL_KEY[_0x30d0be(0xc0)](_0xda54a)))return null;const _0x59e5ce=objectArray(_0x13740e[_0x30d0be(0xaa)],_0x30d0be(0xaa),0x1,0x14),_0x4c6cea=new Map(),_0xeb9709=new Set();for(const _0x20a9e4 of _0x59e5ce){const _0x155527=requiredString(_0x20a9e4[_0x30d0be(0x8d)],_0x30d0be(0x95)),_0x488d2c=requiredString(_0x20a9e4[_0x30d0be(0x71)]??_0x20a9e4['datasetCode'],_0x30d0be(0x7a));if(_0x4c6cea['has'](_0x155527)||_0xeb9709[_0x30d0be(0x93)](_0x488d2c))return null;_0x4c6cea[_0x30d0be(0x67)](_0x155527,_0x488d2c),_0xeb9709[_0x30d0be(0x6f)](_0x488d2c);}if(!sameSet(_0x4f7082,new Set(_0x4c6cea[_0x30d0be(0xd0)]())))return null;const _0x12a243=objectArray(_0x13740e[_0x30d0be(0xc7)],_0x30d0be(0xc7),0x0,0xc8),_0x505edf=objectArray(_0x13740e[_0x30d0be(0xad)],_0x30d0be(0xad),0x0,0xc8),_0x1732b7=relationTupleSet(_0x12a243,![],_0x4c6cea),_0x59dd97=relationTupleSet(_0x505edf,!![],_0x4c6cea);if(!_0x1732b7||!_0x59dd97||!sameSet(_0x1732b7,_0x59dd97))return null;const _0x3fe043=objectArray(_0x13740e[_0x30d0be(0x92)],_0x30d0be(0x92),0x0,0xc8);return{'expectedLocalKeys':_0x2111f1,'expectedRelations':_0x12a243,'createdDatasets':_0x59e5ce,'createdRelations':_0x505edf,'unresolvedRelations':_0x3fe043,...isObject(_0x13740e[_0x30d0be(0xd2)])?{'metrics':_0x13740e[_0x30d0be(0xd2)]}:{}};}catch{return null;}}function a65_0x5952(_0x22c3ba,_0x27fb62){_0x22c3ba=_0x22c3ba-0x65;const _0x1a848a=a65_0x1a84();let _0x595262=_0x1a848a[_0x22c3ba];return _0x595262;}function validateRelation(_0x6f8eb4,_0x108e4f,_0x141e9a,_0x5e4e13){const _0x51a72b=a65_0x2fce65,_0x3d0624=_0x51a72b(0xc3)+_0x108e4f+']',_0x51c450=requiredString(_0x6f8eb4[_0x51a72b(0x6e)],_0x3d0624+_0x51a72b(0xd4)),_0x4d68ed=requiredString(_0x6f8eb4[_0x51a72b(0x97)],_0x3d0624+'.toDatasetKey'),_0x34f460=requiredString(_0x6f8eb4[_0x51a72b(0x98)],_0x3d0624+_0x51a72b(0x7e))[_0x51a72b(0xa3)](),_0x4022bf=requiredString(_0x6f8eb4['toField'],_0x3d0624+_0x51a72b(0xbd))['toLowerCase']();if(!_0x141e9a[_0x51a72b(0x93)](_0x51c450)||!_0x141e9a[_0x51a72b(0x93)](_0x4d68ed))fail(_0x3d0624+_0x51a72b(0xbe));const _0x194ea2=_0x5e4e13[_0x51a72b(0x69)](_0x51c450)?.[_0x51a72b(0x69)](_0x34f460),_0xf4db9a=_0x5e4e13[_0x51a72b(0x69)](_0x4d68ed)?.[_0x51a72b(0x69)](_0x4022bf);if(_0x194ea2===undefined||_0xf4db9a===undefined)fail(_0x3d0624+'\x20references\x20an\x20unknown\x20field.');if(_0x194ea2&&_0xf4db9a&&_0x194ea2!==_0xf4db9a)fail(_0x3d0624+'\x20connects\x20incompatible\x20field\x20types.');const _0x580da0=stringValue(_0x6f8eb4[_0x51a72b(0xb4)])||_0x51a72b(0x80);if(_0x580da0!==_0x51a72b(0x80))fail(_0x3d0624+_0x51a72b(0x9b));const _0x3637af=stringValue(_0x6f8eb4[_0x51a72b(0xab)])||'MANY_TO_ONE';if(!SUPPORTED_CARDINALITIES['has'](_0x3637af))fail(_0x3d0624+_0x51a72b(0x88));return requiredString(_0x6f8eb4[_0x51a72b(0x75)],_0x3d0624+'.reason'),validateConfidence(_0x6f8eb4[_0x51a72b(0x66)],_0x3d0624+_0x51a72b(0x99)),tuple(_0x51c450,_0x34f460,_0x4d68ed,_0x4022bf,_0x51a72b(0x80),_0x3637af);}function relationTupleSet(_0x18a4bc,_0x1aedd9,_0x5bbc22){const _0x31c3ec=a65_0x2fce65,_0x508f84=new Set();for(const _0x3fcde9 of _0x18a4bc){const _0x1981c1=stringValue(_0x3fcde9[_0x31c3ec(0x6e)]),_0x58af73=stringValue(_0x3fcde9['toDatasetKey']),_0x73ed17=stringValue(_0x3fcde9[_0x31c3ec(0x98)])[_0x31c3ec(0xa3)](),_0x3a4b68=stringValue(_0x3fcde9[_0x31c3ec(0x65)])[_0x31c3ec(0xa3)](),_0x3a70f0=stringValue(_0x3fcde9[_0x31c3ec(0xb4)]),_0x393cb1=stringValue(_0x3fcde9[_0x31c3ec(0xab)]);if(!_0x1981c1||!_0x58af73||!_0x73ed17||!_0x3a4b68||_0x3a70f0!=='lookup'||!SUPPORTED_CARDINALITIES[_0x31c3ec(0x93)](_0x393cb1))return null;if(!_0x5bbc22[_0x31c3ec(0x93)](_0x1981c1)||!_0x5bbc22['has'](_0x58af73))return null;if(_0x1aedd9&&(stringValue(_0x3fcde9[_0x31c3ec(0x6b)])!==_0x5bbc22['get'](_0x1981c1)||stringValue(_0x3fcde9['toDatasetCode'])!==_0x5bbc22[_0x31c3ec(0x69)](_0x58af73)))return null;const _0x2b2f75=tuple(_0x1981c1,_0x73ed17,_0x58af73,_0x3a4b68,_0x3a70f0,_0x393cb1);if(_0x508f84[_0x31c3ec(0x93)](_0x2b2f75))return null;_0x508f84[_0x31c3ec(0x6f)](_0x2b2f75);}return _0x508f84;}function rejectServerDatasetIdentity(_0x244244,_0x108009){const _0x1d1810=a65_0x2fce65;for(const _0x2cdb12 of['id',_0x1d1810(0xca),_0x1d1810(0xa4),'code',_0x1d1810(0x8a),_0x1d1810(0xba)]){if(_0x244244[_0x2cdb12]!==undefined&&_0x244244[_0x2cdb12]!==null&&_0x244244[_0x2cdb12]!=='')fail(_0x108009+'.'+_0x2cdb12+_0x1d1810(0x9c));}}function objectArray(_0x7621c9,_0x39d8b4,_0x139cea,_0x4b1572){const _0x5df249=a65_0x2fce65;return(!Array['isArray'](_0x7621c9)||_0x7621c9[_0x5df249(0xc5)]<_0x139cea||_0x7621c9[_0x5df249(0xc5)]>_0x4b1572||_0x7621c9[_0x5df249(0xb0)](_0x45848f=>!isObject(_0x45848f)))&&fail(_0x39d8b4+_0x5df249(0x8e)+_0x139cea+'..'+_0x4b1572+_0x5df249(0x96)),_0x7621c9;}function a65_0x1a84(){const _0x506e49=['some','].design.fields[','unresolvedRelations[','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','relationType','78OhIfrw','USER','fieldType','78eDiDdq','ONE_TO_ONE','modelCode','MANY_TO_ONE','].localKey\x20must\x20match\x20','.toField','\x20references\x20an\x20unknown\x20dataset\x20localKey.','refTableField','test','119804WSqMzg','trim','relations[','UPLOAD','length','9062HHPhYV','expectedRelations','name','SELECT','datasetId','].design.fields','split','relations','DATETIME','design','keys','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','metrics','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','.fromDatasetKey','validation',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','toField','confidence','set','fieldCode','get','size','fromDatasetCode','131515AbHzQU','join','fromDatasetKey','add','dataset','code','3863486eZtijL','source','datasets','reason','].reason','object','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','\x20non-empty\x20strings.','createdDatasets[].code','DATE_RANGE','number','\x20must\x20be\x20between\x200\x20and\x201.','.fromField','dataset-batch','lookup','map','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','string',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','].design.dataset','].confidence','datasets[','.cardinality\x20is\x20not\x20supported.','fields','datasetCode','every','kind','localKey','\x20must\x20contain\x20','].design.dataset.datasetName','ADDRESS','].design','unresolvedRelations','has','].design.dataset\x20must\x20be\x20an\x20object.','createdDatasets[].localKey','\x20objects.','toDatasetKey','fromField','.confidence','datasetName','.relationType\x20must\x20be\x20\x22lookup\x22.','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','183399KWuMYe','10Risghd','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','isArray','refTable','NUMBER','toLowerCase','modelId','\x20is\x20required.','14216tGSmKN','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','entries','306UHTkam','createdDatasets','cardinality','].localKey','createdRelations','44674rYLPqG','expectedLocalKeys'];a65_0x1a84=function(){return _0x506e49;};return a65_0x1a84();}function stringArray(_0x1ea4e7,_0x27e4c7,_0x2bbff8,_0x1d6058){const _0x1e3671=a65_0x2fce65;return(!Array['isArray'](_0x1ea4e7)||_0x1ea4e7['length']<_0x2bbff8||_0x1ea4e7[_0x1e3671(0xc5)]>_0x1d6058||_0x1ea4e7['some'](_0x4b5edc=>typeof _0x4b5edc!==_0x1e3671(0x83)||!_0x4b5edc[_0x1e3671(0xc2)]()))&&fail(_0x27e4c7+'\x20must\x20contain\x20'+_0x2bbff8+'..'+_0x1d6058+_0x1e3671(0x79)),_0x1ea4e7;}function requiredString(_0x4064d5,_0x231916){const _0x1b879a=a65_0x2fce65,_0x1c9998=stringValue(_0x4064d5);if(!_0x1c9998)fail(_0x231916+_0x1b879a(0xa5));return _0x1c9998;}function stringValue(_0x58874c){const _0x59c24d=a65_0x2fce65;return typeof _0x58874c===_0x59c24d(0x83)?_0x58874c[_0x59c24d(0xc2)]():'';}function fieldName(_0x2a10fd){const _0x5ed86d=a65_0x2fce65;return stringValue(_0x2a10fd['code']??_0x2a10fd[_0x5ed86d(0x68)]??_0x2a10fd[_0x5ed86d(0xc8)]??_0x2a10fd['fieldName']);}function validateConfidence(_0x5dd14a,_0xebfdcb){const _0x464fd9=a65_0x2fce65;_0x5dd14a!==undefined&&_0x5dd14a!==null&&(typeof _0x5dd14a!==_0x464fd9(0x7c)||!Number['isFinite'](_0x5dd14a)||_0x5dd14a<0x0||_0x5dd14a>0x1)&&fail(_0xebfdcb+_0x464fd9(0x7d));}function tuple(..._0x4ae796){const _0x337737=a65_0x2fce65;return _0x4ae796[_0x337737(0x81)]((_0x27a5be,_0x3eb65a)=>_0x3eb65a===0x1||_0x3eb65a===0x3?_0x27a5be['toLowerCase']():_0x27a5be)[_0x337737(0x6d)]('\x00');}function sameSet(_0x170e85,_0xf04224){const _0x3aacfc=a65_0x2fce65;return _0x170e85[_0x3aacfc(0x6a)]===_0xf04224[_0x3aacfc(0x6a)]&&[..._0x170e85][_0x3aacfc(0x8b)](_0x282bf5=>_0xf04224['has'](_0x282bf5));}function isObject(_0x43482c){const _0x3e1a26=a65_0x2fce65;return typeof _0x43482c===_0x3e1a26(0x77)&&_0x43482c!==null&&!Array[_0x3e1a26(0xa0)](_0x43482c);}function fail(_0x14b1e7){const _0x5f42ac=a65_0x2fce65;throw CliErrors[_0x5f42ac(0xd5)](_0x14b1e7);}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a66_0x83cc80=a66_0x35db;(function(_0xa2a5d8,_0x3eb964){const _0x1e2bc2=a66_0x35db,_0x233a23=_0xa2a5d8();while(!![]){try{const _0x245735=parseInt(_0x1e2bc2(0x1b4))/0x1*(parseInt(_0x1e2bc2(0x1c6))/0x2)+parseInt(_0x1e2bc2(0x196))/0x3*(parseInt(_0x1e2bc2(0x1c5))/0x4)+parseInt(_0x1e2bc2(0x1d7))/0x5*(parseInt(_0x1e2bc2(0x1ca))/0x6)+parseInt(_0x1e2bc2(0x1b6))/0x7*(-parseInt(_0x1e2bc2(0x1d6))/0x8)+-parseInt(_0x1e2bc2(0x1a0))/0x9+parseInt(_0x1e2bc2(0x194))/0xa*(-parseInt(_0x1e2bc2(0x1da))/0xb)+-parseInt(_0x1e2bc2(0x193))/0xc*(-parseInt(_0x1e2bc2(0x1b8))/0xd);if(_0x245735===_0x3eb964)break;else _0x233a23['push'](_0x233a23['shift']());}catch(_0x5df54a){_0x233a23['push'](_0x233a23['shift']());}}}(a66_0x221b,0x3c345));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH='/smartapi/dblink/updateTableBusinessGroup',METADATA_BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP='ungrouped';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x21b913,input:_0x4ed464,dryRun:_0x17f099}){const _0x13137c=a66_0x35db;validateInput(_0x4ed464);const _0x422d37=normalizeBusinessGroupArgument(_0x4ed464['businessGroup']),_0x385d14=await getDatasetDetail(_0x4ed464[_0x13137c(0x1aa)]),_0x450107=resolveBusinessGroupDataset(_0x385d14,_0x4ed464['code']);assertBusinessGroupUpdateSupported(_0x450107,_0x422d37);const _0x2cc32e=loadCurrentBusinessGroup(_0x385d14,_0x450107);assertExpectedBusinessGroup(_0x2cc32e,_0x4ed464[_0x13137c(0x1d9)]);const _0x3420d1=buildBackendPlan(_0x21b913,_0x450107,_0x422d37),_0x3d095a=_0x2cc32e!==_0x422d37;let _0x3dc6f8;if(_0x3d095a&&!_0x17f099){_0x3420d1[_0x13137c(0x1bb)]===_0x13137c(0x1a5)?await updateDbTableBusinessGroup(_0x3420d1[_0x13137c(0x1c2)]):await updateErBusinessGroup(_0x3420d1[_0x13137c(0x1c2)]);const _0x46808c=await getDatasetDetail(_0x450107[_0x13137c(0x1aa)]),_0x218ffc=resolveBusinessGroupDataset(_0x46808c,_0x450107[_0x13137c(0x1aa)]),_0x33c589=loadCurrentBusinessGroup(_0x46808c,_0x218ffc);if(_0x33c589!==_0x422d37)throw CliErrors['apiError'](_0x13137c(0x1af),_0x13137c(0x1b1)+JSON[_0x13137c(0x19a)](displayBusinessGroup(_0x422d37))+_0x13137c(0x1cc)+JSON[_0x13137c(0x19a)](displayBusinessGroup(_0x33c589))+'.');_0x3dc6f8={'verified':!![],'status':_0x13137c(0x1ce),'afterReadback':{'businessGroup':displayBusinessGroup(_0x33c589)}};}else!_0x3d095a&&(_0x3dc6f8={'verified':!![],'status':_0x13137c(0x1ab),'afterReadback':{'businessGroup':displayBusinessGroup(_0x2cc32e)}});const _0x6a9448={'operation':_0x13137c(0x1a6),'appCode':_0x21b913,'selector':{'code':_0x450107[_0x13137c(0x1aa)]},'dataset':{'id':_0x450107['id'],'code':_0x450107[_0x13137c(0x1aa)],'name':_0x450107[_0x13137c(0x1bd)],'sourceType':_0x450107[_0x13137c(0x1b9)]},'before':{'businessGroup':displayBusinessGroup(_0x2cc32e)},'after':{'businessGroup':displayBusinessGroup(_0x422d37)},'changed':_0x3d095a,'dryRun':_0x17f099,'submitted':_0x3d095a&&!_0x17f099,'backend':{'method':_0x3420d1[_0x13137c(0x1cf)],'path':_0x3420d1[_0x13137c(0x1c4)],'payload':_0x3420d1[_0x13137c(0x1c2)]},..._0x3dc6f8?{'verification':_0x3dc6f8}:{},'warnings':[]};return{'ok':!![],'data':_0x6a9448,'message':_0x3d095a?_0x17f099?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x450107[_0x13137c(0x1aa)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x450107[_0x13137c(0x1aa)]:_0x13137c(0x1bf)+_0x450107['code']};}export const datasetBusinessGroupUpdate={'service':'dataset','command':'business-group-update','description':'Update\x20business\x20scenario\x20group','risk':a66_0x83cc80(0x19c),'flags':[CODE_FLAG,{'name':a66_0x83cc80(0x1d2),'type':a66_0x83cc80(0x1a3),'required':!![],'description':a66_0x83cc80(0x19d)},{'name':a66_0x83cc80(0x1a7),'type':a66_0x83cc80(0x1a3),'required':![],'description':a66_0x83cc80(0x1ac)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x274a75){validateInput(readBusinessGroupUpdateInput(_0x274a75));},async 'dryRun'(_0x9abfff){const _0x4ec3a4=a66_0x83cc80,_0x1b3503=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x9abfff[_0x4ec3a4(0x1a4)],'input':readBusinessGroupUpdateInput(_0x9abfff),'dryRun':!![]});return{'method':_0x1b3503[_0x4ec3a4(0x1ae)]['backend'][_0x4ec3a4(0x1cf)],'url':_0x1b3503['data'][_0x4ec3a4(0x199)][_0x4ec3a4(0x1c4)],'body':_0x1b3503['data'][_0x4ec3a4(0x199)][_0x4ec3a4(0x1c2)],'description':_0x1b3503[_0x4ec3a4(0x1d1)],..._0x1b3503[_0x4ec3a4(0x1ae)]};},async 'execute'(_0x2b406e){const _0x2bf6e6=a66_0x83cc80;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x2b406e[_0x2bf6e6(0x1a4)],'input':readBusinessGroupUpdateInput(_0x2b406e),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x34a740){const _0x3edf79=a66_0x83cc80,_0x573a9d=_0x34a740[_0x3edf79(0x1c0)]('expect-business-group');return{'code':trim(_0x34a740[_0x3edf79(0x1c0)](_0x3edf79(0x1aa))),'businessGroup':_0x34a740[_0x3edf79(0x1c0)](_0x3edf79(0x1d2)),'expectBusinessGroup':_0x573a9d===undefined||_0x573a9d===''?undefined:_0x573a9d};}function validateInput(_0x4a0bc4){const _0x242c2b=a66_0x83cc80;if(!trim(_0x4a0bc4[_0x242c2b(0x1aa)]))throw CliErrors[_0x242c2b(0x19f)](_0x242c2b(0x1cd));if(_0x4a0bc4['businessGroup']===undefined)throw CliErrors['validation']('--business-group\x20is\x20required');if(!trim(_0x4a0bc4[_0x242c2b(0x1b3)]))throw CliErrors[_0x242c2b(0x19f)](_0x242c2b(0x1d4));}function assertBusinessGroupUpdateSupported(_0xbd4a25,_0xf68f45){const _0x2ad1b3=a66_0x83cc80;if(_0xbd4a25['sourceType']===_0x2ad1b3(0x1c7)&&!_0xf68f45)throw CliErrors[_0x2ad1b3(0x19f)](_0x2ad1b3(0x1be));}function resolveBusinessGroupDataset(_0x40d59f,_0x1315ed){const _0x2bf37f=a66_0x83cc80,_0x4859b5=asPlainObject(_0x40d59f[_0x2bf37f(0x1a9)]),_0x4412b3=asPlainObject(_0x40d59f[_0x2bf37f(0x1c1)]),_0x4e41e9=resolveSourceType(_0x40d59f,_0x4859b5,_0x4412b3),_0x5ea5c4=firstString(_0x40d59f[_0x2bf37f(0x19e)],_0x40d59f[_0x2bf37f(0x1aa)],_0x4859b5['datasetCode'],_0x1315ed)||_0x1315ed;return{'id':firstNumber(_0x40d59f[_0x2bf37f(0x1cb)],_0x40d59f['id'],_0x4859b5[_0x2bf37f(0x19b)])??firstString(_0x40d59f[_0x2bf37f(0x1cb)],_0x40d59f['id'],_0x4859b5[_0x2bf37f(0x19b)])??null,'code':_0x5ea5c4,'name':firstString(_0x40d59f[_0x2bf37f(0x1bd)],_0x4859b5['datasetName'],_0x4859b5[_0x2bf37f(0x1bd)])||null,'sourceType':_0x4e41e9,'dbTableSelector':_0x4e41e9===_0x2bf37f(0x1c7)?{'dbLinkId':firstNumber(_0x4412b3[_0x2bf37f(0x1b0)]),'tableName':firstString(_0x4412b3[_0x2bf37f(0x1b7)])||null}:null};}function resolveSourceType(_0x844c83,_0x306bd3,_0x2a14b5){const _0x5ac8a0=a66_0x83cc80,_0x2fc9ae=firstString(_0x844c83['source'],_0x844c83[_0x5ac8a0(0x1b9)],_0x306bd3[_0x5ac8a0(0x1d3)],_0x306bd3['sourceType'])?.[_0x5ac8a0(0x198)]()[_0x5ac8a0(0x1d0)]();if(_0x2fc9ae===_0x5ac8a0(0x1c7)||_0x2fc9ae===_0x5ac8a0(0x1c9))return _0x2fc9ae;if(Object['keys'](_0x2a14b5)['length']>0x0)return _0x5ac8a0(0x1c7);throw CliErrors['validation'](_0x5ac8a0(0x1bc));}function loadCurrentBusinessGroup(_0x24e138,_0x354a7f){const _0x187664=a66_0x83cc80,_0x1fd23=readBusinessGroupFromDatasetDetail(_0x24e138,_0x354a7f[_0x187664(0x1b9)]);if(_0x1fd23['found'])return normalizeBusinessGroup(_0x1fd23[_0x187664(0x1a8)]);return'';}function readBusinessGroupFromDatasetDetail(_0x7741f4,_0xe5b5fe){const _0x481855=a66_0x83cc80,_0x4084bd=asPlainObject(_0x7741f4[_0x481855(0x1a9)]),_0xb016a1=firstPresent(_0x7741f4['businessGroup']);if(_0xb016a1[_0x481855(0x1b5)])return _0xb016a1;const _0x3642ee=firstPresent(_0x4084bd[_0x481855(0x1b3)]);if(_0x3642ee[_0x481855(0x1b5)])return _0x3642ee;if(_0xe5b5fe===_0x481855(0x1c7))return{'found':![]};const _0x42092f=readBusinessGroupFromExtend(_0x7741f4['extend']);if(_0x42092f[_0x481855(0x1b5)])return _0x42092f;return readBusinessGroupFromExtend(_0x4084bd[_0x481855(0x1a1)]);}function readBusinessGroupFromExtend(_0x206e72){const _0x241950=a66_0x83cc80;if(_0x206e72===undefined||_0x206e72===null||_0x206e72==='')return{'found':![]};if(typeof _0x206e72===_0x241950(0x1a3))try{const _0x4b21a3=JSON[_0x241950(0x1b2)](_0x206e72);return readBusinessGroupFromExtend(_0x4b21a3);}catch{return{'found':![]};}const _0x246d10=asPlainObject(_0x206e72);if(Object[_0x241950(0x1c3)]['hasOwnProperty']['call'](_0x246d10,'businessGroup'))return{'found':!![],'value':_0x246d10[_0x241950(0x1b3)]};return{'found':![]};}function a66_0x35db(_0x392e7f,_0x4b8ed0){_0x392e7f=_0x392e7f-0x191;const _0x221bed=a66_0x221b();let _0x35dbc2=_0x221bed[_0x392e7f];return _0x35dbc2;}function a66_0x221b(){const _0x58a15d=['11mrhWTn','isFinite','isArray','3693720caVtXY','2498840DedMSW','dbLinkId','1974xQCmzA','number','trim','backend','stringify','datasetId','write','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','modelCode','validation','2110680GWWhAU','extend','metadata','string','appCode','db-table','update','expect-business-group','value','dataset','code','unchanged','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','Expectation\x20mismatch\x20at\x20businessGroup','data','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','dbId','Expected\x20','parse','businessGroup','143866yBffgm','found','189qgOVdu','tableName','26SfyRpN','sourceType','dbTableSelector','kind','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','name','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','str','dbtableConfig','payload','prototype','path','484ZHOwpZ','2idmGqF','DB_TABLE','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','METADATA','1002810PNfTYJ','modelId',',\x20actual\x20','--code\x20is\x20required','matched','method','toUpperCase','message','business-group','source','--business-group\x20must\x20not\x20be\x20blank','POST','81552OSuWag','5DduYEl','object','expectBusinessGroup'];a66_0x221b=function(){return _0x58a15d;};return a66_0x221b();}function firstPresent(..._0x1ffb2e){for(const _0x4433d1 of _0x1ffb2e){if(_0x4433d1!==undefined&&_0x4433d1!==null)return{'found':!![],'value':_0x4433d1};}return{'found':![]};}function assertExpectedBusinessGroup(_0x1e4a5e,_0xdef533){const _0x1a5b89=a66_0x83cc80;if(_0xdef533===undefined)return;const _0x5e94ad=normalizeBusinessGroupArgument(_0xdef533);if(_0x1e4a5e!==_0x5e94ad)throw CliErrors[_0x1a5b89(0x19f)](_0x1a5b89(0x1ad),_0x1a5b89(0x1b1)+JSON[_0x1a5b89(0x19a)](_0x5e94ad)+_0x1a5b89(0x1cc)+JSON[_0x1a5b89(0x19a)](_0x1e4a5e));}function buildBackendPlan(_0x1aa2be,_0x2a5dc3,_0x1fb183){const _0x8a7a6a=a66_0x83cc80;if(_0x2a5dc3[_0x8a7a6a(0x1b9)]===_0x8a7a6a(0x1c7)){if(!_0x2a5dc3[_0x8a7a6a(0x1ba)]||_0x2a5dc3[_0x8a7a6a(0x1ba)]['dbLinkId']===null||!_0x2a5dc3[_0x8a7a6a(0x1ba)][_0x8a7a6a(0x1b7)])throw CliErrors['validation']('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.',_0x8a7a6a(0x1c8));return{'kind':'db-table','method':_0x8a7a6a(0x1d5),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x2a5dc3['dbTableSelector'][_0x8a7a6a(0x195)],'tableName':_0x2a5dc3[_0x8a7a6a(0x1ba)][_0x8a7a6a(0x1b7)],'businessGroup':_0x1fb183}};}return{'kind':_0x8a7a6a(0x1a2),'method':_0x8a7a6a(0x1d5),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x1aa2be,'datasetCode':_0x2a5dc3[_0x8a7a6a(0x1aa)],'businessGroup':_0x1fb183}};}function normalizeBusinessGroup(_0x49891b){const _0x1bad4d=a66_0x83cc80;if(_0x49891b===undefined||_0x49891b===null)return'';return String(_0x49891b)[_0x1bad4d(0x198)]();}function normalizeBusinessGroupArgument(_0x3d3334){const _0x287bce=normalizeBusinessGroup(_0x3d3334);return _0x287bce===UNGROUPED_BUSINESS_GROUP?'':_0x287bce;}function displayBusinessGroup(_0x53d54e){return _0x53d54e||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x27c189){const _0x2c216a=a66_0x83cc80;if(!_0x27c189||typeof _0x27c189!==_0x2c216a(0x1d8)||Array[_0x2c216a(0x192)](_0x27c189))return{};return _0x27c189;}function firstString(..._0x244a65){const _0x1f1817=a66_0x83cc80;for(const _0x4fd12b of _0x244a65){if(typeof _0x4fd12b===_0x1f1817(0x1a3)&&_0x4fd12b[_0x1f1817(0x198)]())return _0x4fd12b[_0x1f1817(0x198)]();if(typeof _0x4fd12b===_0x1f1817(0x197)&&Number[_0x1f1817(0x191)](_0x4fd12b))return String(_0x4fd12b);}return undefined;}function firstNumber(..._0x51ddb0){const _0x501bdb=a66_0x83cc80;for(const _0x2dac35 of _0x51ddb0){if(typeof _0x2dac35===_0x501bdb(0x197)&&Number[_0x501bdb(0x191)](_0x2dac35))return _0x2dac35;if(typeof _0x2dac35===_0x501bdb(0x1a3)&&_0x2dac35[_0x501bdb(0x198)]()&&Number[_0x501bdb(0x191)](Number(_0x2dac35)))return Number(_0x2dac35);}return null;}function trim(_0x3b3185){return String(_0x3b3185||'')['trim']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a67_0x3ec0(){const _0x27c263=['number','appCode','3597424zSUjAd','290deCDQY','22719AjtESp','num','12393alkLJp','groups','\x20business\x20group(s)\x20for\x20database\x20connection\x20','469866fHZQZv','map','read','ungrouped','4481380hVtVpD','86iXIihK','length','24175Wcghty','21lqQpei','dbid','866540xHTahU','DB_TABLE','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','businessGroup'];a67_0x3ec0=function(){return _0x27c263;};return a67_0x3ec0();}const a67_0x39f364=a67_0x16be;(function(_0x501777,_0x7790){const _0x4f3a21=a67_0x16be,_0x4dad52=_0x501777();while(!![]){try{const _0x2c9f95=parseInt(_0x4f3a21(0x12e))/0x1+-parseInt(_0x4f3a21(0x12c))/0x2*(parseInt(_0x4f3a21(0x122))/0x3)+parseInt(_0x4f3a21(0x131))/0x4+parseInt(_0x4f3a21(0x12b))/0x5+-parseInt(_0x4f3a21(0x127))/0x6*(-parseInt(_0x4f3a21(0x12f))/0x7)+-parseInt(_0x4f3a21(0x120))/0x8+-parseInt(_0x4f3a21(0x124))/0x9*(-parseInt(_0x4f3a21(0x121))/0xa);if(_0x2c9f95===_0x7790)break;else _0x4dad52['push'](_0x4dad52['shift']());}catch(_0x2985d0){_0x4dad52['push'](_0x4dad52['shift']());}}}(a67_0x3ec0,0x9b6db));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a67_0x16be(_0x3f3c7d,_0x212967){_0x3f3c7d=_0x3f3c7d-0x120;const _0x3ec057=a67_0x3ec0();let _0x16be56=_0x3ec057[_0x3f3c7d];return _0x16be56;}export const datasetBusinessGroups={'service':'dataset','command':'business-groups','description':a67_0x39f364(0x133),'risk':a67_0x39f364(0x129),'flags':[{'name':a67_0x39f364(0x130),'type':a67_0x39f364(0x135),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3d1cc8){const _0x374af1=a67_0x39f364,_0x3081b5=_0x3d1cc8[_0x374af1(0x123)](_0x374af1(0x130)),_0x2369ff=await getErBusinessGroupSummary(_0x3d1cc8[_0x374af1(0x136)],_0x3081b5),_0x54a554=_0x2369ff[_0x374af1(0x125)][_0x374af1(0x128)](_0x277599=>({..._0x277599,'businessGroup':_0x277599[_0x374af1(0x134)]['trim']()||_0x374af1(0x12a)}));return{'ok':!![],'data':{..._0x2369ff,'groups':_0x54a554,'scope':_0x374af1(0x132)},'message':'Found\x20'+_0x54a554[_0x374af1(0x12d)]+_0x374af1(0x126)+_0x3081b5};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x5b6e01=a68_0x42c5;function a68_0x42c5(_0x363e2a,_0xe46d2e){_0x363e2a=_0x363e2a-0x1b3;const _0x5b2591=a68_0x5b25();let _0x42c5ca=_0x5b2591[_0x363e2a];return _0x42c5ca;}(function(_0x480312,_0x4aaeab){const _0x4988a5=a68_0x42c5,_0x1bd61b=_0x480312();while(!![]){try{const _0x43e169=-parseInt(_0x4988a5(0x1be))/0x1*(parseInt(_0x4988a5(0x1c1))/0x2)+-parseInt(_0x4988a5(0x1b6))/0x3*(-parseInt(_0x4988a5(0x1bf))/0x4)+parseInt(_0x4988a5(0x1cb))/0x5+parseInt(_0x4988a5(0x1c8))/0x6*(-parseInt(_0x4988a5(0x1b5))/0x7)+parseInt(_0x4988a5(0x1b9))/0x8*(parseInt(_0x4988a5(0x1bb))/0x9)+-parseInt(_0x4988a5(0x1c4))/0xa*(parseInt(_0x4988a5(0x1d3))/0xb)+parseInt(_0x4988a5(0x1d1))/0xc;if(_0x43e169===_0x4aaeab)break;else _0x1bd61b['push'](_0x1bd61b['shift']());}catch(_0x2017b5){_0x1bd61b['push'](_0x1bd61b['shift']());}}}(a68_0x5b25,0xeef50));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a68_0x5b6e01(0x1c7),'filter':a68_0x5b6e01(0x1ba),'getOne':a68_0x5b6e01(0x1c2)};export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x286d70){return _0x286d70==null?'':String(_0x286d70)['trim']();}function getDatasetCode(_0x4e926e){const _0x45c1e9=a68_0x5b6e01;return valueToString(_0x4e926e[_0x45c1e9(0x1b7)]??_0x4e926e[_0x45c1e9(0x1d0)]??_0x4e926e['dataset']?.[_0x45c1e9(0x1cd)]);}function getDatasetName(_0x44336a){const _0x2e59be=a68_0x5b6e01;return valueToString(_0x44336a['name']??_0x44336a[_0x2e59be(0x1ca)]?.[_0x2e59be(0x1cf)])||_0x2e59be(0x1bc);}function getDatasetSource(_0x5c663c){const _0x218517=a68_0x5b6e01;return valueToString(_0x5c663c[_0x218517(0x1b8)]??_0x5c663c['dataset']?.[_0x218517(0x1cc)])[_0x218517(0x1c0)]();}function getDbtableConfig(_0x3268ce){const _0x4434a7=a68_0x5b6e01,_0x4ccb6d=_0x3268ce[_0x4434a7(0x1ce)]??_0x3268ce[_0x4434a7(0x1c3)];return _0x4ccb6d&&typeof _0x4ccb6d==='object'?_0x4ccb6d:{};}export function isDbTableBackedDataset(_0x468ecb){const _0x2c3314=a68_0x5b6e01,_0x1c23c9=getDatasetSource(_0x468ecb);if(_0x1c23c9==='METADATA')return![];const _0x32fd19=getDbtableConfig(_0x468ecb),_0xe09b5a=_0x32fd19['dbId']??_0x32fd19['id'],_0x21ca77=valueToString(_0x32fd19[_0x2c3314(0x1b4)]??_0x468ecb[_0x2c3314(0x1b4)]??_0x468ecb['dataset']?.['tableName']);return _0xe09b5a!==undefined&&_0xe09b5a!==null&&_0x21ca77['length']>0x0;}function a68_0x5b25(){const _0x14d200=['datasetCode','dbtableConfig','datasetName','modelCode','25462404iGDNNt','validation','5080801RqrlTS','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','tableName','132636yxOsVm','33WeaAGa','code','source','241608FdnCsg','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','387fiGtLP','unknown','\x20is\x20','194781fIgxwT','234004aKkhuK','toUpperCase','12mUFaID','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','dbtable','10GbnByQ','filter','The\x20current\x20dataset\x20\x22','lovrabet','582crvjDm','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','dataset','1916400QTgFOR','sourceType'];a68_0x5b25=function(){return _0x14d200;};return a68_0x5b25();}export function filterDbTableBackedDatasets(_0x57f13b){const _0x15bf1c=a68_0x5b6e01;return _0x57f13b[_0x15bf1c(0x1c5)](_0x4941b2=>isDbTableBackedDataset(_0x4941b2));}export function buildDbTableBackedRequirementMessage(_0x66c2bf,_0x2a0de5='SQL\x20schema\x20validation'){const _0x33919a=a68_0x5b6e01,_0x6114dd=getDatasetSource(_0x66c2bf)||'UNKNOWN',_0x4adee3=getDatasetName(_0x66c2bf),_0x2127cf=getDatasetCode(_0x66c2bf),_0xb8537f=_0x2127cf?'\x20('+_0x2127cf+')':'';return[_0x33919a(0x1c6)+_0x4adee3+'\x22'+_0xb8537f+_0x33919a(0x1bd)+_0x6114dd+_0x33919a(0x1b3)+_0x2a0de5+'.','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.',_0x33919a(0x1c9)+RUNTIME_DATA_ACCESS_COMMANDS[_0x33919a(0x1c5)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'.']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x2af058,_0xcc4d75){const _0x2f1a92=a68_0x5b6e01;if(!isDbTableBackedDataset(_0x2af058))throw CliErrors[_0x2f1a92(0x1d2)](buildDbTableBackedRequirementMessage(_0x2af058,_0xcc4d75));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x35aef5=a69_0x2657;(function(_0x383963,_0x2cd8ee){const _0x4fbd55=a69_0x2657,_0x85332f=_0x383963();while(!![]){try{const _0x1e0284=-parseInt(_0x4fbd55(0x8e))/0x1+-parseInt(_0x4fbd55(0x8b))/0x2*(parseInt(_0x4fbd55(0x94))/0x3)+-parseInt(_0x4fbd55(0x91))/0x4+-parseInt(_0x4fbd55(0x89))/0x5*(parseInt(_0x4fbd55(0x93))/0x6)+-parseInt(_0x4fbd55(0x8a))/0x7*(parseInt(_0x4fbd55(0x95))/0x8)+parseInt(_0x4fbd55(0x90))/0x9+parseInt(_0x4fbd55(0x92))/0xa;if(_0x1e0284===_0x2cd8ee)break;else _0x85332f['push'](_0x85332f['shift']());}catch(_0x2fb674){_0x85332f['push'](_0x85332f['shift']());}}}(a69_0x568d,0xba00b));import{createCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a69_0x568d(){const _0x48e58c=['803088ixryiM','3784600LeuLDM','37647930htRHeq','102wGOdGM','6yljGcM','230664prkZeH','29195EFJdco','217IVZJuQ','614794gfmNyF','create','cross-relation-create','538128qLmnnQ','write'];a69_0x568d=function(){return _0x48e58c;};return a69_0x568d();}function a69_0x2657(_0x51ebe6,_0x19a005){_0x51ebe6=_0x51ebe6-0x89;const _0x568d53=a69_0x568d();let _0x26574c=_0x568d53[_0x51ebe6];return _0x26574c;}import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationCreate={'service':'dataset','command':a69_0x35aef5(0x8d),'description':'Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','risk':a69_0x35aef5(0x8f),'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 _0x1b2626=>validateCrossRelation(_0x1b2626,a69_0x35aef5(0x8c)),'dryRun':_0x3711b8=>previewCrossRelation(_0x3711b8,'create'),'execute':_0x2dd619=>executeCrossRelation(_0x2dd619,a69_0x35aef5(0x8c),createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a70_0x317e(_0x5ef45c,_0x5bef1f){_0x5ef45c=_0x5ef45c-0x94;const _0x347e67=a70_0x347e();let _0x317e9f=_0x347e67[_0x5ef45c];return _0x317e9f;}const a70_0x47fdf6=a70_0x317e;(function(_0xc49563,_0x495227){const _0x4abfd4=a70_0x317e,_0xcc3ffc=_0xc49563();while(!![]){try{const _0x1ce7e7=parseInt(_0x4abfd4(0x9d))/0x1*(parseInt(_0x4abfd4(0x9a))/0x2)+-parseInt(_0x4abfd4(0xa0))/0x3*(-parseInt(_0x4abfd4(0x99))/0x4)+parseInt(_0x4abfd4(0x98))/0x5+parseInt(_0x4abfd4(0x94))/0x6*(-parseInt(_0x4abfd4(0xa1))/0x7)+-parseInt(_0x4abfd4(0x9c))/0x8+-parseInt(_0x4abfd4(0x9e))/0x9+-parseInt(_0x4abfd4(0x9b))/0xa*(-parseInt(_0x4abfd4(0x95))/0xb);if(_0x1ce7e7===_0x495227)break;else _0xcc3ffc['push'](_0xcc3ffc['shift']());}catch(_0xfe49c){_0xcc3ffc['push'](_0xcc3ffc['shift']());}}}(a70_0x347e,0xebd9f));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_0x347e(){const _0x302cde=['3477970WZTxzi','2628TMsyFn','2378510REWiwc','20stoeki','11737496wTfMbk','1KRouFK','6088311KgMnTN','dataset','3621dvENeS','20797WdhQnq','1122XqJMGR','5430931PrOOdJ','delete','high-risk-write'];a70_0x347e=function(){return _0x302cde;};return a70_0x347e();}export const datasetCrossRelationDelete={'service':a70_0x47fdf6(0x9f),'command':'cross-relation-delete','description':'Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','risk':a70_0x47fdf6(0x97),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x5109e0=>validateCrossRelation(_0x5109e0,a70_0x47fdf6(0x96)),'dryRun':_0x5109b7=>previewCrossRelation(_0x5109b7,a70_0x47fdf6(0x96)),'execute':_0x439fdb=>executeCrossRelation(_0x439fdb,a70_0x47fdf6(0x96),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a71_0x1af9(_0x50c079,_0x3624e4){_0x50c079=_0x50c079-0x1d8;const _0x351d3d=a71_0x351d();let _0x1af9f8=_0x351d3d[_0x50c079];return _0x1af9f8;}const a71_0xa02975=a71_0x1af9;function a71_0x351d(){const _0x4b531a=['list','10840rOXtmy','\x20relation(s)','read','Cross-database\x20relations:\x20','938356eWTZDS','2958360CPBDJn','length','6myKfXF','1252235Fxlpgy','1334872ggYfUa','2033787AnwNYL','16inBtdf','531FmJEIx','appCode','2224206qKztSM'];a71_0x351d=function(){return _0x4b531a;};return a71_0x351d();}(function(_0x1374df,_0x2bf82b){const _0x246f49=a71_0x1af9,_0x44a72f=_0x1374df();while(!![]){try{const _0x102f95=parseInt(_0x246f49(0x1e5))/0x1+parseInt(_0x246f49(0x1e0))/0x2*(parseInt(_0x246f49(0x1e3))/0x3)+-parseInt(_0x246f49(0x1e1))/0x4+parseInt(_0x246f49(0x1e4))/0x5+-parseInt(_0x246f49(0x1da))/0x6+parseInt(_0x246f49(0x1e6))/0x7*(-parseInt(_0x246f49(0x1e7))/0x8)+-parseInt(_0x246f49(0x1d8))/0x9*(parseInt(_0x246f49(0x1dc))/0xa);if(_0x102f95===_0x2bf82b)break;else _0x44a72f['push'](_0x44a72f['shift']());}catch(_0x219ad0){_0x44a72f['push'](_0x44a72f['shift']());}}}(a71_0x351d,0xbb95a));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':'dataset','command':'cross-relation-list','description':'List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','risk':a71_0xa02975(0x1de),'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 _0x1cd2f0=>validateCrossRelation(_0x1cd2f0,a71_0xa02975(0x1db)),async 'execute'(_0x987019){const _0x36e7a9=a71_0xa02975,_0x1cb3a8=await resolveCrossRelationQuery(_0x987019),_0x2195ae=await queryCrossDbRelations(_0x1cb3a8);return{'ok':!![],'data':{'appCode':_0x987019[_0x36e7a9(0x1d9)],'selector':_0x1cb3a8,'total':_0x2195ae['length'],'relations':_0x2195ae['map'](projectCrossRelation)},'message':_0x36e7a9(0x1df)+_0x2195ae[_0x36e7a9(0x1e2)]+_0x36e7a9(0x1dd)};}};
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a72_0x166e3e=a72_0x321d;(function(_0x552d92,_0x4035a0){const _0x21e5db=a72_0x321d,_0x3021ea=_0x552d92();while(!![]){try{const _0x284ad7=parseInt(_0x21e5db(0x208))/0x1*(-parseInt(_0x21e5db(0x227))/0x2)+-parseInt(_0x21e5db(0x1f9))/0x3+parseInt(_0x21e5db(0x23c))/0x4*(-parseInt(_0x21e5db(0x22c))/0x5)+parseInt(_0x21e5db(0x21e))/0x6*(-parseInt(_0x21e5db(0x216))/0x7)+-parseInt(_0x21e5db(0x232))/0x8*(-parseInt(_0x21e5db(0x1f3))/0x9)+parseInt(_0x21e5db(0x22e))/0xa+-parseInt(_0x21e5db(0x23b))/0xb*(-parseInt(_0x21e5db(0x21d))/0xc);if(_0x284ad7===_0x4035a0)break;else _0x3021ea['push'](_0x3021ea['shift']());}catch(_0xe08fd0){_0x3021ea['push'](_0x3021ea['shift']());}}}(a72_0x1048,0x761d7));function a72_0x321d(_0x3819ad,_0x23ee05){_0x3819ad=_0x3819ad-0x1f3;const _0x104884=a72_0x1048();let _0x321d28=_0x104884[_0x3819ad];return _0x321d28;}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(_0x4d087e,_0x53f54d){const _0x198c93=_0x4d087e['str'](_0x53f54d)['trim']();if(!_0x198c93)throw CliErrors['flagMissing'](_0x53f54d);return _0x198c93;}function explicitDblink(_0x10ff90){const _0x43eb53=a72_0x321d,_0x456427=_0x10ff90[_0x43eb53(0x226)]('from-dblink-id');if(_0x456427===undefined||_0x456427===null)return undefined;const _0x3af663=Number(_0x456427);if(!Number[_0x43eb53(0x246)](_0x3af663)||_0x3af663<=0x0)throw CliErrors[_0x43eb53(0x1fb)](_0x43eb53(0x240));return _0x3af663;}export function validateCrossRelation(_0x18b5a6,_0x25582d){const _0x502643=a72_0x321d,_0x4cd6fd=explicitDblink(_0x18b5a6);if(_0x25582d===_0x502643(0x218)){if(!_0x18b5a6[_0x502643(0x236)](_0x502643(0x228))[_0x502643(0x212)]()&&_0x4cd6fd===undefined)throw CliErrors[_0x502643(0x1fb)](_0x502643(0x200));return;}required(_0x18b5a6,_0x502643(0x228)),required(_0x18b5a6,'from-column');if(_0x25582d!=='delete'){required(_0x18b5a6,_0x502643(0x204)),required(_0x18b5a6,_0x502643(0x20b));const _0x4e5ae0=_0x18b5a6['str']('cardinality')[_0x502643(0x212)]();if(_0x4e5ae0&&!CROSS_RELATION_CARDINALITY_FLAG[_0x502643(0x243)]['includes'](_0x4e5ae0))throw CliErrors[_0x502643(0x1fb)]('Invalid\x20--cardinality.');}}async function resolveEndpoint(_0xd35af4){const _0x63ffc0=a72_0x321d,_0x2b3ab0=await getDatasetDetail(_0xd35af4),_0x5096cc=_0x2b3ab0?.[_0x63ffc0(0x219)]??{};if((_0x2b3ab0?.[_0x63ffc0(0x221)]??_0x5096cc[_0x63ffc0(0x248)])!=='DB_TABLE')throw CliErrors[_0x63ffc0(0x1fb)](_0x63ffc0(0x23f)+_0xd35af4+_0x63ffc0(0x20f));const _0x185101=_0x2b3ab0['dbtableConfig']??_0x2b3ab0[_0x63ffc0(0x24a)]??{};let _0x4f9374=_0x2b3ab0[_0x63ffc0(0x1fd)]??_0x5096cc['extend']??{};if(typeof _0x4f9374===_0x63ffc0(0x21f))try{_0x4f9374=_0x4f9374[_0x63ffc0(0x212)]()?JSON[_0x63ffc0(0x20d)](_0x4f9374):{};}catch{throw CliErrors[_0x63ffc0(0x1fb)](_0x63ffc0(0x23f)+_0xd35af4+_0x63ffc0(0x1f8));}const _0x3bbfc8=Number(_0x4f9374?.[_0x63ffc0(0x209)]?.[_0x63ffc0(0x1ff)]??_0x2b3ab0['storageProfile']?.[_0x63ffc0(0x1ff)]??_0x5096cc[_0x63ffc0(0x209)]?.['dbId']??_0x185101[_0x63ffc0(0x1ff)]??_0x5096cc[_0x63ffc0(0x1ff)]??_0x2b3ab0[_0x63ffc0(0x1ff)]),_0x23799a=String(_0x2b3ab0[_0x63ffc0(0x24b)]??_0x5096cc['tableName']??_0x185101['tableName']??'')['trim']();if(!Number[_0x63ffc0(0x246)](_0x3bbfc8)||_0x3bbfc8<=0x0||!_0x23799a)throw CliErrors[_0x63ffc0(0x1fb)]('Dataset\x20'+_0xd35af4+_0x63ffc0(0x233));return{'datasetCode':_0xd35af4,'dblinkId':_0x3bbfc8,'table':_0x23799a};}export async function resolveCrossRelationQuery(_0x54d174){const _0x35d0b9=a72_0x321d,_0x578ddd=_0x54d174['str'](_0x35d0b9(0x228))['trim'](),_0x54a2cb=explicitDblink(_0x54d174),_0x229f39=_0x578ddd?await resolveEndpoint(_0x578ddd):undefined;if(_0x229f39&&_0x54a2cb!==undefined&&_0x229f39[_0x35d0b9(0x247)]!==_0x54a2cb)throw CliErrors[_0x35d0b9(0x1fb)](_0x35d0b9(0x203));const _0x43c895=_0x229f39?.[_0x35d0b9(0x247)]??_0x54a2cb;if(_0x43c895===undefined)throw CliErrors['validation'](_0x35d0b9(0x200));return{'appCode':_0x54d174[_0x35d0b9(0x222)],'fromDblinkId':_0x43c895,..._0x578ddd?{'fromDatasetCode':_0x578ddd}:{},..._0x54d174[_0x35d0b9(0x236)](_0x35d0b9(0x21c))[_0x35d0b9(0x212)]()?{'fromField':_0x54d174['str'](_0x35d0b9(0x21c))[_0x35d0b9(0x212)]()}:{}};}export function projectCrossRelation(_0x208c96){const _0x5c6b18=a72_0x321d;return{'relationId':_0x208c96['relationId'],'from':{'source':_0x5c6b18(0x249),'datasetCode':_0x208c96[_0x5c6b18(0x23d)],'datasetName':_0x208c96[_0x5c6b18(0x1fa)],'dblinkId':_0x208c96[_0x5c6b18(0x202)],'table':_0x208c96[_0x5c6b18(0x1fe)],'field':_0x208c96['fromField']},'to':{'source':'DB_TABLE','datasetCode':_0x208c96['toDatasetCode'],'datasetName':_0x208c96[_0x5c6b18(0x210)],'dblinkId':_0x208c96[_0x5c6b18(0x23e)],'table':_0x208c96[_0x5c6b18(0x217)],'field':_0x208c96['toField'],'labelField':_0x208c96['refTableLabelName']},'relation':{'cardinality':_0x208c96['cardinality'],'relationType':_0x208c96[_0x5c6b18(0x211)]}};}function ambiguity(_0x4b6857){const _0x7b13b=a72_0x321d,_0x436eb6=CliErrors['validation']('Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.',_0x7b13b(0x207));return Object[_0x7b13b(0x223)](_0x436eb6,_0x7b13b(0x1f7),{'value':{'candidates':_0x4b6857['map'](projectCrossRelation)}}),_0x436eb6;}const sameName=(_0x21ff57,_0x353fa9)=>_0x21ff57[a72_0x166e3e(0x230)]()===_0x353fa9['toLowerCase']();function matchesEndpoint(_0x59420d,_0x4638fe,_0x8c0ba,_0x530e8a,_0x87956b){const _0x20d178=a72_0x166e3e;return _0x59420d[_0x20d178(0x202)]===_0x4638fe[_0x20d178(0x247)]&&sameName(_0x59420d[_0x20d178(0x1fe)],_0x4638fe[_0x20d178(0x231)])&&sameName(_0x59420d['fromField'],_0x8c0ba)&&_0x59420d[_0x20d178(0x23e)]===_0x530e8a['dblinkId']&&sameName(_0x59420d['toTableName'],_0x530e8a['table'])&&sameName(_0x59420d[_0x20d178(0x20a)],_0x87956b);}export async function prepareCrossRelation(_0x25e003,_0x55d5b9){const _0x571596=a72_0x166e3e,_0x97657a=await resolveEndpoint(required(_0x25e003,'from-datasetcode')),_0x3b0409=explicitDblink(_0x25e003);if(_0x3b0409!==undefined&&_0x97657a[_0x571596(0x247)]!==_0x3b0409)throw CliErrors[_0x571596(0x1fb)](_0x571596(0x203));const _0x4e7920={'appCode':_0x25e003[_0x571596(0x222)],'fromDatasetCode':_0x97657a['datasetCode'],'fromField':required(_0x25e003,_0x571596(0x21c)),..._0x3b0409!==undefined?{'fromDblinkId':_0x3b0409}:{}},_0x420f65={'appCode':_0x25e003[_0x571596(0x222)],'fromDblinkId':_0x97657a[_0x571596(0x247)],'fromDatasetCode':_0x97657a[_0x571596(0x22b)],'fromField':_0x4e7920[_0x571596(0x234)]},_0x4a11f3=await queryCrossDbRelations(_0x420f65);let _0x4af9ac=null;if(_0x55d5b9!==_0x571596(0x1f4)){if(_0x4a11f3[_0x571596(0x242)]>0x1)throw ambiguity(_0x4a11f3);_0x4af9ac=_0x4a11f3[0x0]??null;if(!_0x4af9ac)throw CliErrors[_0x571596(0x1fb)](_0x571596(0x20e));}if(_0x55d5b9===_0x571596(0x241))return{'operation':_0x55d5b9,'from':_0x97657a,'query':_0x420f65,'body':_0x4e7920,'before':_0x4af9ac};const _0x50e266=await resolveEndpoint(required(_0x25e003,_0x571596(0x204)));if(_0x97657a[_0x571596(0x247)]===_0x50e266[_0x571596(0x247)])throw CliErrors['validation'](_0x571596(0x205));const _0x4541d3=_0x25e003['str'](_0x571596(0x224))[_0x571596(0x212)](),_0x1d9571=_0x25e003['str'](_0x571596(0x213))[_0x571596(0x212)](),_0x375e29={..._0x4e7920,'toDatasetCode':_0x50e266[_0x571596(0x22b)],'toField':required(_0x25e003,_0x571596(0x20b)),..._0x4541d3?{'refTableLabelName':_0x4541d3}:{},..._0x1d9571?{'cardinality':_0x1d9571}:{}};if(_0x4a11f3[_0x571596(0x1f6)](_0x37418d=>_0x37418d[_0x571596(0x229)]!==_0x4af9ac?.[_0x571596(0x229)]&&matchesEndpoint(_0x37418d,_0x97657a,_0x375e29[_0x571596(0x234)],_0x50e266,_0x375e29[_0x571596(0x20a)])))throw CliErrors[_0x571596(0x1fb)]('Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.');return{'operation':_0x55d5b9,'from':_0x97657a,'to':_0x50e266,'query':_0x420f65,'body':_0x375e29,'before':_0x4af9ac,'expectedLabel':_0x4541d3||_0x4af9ac?.[_0x571596(0x22f)]||_0x375e29[_0x571596(0x20a)],'expectedCardinality':_0x1d9571||_0x4af9ac?.[_0x571596(0x213)]||null};}function mutationData(_0x536515,_0x874b01,_0x102c46){const _0x21aea4=a72_0x166e3e,{operation:_0x23d3e8,body:_0x4658b5,before:_0x372a9a}=_0x536515;return{'operation':_0x23d3e8,'selector':{'appCode':_0x4658b5['appCode'],'from':{'datasetCode':_0x4658b5[_0x21aea4(0x23d)],'field':_0x4658b5['fromField'],'dblinkId':_0x536515[_0x21aea4(0x21a)][_0x21aea4(0x247)]}},'before':_0x372a9a?projectCrossRelation(_0x372a9a):null,'after':_0x102c46,'dryRun':_0x874b01,'backend':{'method':_0x21aea4(0x238),'path':CROSS_DB_RELATION_PATHS[_0x23d3e8]},'warnings':_0x23d3e8==='update'&&!_0x4658b5['refTableLabelName']?[{'code':_0x21aea4(0x21b),'message':_0x21aea4(0x23a)}]:[]};}export async function previewCrossRelation(_0x55815a,_0x197116){const _0x10c018=a72_0x166e3e,_0x3f36ef=await prepareCrossRelation(_0x55815a,_0x197116),_0x42935c=_0x3f36ef[_0x10c018(0x237)],_0x1b6a55=_0x197116===_0x10c018(0x241)?null:{..._0x3f36ef['before']?{'relationId':_0x3f36ef[_0x10c018(0x220)][_0x10c018(0x229)]}:{},'from':{'datasetCode':_0x3f36ef[_0x10c018(0x21a)][_0x10c018(0x22b)],'dblinkId':_0x3f36ef[_0x10c018(0x21a)][_0x10c018(0x247)],'table':_0x3f36ef[_0x10c018(0x21a)][_0x10c018(0x231)],'field':_0x42935c['fromField']},'to':{'datasetCode':_0x3f36ef['to'][_0x10c018(0x22b)],'dblinkId':_0x3f36ef['to'][_0x10c018(0x247)],'table':_0x3f36ef['to'][_0x10c018(0x231)],'field':_0x42935c[_0x10c018(0x20a)],'labelField':_0x3f36ef[_0x10c018(0x244)]},'relation':{'cardinality':_0x3f36ef[_0x10c018(0x206)],'relationType':0x2}};return{...mutationData(_0x3f36ef,!![],null),'after':_0x1b6a55,'method':_0x10c018(0x238),'url':CROSS_DB_RELATION_PATHS[_0x197116],'body':_0x3f36ef[_0x10c018(0x237)],'description':_0x10c018(0x235)+_0x197116+'\x20a\x20cross-database\x20relation\x20for\x20'+_0x42935c['fromDatasetCode']+'.'+_0x42935c['fromField']};}export async function executeCrossRelation(_0x20cef4,_0x2067c6,_0xd7a744){const _0x2e9149=a72_0x166e3e,_0x2e1b27=await prepareCrossRelation(_0x20cef4,_0x2067c6);try{await _0xd7a744(_0x2e1b27['body']);}catch(_0xc38982){if(_0xc38982 instanceof CliError&&_0xc38982[_0x2e9149(0x245)][_0x2e9149(0x214)](_0x2e9149(0x22d))){const _0x3b00b1=await queryCrossDbRelations(_0x2e1b27[_0x2e9149(0x239)])[_0x2e9149(0x1fc)](()=>[]);throw ambiguity(_0x3b00b1);}throw _0xc38982;}let _0x5336fd=[],_0x542afe,_0x120686=![];try{_0x5336fd=await queryCrossDbRelations(_0x2e1b27[_0x2e9149(0x239)]);if(_0x2067c6===_0x2e9149(0x241))_0x120686=!_0x5336fd[_0x2e9149(0x1f6)](_0x1ebde7=>_0x1ebde7[_0x2e9149(0x229)]===_0x2e1b27[_0x2e9149(0x220)][_0x2e9149(0x229)]);else{const _0x2d1a1a=_0x2e1b27[_0x2e9149(0x237)],_0x3c34ba=_0x5336fd[_0x2e9149(0x225)](_0x438d7b=>matchesEndpoint(_0x438d7b,_0x2e1b27[_0x2e9149(0x21a)],_0x2d1a1a['fromField'],_0x2e1b27['to'],_0x2d1a1a['toField'])&&(_0x2067c6===_0x2e9149(0x1f4)||_0x438d7b[_0x2e9149(0x229)]===_0x2e1b27[_0x2e9149(0x220)][_0x2e9149(0x229)]));_0x542afe=_0x3c34ba['length']===0x1?_0x3c34ba[0x0]:undefined,_0x120686=!!_0x542afe&&_0x542afe[_0x2e9149(0x22f)]===_0x2e1b27[_0x2e9149(0x244)]&&_0x542afe['cardinality']===_0x2e1b27['expectedCardinality']&&_0x542afe['relationType']===0x2;}}catch{}const _0x4afefc={...mutationData(_0x2e1b27,![],_0x542afe?projectCrossRelation(_0x542afe):null),'verification':{'status':_0x120686?'matched':_0x2e9149(0x22a),'verified':_0x120686}};if(!_0x120686){const _0x319675=CliErrors[_0x2e9149(0x201)](_0x2e9149(0x215)+_0x2067c6+_0x2e9149(0x20c),_0x2e9149(0x1f5));Object[_0x2e9149(0x223)](_0x319675,_0x2e9149(0x1f7),{'value':{..._0x4afefc,'candidates':_0x5336fd['map'](projectCrossRelation)}});throw _0x319675;}return{'ok':!![],'data':_0x4afefc,'message':_0x2e9149(0x215)+_0x2067c6+'\x20verified.'};}function a72_0x1048(){const _0x1ed7f8=['fromDatasetName','validation','catch','extend','fromTableName','dbId','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','apiError','fromDblinkId','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','to-datasetcode','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','expectedCardinality','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','2RKwcFt','storageProfile','toField','to-column','\x20write\x20was\x20not\x20verified.','parse','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','toDatasetName','relationType','trim','cardinality','includes','Cross-database\x20relation\x20','665574xqDnkI','toTableName','list','dataset','from','label_inherited','from-column','14746764pYvAwS','6orSBYf','string','before','source','appCode','defineProperty','to-label-column','filter','flag','608206DEkbeg','from-datasetcode','relationId','unconfirmed','datasetCode','10AJPeba','multiple\x20cross-database\x20relations\x20matched','3944620kjhhxG','refTableLabelName','toLowerCase','table','160RCebWZ','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','fromField','Would\x20','str','body','POST','query','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','11neNSfd','872856estvUO','fromDatasetCode','toDblinkId','Dataset\x20','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','delete','length','enum','expectedLabel','message','isSafeInteger','dblinkId','sourceType','DB_TABLE','dbtable','tableName','262116MtxGTc','create','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','some','data','\x20has\x20invalid\x20storage\x20configuration.','1746972UWTsnF'];a72_0x1048=function(){return _0x1ed7f8;};return a72_0x1048();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a73_0x598f(_0x3ae44a,_0x2655cd){_0x3ae44a=_0x3ae44a-0x83;const _0x282ebf=a73_0x282e();let _0x598fc9=_0x282ebf[_0x3ae44a];return _0x598fc9;}const a73_0x1c8037=a73_0x598f;function a73_0x282e(){const _0x28a227=['205452dTOExC','dataset','4bKzMKi','143nEIdJt','write','6kXzEYj','5ptyzam','11HzFXTD','11646170dFAcXz','update','3549756iTDGEo','cross-relation-update','3226578rCCzzi','2732772vxhmBf','9196502yunUKB','311537dyKQCY','424juuHqW','Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field'];a73_0x282e=function(){return _0x28a227;};return a73_0x282e();}(function(_0x3215ec,_0x2e3f9f){const _0x26aa97=a73_0x598f,_0x482ed8=_0x3215ec();while(!![]){try{const _0x279fe2=-parseInt(_0x26aa97(0x8f))/0x1*(parseInt(_0x26aa97(0x94))/0x2)+parseInt(_0x26aa97(0x8c))/0x3+parseInt(_0x26aa97(0x8a))/0x4*(-parseInt(_0x26aa97(0x86))/0x5)+parseInt(_0x26aa97(0x85))/0x6*(-parseInt(_0x26aa97(0x8e))/0x7)+-parseInt(_0x26aa97(0x90))/0x8*(-parseInt(_0x26aa97(0x92))/0x9)+parseInt(_0x26aa97(0x88))/0xa*(-parseInt(_0x26aa97(0x87))/0xb)+parseInt(_0x26aa97(0x8d))/0xc*(parseInt(_0x26aa97(0x83))/0xd);if(_0x279fe2===_0x2e3f9f)break;else _0x482ed8['push'](_0x482ed8['shift']());}catch(_0x4ca500){_0x482ed8['push'](_0x482ed8['shift']());}}}(a73_0x282e,0xc3aff));import{updateCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationUpdate={'service':a73_0x1c8037(0x93),'command':a73_0x1c8037(0x8b),'description':a73_0x1c8037(0x91),'risk':a73_0x1c8037(0x84),'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 _0x17da0f=>validateCrossRelation(_0x17da0f,a73_0x1c8037(0x89)),'dryRun':_0x5795b4=>previewCrossRelation(_0x5795b4,a73_0x1c8037(0x89)),'execute':_0x5635d6=>executeCrossRelation(_0x5635d6,a73_0x1c8037(0x89),updateCrossDbRelation)};
|