@lovrabet/rabetbase-cli 2.5.10-beta.4 → 2.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +4 -4
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x50c6bd=a59_0x5d41;(function(_0xdcdfdd,_0xb24828){const _0x4f7fc0=a59_0x5d41,_0x553219=_0xdcdfdd();while(!![]){try{const _0x16b5c3=parseInt(_0x4f7fc0(0x79))/0x1*(parseInt(_0x4f7fc0(0x76))/0x2)+-parseInt(_0x4f7fc0(0x70))/0x3*(parseInt(_0x4f7fc0(0x6d))/0x4)+parseInt(_0x4f7fc0(0x7b))/0x5+-parseInt(_0x4f7fc0(0x73))/0x6+parseInt(_0x4f7fc0(0x68))/0x7+parseInt(_0x4f7fc0(0x6e))/0x8*(-parseInt(_0x4f7fc0(0x74))/0x9)+parseInt(_0x4f7fc0(0x75))/0xa*(parseInt(_0x4f7fc0(0x71))/0xb);if(_0x16b5c3===_0xb24828)break;else _0x553219['push'](_0x553219['shift']());}catch(_0x272deb){_0x553219['push'](_0x553219['shift']());}}}(a59_0x5543,0xeef5c));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a59_0x5543(){const _0xdfaac0=['80806WlbSWG','get','7373754MVaiOE','16559109zQaEVW','1930tkmZRb','15658URFrFy','Usage:\x20','str','187mrbfXg','validation','3699395pzxjRG','object','5113787nUFgko','Get\x20a\x20config\x20value\x20by\x20key','Key\x20not\x20found:\x20','Missing\x20key.','key','406108KHhoci','8uKPVJA','string','9vJrnjo'];a59_0x5543=function(){return _0xdfaac0;};return a59_0x5543();}function a59_0x5d41(_0x3bc453,_0x5efded){_0x3bc453=_0x3bc453-0x68;const _0x554348=a59_0x5543();let _0x5d41c6=_0x554348[_0x3bc453];return _0x5d41c6;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x1b953f){const _0x30639c=a59_0x5d41,_0xbf7ef3=_0x1b953f[_0x30639c(0x78)](_0x30639c(0x6c));if(!_0xbf7ef3)throw CliErrors[_0x30639c(0x7a)](_0x30639c(0x6b),_0x30639c(0x77)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x55f9f8=readConfig(),_0x1bdbc2=_0xbf7ef3==='app'?'appcode':_0xbf7ef3,_0x4caffc=_0x55f9f8[_0x1bdbc2];if(_0x4caffc===undefined)throw CliErrors[_0x30639c(0x7a)](_0x30639c(0x6a)+_0xbf7ef3);return{'ok':!![],'data':typeof _0x4caffc==='object'?_0x4caffc:{[_0x1bdbc2]:_0x4caffc},'message':typeof _0x4caffc===_0x30639c(0x7c)?undefined:String(_0x4caffc)};}export const configGetDefinition={'service':'config','command':a59_0x50c6bd(0x72),'description':a59_0x50c6bd(0x69),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a59_0x50c6bd(0x6f),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3730e5,_0x48aaf0){const _0x4d4c61=a60_0x11f5,_0x16c8b3=_0x3730e5();while(!![]){try{const _0xb0904c=-parseInt(_0x4d4c61(0x10a))/0x1+parseInt(_0x4d4c61(0x109))/0x2+-parseInt(_0x4d4c61(0x106))/0x3+parseInt(_0x4d4c61(0x107))/0x4*(parseInt(_0x4d4c61(0x105))/0x5)+-parseInt(_0x4d4c61(0x10b))/0x6+-parseInt(_0x4d4c61(0x108))/0x7+parseInt(_0x4d4c61(0x10c))/0x8;if(_0xb0904c===_0x48aaf0)break;else _0x16c8b3['push'](_0x16c8b3['shift']());}catch(_0x58dae7){_0x16c8b3['push'](_0x16c8b3['shift']());}}}(a60_0x4045,0x9509d));function a60_0x4045(){const _0x37a3a6=['3327758ynOMGk','392364yabBwu','1043554pZVwTa','2523468NMTUXs','21108328WVWIYB','831395eVfZVD','2350719ekRGey','12bUkAEN'];a60_0x4045=function(){return _0x37a3a6;};return a60_0x4045();}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';function a60_0x11f5(_0x25687c,_0x131a62){_0x25687c=_0x25687c-0x105;const _0x4045e4=a60_0x4045();let _0x11f567=_0x4045e4[_0x25687c];return _0x11f567;}export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a61_0x4de4(){const _0x6e9bea=['runtime-domain','Select\x20Lovrabet\x20region','project','3062248HEJHVN','api-domain','write','4408512EqyXRk','bool','localDomain','106854pDDxKu','region','domain-config','enterprise-v1','\x22\x20is\x20not\x20currently\x20available.','user-domain','Custom\x20KB\x20Service\x20HTTPS\x20origin','certificateDomain','267555kBsaPX','kb-domain','assign','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','name','validation','cancelled','certificate-domain','official','Custom\x20knowledge-base\x20HTTPS\x20origin','string','join','Official\x20Lovrabet\x20region:\x20','Custom\x20local\x20callback\x20HTTPS\x20origin','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','Custom\x20SkillHub\x20HTTPS\x20origin','1216974vKTFKq','independent','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','config','domains','length','1544812Jtnejb','manifestDomains','keys','2971915Lytfuz','cdn','ExitPromptError','Custom\x20Runtime\x20HTTPS\x20origin','Custom\x20platform\x20API\x20HTTPS\x20origin','str','mode','skill-domain','Custom\x20certificate\x20service\x20HTTPS\x20origin','global'];a61_0x4de4=function(){return _0x6e9bea;};return a61_0x4de4();}const a61_0x42ed8a=a61_0x5e7c;(function(_0x3521e5,_0x6b0f8){const _0x3dff73=a61_0x5e7c,_0x4942d1=_0x3521e5();while(!![]){try{const _0x139b74=parseInt(_0x3dff73(0x1b6))/0x1+-parseInt(_0x3dff73(0x1c8))/0x2+parseInt(_0x3dff73(0x1ae))/0x3+parseInt(_0x3dff73(0x1ce))/0x4+parseInt(_0x3dff73(0x19b))/0x5+-parseInt(_0x3dff73(0x1ab))/0x6+parseInt(_0x3dff73(0x1a8))/0x7;if(_0x139b74===_0x6b0f8)break;else _0x4942d1['push'](_0x4942d1['shift']());}catch(_0x2d1687){_0x4942d1['push'](_0x4942d1['shift']());}}}(a61_0x4de4,0x5c480));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';function a61_0x5e7c(_0x4fc833,_0x2df627){_0x4fc833=_0x4fc833-0x19b;const _0x4de41d=a61_0x4de4();let _0x5e7cf0=_0x4de41d[_0x4fc833];return _0x5e7cf0;}import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a61_0x42ed8a(0x1af),'type':a61_0x42ed8a(0x1c0),'description':a61_0x42ed8a(0x1c2)+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a61_0x42ed8a(0x1b0),'type':a61_0x42ed8a(0x1c0),'description':'Independent-deployment\x20Domain\x20JSON\x20file'},{'name':a61_0x42ed8a(0x1b3),'type':a61_0x42ed8a(0x1c0),'description':'Custom\x20User\x20HTTPS\x20origin'},{'name':a61_0x42ed8a(0x1a9),'type':a61_0x42ed8a(0x1c0),'description':a61_0x42ed8a(0x19f)},{'name':a61_0x42ed8a(0x1a5),'type':a61_0x42ed8a(0x1c0),'description':a61_0x42ed8a(0x19e)},{'name':a61_0x42ed8a(0x1a2),'type':a61_0x42ed8a(0x1c0),'description':a61_0x42ed8a(0x1c7)},{'name':a61_0x42ed8a(0x1b7),'type':'string','description':a61_0x42ed8a(0x1bf)},{'name':'kb-service-domain','type':a61_0x42ed8a(0x1c0),'description':a61_0x42ed8a(0x1b4)},{'name':'app-domain','type':a61_0x42ed8a(0x1c0),'description':a61_0x42ed8a(0x1c6)},{'name':'local-domain','type':a61_0x42ed8a(0x1c0),'description':a61_0x42ed8a(0x1c3)},{'name':a61_0x42ed8a(0x1bd),'type':a61_0x42ed8a(0x1c0),'description':a61_0x42ed8a(0x1a3)}];async function resolveRegion(_0x40a126){const _0x93af63=a61_0x42ed8a,_0x5e7f11=_0x40a126[_0x93af63(0x1a0)](_0x93af63(0x1af));if(_0x5e7f11){if(!isEnabledLovrabetRegion(_0x5e7f11))throw CliErrors[_0x93af63(0x1bb)]('Region\x20\x22'+_0x5e7f11+_0x93af63(0x1b2),'Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES[_0x93af63(0x1c1)](',\x20'));return _0x5e7f11;}if(_0x40a126['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x93af63(0x1a6),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x3f331c=>({'name':getOfficialRoutingProfile(_0x3f331c)['label']+'\x20('+_0x3f331c+')','value':_0x3f331c}))});}catch(_0x33b31a){if(_0x33b31a?.[_0x93af63(0x1ba)]===_0x93af63(0x19d))throw CliErrors[_0x93af63(0x1bc)]();throw _0x33b31a;}}export async function executeConfigInit(_0x4048d8){const _0x380bbc=a61_0x42ed8a,_0x101b11=resolveDomainConfigInput(_0x4048d8),_0x59740e=_0x101b11[_0x380bbc(0x1cc)],_0x45b2bf=Object['keys'](_0x59740e)[_0x380bbc(0x1cd)]>0x0;if(_0x45b2bf&&_0x4048d8[_0x380bbc(0x1a0)](_0x380bbc(0x1af)))throw CliErrors['validation']('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');if(!!_0x59740e[_0x380bbc(0x1ad)]!==!!_0x59740e[_0x380bbc(0x1b5)])throw CliErrors[_0x380bbc(0x1bb)](_0x380bbc(0x1c4));const _0x129345=_0x4048d8[_0x380bbc(0x1ac)](_0x380bbc(0x1a4))?'global':_0x380bbc(0x1a7),_0x26ca31=readScopedConfig(_0x129345);for(const _0x7816ac of DOMAIN_CONFIG_FIELDS)delete _0x26ca31[_0x7816ac];for(const _0x58dc42 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x26ca31[_0x58dc42];delete _0x26ca31['routing'];let _0x53e5b7=null;if(_0x45b2bf)delete _0x26ca31[_0x380bbc(0x1af)],_0x101b11[_0x380bbc(0x1a1)]===_0x380bbc(0x1b1)?_0x26ca31['routing']={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x101b11[_0x380bbc(0x1cf)],'cdn':_0x101b11[_0x380bbc(0x19c)]}:Object[_0x380bbc(0x1b8)](_0x26ca31,_0x59740e);else{_0x53e5b7=await resolveRegion(_0x4048d8);if(_0x53e5b7===DEFAULT_LOVRABET_REGION)delete _0x26ca31['region'];else _0x26ca31[_0x380bbc(0x1af)]=_0x53e5b7;}return writeScopedConfig(_0x26ca31,_0x129345),{'ok':!![],'message':_0x45b2bf?'Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20'+Object[_0x380bbc(0x1d0)](_0x101b11[_0x380bbc(0x1a1)]==='enterprise-v1'?_0x101b11['manifestDomains']:_0x59740e)[_0x380bbc(0x1c1)](',\x20')+'.':_0x380bbc(0x1b9)+_0x53e5b7+'.','data':{'mode':_0x45b2bf?_0x380bbc(0x1c9):_0x380bbc(0x1be),'protocol':_0x101b11[_0x380bbc(0x1a1)]===_0x380bbc(0x1b1)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x53e5b7,'domains':_0x59740e,'cdn':_0x101b11[_0x380bbc(0x1a1)]===_0x380bbc(0x1b1)?_0x101b11[_0x380bbc(0x19c)]:undefined}};}export const configInitDefinition={'service':a61_0x42ed8a(0x1cb),'command':'init','description':a61_0x42ed8a(0x1ca),'risk':a61_0x42ed8a(0x1aa),'confirmationDescription':a61_0x42ed8a(0x1c5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x4ebfff=a62_0x19b8;(function(_0xdf1148,_0x534e1b){const _0x99aa5d=a62_0x19b8,_0x1e9a33=_0xdf1148();while(!![]){try{const _0x3e5db8=-parseInt(_0x99aa5d(0x14c))/0x1+parseInt(_0x99aa5d(0x154))/0x2*(parseInt(_0x99aa5d(0x157))/0x3)+parseInt(_0x99aa5d(0x151))/0x4+parseInt(_0x99aa5d(0x14f))/0x5+-parseInt(_0x99aa5d(0x14b))/0x6+-parseInt(_0x99aa5d(0x155))/0x7*(-parseInt(_0x99aa5d(0x153))/0x8)+-parseInt(_0x99aa5d(0x14e))/0x9*(parseInt(_0x99aa5d(0x150))/0xa);if(_0x3e5db8===_0x534e1b)break;else _0x1e9a33['push'](_0x1e9a33['shift']());}catch(_0x39d310){_0x1e9a33['push'](_0x1e9a33['shift']());}}}(a62_0x2967,0xd86d7));function a62_0x19b8(_0xe2db48,_0x26ae9a){_0xe2db48=_0xe2db48-0x14b;const _0x296732=a62_0x2967();let _0x19b8ae=_0x296732[_0xe2db48];return _0x19b8ae;}function a62_0x2967(){const _0x5cc8e2=['read','3663416QsGUKH','334776IrLOJC','7ZfUvqH','global','12FHeMtq','boolean','config','List\x20all\x20config\x20values','8165904XlyTuz','786538evtOqv','list','9rzyVsg','8732455SWwxDj','164130KvDAVb','705808CvCjce'];a62_0x2967=function(){return _0x5cc8e2;};return a62_0x2967();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x2d39b7){const _0x60a8e8=a62_0x19b8,_0x35f42c=_0x2d39b7['bool'](_0x60a8e8(0x156))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x35f42c};}export const configListDefinition={'service':a62_0x4ebfff(0x159),'command':a62_0x4ebfff(0x14d),'description':a62_0x4ebfff(0x15a),'risk':a62_0x4ebfff(0x152),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x4ebfff(0x156),'type':a62_0x4ebfff(0x158),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a63_0x87f442=a63_0x21cc;(function(_0x455679,_0x2bbefd){const _0x2d8fc0=a63_0x21cc,_0x5820f9=_0x455679();while(!![]){try{const _0x1f2a80=parseInt(_0x2d8fc0(0x8e))/0x1+parseInt(_0x2d8fc0(0xae))/0x2+parseInt(_0x2d8fc0(0xb0))/0x3+-parseInt(_0x2d8fc0(0xbd))/0x4*(parseInt(_0x2d8fc0(0x93))/0x5)+-parseInt(_0x2d8fc0(0xba))/0x6*(-parseInt(_0x2d8fc0(0x9a))/0x7)+-parseInt(_0x2d8fc0(0xb4))/0x8+-parseInt(_0x2d8fc0(0x97))/0x9;if(_0x1f2a80===_0x2bbefd)break;else _0x5820f9['push'](_0x5820f9['shift']());}catch(_0x3e57f0){_0x5820f9['push'](_0x5820f9['shift']());}}}(a63_0x499b,0x453b2));function a63_0x499b(){const _0x5b8302=['710558TDWYjK','`,\x20`','905487fmHPKQ','riskLevel','Top-level\x20key\x20\x22','Use\x20`','867232UbXboi','includes','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','set','appcode','21036GNtiuL','key','apps','8XKDFCe','value','486050bUSsrh','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','\x20workspace\x20add\x20<name>\x20--appcode\x20','\x20set\x20to:\x20','validation','815980TXqiri','write','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','app','5179950zkYsET','locale','Global','301AicLbO','\x22.\x20Allowed:\x20','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Config\x20value','boolean','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','\x22\x20is\x20not\x20settable.','string','str','keys','Invalid\x20value\x20for\x20\x22','Missing\x20value.','Project','global','length','\x20appcode\x20set\x20to:\x20','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Usage:\x20','bool','env'];a63_0x499b=function(){return _0x5b8302;};return a63_0x499b();}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';function a63_0x21cc(_0x4ba66f,_0x1c3bb5){_0x4ba66f=_0x4ba66f-0x8d;const _0x499bc2=a63_0x499b();let _0x21cc4c=_0x499bc2[_0x4ba66f];return _0x21cc4c;}async function execute(_0x1d18ef){const _0x4c3a69=a63_0x21cc,_0x2062b7=_0x1d18ef['str'](_0x4c3a69(0xbb)),_0x35cc54=_0x1d18ef[_0x4c3a69(0xa2)](_0x4c3a69(0x8d));if(!_0x2062b7)throw CliErrors[_0x4c3a69(0x92)]('Missing\x20key.','Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x35cc54===undefined||_0x35cc54==='')throw CliErrors[_0x4c3a69(0x92)](_0x4c3a69(0xa5),_0x4c3a69(0xab)+CLI_BIN_NAME+_0x4c3a69(0xb7));let _0x7e31a7=_0x2062b7,_0x35e07a=_0x35cc54;if(_0x35cc54[_0x4c3a69(0xa8)]>0x1f4)throw CliErrors[_0x4c3a69(0x92)](_0x4c3a69(0x9f));if(_0x2062b7===_0x4c3a69(0xb1))throw CliErrors[_0x4c3a69(0x92)](_0x4c3a69(0xb6));if(!isTopLevelConfigKey(_0x2062b7))throw CliErrors[_0x4c3a69(0x92)](_0x4c3a69(0xb2)+_0x2062b7+_0x4c3a69(0xa0),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x2062b7]&&!CONFIG_ENUM_VALUES[_0x2062b7][_0x4c3a69(0xb5)](_0x35cc54))throw CliErrors[_0x4c3a69(0x92)](_0x4c3a69(0xa4)+_0x2062b7+_0x4c3a69(0x9b)+CONFIG_ENUM_VALUES[_0x2062b7]['join'](',\x20'));if(_0x2062b7==='locale'&&!normalizeLocale(_0x35cc54))throw CliErrors['validation']('Invalid\x20locale\x20value.',_0x4c3a69(0x9c));DOMAIN_CONFIG_FIELDS[_0x4c3a69(0xb5)](_0x2062b7)&&(_0x35e07a=normalizeDomainOrigin(_0x2062b7,_0x35cc54));const _0x557c6b={'global':_0x1d18ef[_0x4c3a69(0xac)](_0x4c3a69(0xa7))},_0x577e4f=resolveWriteScope(_0x557c6b),_0x30c2e2=readScopedConfig(_0x577e4f);_0x2062b7===_0x4c3a69(0x96)&&(_0x7e31a7=_0x4c3a69(0xb9),delete _0x30c2e2[_0x4c3a69(0x96)]);_0x2062b7===_0x4c3a69(0x98)&&(_0x35e07a=normalizeLocale(_0x35cc54));if(_0x2062b7===_0x4c3a69(0xad)){_0x35e07a=normalizeEnv(_0x35cc54);if(!isProduction(_0x35e07a)&&!isDaily(_0x35e07a))throw CliErrors[_0x4c3a69(0x92)](_0x4c3a69(0x95),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x2062b7==='appcode'){const _0x5ea5bd=_0x30c2e2[_0x4c3a69(0xbc)]&&typeof _0x30c2e2[_0x4c3a69(0xbc)]==='object'?Object[_0x4c3a69(0xa3)](_0x30c2e2[_0x4c3a69(0xbc)]):[];if(_0x5ea5bd['length']>0x0)throw CliErrors['validation'](_0x4c3a69(0xaa),_0x4c3a69(0xb3)+CLI_BIN_NAME+_0x4c3a69(0x90)+_0x35e07a+_0x4c3a69(0xaf)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x3c7866=buildCanonicalProjectConfig({..._0x30c2e2},{'appCodes':[_0x35e07a],'env':typeof _0x30c2e2[_0x4c3a69(0xad)]===_0x4c3a69(0xa1)?_0x30c2e2[_0x4c3a69(0xad)]:undefined});writeScopedConfig(_0x3c7866,_0x577e4f);const _0x36e260=_0x577e4f===_0x4c3a69(0xa7)?_0x4c3a69(0x99):'Project';return{'ok':!![],'message':'✓\x20'+_0x36e260+_0x4c3a69(0xa9)+_0x35e07a+_0x4c3a69(0x8f)};}_0x30c2e2[_0x7e31a7]=_0x35e07a,writeScopedConfig(_0x30c2e2,_0x577e4f);const _0x5eb478=_0x577e4f==='global'?_0x4c3a69(0x99):_0x4c3a69(0xa6);return{'ok':!![],'message':'✓\x20'+_0x5eb478+'\x20'+_0x7e31a7+_0x4c3a69(0x91)+_0x35e07a};}export const configSetDefinition={'service':'config','command':a63_0x87f442(0xb8),'description':'Set\x20a\x20config\x20value','risk':a63_0x87f442(0x94),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a63_0x87f442(0xbb),'type':a63_0x87f442(0xa1),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a63_0x87f442(0x8d),'type':a63_0x87f442(0xa1),'description':a63_0x87f442(0x9d),'required':!![]},{'name':'global','type':a63_0x87f442(0x9e),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x132594,_0x3f20c0){var _0x3b7a66=a64_0xad12,_0x146f5c=_0x132594();while(!![]){try{var _0x392123=-parseInt(_0x3b7a66(0x7d))/0x1+parseInt(_0x3b7a66(0x7e))/0x2+-parseInt(_0x3b7a66(0x7c))/0x3+-parseInt(_0x3b7a66(0x79))/0x4+-parseInt(_0x3b7a66(0x81))/0x5+parseInt(_0x3b7a66(0x7b))/0x6+-parseInt(_0x3b7a66(0x7f))/0x7*(-parseInt(_0x3b7a66(0x80))/0x8);if(_0x392123===_0x3f20c0)break;else _0x146f5c['push'](_0x146f5c['shift']());}catch(_0x907eaa){_0x146f5c['push'](_0x146f5c['shift']());}}}(a64_0x5477,0x33000));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a64_0xad12(_0x3d8820,_0x148af8){_0x3d8820=_0x3d8820-0x77;var _0x5477bd=a64_0x5477();var _0xad1208=_0x5477bd[_0x3d8820];return _0xad1208;}import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};function a64_0x5477(){var _0x2c7998=['262228MHWWBf','110380qqLhzm','98yjusrM','465096vfcBol','32370uBvVgb','validation','global','project','483304WtFeCL','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','79224DlhEeV','851664wnTXVd'];a64_0x5477=function(){return _0x2c7998;};return a64_0x5477();}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0xa19218){var _0x4b894e=a64_0xad12;if(_0xa19218[_0x4b894e(0x77)])return _0x4b894e(0x77);if(!isInProject())throw CliErrors[_0x4b894e(0x82)](_0x4b894e(0x7a),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0x4b894e(0x78);}export function readScopedConfig(_0x3e757c){return readConfigFile(resolveWriteConfigPath(_0x3e757c));}export function writeScopedConfig(_0x1ea60d,_0x370241){writeConfigFile(resolveWriteConfigPath(_0x370241),_0x1ea60d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x15d796=a65_0xdb62;(function(_0x4ec153,_0x48890a){const _0x4abb89=a65_0xdb62,_0xa03e7d=_0x4ec153();while(!![]){try{const _0x23643f=-parseInt(_0x4abb89(0x1cb))/0x1+parseInt(_0x4abb89(0x1ad))/0x2+parseInt(_0x4abb89(0x1dc))/0x3+-parseInt(_0x4abb89(0x1cd))/0x4+parseInt(_0x4abb89(0x1d2))/0x5+parseInt(_0x4abb89(0x1d4))/0x6*(parseInt(_0x4abb89(0x1a6))/0x7)+parseInt(_0x4abb89(0x1e7))/0x8*(-parseInt(_0x4abb89(0x1e8))/0x9);if(_0x23643f===_0x48890a)break;else _0xa03e7d['push'](_0xa03e7d['shift']());}catch(_0x5eda9e){_0xa03e7d['push'](_0xa03e7d['shift']());}}}(a65_0x5ec9,0x5fdb4));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set(['MANY_TO_ONE',a65_0x15d796(0x1e4)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x15d796(0x1ef),a65_0x15d796(0x1d8),a65_0x15d796(0x1f1),'BOOLEAN',a65_0x15d796(0x19e),'MULTI_SELECT',a65_0x15d796(0x1c3),'USER',a65_0x15d796(0x1ca),a65_0x15d796(0x1b2)]);export function isDatasetBatchDesign(_0x16e56a){const _0x371752=a65_0x15d796;return isObject(_0x16e56a)&&_0x16e56a[_0x371752(0x1be)]===_0x371752(0x1df);}export function validateDatasetBatchDesign(_0x550467){const _0x381c25=a65_0x15d796;(!isObject(_0x550467)||_0x550467[_0x381c25(0x1be)]!=='dataset-batch')&&fail(_0x381c25(0x1a5));_0x550467[_0x381c25(0x1e2)]!==0x1&&fail(_0x381c25(0x199));const _0x42234f=objectArray(_0x550467[_0x381c25(0x1f4)],_0x381c25(0x1f4),0x1,0x14),_0x38aafa=objectArray(_0x550467[_0x381c25(0x1f7)],_0x381c25(0x1f7),0x0,0xc8),_0x1b8831=objectArray(_0x550467['unresolvedRelations'],'unresolvedRelations',0x0,0xc8),_0x1e9571=new Set(),_0x471ab6=new Map();for(const [_0x5f1c1c,_0x1d5a19]of _0x42234f[_0x381c25(0x1ea)]()){const _0x2136df=requiredString(_0x1d5a19['localKey'],_0x381c25(0x1c6)+_0x5f1c1c+_0x381c25(0x1ec));!LOCAL_KEY[_0x381c25(0x1f8)](_0x2136df)&&fail(_0x381c25(0x1c6)+_0x5f1c1c+_0x381c25(0x1e5)+LOCAL_KEY[_0x381c25(0x1fa)]+'.');_0x1e9571[_0x381c25(0x1cc)](_0x2136df)&&fail(_0x381c25(0x1b8));_0x1e9571[_0x381c25(0x1a4)](_0x2136df);!isObject(_0x1d5a19[_0x381c25(0x1b9)])&&fail(_0x381c25(0x1c6)+_0x5f1c1c+'].design\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x1d5a19[_0x381c25(0x1b9)],_0x381c25(0x1c6)+_0x5f1c1c+_0x381c25(0x1a3));if(!isObject(_0x1d5a19[_0x381c25(0x1b9)][_0x381c25(0x19b)]))fail(_0x381c25(0x1c6)+_0x5f1c1c+'].design.dataset\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x1d5a19[_0x381c25(0x1b9)][_0x381c25(0x19b)],_0x381c25(0x1c6)+_0x5f1c1c+_0x381c25(0x1a9)),requiredString(_0x1d5a19['design'][_0x381c25(0x19b)]['datasetName'],_0x381c25(0x1c6)+_0x5f1c1c+'].design.dataset.datasetName');_0x381c25(0x1f7)in _0x1d5a19[_0x381c25(0x1b9)]&&(!Array[_0x381c25(0x1d6)](_0x1d5a19[_0x381c25(0x1b9)]['relations'])||_0x1d5a19[_0x381c25(0x1b9)][_0x381c25(0x1f7)]['length']!==0x0)&&fail(_0x381c25(0x1c6)+_0x5f1c1c+_0x381c25(0x1f5));const _0x1cc731=objectArray(_0x1d5a19[_0x381c25(0x1b9)]['fields'],_0x381c25(0x1c6)+_0x5f1c1c+'].design.fields',0x1,0xc8),_0x4d017f=new Map();for(const [_0x2fce23,_0xd6e67d]of _0x1cc731[_0x381c25(0x1ea)]()){const _0x27ffe6=fieldName(_0xd6e67d);if(!_0x27ffe6)fail(_0x381c25(0x1c6)+_0x5f1c1c+'].design.fields['+_0x2fce23+_0x381c25(0x1ce));const _0x1d2ef1=_0x27ffe6[_0x381c25(0x1c7)]();if(_0x4d017f[_0x381c25(0x1cc)](_0x1d2ef1))fail(_0x381c25(0x1e1)+_0x2136df+_0x381c25(0x1f0));const _0x158c45=stringValue(_0xd6e67d[_0x381c25(0x1c0)]??_0xd6e67d[_0x381c25(0x1a8)])[_0x381c25(0x195)]();if(!SUPPORTED_FIELD_TYPES[_0x381c25(0x1cc)](_0x158c45))fail(_0x381c25(0x1c6)+_0x5f1c1c+_0x381c25(0x1de)+_0x2fce23+_0x381c25(0x1b1));_0x4d017f['set'](_0x1d2ef1,_0x158c45),[_0xd6e67d['refTable'],_0xd6e67d[_0x381c25(0x1ee)],_0xd6e67d['refTableLabelField']]['some'](_0xc05995=>stringValue(_0xc05995))&&fail(_0x381c25(0x1c6)+_0x5f1c1c+'].design.fields['+_0x2fce23+']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.');}_0x471ab6[_0x381c25(0x1a2)](_0x2136df,_0x4d017f);}const _0x3c934b=new Set(),_0x24e95c=new Set();for(const [_0x53abf5,_0x22e51e]of _0x38aafa['entries']()){const _0x13a9e2=validateRelation(_0x22e51e,_0x53abf5,_0x1e9571,_0x471ab6);if(_0x3c934b['has'](_0x13a9e2))fail(_0x381c25(0x1c2));_0x3c934b['add'](_0x13a9e2);const _0x9d6a03=_0x13a9e2[_0x381c25(0x1f6)]('\x00',0x2)[_0x381c25(0x1ba)]('\x00');if(_0x24e95c[_0x381c25(0x1cc)](_0x9d6a03))fail('Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.');_0x24e95c[_0x381c25(0x1a4)](_0x9d6a03);}for(const [_0x182a39,_0x11c8ac]of _0x1b8831[_0x381c25(0x1ea)]()){requiredString(_0x11c8ac[_0x381c25(0x1f9)],_0x381c25(0x1a7)+_0x182a39+_0x381c25(0x1b4)),validateConfidence(_0x11c8ac[_0x381c25(0x1ae)],_0x381c25(0x1a7)+_0x182a39+_0x381c25(0x1eb));}return _0x550467;}export function reconcileBatchResult(_0x3d5d9b){const _0xe97ac1=a65_0x15d796;if(!isObject(_0x3d5d9b))return null;try{const _0x20aae2=stringArray(_0x3d5d9b[_0xe97ac1(0x1ac)],_0xe97ac1(0x1ac),0x1,0x14),_0x1ad0f8=new Set(_0x20aae2);if(_0x1ad0f8[_0xe97ac1(0x1f2)]!==_0x20aae2[_0xe97ac1(0x1d5)]||_0x20aae2[_0xe97ac1(0x1d0)](_0x3d4c15=>!LOCAL_KEY['test'](_0x3d4c15)))return null;const _0x32adc6=objectArray(_0x3d5d9b[_0xe97ac1(0x1ab)],'createdDatasets',0x1,0x14),_0x520af5=new Map(),_0x51263d=new Set();for(const _0x51f0b of _0x32adc6){const _0x5540a7=requiredString(_0x51f0b[_0xe97ac1(0x1d7)],_0xe97ac1(0x1fb)),_0x58319e=requiredString(_0x51f0b['code']??_0x51f0b['datasetCode'],_0xe97ac1(0x1d1));if(_0x520af5[_0xe97ac1(0x1cc)](_0x5540a7)||_0x51263d[_0xe97ac1(0x1cc)](_0x58319e))return null;_0x520af5['set'](_0x5540a7,_0x58319e),_0x51263d['add'](_0x58319e);}if(!sameSet(_0x1ad0f8,new Set(_0x520af5[_0xe97ac1(0x1bb)]())))return null;const _0x47be95=objectArray(_0x3d5d9b[_0xe97ac1(0x1aa)],'expectedRelations',0x0,0xc8),_0x1527b3=objectArray(_0x3d5d9b[_0xe97ac1(0x1da)],_0xe97ac1(0x1da),0x0,0xc8),_0x29a6f8=relationTupleSet(_0x47be95,![],_0x520af5),_0x11c551=relationTupleSet(_0x1527b3,!![],_0x520af5);if(!_0x29a6f8||!_0x11c551||!sameSet(_0x29a6f8,_0x11c551))return null;const _0x28385a=objectArray(_0x3d5d9b[_0xe97ac1(0x1a0)],_0xe97ac1(0x1a0),0x0,0xc8);return{'expectedLocalKeys':_0x20aae2,'expectedRelations':_0x47be95,'createdDatasets':_0x32adc6,'createdRelations':_0x1527b3,'unresolvedRelations':_0x28385a,...isObject(_0x3d5d9b[_0xe97ac1(0x1f3)])?{'metrics':_0x3d5d9b[_0xe97ac1(0x1f3)]}:{}};}catch{return null;}}function validateRelation(_0x1aa3fd,_0x54afce,_0x2fcebd,_0xd6e71){const _0x2018b7=a65_0x15d796,_0x12a832='relations['+_0x54afce+']',_0x5de95b=requiredString(_0x1aa3fd['fromDatasetKey'],_0x12a832+_0x2018b7(0x1c9)),_0x311d34=requiredString(_0x1aa3fd[_0x2018b7(0x196)],_0x12a832+_0x2018b7(0x1e0)),_0x354fe9=requiredString(_0x1aa3fd['fromField'],_0x12a832+'.fromField')[_0x2018b7(0x1c7)](),_0x36522d=requiredString(_0x1aa3fd[_0x2018b7(0x194)],_0x12a832+_0x2018b7(0x1e9))[_0x2018b7(0x1c7)]();if(!_0x2fcebd['has'](_0x5de95b)||!_0x2fcebd[_0x2018b7(0x1cc)](_0x311d34))fail(_0x12a832+'\x20references\x20an\x20unknown\x20dataset\x20localKey.');const _0x375fdc=_0xd6e71[_0x2018b7(0x1fc)](_0x5de95b)?.[_0x2018b7(0x1fc)](_0x354fe9),_0x371e35=_0xd6e71[_0x2018b7(0x1fc)](_0x311d34)?.[_0x2018b7(0x1fc)](_0x36522d);if(_0x375fdc===undefined||_0x371e35===undefined)fail(_0x12a832+_0x2018b7(0x1cf));if(_0x375fdc&&_0x371e35&&_0x375fdc!==_0x371e35)fail(_0x12a832+_0x2018b7(0x1dd));const _0x2344a7=stringValue(_0x1aa3fd[_0x2018b7(0x1a1)])||_0x2018b7(0x19f);if(_0x2344a7!==_0x2018b7(0x19f))fail(_0x12a832+'.relationType\x20must\x20be\x20\x22lookup\x22.');const _0xa0881e=stringValue(_0x1aa3fd[_0x2018b7(0x1d3)])||'MANY_TO_ONE';if(!SUPPORTED_CARDINALITIES['has'](_0xa0881e))fail(_0x12a832+_0x2018b7(0x1ed));return requiredString(_0x1aa3fd['reason'],_0x12a832+_0x2018b7(0x1c4)),validateConfidence(_0x1aa3fd[_0x2018b7(0x1ae)],_0x12a832+_0x2018b7(0x1e6)),tuple(_0x5de95b,_0x354fe9,_0x311d34,_0x36522d,_0x2018b7(0x19f),_0xa0881e);}function relationTupleSet(_0x3f37d6,_0x48e1f8,_0x4f699c){const _0x8bb874=a65_0x15d796,_0x1766e4=new Set();for(const _0x460da1 of _0x3f37d6){const _0x3876c2=stringValue(_0x460da1[_0x8bb874(0x1db)]),_0xa1b70f=stringValue(_0x460da1[_0x8bb874(0x196)]),_0x4405ca=stringValue(_0x460da1[_0x8bb874(0x1af)])[_0x8bb874(0x1c7)](),_0x30af4b=stringValue(_0x460da1[_0x8bb874(0x194)])[_0x8bb874(0x1c7)](),_0x483889=stringValue(_0x460da1[_0x8bb874(0x1a1)]),_0x335cc7=stringValue(_0x460da1['cardinality']);if(!_0x3876c2||!_0xa1b70f||!_0x4405ca||!_0x30af4b||_0x483889!==_0x8bb874(0x19f)||!SUPPORTED_CARDINALITIES[_0x8bb874(0x1cc)](_0x335cc7))return null;if(!_0x4f699c[_0x8bb874(0x1cc)](_0x3876c2)||!_0x4f699c[_0x8bb874(0x1cc)](_0xa1b70f))return null;if(_0x48e1f8&&(stringValue(_0x460da1[_0x8bb874(0x1b3)])!==_0x4f699c['get'](_0x3876c2)||stringValue(_0x460da1[_0x8bb874(0x19d)])!==_0x4f699c['get'](_0xa1b70f)))return null;const _0xdf4a4a=tuple(_0x3876c2,_0x4405ca,_0xa1b70f,_0x30af4b,_0x483889,_0x335cc7);if(_0x1766e4[_0x8bb874(0x1cc)](_0xdf4a4a))return null;_0x1766e4[_0x8bb874(0x1a4)](_0xdf4a4a);}return _0x1766e4;}function a65_0xdb62(_0xfd1df0,_0x1078d8){_0xfd1df0=_0xfd1df0-0x194;const _0x5ec95b=a65_0x5ec9();let _0xdb624c=_0x5ec95b[_0xfd1df0];return _0xdb624c;}function rejectServerDatasetIdentity(_0x41494f,_0x3addd4){const _0x14f5bf=a65_0x15d796;for(const _0x212ea9 of['id',_0x14f5bf(0x197),_0x14f5bf(0x1bf),_0x14f5bf(0x198),'datasetCode','modelCode']){if(_0x41494f[_0x212ea9]!==undefined&&_0x41494f[_0x212ea9]!==null&&_0x41494f[_0x212ea9]!=='')fail(_0x3addd4+'.'+_0x212ea9+_0x14f5bf(0x19a));}}function objectArray(_0x184c2b,_0x1d6842,_0x4c2322,_0x5eb6da){const _0x301672=a65_0x15d796;return(!Array['isArray'](_0x184c2b)||_0x184c2b[_0x301672(0x1d5)]<_0x4c2322||_0x184c2b[_0x301672(0x1d5)]>_0x5eb6da||_0x184c2b[_0x301672(0x1d0)](_0x8acd4=>!isObject(_0x8acd4)))&&fail(_0x1d6842+'\x20must\x20contain\x20'+_0x4c2322+'..'+_0x5eb6da+_0x301672(0x1c8)),_0x184c2b;}function stringArray(_0x1dfdbc,_0x2778a8,_0x259b68,_0x181e57){const _0x5cfe04=a65_0x15d796;return(!Array[_0x5cfe04(0x1d6)](_0x1dfdbc)||_0x1dfdbc['length']<_0x259b68||_0x1dfdbc['length']>_0x181e57||_0x1dfdbc['some'](_0x38d30c=>typeof _0x38d30c!==_0x5cfe04(0x1b7)||!_0x38d30c[_0x5cfe04(0x19c)]()))&&fail(_0x2778a8+_0x5cfe04(0x1bc)+_0x259b68+'..'+_0x181e57+_0x5cfe04(0x1e3)),_0x1dfdbc;}function requiredString(_0x304ae0,_0x57c4e8){const _0x503e1c=stringValue(_0x304ae0);if(!_0x503e1c)fail(_0x57c4e8+'\x20is\x20required.');return _0x503e1c;}function a65_0x5ec9(){const _0xb9ab4d=['DATETIME','size','metrics','datasets','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','split','relations','test','reason','source','createdDatasets[].localKey','get','toField','toUpperCase','toDatasetKey','datasetId','code','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','dataset','trim','toDatasetCode','SELECT','lookup','unresolvedRelations','relationType','set','].design','add','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','5019308ZCJStx','unresolvedRelations[','fieldType','].design.dataset','expectedRelations','createdDatasets','expectedLocalKeys','1176880yOMwPK','confidence','fromField','map','].type\x20is\x20not\x20supported.','UPLOAD','fromDatasetCode','].reason','\x20must\x20be\x20between\x200\x20and\x201.','name','string','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','design','join','keys','\x20must\x20contain\x20','object','kind','modelId','type','fieldCode','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','DATE_RANGE','.reason','number','datasets[','toLowerCase','\x20objects.','.fromDatasetKey','ADDRESS','644696CbIGCh','has','2433588opLwfq',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','\x20references\x20an\x20unknown\x20field.','some','createdDatasets[].code','468850VRdROa','cardinality','6qLQRZH','length','isArray','localKey','NUMBER','fieldName','createdRelations','fromDatasetKey','2260266wvicjM','\x20connects\x20incompatible\x20field\x20types.','].design.fields[','dataset-batch','.toDatasetKey','Dataset\x20','schemaVersion','\x20non-empty\x20strings.','ONE_TO_ONE','].localKey\x20must\x20match\x20','.confidence','4055640zBXoSR','9HmBJEG','.toField','entries','].confidence','].localKey','.cardinality\x20is\x20not\x20supported.','refTableField','TEXT','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.'];a65_0x5ec9=function(){return _0xb9ab4d;};return a65_0x5ec9();}function stringValue(_0x1f8e4d){const _0x1e5aba=a65_0x15d796;return typeof _0x1f8e4d===_0x1e5aba(0x1b7)?_0x1f8e4d[_0x1e5aba(0x19c)]():'';}function fieldName(_0x4d8e74){const _0x26edc1=a65_0x15d796;return stringValue(_0x4d8e74[_0x26edc1(0x198)]??_0x4d8e74[_0x26edc1(0x1c1)]??_0x4d8e74[_0x26edc1(0x1b6)]??_0x4d8e74[_0x26edc1(0x1d9)]);}function validateConfidence(_0x408eb4,_0x2c0f05){const _0x48917a=a65_0x15d796;_0x408eb4!==undefined&&_0x408eb4!==null&&(typeof _0x408eb4!==_0x48917a(0x1c5)||!Number['isFinite'](_0x408eb4)||_0x408eb4<0x0||_0x408eb4>0x1)&&fail(_0x2c0f05+_0x48917a(0x1b5));}function tuple(..._0x4cc9c8){const _0x2a4ab1=a65_0x15d796;return _0x4cc9c8[_0x2a4ab1(0x1b0)]((_0x1d452f,_0x4fcdfd)=>_0x4fcdfd===0x1||_0x4fcdfd===0x3?_0x1d452f[_0x2a4ab1(0x1c7)]():_0x1d452f)[_0x2a4ab1(0x1ba)]('\x00');}function sameSet(_0x47b936,_0x1d7105){const _0x565668=a65_0x15d796;return _0x47b936[_0x565668(0x1f2)]===_0x1d7105[_0x565668(0x1f2)]&&[..._0x47b936]['every'](_0x3b06a9=>_0x1d7105[_0x565668(0x1cc)](_0x3b06a9));}function isObject(_0x63b2d7){const _0x5cd82d=a65_0x15d796;return typeof _0x63b2d7===_0x5cd82d(0x1bd)&&_0x63b2d7!==null&&!Array['isArray'](_0x63b2d7);}function fail(_0x2f9a72){throw CliErrors['validation'](_0x2f9a72);}
|
|
1
|
+
const a65_0x11817b=a65_0x3d75;(function(_0x4e3af7,_0x1914be){const _0x412590=a65_0x3d75,_0x5e3b74=_0x4e3af7();while(!![]){try{const _0x353ce2=parseInt(_0x412590(0x1a1))/0x1+-parseInt(_0x412590(0x180))/0x2*(-parseInt(_0x412590(0x19f))/0x3)+-parseInt(_0x412590(0x1a2))/0x4+-parseInt(_0x412590(0x14f))/0x5+-parseInt(_0x412590(0x18d))/0x6*(-parseInt(_0x412590(0x19e))/0x7)+parseInt(_0x412590(0x183))/0x8*(parseInt(_0x412590(0x16a))/0x9)+-parseInt(_0x412590(0x19d))/0xa*(-parseInt(_0x412590(0x18f))/0xb);if(_0x353ce2===_0x1914be)break;else _0x5e3b74['push'](_0x5e3b74['shift']());}catch(_0x36dbeb){_0x5e3b74['push'](_0x5e3b74['shift']());}}}(a65_0x2255,0xdfc45));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x11817b(0x150),'ONE_TO_ONE']),SUPPORTED_FIELD_TYPES=new Set([a65_0x11817b(0x195),a65_0x11817b(0x13c),a65_0x11817b(0x15e),'BOOLEAN',a65_0x11817b(0x199),a65_0x11817b(0x161),a65_0x11817b(0x181),'USER','ADDRESS',a65_0x11817b(0x172)]);export function isDatasetBatchDesign(_0x3a994b){const _0x3e2399=a65_0x11817b;return isObject(_0x3a994b)&&_0x3a994b[_0x3e2399(0x164)]==='dataset-batch';}export function validateDatasetBatchDesign(_0x59dafb){const _0xb56f5=a65_0x11817b;(!isObject(_0x59dafb)||_0x59dafb['kind']!=='dataset-batch')&&fail(_0xb56f5(0x194));_0x59dafb[_0xb56f5(0x167)]!==0x1&&fail(_0xb56f5(0x158));const _0x144ec7=objectArray(_0x59dafb['datasets'],'datasets',0x1,0x14),_0x3e9001=objectArray(_0x59dafb[_0xb56f5(0x169)],_0xb56f5(0x169),0x0,0xc8),_0x4dcf71=objectArray(_0x59dafb['unresolvedRelations'],'unresolvedRelations',0x0,0xc8),_0x415ac1=new Set(),_0x998e19=new Map();for(const [_0x175730,_0x35348a]of _0x144ec7[_0xb56f5(0x189)]()){const _0x49c70a=requiredString(_0x35348a[_0xb56f5(0x184)],'datasets['+_0x175730+_0xb56f5(0x19c));!LOCAL_KEY[_0xb56f5(0x175)](_0x49c70a)&&fail(_0xb56f5(0x149)+_0x175730+'].localKey\x20must\x20match\x20'+LOCAL_KEY[_0xb56f5(0x19a)]+'.');_0x415ac1['has'](_0x49c70a)&&fail(_0xb56f5(0x165));_0x415ac1[_0xb56f5(0x19b)](_0x49c70a);!isObject(_0x35348a[_0xb56f5(0x17a)])&&fail(_0xb56f5(0x149)+_0x175730+'].design\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x35348a['design'],_0xb56f5(0x149)+_0x175730+'].design');if(!isObject(_0x35348a[_0xb56f5(0x17a)][_0xb56f5(0x1a3)]))fail('datasets['+_0x175730+_0xb56f5(0x18c));rejectServerDatasetIdentity(_0x35348a['design']['dataset'],'datasets['+_0x175730+_0xb56f5(0x168)),requiredString(_0x35348a['design'][_0xb56f5(0x1a3)][_0xb56f5(0x18a)],'datasets['+_0x175730+_0xb56f5(0x185));'relations'in _0x35348a['design']&&(!Array[_0xb56f5(0x17f)](_0x35348a[_0xb56f5(0x17a)][_0xb56f5(0x169)])||_0x35348a[_0xb56f5(0x17a)][_0xb56f5(0x169)][_0xb56f5(0x18b)]!==0x0)&&fail('datasets['+_0x175730+_0xb56f5(0x188));const _0x2dbed8=objectArray(_0x35348a[_0xb56f5(0x17a)][_0xb56f5(0x144)],_0xb56f5(0x149)+_0x175730+_0xb56f5(0x159),0x1,0xc8),_0x2a17b4=new Map();for(const [_0x405864,_0x15970e]of _0x2dbed8[_0xb56f5(0x189)]()){const _0x55ea30=fieldName(_0x15970e);if(!_0x55ea30)fail('datasets['+_0x175730+_0xb56f5(0x187)+_0x405864+']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.');const _0x20c9b1=_0x55ea30[_0xb56f5(0x170)]();if(_0x2a17b4[_0xb56f5(0x13d)](_0x20c9b1))fail(_0xb56f5(0x145)+_0x49c70a+_0xb56f5(0x177));const _0x48f0ba=stringValue(_0x15970e[_0xb56f5(0x14c)]??_0x15970e[_0xb56f5(0x16c)])[_0xb56f5(0x17c)]();if(!SUPPORTED_FIELD_TYPES[_0xb56f5(0x13d)](_0x48f0ba))fail(_0xb56f5(0x149)+_0x175730+'].design.fields['+_0x405864+_0xb56f5(0x173));_0x2a17b4[_0xb56f5(0x15f)](_0x20c9b1,_0x48f0ba),[_0x15970e['refTable'],_0x15970e[_0xb56f5(0x14d)],_0x15970e['refTableLabelField']]['some'](_0x2b82ab=>stringValue(_0x2b82ab))&&fail(_0xb56f5(0x149)+_0x175730+'].design.fields['+_0x405864+_0xb56f5(0x13e));}_0x998e19[_0xb56f5(0x15f)](_0x49c70a,_0x2a17b4);}const _0x485657=new Set(),_0x352868=new Set();for(const [_0x1c70eb,_0x354179]of _0x3e9001[_0xb56f5(0x189)]()){const _0x3dd694=validateRelation(_0x354179,_0x1c70eb,_0x415ac1,_0x998e19);if(_0x485657[_0xb56f5(0x13d)](_0x3dd694))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0x485657['add'](_0x3dd694);const _0x2ae93f=_0x3dd694[_0xb56f5(0x14a)]('\x00',0x2)[_0xb56f5(0x13f)]('\x00');if(_0x352868[_0xb56f5(0x13d)](_0x2ae93f))fail(_0xb56f5(0x17b));_0x352868[_0xb56f5(0x19b)](_0x2ae93f);}for(const [_0x4ba8fa,_0x4af41e]of _0x4dcf71['entries']()){requiredString(_0x4af41e[_0xb56f5(0x151)],'unresolvedRelations['+_0x4ba8fa+_0xb56f5(0x197)),validateConfidence(_0x4af41e[_0xb56f5(0x162)],'unresolvedRelations['+_0x4ba8fa+_0xb56f5(0x1a4));}return _0x59dafb;}export function reconcileBatchResult(_0x360587){const _0x13b8a5=a65_0x11817b;if(!isObject(_0x360587))return null;try{const _0x104e64=stringArray(_0x360587[_0x13b8a5(0x14e)],_0x13b8a5(0x14e),0x1,0x14),_0x3ea913=new Set(_0x104e64);if(_0x3ea913[_0x13b8a5(0x179)]!==_0x104e64[_0x13b8a5(0x18b)]||_0x104e64[_0x13b8a5(0x196)](_0x1f72c1=>!LOCAL_KEY[_0x13b8a5(0x175)](_0x1f72c1)))return null;const _0x385bcc=objectArray(_0x360587[_0x13b8a5(0x15b)],_0x13b8a5(0x15b),0x1,0x14),_0x589061=new Map(),_0x58e91d=new Set();for(const _0x27392d of _0x385bcc){const _0x158e57=requiredString(_0x27392d[_0x13b8a5(0x184)],_0x13b8a5(0x154)),_0x22c9f2=requiredString(_0x27392d[_0x13b8a5(0x157)]??_0x27392d[_0x13b8a5(0x143)],_0x13b8a5(0x160));if(_0x589061[_0x13b8a5(0x13d)](_0x158e57)||_0x58e91d[_0x13b8a5(0x13d)](_0x22c9f2))return null;_0x589061[_0x13b8a5(0x15f)](_0x158e57,_0x22c9f2),_0x58e91d[_0x13b8a5(0x19b)](_0x22c9f2);}if(!sameSet(_0x3ea913,new Set(_0x589061[_0x13b8a5(0x14b)]())))return null;const _0x218c54=objectArray(_0x360587['expectedRelations'],_0x13b8a5(0x141),0x0,0xc8),_0x1800e6=objectArray(_0x360587['createdRelations'],_0x13b8a5(0x142),0x0,0xc8),_0x3b8403=relationTupleSet(_0x218c54,![],_0x589061),_0x25a276=relationTupleSet(_0x1800e6,!![],_0x589061);if(!_0x3b8403||!_0x25a276||!sameSet(_0x3b8403,_0x25a276))return null;const _0x3ee518=objectArray(_0x360587['unresolvedRelations'],_0x13b8a5(0x198),0x0,0xc8);return{'expectedLocalKeys':_0x104e64,'expectedRelations':_0x218c54,'createdDatasets':_0x385bcc,'createdRelations':_0x1800e6,'unresolvedRelations':_0x3ee518,...isObject(_0x360587[_0x13b8a5(0x1a5)])?{'metrics':_0x360587[_0x13b8a5(0x1a5)]}:{}};}catch{return null;}}function validateRelation(_0x425779,_0x3291a0,_0x37c583,_0x3ba638){const _0x5ad591=a65_0x11817b,_0x1e4183='relations['+_0x3291a0+']',_0x1232fb=requiredString(_0x425779['fromDatasetKey'],_0x1e4183+_0x5ad591(0x16e)),_0x504169=requiredString(_0x425779[_0x5ad591(0x16b)],_0x1e4183+_0x5ad591(0x1a0)),_0x2dbfa3=requiredString(_0x425779['fromField'],_0x1e4183+_0x5ad591(0x16d))[_0x5ad591(0x170)](),_0x48fff4=requiredString(_0x425779[_0x5ad591(0x193)],_0x1e4183+_0x5ad591(0x140))['toLowerCase']();if(!_0x37c583[_0x5ad591(0x13d)](_0x1232fb)||!_0x37c583[_0x5ad591(0x13d)](_0x504169))fail(_0x1e4183+_0x5ad591(0x148));const _0x9e3ae9=_0x3ba638[_0x5ad591(0x15a)](_0x1232fb)?.[_0x5ad591(0x15a)](_0x2dbfa3),_0x51ee14=_0x3ba638['get'](_0x504169)?.[_0x5ad591(0x15a)](_0x48fff4);if(_0x9e3ae9===undefined||_0x51ee14===undefined)fail(_0x1e4183+_0x5ad591(0x146));if(_0x9e3ae9&&_0x51ee14&&_0x9e3ae9!==_0x51ee14)fail(_0x1e4183+_0x5ad591(0x190));const _0x727fd=stringValue(_0x425779[_0x5ad591(0x17d)])||_0x5ad591(0x17e);if(_0x727fd!==_0x5ad591(0x17e))fail(_0x1e4183+_0x5ad591(0x15c));const _0xc3b87=stringValue(_0x425779[_0x5ad591(0x155)])||_0x5ad591(0x150);if(!SUPPORTED_CARDINALITIES[_0x5ad591(0x13d)](_0xc3b87))fail(_0x1e4183+'.cardinality\x20is\x20not\x20supported.');return requiredString(_0x425779[_0x5ad591(0x151)],_0x1e4183+'.reason'),validateConfidence(_0x425779[_0x5ad591(0x162)],_0x1e4183+'.confidence'),tuple(_0x1232fb,_0x2dbfa3,_0x504169,_0x48fff4,'lookup',_0xc3b87);}function relationTupleSet(_0x269194,_0x5449a0,_0x107017){const _0x13d72a=a65_0x11817b,_0x1e7fc9=new Set();for(const _0x2ab02a of _0x269194){const _0x1dfeee=stringValue(_0x2ab02a[_0x13d72a(0x176)]),_0x10b551=stringValue(_0x2ab02a[_0x13d72a(0x16b)]),_0x115a0d=stringValue(_0x2ab02a['fromField'])[_0x13d72a(0x170)](),_0x585be8=stringValue(_0x2ab02a['toField'])[_0x13d72a(0x170)](),_0x10f204=stringValue(_0x2ab02a[_0x13d72a(0x17d)]),_0x1ccda4=stringValue(_0x2ab02a[_0x13d72a(0x155)]);if(!_0x1dfeee||!_0x10b551||!_0x115a0d||!_0x585be8||_0x10f204!=='lookup'||!SUPPORTED_CARDINALITIES['has'](_0x1ccda4))return null;if(!_0x107017[_0x13d72a(0x13d)](_0x1dfeee)||!_0x107017['has'](_0x10b551))return null;if(_0x5449a0&&(stringValue(_0x2ab02a[_0x13d72a(0x191)])!==_0x107017[_0x13d72a(0x15a)](_0x1dfeee)||stringValue(_0x2ab02a['toDatasetCode'])!==_0x107017[_0x13d72a(0x15a)](_0x10b551)))return null;const _0x210ea1=tuple(_0x1dfeee,_0x115a0d,_0x10b551,_0x585be8,_0x10f204,_0x1ccda4);if(_0x1e7fc9[_0x13d72a(0x13d)](_0x210ea1))return null;_0x1e7fc9[_0x13d72a(0x19b)](_0x210ea1);}return _0x1e7fc9;}function rejectServerDatasetIdentity(_0x2eb650,_0xf3dc7c){const _0x1db191=a65_0x11817b;for(const _0x19ed13 of['id',_0x1db191(0x166),_0x1db191(0x156),'code',_0x1db191(0x143),_0x1db191(0x152)]){if(_0x2eb650[_0x19ed13]!==undefined&&_0x2eb650[_0x19ed13]!==null&&_0x2eb650[_0x19ed13]!=='')fail(_0xf3dc7c+'.'+_0x19ed13+_0x1db191(0x147));}}function objectArray(_0x17e311,_0x350544,_0x36f918,_0x2689b4){const _0x55173c=a65_0x11817b;return(!Array['isArray'](_0x17e311)||_0x17e311[_0x55173c(0x18b)]<_0x36f918||_0x17e311['length']>_0x2689b4||_0x17e311[_0x55173c(0x196)](_0x6d8159=>!isObject(_0x6d8159)))&&fail(_0x350544+_0x55173c(0x18e)+_0x36f918+'..'+_0x2689b4+'\x20objects.'),_0x17e311;}function a65_0x2255(){const _0x49645c=['createdDatasets[].code','MULTI_SELECT','confidence','\x20is\x20required.','kind','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','datasetId','schemaVersion','].design.dataset','relations','189aNHFYP','toDatasetKey','fieldType','.fromField','.fromDatasetKey','validation','toLowerCase','fieldName','UPLOAD','].type\x20is\x20not\x20supported.','object','test','fromDatasetKey','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','number','size','design','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','toUpperCase','relationType','lookup','isArray','22OZJmNp','DATE_RANGE','\x20non-empty\x20strings.','245576PBTyAY','localKey','].design.dataset.datasetName','name','].design.fields[','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','entries','datasetName','length','].design.dataset\x20must\x20be\x20an\x20object.','91074unJVgx','\x20must\x20contain\x20','279763UKBmNi','\x20connects\x20incompatible\x20field\x20types.','fromDatasetCode','\x20must\x20be\x20between\x200\x20and\x201.','toField','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','TEXT','some','].reason','unresolvedRelations','SELECT','source','add','].localKey','610xqnTKu','49fifElL','172878SqvqCx','.toDatasetKey','308111ROxvbo','7256560Plbauo','dataset','].confidence','metrics','map','NUMBER','has',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','join','.toField','expectedRelations','createdRelations','datasetCode','fields','Dataset\x20','\x20references\x20an\x20unknown\x20field.','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','\x20references\x20an\x20unknown\x20dataset\x20localKey.','datasets[','split','keys','type','refTableField','expectedLocalKeys','2568055RpLQdc','MANY_TO_ONE','reason','modelCode','trim','createdDatasets[].localKey','cardinality','modelId','code','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','].design.fields','get','createdDatasets','.relationType\x20must\x20be\x20\x22lookup\x22.','fieldCode','DATETIME','set'];a65_0x2255=function(){return _0x49645c;};return a65_0x2255();}function stringArray(_0x48db4a,_0x20dfd2,_0x2ba273,_0x36ac90){const _0x4a69be=a65_0x11817b;return(!Array[_0x4a69be(0x17f)](_0x48db4a)||_0x48db4a[_0x4a69be(0x18b)]<_0x2ba273||_0x48db4a[_0x4a69be(0x18b)]>_0x36ac90||_0x48db4a['some'](_0x1f8a62=>typeof _0x1f8a62!=='string'||!_0x1f8a62[_0x4a69be(0x153)]()))&&fail(_0x20dfd2+_0x4a69be(0x18e)+_0x2ba273+'..'+_0x36ac90+_0x4a69be(0x182)),_0x48db4a;}function requiredString(_0x3080a2,_0x523284){const _0x22bc47=a65_0x11817b,_0x3ee390=stringValue(_0x3080a2);if(!_0x3ee390)fail(_0x523284+_0x22bc47(0x163));return _0x3ee390;}function stringValue(_0x45322e){const _0x2e1158=a65_0x11817b;return typeof _0x45322e==='string'?_0x45322e[_0x2e1158(0x153)]():'';}function fieldName(_0x3f6576){const _0x26e436=a65_0x11817b;return stringValue(_0x3f6576['code']??_0x3f6576[_0x26e436(0x15d)]??_0x3f6576[_0x26e436(0x186)]??_0x3f6576[_0x26e436(0x171)]);}function validateConfidence(_0x3c18f7,_0x319cde){const _0x255109=a65_0x11817b;_0x3c18f7!==undefined&&_0x3c18f7!==null&&(typeof _0x3c18f7!==_0x255109(0x178)||!Number['isFinite'](_0x3c18f7)||_0x3c18f7<0x0||_0x3c18f7>0x1)&&fail(_0x319cde+_0x255109(0x192));}function a65_0x3d75(_0x49209f,_0x2a6681){_0x49209f=_0x49209f-0x13b;const _0x225537=a65_0x2255();let _0x3d75e2=_0x225537[_0x49209f];return _0x3d75e2;}function tuple(..._0x3077b3){const _0x481e6a=a65_0x11817b;return _0x3077b3[_0x481e6a(0x13b)]((_0x2ce4c3,_0x57326a)=>_0x57326a===0x1||_0x57326a===0x3?_0x2ce4c3['toLowerCase']():_0x2ce4c3)[_0x481e6a(0x13f)]('\x00');}function sameSet(_0x160d06,_0x25eecd){const _0x3176a5=a65_0x11817b;return _0x160d06[_0x3176a5(0x179)]===_0x25eecd['size']&&[..._0x160d06]['every'](_0x5ca964=>_0x25eecd[_0x3176a5(0x13d)](_0x5ca964));}function isObject(_0x33de1c){const _0x3259f0=a65_0x11817b;return typeof _0x33de1c===_0x3259f0(0x174)&&_0x33de1c!==null&&!Array[_0x3259f0(0x17f)](_0x33de1c);}function fail(_0x3a3aea){const _0x3c3a69=a65_0x11817b;throw CliErrors[_0x3c3a69(0x16f)](_0x3a3aea);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a66_0x56f8ad=a66_0x1492;(function(_0x38a48f,_0x3ef1be){const _0x59247d=a66_0x1492,_0x5bc0ac=_0x38a48f();while(!![]){try{const _0x45c293=parseInt(_0x59247d(0x112))/0x1+-parseInt(_0x59247d(0x150))/0x2*(-parseInt(_0x59247d(0x156))/0x3)+-parseInt(_0x59247d(0x135))/0x4*(-parseInt(_0x59247d(0x142))/0x5)+parseInt(_0x59247d(0x157))/0x6*(parseInt(_0x59247d(0x146))/0x7)+-parseInt(_0x59247d(0x138))/0x8*(-parseInt(_0x59247d(0x14e))/0x9)+-parseInt(_0x59247d(0x134))/0xa+-parseInt(_0x59247d(0x13e))/0xb;if(_0x45c293===_0x3ef1be)break;else _0x5bc0ac['push'](_0x5bc0ac['shift']());}catch(_0x46c79e){_0x5bc0ac['push'](_0x5bc0ac['shift']());}}}(a66_0x49d0,0x3d534));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a66_0x56f8ad(0x153),METADATA_BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP=a66_0x56f8ad(0x11d);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x232289,input:_0x3db4d5,dryRun:_0x91e2cb}){const _0x4a420d=a66_0x56f8ad;validateInput(_0x3db4d5);const _0x5ac34e=normalizeBusinessGroupArgument(_0x3db4d5[_0x4a420d(0x110)]),_0x4bd1ef=await getDatasetDetail(_0x3db4d5['code']),_0x23cff8=resolveBusinessGroupDataset(_0x4bd1ef,_0x3db4d5['code']);assertBusinessGroupUpdateSupported(_0x23cff8,_0x5ac34e);const _0x4bbbb1=loadCurrentBusinessGroup(_0x4bd1ef,_0x23cff8);assertExpectedBusinessGroup(_0x4bbbb1,_0x3db4d5[_0x4a420d(0x12f)]);const _0x25bdde=buildBackendPlan(_0x232289,_0x23cff8,_0x5ac34e),_0x2bc886=_0x4bbbb1!==_0x5ac34e;let _0xf2e1b3;if(_0x2bc886&&!_0x91e2cb){_0x25bdde[_0x4a420d(0x11e)]==='db-table'?await updateDbTableBusinessGroup(_0x25bdde[_0x4a420d(0x117)]):await updateErBusinessGroup(_0x25bdde['payload']);const _0x55de0d=await getDatasetDetail(_0x23cff8[_0x4a420d(0x145)]),_0x4192dc=resolveBusinessGroupDataset(_0x55de0d,_0x23cff8[_0x4a420d(0x145)]),_0x23475b=loadCurrentBusinessGroup(_0x55de0d,_0x4192dc);if(_0x23475b!==_0x5ac34e)throw CliErrors[_0x4a420d(0x151)](_0x4a420d(0x155),'Expected\x20'+JSON[_0x4a420d(0x144)](displayBusinessGroup(_0x5ac34e))+_0x4a420d(0x127)+JSON[_0x4a420d(0x144)](displayBusinessGroup(_0x23475b))+'.');_0xf2e1b3={'verified':!![],'status':'matched','afterReadback':{'businessGroup':displayBusinessGroup(_0x23475b)}};}else!_0x2bc886&&(_0xf2e1b3={'verified':!![],'status':_0x4a420d(0x120),'afterReadback':{'businessGroup':displayBusinessGroup(_0x4bbbb1)}});const _0x2ec7bc={'operation':_0x4a420d(0x121),'appCode':_0x232289,'selector':{'code':_0x23cff8[_0x4a420d(0x145)]},'dataset':{'id':_0x23cff8['id'],'code':_0x23cff8['code'],'name':_0x23cff8[_0x4a420d(0x141)],'sourceType':_0x23cff8[_0x4a420d(0x131)]},'before':{'businessGroup':displayBusinessGroup(_0x4bbbb1)},'after':{'businessGroup':displayBusinessGroup(_0x5ac34e)},'changed':_0x2bc886,'dryRun':_0x91e2cb,'submitted':_0x2bc886&&!_0x91e2cb,'backend':{'method':_0x25bdde[_0x4a420d(0x111)],'path':_0x25bdde[_0x4a420d(0x14d)],'payload':_0x25bdde[_0x4a420d(0x117)]},..._0xf2e1b3?{'verification':_0xf2e1b3}:{},'warnings':[]};return{'ok':!![],'data':_0x2ec7bc,'message':_0x2bc886?_0x91e2cb?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x23cff8['code']:_0x4a420d(0x14c)+_0x23cff8[_0x4a420d(0x145)]:_0x4a420d(0x11a)+_0x23cff8[_0x4a420d(0x145)]};}export const datasetBusinessGroupUpdate={'service':a66_0x56f8ad(0x118),'command':a66_0x56f8ad(0x147),'description':'Update\x20business\x20scenario\x20group','risk':'write','flags':[CODE_FLAG,{'name':'business-group','type':a66_0x56f8ad(0x119),'required':!![],'description':a66_0x56f8ad(0x125)},{'name':a66_0x56f8ad(0x149),'type':a66_0x56f8ad(0x119),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x53892c){validateInput(readBusinessGroupUpdateInput(_0x53892c));},async 'dryRun'(_0x8df3ee){const _0x1cee54=a66_0x56f8ad,_0x82a872=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x8df3ee[_0x1cee54(0x11b)],'input':readBusinessGroupUpdateInput(_0x8df3ee),'dryRun':!![]});return{'method':_0x82a872[_0x1cee54(0x123)][_0x1cee54(0x136)][_0x1cee54(0x111)],'url':_0x82a872[_0x1cee54(0x123)][_0x1cee54(0x136)][_0x1cee54(0x14d)],'body':_0x82a872[_0x1cee54(0x123)][_0x1cee54(0x136)]['payload'],'description':_0x82a872[_0x1cee54(0x132)],..._0x82a872[_0x1cee54(0x123)]};},async 'execute'(_0x265109){const _0x47e63c=a66_0x56f8ad;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x265109[_0x47e63c(0x11b)],'input':readBusinessGroupUpdateInput(_0x265109),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x2f4574){const _0x3f5988=a66_0x56f8ad,_0x431b88=_0x2f4574[_0x3f5988(0x130)](_0x3f5988(0x149));return{'code':trim(_0x2f4574[_0x3f5988(0x130)](_0x3f5988(0x145))),'businessGroup':_0x2f4574[_0x3f5988(0x130)](_0x3f5988(0x140)),'expectBusinessGroup':_0x431b88===undefined||_0x431b88===''?undefined:_0x431b88};}function validateInput(_0x33e4e3){const _0x1ebacd=a66_0x56f8ad;if(!trim(_0x33e4e3[_0x1ebacd(0x145)]))throw CliErrors['validation'](_0x1ebacd(0x139));if(_0x33e4e3[_0x1ebacd(0x110)]===undefined)throw CliErrors[_0x1ebacd(0x13b)]('--business-group\x20is\x20required');if(!trim(_0x33e4e3[_0x1ebacd(0x110)]))throw CliErrors[_0x1ebacd(0x13b)](_0x1ebacd(0x113));}function assertBusinessGroupUpdateSupported(_0x4bfbd5,_0x199f9f){const _0x542c57=a66_0x56f8ad;if(_0x4bfbd5[_0x542c57(0x131)]===_0x542c57(0x12c)&&!_0x199f9f)throw CliErrors[_0x542c57(0x13b)]('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function resolveBusinessGroupDataset(_0x5ce44a,_0x2e6ddc){const _0x5a9883=a66_0x56f8ad,_0x37267e=asPlainObject(_0x5ce44a[_0x5a9883(0x118)]),_0xd32c47=asPlainObject(_0x5ce44a['dbtableConfig']),_0x996a47=resolveSourceType(_0x5ce44a,_0x37267e,_0xd32c47),_0x484f57=firstString(_0x5ce44a['modelCode'],_0x5ce44a[_0x5a9883(0x145)],_0x37267e[_0x5a9883(0x14b)],_0x2e6ddc)||_0x2e6ddc;return{'id':firstNumber(_0x5ce44a[_0x5a9883(0x11f)],_0x5ce44a['id'],_0x37267e[_0x5a9883(0x12d)])??firstString(_0x5ce44a['modelId'],_0x5ce44a['id'],_0x37267e[_0x5a9883(0x12d)])??null,'code':_0x484f57,'name':firstString(_0x5ce44a[_0x5a9883(0x141)],_0x37267e[_0x5a9883(0x13c)],_0x37267e[_0x5a9883(0x141)])||null,'sourceType':_0x996a47,'dbTableSelector':_0x996a47==='DB_TABLE'?{'dbLinkId':firstNumber(_0xd32c47['dbId']),'tableName':firstString(_0xd32c47[_0x5a9883(0x12b)])||null}:null};}function resolveSourceType(_0x57f74f,_0x2c355c,_0x293ae1){const _0x3f16e6=a66_0x56f8ad,_0x376517=firstString(_0x57f74f[_0x3f16e6(0x10f)],_0x57f74f[_0x3f16e6(0x131)],_0x2c355c[_0x3f16e6(0x10f)],_0x2c355c[_0x3f16e6(0x131)])?.['trim']()[_0x3f16e6(0x133)]();if(_0x376517===_0x3f16e6(0x12c)||_0x376517==='METADATA')return _0x376517;if(Object[_0x3f16e6(0x14f)](_0x293ae1)['length']>0x0)return _0x3f16e6(0x12c);throw CliErrors[_0x3f16e6(0x13b)](_0x3f16e6(0x13d));}function loadCurrentBusinessGroup(_0xec3c70,_0x5652e0){const _0x20a7de=a66_0x56f8ad,_0x36e85e=readBusinessGroupFromDatasetDetail(_0xec3c70,_0x5652e0[_0x20a7de(0x131)]);if(_0x36e85e['found'])return normalizeBusinessGroup(_0x36e85e[_0x20a7de(0x129)]);return'';}function readBusinessGroupFromDatasetDetail(_0x564ca8,_0x33c988){const _0x23bc37=a66_0x56f8ad,_0x1ddf72=asPlainObject(_0x564ca8[_0x23bc37(0x118)]),_0x333b68=firstPresent(_0x564ca8[_0x23bc37(0x110)]);if(_0x333b68[_0x23bc37(0x143)])return _0x333b68;const _0x4ccf5e=firstPresent(_0x1ddf72[_0x23bc37(0x110)]);if(_0x4ccf5e[_0x23bc37(0x143)])return _0x4ccf5e;if(_0x33c988==='DB_TABLE')return{'found':![]};const _0x45cbde=readBusinessGroupFromExtend(_0x564ca8['extend']);if(_0x45cbde['found'])return _0x45cbde;return readBusinessGroupFromExtend(_0x1ddf72['extend']);}function readBusinessGroupFromExtend(_0x5d0c26){const _0x507f28=a66_0x56f8ad;if(_0x5d0c26===undefined||_0x5d0c26===null||_0x5d0c26==='')return{'found':![]};if(typeof _0x5d0c26===_0x507f28(0x119))try{const _0x153e39=JSON[_0x507f28(0x122)](_0x5d0c26);return readBusinessGroupFromExtend(_0x153e39);}catch{return{'found':![]};}const _0x4e0550=asPlainObject(_0x5d0c26);if(Object[_0x507f28(0x114)][_0x507f28(0x154)][_0x507f28(0x12a)](_0x4e0550,'businessGroup'))return{'found':!![],'value':_0x4e0550['businessGroup']};return{'found':![]};}function a66_0x1492(_0x51b98b,_0x2b611e){_0x51b98b=_0x51b98b-0x10f;const _0x49d0ef=a66_0x49d0();let _0x1492ca=_0x49d0ef[_0x51b98b];return _0x1492ca;}function firstPresent(..._0x1b7a42){for(const _0x4b2f1a of _0x1b7a42){if(_0x4b2f1a!==undefined&&_0x4b2f1a!==null)return{'found':!![],'value':_0x4b2f1a};}return{'found':![]};}function assertExpectedBusinessGroup(_0x271cb6,_0x1f87bf){const _0x1d7e8e=a66_0x56f8ad;if(_0x1f87bf===undefined)return;const _0x377b65=normalizeBusinessGroupArgument(_0x1f87bf);if(_0x271cb6!==_0x377b65)throw CliErrors[_0x1d7e8e(0x13b)](_0x1d7e8e(0x128),_0x1d7e8e(0x148)+JSON[_0x1d7e8e(0x144)](_0x377b65)+_0x1d7e8e(0x127)+JSON[_0x1d7e8e(0x144)](_0x271cb6));}function buildBackendPlan(_0x4cfd37,_0x1e98c4,_0x13e84b){const _0x473895=a66_0x56f8ad;if(_0x1e98c4[_0x473895(0x131)]===_0x473895(0x12c)){if(!_0x1e98c4[_0x473895(0x115)]||_0x1e98c4[_0x473895(0x115)]['dbLinkId']===null||!_0x1e98c4[_0x473895(0x115)][_0x473895(0x12b)])throw CliErrors[_0x473895(0x13b)](_0x473895(0x12e),_0x473895(0x152));return{'kind':_0x473895(0x14a),'method':_0x473895(0x124),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x1e98c4[_0x473895(0x115)][_0x473895(0x13f)],'tableName':_0x1e98c4[_0x473895(0x115)]['tableName'],'businessGroup':_0x13e84b}};}return{'kind':_0x473895(0x11c),'method':_0x473895(0x124),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x4cfd37,'datasetCode':_0x1e98c4[_0x473895(0x145)],'businessGroup':_0x13e84b}};}function normalizeBusinessGroup(_0x52e41a){if(_0x52e41a===undefined||_0x52e41a===null)return'';return String(_0x52e41a)['trim']();}function normalizeBusinessGroupArgument(_0x25ef57){const _0x5e6128=normalizeBusinessGroup(_0x25ef57);return _0x5e6128===UNGROUPED_BUSINESS_GROUP?'':_0x5e6128;}function displayBusinessGroup(_0x14d71b){return _0x14d71b||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x3632dd){const _0x371295=a66_0x56f8ad;if(!_0x3632dd||typeof _0x3632dd!=='object'||Array[_0x371295(0x116)](_0x3632dd))return{};return _0x3632dd;}function a66_0x49d0(){const _0x198e12=['keys','16wTccMX','apiError','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','/smartapi/dblink/updateTableBusinessGroup','hasOwnProperty','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','181125HRoRrX','1002eAwJXm','source','businessGroup','method','234492KvWsgK','--business-group\x20must\x20not\x20be\x20blank','prototype','dbTableSelector','isArray','payload','dataset','string','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','appCode','metadata','ungrouped','kind','modelId','unchanged','update','parse','data','POST','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','isFinite',',\x20actual\x20','Expectation\x20mismatch\x20at\x20businessGroup','value','call','tableName','DB_TABLE','datasetId','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','expectBusinessGroup','str','sourceType','message','toUpperCase','718860BnvFir','4MZAdmW','backend','trim','8AsIsDQ','--code\x20is\x20required','number','validation','datasetName','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','18479890OshPoG','dbLinkId','business-group','name','2167880JNmXIw','found','stringify','code','19439QlScCj','business-group-update','Expected\x20','expect-business-group','db-table','datasetCode','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','path','3494133xiaOKU'];a66_0x49d0=function(){return _0x198e12;};return a66_0x49d0();}function firstString(..._0x2b5884){const _0x5c28f1=a66_0x56f8ad;for(const _0x737104 of _0x2b5884){if(typeof _0x737104===_0x5c28f1(0x119)&&_0x737104[_0x5c28f1(0x137)]())return _0x737104[_0x5c28f1(0x137)]();if(typeof _0x737104===_0x5c28f1(0x13a)&&Number[_0x5c28f1(0x126)](_0x737104))return String(_0x737104);}return undefined;}function firstNumber(..._0x45b5c8){const _0x152e21=a66_0x56f8ad;for(const _0x284682 of _0x45b5c8){if(typeof _0x284682===_0x152e21(0x13a)&&Number[_0x152e21(0x126)](_0x284682))return _0x284682;if(typeof _0x284682==='string'&&_0x284682['trim']()&&Number[_0x152e21(0x126)](Number(_0x284682)))return Number(_0x284682);}return null;}function trim(_0xd8df54){return String(_0xd8df54||'')['trim']();}
|
|
1
|
+
const a66_0x2cfdb3=a66_0x40af;(function(_0x41d35b,_0x4e5557){const _0x242225=a66_0x40af,_0x2940fe=_0x41d35b();while(!![]){try{const _0x5804a4=parseInt(_0x242225(0x1ab))/0x1*(parseInt(_0x242225(0x1c1))/0x2)+-parseInt(_0x242225(0x1b7))/0x3*(parseInt(_0x242225(0x1cb))/0x4)+-parseInt(_0x242225(0x1bc))/0x5*(-parseInt(_0x242225(0x1a2))/0x6)+parseInt(_0x242225(0x1d4))/0x7+parseInt(_0x242225(0x1a3))/0x8+-parseInt(_0x242225(0x1a5))/0x9*(-parseInt(_0x242225(0x1c8))/0xa)+-parseInt(_0x242225(0x19e))/0xb*(parseInt(_0x242225(0x199))/0xc);if(_0x5804a4===_0x4e5557)break;else _0x2940fe['push'](_0x2940fe['shift']());}catch(_0x9a163){_0x2940fe['push'](_0x2940fe['shift']());}}}(a66_0x3d4a,0xc46e6));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_0x2cfdb3(0x1a4),METADATA_BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP='ungrouped';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x10b002,input:_0x461458,dryRun:_0x1beb2c}){const _0x4f9e4f=a66_0x2cfdb3;validateInput(_0x461458);const _0x5d2bcf=normalizeBusinessGroupArgument(_0x461458[_0x4f9e4f(0x1b2)]),_0x20c17a=await getDatasetDetail(_0x461458[_0x4f9e4f(0x1a0)]),_0x3786ca=resolveBusinessGroupDataset(_0x20c17a,_0x461458[_0x4f9e4f(0x1a0)]);assertBusinessGroupUpdateSupported(_0x3786ca,_0x5d2bcf);const _0x1e591c=loadCurrentBusinessGroup(_0x20c17a,_0x3786ca);assertExpectedBusinessGroup(_0x1e591c,_0x461458[_0x4f9e4f(0x1dd)]);const _0x73bf02=buildBackendPlan(_0x10b002,_0x3786ca,_0x5d2bcf),_0x55bdd0=_0x1e591c!==_0x5d2bcf;let _0x1ce7b9;if(_0x55bdd0&&!_0x1beb2c){_0x73bf02['kind']===_0x4f9e4f(0x1a6)?await updateDbTableBusinessGroup(_0x73bf02[_0x4f9e4f(0x1de)]):await updateErBusinessGroup(_0x73bf02[_0x4f9e4f(0x1de)]);const _0x24868e=await getDatasetDetail(_0x3786ca[_0x4f9e4f(0x1a0)]),_0x439b71=resolveBusinessGroupDataset(_0x24868e,_0x3786ca['code']),_0x5782d7=loadCurrentBusinessGroup(_0x24868e,_0x439b71);if(_0x5782d7!==_0x5d2bcf)throw CliErrors[_0x4f9e4f(0x1be)](_0x4f9e4f(0x1ce),'Expected\x20'+JSON[_0x4f9e4f(0x1b3)](displayBusinessGroup(_0x5d2bcf))+_0x4f9e4f(0x19c)+JSON[_0x4f9e4f(0x1b3)](displayBusinessGroup(_0x5782d7))+'.');_0x1ce7b9={'verified':!![],'status':'matched','afterReadback':{'businessGroup':displayBusinessGroup(_0x5782d7)}};}else!_0x55bdd0&&(_0x1ce7b9={'verified':!![],'status':_0x4f9e4f(0x19a),'afterReadback':{'businessGroup':displayBusinessGroup(_0x1e591c)}});const _0x334e13={'operation':_0x4f9e4f(0x1d8),'appCode':_0x10b002,'selector':{'code':_0x3786ca[_0x4f9e4f(0x1a0)]},'dataset':{'id':_0x3786ca['id'],'code':_0x3786ca['code'],'name':_0x3786ca[_0x4f9e4f(0x1c4)],'sourceType':_0x3786ca[_0x4f9e4f(0x1cf)]},'before':{'businessGroup':displayBusinessGroup(_0x1e591c)},'after':{'businessGroup':displayBusinessGroup(_0x5d2bcf)},'changed':_0x55bdd0,'dryRun':_0x1beb2c,'submitted':_0x55bdd0&&!_0x1beb2c,'backend':{'method':_0x73bf02[_0x4f9e4f(0x1ac)],'path':_0x73bf02[_0x4f9e4f(0x1bd)],'payload':_0x73bf02['payload']},..._0x1ce7b9?{'verification':_0x1ce7b9}:{},'warnings':[]};return{'ok':!![],'data':_0x334e13,'message':_0x55bdd0?_0x1beb2c?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x3786ca[_0x4f9e4f(0x1a0)]:_0x4f9e4f(0x1dc)+_0x3786ca['code']:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x3786ca[_0x4f9e4f(0x1a0)]};}function a66_0x3d4a(){const _0x293f88=['source','Expectation\x20mismatch\x20at\x20businessGroup','4578565ehBKdT','path','apiError','found','DB_TABLE','2gkOHju','isFinite','message','name','METADATA','validation','write','1610ToNdrK','appCode','string','4XYupSF','--code\x20is\x20required','dbId','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','sourceType','dataset','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','prototype','keys','7878003BLGNUd','business-group','tableName','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','update','parse','metadata','object','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','expectBusinessGroup','payload','isArray','datasetId','Update\x20business\x20scenario\x20group','4320EznJyp','unchanged','expect-business-group',',\x20actual\x20','str','68816UNmjfz','backend','code','trim','6IqTRfX','10097856RtYHtJ','/smartapi/dblink/updateTableBusinessGroup','36963hcUbHt','db-table','POST','dbLinkId','length','business-group-update','366254hgyrCu','method','number','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','dbtableConfig','dbTableSelector','businessGroup','stringify','Expected\x20','toUpperCase','value','3822339FPgEZQ','modelId','data'];a66_0x3d4a=function(){return _0x293f88;};return a66_0x3d4a();}export const datasetBusinessGroupUpdate={'service':a66_0x2cfdb3(0x1d0),'command':a66_0x2cfdb3(0x1aa),'description':a66_0x2cfdb3(0x198),'risk':a66_0x2cfdb3(0x1c7),'flags':[CODE_FLAG,{'name':a66_0x2cfdb3(0x1d5),'type':a66_0x2cfdb3(0x1ca),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':'expect-business-group','type':a66_0x2cfdb3(0x1ca),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x353503){validateInput(readBusinessGroupUpdateInput(_0x353503));},async 'dryRun'(_0x29e270){const _0x5242fa=a66_0x2cfdb3,_0x1fa6b7=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x29e270[_0x5242fa(0x1c9)],'input':readBusinessGroupUpdateInput(_0x29e270),'dryRun':!![]});return{'method':_0x1fa6b7['data']['backend'][_0x5242fa(0x1ac)],'url':_0x1fa6b7[_0x5242fa(0x1b9)]['backend']['path'],'body':_0x1fa6b7[_0x5242fa(0x1b9)][_0x5242fa(0x19f)][_0x5242fa(0x1de)],'description':_0x1fa6b7[_0x5242fa(0x1c3)],..._0x1fa6b7[_0x5242fa(0x1b9)]};},async 'execute'(_0x149c00){const _0x2f3596=a66_0x2cfdb3;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x149c00[_0x2f3596(0x1c9)],'input':readBusinessGroupUpdateInput(_0x149c00),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x13989a){const _0x60968a=a66_0x2cfdb3,_0x45b3f3=_0x13989a[_0x60968a(0x19d)](_0x60968a(0x19b));return{'code':trim(_0x13989a[_0x60968a(0x19d)](_0x60968a(0x1a0))),'businessGroup':_0x13989a[_0x60968a(0x19d)](_0x60968a(0x1d5)),'expectBusinessGroup':_0x45b3f3===undefined||_0x45b3f3===''?undefined:_0x45b3f3};}function validateInput(_0x507715){const _0x590728=a66_0x2cfdb3;if(!trim(_0x507715[_0x590728(0x1a0)]))throw CliErrors[_0x590728(0x1c6)](_0x590728(0x1cc));if(_0x507715[_0x590728(0x1b2)]===undefined)throw CliErrors[_0x590728(0x1c6)]('--business-group\x20is\x20required');if(!trim(_0x507715['businessGroup']))throw CliErrors[_0x590728(0x1c6)]('--business-group\x20must\x20not\x20be\x20blank');}function assertBusinessGroupUpdateSupported(_0x53d201,_0x51beac){const _0x506558=a66_0x2cfdb3;if(_0x53d201[_0x506558(0x1cf)]===_0x506558(0x1c0)&&!_0x51beac)throw CliErrors[_0x506558(0x1c6)](_0x506558(0x1d1));}function resolveBusinessGroupDataset(_0x173c20,_0x5e4c32){const _0x5d7028=a66_0x2cfdb3,_0xb4cea3=asPlainObject(_0x173c20['dataset']),_0x4f3d6c=asPlainObject(_0x173c20[_0x5d7028(0x1b0)]),_0x3ac89f=resolveSourceType(_0x173c20,_0xb4cea3,_0x4f3d6c),_0x280c8e=firstString(_0x173c20['modelCode'],_0x173c20[_0x5d7028(0x1a0)],_0xb4cea3['datasetCode'],_0x5e4c32)||_0x5e4c32;return{'id':firstNumber(_0x173c20[_0x5d7028(0x1b8)],_0x173c20['id'],_0xb4cea3[_0x5d7028(0x1e0)])??firstString(_0x173c20['modelId'],_0x173c20['id'],_0xb4cea3[_0x5d7028(0x1e0)])??null,'code':_0x280c8e,'name':firstString(_0x173c20['name'],_0xb4cea3['datasetName'],_0xb4cea3['name'])||null,'sourceType':_0x3ac89f,'dbTableSelector':_0x3ac89f===_0x5d7028(0x1c0)?{'dbLinkId':firstNumber(_0x4f3d6c[_0x5d7028(0x1cd)]),'tableName':firstString(_0x4f3d6c[_0x5d7028(0x1d6)])||null}:null};}function resolveSourceType(_0x1e01be,_0x14d101,_0x531ce2){const _0x36c45d=a66_0x2cfdb3,_0xe1b95=firstString(_0x1e01be[_0x36c45d(0x1ba)],_0x1e01be[_0x36c45d(0x1cf)],_0x14d101[_0x36c45d(0x1ba)],_0x14d101[_0x36c45d(0x1cf)])?.[_0x36c45d(0x1a1)]()[_0x36c45d(0x1b5)]();if(_0xe1b95==='DB_TABLE'||_0xe1b95===_0x36c45d(0x1c5))return _0xe1b95;if(Object[_0x36c45d(0x1d3)](_0x531ce2)[_0x36c45d(0x1a9)]>0x0)return'DB_TABLE';throw CliErrors[_0x36c45d(0x1c6)](_0x36c45d(0x1ae));}function loadCurrentBusinessGroup(_0x3020df,_0x3c2a7b){const _0xbe33ee=a66_0x2cfdb3,_0x3fb3c5=readBusinessGroupFromDatasetDetail(_0x3020df,_0x3c2a7b[_0xbe33ee(0x1cf)]);if(_0x3fb3c5[_0xbe33ee(0x1bf)])return normalizeBusinessGroup(_0x3fb3c5[_0xbe33ee(0x1b6)]);return'';}function readBusinessGroupFromDatasetDetail(_0x5e2a80,_0x1ae79b){const _0xf26be6=a66_0x2cfdb3,_0x2b03d8=asPlainObject(_0x5e2a80[_0xf26be6(0x1d0)]),_0x4a3a18=firstPresent(_0x5e2a80[_0xf26be6(0x1b2)]);if(_0x4a3a18[_0xf26be6(0x1bf)])return _0x4a3a18;const _0x430927=firstPresent(_0x2b03d8[_0xf26be6(0x1b2)]);if(_0x430927[_0xf26be6(0x1bf)])return _0x430927;if(_0x1ae79b===_0xf26be6(0x1c0))return{'found':![]};const _0x3d1d80=readBusinessGroupFromExtend(_0x5e2a80['extend']);if(_0x3d1d80[_0xf26be6(0x1bf)])return _0x3d1d80;return readBusinessGroupFromExtend(_0x2b03d8['extend']);}function readBusinessGroupFromExtend(_0x1470ed){const _0x28982c=a66_0x2cfdb3;if(_0x1470ed===undefined||_0x1470ed===null||_0x1470ed==='')return{'found':![]};if(typeof _0x1470ed===_0x28982c(0x1ca))try{const _0x3b4de3=JSON[_0x28982c(0x1d9)](_0x1470ed);return readBusinessGroupFromExtend(_0x3b4de3);}catch{return{'found':![]};}const _0x3fb090=asPlainObject(_0x1470ed);if(Object[_0x28982c(0x1d2)]['hasOwnProperty']['call'](_0x3fb090,'businessGroup'))return{'found':!![],'value':_0x3fb090[_0x28982c(0x1b2)]};return{'found':![]};}function firstPresent(..._0x436d13){for(const _0x378350 of _0x436d13){if(_0x378350!==undefined&&_0x378350!==null)return{'found':!![],'value':_0x378350};}return{'found':![]};}function assertExpectedBusinessGroup(_0x40d0a1,_0x26d380){const _0x5e0d33=a66_0x2cfdb3;if(_0x26d380===undefined)return;const _0x47cd74=normalizeBusinessGroupArgument(_0x26d380);if(_0x40d0a1!==_0x47cd74)throw CliErrors[_0x5e0d33(0x1c6)](_0x5e0d33(0x1bb),_0x5e0d33(0x1b4)+JSON[_0x5e0d33(0x1b3)](_0x47cd74)+',\x20actual\x20'+JSON[_0x5e0d33(0x1b3)](_0x40d0a1));}function buildBackendPlan(_0x58af8c,_0x3e4662,_0x3fec81){const _0x133002=a66_0x2cfdb3;if(_0x3e4662[_0x133002(0x1cf)]==='DB_TABLE'){if(!_0x3e4662[_0x133002(0x1b1)]||_0x3e4662[_0x133002(0x1b1)]['dbLinkId']===null||!_0x3e4662[_0x133002(0x1b1)][_0x133002(0x1d6)])throw CliErrors[_0x133002(0x1c6)](_0x133002(0x1d7),_0x133002(0x1af));return{'kind':_0x133002(0x1a6),'method':_0x133002(0x1a7),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x3e4662['dbTableSelector'][_0x133002(0x1a8)],'tableName':_0x3e4662[_0x133002(0x1b1)][_0x133002(0x1d6)],'businessGroup':_0x3fec81}};}return{'kind':_0x133002(0x1da),'method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x58af8c,'datasetCode':_0x3e4662['code'],'businessGroup':_0x3fec81}};}function normalizeBusinessGroup(_0x372276){const _0x2c90a0=a66_0x2cfdb3;if(_0x372276===undefined||_0x372276===null)return'';return String(_0x372276)[_0x2c90a0(0x1a1)]();}function a66_0x40af(_0x33c7a2,_0x1a3b89){_0x33c7a2=_0x33c7a2-0x198;const _0x3d4afc=a66_0x3d4a();let _0x40af18=_0x3d4afc[_0x33c7a2];return _0x40af18;}function normalizeBusinessGroupArgument(_0xdcb498){const _0x369acd=normalizeBusinessGroup(_0xdcb498);return _0x369acd===UNGROUPED_BUSINESS_GROUP?'':_0x369acd;}function displayBusinessGroup(_0x350a35){return _0x350a35||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x1bc1f0){const _0x98aec7=a66_0x2cfdb3;if(!_0x1bc1f0||typeof _0x1bc1f0!==_0x98aec7(0x1db)||Array[_0x98aec7(0x1df)](_0x1bc1f0))return{};return _0x1bc1f0;}function firstString(..._0x4c821d){const _0x4926e9=a66_0x2cfdb3;for(const _0x33272c of _0x4c821d){if(typeof _0x33272c===_0x4926e9(0x1ca)&&_0x33272c[_0x4926e9(0x1a1)]())return _0x33272c['trim']();if(typeof _0x33272c===_0x4926e9(0x1ad)&&Number[_0x4926e9(0x1c2)](_0x33272c))return String(_0x33272c);}return undefined;}function firstNumber(..._0x21b8b0){const _0x4e02cb=a66_0x2cfdb3;for(const _0x3ea116 of _0x21b8b0){if(typeof _0x3ea116===_0x4e02cb(0x1ad)&&Number[_0x4e02cb(0x1c2)](_0x3ea116))return _0x3ea116;if(typeof _0x3ea116===_0x4e02cb(0x1ca)&&_0x3ea116[_0x4e02cb(0x1a1)]()&&Number[_0x4e02cb(0x1c2)](Number(_0x3ea116)))return Number(_0x3ea116);}return null;}function trim(_0x54fdbe){return String(_0x54fdbe||'')['trim']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a67_0x3168a7=a67_0x31fb;(function(_0x362582,_0x243aa7){const _0x55adf6=a67_0x31fb,_0x12f86f=_0x362582();while(!![]){try{const _0x5bad36=-parseInt(_0x55adf6(0x1fb))/0x1*(-parseInt(_0x55adf6(0x1fe))/0x2)+-parseInt(_0x55adf6(0x1f9))/0x3*(parseInt(_0x55adf6(0x1ff))/0x4)+-parseInt(_0x55adf6(0x203))/0x5+parseInt(_0x55adf6(0x1f4))/0x6+-parseInt(_0x55adf6(0x1fc))/0x7+parseInt(_0x55adf6(0x207))/0x8+-parseInt(_0x55adf6(0x204))/0x9*(-parseInt(_0x55adf6(0x1f8))/0xa);if(_0x5bad36===_0x243aa7)break;else _0x12f86f['push'](_0x12f86f['shift']());}catch(_0x5bc22b){_0x12f86f['push'](_0x12f86f['shift']());}}}(a67_0x57cd,0x5c564));function a67_0x57cd(){const _0x184167=['3447752MevfAM','ungrouped','10ttZuPe','8Ffqojr','groups','length','DB_TABLE','2896885oxztre','666KrkDxO','map','business-groups','3677456jUmoQI','businessGroup','trim','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','dbid','number','561540MHuCnL','read','appCode','num','87370XWOdeH','475395wFHuPd','\x20business\x20group(s)\x20for\x20database\x20connection\x20','113449KwWBlP'];a67_0x57cd=function(){return _0x184167;};return a67_0x57cd();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a67_0x31fb(_0x1c24ac,_0x846c9e){_0x1c24ac=_0x1c24ac-0x1f0;const _0x57cdf1=a67_0x57cd();let _0x31fb78=_0x57cdf1[_0x1c24ac];return _0x31fb78;}import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':'dataset','command':a67_0x3168a7(0x206),'description':a67_0x3168a7(0x1f1),'risk':a67_0x3168a7(0x1f5),'flags':[{'name':'dbid','type':a67_0x3168a7(0x1f3),'required':!![],'description':a67_0x3168a7(0x1f0)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2da0c7){const _0x3793b5=a67_0x3168a7,_0x37d6b4=_0x2da0c7[_0x3793b5(0x1f7)](_0x3793b5(0x1f2)),_0x2b2bb5=await getErBusinessGroupSummary(_0x2da0c7[_0x3793b5(0x1f6)],_0x37d6b4),_0x40866c=_0x2b2bb5[_0x3793b5(0x200)][_0x3793b5(0x205)](_0x52e5fd=>({..._0x52e5fd,'businessGroup':_0x52e5fd[_0x3793b5(0x208)][_0x3793b5(0x209)]()||_0x3793b5(0x1fd)}));return{'ok':!![],'data':{..._0x2b2bb5,'groups':_0x40866c,'scope':_0x3793b5(0x202)},'message':'Found\x20'+_0x40866c[_0x3793b5(0x201)]+_0x3793b5(0x1fa)+_0x37d6b4};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x18d83d=a68_0x10ec;(function(_0x11fc1a,_0x238840){const _0x19a18=a68_0x10ec,_0x2f7304=_0x11fc1a();while(!![]){try{const _0x228107=parseInt(_0x19a18(0xd8))/0x1*(-parseInt(_0x19a18(0xdb))/0x2)+parseInt(_0x19a18(0xeb))/0x3+-parseInt(_0x19a18(0xd4))/0x4*(parseInt(_0x19a18(0xf6))/0x5)+-parseInt(_0x19a18(0xd7))/0x6+-parseInt(_0x19a18(0xf4))/0x7*(parseInt(_0x19a18(0xe8))/0x8)+-parseInt(_0x19a18(0xf3))/0x9+parseInt(_0x19a18(0xe1))/0xa*(parseInt(_0x19a18(0xf7))/0xb);if(_0x228107===_0x238840)break;else _0x2f7304['push'](_0x2f7304['shift']());}catch(_0x5646d3){_0x2f7304['push'](_0x2f7304['shift']());}}}(a68_0x4c54,0xef9a5));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a68_0x18d83d(0xf2),'getOne':a68_0x18d83d(0xe9)};export const RUNTIME_DATA_ACCESS_SUMMARY=a68_0x18d83d(0xda);function valueToString(_0x516958){const _0x180f69=a68_0x18d83d;return _0x516958==null?'':String(_0x516958)[_0x180f69(0xde)]();}function getDatasetCode(_0x4c0abd){const _0x45a296=a68_0x18d83d;return valueToString(_0x4c0abd[_0x45a296(0xf9)]??_0x4c0abd[_0x45a296(0xf1)]??_0x4c0abd[_0x45a296(0xef)]?.[_0x45a296(0xe7)]);}function getDatasetName(_0x31edf6){const _0x5782f6=a68_0x18d83d;return valueToString(_0x31edf6[_0x5782f6(0xf8)]??_0x31edf6[_0x5782f6(0xef)]?.[_0x5782f6(0xea)])||_0x5782f6(0xdf);}function getDatasetSource(_0x363143){const _0x40df45=a68_0x18d83d;return valueToString(_0x363143[_0x40df45(0xdc)]??_0x363143[_0x40df45(0xef)]?.[_0x40df45(0xd9)])[_0x40df45(0xd5)]();}function getDbtableConfig(_0x186170){const _0x1bcb41=a68_0x18d83d,_0x19ea01=_0x186170[_0x1bcb41(0xfa)]??_0x186170['dbtable'];return _0x19ea01&&typeof _0x19ea01===_0x1bcb41(0xe5)?_0x19ea01:{};}function a68_0x4c54(){const _0x3370c7=['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','10624572PeXDId','7xejTCC','dbId','3614075FWySeQ','1056bJaJpI','name','code','dbtableConfig','UNKNOWN','8EmoQtU','toUpperCase','METADATA','5371560exSGQI','153OhXtlW','sourceType','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','8226zrgcVB','source','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','trim','unknown','The\x20current\x20dataset\x20\x22','592260ujdKFS','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','getOne','filter','object','tableName','datasetCode','6998816knxVlJ','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','datasetName','963768iULEUu','SQL\x20schema\x20validation','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','\x20is\x20','dataset','join','modelCode'];a68_0x4c54=function(){return _0x3370c7;};return a68_0x4c54();}export function isDbTableBackedDataset(_0x205955){const _0x1237e2=a68_0x18d83d,_0x57fc55=getDatasetSource(_0x205955);if(_0x57fc55===_0x1237e2(0xd6))return![];const _0x36891d=getDbtableConfig(_0x205955),_0x4a973f=_0x36891d[_0x1237e2(0xf5)]??_0x36891d['id'],_0x28c649=valueToString(_0x36891d[_0x1237e2(0xe6)]??_0x205955['tableName']??_0x205955['dataset']?.[_0x1237e2(0xe6)]);return _0x4a973f!==undefined&&_0x4a973f!==null&&_0x28c649['length']>0x0;}export function filterDbTableBackedDatasets(_0x2bcf35){const _0x15bb9e=a68_0x18d83d;return _0x2bcf35[_0x15bb9e(0xe4)](_0x2e0e2a=>isDbTableBackedDataset(_0x2e0e2a));}function a68_0x10ec(_0x11ba73,_0x16baa7){_0x11ba73=_0x11ba73-0xd4;const _0x4c54a1=a68_0x4c54();let _0x10ecfe=_0x4c54a1[_0x11ba73];return _0x10ecfe;}export function buildDbTableBackedRequirementMessage(_0x358a39,_0x24747e=a68_0x18d83d(0xec)){const _0x3439c9=a68_0x18d83d,_0x2949ce=getDatasetSource(_0x358a39)||_0x3439c9(0xfb),_0x37a41d=getDatasetName(_0x358a39),_0x14e197=getDatasetCode(_0x358a39),_0x330407=_0x14e197?'\x20('+_0x14e197+')':'';return[_0x3439c9(0xe0)+_0x37a41d+'\x22'+_0x330407+_0x3439c9(0xee)+_0x2949ce+_0x3439c9(0xed)+_0x24747e+'.',_0x3439c9(0xdd),'Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.',_0x3439c9(0xe2)+RUNTIME_DATA_ACCESS_COMMANDS[_0x3439c9(0xe4)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x3439c9(0xe3)]+'.'][_0x3439c9(0xf0)]('\x20');}export function assertDatasetIsDbTableBacked(_0x1c774f,_0x39de14){if(!isDbTableBackedDataset(_0x1c774f))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x1c774f,_0x39de14));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x48d26f=a69_0x2e24;(function(_0x367c32,_0x4ff17){const _0x3686bf=a69_0x2e24,_0x38b016=_0x367c32();while(!![]){try{const _0xeff5e9=parseInt(_0x3686bf(0xc2))/0x1*(-parseInt(_0x3686bf(0xc9))/0x2)+-parseInt(_0x3686bf(0xc1))/0x3+-parseInt(_0x3686bf(0xca))/0x4+-parseInt(_0x3686bf(0xbf))/0x5*(parseInt(_0x3686bf(0xc0))/0x6)+-parseInt(_0x3686bf(0xc7))/0x7+-parseInt(_0x3686bf(0xc4))/0x8+parseInt(_0x3686bf(0xc6))/0x9;if(_0xeff5e9===_0x4ff17)break;else _0x38b016['push'](_0x38b016['shift']());}catch(_0x534e0c){_0x38b016['push'](_0x38b016['shift']());}}}(a69_0x85ea,0x7441c));function a69_0x2e24(_0x59e6db,_0x58bb5b){_0x59e6db=_0x59e6db-0xbf;const _0x85ea8f=a69_0x85ea();let _0x2e2421=_0x85ea8f[_0x59e6db];return _0x2e2421;}import{createCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';function a69_0x85ea(){const _0xf64887=['create','5037888sDcrxi','dataset','23048316yFVfcd','4868206GdmBdd','write','1086296LlvkFf','22672qsmOjP','15kztVxU','308946HvqDqM','168759bMAGKH','1OYgEty'];a69_0x85ea=function(){return _0xf64887;};return a69_0x85ea();}export const datasetCrossRelationCreate={'service':a69_0x48d26f(0xc5),'command':'cross-relation-create','description':'Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','risk':a69_0x48d26f(0xc8),'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 _0x5d4887=>validateCrossRelation(_0x5d4887,a69_0x48d26f(0xc3)),'dryRun':_0x48404e=>previewCrossRelation(_0x48404e,a69_0x48d26f(0xc3)),'execute':_0x4df82a=>executeCrossRelation(_0x4df82a,a69_0x48d26f(0xc3),createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x33d8e6=a70_0x2350;(function(_0x463808,_0x232d3e){const _0x4a95c2=a70_0x2350,_0x450529=_0x463808();while(!![]){try{const _0x28230d=-parseInt(_0x4a95c2(0x13d))/0x1*(-parseInt(_0x4a95c2(0x144))/0x2)+-parseInt(_0x4a95c2(0x140))/0x3*(parseInt(_0x4a95c2(0x14c))/0x4)+-parseInt(_0x4a95c2(0x13e))/0x5*(-parseInt(_0x4a95c2(0x145))/0x6)+parseInt(_0x4a95c2(0x13f))/0x7*(-parseInt(_0x4a95c2(0x148))/0x8)+parseInt(_0x4a95c2(0x14d))/0x9*(parseInt(_0x4a95c2(0x14a))/0xa)+parseInt(_0x4a95c2(0x147))/0xb*(-parseInt(_0x4a95c2(0x14b))/0xc)+parseInt(_0x4a95c2(0x143))/0xd;if(_0x28230d===_0x232d3e)break;else _0x450529['push'](_0x450529['shift']());}catch(_0x480268){_0x450529['push'](_0x450529['shift']());}}}(a70_0x3b06,0xbd959));function a70_0x2350(_0x63b7a5,_0x51d0ca){_0x63b7a5=_0x63b7a5-0x13d;const _0x3b06b5=a70_0x3b06();let _0x235069=_0x3b06b5[_0x63b7a5];return _0x235069;}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_0x3b06(){const _0x37d883=['3163659TnXMVj','Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','delete','16192228LkWhdD','506378fpPzrG','4281078IWBKWd','high-risk-write','363ykSNwh','10202952kBSndr','dataset','3170iBxEEW','331572pjpYGs','4DBtoCg','16641LCoEib','3USHopr','10zGMTOT','7RrCoAN'];a70_0x3b06=function(){return _0x37d883;};return a70_0x3b06();}export const datasetCrossRelationDelete={'service':a70_0x33d8e6(0x149),'command':'cross-relation-delete','description':a70_0x33d8e6(0x141),'risk':a70_0x33d8e6(0x146),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x2818c5=>validateCrossRelation(_0x2818c5,'delete'),'dryRun':_0x4937b2=>previewCrossRelation(_0x4937b2,a70_0x33d8e6(0x142)),'execute':_0x16a244=>executeCrossRelation(_0x16a244,a70_0x33d8e6(0x142),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x221895=a71_0xeb74;(function(_0x336fb9,_0x21f9f6){const _0x4df136=a71_0xeb74,_0x205b51=_0x336fb9();while(!![]){try{const _0x54cf58=parseInt(_0x4df136(0xee))/0x1+parseInt(_0x4df136(0xf1))/0x2*(-parseInt(_0x4df136(0xf6))/0x3)+-parseInt(_0x4df136(0xfa))/0x4+-parseInt(_0x4df136(0xfc))/0x5*(-parseInt(_0x4df136(0xf9))/0x6)+parseInt(_0x4df136(0xf2))/0x7*(parseInt(_0x4df136(0xfe))/0x8)+-parseInt(_0x4df136(0xf5))/0x9*(-parseInt(_0x4df136(0xf7))/0xa)+-parseInt(_0x4df136(0xf3))/0xb;if(_0x54cf58===_0x21f9f6)break;else _0x205b51['push'](_0x205b51['shift']());}catch(_0x323b04){_0x205b51['push'](_0x205b51['shift']());}}}(a71_0x3dca,0x9997c));import{queryCrossDbRelations}from'../../core/api-client.js';function a71_0x3dca(){const _0xcab4ac=['4470976UgVVbQ','\x20relation(s)','5114995LIcRaX','length','8XmurRP','cross-relation-list','851833kBlKlH','map','appCode','1632UZSvXg','4315241QnebnT','13029148NNytRI','list','3177QklELb','813TvzcdK','18730OOKOfP','Cross-database\x20relations:\x20','6pedpBf'];a71_0x3dca=function(){return _0xcab4ac;};return a71_0x3dca();}function a71_0xeb74(_0x3b567f,_0x567366){_0x3b567f=_0x3b567f-0xee;const _0x3dca13=a71_0x3dca();let _0xeb74e8=_0x3dca13[_0x3b567f];return _0xeb74e8;}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':a71_0x221895(0xff),'description':'List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','risk':'read','strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[{...CROSS_RELATION_FROM_DATASET_FLAG,'required':![]},CROSS_RELATION_DBLINK_FLAG,{...CROSS_RELATION_FROM_COLUMN_FLAG,'required':![]},APPCODE_FLAG_OPTIONAL],'validate':async _0x38cee8=>validateCrossRelation(_0x38cee8,a71_0x221895(0xf4)),async 'execute'(_0x293dad){const _0x53a31d=a71_0x221895,_0x4c481b=await resolveCrossRelationQuery(_0x293dad),_0x45e6a9=await queryCrossDbRelations(_0x4c481b);return{'ok':!![],'data':{'appCode':_0x293dad[_0x53a31d(0xf0)],'selector':_0x4c481b,'total':_0x45e6a9[_0x53a31d(0xfd)],'relations':_0x45e6a9[_0x53a31d(0xef)](projectCrossRelation)},'message':_0x53a31d(0xf8)+_0x45e6a9['length']+_0x53a31d(0xfb)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a72_0xa2c321=a72_0x14fc;(function(_0x1784ac,_0x1ba4eb){const _0x4e0f3f=a72_0x14fc,_0x500ae8=_0x1784ac();while(!![]){try{const _0x1c577f=parseInt(_0x4e0f3f(0x80))/0x1*(-parseInt(_0x4e0f3f(0x91))/0x2)+-parseInt(_0x4e0f3f(0x7c))/0x3*(-parseInt(_0x4e0f3f(0x84))/0x4)+-parseInt(_0x4e0f3f(0x95))/0x5+parseInt(_0x4e0f3f(0x97))/0x6+-parseInt(_0x4e0f3f(0x8b))/0x7+-parseInt(_0x4e0f3f(0x8c))/0x8*(-parseInt(_0x4e0f3f(0x73))/0x9)+-parseInt(_0x4e0f3f(0x8f))/0xa*(-parseInt(_0x4e0f3f(0x86))/0xb);if(_0x1c577f===_0x1ba4eb)break;else _0x500ae8['push'](_0x500ae8['shift']());}catch(_0x27533d){_0x500ae8['push'](_0x500ae8['shift']());}}}(a72_0x507a,0x971ec));function a72_0x507a(){const _0x1ccead=['Dataset\x20','2YveZJL','toDblinkId','toTableName','filter','3417735VszUdg','extend','1678626dkMjgQ','from','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','cardinality','delete','before','relationId','expectedCardinality','flag','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Would\x20','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','datasetCode','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','Cross-database\x20relation\x20','from-datasetcode','toField','list','apiError','from-dblink-id','fromDatasetCode','appCode','multiple\x20cross-database\x20relations\x20matched','length','dbtable','matched','dbId','string','dbtableConfig','DB_TABLE','to-label-column','label_inherited','validation','Invalid\x20--cardinality.','to-column','fromTableName','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','fromField','catch','update','trim','refTableLabelName','includes','\x20write\x20was\x20not\x20verified.','map','POST','flagMissing','dblinkId','1154313gTGzke','storageProfile','toLowerCase','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','some','tableName','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','sourceType','table','154533WjOeqy','defineProperty','fromDatasetName','from-column','990536lIrjQj','to-datasetcode','relationType','isSafeInteger','20qyTWSh','expectedLabel','22782089AkwoZF','body','data','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','toDatasetName','5798674okdneo','32eKtWji','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','str','10zGqSPM'];a72_0x507a=function(){return _0x1ccead;};return a72_0x507a();}import{getDatasetDetail,queryCrossDbRelations}from'../../core/api-client.js';import{CROSS_DB_RELATION_PATHS}from'../../core/cross-db-relation.js';function a72_0x14fc(_0xc28cda,_0x51ca1f){_0xc28cda=_0xc28cda-0x6e;const _0x507a3d=a72_0x507a();let _0x14fc62=_0x507a3d[_0xc28cda];return _0x14fc62;}import{CliError,CliErrors}from'../../errors.js';import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0x1b91de,_0x41fd84){const _0x3a6e92=a72_0x14fc,_0x1167b9=_0x1b91de[_0x3a6e92(0x8e)](_0x41fd84)[_0x3a6e92(0xc0)]();if(!_0x1167b9)throw CliErrors[_0x3a6e92(0x71)](_0x41fd84);return _0x1167b9;}function explicitDblink(_0x278fc){const _0x5b207e=a72_0x14fc,_0x441462=_0x278fc[_0x5b207e(0x9f)](_0x5b207e(0xab));if(_0x441462===undefined||_0x441462===null)return undefined;const _0x121dda=Number(_0x441462);if(!Number[_0x5b207e(0x83)](_0x121dda)||_0x121dda<=0x0)throw CliErrors[_0x5b207e(0xb8)](_0x5b207e(0xa0));return _0x121dda;}export function validateCrossRelation(_0x16e8f2,_0x2b563e){const _0x588202=a72_0x14fc,_0x85bf39=explicitDblink(_0x16e8f2);if(_0x2b563e===_0x588202(0xa9)){if(!_0x16e8f2[_0x588202(0x8e)](_0x588202(0xa7))[_0x588202(0xc0)]()&&_0x85bf39===undefined)throw CliErrors[_0x588202(0xb8)](_0x588202(0x76));return;}required(_0x16e8f2,_0x588202(0xa7)),required(_0x16e8f2,'from-column');if(_0x2b563e!==_0x588202(0x9b)){required(_0x16e8f2,_0x588202(0x81)),required(_0x16e8f2,_0x588202(0xba));const _0x40d348=_0x16e8f2[_0x588202(0x8e)](_0x588202(0x9a))[_0x588202(0xc0)]();if(_0x40d348&&!CROSS_RELATION_CARDINALITY_FLAG['enum'][_0x588202(0xc2)](_0x40d348))throw CliErrors['validation'](_0x588202(0xb9));}}async function resolveEndpoint(_0x16e0d0){const _0x19801a=a72_0x14fc,_0x3d7f8e=await getDatasetDetail(_0x16e0d0),_0x3ea0a2=_0x3d7f8e?.['dataset']??{};if((_0x3d7f8e?.['source']??_0x3ea0a2[_0x19801a(0x7a)])!==_0x19801a(0xb5))throw CliErrors[_0x19801a(0xb8)](_0x19801a(0x90)+_0x16e0d0+'\x20must\x20be\x20a\x20DB_TABLE\x20dataset.');const _0x5297cf=_0x3d7f8e[_0x19801a(0xb4)]??_0x3d7f8e[_0x19801a(0xb0)]??{};let _0x2ce16b=_0x3d7f8e['extend']??_0x3ea0a2[_0x19801a(0x96)]??{};if(typeof _0x2ce16b===_0x19801a(0xb3))try{_0x2ce16b=_0x2ce16b[_0x19801a(0xc0)]()?JSON['parse'](_0x2ce16b):{};}catch{throw CliErrors[_0x19801a(0xb8)](_0x19801a(0x90)+_0x16e0d0+'\x20has\x20invalid\x20storage\x20configuration.');}const _0x225d81=Number(_0x2ce16b?.['storageProfile']?.[_0x19801a(0xb2)]??_0x3d7f8e[_0x19801a(0x74)]?.[_0x19801a(0xb2)]??_0x3ea0a2['storageProfile']?.[_0x19801a(0xb2)]??_0x5297cf['dbId']??_0x3ea0a2[_0x19801a(0xb2)]??_0x3d7f8e[_0x19801a(0xb2)]),_0x1fc37a=String(_0x3d7f8e[_0x19801a(0x78)]??_0x3ea0a2[_0x19801a(0x78)]??_0x5297cf[_0x19801a(0x78)]??'')[_0x19801a(0xc0)]();if(!Number[_0x19801a(0x83)](_0x225d81)||_0x225d81<=0x0||!_0x1fc37a)throw CliErrors[_0x19801a(0xb8)](_0x19801a(0x90)+_0x16e0d0+'\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.');return{'datasetCode':_0x16e0d0,'dblinkId':_0x225d81,'table':_0x1fc37a};}export async function resolveCrossRelationQuery(_0x2ba8a6){const _0x4f5e41=a72_0x14fc,_0xde3ab6=_0x2ba8a6['str'](_0x4f5e41(0xa7))['trim'](),_0x15529c=explicitDblink(_0x2ba8a6),_0x13b560=_0xde3ab6?await resolveEndpoint(_0xde3ab6):undefined;if(_0x13b560&&_0x15529c!==undefined&&_0x13b560['dblinkId']!==_0x15529c)throw CliErrors['validation'](_0x4f5e41(0xbc));const _0x389942=_0x13b560?.[_0x4f5e41(0x72)]??_0x15529c;if(_0x389942===undefined)throw CliErrors['validation'](_0x4f5e41(0x76));return{'appCode':_0x2ba8a6[_0x4f5e41(0xad)],'fromDblinkId':_0x389942,..._0xde3ab6?{'fromDatasetCode':_0xde3ab6}:{},..._0x2ba8a6[_0x4f5e41(0x8e)](_0x4f5e41(0x7f))[_0x4f5e41(0xc0)]()?{'fromField':_0x2ba8a6[_0x4f5e41(0x8e)]('from-column')[_0x4f5e41(0xc0)]()}:{}};}export function projectCrossRelation(_0x5dcfed){const _0x5c9757=a72_0x14fc;return{'relationId':_0x5dcfed[_0x5c9757(0x9d)],'from':{'source':_0x5c9757(0xb5),'datasetCode':_0x5dcfed['fromDatasetCode'],'datasetName':_0x5dcfed[_0x5c9757(0x7e)],'dblinkId':_0x5dcfed['fromDblinkId'],'table':_0x5dcfed[_0x5c9757(0xbb)],'field':_0x5dcfed[_0x5c9757(0xbd)]},'to':{'source':_0x5c9757(0xb5),'datasetCode':_0x5dcfed['toDatasetCode'],'datasetName':_0x5dcfed[_0x5c9757(0x8a)],'dblinkId':_0x5dcfed['toDblinkId'],'table':_0x5dcfed[_0x5c9757(0x93)],'field':_0x5dcfed[_0x5c9757(0xa8)],'labelField':_0x5dcfed['refTableLabelName']},'relation':{'cardinality':_0x5dcfed[_0x5c9757(0x9a)],'relationType':_0x5dcfed['relationType']}};}function ambiguity(_0x39b757){const _0x1e3352=a72_0x14fc,_0x265607=CliErrors['validation'](_0x1e3352(0x79),_0x1e3352(0x8d));return Object['defineProperty'](_0x265607,_0x1e3352(0x88),{'value':{'candidates':_0x39b757[_0x1e3352(0x6f)](projectCrossRelation)}}),_0x265607;}const sameName=(_0x21ffb4,_0x26c678)=>_0x21ffb4[a72_0xa2c321(0x75)]()===_0x26c678[a72_0xa2c321(0x75)]();function matchesEndpoint(_0xac94b9,_0x2a7ea9,_0x44cfbc,_0x2695db,_0x30161a){const _0xd2ed8c=a72_0xa2c321;return _0xac94b9['fromDblinkId']===_0x2a7ea9[_0xd2ed8c(0x72)]&&sameName(_0xac94b9[_0xd2ed8c(0xbb)],_0x2a7ea9[_0xd2ed8c(0x7b)])&&sameName(_0xac94b9[_0xd2ed8c(0xbd)],_0x44cfbc)&&_0xac94b9[_0xd2ed8c(0x92)]===_0x2695db[_0xd2ed8c(0x72)]&&sameName(_0xac94b9['toTableName'],_0x2695db[_0xd2ed8c(0x7b)])&&sameName(_0xac94b9[_0xd2ed8c(0xa8)],_0x30161a);}export async function prepareCrossRelation(_0x46daf8,_0x2699e2){const _0x305820=a72_0xa2c321,_0x2bfdf1=await resolveEndpoint(required(_0x46daf8,_0x305820(0xa7))),_0x2ffc35=explicitDblink(_0x46daf8);if(_0x2ffc35!==undefined&&_0x2bfdf1[_0x305820(0x72)]!==_0x2ffc35)throw CliErrors[_0x305820(0xb8)](_0x305820(0xbc));const _0x4f1d5b={'appCode':_0x46daf8['appCode'],'fromDatasetCode':_0x2bfdf1[_0x305820(0xa4)],'fromField':required(_0x46daf8,_0x305820(0x7f)),..._0x2ffc35!==undefined?{'fromDblinkId':_0x2ffc35}:{}},_0x41f3d8={'appCode':_0x46daf8['appCode'],'fromDblinkId':_0x2bfdf1[_0x305820(0x72)],'fromDatasetCode':_0x2bfdf1['datasetCode'],'fromField':_0x4f1d5b[_0x305820(0xbd)]},_0x38ae8c=await queryCrossDbRelations(_0x41f3d8);let _0x939528=null;if(_0x2699e2!=='create'){if(_0x38ae8c[_0x305820(0xaf)]>0x1)throw ambiguity(_0x38ae8c);_0x939528=_0x38ae8c[0x0]??null;if(!_0x939528)throw CliErrors[_0x305820(0xb8)](_0x305820(0xa2));}if(_0x2699e2===_0x305820(0x9b))return{'operation':_0x2699e2,'from':_0x2bfdf1,'query':_0x41f3d8,'body':_0x4f1d5b,'before':_0x939528};const _0x543223=await resolveEndpoint(required(_0x46daf8,_0x305820(0x81)));if(_0x2bfdf1['dblinkId']===_0x543223[_0x305820(0x72)])throw CliErrors[_0x305820(0xb8)](_0x305820(0xa3));const _0xd10d9=_0x46daf8['str'](_0x305820(0xb6))[_0x305820(0xc0)](),_0x4b54f8=_0x46daf8['str'](_0x305820(0x9a))[_0x305820(0xc0)](),_0x34a01d={..._0x4f1d5b,'toDatasetCode':_0x543223[_0x305820(0xa4)],'toField':required(_0x46daf8,_0x305820(0xba)),..._0xd10d9?{'refTableLabelName':_0xd10d9}:{},..._0x4b54f8?{'cardinality':_0x4b54f8}:{}};if(_0x38ae8c['some'](_0x1396ef=>_0x1396ef[_0x305820(0x9d)]!==_0x939528?.['relationId']&&matchesEndpoint(_0x1396ef,_0x2bfdf1,_0x34a01d['fromField'],_0x543223,_0x34a01d[_0x305820(0xa8)])))throw CliErrors[_0x305820(0xb8)](_0x305820(0xa5));return{'operation':_0x2699e2,'from':_0x2bfdf1,'to':_0x543223,'query':_0x41f3d8,'body':_0x34a01d,'before':_0x939528,'expectedLabel':_0xd10d9||_0x939528?.[_0x305820(0xc1)]||_0x34a01d[_0x305820(0xa8)],'expectedCardinality':_0x4b54f8||_0x939528?.[_0x305820(0x9a)]||null};}function mutationData(_0x3ee5bb,_0x5e76ce,_0x3ad0b0){const _0x39cb8e=a72_0xa2c321,{operation:_0x404e83,body:_0x121c92,before:_0x13973a}=_0x3ee5bb;return{'operation':_0x404e83,'selector':{'appCode':_0x121c92['appCode'],'from':{'datasetCode':_0x121c92['fromDatasetCode'],'field':_0x121c92[_0x39cb8e(0xbd)],'dblinkId':_0x3ee5bb[_0x39cb8e(0x98)][_0x39cb8e(0x72)]}},'before':_0x13973a?projectCrossRelation(_0x13973a):null,'after':_0x3ad0b0,'dryRun':_0x5e76ce,'backend':{'method':'POST','path':CROSS_DB_RELATION_PATHS[_0x404e83]},'warnings':_0x404e83===_0x39cb8e(0xbf)&&!_0x121c92[_0x39cb8e(0xc1)]?[{'code':_0x39cb8e(0xb7),'message':_0x39cb8e(0x99)}]:[]};}export async function previewCrossRelation(_0x1f3ec9,_0x36a3eb){const _0x48fe8a=a72_0xa2c321,_0x1e265f=await prepareCrossRelation(_0x1f3ec9,_0x36a3eb),_0x4c8805=_0x1e265f[_0x48fe8a(0x87)],_0x2398e6=_0x36a3eb===_0x48fe8a(0x9b)?null:{..._0x1e265f[_0x48fe8a(0x9c)]?{'relationId':_0x1e265f[_0x48fe8a(0x9c)][_0x48fe8a(0x9d)]}:{},'from':{'datasetCode':_0x1e265f[_0x48fe8a(0x98)]['datasetCode'],'dblinkId':_0x1e265f[_0x48fe8a(0x98)][_0x48fe8a(0x72)],'table':_0x1e265f[_0x48fe8a(0x98)][_0x48fe8a(0x7b)],'field':_0x4c8805[_0x48fe8a(0xbd)]},'to':{'datasetCode':_0x1e265f['to']['datasetCode'],'dblinkId':_0x1e265f['to'][_0x48fe8a(0x72)],'table':_0x1e265f['to'][_0x48fe8a(0x7b)],'field':_0x4c8805[_0x48fe8a(0xa8)],'labelField':_0x1e265f['expectedLabel']},'relation':{'cardinality':_0x1e265f[_0x48fe8a(0x9e)],'relationType':0x2}};return{...mutationData(_0x1e265f,!![],null),'after':_0x2398e6,'method':_0x48fe8a(0x70),'url':CROSS_DB_RELATION_PATHS[_0x36a3eb],'body':_0x1e265f[_0x48fe8a(0x87)],'description':_0x48fe8a(0xa1)+_0x36a3eb+'\x20a\x20cross-database\x20relation\x20for\x20'+_0x4c8805[_0x48fe8a(0xac)]+'.'+_0x4c8805[_0x48fe8a(0xbd)]};}export async function executeCrossRelation(_0x372093,_0x103122,_0x46c8b7){const _0x382a05=a72_0xa2c321,_0x31922a=await prepareCrossRelation(_0x372093,_0x103122);try{await _0x46c8b7(_0x31922a[_0x382a05(0x87)]);}catch(_0x16d428){if(_0x16d428 instanceof CliError&&_0x16d428['message'][_0x382a05(0xc2)](_0x382a05(0xae))){const _0x10d460=await queryCrossDbRelations(_0x31922a['query'])[_0x382a05(0xbe)](()=>[]);throw ambiguity(_0x10d460);}throw _0x16d428;}let _0x1497e5=[],_0x47ab6b,_0x5b79c8=![];try{_0x1497e5=await queryCrossDbRelations(_0x31922a['query']);if(_0x103122===_0x382a05(0x9b))_0x5b79c8=!_0x1497e5[_0x382a05(0x77)](_0x8d63f9=>_0x8d63f9['relationId']===_0x31922a[_0x382a05(0x9c)][_0x382a05(0x9d)]);else{const _0x4761d0=_0x31922a['body'],_0xd86dfc=_0x1497e5[_0x382a05(0x94)](_0x11a5e8=>matchesEndpoint(_0x11a5e8,_0x31922a[_0x382a05(0x98)],_0x4761d0[_0x382a05(0xbd)],_0x31922a['to'],_0x4761d0['toField'])&&(_0x103122==='create'||_0x11a5e8[_0x382a05(0x9d)]===_0x31922a[_0x382a05(0x9c)][_0x382a05(0x9d)]));_0x47ab6b=_0xd86dfc[_0x382a05(0xaf)]===0x1?_0xd86dfc[0x0]:undefined,_0x5b79c8=!!_0x47ab6b&&_0x47ab6b['refTableLabelName']===_0x31922a[_0x382a05(0x85)]&&_0x47ab6b[_0x382a05(0x9a)]===_0x31922a['expectedCardinality']&&_0x47ab6b[_0x382a05(0x82)]===0x2;}}catch{}const _0xb28cc8={...mutationData(_0x31922a,![],_0x47ab6b?projectCrossRelation(_0x47ab6b):null),'verification':{'status':_0x5b79c8?_0x382a05(0xb1):'unconfirmed','verified':_0x5b79c8}};if(!_0x5b79c8){const _0x5c921e=CliErrors[_0x382a05(0xaa)](_0x382a05(0xa6)+_0x103122+_0x382a05(0x6e),_0x382a05(0x89));Object[_0x382a05(0x7d)](_0x5c921e,_0x382a05(0x88),{'value':{..._0xb28cc8,'candidates':_0x1497e5['map'](projectCrossRelation)}});throw _0x5c921e;}return{'ok':!![],'data':_0xb28cc8,'message':_0x382a05(0xa6)+_0x103122+'\x20verified.'};}
|
|
1
|
+
function a72_0x4428(){const _0x521d07=['update','200bqhDIA','includes','relationId','message','from','matched','multiple\x20cross-database\x20relations\x20matched','POST','from-datasetcode','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','124320NsrKlt','toField','map','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','from-column','before','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','toLowerCase','delete','extend','sourceType','53600FYTtip','storageProfile','expectedCardinality','trim','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','27831KHKYwW','catch','data','label_inherited','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','parse','datasetCode','apiError','unconfirmed','toDatasetName','Would\x20','appCode','\x20a\x20cross-database\x20relation\x20for\x20','toDblinkId','to-column','7UFDnSa','toDatasetCode','isSafeInteger','validation','\x20has\x20invalid\x20storage\x20configuration.','2012704ersxjT','dblinkId','fromField','toTableName','from-dblink-id','table','dbId','DB_TABLE','98274MToeyL','query','fromDatasetCode','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','source','142HuDmYA','fromDblinkId','dbtableConfig','Invalid\x20--cardinality.','string','str','filter','to-datasetcode','list','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','to-label-column','refTableLabelName','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','flag','length','519120TWxysM','\x20write\x20was\x20not\x20verified.','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','defineProperty','\x20verified.','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','relationType','Dataset\x20','expectedLabel','tableName','Cross-database\x20relation\x20','create','enum','cardinality','flagMissing','4277305WWnnXU','some','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','body','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.'];a72_0x4428=function(){return _0x521d07;};return a72_0x4428();}const a72_0x323d66=a72_0x139d;function a72_0x139d(_0x584fec,_0x553118){_0x584fec=_0x584fec-0x167;const _0x4428e7=a72_0x4428();let _0x139da0=_0x4428e7[_0x584fec];return _0x139da0;}(function(_0x4f40ed,_0x5ed2a0){const _0x21de79=a72_0x139d,_0x27ae59=_0x4f40ed();while(!![]){try{const _0x3410d8=parseInt(_0x21de79(0x1b4))/0x1+-parseInt(_0x21de79(0x17b))/0x2*(-parseInt(_0x21de79(0x1b9))/0x3)+-parseInt(_0x21de79(0x16e))/0x4+-parseInt(_0x21de79(0x199))/0x5+-parseInt(_0x21de79(0x176))/0x6*(parseInt(_0x21de79(0x169))/0x7)+parseInt(_0x21de79(0x1a9))/0x8+-parseInt(_0x21de79(0x18a))/0x9*(-parseInt(_0x21de79(0x19f))/0xa);if(_0x3410d8===_0x5ed2a0)break;else _0x27ae59['push'](_0x27ae59['shift']());}catch(_0x542d3f){_0x27ae59['push'](_0x27ae59['shift']());}}}(a72_0x4428,0x7ba17));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(_0x59fc6c,_0x600ac){const _0x45e996=a72_0x139d,_0x2408be=_0x59fc6c[_0x45e996(0x180)](_0x600ac)[_0x45e996(0x1b7)]();if(!_0x2408be)throw CliErrors[_0x45e996(0x198)](_0x600ac);return _0x2408be;}function explicitDblink(_0x38b82e){const _0x422498=a72_0x139d,_0x1d8015=_0x38b82e[_0x422498(0x188)](_0x422498(0x172));if(_0x1d8015===undefined||_0x1d8015===null)return undefined;const _0x422113=Number(_0x1d8015);if(!Number[_0x422498(0x16b)](_0x422113)||_0x422113<=0x0)throw CliErrors['validation'](_0x422498(0x1af));return _0x422113;}export function validateCrossRelation(_0x3b8fd6,_0x41ac01){const _0x43a34a=a72_0x139d,_0xbe1b73=explicitDblink(_0x3b8fd6);if(_0x41ac01===_0x43a34a(0x183)){if(!_0x3b8fd6[_0x43a34a(0x180)]('from-datasetcode')['trim']()&&_0xbe1b73===undefined)throw CliErrors['validation'](_0x43a34a(0x184));return;}required(_0x3b8fd6,_0x43a34a(0x1a7)),required(_0x3b8fd6,_0x43a34a(0x1ad));if(_0x41ac01!=='delete'){required(_0x3b8fd6,'to-datasetcode'),required(_0x3b8fd6,_0x43a34a(0x168));const _0x392a1c=_0x3b8fd6[_0x43a34a(0x180)](_0x43a34a(0x197))[_0x43a34a(0x1b7)]();if(_0x392a1c&&!CROSS_RELATION_CARDINALITY_FLAG[_0x43a34a(0x196)][_0x43a34a(0x1a0)](_0x392a1c))throw CliErrors['validation'](_0x43a34a(0x17e));}}async function resolveEndpoint(_0x304b3d){const _0x1098c0=a72_0x139d,_0x3255ac=await getDatasetDetail(_0x304b3d),_0x15fad9=_0x3255ac?.['dataset']??{};if((_0x3255ac?.[_0x1098c0(0x17a)]??_0x15fad9[_0x1098c0(0x1b3)])!==_0x1098c0(0x175))throw CliErrors[_0x1098c0(0x16c)]('Dataset\x20'+_0x304b3d+_0x1098c0(0x1ac));const _0x431f41=_0x3255ac[_0x1098c0(0x17d)]??_0x3255ac['dbtable']??{};let _0x57f396=_0x3255ac[_0x1098c0(0x1b2)]??_0x15fad9[_0x1098c0(0x1b2)]??{};if(typeof _0x57f396===_0x1098c0(0x17f))try{_0x57f396=_0x57f396[_0x1098c0(0x1b7)]()?JSON[_0x1098c0(0x1be)](_0x57f396):{};}catch{throw CliErrors[_0x1098c0(0x16c)](_0x1098c0(0x191)+_0x304b3d+_0x1098c0(0x16d));}const _0x30feef=Number(_0x57f396?.[_0x1098c0(0x1b5)]?.['dbId']??_0x3255ac[_0x1098c0(0x1b5)]?.[_0x1098c0(0x174)]??_0x15fad9[_0x1098c0(0x1b5)]?.[_0x1098c0(0x174)]??_0x431f41[_0x1098c0(0x174)]??_0x15fad9[_0x1098c0(0x174)]??_0x3255ac[_0x1098c0(0x174)]),_0x2e5c6c=String(_0x3255ac['tableName']??_0x15fad9[_0x1098c0(0x193)]??_0x431f41[_0x1098c0(0x193)]??'')[_0x1098c0(0x1b7)]();if(!Number[_0x1098c0(0x16b)](_0x30feef)||_0x30feef<=0x0||!_0x2e5c6c)throw CliErrors[_0x1098c0(0x16c)](_0x1098c0(0x191)+_0x304b3d+_0x1098c0(0x187));return{'datasetCode':_0x304b3d,'dblinkId':_0x30feef,'table':_0x2e5c6c};}export async function resolveCrossRelationQuery(_0x59a783){const _0x3f9ba6=a72_0x139d,_0x463a60=_0x59a783[_0x3f9ba6(0x180)](_0x3f9ba6(0x1a7))[_0x3f9ba6(0x1b7)](),_0x506d5b=explicitDblink(_0x59a783),_0x67805c=_0x463a60?await resolveEndpoint(_0x463a60):undefined;if(_0x67805c&&_0x506d5b!==undefined&&_0x67805c['dblinkId']!==_0x506d5b)throw CliErrors['validation']('--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.');const _0x583425=_0x67805c?.[_0x3f9ba6(0x16f)]??_0x506d5b;if(_0x583425===undefined)throw CliErrors[_0x3f9ba6(0x16c)](_0x3f9ba6(0x184));return{'appCode':_0x59a783['appCode'],'fromDblinkId':_0x583425,..._0x463a60?{'fromDatasetCode':_0x463a60}:{},..._0x59a783[_0x3f9ba6(0x180)]('from-column')[_0x3f9ba6(0x1b7)]()?{'fromField':_0x59a783[_0x3f9ba6(0x180)](_0x3f9ba6(0x1ad))[_0x3f9ba6(0x1b7)]()}:{}};}export function projectCrossRelation(_0x155d76){const _0x4d3f34=a72_0x139d;return{'relationId':_0x155d76[_0x4d3f34(0x1a1)],'from':{'source':_0x4d3f34(0x175),'datasetCode':_0x155d76[_0x4d3f34(0x178)],'datasetName':_0x155d76['fromDatasetName'],'dblinkId':_0x155d76[_0x4d3f34(0x17c)],'table':_0x155d76['fromTableName'],'field':_0x155d76[_0x4d3f34(0x170)]},'to':{'source':_0x4d3f34(0x175),'datasetCode':_0x155d76[_0x4d3f34(0x16a)],'datasetName':_0x155d76[_0x4d3f34(0x1c2)],'dblinkId':_0x155d76[_0x4d3f34(0x167)],'table':_0x155d76[_0x4d3f34(0x171)],'field':_0x155d76[_0x4d3f34(0x1aa)],'labelField':_0x155d76['refTableLabelName']},'relation':{'cardinality':_0x155d76[_0x4d3f34(0x197)],'relationType':_0x155d76[_0x4d3f34(0x190)]}};}function ambiguity(_0x1056cb){const _0x3f6f0c=a72_0x139d,_0x1b6e30=CliErrors[_0x3f6f0c(0x16c)](_0x3f6f0c(0x18c),_0x3f6f0c(0x179));return Object[_0x3f6f0c(0x18d)](_0x1b6e30,_0x3f6f0c(0x1bb),{'value':{'candidates':_0x1056cb[_0x3f6f0c(0x1ab)](projectCrossRelation)}}),_0x1b6e30;}const sameName=(_0x1a0447,_0x41b723)=>_0x1a0447[a72_0x323d66(0x1b0)]()===_0x41b723['toLowerCase']();function matchesEndpoint(_0x2a9169,_0x4b5382,_0x173832,_0x3c4d8c,_0x1c4065){const _0xe9f709=a72_0x323d66;return _0x2a9169[_0xe9f709(0x17c)]===_0x4b5382[_0xe9f709(0x16f)]&&sameName(_0x2a9169['fromTableName'],_0x4b5382[_0xe9f709(0x173)])&&sameName(_0x2a9169['fromField'],_0x173832)&&_0x2a9169[_0xe9f709(0x167)]===_0x3c4d8c[_0xe9f709(0x16f)]&&sameName(_0x2a9169[_0xe9f709(0x171)],_0x3c4d8c[_0xe9f709(0x173)])&&sameName(_0x2a9169['toField'],_0x1c4065);}export async function prepareCrossRelation(_0x36888a,_0x4d9422){const _0x53fdd6=a72_0x323d66,_0x38c766=await resolveEndpoint(required(_0x36888a,'from-datasetcode')),_0x41a910=explicitDblink(_0x36888a);if(_0x41a910!==undefined&&_0x38c766[_0x53fdd6(0x16f)]!==_0x41a910)throw CliErrors['validation'](_0x53fdd6(0x19b));const _0xd31595={'appCode':_0x36888a[_0x53fdd6(0x1c4)],'fromDatasetCode':_0x38c766[_0x53fdd6(0x1bf)],'fromField':required(_0x36888a,_0x53fdd6(0x1ad)),..._0x41a910!==undefined?{'fromDblinkId':_0x41a910}:{}},_0x4e0716={'appCode':_0x36888a[_0x53fdd6(0x1c4)],'fromDblinkId':_0x38c766['dblinkId'],'fromDatasetCode':_0x38c766[_0x53fdd6(0x1bf)],'fromField':_0xd31595['fromField']},_0xa00eb6=await queryCrossDbRelations(_0x4e0716);let _0x2f2d63=null;if(_0x4d9422!=='create'){if(_0xa00eb6[_0x53fdd6(0x189)]>0x1)throw ambiguity(_0xa00eb6);_0x2f2d63=_0xa00eb6[0x0]??null;if(!_0x2f2d63)throw CliErrors[_0x53fdd6(0x16c)](_0x53fdd6(0x1b8));}if(_0x4d9422===_0x53fdd6(0x1b1))return{'operation':_0x4d9422,'from':_0x38c766,'query':_0x4e0716,'body':_0xd31595,'before':_0x2f2d63};const _0x50ca07=await resolveEndpoint(required(_0x36888a,_0x53fdd6(0x182)));if(_0x38c766[_0x53fdd6(0x16f)]===_0x50ca07['dblinkId'])throw CliErrors[_0x53fdd6(0x16c)](_0x53fdd6(0x1bd));const _0x3117ca=_0x36888a[_0x53fdd6(0x180)](_0x53fdd6(0x185))['trim'](),_0x1d4194=_0x36888a[_0x53fdd6(0x180)](_0x53fdd6(0x197))['trim'](),_0x563f12={..._0xd31595,'toDatasetCode':_0x50ca07[_0x53fdd6(0x1bf)],'toField':required(_0x36888a,'to-column'),..._0x3117ca?{'refTableLabelName':_0x3117ca}:{},..._0x1d4194?{'cardinality':_0x1d4194}:{}};if(_0xa00eb6[_0x53fdd6(0x19a)](_0x1cca4b=>_0x1cca4b['relationId']!==_0x2f2d63?.[_0x53fdd6(0x1a1)]&&matchesEndpoint(_0x1cca4b,_0x38c766,_0x563f12['fromField'],_0x50ca07,_0x563f12['toField'])))throw CliErrors[_0x53fdd6(0x16c)](_0x53fdd6(0x19d));return{'operation':_0x4d9422,'from':_0x38c766,'to':_0x50ca07,'query':_0x4e0716,'body':_0x563f12,'before':_0x2f2d63,'expectedLabel':_0x3117ca||_0x2f2d63?.[_0x53fdd6(0x186)]||_0x563f12[_0x53fdd6(0x1aa)],'expectedCardinality':_0x1d4194||_0x2f2d63?.[_0x53fdd6(0x197)]||null};}function mutationData(_0x51b2b5,_0x566805,_0x1e669b){const _0x5cd1e4=a72_0x323d66,{operation:_0x1abe8f,body:_0x12e9ee,before:_0x43e68d}=_0x51b2b5;return{'operation':_0x1abe8f,'selector':{'appCode':_0x12e9ee[_0x5cd1e4(0x1c4)],'from':{'datasetCode':_0x12e9ee[_0x5cd1e4(0x178)],'field':_0x12e9ee[_0x5cd1e4(0x170)],'dblinkId':_0x51b2b5['from'][_0x5cd1e4(0x16f)]}},'before':_0x43e68d?projectCrossRelation(_0x43e68d):null,'after':_0x1e669b,'dryRun':_0x566805,'backend':{'method':_0x5cd1e4(0x1a6),'path':CROSS_DB_RELATION_PATHS[_0x1abe8f]},'warnings':_0x1abe8f===_0x5cd1e4(0x19e)&&!_0x12e9ee[_0x5cd1e4(0x186)]?[{'code':_0x5cd1e4(0x1bc),'message':_0x5cd1e4(0x18f)}]:[]};}export async function previewCrossRelation(_0x191ad4,_0x57ed88){const _0x3ac655=a72_0x323d66,_0xfa544f=await prepareCrossRelation(_0x191ad4,_0x57ed88),_0xe369e7=_0xfa544f[_0x3ac655(0x19c)],_0x354015=_0x57ed88==='delete'?null:{..._0xfa544f[_0x3ac655(0x1ae)]?{'relationId':_0xfa544f[_0x3ac655(0x1ae)]['relationId']}:{},'from':{'datasetCode':_0xfa544f['from'][_0x3ac655(0x1bf)],'dblinkId':_0xfa544f['from'][_0x3ac655(0x16f)],'table':_0xfa544f[_0x3ac655(0x1a3)]['table'],'field':_0xe369e7[_0x3ac655(0x170)]},'to':{'datasetCode':_0xfa544f['to']['datasetCode'],'dblinkId':_0xfa544f['to'][_0x3ac655(0x16f)],'table':_0xfa544f['to'][_0x3ac655(0x173)],'field':_0xe369e7[_0x3ac655(0x1aa)],'labelField':_0xfa544f[_0x3ac655(0x192)]},'relation':{'cardinality':_0xfa544f[_0x3ac655(0x1b6)],'relationType':0x2}};return{...mutationData(_0xfa544f,!![],null),'after':_0x354015,'method':_0x3ac655(0x1a6),'url':CROSS_DB_RELATION_PATHS[_0x57ed88],'body':_0xfa544f[_0x3ac655(0x19c)],'description':_0x3ac655(0x1c3)+_0x57ed88+_0x3ac655(0x1c5)+_0xe369e7[_0x3ac655(0x178)]+'.'+_0xe369e7[_0x3ac655(0x170)]};}export async function executeCrossRelation(_0x359621,_0xb492b7,_0x2e48fb){const _0x31c448=a72_0x323d66,_0x15f498=await prepareCrossRelation(_0x359621,_0xb492b7);try{await _0x2e48fb(_0x15f498[_0x31c448(0x19c)]);}catch(_0x26ff03){if(_0x26ff03 instanceof CliError&&_0x26ff03[_0x31c448(0x1a2)][_0x31c448(0x1a0)](_0x31c448(0x1a5))){const _0x3a5a8f=await queryCrossDbRelations(_0x15f498['query'])[_0x31c448(0x1ba)](()=>[]);throw ambiguity(_0x3a5a8f);}throw _0x26ff03;}let _0x1f8ee7=[],_0x4ffeb9,_0x5c4c51=![];try{_0x1f8ee7=await queryCrossDbRelations(_0x15f498[_0x31c448(0x177)]);if(_0xb492b7===_0x31c448(0x1b1))_0x5c4c51=!_0x1f8ee7[_0x31c448(0x19a)](_0x5f9ba2=>_0x5f9ba2['relationId']===_0x15f498[_0x31c448(0x1ae)]['relationId']);else{const _0x89987f=_0x15f498['body'],_0x369b74=_0x1f8ee7[_0x31c448(0x181)](_0x2e5001=>matchesEndpoint(_0x2e5001,_0x15f498[_0x31c448(0x1a3)],_0x89987f[_0x31c448(0x170)],_0x15f498['to'],_0x89987f[_0x31c448(0x1aa)])&&(_0xb492b7===_0x31c448(0x195)||_0x2e5001[_0x31c448(0x1a1)]===_0x15f498[_0x31c448(0x1ae)][_0x31c448(0x1a1)]));_0x4ffeb9=_0x369b74[_0x31c448(0x189)]===0x1?_0x369b74[0x0]:undefined,_0x5c4c51=!!_0x4ffeb9&&_0x4ffeb9[_0x31c448(0x186)]===_0x15f498[_0x31c448(0x192)]&&_0x4ffeb9[_0x31c448(0x197)]===_0x15f498[_0x31c448(0x1b6)]&&_0x4ffeb9[_0x31c448(0x190)]===0x2;}}catch{}const _0x3c6ab7={...mutationData(_0x15f498,![],_0x4ffeb9?projectCrossRelation(_0x4ffeb9):null),'verification':{'status':_0x5c4c51?_0x31c448(0x1a4):_0x31c448(0x1c1),'verified':_0x5c4c51}};if(!_0x5c4c51){const _0x5d1b09=CliErrors[_0x31c448(0x1c0)](_0x31c448(0x194)+_0xb492b7+_0x31c448(0x18b),_0x31c448(0x1a8));Object[_0x31c448(0x18d)](_0x5d1b09,_0x31c448(0x1bb),{'value':{..._0x3c6ab7,'candidates':_0x1f8ee7[_0x31c448(0x1ab)](projectCrossRelation)}});throw _0x5d1b09;}return{'ok':!![],'data':_0x3c6ab7,'message':_0x31c448(0x194)+_0xb492b7+_0x31c448(0x18e)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a73_0x47ff7d=a73_0xa69e;(function(_0x1c726f,_0x45e0ff){const _0x5b6073=a73_0xa69e,_0x420367=_0x1c726f();while(!![]){try{const _0x5950be=parseInt(_0x5b6073(0x167))/0x1+-parseInt(_0x5b6073(0x15f))/0x2+-parseInt(_0x5b6073(0x166))/0x3*(-parseInt(_0x5b6073(0x164))/0x4)+-parseInt(_0x5b6073(0x168))/0x5*(parseInt(_0x5b6073(0x165))/0x6)+parseInt(_0x5b6073(0x160))/0x7+-parseInt(_0x5b6073(0x16b))/0x8*(parseInt(_0x5b6073(0x161))/0x9)+parseInt(_0x5b6073(0x16a))/0xa*(parseInt(_0x5b6073(0x162))/0xb);if(_0x5950be===_0x45e0ff)break;else _0x420367['push'](_0x420367['shift']());}catch(_0x3fed98){_0x420367['push'](_0x420367['shift']());}}}(a73_0x46b7,0x6588c));import{updateCrossDbRelation}from'../../core/api-client.js';function a73_0xa69e(_0x99bd28,_0x2e7e0d){_0x99bd28=_0x99bd28-0x15e;const _0x46b7f2=a73_0x46b7();let _0xa69e23=_0x46b7f2[_0x99bd28];return _0xa69e23;}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':'dataset','command':a73_0x47ff7d(0x169),'description':'Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','risk':a73_0x47ff7d(0x163),'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 _0x295ab3=>validateCrossRelation(_0x295ab3,a73_0x47ff7d(0x15e)),'dryRun':_0x257e34=>previewCrossRelation(_0x257e34,a73_0x47ff7d(0x15e)),'execute':_0x3babea=>executeCrossRelation(_0x3babea,a73_0x47ff7d(0x15e),updateCrossDbRelation)};function a73_0x46b7(){const _0x7caa94=['1418482jJedUm','937580GZGnBD','18IphUWJ','13173831ZinOTU','write','897248GAZJXb','3971526vAoMGY','6JxaUpx','666339bidIwm','5gdTpQq','cross-relation-update','10jZPJwk','2637912MmGcuM','update'];a73_0x46b7=function(){return _0x7caa94;};return a73_0x46b7();}
|