@lovrabet/rabetbase-cli 2.5.8-beta.1 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -2
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.d.ts +19 -0
- package/lib/core/kb-management-client.js +1 -0
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-kb.md +7 -6
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x56d2d0=a59_0x5230;(function(_0x2d7167,_0x3b812c){const _0x2d1bc2=a59_0x5230,_0x1aacfa=_0x2d7167();while(!![]){try{const _0x45b1ee=-parseInt(_0x2d1bc2(0x186))/0x1+parseInt(_0x2d1bc2(0x182))/0x2*(-parseInt(_0x2d1bc2(0x190))/0x3)+-parseInt(_0x2d1bc2(0x189))/0x4+parseInt(_0x2d1bc2(0x193))/0x5+-parseInt(_0x2d1bc2(0x183))/0x6+parseInt(_0x2d1bc2(0x184))/0x7*(parseInt(_0x2d1bc2(0x18a))/0x8)+parseInt(_0x2d1bc2(0x187))/0x9;if(_0x45b1ee===_0x3b812c)break;else _0x1aacfa['push'](_0x1aacfa['shift']());}catch(_0x581b0c){_0x1aacfa['push'](_0x1aacfa['shift']());}}}(a59_0x3067,0x4e426));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x31b77a){const _0x147fa8=a59_0x5230,_0x4cebe0=_0x31b77a[_0x147fa8(0x18c)](_0x147fa8(0x191));if(!_0x4cebe0)throw CliErrors[_0x147fa8(0x18d)]('Missing\x20key.','Usage:\x20'+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x3976d5=readConfig(),_0x4c8097=_0x4cebe0===_0x147fa8(0x194)?_0x147fa8(0x188):_0x4cebe0,_0x2fc29e=_0x3976d5[_0x4c8097];if(_0x2fc29e===undefined)throw CliErrors['validation'](_0x147fa8(0x185)+_0x4cebe0);return{'ok':!![],'data':typeof _0x2fc29e==='object'?_0x2fc29e:{[_0x4c8097]:_0x2fc29e},'message':typeof _0x2fc29e===_0x147fa8(0x192)?undefined:String(_0x2fc29e)};}function a59_0x3067(){const _0xa699f1=['key','object','57605HZKrdw','app','get','Get\x20a\x20config\x20value\x20by\x20key','1075254byjqDU','1938396UCzeRf','33523CWoqSg','Key\x20not\x20found:\x20','276068vluqkD','10004013Dbqnfe','appcode','521200uiydQe','776wOOQvx','read','str','validation','string','config','3VjQilS'];a59_0x3067=function(){return _0xa699f1;};return a59_0x3067();}function a59_0x5230(_0x588553,_0x202e31){_0x588553=_0x588553-0x182;const _0x3067bb=a59_0x3067();let _0x523052=_0x3067bb[_0x588553];return _0x523052;}export const configGetDefinition={'service':a59_0x56d2d0(0x18f),'command':a59_0x56d2d0(0x195),'description':a59_0x56d2d0(0x196),'risk':a59_0x56d2d0(0x18b),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a59_0x56d2d0(0x191),'type':a59_0x56d2d0(0x18e),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1664bd,_0x176cbe){const _0x462326=a60_0x28ac,_0x31fca5=_0x1664bd();while(!![]){try{const _0x488360=parseInt(_0x462326(0xfa))/0x1+parseInt(_0x462326(0xff))/0x2*(-parseInt(_0x462326(0xf8))/0x3)+-parseInt(_0x462326(0xf9))/0x4*(-parseInt(_0x462326(0xfb))/0x5)+-parseInt(_0x462326(0xfe))/0x6*(parseInt(_0x462326(0xfd))/0x7)+parseInt(_0x462326(0x102))/0x8*(-parseInt(_0x462326(0x101))/0x9)+parseInt(_0x462326(0xfc))/0xa+parseInt(_0x462326(0x100))/0xb;if(_0x488360===_0x176cbe)break;else _0x31fca5['push'](_0x31fca5['shift']());}catch(_0x4336e8){_0x31fca5['push'](_0x31fca5['shift']());}}}(a60_0x3797,0xe01ca));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a60_0x28ac(_0x3bd80c,_0x781841){_0x3bd80c=_0x3bd80c-0xf8;const _0x3797ab=a60_0x3797();let _0x28ac5e=_0x3797ab[_0x3bd80c];return _0x28ac5e;}import{configSetDefinition}from'../../commands/config/set.js';function a60_0x3797(){const _0x16b4ed=['11007858xYyunv','706252JqYPGV','8795369yEcnAB','4400811FRGeQR','16pLYqLQ','6hbXpXe','8VZVaZB','591041AoydPD','3599290snaInC','16064790FVGJkg','7mlyDAA'];a60_0x3797=function(){return _0x16b4ed;};return a60_0x3797();}import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a61_0x5b5c29=a61_0xc91c;function a61_0xc91c(_0x2bfafe,_0x557653){_0x2bfafe=_0x2bfafe-0x102;const _0x49e333=a61_0x49e3();let _0xc91c15=_0x49e333[_0x2bfafe];return _0xc91c15;}(function(_0x4c028a,_0x2e7fcd){const _0x457569=a61_0xc91c,_0x313e8c=_0x4c028a();while(!![]){try{const _0x17d7a3=parseInt(_0x457569(0x10a))/0x1*(parseInt(_0x457569(0x10d))/0x2)+-parseInt(_0x457569(0x11e))/0x3*(-parseInt(_0x457569(0x131))/0x4)+-parseInt(_0x457569(0x126))/0x5+-parseInt(_0x457569(0x103))/0x6+-parseInt(_0x457569(0x108))/0x7*(-parseInt(_0x457569(0x115))/0x8)+-parseInt(_0x457569(0x11d))/0x9+-parseInt(_0x457569(0x133))/0xa;if(_0x17d7a3===_0x2e7fcd)break;else _0x313e8c['push'](_0x313e8c['shift']());}catch(_0x40fd60){_0x313e8c['push'](_0x313e8c['shift']());}}}(a61_0x49e3,0xbb1f2));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';function a61_0x49e3(){const _0x4a074f=['global','project','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','manifestDomains','Available\x20regions:\x20','897285nItrFC','map','string','independent','enterprise-v1','str','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','Custom\x20KB\x20Service\x20HTTPS\x20origin','api-domain','mode','Select\x20Lovrabet\x20region','172DHHlPN','keys','14317250fnVqDg','Custom\x20knowledge-base\x20HTTPS\x20origin','localDomain','app-domain','join','Custom\x20User\x20HTTPS\x20origin','validation','ExitPromptError','904818irgdSo','config','Custom\x20local\x20callback\x20HTTPS\x20origin','region','domain-config','4586624thwtMg','certificateDomain','30TEDyin','Official\x20Lovrabet\x20region:\x20','routing','20028wKdaKj','cdn','Region\x20\x22','name','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','user-domain','Custom\x20SkillHub\x20HTTPS\x20origin','local-domain','16lHIqOP','domains','write','skill-domain','Custom\x20Runtime\x20HTTPS\x20origin','cancelled','\x22\x20is\x20not\x20currently\x20available.','kb-domain','2799792sudZjq','85719Eznohk','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','assign'];a61_0x49e3=function(){return _0x4a074f;};return a61_0x49e3();}import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a61_0x5b5c29(0x106),'type':a61_0x5b5c29(0x128),'description':a61_0x5b5c29(0x10b)+ENABLED_LOVRABET_REGION_VALUES[a61_0x5b5c29(0x137)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a61_0x5b5c29(0x107),'type':'string','description':'Independent-deployment\x20Domain\x20JSON\x20file'},{'name':a61_0x5b5c29(0x112),'type':a61_0x5b5c29(0x128),'description':a61_0x5b5c29(0x138)},{'name':a61_0x5b5c29(0x12e),'type':'string','description':'Custom\x20platform\x20API\x20HTTPS\x20origin'},{'name':'runtime-domain','type':'string','description':a61_0x5b5c29(0x119)},{'name':a61_0x5b5c29(0x118),'type':'string','description':a61_0x5b5c29(0x113)},{'name':a61_0x5b5c29(0x11c),'type':'string','description':a61_0x5b5c29(0x134)},{'name':'kb-service-domain','type':a61_0x5b5c29(0x128),'description':a61_0x5b5c29(0x12d)},{'name':a61_0x5b5c29(0x136),'type':a61_0x5b5c29(0x128),'description':a61_0x5b5c29(0x123)},{'name':a61_0x5b5c29(0x114),'type':'string','description':a61_0x5b5c29(0x105)},{'name':'certificate-domain','type':a61_0x5b5c29(0x128),'description':'Custom\x20certificate\x20service\x20HTTPS\x20origin'}];async function resolveRegion(_0x18881d){const _0x21979e=a61_0x5b5c29,_0x4642ff=_0x18881d[_0x21979e(0x12b)](_0x21979e(0x106));if(_0x4642ff){if(!isEnabledLovrabetRegion(_0x4642ff))throw CliErrors[_0x21979e(0x139)](_0x21979e(0x10f)+_0x4642ff+_0x21979e(0x11b),_0x21979e(0x125)+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'));return _0x4642ff;}if(_0x18881d['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x21979e(0x130),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x21979e(0x127)](_0x467391=>({'name':getOfficialRoutingProfile(_0x467391)['label']+'\x20('+_0x467391+')','value':_0x467391}))});}catch(_0x48d0df){if(_0x48d0df?.[_0x21979e(0x110)]===_0x21979e(0x102))throw CliErrors[_0x21979e(0x11a)]();throw _0x48d0df;}}export async function executeConfigInit(_0x1dc704){const _0x2f794d=a61_0x5b5c29,_0x3a4f37=resolveDomainConfigInput(_0x1dc704),_0x4d19f8=_0x3a4f37[_0x2f794d(0x116)],_0x15a2ec=Object[_0x2f794d(0x132)](_0x4d19f8)['length']>0x0;if(_0x15a2ec&&_0x1dc704['str'](_0x2f794d(0x106)))throw CliErrors[_0x2f794d(0x139)](_0x2f794d(0x11f));if(!!_0x4d19f8[_0x2f794d(0x135)]!==!!_0x4d19f8[_0x2f794d(0x109)])throw CliErrors[_0x2f794d(0x139)](_0x2f794d(0x111));const _0x4c2d41=_0x1dc704['bool'](_0x2f794d(0x121))?'global':_0x2f794d(0x122),_0x386d49=readScopedConfig(_0x4c2d41);for(const _0x53c53e of DOMAIN_CONFIG_FIELDS)delete _0x386d49[_0x53c53e];for(const _0x5be246 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x386d49[_0x5be246];delete _0x386d49['routing'];let _0x308252=null;if(_0x15a2ec)delete _0x386d49[_0x2f794d(0x106)],_0x3a4f37[_0x2f794d(0x12f)]===_0x2f794d(0x12a)?_0x386d49[_0x2f794d(0x10c)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x3a4f37[_0x2f794d(0x124)],'cdn':_0x3a4f37['cdn']}:Object[_0x2f794d(0x120)](_0x386d49,_0x4d19f8);else{_0x308252=await resolveRegion(_0x1dc704);if(_0x308252===DEFAULT_LOVRABET_REGION)delete _0x386d49[_0x2f794d(0x106)];else _0x386d49['region']=_0x308252;}return writeScopedConfig(_0x386d49,_0x4c2d41),{'ok':!![],'message':_0x15a2ec?'Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20'+Object['keys'](_0x3a4f37[_0x2f794d(0x12f)]==='enterprise-v1'?_0x3a4f37[_0x2f794d(0x124)]:_0x4d19f8)['join'](',\x20')+'.':_0x2f794d(0x12c)+_0x308252+'.','data':{'mode':_0x15a2ec?_0x2f794d(0x129):'official','protocol':_0x3a4f37['mode']===_0x2f794d(0x12a)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x308252,'domains':_0x4d19f8,'cdn':_0x3a4f37[_0x2f794d(0x12f)]===_0x2f794d(0x12a)?_0x3a4f37[_0x2f794d(0x10e)]:undefined}};}export const configInitDefinition={'service':a61_0x5b5c29(0x104),'command':'init','description':'Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':a61_0x5b5c29(0x117),'confirmationDescription':'Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a62_0x41b532=a62_0x4833;(function(_0x24a3de,_0xde7ad9){const _0x3f651e=a62_0x4833,_0x4acc7b=_0x24a3de();while(!![]){try{const _0xfc0beb=-parseInt(_0x3f651e(0xac))/0x1+parseInt(_0x3f651e(0xab))/0x2+parseInt(_0x3f651e(0xad))/0x3+parseInt(_0x3f651e(0xa8))/0x4*(parseInt(_0x3f651e(0xb6))/0x5)+-parseInt(_0x3f651e(0xb2))/0x6+-parseInt(_0x3f651e(0xa7))/0x7+parseInt(_0x3f651e(0xb3))/0x8;if(_0xfc0beb===_0xde7ad9)break;else _0x4acc7b['push'](_0x4acc7b['shift']());}catch(_0x1771c5){_0x4acc7b['push'](_0x4acc7b['shift']());}}}(a62_0x57ba,0xde64c));import{readScopedConfig}from'../../commands/config/shared.js';function a62_0x4833(_0x5330ca,_0x542da5){_0x5330ca=_0x5330ca-0xa7;const _0x57ba9c=a62_0x57ba();let _0x4833da=_0x57ba9c[_0x5330ca];return _0x4833da;}import{readConfig}from'../../utils/config.js';function a62_0x57ba(){const _0x2d7002=['9319164qERZue','20926680ulWMQU','read','config','5elyeaD','4010888bNZfWP','573716OEpxFf','List\x20all\x20config\x20values','bool','564232YTwXnU','8697ZLDFaN','13257lSyBFt','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','global','boolean','list'];a62_0x57ba=function(){return _0x2d7002;};return a62_0x57ba();}async function execute(_0x411839){const _0x438ea7=a62_0x4833,_0x40cbfb=_0x411839[_0x438ea7(0xaa)]('global')?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x40cbfb};}export const configListDefinition={'service':a62_0x41b532(0xb5),'command':a62_0x41b532(0xb1),'description':a62_0x41b532(0xa9),'risk':a62_0x41b532(0xb4),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x41b532(0xaf),'type':a62_0x41b532(0xb0),'description':a62_0x41b532(0xae),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a63_0x1df4d8=a63_0x3d14;function a63_0x3c48(){const _0x5b4835=['21KUvVvR','98qXynmZ','keys','\x20workspace\x20add\x20<name>\x20--appcode\x20','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Usage:\x20','apps','app','32728rNmvNj','Set\x20a\x20config\x20value','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','506935fDzwCZ','write','validation','Top-level\x20key\x20\x22','appcode','`,\x20`','str','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Invalid\x20value\x20for\x20\x22','Global','bool','\x22\x20is\x20not\x20settable.','string','config','env','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','value','key','Config\x20value','66162nsFgaA','994350SWWFmb','Missing\x20key.','64756rYhWQk','join','Invalid\x20locale\x20value.','boolean','riskLevel','object','\x20set\x20to:\x20','global','Settable\x20top-level\x20keys:\x20','\x22.\x20Allowed:\x20','set','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','length','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','24IOikCG','237050nIwNul','53952ZRtPCj','234rMWsgr','locale'];a63_0x3c48=function(){return _0x5b4835;};return a63_0x3c48();}(function(_0x49af98,_0xe0364){const _0x5c42d3=a63_0x3d14,_0x25f36b=_0x49af98();while(!![]){try{const _0x3e0a1f=-parseInt(_0x5c42d3(0x17f))/0x1*(-parseInt(_0x5c42d3(0x17c))/0x2)+-parseInt(_0x5c42d3(0x17a))/0x3*(-parseInt(_0x5c42d3(0x1a1))/0x4)+-parseInt(_0x5c42d3(0x19f))/0x5+-parseInt(_0x5c42d3(0x19e))/0x6*(parseInt(_0x5c42d3(0x180))/0x7)+parseInt(_0x5c42d3(0x187))/0x8*(-parseInt(_0x5c42d3(0x17d))/0x9)+parseInt(_0x5c42d3(0x17b))/0xa+parseInt(_0x5c42d3(0x18b))/0xb;if(_0x3e0a1f===_0xe0364)break;else _0x25f36b['push'](_0x25f36b['shift']());}catch(_0x117833){_0x25f36b['push'](_0x25f36b['shift']());}}}(a63_0x3c48,0x4ac08));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';function a63_0x3d14(_0x267871,_0x520457){_0x267871=_0x267871-0x173;const _0x3c4896=a63_0x3c48();let _0x3d14b5=_0x3c4896[_0x267871];return _0x3d14b5;}import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x2ac4ee){const _0x206e36=a63_0x3d14,_0xee21b0=_0x2ac4ee['str'](_0x206e36(0x19c)),_0x4eb88d=_0x2ac4ee[_0x206e36(0x191)](_0x206e36(0x19b));if(!_0xee21b0)throw CliErrors['validation'](_0x206e36(0x1a0),_0x206e36(0x184)+CLI_BIN_NAME+_0x206e36(0x176));if(_0x4eb88d===undefined||_0x4eb88d==='')throw CliErrors['validation']('Missing\x20value.',_0x206e36(0x184)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');let _0x3bbe8c=_0xee21b0,_0xc67037=_0x4eb88d;if(_0x4eb88d[_0x206e36(0x178)]>0x1f4)throw CliErrors[_0x206e36(0x18d)](_0x206e36(0x19a));if(_0xee21b0===_0x206e36(0x1a5))throw CliErrors['validation'](_0x206e36(0x183));if(!isTopLevelConfigKey(_0xee21b0))throw CliErrors[_0x206e36(0x18d)](_0x206e36(0x18e)+_0xee21b0+_0x206e36(0x196),_0x206e36(0x173)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0xee21b0]&&!CONFIG_ENUM_VALUES[_0xee21b0]['includes'](_0x4eb88d))throw CliErrors[_0x206e36(0x18d)](_0x206e36(0x193)+_0xee21b0+_0x206e36(0x174)+CONFIG_ENUM_VALUES[_0xee21b0][_0x206e36(0x1a2)](',\x20'));if(_0xee21b0===_0x206e36(0x17e)&&!normalizeLocale(_0x4eb88d))throw CliErrors[_0x206e36(0x18d)](_0x206e36(0x1a3),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');DOMAIN_CONFIG_FIELDS['includes'](_0xee21b0)&&(_0xc67037=normalizeDomainOrigin(_0xee21b0,_0x4eb88d));const _0x122dc9={'global':_0x2ac4ee[_0x206e36(0x195)](_0x206e36(0x1a8))},_0x5297cb=resolveWriteScope(_0x122dc9),_0x2d7224=readScopedConfig(_0x5297cb);_0xee21b0===_0x206e36(0x186)&&(_0x3bbe8c=_0x206e36(0x18f),delete _0x2d7224[_0x206e36(0x186)]);_0xee21b0===_0x206e36(0x17e)&&(_0xc67037=normalizeLocale(_0x4eb88d));if(_0xee21b0===_0x206e36(0x199)){_0xc67037=normalizeEnv(_0x4eb88d);if(!isProduction(_0xc67037)&&!isDaily(_0xc67037))throw CliErrors['validation']('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x206e36(0x192));}if(_0xee21b0==='appcode'){const _0x14dd70=_0x2d7224['apps']&&typeof _0x2d7224[_0x206e36(0x185)]===_0x206e36(0x1a6)?Object[_0x206e36(0x181)](_0x2d7224[_0x206e36(0x185)]):[];if(_0x14dd70[_0x206e36(0x178)]>0x0)throw CliErrors[_0x206e36(0x18d)](_0x206e36(0x189),'Use\x20`'+CLI_BIN_NAME+_0x206e36(0x182)+_0xc67037+_0x206e36(0x190)+CLI_BIN_NAME+_0x206e36(0x18a));const _0x1fecd4=buildCanonicalProjectConfig({..._0x2d7224},{'appCodes':[_0xc67037],'env':typeof _0x2d7224[_0x206e36(0x199)]===_0x206e36(0x197)?_0x2d7224[_0x206e36(0x199)]:undefined});writeScopedConfig(_0x1fecd4,_0x5297cb);const _0x547b5b=_0x5297cb===_0x206e36(0x1a8)?_0x206e36(0x194):'Project';return{'ok':!![],'message':'✓\x20'+_0x547b5b+'\x20appcode\x20set\x20to:\x20'+_0xc67037+_0x206e36(0x177)};}_0x2d7224[_0x3bbe8c]=_0xc67037,writeScopedConfig(_0x2d7224,_0x5297cb);const _0x114360=_0x5297cb===_0x206e36(0x1a8)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x114360+'\x20'+_0x3bbe8c+_0x206e36(0x1a7)+_0xc67037};}export const configSetDefinition={'service':a63_0x1df4d8(0x198),'command':a63_0x1df4d8(0x175),'description':a63_0x1df4d8(0x188),'risk':a63_0x1df4d8(0x18c),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a63_0x1df4d8(0x19c),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a63_0x1df4d8(0x19b),'type':a63_0x1df4d8(0x197),'description':a63_0x1df4d8(0x19d),'required':!![]},{'name':a63_0x1df4d8(0x1a8),'type':a63_0x1df4d8(0x1a4),'description':a63_0x1df4d8(0x179),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3cbbaf,_0x1b87c6){var _0x21873=a64_0x4b94,_0x2e817f=_0x3cbbaf();while(!![]){try{var _0x433d7c=-parseInt(_0x21873(0xf6))/0x1+parseInt(_0x21873(0xf4))/0x2*(-parseInt(_0x21873(0x100))/0x3)+-parseInt(_0x21873(0x102))/0x4*(parseInt(_0x21873(0x101))/0x5)+-parseInt(_0x21873(0xf7))/0x6+parseInt(_0x21873(0xfc))/0x7*(parseInt(_0x21873(0xfd))/0x8)+parseInt(_0x21873(0xfa))/0x9+-parseInt(_0x21873(0xf5))/0xa*(-parseInt(_0x21873(0x103))/0xb);if(_0x433d7c===_0x1b87c6)break;else _0x2e817f['push'](_0x2e817f['shift']());}catch(_0x217f18){_0x2e817f['push'](_0x2e817f['shift']());}}}(a64_0x3eed,0xe7ea9));function a64_0x4b94(_0x57ca2e,_0x1bf0bc){_0x57ca2e=_0x57ca2e-0xf4;var _0x3eedac=a64_0x3eed();var _0x4b94fa=_0x3eedac[_0x57ca2e];return _0x4b94fa;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};function a64_0x3eed(){var _0x128789=['20lukeGB','55jWjSoS','38mxXSPj','936380tNmRse','791376yMpOuU','621312XQmYbK','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','global','12709593sANgVX','project','1239112rKodaZ','32dzptDA','validation','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','112503uPcWir','31055zpvOxJ'];a64_0x3eed=function(){return _0x128789;};return a64_0x3eed();}export function resolveWriteScope(_0x3d657b){var _0x3a2bab=a64_0x4b94;if(_0x3d657b[_0x3a2bab(0xf9)])return _0x3a2bab(0xf9);if(!isInProject())throw CliErrors[_0x3a2bab(0xfe)](_0x3a2bab(0xf8),_0x3a2bab(0xff)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0x3a2bab(0xfb);}export function readScopedConfig(_0xc6ec4f){return readConfigFile(resolveWriteConfigPath(_0xc6ec4f));}export function writeScopedConfig(_0x4fcbb4,_0x57d9f1){writeConfigFile(resolveWriteConfigPath(_0x57d9f1),_0x4fcbb4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x2d6610=a65_0x4c18;(function(_0x59855f,_0x3ee07c){const _0x55905a=a65_0x4c18,_0xbe992d=_0x59855f();while(!![]){try{const _0x443ab8=parseInt(_0x55905a(0x106))/0x1*(-parseInt(_0x55905a(0xfb))/0x2)+-parseInt(_0x55905a(0x110))/0x3+-parseInt(_0x55905a(0x117))/0x4+parseInt(_0x55905a(0x107))/0x5*(-parseInt(_0x55905a(0xc7))/0x6)+parseInt(_0x55905a(0x11c))/0x7+-parseInt(_0x55905a(0xf1))/0x8*(parseInt(_0x55905a(0xbb))/0x9)+parseInt(_0x55905a(0xe9))/0xa;if(_0x443ab8===_0x3ee07c)break;else _0xbe992d['push'](_0xbe992d['shift']());}catch(_0x4d5e6b){_0xbe992d['push'](_0xbe992d['shift']());}}}(a65_0x3dd4,0xf0bca));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x2d6610(0x10a),a65_0x2d6610(0xfc)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x2d6610(0xdf),a65_0x2d6610(0xdc),'DATETIME','BOOLEAN',a65_0x2d6610(0xdb),a65_0x2d6610(0x10b),a65_0x2d6610(0xfe),a65_0x2d6610(0xd1),a65_0x2d6610(0x11b),'UPLOAD']);export function isDatasetBatchDesign(_0x13b2ab){const _0x2850c=a65_0x2d6610;return isObject(_0x13b2ab)&&_0x13b2ab[_0x2850c(0x103)]===_0x2850c(0x115);}export function validateDatasetBatchDesign(_0x154c31){const _0x2d6077=a65_0x2d6610;(!isObject(_0x154c31)||_0x154c31['kind']!==_0x2d6077(0x115))&&fail(_0x2d6077(0xf3));_0x154c31['schemaVersion']!==0x1&&fail(_0x2d6077(0xbc));const _0x10ba14=objectArray(_0x154c31[_0x2d6077(0xe4)],_0x2d6077(0xe4),0x1,0x14),_0x390332=objectArray(_0x154c31[_0x2d6077(0xc1)],'relations',0x0,0xc8),_0x283d09=objectArray(_0x154c31['unresolvedRelations'],_0x2d6077(0x101),0x0,0xc8),_0x213bdf=new Set(),_0x5f1bb3=new Map();for(const [_0x338efb,_0x1b0053]of _0x10ba14[_0x2d6077(0xbf)]()){const _0x4d978e=requiredString(_0x1b0053[_0x2d6077(0xc4)],_0x2d6077(0xec)+_0x338efb+'].localKey');!LOCAL_KEY[_0x2d6077(0x120)](_0x4d978e)&&fail(_0x2d6077(0xec)+_0x338efb+_0x2d6077(0xd3)+LOCAL_KEY['source']+'.');_0x213bdf['has'](_0x4d978e)&&fail('Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.');_0x213bdf[_0x2d6077(0x10f)](_0x4d978e);!isObject(_0x1b0053[_0x2d6077(0xf5)])&&fail('datasets['+_0x338efb+_0x2d6077(0x100));rejectServerDatasetIdentity(_0x1b0053[_0x2d6077(0xf5)],_0x2d6077(0xec)+_0x338efb+_0x2d6077(0xf9));if(!isObject(_0x1b0053['design'][_0x2d6077(0xba)]))fail(_0x2d6077(0xec)+_0x338efb+'].design.dataset\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x1b0053['design'][_0x2d6077(0xba)],'datasets['+_0x338efb+_0x2d6077(0xff)),requiredString(_0x1b0053[_0x2d6077(0xf5)][_0x2d6077(0xba)][_0x2d6077(0xc0)],'datasets['+_0x338efb+'].design.dataset.datasetName');_0x2d6077(0xc1)in _0x1b0053[_0x2d6077(0xf5)]&&(!Array['isArray'](_0x1b0053['design'][_0x2d6077(0xc1)])||_0x1b0053[_0x2d6077(0xf5)][_0x2d6077(0xc1)][_0x2d6077(0xcf)]!==0x0)&&fail(_0x2d6077(0xec)+_0x338efb+_0x2d6077(0xfd));const _0x5e0389=objectArray(_0x1b0053[_0x2d6077(0xf5)][_0x2d6077(0xd8)],_0x2d6077(0xec)+_0x338efb+_0x2d6077(0xb7),0x1,0xc8),_0x24a186=new Map();for(const [_0x1aa46d,_0x36685e]of _0x5e0389[_0x2d6077(0xbf)]()){const _0x47758e=fieldName(_0x36685e);if(!_0x47758e)fail(_0x2d6077(0xec)+_0x338efb+_0x2d6077(0xf4)+_0x1aa46d+_0x2d6077(0x11a));const _0x40df09=_0x47758e['toLowerCase']();if(_0x24a186[_0x2d6077(0xe2)](_0x40df09))fail(_0x2d6077(0x118)+_0x4d978e+_0x2d6077(0x11f));const _0x356dd4=stringValue(_0x36685e[_0x2d6077(0xb9)]??_0x36685e[_0x2d6077(0xce)])[_0x2d6077(0xe3)]();if(!SUPPORTED_FIELD_TYPES[_0x2d6077(0xe2)](_0x356dd4))fail(_0x2d6077(0xec)+_0x338efb+_0x2d6077(0xf4)+_0x1aa46d+_0x2d6077(0xe8));_0x24a186[_0x2d6077(0xcd)](_0x40df09,_0x356dd4),[_0x36685e[_0x2d6077(0x116)],_0x36685e['refTableField'],_0x36685e['refTableLabelField']][_0x2d6077(0x114)](_0x3eb8ee=>stringValue(_0x3eb8ee))&&fail(_0x2d6077(0xec)+_0x338efb+_0x2d6077(0xf4)+_0x1aa46d+_0x2d6077(0xeb));}_0x5f1bb3['set'](_0x4d978e,_0x24a186);}const _0x1acc8a=new Set(),_0x25dfc3=new Set();for(const [_0x331e6f,_0x37dc9f]of _0x390332['entries']()){const _0x13222e=validateRelation(_0x37dc9f,_0x331e6f,_0x213bdf,_0x5f1bb3);if(_0x1acc8a[_0x2d6077(0xe2)](_0x13222e))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0x1acc8a['add'](_0x13222e);const _0x2b3622=_0x13222e[_0x2d6077(0xd2)]('\x00',0x2)[_0x2d6077(0x10d)]('\x00');if(_0x25dfc3['has'](_0x2b3622))fail(_0x2d6077(0xb5));_0x25dfc3[_0x2d6077(0x10f)](_0x2b3622);}for(const [_0x1f4b50,_0x582700]of _0x283d09[_0x2d6077(0xbf)]()){requiredString(_0x582700[_0x2d6077(0x119)],_0x2d6077(0x11e)+_0x1f4b50+'].reason'),validateConfidence(_0x582700[_0x2d6077(0xed)],_0x2d6077(0x11e)+_0x1f4b50+_0x2d6077(0xc2));}return _0x154c31;}export function reconcileBatchResult(_0x1c6d31){const _0x3365d0=a65_0x2d6610;if(!isObject(_0x1c6d31))return null;try{const _0x3799a8=stringArray(_0x1c6d31[_0x3365d0(0xfa)],_0x3365d0(0xfa),0x1,0x14),_0x28cb37=new Set(_0x3799a8);if(_0x28cb37[_0x3365d0(0xde)]!==_0x3799a8['length']||_0x3799a8['some'](_0x3de34a=>!LOCAL_KEY[_0x3365d0(0x120)](_0x3de34a)))return null;const _0x5a655a=objectArray(_0x1c6d31[_0x3365d0(0xef)],_0x3365d0(0xef),0x1,0x14),_0x1b89ae=new Map(),_0x4d5f8d=new Set();for(const _0x135ade of _0x5a655a){const _0x317259=requiredString(_0x135ade[_0x3365d0(0xc4)],_0x3365d0(0xd7)),_0x226702=requiredString(_0x135ade[_0x3365d0(0xd5)]??_0x135ade[_0x3365d0(0xee)],_0x3365d0(0xb3));if(_0x1b89ae[_0x3365d0(0xe2)](_0x317259)||_0x4d5f8d[_0x3365d0(0xe2)](_0x226702))return null;_0x1b89ae[_0x3365d0(0xcd)](_0x317259,_0x226702),_0x4d5f8d[_0x3365d0(0x10f)](_0x226702);}if(!sameSet(_0x28cb37,new Set(_0x1b89ae[_0x3365d0(0xe5)]())))return null;const _0x1ea83d=objectArray(_0x1c6d31[_0x3365d0(0xf6)],_0x3365d0(0xf6),0x0,0xc8),_0x109cd1=objectArray(_0x1c6d31['createdRelations'],_0x3365d0(0xcc),0x0,0xc8),_0x279fee=relationTupleSet(_0x1ea83d,![],_0x1b89ae),_0x28f962=relationTupleSet(_0x109cd1,!![],_0x1b89ae);if(!_0x279fee||!_0x28f962||!sameSet(_0x279fee,_0x28f962))return null;const _0x1e21ea=objectArray(_0x1c6d31[_0x3365d0(0x101)],_0x3365d0(0x101),0x0,0xc8);return{'expectedLocalKeys':_0x3799a8,'expectedRelations':_0x1ea83d,'createdDatasets':_0x5a655a,'createdRelations':_0x109cd1,'unresolvedRelations':_0x1e21ea,...isObject(_0x1c6d31[_0x3365d0(0xea)])?{'metrics':_0x1c6d31[_0x3365d0(0xea)]}:{}};}catch{return null;}}function validateRelation(_0x386292,_0x37b0b6,_0x52636b,_0x3b1750){const _0xf344a2=a65_0x2d6610,_0x3166ec=_0xf344a2(0xf0)+_0x37b0b6+']',_0x2f4e72=requiredString(_0x386292[_0xf344a2(0xd0)],_0x3166ec+'.fromDatasetKey'),_0x291e37=requiredString(_0x386292[_0xf344a2(0xe0)],_0x3166ec+_0xf344a2(0x10c)),_0x59864d=requiredString(_0x386292[_0xf344a2(0xca)],_0x3166ec+_0xf344a2(0xe7))[_0xf344a2(0xc6)](),_0x4c6edb=requiredString(_0x386292['toField'],_0x3166ec+'.toField')[_0xf344a2(0xc6)]();if(!_0x52636b['has'](_0x2f4e72)||!_0x52636b[_0xf344a2(0xe2)](_0x291e37))fail(_0x3166ec+_0xf344a2(0x112));const _0x469f12=_0x3b1750[_0xf344a2(0xf7)](_0x2f4e72)?.['get'](_0x59864d),_0x26f69c=_0x3b1750[_0xf344a2(0xf7)](_0x291e37)?.[_0xf344a2(0xf7)](_0x4c6edb);if(_0x469f12===undefined||_0x26f69c===undefined)fail(_0x3166ec+_0xf344a2(0xda));if(_0x469f12&&_0x26f69c&&_0x469f12!==_0x26f69c)fail(_0x3166ec+_0xf344a2(0xe1));const _0x1744dd=stringValue(_0x386292['relationType'])||_0xf344a2(0xd9);if(_0x1744dd!=='lookup')fail(_0x3166ec+_0xf344a2(0xdd));const _0x173d46=stringValue(_0x386292['cardinality'])||_0xf344a2(0x10a);if(!SUPPORTED_CARDINALITIES['has'](_0x173d46))fail(_0x3166ec+_0xf344a2(0xd6));return requiredString(_0x386292[_0xf344a2(0x119)],_0x3166ec+_0xf344a2(0x108)),validateConfidence(_0x386292['confidence'],_0x3166ec+_0xf344a2(0xe6)),tuple(_0x2f4e72,_0x59864d,_0x291e37,_0x4c6edb,'lookup',_0x173d46);}function relationTupleSet(_0x69db43,_0x125a42,_0x4b2cd2){const _0x25b277=a65_0x2d6610,_0x899cd7=new Set();for(const _0x54722f of _0x69db43){const _0x1b6c36=stringValue(_0x54722f['fromDatasetKey']),_0x1e79e4=stringValue(_0x54722f[_0x25b277(0xe0)]),_0x15f382=stringValue(_0x54722f[_0x25b277(0xca)])[_0x25b277(0xc6)](),_0x140fdf=stringValue(_0x54722f[_0x25b277(0x10e)])[_0x25b277(0xc6)](),_0x2b2f4f=stringValue(_0x54722f['relationType']),_0x3fda05=stringValue(_0x54722f[_0x25b277(0xb8)]);if(!_0x1b6c36||!_0x1e79e4||!_0x15f382||!_0x140fdf||_0x2b2f4f!==_0x25b277(0xd9)||!SUPPORTED_CARDINALITIES[_0x25b277(0xe2)](_0x3fda05))return null;if(!_0x4b2cd2[_0x25b277(0xe2)](_0x1b6c36)||!_0x4b2cd2[_0x25b277(0xe2)](_0x1e79e4))return null;if(_0x125a42&&(stringValue(_0x54722f[_0x25b277(0xc9)])!==_0x4b2cd2[_0x25b277(0xf7)](_0x1b6c36)||stringValue(_0x54722f['toDatasetCode'])!==_0x4b2cd2[_0x25b277(0xf7)](_0x1e79e4)))return null;const _0x3e80ab=tuple(_0x1b6c36,_0x15f382,_0x1e79e4,_0x140fdf,_0x2b2f4f,_0x3fda05);if(_0x899cd7[_0x25b277(0xe2)](_0x3e80ab))return null;_0x899cd7[_0x25b277(0x10f)](_0x3e80ab);}return _0x899cd7;}function rejectServerDatasetIdentity(_0x1853d1,_0x3455c5){const _0x55d908=a65_0x2d6610;for(const _0xc20d31 of['id',_0x55d908(0xd4),_0x55d908(0x105),_0x55d908(0xd5),_0x55d908(0xee),_0x55d908(0xc5)]){if(_0x1853d1[_0xc20d31]!==undefined&&_0x1853d1[_0xc20d31]!==null&&_0x1853d1[_0xc20d31]!=='')fail(_0x3455c5+'.'+_0xc20d31+_0x55d908(0xcb));}}function objectArray(_0x2ff4f4,_0x3eb26b,_0x449be4,_0x2d69b4){const _0x529050=a65_0x2d6610;return(!Array[_0x529050(0x111)](_0x2ff4f4)||_0x2ff4f4[_0x529050(0xcf)]<_0x449be4||_0x2ff4f4[_0x529050(0xcf)]>_0x2d69b4||_0x2ff4f4['some'](_0x2b9dff=>!isObject(_0x2b9dff)))&&fail(_0x3eb26b+'\x20must\x20contain\x20'+_0x449be4+'..'+_0x2d69b4+_0x529050(0xbd)),_0x2ff4f4;}function stringArray(_0x2e5a0f,_0x13140f,_0x2d8132,_0x3c630b){const _0x23daff=a65_0x2d6610;return(!Array['isArray'](_0x2e5a0f)||_0x2e5a0f['length']<_0x2d8132||_0x2e5a0f[_0x23daff(0xcf)]>_0x3c630b||_0x2e5a0f[_0x23daff(0x114)](_0x27c17d=>typeof _0x27c17d!==_0x23daff(0xb6)||!_0x27c17d[_0x23daff(0xbe)]()))&&fail(_0x13140f+_0x23daff(0xf2)+_0x2d8132+'..'+_0x3c630b+_0x23daff(0x104)),_0x2e5a0f;}function a65_0x4c18(_0x40c397,_0x48ef18){_0x40c397=_0x40c397-0xb3;const _0x3dd451=a65_0x3dd4();let _0x4c181f=_0x3dd451[_0x40c397];return _0x4c181f;}function requiredString(_0x20d9ce,_0x56b54c){const _0xfa39ae=a65_0x2d6610,_0x908af4=stringValue(_0x20d9ce);if(!_0x908af4)fail(_0x56b54c+_0xfa39ae(0x11d));return _0x908af4;}function stringValue(_0x4f52f0){const _0xae2aaa=a65_0x2d6610;return typeof _0x4f52f0===_0xae2aaa(0xb6)?_0x4f52f0[_0xae2aaa(0xbe)]():'';}function fieldName(_0x2cd1f5){const _0x3b6153=a65_0x2d6610;return stringValue(_0x2cd1f5[_0x3b6153(0xd5)]??_0x2cd1f5[_0x3b6153(0xb4)]??_0x2cd1f5['name']??_0x2cd1f5[_0x3b6153(0xc3)]);}function a65_0x3dd4(){const _0x58e51c=['].design.fields','cardinality','type','dataset','2523978dsCshJ','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','\x20objects.','trim','entries','datasetName','relations','].confidence','fieldName','localKey','modelCode','toLowerCase','6nSSfud','isFinite','fromDatasetCode','fromField','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','createdRelations','set','fieldType','length','fromDatasetKey','USER','split','].localKey\x20must\x20match\x20','datasetId','code','.cardinality\x20is\x20not\x20supported.','createdDatasets[].localKey','fields','lookup','\x20references\x20an\x20unknown\x20field.','SELECT','NUMBER','.relationType\x20must\x20be\x20\x22lookup\x22.','size','TEXT','toDatasetKey','\x20connects\x20incompatible\x20field\x20types.','has','toUpperCase','datasets','keys','.confidence','.fromField','].type\x20is\x20not\x20supported.','81154810RuJONm','metrics',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','datasets[','confidence','datasetCode','createdDatasets','relations[','56yjeGeX','\x20must\x20contain\x20','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','].design.fields[','design','expectedRelations','get','object','].design','expectedLocalKeys','2NePJza','ONE_TO_ONE','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','DATE_RANGE','].design.dataset','].design\x20must\x20be\x20an\x20object.','unresolvedRelations','\x20must\x20be\x20between\x200\x20and\x201.','kind','\x20non-empty\x20strings.','modelId','1862404etfQjl','9183305xSMUQg','.reason','validation','MANY_TO_ONE','MULTI_SELECT','.toDatasetKey','join','toField','add','1903248gxlnpc','isArray','\x20references\x20an\x20unknown\x20dataset\x20localKey.','every','some','dataset-batch','refTable','7301188nzhygt','Dataset\x20','reason',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','ADDRESS','6947143CyraCU','\x20is\x20required.','unresolvedRelations[','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','test','createdDatasets[].code','fieldCode','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','string'];a65_0x3dd4=function(){return _0x58e51c;};return a65_0x3dd4();}function validateConfidence(_0x43c53d,_0x8733a0){const _0x58ebb9=a65_0x2d6610;_0x43c53d!==undefined&&_0x43c53d!==null&&(typeof _0x43c53d!=='number'||!Number[_0x58ebb9(0xc8)](_0x43c53d)||_0x43c53d<0x0||_0x43c53d>0x1)&&fail(_0x8733a0+_0x58ebb9(0x102));}function tuple(..._0x514c86){const _0x32ad0a=a65_0x2d6610;return _0x514c86['map']((_0x4b3b05,_0x3bf5df)=>_0x3bf5df===0x1||_0x3bf5df===0x3?_0x4b3b05[_0x32ad0a(0xc6)]():_0x4b3b05)['join']('\x00');}function sameSet(_0x118edc,_0x5e9baf){const _0x2d8a67=a65_0x2d6610;return _0x118edc[_0x2d8a67(0xde)]===_0x5e9baf[_0x2d8a67(0xde)]&&[..._0x118edc][_0x2d8a67(0x113)](_0x4b085f=>_0x5e9baf['has'](_0x4b085f));}function isObject(_0x4b90c3){const _0x2dd177=a65_0x2d6610;return typeof _0x4b90c3===_0x2dd177(0xf8)&&_0x4b90c3!==null&&!Array[_0x2dd177(0x111)](_0x4b90c3);}function fail(_0x2a4b1e){const _0x306fc4=a65_0x2d6610;throw CliErrors[_0x306fc4(0x109)](_0x2a4b1e);}
|
|
1
|
+
const a65_0x589f6e=a65_0x53f6;(function(_0x39f791,_0x5ab111){const _0x15c1ae=a65_0x53f6,_0x80a4fc=_0x39f791();while(!![]){try{const _0x32d46c=parseInt(_0x15c1ae(0x224))/0x1+parseInt(_0x15c1ae(0x1f1))/0x2*(parseInt(_0x15c1ae(0x233))/0x3)+parseInt(_0x15c1ae(0x22b))/0x4+-parseInt(_0x15c1ae(0x23c))/0x5+parseInt(_0x15c1ae(0x221))/0x6*(parseInt(_0x15c1ae(0x231))/0x7)+-parseInt(_0x15c1ae(0x1f3))/0x8+-parseInt(_0x15c1ae(0x245))/0x9*(parseInt(_0x15c1ae(0x1e1))/0xa);if(_0x32d46c===_0x5ab111)break;else _0x80a4fc['push'](_0x80a4fc['shift']());}catch(_0x2341cd){_0x80a4fc['push'](_0x80a4fc['shift']());}}}(a65_0x2bdb,0x9e6e5));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x589f6e(0x1ef),a65_0x589f6e(0x20c)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x589f6e(0x1f9),'NUMBER',a65_0x589f6e(0x237),a65_0x589f6e(0x248),a65_0x589f6e(0x219),a65_0x589f6e(0x21f),a65_0x589f6e(0x23d),a65_0x589f6e(0x1f0),'ADDRESS',a65_0x589f6e(0x214)]);export function isDatasetBatchDesign(_0x8f8492){const _0x25a292=a65_0x589f6e;return isObject(_0x8f8492)&&_0x8f8492[_0x25a292(0x1e3)]===_0x25a292(0x24b);}export function validateDatasetBatchDesign(_0x2d7e14){const _0x5e8835=a65_0x589f6e;(!isObject(_0x2d7e14)||_0x2d7e14[_0x5e8835(0x1e3)]!=='dataset-batch')&&fail(_0x5e8835(0x1e4));_0x2d7e14[_0x5e8835(0x204)]!==0x1&&fail(_0x5e8835(0x238));const _0x1499db=objectArray(_0x2d7e14[_0x5e8835(0x22c)],_0x5e8835(0x22c),0x1,0x14),_0x354264=objectArray(_0x2d7e14[_0x5e8835(0x1f5)],_0x5e8835(0x1f5),0x0,0xc8),_0x20a878=objectArray(_0x2d7e14['unresolvedRelations'],_0x5e8835(0x1fc),0x0,0xc8),_0xff2b72=new Set(),_0x27beb2=new Map();for(const [_0x5b7bc9,_0x52ab78]of _0x1499db[_0x5e8835(0x1ea)]()){const _0x1ab375=requiredString(_0x52ab78[_0x5e8835(0x206)],_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x200));!LOCAL_KEY['test'](_0x1ab375)&&fail(_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x225)+LOCAL_KEY[_0x5e8835(0x23f)]+'.');_0xff2b72['has'](_0x1ab375)&&fail(_0x5e8835(0x207));_0xff2b72[_0x5e8835(0x1ee)](_0x1ab375);!isObject(_0x52ab78[_0x5e8835(0x247)])&&fail(_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x24e));rejectServerDatasetIdentity(_0x52ab78[_0x5e8835(0x247)],_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x1ff));if(!isObject(_0x52ab78[_0x5e8835(0x247)]['dataset']))fail(_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x243));rejectServerDatasetIdentity(_0x52ab78[_0x5e8835(0x247)][_0x5e8835(0x1ec)],_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x24a)),requiredString(_0x52ab78[_0x5e8835(0x247)][_0x5e8835(0x1ec)][_0x5e8835(0x216)],_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x222));_0x5e8835(0x1f5)in _0x52ab78[_0x5e8835(0x247)]&&(!Array[_0x5e8835(0x1f6)](_0x52ab78['design']['relations'])||_0x52ab78[_0x5e8835(0x247)][_0x5e8835(0x1f5)][_0x5e8835(0x24c)]!==0x0)&&fail('datasets['+_0x5b7bc9+_0x5e8835(0x1e0));const _0x3411e9=objectArray(_0x52ab78[_0x5e8835(0x247)]['fields'],_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x205),0x1,0xc8),_0x58cb4d=new Map();for(const [_0x4237c5,_0x364f40]of _0x3411e9['entries']()){const _0x495892=fieldName(_0x364f40);if(!_0x495892)fail(_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x1df)+_0x4237c5+_0x5e8835(0x215));const _0xae07a8=_0x495892['toLowerCase']();if(_0x58cb4d[_0x5e8835(0x1f2)](_0xae07a8))fail(_0x5e8835(0x226)+_0x1ab375+_0x5e8835(0x249));const _0x762266=stringValue(_0x364f40[_0x5e8835(0x239)]??_0x364f40[_0x5e8835(0x209)])[_0x5e8835(0x1e7)]();if(!SUPPORTED_FIELD_TYPES[_0x5e8835(0x1f2)](_0x762266))fail(_0x5e8835(0x234)+_0x5b7bc9+_0x5e8835(0x1df)+_0x4237c5+'].type\x20is\x20not\x20supported.');_0x58cb4d[_0x5e8835(0x210)](_0xae07a8,_0x762266),[_0x364f40['refTable'],_0x364f40[_0x5e8835(0x244)],_0x364f40[_0x5e8835(0x20f)]][_0x5e8835(0x208)](_0x434785=>stringValue(_0x434785))&&fail('datasets['+_0x5b7bc9+_0x5e8835(0x1df)+_0x4237c5+']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.');}_0x27beb2[_0x5e8835(0x210)](_0x1ab375,_0x58cb4d);}const _0x4dc414=new Set(),_0x549b4d=new Set();for(const [_0x35233f,_0x3ea5c4]of _0x354264[_0x5e8835(0x1ea)]()){const _0x721996=validateRelation(_0x3ea5c4,_0x35233f,_0xff2b72,_0x27beb2);if(_0x4dc414[_0x5e8835(0x1f2)](_0x721996))fail(_0x5e8835(0x213));_0x4dc414[_0x5e8835(0x1ee)](_0x721996);const _0x1e2e17=_0x721996['split']('\x00',0x2)[_0x5e8835(0x1e6)]('\x00');if(_0x549b4d[_0x5e8835(0x1f2)](_0x1e2e17))fail(_0x5e8835(0x1eb));_0x549b4d[_0x5e8835(0x1ee)](_0x1e2e17);}for(const [_0x35f40f,_0x14f704]of _0x20a878[_0x5e8835(0x1ea)]()){requiredString(_0x14f704[_0x5e8835(0x22f)],_0x5e8835(0x21d)+_0x35f40f+_0x5e8835(0x21e)),validateConfidence(_0x14f704[_0x5e8835(0x242)],'unresolvedRelations['+_0x35f40f+_0x5e8835(0x223));}return _0x2d7e14;}export function reconcileBatchResult(_0x213296){const _0x4a8ab5=a65_0x589f6e;if(!isObject(_0x213296))return null;try{const _0x55ab02=stringArray(_0x213296['expectedLocalKeys'],_0x4a8ab5(0x228),0x1,0x14),_0x13f86b=new Set(_0x55ab02);if(_0x13f86b['size']!==_0x55ab02[_0x4a8ab5(0x24c)]||_0x55ab02[_0x4a8ab5(0x208)](_0x354078=>!LOCAL_KEY[_0x4a8ab5(0x1e8)](_0x354078)))return null;const _0x4b0668=objectArray(_0x213296[_0x4a8ab5(0x20a)],_0x4a8ab5(0x20a),0x1,0x14),_0x3cfb51=new Map(),_0x5d646d=new Set();for(const _0x26141f of _0x4b0668){const _0x25a018=requiredString(_0x26141f[_0x4a8ab5(0x206)],_0x4a8ab5(0x235)),_0x2a4ca3=requiredString(_0x26141f[_0x4a8ab5(0x211)]??_0x26141f[_0x4a8ab5(0x1ed)],'createdDatasets[].code');if(_0x3cfb51[_0x4a8ab5(0x1f2)](_0x25a018)||_0x5d646d[_0x4a8ab5(0x1f2)](_0x2a4ca3))return null;_0x3cfb51[_0x4a8ab5(0x210)](_0x25a018,_0x2a4ca3),_0x5d646d[_0x4a8ab5(0x1ee)](_0x2a4ca3);}if(!sameSet(_0x13f86b,new Set(_0x3cfb51[_0x4a8ab5(0x1f8)]())))return null;const _0x56a2db=objectArray(_0x213296['expectedRelations'],_0x4a8ab5(0x23a),0x0,0xc8),_0x462df4=objectArray(_0x213296[_0x4a8ab5(0x1fb)],_0x4a8ab5(0x1fb),0x0,0xc8),_0xdf9859=relationTupleSet(_0x56a2db,![],_0x3cfb51),_0x31d58d=relationTupleSet(_0x462df4,!![],_0x3cfb51);if(!_0xdf9859||!_0x31d58d||!sameSet(_0xdf9859,_0x31d58d))return null;const _0x5298df=objectArray(_0x213296[_0x4a8ab5(0x1fc)],_0x4a8ab5(0x1fc),0x0,0xc8);return{'expectedLocalKeys':_0x55ab02,'expectedRelations':_0x56a2db,'createdDatasets':_0x4b0668,'createdRelations':_0x462df4,'unresolvedRelations':_0x5298df,...isObject(_0x213296[_0x4a8ab5(0x1f4)])?{'metrics':_0x213296[_0x4a8ab5(0x1f4)]}:{}};}catch{return null;}}function validateRelation(_0xa48130,_0x2bbd28,_0x3ef594,_0x556010){const _0x21dbae=a65_0x589f6e,_0x2de03d=_0x21dbae(0x227)+_0x2bbd28+']',_0x148a44=requiredString(_0xa48130['fromDatasetKey'],_0x2de03d+_0x21dbae(0x1fa)),_0xe16075=requiredString(_0xa48130[_0x21dbae(0x229)],_0x2de03d+_0x21dbae(0x21a)),_0x58f533=requiredString(_0xa48130['fromField'],_0x2de03d+'.fromField')[_0x21dbae(0x241)](),_0x4528ea=requiredString(_0xa48130[_0x21dbae(0x23e)],_0x2de03d+'.toField')[_0x21dbae(0x241)]();if(!_0x3ef594['has'](_0x148a44)||!_0x3ef594[_0x21dbae(0x1f2)](_0xe16075))fail(_0x2de03d+'\x20references\x20an\x20unknown\x20dataset\x20localKey.');const _0x25c823=_0x556010[_0x21dbae(0x218)](_0x148a44)?.[_0x21dbae(0x218)](_0x58f533),_0x43223a=_0x556010['get'](_0xe16075)?.[_0x21dbae(0x218)](_0x4528ea);if(_0x25c823===undefined||_0x43223a===undefined)fail(_0x2de03d+_0x21dbae(0x1e9));if(_0x25c823&&_0x43223a&&_0x25c823!==_0x43223a)fail(_0x2de03d+_0x21dbae(0x24d));const _0x4a2ed5=stringValue(_0xa48130['relationType'])||_0x21dbae(0x24f);if(_0x4a2ed5!==_0x21dbae(0x24f))fail(_0x2de03d+_0x21dbae(0x246));const _0x4e6d8c=stringValue(_0xa48130[_0x21dbae(0x220)])||_0x21dbae(0x1ef);if(!SUPPORTED_CARDINALITIES['has'](_0x4e6d8c))fail(_0x2de03d+_0x21dbae(0x22a));return requiredString(_0xa48130[_0x21dbae(0x22f)],_0x2de03d+'.reason'),validateConfidence(_0xa48130[_0x21dbae(0x242)],_0x2de03d+_0x21dbae(0x22e)),tuple(_0x148a44,_0x58f533,_0xe16075,_0x4528ea,_0x21dbae(0x24f),_0x4e6d8c);}function relationTupleSet(_0x3df333,_0x4f8577,_0x513207){const _0x263f1d=a65_0x589f6e,_0x4a8df7=new Set();for(const _0x14e38c of _0x3df333){const _0x50c2be=stringValue(_0x14e38c[_0x263f1d(0x230)]),_0x1855cc=stringValue(_0x14e38c[_0x263f1d(0x229)]),_0x104353=stringValue(_0x14e38c[_0x263f1d(0x1e2)])[_0x263f1d(0x241)](),_0x89f36c=stringValue(_0x14e38c['toField'])[_0x263f1d(0x241)](),_0x3fe714=stringValue(_0x14e38c[_0x263f1d(0x201)]),_0x534726=stringValue(_0x14e38c[_0x263f1d(0x220)]);if(!_0x50c2be||!_0x1855cc||!_0x104353||!_0x89f36c||_0x3fe714!==_0x263f1d(0x24f)||!SUPPORTED_CARDINALITIES[_0x263f1d(0x1f2)](_0x534726))return null;if(!_0x513207[_0x263f1d(0x1f2)](_0x50c2be)||!_0x513207[_0x263f1d(0x1f2)](_0x1855cc))return null;if(_0x4f8577&&(stringValue(_0x14e38c['fromDatasetCode'])!==_0x513207['get'](_0x50c2be)||stringValue(_0x14e38c['toDatasetCode'])!==_0x513207['get'](_0x1855cc)))return null;const _0x29fa31=tuple(_0x50c2be,_0x104353,_0x1855cc,_0x89f36c,_0x3fe714,_0x534726);if(_0x4a8df7['has'](_0x29fa31))return null;_0x4a8df7[_0x263f1d(0x1ee)](_0x29fa31);}return _0x4a8df7;}function rejectServerDatasetIdentity(_0x178d19,_0x2f026){const _0x2a78bf=a65_0x589f6e;for(const _0x337a8a of['id',_0x2a78bf(0x217),_0x2a78bf(0x20e),'code',_0x2a78bf(0x1ed),_0x2a78bf(0x23b)]){if(_0x178d19[_0x337a8a]!==undefined&&_0x178d19[_0x337a8a]!==null&&_0x178d19[_0x337a8a]!=='')fail(_0x2f026+'.'+_0x337a8a+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function objectArray(_0x8e6d47,_0x6405c,_0x32f911,_0x1090ab){const _0x480ff7=a65_0x589f6e;return(!Array[_0x480ff7(0x1f6)](_0x8e6d47)||_0x8e6d47[_0x480ff7(0x24c)]<_0x32f911||_0x8e6d47[_0x480ff7(0x24c)]>_0x1090ab||_0x8e6d47[_0x480ff7(0x208)](_0x14a1e8=>!isObject(_0x14a1e8)))&&fail(_0x6405c+'\x20must\x20contain\x20'+_0x32f911+'..'+_0x1090ab+_0x480ff7(0x1de)),_0x8e6d47;}function stringArray(_0x513595,_0x101e80,_0x69a373,_0x43fe6b){const _0x16954b=a65_0x589f6e;return(!Array['isArray'](_0x513595)||_0x513595['length']<_0x69a373||_0x513595[_0x16954b(0x24c)]>_0x43fe6b||_0x513595[_0x16954b(0x208)](_0x59fe8b=>typeof _0x59fe8b!==_0x16954b(0x22d)||!_0x59fe8b[_0x16954b(0x1e5)]()))&&fail(_0x101e80+_0x16954b(0x240)+_0x69a373+'..'+_0x43fe6b+_0x16954b(0x1fd)),_0x513595;}function requiredString(_0x50cf47,_0x1301bf){const _0x10ea92=a65_0x589f6e,_0x1e7f06=stringValue(_0x50cf47);if(!_0x1e7f06)fail(_0x1301bf+_0x10ea92(0x20b));return _0x1e7f06;}function stringValue(_0x40c04b){const _0x5a5491=a65_0x589f6e;return typeof _0x40c04b===_0x5a5491(0x22d)?_0x40c04b[_0x5a5491(0x1e5)]():'';}function a65_0x2bdb(){const _0x427ba3=['\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','].design.dataset','dataset-batch','length','\x20connects\x20incompatible\x20field\x20types.','].design\x20must\x20be\x20an\x20object.','lookup','\x20objects.','].design.fields[','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','1002640bRtZxW','fromField','kind','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','trim','join','toUpperCase','test','\x20references\x20an\x20unknown\x20field.','entries','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','dataset','datasetCode','add','MANY_TO_ONE','USER','4598fJDTzn','has','7635976EGjFgx','metrics','relations','isArray','number','keys','TEXT','.fromDatasetKey','createdRelations','unresolvedRelations','\x20non-empty\x20strings.','validation','].design','].localKey','relationType','size','name','schemaVersion','].design.fields','localKey','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','some','fieldType','createdDatasets','\x20is\x20required.','ONE_TO_ONE','fieldCode','modelId','refTableLabelField','set','code','isFinite','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','UPLOAD',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','datasetName','datasetId','get','SELECT','.toDatasetKey','\x20must\x20be\x20between\x200\x20and\x201.','every','unresolvedRelations[','].reason','MULTI_SELECT','cardinality','1552416sEWgVr','].design.dataset.datasetName','].confidence','60005wwuMmo','].localKey\x20must\x20match\x20','Dataset\x20','relations[','expectedLocalKeys','toDatasetKey','.cardinality\x20is\x20not\x20supported.','3615868TwpRrw','datasets','string','.confidence','reason','fromDatasetKey','7usxedy','fieldName','771djUAMW','datasets[','createdDatasets[].localKey','map','DATETIME','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','type','expectedRelations','modelCode','47965qeTKou','DATE_RANGE','toField','source','\x20must\x20contain\x20','toLowerCase','confidence','].design.dataset\x20must\x20be\x20an\x20object.','refTableField','18fbhmrM','.relationType\x20must\x20be\x20\x22lookup\x22.','design','BOOLEAN'];a65_0x2bdb=function(){return _0x427ba3;};return a65_0x2bdb();}function fieldName(_0x3ef60d){const _0x4c334b=a65_0x589f6e;return stringValue(_0x3ef60d[_0x4c334b(0x211)]??_0x3ef60d[_0x4c334b(0x20d)]??_0x3ef60d[_0x4c334b(0x203)]??_0x3ef60d[_0x4c334b(0x232)]);}function a65_0x53f6(_0x348619,_0x520a6c){_0x348619=_0x348619-0x1de;const _0x2bdbd0=a65_0x2bdb();let _0x53f695=_0x2bdbd0[_0x348619];return _0x53f695;}function validateConfidence(_0x410413,_0x3d758d){const _0x1a52b0=a65_0x589f6e;_0x410413!==undefined&&_0x410413!==null&&(typeof _0x410413!==_0x1a52b0(0x1f7)||!Number[_0x1a52b0(0x212)](_0x410413)||_0x410413<0x0||_0x410413>0x1)&&fail(_0x3d758d+_0x1a52b0(0x21b));}function tuple(..._0x534aba){const _0xcb4da9=a65_0x589f6e;return _0x534aba[_0xcb4da9(0x236)]((_0x1df801,_0x22bd95)=>_0x22bd95===0x1||_0x22bd95===0x3?_0x1df801[_0xcb4da9(0x241)]():_0x1df801)[_0xcb4da9(0x1e6)]('\x00');}function sameSet(_0x2a7473,_0xf1c70){const _0x281bdf=a65_0x589f6e;return _0x2a7473['size']===_0xf1c70[_0x281bdf(0x202)]&&[..._0x2a7473][_0x281bdf(0x21c)](_0x4d8cac=>_0xf1c70[_0x281bdf(0x1f2)](_0x4d8cac));}function isObject(_0x2211f1){return typeof _0x2211f1==='object'&&_0x2211f1!==null&&!Array['isArray'](_0x2211f1);}function fail(_0x522408){const _0x5101e4=a65_0x589f6e;throw CliErrors[_0x5101e4(0x1fe)](_0x522408);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a66_0x2abea9=a66_0x3419;(function(_0x1c210e,_0x4b0ae7){const _0x165b5c=a66_0x3419,_0x3c2a8b=_0x1c210e();while(!![]){try{const _0x155128=parseInt(_0x165b5c(0x1c9))/0x1*(parseInt(_0x165b5c(0x207))/0x2)+parseInt(_0x165b5c(0x205))/0x3+parseInt(_0x165b5c(0x1fa))/0x4*(parseInt(_0x165b5c(0x1e6))/0x5)+parseInt(_0x165b5c(0x1e1))/0x6+parseInt(_0x165b5c(0x1ec))/0x7+parseInt(_0x165b5c(0x1de))/0x8*(-parseInt(_0x165b5c(0x1ba))/0x9)+parseInt(_0x165b5c(0x1f4))/0xa*(-parseInt(_0x165b5c(0x1bf))/0xb);if(_0x155128===_0x4b0ae7)break;else _0x3c2a8b['push'](_0x3c2a8b['shift']());}catch(_0x1816e8){_0x3c2a8b['push'](_0x3c2a8b['shift']());}}}(a66_0x30a4,0x27cf9));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH='/smartapi/dblink/updateTableBusinessGroup',METADATA_BACKEND_PATH=a66_0x2abea9(0x1f1),UNGROUPED_BUSINESS_GROUP=a66_0x2abea9(0x1ee);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x575b37,input:_0x3eb1d9,dryRun:_0x13443d}){const _0xc2537b=a66_0x2abea9;validateInput(_0x3eb1d9);const _0x1a3c2b=normalizeBusinessGroupArgument(_0x3eb1d9[_0xc2537b(0x1d1)]),_0x4b4568=await getDatasetDetail(_0x3eb1d9[_0xc2537b(0x1db)]),_0x48ca29=resolveBusinessGroupDataset(_0x4b4568,_0x3eb1d9[_0xc2537b(0x1db)]);assertBusinessGroupUpdateSupported(_0x48ca29,_0x1a3c2b);const _0x272859=loadCurrentBusinessGroup(_0x4b4568,_0x48ca29);assertExpectedBusinessGroup(_0x272859,_0x3eb1d9['expectBusinessGroup']);const _0x30d8b2=buildBackendPlan(_0x575b37,_0x48ca29,_0x1a3c2b),_0x42b2d1=_0x272859!==_0x1a3c2b;let _0x1aa16e;if(_0x42b2d1&&!_0x13443d){_0x30d8b2[_0xc2537b(0x203)]===_0xc2537b(0x1dd)?await updateDbTableBusinessGroup(_0x30d8b2[_0xc2537b(0x206)]):await updateErBusinessGroup(_0x30d8b2[_0xc2537b(0x206)]);const _0x434d2a=await getDatasetDetail(_0x48ca29[_0xc2537b(0x1db)]),_0x452a09=resolveBusinessGroupDataset(_0x434d2a,_0x48ca29['code']),_0x3da49b=loadCurrentBusinessGroup(_0x434d2a,_0x452a09);if(_0x3da49b!==_0x1a3c2b)throw CliErrors[_0xc2537b(0x1c1)](_0xc2537b(0x1e7),'Expected\x20'+JSON[_0xc2537b(0x1cb)](displayBusinessGroup(_0x1a3c2b))+_0xc2537b(0x1e0)+JSON[_0xc2537b(0x1cb)](displayBusinessGroup(_0x3da49b))+'.');_0x1aa16e={'verified':!![],'status':_0xc2537b(0x1dc),'afterReadback':{'businessGroup':displayBusinessGroup(_0x3da49b)}};}else!_0x42b2d1&&(_0x1aa16e={'verified':!![],'status':_0xc2537b(0x1f7),'afterReadback':{'businessGroup':displayBusinessGroup(_0x272859)}});const _0x12f7ce={'operation':_0xc2537b(0x1e8),'appCode':_0x575b37,'selector':{'code':_0x48ca29[_0xc2537b(0x1db)]},'dataset':{'id':_0x48ca29['id'],'code':_0x48ca29[_0xc2537b(0x1db)],'name':_0x48ca29['name'],'sourceType':_0x48ca29['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x272859)},'after':{'businessGroup':displayBusinessGroup(_0x1a3c2b)},'changed':_0x42b2d1,'dryRun':_0x13443d,'submitted':_0x42b2d1&&!_0x13443d,'backend':{'method':_0x30d8b2['method'],'path':_0x30d8b2[_0xc2537b(0x1c2)],'payload':_0x30d8b2[_0xc2537b(0x206)]},..._0x1aa16e?{'verification':_0x1aa16e}:{},'warnings':[]};return{'ok':!![],'data':_0x12f7ce,'message':_0x42b2d1?_0x13443d?_0xc2537b(0x1e2)+_0x48ca29[_0xc2537b(0x1db)]:_0xc2537b(0x1c3)+_0x48ca29[_0xc2537b(0x1db)]:_0xc2537b(0x1ca)+_0x48ca29[_0xc2537b(0x1db)]};}export const datasetBusinessGroupUpdate={'service':a66_0x2abea9(0x1c0),'command':a66_0x2abea9(0x1d2),'description':a66_0x2abea9(0x1cc),'risk':a66_0x2abea9(0x1c6),'flags':[CODE_FLAG,{'name':'business-group','type':a66_0x2abea9(0x1da),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':a66_0x2abea9(0x1fc),'type':a66_0x2abea9(0x1da),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x49d5fc){validateInput(readBusinessGroupUpdateInput(_0x49d5fc));},async 'dryRun'(_0x3c3834){const _0x2c1a28=a66_0x2abea9,_0x165143=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x3c3834[_0x2c1a28(0x1f2)],'input':readBusinessGroupUpdateInput(_0x3c3834),'dryRun':!![]});return{'method':_0x165143[_0x2c1a28(0x1d0)]['backend'][_0x2c1a28(0x201)],'url':_0x165143['data'][_0x2c1a28(0x1d6)][_0x2c1a28(0x1c2)],'body':_0x165143[_0x2c1a28(0x1d0)][_0x2c1a28(0x1d6)]['payload'],'description':_0x165143[_0x2c1a28(0x1bb)],..._0x165143[_0x2c1a28(0x1d0)]};},async 'execute'(_0x4a52d4){const _0x494a4b=a66_0x2abea9;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x4a52d4[_0x494a4b(0x1f2)],'input':readBusinessGroupUpdateInput(_0x4a52d4),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x55ed1f){const _0x213b26=a66_0x2abea9,_0x5f0d60=_0x55ed1f[_0x213b26(0x208)](_0x213b26(0x1fc));return{'code':trim(_0x55ed1f[_0x213b26(0x208)](_0x213b26(0x1db))),'businessGroup':_0x55ed1f[_0x213b26(0x208)](_0x213b26(0x1d7)),'expectBusinessGroup':_0x5f0d60===undefined||_0x5f0d60===''?undefined:_0x5f0d60};}function validateInput(_0x5d435a){const _0x492417=a66_0x2abea9;if(!trim(_0x5d435a[_0x492417(0x1db)]))throw CliErrors['validation'](_0x492417(0x1d9));if(_0x5d435a['businessGroup']===undefined)throw CliErrors[_0x492417(0x1c5)](_0x492417(0x1ff));if(!trim(_0x5d435a[_0x492417(0x1d1)]))throw CliErrors[_0x492417(0x1c5)](_0x492417(0x200));}function assertBusinessGroupUpdateSupported(_0x422d2b,_0x4a107b){const _0x42a3c1=a66_0x2abea9;if(_0x422d2b['sourceType']===_0x42a3c1(0x1d8)&&!_0x4a107b)throw CliErrors[_0x42a3c1(0x1c5)]('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function a66_0x30a4(){const _0x411ece=['366513ZensFH','datasetName','ungrouped','prototype','found','/smartapi/question/er-config/business-group/edit','appCode','keys','10yLbZzF','isArray','source','unchanged','parse','trim','16cIoeGn','modelCode','expect-business-group','datasetCode','dbtableConfig','--business-group\x20is\x20required','--business-group\x20must\x20not\x20be\x20blank','method','metadata','kind','value','731235nfLUna','payload','4196NNZebs','str','168219oRnoGT','message','dbId','dbLinkId','POST','5993141Sbzgjx','dataset','apiError','path','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','validation','write','number','extend','110mrGKku','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','stringify','Update\x20business\x20scenario\x20group','length','toUpperCase','isFinite','data','businessGroup','business-group-update','dbTableSelector','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','modelId','backend','business-group','DB_TABLE','--code\x20is\x20required','string','code','matched','db-table','64LrYtGV','Expected\x20',',\x20actual\x20','952224UTvSFj','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','call','sourceType','name','214795CXkEeX','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','update','tableName','METADATA','hasOwnProperty'];a66_0x30a4=function(){return _0x411ece;};return a66_0x30a4();}function resolveBusinessGroupDataset(_0x4be1c8,_0x4d1a69){const _0x3a9978=a66_0x2abea9,_0x2837ca=asPlainObject(_0x4be1c8[_0x3a9978(0x1c0)]),_0x1e63b3=asPlainObject(_0x4be1c8[_0x3a9978(0x1fe)]),_0x461415=resolveSourceType(_0x4be1c8,_0x2837ca,_0x1e63b3),_0x4d2418=firstString(_0x4be1c8[_0x3a9978(0x1fb)],_0x4be1c8[_0x3a9978(0x1db)],_0x2837ca[_0x3a9978(0x1fd)],_0x4d1a69)||_0x4d1a69;return{'id':firstNumber(_0x4be1c8[_0x3a9978(0x1d5)],_0x4be1c8['id'],_0x2837ca['datasetId'])??firstString(_0x4be1c8[_0x3a9978(0x1d5)],_0x4be1c8['id'],_0x2837ca['datasetId'])??null,'code':_0x4d2418,'name':firstString(_0x4be1c8[_0x3a9978(0x1e5)],_0x2837ca[_0x3a9978(0x1ed)],_0x2837ca[_0x3a9978(0x1e5)])||null,'sourceType':_0x461415,'dbTableSelector':_0x461415==='DB_TABLE'?{'dbLinkId':firstNumber(_0x1e63b3[_0x3a9978(0x1bc)]),'tableName':firstString(_0x1e63b3[_0x3a9978(0x1e9)])||null}:null};}function resolveSourceType(_0x59463b,_0x53b9cc,_0x539303){const _0x12ac26=a66_0x2abea9,_0x3e3805=firstString(_0x59463b['source'],_0x59463b[_0x12ac26(0x1e4)],_0x53b9cc[_0x12ac26(0x1f6)],_0x53b9cc[_0x12ac26(0x1e4)])?.[_0x12ac26(0x1f9)]()[_0x12ac26(0x1ce)]();if(_0x3e3805===_0x12ac26(0x1d8)||_0x3e3805===_0x12ac26(0x1ea))return _0x3e3805;if(Object[_0x12ac26(0x1f3)](_0x539303)[_0x12ac26(0x1cd)]>0x0)return _0x12ac26(0x1d8);throw CliErrors['validation'](_0x12ac26(0x1d4));}function loadCurrentBusinessGroup(_0x2bfc73,_0x3a4688){const _0x213e55=a66_0x2abea9,_0x4568c3=readBusinessGroupFromDatasetDetail(_0x2bfc73,_0x3a4688['sourceType']);if(_0x4568c3['found'])return normalizeBusinessGroup(_0x4568c3[_0x213e55(0x204)]);return'';}function readBusinessGroupFromDatasetDetail(_0x36239e,_0x2235d6){const _0x443813=a66_0x2abea9,_0x520ca7=asPlainObject(_0x36239e[_0x443813(0x1c0)]),_0xe834c=firstPresent(_0x36239e['businessGroup']);if(_0xe834c[_0x443813(0x1f0)])return _0xe834c;const _0x46b770=firstPresent(_0x520ca7[_0x443813(0x1d1)]);if(_0x46b770[_0x443813(0x1f0)])return _0x46b770;if(_0x2235d6===_0x443813(0x1d8))return{'found':![]};const _0x76480b=readBusinessGroupFromExtend(_0x36239e[_0x443813(0x1c8)]);if(_0x76480b['found'])return _0x76480b;return readBusinessGroupFromExtend(_0x520ca7['extend']);}function readBusinessGroupFromExtend(_0x2b15aa){const _0x36c7d0=a66_0x2abea9;if(_0x2b15aa===undefined||_0x2b15aa===null||_0x2b15aa==='')return{'found':![]};if(typeof _0x2b15aa===_0x36c7d0(0x1da))try{const _0x25f8cd=JSON[_0x36c7d0(0x1f8)](_0x2b15aa);return readBusinessGroupFromExtend(_0x25f8cd);}catch{return{'found':![]};}const _0x3d2851=asPlainObject(_0x2b15aa);if(Object[_0x36c7d0(0x1ef)][_0x36c7d0(0x1eb)][_0x36c7d0(0x1e3)](_0x3d2851,_0x36c7d0(0x1d1)))return{'found':!![],'value':_0x3d2851[_0x36c7d0(0x1d1)]};return{'found':![]};}function firstPresent(..._0x195806){for(const _0x5a0644 of _0x195806){if(_0x5a0644!==undefined&&_0x5a0644!==null)return{'found':!![],'value':_0x5a0644};}return{'found':![]};}function assertExpectedBusinessGroup(_0x1dcb2c,_0x284fb9){const _0x2d6c37=a66_0x2abea9;if(_0x284fb9===undefined)return;const _0x139ed4=normalizeBusinessGroupArgument(_0x284fb9);if(_0x1dcb2c!==_0x139ed4)throw CliErrors[_0x2d6c37(0x1c5)]('Expectation\x20mismatch\x20at\x20businessGroup',_0x2d6c37(0x1df)+JSON['stringify'](_0x139ed4)+_0x2d6c37(0x1e0)+JSON[_0x2d6c37(0x1cb)](_0x1dcb2c));}function buildBackendPlan(_0x4dc331,_0x524c23,_0x40a6f6){const _0x4cefa7=a66_0x2abea9;if(_0x524c23[_0x4cefa7(0x1e4)]===_0x4cefa7(0x1d8)){if(!_0x524c23['dbTableSelector']||_0x524c23[_0x4cefa7(0x1d3)][_0x4cefa7(0x1bd)]===null||!_0x524c23[_0x4cefa7(0x1d3)][_0x4cefa7(0x1e9)])throw CliErrors['validation']('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.',_0x4cefa7(0x1c4));return{'kind':_0x4cefa7(0x1dd),'method':_0x4cefa7(0x1be),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x524c23['dbTableSelector'][_0x4cefa7(0x1bd)],'tableName':_0x524c23[_0x4cefa7(0x1d3)][_0x4cefa7(0x1e9)],'businessGroup':_0x40a6f6}};}return{'kind':_0x4cefa7(0x202),'method':_0x4cefa7(0x1be),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x4dc331,'datasetCode':_0x524c23[_0x4cefa7(0x1db)],'businessGroup':_0x40a6f6}};}function normalizeBusinessGroup(_0x46c464){if(_0x46c464===undefined||_0x46c464===null)return'';return String(_0x46c464)['trim']();}function normalizeBusinessGroupArgument(_0x12f870){const _0x2b86fe=normalizeBusinessGroup(_0x12f870);return _0x2b86fe===UNGROUPED_BUSINESS_GROUP?'':_0x2b86fe;}function displayBusinessGroup(_0x2303bf){return _0x2303bf||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x4701a3){const _0x10b1eb=a66_0x2abea9;if(!_0x4701a3||typeof _0x4701a3!=='object'||Array[_0x10b1eb(0x1f5)](_0x4701a3))return{};return _0x4701a3;}function firstString(..._0x3b073a){const _0x1c2e3a=a66_0x2abea9;for(const _0x1ddb45 of _0x3b073a){if(typeof _0x1ddb45===_0x1c2e3a(0x1da)&&_0x1ddb45['trim']())return _0x1ddb45['trim']();if(typeof _0x1ddb45===_0x1c2e3a(0x1c7)&&Number['isFinite'](_0x1ddb45))return String(_0x1ddb45);}return undefined;}function a66_0x3419(_0x3e0efe,_0x434b5f){_0x3e0efe=_0x3e0efe-0x1ba;const _0x30a4aa=a66_0x30a4();let _0x3419a8=_0x30a4aa[_0x3e0efe];return _0x3419a8;}function firstNumber(..._0x201446){const _0x3e4c91=a66_0x2abea9;for(const _0x4faaa3 of _0x201446){if(typeof _0x4faaa3===_0x3e4c91(0x1c7)&&Number['isFinite'](_0x4faaa3))return _0x4faaa3;if(typeof _0x4faaa3===_0x3e4c91(0x1da)&&_0x4faaa3[_0x3e4c91(0x1f9)]()&&Number[_0x3e4c91(0x1cf)](Number(_0x4faaa3)))return Number(_0x4faaa3);}return null;}function trim(_0x4d4492){return String(_0x4d4492||'')['trim']();}
|
|
1
|
+
const a66_0x16846e=a66_0x7d9a;(function(_0x3ef10d,_0x564a4a){const _0x249d1f=a66_0x7d9a,_0x3b5d4f=_0x3ef10d();while(!![]){try{const _0x11f77a=parseInt(_0x249d1f(0x193))/0x1*(parseInt(_0x249d1f(0x1b7))/0x2)+parseInt(_0x249d1f(0x181))/0x3*(parseInt(_0x249d1f(0x1a0))/0x4)+-parseInt(_0x249d1f(0x19a))/0x5+-parseInt(_0x249d1f(0x1ac))/0x6+parseInt(_0x249d1f(0x1b6))/0x7*(-parseInt(_0x249d1f(0x171))/0x8)+parseInt(_0x249d1f(0x19f))/0x9*(-parseInt(_0x249d1f(0x18d))/0xa)+parseInt(_0x249d1f(0x19e))/0xb;if(_0x11f77a===_0x564a4a)break;else _0x3b5d4f['push'](_0x3b5d4f['shift']());}catch(_0x5e9743){_0x3b5d4f['push'](_0x3b5d4f['shift']());}}}(a66_0x9cf5,0xcd0d1));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a66_0x16846e(0x1bb),METADATA_BACKEND_PATH=a66_0x16846e(0x189),UNGROUPED_BUSINESS_GROUP='ungrouped';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x44d8d8,input:_0x469d24,dryRun:_0x5a28a1}){const _0x54680c=a66_0x16846e;validateInput(_0x469d24);const _0x5415bb=normalizeBusinessGroupArgument(_0x469d24[_0x54680c(0x196)]),_0xb3216b=await getDatasetDetail(_0x469d24[_0x54680c(0x17f)]),_0x8622af=resolveBusinessGroupDataset(_0xb3216b,_0x469d24['code']);assertBusinessGroupUpdateSupported(_0x8622af,_0x5415bb);const _0x3af7a1=loadCurrentBusinessGroup(_0xb3216b,_0x8622af);assertExpectedBusinessGroup(_0x3af7a1,_0x469d24[_0x54680c(0x199)]);const _0xc2c087=buildBackendPlan(_0x44d8d8,_0x8622af,_0x5415bb),_0x8b2433=_0x3af7a1!==_0x5415bb;let _0x5ee6f1;if(_0x8b2433&&!_0x5a28a1){_0xc2c087[_0x54680c(0x186)]==='db-table'?await updateDbTableBusinessGroup(_0xc2c087[_0x54680c(0x19b)]):await updateErBusinessGroup(_0xc2c087[_0x54680c(0x19b)]);const _0x111625=await getDatasetDetail(_0x8622af[_0x54680c(0x17f)]),_0x268dd2=resolveBusinessGroupDataset(_0x111625,_0x8622af[_0x54680c(0x17f)]),_0x101278=loadCurrentBusinessGroup(_0x111625,_0x268dd2);if(_0x101278!==_0x5415bb)throw CliErrors['apiError'](_0x54680c(0x172),_0x54680c(0x174)+JSON[_0x54680c(0x1a9)](displayBusinessGroup(_0x5415bb))+_0x54680c(0x1ba)+JSON[_0x54680c(0x1a9)](displayBusinessGroup(_0x101278))+'.');_0x5ee6f1={'verified':!![],'status':_0x54680c(0x1af),'afterReadback':{'businessGroup':displayBusinessGroup(_0x101278)}};}else!_0x8b2433&&(_0x5ee6f1={'verified':!![],'status':_0x54680c(0x17e),'afterReadback':{'businessGroup':displayBusinessGroup(_0x3af7a1)}});const _0x35bb20={'operation':_0x54680c(0x184),'appCode':_0x44d8d8,'selector':{'code':_0x8622af[_0x54680c(0x17f)]},'dataset':{'id':_0x8622af['id'],'code':_0x8622af[_0x54680c(0x17f)],'name':_0x8622af['name'],'sourceType':_0x8622af[_0x54680c(0x1b2)]},'before':{'businessGroup':displayBusinessGroup(_0x3af7a1)},'after':{'businessGroup':displayBusinessGroup(_0x5415bb)},'changed':_0x8b2433,'dryRun':_0x5a28a1,'submitted':_0x8b2433&&!_0x5a28a1,'backend':{'method':_0xc2c087['method'],'path':_0xc2c087[_0x54680c(0x1a6)],'payload':_0xc2c087[_0x54680c(0x19b)]},..._0x5ee6f1?{'verification':_0x5ee6f1}:{},'warnings':[]};return{'ok':!![],'data':_0x35bb20,'message':_0x8b2433?_0x5a28a1?_0x54680c(0x175)+_0x8622af[_0x54680c(0x17f)]:_0x54680c(0x1a7)+_0x8622af[_0x54680c(0x17f)]:_0x54680c(0x1ad)+_0x8622af[_0x54680c(0x17f)]};}export const datasetBusinessGroupUpdate={'service':a66_0x16846e(0x1b5),'command':'business-group-update','description':a66_0x16846e(0x1b8),'risk':'write','flags':[CODE_FLAG,{'name':a66_0x16846e(0x178),'type':'string','required':!![],'description':a66_0x16846e(0x1b4)},{'name':a66_0x16846e(0x188),'type':a66_0x16846e(0x1a4),'required':![],'description':a66_0x16846e(0x194)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5a0a66){validateInput(readBusinessGroupUpdateInput(_0x5a0a66));},async 'dryRun'(_0x1b5df2){const _0x2637d9=a66_0x16846e,_0x44d0ce=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x1b5df2[_0x2637d9(0x1b3)],'input':readBusinessGroupUpdateInput(_0x1b5df2),'dryRun':!![]});return{'method':_0x44d0ce[_0x2637d9(0x1a8)][_0x2637d9(0x18e)][_0x2637d9(0x191)],'url':_0x44d0ce[_0x2637d9(0x1a8)][_0x2637d9(0x18e)][_0x2637d9(0x1a6)],'body':_0x44d0ce[_0x2637d9(0x1a8)][_0x2637d9(0x18e)]['payload'],'description':_0x44d0ce[_0x2637d9(0x1b9)],..._0x44d0ce[_0x2637d9(0x1a8)]};},async 'execute'(_0x199716){const _0x1a656e=a66_0x16846e;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x199716[_0x1a656e(0x1b3)],'input':readBusinessGroupUpdateInput(_0x199716),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x1ea188){const _0x105733=a66_0x16846e,_0x272872=_0x1ea188[_0x105733(0x182)](_0x105733(0x188));return{'code':trim(_0x1ea188[_0x105733(0x182)](_0x105733(0x17f))),'businessGroup':_0x1ea188[_0x105733(0x182)](_0x105733(0x178)),'expectBusinessGroup':_0x272872===undefined||_0x272872===''?undefined:_0x272872};}function validateInput(_0x12cfe7){const _0x4a31c5=a66_0x16846e;if(!trim(_0x12cfe7[_0x4a31c5(0x17f)]))throw CliErrors[_0x4a31c5(0x198)]('--code\x20is\x20required');if(_0x12cfe7[_0x4a31c5(0x196)]===undefined)throw CliErrors[_0x4a31c5(0x198)](_0x4a31c5(0x183));if(!trim(_0x12cfe7['businessGroup']))throw CliErrors[_0x4a31c5(0x198)](_0x4a31c5(0x1a2));}function assertBusinessGroupUpdateSupported(_0x59ff6f,_0xfc3116){const _0x356f09=a66_0x16846e;if(_0x59ff6f[_0x356f09(0x1b2)]===_0x356f09(0x1aa)&&!_0xfc3116)throw CliErrors[_0x356f09(0x198)](_0x356f09(0x176));}function resolveBusinessGroupDataset(_0x4fe5fb,_0xb8bd26){const _0x9ea0c5=a66_0x16846e,_0x5531fa=asPlainObject(_0x4fe5fb[_0x9ea0c5(0x1b5)]),_0x2f9570=asPlainObject(_0x4fe5fb['dbtableConfig']),_0x3d7d25=resolveSourceType(_0x4fe5fb,_0x5531fa,_0x2f9570),_0x346a1c=firstString(_0x4fe5fb['modelCode'],_0x4fe5fb['code'],_0x5531fa[_0x9ea0c5(0x17c)],_0xb8bd26)||_0xb8bd26;return{'id':firstNumber(_0x4fe5fb['modelId'],_0x4fe5fb['id'],_0x5531fa[_0x9ea0c5(0x17d)])??firstString(_0x4fe5fb[_0x9ea0c5(0x187)],_0x4fe5fb['id'],_0x5531fa[_0x9ea0c5(0x17d)])??null,'code':_0x346a1c,'name':firstString(_0x4fe5fb[_0x9ea0c5(0x1a3)],_0x5531fa[_0x9ea0c5(0x185)],_0x5531fa[_0x9ea0c5(0x1a3)])||null,'sourceType':_0x3d7d25,'dbTableSelector':_0x3d7d25===_0x9ea0c5(0x1aa)?{'dbLinkId':firstNumber(_0x2f9570['dbId']),'tableName':firstString(_0x2f9570['tableName'])||null}:null};}function a66_0x9cf5(){const _0x19e39b=['unchanged','code','parse','564201BRMhEn','str','--business-group\x20is\x20required','update','datasetName','kind','modelId','expect-business-group','/smartapi/question/er-config/business-group/edit','tableName','extend','number','410OVBFFu','backend','prototype','source','method','object','12OUdUpI','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','isFinite','businessGroup','Expectation\x20mismatch\x20at\x20businessGroup','validation','expectBusinessGroup','4304685NDVIzo','payload','dbLinkId','METADATA','42028283wVYLOT','210861HtYOUJ','8JwUvED','POST','--business-group\x20must\x20not\x20be\x20blank','name','string','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','path','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','data','stringify','DB_TABLE','trim','9391362BZUxOI','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','found','matched','hasOwnProperty','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','sourceType','appCode','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','dataset','1053815GOrzHt','30050YGZGAk','Update\x20business\x20scenario\x20group','message',',\x20actual\x20','/smartapi/dblink/updateTableBusinessGroup','dbTableSelector','8JKRjbd','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','value','Expected\x20','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','business-group','isArray','length','toUpperCase','datasetCode','datasetId'];a66_0x9cf5=function(){return _0x19e39b;};return a66_0x9cf5();}function resolveSourceType(_0x301f2,_0x28166d,_0x2ba73a){const _0x227e25=a66_0x16846e,_0x96b535=firstString(_0x301f2[_0x227e25(0x190)],_0x301f2[_0x227e25(0x1b2)],_0x28166d[_0x227e25(0x190)],_0x28166d[_0x227e25(0x1b2)])?.[_0x227e25(0x1ab)]()[_0x227e25(0x17b)]();if(_0x96b535==='DB_TABLE'||_0x96b535===_0x227e25(0x19d))return _0x96b535;if(Object['keys'](_0x2ba73a)[_0x227e25(0x17a)]>0x0)return _0x227e25(0x1aa);throw CliErrors[_0x227e25(0x198)](_0x227e25(0x1a5));}function loadCurrentBusinessGroup(_0x5d5203,_0x399a4a){const _0x20dc57=a66_0x16846e,_0x103fad=readBusinessGroupFromDatasetDetail(_0x5d5203,_0x399a4a['sourceType']);if(_0x103fad[_0x20dc57(0x1ae)])return normalizeBusinessGroup(_0x103fad[_0x20dc57(0x173)]);return'';}function readBusinessGroupFromDatasetDetail(_0x43d7e9,_0x4d3cab){const _0x3f3efe=a66_0x16846e,_0x310c09=asPlainObject(_0x43d7e9[_0x3f3efe(0x1b5)]),_0x8ad4e1=firstPresent(_0x43d7e9[_0x3f3efe(0x196)]);if(_0x8ad4e1['found'])return _0x8ad4e1;const _0x5216c0=firstPresent(_0x310c09[_0x3f3efe(0x196)]);if(_0x5216c0[_0x3f3efe(0x1ae)])return _0x5216c0;if(_0x4d3cab==='DB_TABLE')return{'found':![]};const _0x4f4272=readBusinessGroupFromExtend(_0x43d7e9[_0x3f3efe(0x18b)]);if(_0x4f4272[_0x3f3efe(0x1ae)])return _0x4f4272;return readBusinessGroupFromExtend(_0x310c09[_0x3f3efe(0x18b)]);}function readBusinessGroupFromExtend(_0x29b795){const _0x4d79f5=a66_0x16846e;if(_0x29b795===undefined||_0x29b795===null||_0x29b795==='')return{'found':![]};if(typeof _0x29b795===_0x4d79f5(0x1a4))try{const _0x46c441=JSON[_0x4d79f5(0x180)](_0x29b795);return readBusinessGroupFromExtend(_0x46c441);}catch{return{'found':![]};}const _0x3072eb=asPlainObject(_0x29b795);if(Object[_0x4d79f5(0x18f)][_0x4d79f5(0x1b0)]['call'](_0x3072eb,'businessGroup'))return{'found':!![],'value':_0x3072eb['businessGroup']};return{'found':![]};}function firstPresent(..._0x21a126){for(const _0x207891 of _0x21a126){if(_0x207891!==undefined&&_0x207891!==null)return{'found':!![],'value':_0x207891};}return{'found':![]};}function assertExpectedBusinessGroup(_0x1e2f1f,_0x3587e6){const _0x19c593=a66_0x16846e;if(_0x3587e6===undefined)return;const _0x216f8d=normalizeBusinessGroupArgument(_0x3587e6);if(_0x1e2f1f!==_0x216f8d)throw CliErrors[_0x19c593(0x198)](_0x19c593(0x197),_0x19c593(0x174)+JSON['stringify'](_0x216f8d)+',\x20actual\x20'+JSON[_0x19c593(0x1a9)](_0x1e2f1f));}function buildBackendPlan(_0x1d33eb,_0x454493,_0x40031b){const _0x5e3f6a=a66_0x16846e;if(_0x454493[_0x5e3f6a(0x1b2)]===_0x5e3f6a(0x1aa)){if(!_0x454493[_0x5e3f6a(0x1bc)]||_0x454493[_0x5e3f6a(0x1bc)][_0x5e3f6a(0x19c)]===null||!_0x454493[_0x5e3f6a(0x1bc)][_0x5e3f6a(0x18a)])throw CliErrors[_0x5e3f6a(0x198)](_0x5e3f6a(0x1b1),_0x5e3f6a(0x177));return{'kind':'db-table','method':_0x5e3f6a(0x1a1),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x454493['dbTableSelector'][_0x5e3f6a(0x19c)],'tableName':_0x454493['dbTableSelector'][_0x5e3f6a(0x18a)],'businessGroup':_0x40031b}};}return{'kind':'metadata','method':_0x5e3f6a(0x1a1),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x1d33eb,'datasetCode':_0x454493[_0x5e3f6a(0x17f)],'businessGroup':_0x40031b}};}function normalizeBusinessGroup(_0xf0fba4){if(_0xf0fba4===undefined||_0xf0fba4===null)return'';return String(_0xf0fba4)['trim']();}function normalizeBusinessGroupArgument(_0x193c11){const _0x41a27d=normalizeBusinessGroup(_0x193c11);return _0x41a27d===UNGROUPED_BUSINESS_GROUP?'':_0x41a27d;}function displayBusinessGroup(_0x19827){return _0x19827||UNGROUPED_BUSINESS_GROUP;}function a66_0x7d9a(_0x17bbb4,_0x58803d){_0x17bbb4=_0x17bbb4-0x171;const _0x9cf50b=a66_0x9cf5();let _0x7d9a55=_0x9cf50b[_0x17bbb4];return _0x7d9a55;}function asPlainObject(_0x63fd10){const _0x56223e=a66_0x16846e;if(!_0x63fd10||typeof _0x63fd10!==_0x56223e(0x192)||Array[_0x56223e(0x179)](_0x63fd10))return{};return _0x63fd10;}function firstString(..._0x23d037){const _0x194548=a66_0x16846e;for(const _0x2e91b8 of _0x23d037){if(typeof _0x2e91b8===_0x194548(0x1a4)&&_0x2e91b8['trim']())return _0x2e91b8[_0x194548(0x1ab)]();if(typeof _0x2e91b8===_0x194548(0x18c)&&Number[_0x194548(0x195)](_0x2e91b8))return String(_0x2e91b8);}return undefined;}function firstNumber(..._0x15b202){const _0x1ccfc6=a66_0x16846e;for(const _0x564052 of _0x15b202){if(typeof _0x564052===_0x1ccfc6(0x18c)&&Number[_0x1ccfc6(0x195)](_0x564052))return _0x564052;if(typeof _0x564052===_0x1ccfc6(0x1a4)&&_0x564052[_0x1ccfc6(0x1ab)]()&&Number[_0x1ccfc6(0x195)](Number(_0x564052)))return Number(_0x564052);}return null;}function trim(_0x295b45){const _0x125608=a66_0x16846e;return String(_0x295b45||'')[_0x125608(0x1ab)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a67_0x4406(_0x204bca,_0x2cf8ee){_0x204bca=_0x204bca-0x8e;const _0x191e04=a67_0x191e();let _0x4406ad=_0x191e04[_0x204bca];return _0x4406ad;}const a67_0x59056e=a67_0x4406;(function(_0xdbb650,_0x4495a4){const _0xf8d37d=a67_0x4406,_0x3b99e5=_0xdbb650();while(!![]){try{const _0xaef2ff=-parseInt(_0xf8d37d(0x9e))/0x1+-parseInt(_0xf8d37d(0xa2))/0x2+parseInt(_0xf8d37d(0xa1))/0x3+parseInt(_0xf8d37d(0x9f))/0x4*(parseInt(_0xf8d37d(0x90))/0x5)+-parseInt(_0xf8d37d(0x91))/0x6+parseInt(_0xf8d37d(0x92))/0x7*(parseInt(_0xf8d37d(0x9d))/0x8)+-parseInt(_0xf8d37d(0x97))/0x9*(-parseInt(_0xf8d37d(0x8e))/0xa);if(_0xaef2ff===_0x4495a4)break;else _0x3b99e5['push'](_0x3b99e5['shift']());}catch(_0x9d37ca){_0x3b99e5['push'](_0x3b99e5['shift']());}}}(a67_0x191e,0xb54f5));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a67_0x191e(){const _0x4e3996=['ungrouped','trim','6932097ChWGZg','Found\x20','map','number','DB_TABLE','length','1688TThVtR','1059303pWUfYV','2233324jxlkAw','read','1769595GHctQB','1975550SXuXVF','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','30EzPdMq','appCode','5oZBPYA','5012640QFjNSs','5516fXpvDr','business-groups','dbid'];a67_0x191e=function(){return _0x4e3996;};return a67_0x191e();}export const datasetBusinessGroups={'service':'dataset','command':a67_0x59056e(0x93),'description':a67_0x59056e(0xa3),'risk':a67_0x59056e(0xa0),'flags':[{'name':a67_0x59056e(0x94),'type':a67_0x59056e(0x9a),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'},APPCODE_FLAG_OPTIONAL],async 'execute'(_0xcf7ff0){const _0x456513=a67_0x59056e,_0x1c80c3=_0xcf7ff0['num']('dbid'),_0x4123df=await getErBusinessGroupSummary(_0xcf7ff0[_0x456513(0x8f)],_0x1c80c3),_0xc82697=_0x4123df['groups'][_0x456513(0x99)](_0x2a2985=>({..._0x2a2985,'businessGroup':_0x2a2985['businessGroup'][_0x456513(0x96)]()||_0x456513(0x95)}));return{'ok':!![],'data':{..._0x4123df,'groups':_0xc82697,'scope':_0x456513(0x9b)},'message':_0x456513(0x98)+_0xc82697[_0x456513(0x9c)]+'\x20business\x20group(s)\x20for\x20database\x20connection\x20'+_0x1c80c3};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x130594=a68_0xd6a9;function a68_0x3d40(){const _0xa6b5be=['\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','tableName','42lhCukQ','source','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','dbtableConfig','dbtable','\x20is\x20','SQL\x20schema\x20validation','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','code','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','lovrabet','toUpperCase','789550jpYMVG','join','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','The\x20current\x20dataset\x20\x22','datasetCode','5KhvrFR','unknown','dataset','datasetName','METADATA','dbId','844572PVruqG','671526JDqQnM','modelCode','737820aBghMC','filter','529905JBjemj','444421YQGYia','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','32408bhjQxg','name'];a68_0x3d40=function(){return _0xa6b5be;};return a68_0x3d40();}(function(_0x3c9ce0,_0x582705){const _0x36149f=a68_0xd6a9,_0x34baac=_0x3c9ce0();while(!![]){try{const _0x3e9c74=parseInt(_0x36149f(0xd7))/0x1+-parseInt(_0x36149f(0xe9))/0x2+-parseInt(_0x36149f(0xd6))/0x3+parseInt(_0x36149f(0xd1))/0x4+-parseInt(_0x36149f(0xcb))/0x5*(-parseInt(_0x36149f(0xd2))/0x6)+parseInt(_0x36149f(0xdd))/0x7*(-parseInt(_0x36149f(0xd9))/0x8)+parseInt(_0x36149f(0xd4))/0x9;if(_0x3e9c74===_0x582705)break;else _0x34baac['push'](_0x34baac['shift']());}catch(_0x3ffaac){_0x34baac['push'](_0x34baac['shift']());}}}(a68_0x3d40,0x3df35));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a68_0x130594(0xe7),'filter':a68_0x130594(0xd8),'getOne':a68_0x130594(0xdf)};export const RUNTIME_DATA_ACCESS_SUMMARY=a68_0x130594(0xeb);function valueToString(_0x5a99a6){return _0x5a99a6==null?'':String(_0x5a99a6)['trim']();}function getDatasetCode(_0x213a85){const _0x4f441f=a68_0x130594;return valueToString(_0x213a85[_0x4f441f(0xe5)]??_0x213a85[_0x4f441f(0xd3)]??_0x213a85[_0x4f441f(0xcd)]?.[_0x4f441f(0xca)]);}function getDatasetName(_0x35bc6f){const _0x554b50=a68_0x130594;return valueToString(_0x35bc6f[_0x554b50(0xda)]??_0x35bc6f[_0x554b50(0xcd)]?.[_0x554b50(0xce)])||_0x554b50(0xcc);}function getDatasetSource(_0x199457){const _0x4235e3=a68_0x130594;return valueToString(_0x199457[_0x4235e3(0xde)]??_0x199457[_0x4235e3(0xcd)]?.['sourceType'])[_0x4235e3(0xe8)]();}function getDbtableConfig(_0x33ff9d){const _0x5d0981=a68_0x130594,_0x2ad06e=_0x33ff9d[_0x5d0981(0xe0)]??_0x33ff9d[_0x5d0981(0xe1)];return _0x2ad06e&&typeof _0x2ad06e==='object'?_0x2ad06e:{};}function a68_0xd6a9(_0x98a499,_0x4e05a3){_0x98a499=_0x98a499-0xca;const _0x3d40d7=a68_0x3d40();let _0xd6a97a=_0x3d40d7[_0x98a499];return _0xd6a97a;}export function isDbTableBackedDataset(_0x33a0ad){const _0x5d91ab=a68_0x130594,_0x1701d3=getDatasetSource(_0x33a0ad);if(_0x1701d3===_0x5d91ab(0xcf))return![];const _0x1edc85=getDbtableConfig(_0x33a0ad),_0x3e25d4=_0x1edc85[_0x5d91ab(0xd0)]??_0x1edc85['id'],_0xe72e3f=valueToString(_0x1edc85[_0x5d91ab(0xdc)]??_0x33a0ad['tableName']??_0x33a0ad[_0x5d91ab(0xcd)]?.[_0x5d91ab(0xdc)]);return _0x3e25d4!==undefined&&_0x3e25d4!==null&&_0xe72e3f['length']>0x0;}export function filterDbTableBackedDatasets(_0x3891e6){const _0x434425=a68_0x130594;return _0x3891e6[_0x434425(0xd5)](_0x1c5404=>isDbTableBackedDataset(_0x1c5404));}export function buildDbTableBackedRequirementMessage(_0x461307,_0x47c960=a68_0x130594(0xe3)){const _0x3a5f74=a68_0x130594,_0x22de20=getDatasetSource(_0x461307)||'UNKNOWN',_0xb4494b=getDatasetName(_0x461307),_0x56ff33=getDatasetCode(_0x461307),_0x101bc2=_0x56ff33?'\x20('+_0x56ff33+')':'';return[_0x3a5f74(0xec)+_0xb4494b+'\x22'+_0x101bc2+_0x3a5f74(0xe2)+_0x22de20+_0x3a5f74(0xdb)+_0x47c960+'.','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.',_0x3a5f74(0xe4),_0x3a5f74(0xe6)+RUNTIME_DATA_ACCESS_COMMANDS[_0x3a5f74(0xd5)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'.'][_0x3a5f74(0xea)]('\x20');}export function assertDatasetIsDbTableBacked(_0xa12b21,_0x13583d){if(!isDbTableBackedDataset(_0xa12b21))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0xa12b21,_0x13583d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x7e05da=a69_0x3f5b;(function(_0x588055,_0x57c94f){const _0x3d0080=a69_0x3f5b,_0x5a2f66=_0x588055();while(!![]){try{const _0x168ce3=parseInt(_0x3d0080(0xe8))/0x1*(parseInt(_0x3d0080(0xe7))/0x2)+-parseInt(_0x3d0080(0xe6))/0x3+-parseInt(_0x3d0080(0xea))/0x4+parseInt(_0x3d0080(0xed))/0x5+parseInt(_0x3d0080(0xf0))/0x6+-parseInt(_0x3d0080(0xef))/0x7+parseInt(_0x3d0080(0xe5))/0x8;if(_0x168ce3===_0x57c94f)break;else _0x5a2f66['push'](_0x5a2f66['shift']());}catch(_0x320bec){_0x5a2f66['push'](_0x5a2f66['shift']());}}}(a69_0x4cfa,0xe4338));import{createCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a69_0x4cfa(){const _0x164e68=['4140789GCnDjR','310MkejbO','2170fBIAlZ','write','428376OYjzGI','cross-relation-create','create','3141150kVhIyK','Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','9743412gVfBLY','5176878SzERzw','dataset','15892736TqwRML'];a69_0x4cfa=function(){return _0x164e68;};return a69_0x4cfa();}import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';function a69_0x3f5b(_0x222a9c,_0x405e88){_0x222a9c=_0x222a9c-0xe5;const _0x4cfa32=a69_0x4cfa();let _0x3f5bd2=_0x4cfa32[_0x222a9c];return _0x3f5bd2;}export const datasetCrossRelationCreate={'service':a69_0x7e05da(0xf1),'command':a69_0x7e05da(0xeb),'description':a69_0x7e05da(0xee),'risk':a69_0x7e05da(0xe9),'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 _0x1adfdc=>validateCrossRelation(_0x1adfdc,a69_0x7e05da(0xec)),'dryRun':_0x26e422=>previewCrossRelation(_0x26e422,a69_0x7e05da(0xec)),'execute':_0x18f7c8=>executeCrossRelation(_0x18f7c8,a69_0x7e05da(0xec),createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x21ad1a=a70_0x38b1;(function(_0x37bcbc,_0x7ebdc7){const _0x52f847=a70_0x38b1,_0x546892=_0x37bcbc();while(!![]){try{const _0x407677=-parseInt(_0x52f847(0x79))/0x1+parseInt(_0x52f847(0x6e))/0x2*(-parseInt(_0x52f847(0x74))/0x3)+-parseInt(_0x52f847(0x6c))/0x4*(-parseInt(_0x52f847(0x73))/0x5)+parseInt(_0x52f847(0x76))/0x6*(-parseInt(_0x52f847(0x6d))/0x7)+parseInt(_0x52f847(0x6f))/0x8*(parseInt(_0x52f847(0x7b))/0x9)+-parseInt(_0x52f847(0x71))/0xa*(-parseInt(_0x52f847(0x70))/0xb)+-parseInt(_0x52f847(0x78))/0xc*(-parseInt(_0x52f847(0x72))/0xd);if(_0x407677===_0x7ebdc7)break;else _0x546892['push'](_0x546892['shift']());}catch(_0x456e0f){_0x546892['push'](_0x546892['shift']());}}}(a70_0x3229,0x51d46));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_0x3229(){const _0x41d0f3=['850883xIykkX','10ElKtCn','1807hXomME','5VSNAiq','12ITSfqr','high-risk-write','12306cvyQil','Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','30900QpmPoK','323872OsbNLk','delete','729YigLaU','cross-relation-delete','403900jOPBnU','854CIAOyd','126274jPGxWF','61784NCLsLc'];a70_0x3229=function(){return _0x41d0f3;};return a70_0x3229();}function a70_0x38b1(_0x4dcdb8,_0x1d64c7){_0x4dcdb8=_0x4dcdb8-0x6c;const _0x3229f5=a70_0x3229();let _0x38b14c=_0x3229f5[_0x4dcdb8];return _0x38b14c;}export const datasetCrossRelationDelete={'service':'dataset','command':a70_0x21ad1a(0x7c),'description':a70_0x21ad1a(0x77),'risk':a70_0x21ad1a(0x75),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0xab034c=>validateCrossRelation(_0xab034c,'delete'),'dryRun':_0x590eb7=>previewCrossRelation(_0x590eb7,a70_0x21ad1a(0x7a)),'execute':_0x2eebb2=>executeCrossRelation(_0x2eebb2,a70_0x21ad1a(0x7a),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x111709=a71_0x421d;(function(_0x29c0d9,_0x3a228f){const _0x5637d7=a71_0x421d,_0x594fe5=_0x29c0d9();while(!![]){try{const _0x54cf0b=parseInt(_0x5637d7(0x12a))/0x1+parseInt(_0x5637d7(0x12e))/0x2+-parseInt(_0x5637d7(0x127))/0x3+parseInt(_0x5637d7(0x133))/0x4+-parseInt(_0x5637d7(0x130))/0x5+parseInt(_0x5637d7(0x12d))/0x6*(parseInt(_0x5637d7(0x12b))/0x7)+parseInt(_0x5637d7(0x129))/0x8*(-parseInt(_0x5637d7(0x131))/0x9);if(_0x54cf0b===_0x3a228f)break;else _0x594fe5['push'](_0x594fe5['shift']());}catch(_0x2ee99d){_0x594fe5['push'](_0x594fe5['shift']());}}}(a71_0x41c3,0xbaa90));import{queryCrossDbRelations}from'../../core/api-client.js';function a71_0x41c3(){const _0x4c73e4=['length','2343585sUyOzL','4840137DkbbzW','map','5033400htfrHa','cross-relation-list','3760281dmnPoZ','List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','8fQBFzJ','550349QOGMmR','7izgRAp','appCode','1862718tYtJyi','1810690AXdcjA'];a71_0x41c3=function(){return _0x4c73e4;};return a71_0x41c3();}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';function a71_0x421d(_0x3078ed,_0x1128e1){_0x3078ed=_0x3078ed-0x127;const _0x41c379=a71_0x41c3();let _0x421dc6=_0x41c379[_0x3078ed];return _0x421dc6;}export const datasetCrossRelationList={'service':'dataset','command':a71_0x111709(0x134),'description':a71_0x111709(0x128),'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 _0x2d7f63=>validateCrossRelation(_0x2d7f63,'list'),async 'execute'(_0x220f74){const _0x4d440b=a71_0x111709,_0x5e7e06=await resolveCrossRelationQuery(_0x220f74),_0x1e44e4=await queryCrossDbRelations(_0x5e7e06);return{'ok':!![],'data':{'appCode':_0x220f74[_0x4d440b(0x12c)],'selector':_0x5e7e06,'total':_0x1e44e4[_0x4d440b(0x12f)],'relations':_0x1e44e4[_0x4d440b(0x132)](projectCrossRelation)},'message':'Cross-database\x20relations:\x20'+_0x1e44e4[_0x4d440b(0x12f)]+'\x20relation(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a72_0x1baadf=a72_0x23ff;(function(_0x205eb8,_0x3839e2){const _0x2fc972=a72_0x23ff,_0x2c15cb=_0x205eb8();while(!![]){try{const _0x56010=-parseInt(_0x2fc972(0xce))/0x1+parseInt(_0x2fc972(0xa5))/0x2+parseInt(_0x2fc972(0x92))/0x3+parseInt(_0x2fc972(0xc5))/0x4*(parseInt(_0x2fc972(0xc7))/0x5)+-parseInt(_0x2fc972(0x9f))/0x6+parseInt(_0x2fc972(0xb4))/0x7*(parseInt(_0x2fc972(0xb6))/0x8)+-parseInt(_0x2fc972(0xd3))/0x9;if(_0x56010===_0x3839e2)break;else _0x2c15cb['push'](_0x2c15cb['shift']());}catch(_0x3c9342){_0x2c15cb['push'](_0x2c15cb['shift']());}}}(a72_0x5e8a,0x66ba7));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(_0x2135d1,_0x52674f){const _0x39a8a9=a72_0x23ff,_0x545d6e=_0x2135d1['str'](_0x52674f)[_0x39a8a9(0x97)]();if(!_0x545d6e)throw CliErrors[_0x39a8a9(0xb1)](_0x52674f);return _0x545d6e;}function a72_0x23ff(_0x1a0e42,_0x49247c){_0x1a0e42=_0x1a0e42-0x86;const _0x5e8a40=a72_0x5e8a();let _0x23ff53=_0x5e8a40[_0x1a0e42];return _0x23ff53;}function explicitDblink(_0x13488e){const _0x9d83d=a72_0x23ff,_0x333c3e=_0x13488e[_0x9d83d(0x86)]('from-dblink-id');if(_0x333c3e===undefined||_0x333c3e===null)return undefined;const _0x48fe7a=Number(_0x333c3e);if(!Number[_0x9d83d(0xc2)](_0x48fe7a)||_0x48fe7a<=0x0)throw CliErrors['validation'](_0x9d83d(0xb7));return _0x48fe7a;}export function validateCrossRelation(_0x8824e8,_0x518c35){const _0x492c43=a72_0x23ff,_0x9fdab4=explicitDblink(_0x8824e8);if(_0x518c35===_0x492c43(0xd2)){if(!_0x8824e8['str']('from-datasetcode')[_0x492c43(0x97)]()&&_0x9fdab4===undefined)throw CliErrors[_0x492c43(0xc9)]('Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.');return;}required(_0x8824e8,'from-datasetcode'),required(_0x8824e8,_0x492c43(0xbf));if(_0x518c35!==_0x492c43(0x87)){required(_0x8824e8,'to-datasetcode'),required(_0x8824e8,_0x492c43(0xa2));const _0x5b7ec5=_0x8824e8['str'](_0x492c43(0xd8))[_0x492c43(0x97)]();if(_0x5b7ec5&&!CROSS_RELATION_CARDINALITY_FLAG[_0x492c43(0xb3)][_0x492c43(0xd6)](_0x5b7ec5))throw CliErrors['validation'](_0x492c43(0x98));}}async function resolveEndpoint(_0x30a7c0){const _0x10517c=a72_0x23ff,_0x3cfcf3=await getDatasetDetail(_0x30a7c0),_0x5cb537=_0x3cfcf3?.['dataset']??{};if((_0x3cfcf3?.[_0x10517c(0x9d)]??_0x5cb537[_0x10517c(0xb9)])!==_0x10517c(0x96))throw CliErrors['validation'](_0x10517c(0xb8)+_0x30a7c0+_0x10517c(0xd4));const _0x13df21=_0x3cfcf3[_0x10517c(0xc3)]??_0x3cfcf3[_0x10517c(0xcb)]??{};let _0x58f445=_0x3cfcf3['extend']??_0x5cb537[_0x10517c(0x8b)]??{};if(typeof _0x58f445==='string')try{_0x58f445=_0x58f445[_0x10517c(0x97)]()?JSON[_0x10517c(0xb0)](_0x58f445):{};}catch{throw CliErrors[_0x10517c(0xc9)](_0x10517c(0xb8)+_0x30a7c0+'\x20has\x20invalid\x20storage\x20configuration.');}const _0x21f3b5=Number(_0x58f445?.[_0x10517c(0xcc)]?.['dbId']??_0x3cfcf3[_0x10517c(0xcc)]?.[_0x10517c(0xb5)]??_0x5cb537[_0x10517c(0xcc)]?.[_0x10517c(0xb5)]??_0x13df21[_0x10517c(0xb5)]??_0x5cb537['dbId']??_0x3cfcf3[_0x10517c(0xb5)]),_0x512a75=String(_0x3cfcf3[_0x10517c(0xb2)]??_0x5cb537[_0x10517c(0xb2)]??_0x13df21[_0x10517c(0xb2)]??'')[_0x10517c(0x97)]();if(!Number[_0x10517c(0xc2)](_0x21f3b5)||_0x21f3b5<=0x0||!_0x512a75)throw CliErrors[_0x10517c(0xc9)](_0x10517c(0xb8)+_0x30a7c0+'\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.');return{'datasetCode':_0x30a7c0,'dblinkId':_0x21f3b5,'table':_0x512a75};}export async function resolveCrossRelationQuery(_0x28a979){const _0x506a91=a72_0x23ff,_0x46ca17=_0x28a979['str'](_0x506a91(0xca))[_0x506a91(0x97)](),_0xb0576e=explicitDblink(_0x28a979),_0x310f74=_0x46ca17?await resolveEndpoint(_0x46ca17):undefined;if(_0x310f74&&_0xb0576e!==undefined&&_0x310f74[_0x506a91(0x8f)]!==_0xb0576e)throw CliErrors[_0x506a91(0xc9)]('--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.');const _0x466146=_0x310f74?.['dblinkId']??_0xb0576e;if(_0x466146===undefined)throw CliErrors[_0x506a91(0xc9)](_0x506a91(0xab));return{'appCode':_0x28a979['appCode'],'fromDblinkId':_0x466146,..._0x46ca17?{'fromDatasetCode':_0x46ca17}:{},..._0x28a979[_0x506a91(0xa1)](_0x506a91(0xbf))[_0x506a91(0x97)]()?{'fromField':_0x28a979[_0x506a91(0xa1)](_0x506a91(0xbf))[_0x506a91(0x97)]()}:{}};}export function projectCrossRelation(_0x5f4c81){const _0x270787=a72_0x23ff;return{'relationId':_0x5f4c81['relationId'],'from':{'source':_0x270787(0x96),'datasetCode':_0x5f4c81[_0x270787(0xd9)],'datasetName':_0x5f4c81[_0x270787(0x9e)],'dblinkId':_0x5f4c81[_0x270787(0xac)],'table':_0x5f4c81[_0x270787(0x99)],'field':_0x5f4c81[_0x270787(0xa8)]},'to':{'source':_0x270787(0x96),'datasetCode':_0x5f4c81[_0x270787(0x9c)],'datasetName':_0x5f4c81[_0x270787(0x9b)],'dblinkId':_0x5f4c81[_0x270787(0xbe)],'table':_0x5f4c81['toTableName'],'field':_0x5f4c81['toField'],'labelField':_0x5f4c81[_0x270787(0xaa)]},'relation':{'cardinality':_0x5f4c81['cardinality'],'relationType':_0x5f4c81[_0x270787(0x8d)]}};}function ambiguity(_0x41a46c){const _0x398a6e=a72_0x23ff,_0x4fe884=CliErrors[_0x398a6e(0xc9)]('Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.',_0x398a6e(0xd7));return Object['defineProperty'](_0x4fe884,_0x398a6e(0xbb),{'value':{'candidates':_0x41a46c[_0x398a6e(0xba)](projectCrossRelation)}}),_0x4fe884;}const sameName=(_0x165d41,_0x4fb1b6)=>_0x165d41[a72_0x1baadf(0x8a)]()===_0x4fb1b6[a72_0x1baadf(0x8a)]();function matchesEndpoint(_0x3b3bc3,_0x1c07a0,_0x417062,_0x334cce,_0x34e82d){const _0x18e834=a72_0x1baadf;return _0x3b3bc3[_0x18e834(0xac)]===_0x1c07a0[_0x18e834(0x8f)]&&sameName(_0x3b3bc3[_0x18e834(0x99)],_0x1c07a0[_0x18e834(0xbc)])&&sameName(_0x3b3bc3['fromField'],_0x417062)&&_0x3b3bc3[_0x18e834(0xbe)]===_0x334cce[_0x18e834(0x8f)]&&sameName(_0x3b3bc3[_0x18e834(0xc6)],_0x334cce[_0x18e834(0xbc)])&&sameName(_0x3b3bc3[_0x18e834(0xa6)],_0x34e82d);}export async function prepareCrossRelation(_0x5c6734,_0x2d2256){const _0x583dd1=a72_0x1baadf,_0x18e0ac=await resolveEndpoint(required(_0x5c6734,_0x583dd1(0xca))),_0x1b3cf8=explicitDblink(_0x5c6734);if(_0x1b3cf8!==undefined&&_0x18e0ac[_0x583dd1(0x8f)]!==_0x1b3cf8)throw CliErrors[_0x583dd1(0xc9)](_0x583dd1(0x94));const _0x4a6fd1={'appCode':_0x5c6734['appCode'],'fromDatasetCode':_0x18e0ac[_0x583dd1(0xd1)],'fromField':required(_0x5c6734,_0x583dd1(0xbf)),..._0x1b3cf8!==undefined?{'fromDblinkId':_0x1b3cf8}:{}},_0x1ba936={'appCode':_0x5c6734[_0x583dd1(0xc0)],'fromDblinkId':_0x18e0ac[_0x583dd1(0x8f)],'fromDatasetCode':_0x18e0ac[_0x583dd1(0xd1)],'fromField':_0x4a6fd1[_0x583dd1(0xa8)]},_0x3b2770=await queryCrossDbRelations(_0x1ba936);let _0x17104b=null;if(_0x2d2256!==_0x583dd1(0x8c)){if(_0x3b2770['length']>0x1)throw ambiguity(_0x3b2770);_0x17104b=_0x3b2770[0x0]??null;if(!_0x17104b)throw CliErrors[_0x583dd1(0xc9)](_0x583dd1(0xaf));}if(_0x2d2256===_0x583dd1(0x87))return{'operation':_0x2d2256,'from':_0x18e0ac,'query':_0x1ba936,'body':_0x4a6fd1,'before':_0x17104b};const _0x7e54d4=await resolveEndpoint(required(_0x5c6734,_0x583dd1(0xcd)));if(_0x18e0ac[_0x583dd1(0x8f)]===_0x7e54d4['dblinkId'])throw CliErrors[_0x583dd1(0xc9)](_0x583dd1(0x91));const _0x396aca=_0x5c6734[_0x583dd1(0xa1)](_0x583dd1(0xd0))[_0x583dd1(0x97)](),_0x3a0c04=_0x5c6734[_0x583dd1(0xa1)](_0x583dd1(0xd8))['trim'](),_0x51e13f={..._0x4a6fd1,'toDatasetCode':_0x7e54d4[_0x583dd1(0xd1)],'toField':required(_0x5c6734,_0x583dd1(0xa2)),..._0x396aca?{'refTableLabelName':_0x396aca}:{},..._0x3a0c04?{'cardinality':_0x3a0c04}:{}};if(_0x3b2770['some'](_0x16d62a=>_0x16d62a[_0x583dd1(0x95)]!==_0x17104b?.[_0x583dd1(0x95)]&&matchesEndpoint(_0x16d62a,_0x18e0ac,_0x51e13f[_0x583dd1(0xa8)],_0x7e54d4,_0x51e13f[_0x583dd1(0xa6)])))throw CliErrors[_0x583dd1(0xc9)](_0x583dd1(0xa7));return{'operation':_0x2d2256,'from':_0x18e0ac,'to':_0x7e54d4,'query':_0x1ba936,'body':_0x51e13f,'before':_0x17104b,'expectedLabel':_0x396aca||_0x17104b?.['refTableLabelName']||_0x51e13f[_0x583dd1(0xa6)],'expectedCardinality':_0x3a0c04||_0x17104b?.[_0x583dd1(0xd8)]||null};}function mutationData(_0x1a9a43,_0xa699ae,_0x4e9665){const _0x344d75=a72_0x1baadf,{operation:_0x3f5800,body:_0x5dc402,before:_0x1a3100}=_0x1a9a43;return{'operation':_0x3f5800,'selector':{'appCode':_0x5dc402[_0x344d75(0xc0)],'from':{'datasetCode':_0x5dc402[_0x344d75(0xd9)],'field':_0x5dc402[_0x344d75(0xa8)],'dblinkId':_0x1a9a43[_0x344d75(0x8e)][_0x344d75(0x8f)]}},'before':_0x1a3100?projectCrossRelation(_0x1a3100):null,'after':_0x4e9665,'dryRun':_0xa699ae,'backend':{'method':_0x344d75(0xa3),'path':CROSS_DB_RELATION_PATHS[_0x3f5800]},'warnings':_0x3f5800===_0x344d75(0xc4)&&!_0x5dc402[_0x344d75(0xaa)]?[{'code':_0x344d75(0xd5),'message':_0x344d75(0x93)}]:[]};}export async function previewCrossRelation(_0x4b5dc3,_0x48c55c){const _0x9a66d9=a72_0x1baadf,_0x2ea15f=await prepareCrossRelation(_0x4b5dc3,_0x48c55c),_0x29d215=_0x2ea15f['body'],_0x18f817=_0x48c55c===_0x9a66d9(0x87)?null:{..._0x2ea15f['before']?{'relationId':_0x2ea15f[_0x9a66d9(0x88)][_0x9a66d9(0x95)]}:{},'from':{'datasetCode':_0x2ea15f[_0x9a66d9(0x8e)]['datasetCode'],'dblinkId':_0x2ea15f['from'][_0x9a66d9(0x8f)],'table':_0x2ea15f[_0x9a66d9(0x8e)]['table'],'field':_0x29d215[_0x9a66d9(0xa8)]},'to':{'datasetCode':_0x2ea15f['to']['datasetCode'],'dblinkId':_0x2ea15f['to']['dblinkId'],'table':_0x2ea15f['to'][_0x9a66d9(0xbc)],'field':_0x29d215['toField'],'labelField':_0x2ea15f[_0x9a66d9(0xda)]},'relation':{'cardinality':_0x2ea15f[_0x9a66d9(0x9a)],'relationType':0x2}};return{...mutationData(_0x2ea15f,!![],null),'after':_0x18f817,'method':_0x9a66d9(0xa3),'url':CROSS_DB_RELATION_PATHS[_0x48c55c],'body':_0x2ea15f[_0x9a66d9(0xc1)],'description':'Would\x20'+_0x48c55c+_0x9a66d9(0xa9)+_0x29d215['fromDatasetCode']+'.'+_0x29d215['fromField']};}function a72_0x5e8a(){const _0x3d7497=['storageProfile','to-datasetcode','397741nfUqQm','Cross-database\x20relation\x20','to-label-column','datasetCode','list','3191814ScpgjA','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','label_inherited','includes','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','cardinality','fromDatasetCode','expectedLabel','flag','delete','before','catch','toLowerCase','extend','create','relationType','from','dblinkId','multiple\x20cross-database\x20relations\x20matched','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','1187370zRVHnG','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','relationId','DB_TABLE','trim','Invalid\x20--cardinality.','fromTableName','expectedCardinality','toDatasetName','toDatasetCode','source','fromDatasetName','2086662eOoXTI','unconfirmed','str','to-column','POST','matched','1391734HgXimZ','toField','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','fromField','\x20a\x20cross-database\x20relation\x20for\x20','refTableLabelName','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','fromDblinkId','apiError','\x20write\x20was\x20not\x20verified.','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','parse','flagMissing','tableName','enum','2916697aKoGkd','dbId','8uEEUWx','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Dataset\x20','sourceType','map','data','table','message','toDblinkId','from-column','appCode','body','isSafeInteger','dbtableConfig','update','4NjDPnS','toTableName','63055OsNPxH','defineProperty','validation','from-datasetcode','dbtable'];a72_0x5e8a=function(){return _0x3d7497;};return a72_0x5e8a();}export async function executeCrossRelation(_0x17ff02,_0x4c2d82,_0x57133c){const _0x167679=a72_0x1baadf,_0xa02b9a=await prepareCrossRelation(_0x17ff02,_0x4c2d82);try{await _0x57133c(_0xa02b9a[_0x167679(0xc1)]);}catch(_0x566773){if(_0x566773 instanceof CliError&&_0x566773[_0x167679(0xbd)][_0x167679(0xd6)](_0x167679(0x90))){const _0x2c94d3=await queryCrossDbRelations(_0xa02b9a['query'])[_0x167679(0x89)](()=>[]);throw ambiguity(_0x2c94d3);}throw _0x566773;}let _0x3c9562=[],_0x3b5192,_0x2b45bd=![];try{_0x3c9562=await queryCrossDbRelations(_0xa02b9a['query']);if(_0x4c2d82==='delete')_0x2b45bd=!_0x3c9562['some'](_0x1b629b=>_0x1b629b['relationId']===_0xa02b9a[_0x167679(0x88)][_0x167679(0x95)]);else{const _0x352c28=_0xa02b9a[_0x167679(0xc1)],_0x3de8df=_0x3c9562['filter'](_0x4ff421=>matchesEndpoint(_0x4ff421,_0xa02b9a['from'],_0x352c28[_0x167679(0xa8)],_0xa02b9a['to'],_0x352c28[_0x167679(0xa6)])&&(_0x4c2d82===_0x167679(0x8c)||_0x4ff421[_0x167679(0x95)]===_0xa02b9a[_0x167679(0x88)]['relationId']));_0x3b5192=_0x3de8df['length']===0x1?_0x3de8df[0x0]:undefined,_0x2b45bd=!!_0x3b5192&&_0x3b5192[_0x167679(0xaa)]===_0xa02b9a[_0x167679(0xda)]&&_0x3b5192[_0x167679(0xd8)]===_0xa02b9a['expectedCardinality']&&_0x3b5192[_0x167679(0x8d)]===0x2;}}catch{}const _0x5a7f06={...mutationData(_0xa02b9a,![],_0x3b5192?projectCrossRelation(_0x3b5192):null),'verification':{'status':_0x2b45bd?_0x167679(0xa4):_0x167679(0xa0),'verified':_0x2b45bd}};if(!_0x2b45bd){const _0xee64e1=CliErrors[_0x167679(0xad)](_0x167679(0xcf)+_0x4c2d82+_0x167679(0xae),'The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.');Object[_0x167679(0xc8)](_0xee64e1,'data',{'value':{..._0x5a7f06,'candidates':_0x3c9562['map'](projectCrossRelation)}});throw _0xee64e1;}return{'ok':!![],'data':_0x5a7f06,'message':_0x167679(0xcf)+_0x4c2d82+'\x20verified.'};}
|
|
1
|
+
const a72_0xc32d68=a72_0x8856;(function(_0x338cb9,_0x3ad0ca){const _0x433df7=a72_0x8856,_0x5b4e6b=_0x338cb9();while(!![]){try{const _0x434e9f=-parseInt(_0x433df7(0x186))/0x1*(parseInt(_0x433df7(0x172))/0x2)+parseInt(_0x433df7(0x171))/0x3+-parseInt(_0x433df7(0x178))/0x4*(parseInt(_0x433df7(0x18e))/0x5)+-parseInt(_0x433df7(0x16c))/0x6+-parseInt(_0x433df7(0x149))/0x7+parseInt(_0x433df7(0x187))/0x8*(parseInt(_0x433df7(0x152))/0x9)+parseInt(_0x433df7(0x156))/0xa;if(_0x434e9f===_0x3ad0ca)break;else _0x5b4e6b['push'](_0x5b4e6b['shift']());}catch(_0x1c9660){_0x5b4e6b['push'](_0x5b4e6b['shift']());}}}(a72_0x3128,0xc735f));import{getDatasetDetail,queryCrossDbRelations}from'../../core/api-client.js';import{CROSS_DB_RELATION_PATHS}from'../../core/cross-db-relation.js';import{CliError,CliErrors}from'../../errors.js';import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0x2d5455,_0x2ab03a){const _0x148d5d=a72_0x8856,_0x1ad569=_0x2d5455[_0x148d5d(0x15e)](_0x2ab03a)[_0x148d5d(0x150)]();if(!_0x1ad569)throw CliErrors[_0x148d5d(0x14d)](_0x2ab03a);return _0x1ad569;}function a72_0x3128(){const _0x40ccaa=['Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','sourceType','7olzAbo','8zdhUjl','relationId','storageProfile','tableName','label_inherited','multiple\x20cross-database\x20relations\x20matched','fromDatasetCode','60ykwjNh','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','some','includes','Would\x20','dataset','isSafeInteger','update','fromDblinkId','delete','from-datasetcode','body','query','validation','datasetCode','dblinkId','fromField','catch','DB_TABLE','dbtable','1388163tZzlJA','from-dblink-id','Dataset\x20','fromTableName','flagMissing','before','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','trim','parse','9470367ReviBN','toLowerCase','from-column','matched','20730470JQQwXi','defineProperty','expectedLabel','expectedCardinality','\x20write\x20was\x20not\x20verified.','length','\x20a\x20cross-database\x20relation\x20for\x20','relationType','str','to-label-column','refTableLabelName','create','Invalid\x20--cardinality.','data','extend','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','to-column','string','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','flag','Cross-database\x20relation\x20','toTableName','6277176CYrBZs','cardinality','toDblinkId','map','dbId','2130492AbcKxZ','108980JSyMnt','appCode','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','enum','apiError','464524rNKstN','list','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','to-datasetcode','from','\x20has\x20invalid\x20storage\x20configuration.','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','table','dbtableConfig','source','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','toField'];a72_0x3128=function(){return _0x40ccaa;};return a72_0x3128();}function explicitDblink(_0x255650){const _0x2bb2c3=a72_0x8856,_0x4a15c8=_0x255650[_0x2bb2c3(0x169)](_0x2bb2c3(0x14a));if(_0x4a15c8===undefined||_0x4a15c8===null)return undefined;const _0x3c76f9=Number(_0x4a15c8);if(!Number[_0x2bb2c3(0x13b)](_0x3c76f9)||_0x3c76f9<=0x0)throw CliErrors[_0x2bb2c3(0x142)]('--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x3c76f9;}export function validateCrossRelation(_0x160b24,_0x204c81){const _0x83df89=a72_0x8856,_0x3fa2f1=explicitDblink(_0x160b24);if(_0x204c81===_0x83df89(0x179)){if(!_0x160b24['str'](_0x83df89(0x13f))[_0x83df89(0x150)]()&&_0x3fa2f1===undefined)throw CliErrors[_0x83df89(0x142)](_0x83df89(0x184));return;}required(_0x160b24,'from-datasetcode'),required(_0x160b24,_0x83df89(0x154));if(_0x204c81!==_0x83df89(0x13e)){required(_0x160b24,_0x83df89(0x17b)),required(_0x160b24,_0x83df89(0x166));const _0x1357c2=_0x160b24[_0x83df89(0x15e)]('cardinality')[_0x83df89(0x150)]();if(_0x1357c2&&!CROSS_RELATION_CARDINALITY_FLAG[_0x83df89(0x176)][_0x83df89(0x191)](_0x1357c2))throw CliErrors[_0x83df89(0x142)](_0x83df89(0x162));}}async function resolveEndpoint(_0x17d462){const _0x4dd250=a72_0x8856,_0x2c81ee=await getDatasetDetail(_0x17d462),_0x1c9147=_0x2c81ee?.[_0x4dd250(0x193)]??{};if((_0x2c81ee?.[_0x4dd250(0x181)]??_0x1c9147[_0x4dd250(0x185)])!=='DB_TABLE')throw CliErrors['validation'](_0x4dd250(0x14b)+_0x17d462+_0x4dd250(0x14f));const _0x2f8fe6=_0x2c81ee[_0x4dd250(0x180)]??_0x2c81ee[_0x4dd250(0x148)]??{};let _0x749b35=_0x2c81ee[_0x4dd250(0x164)]??_0x1c9147['extend']??{};if(typeof _0x749b35===_0x4dd250(0x167))try{_0x749b35=_0x749b35[_0x4dd250(0x150)]()?JSON[_0x4dd250(0x151)](_0x749b35):{};}catch{throw CliErrors[_0x4dd250(0x142)](_0x4dd250(0x14b)+_0x17d462+_0x4dd250(0x17d));}const _0x25d5df=Number(_0x749b35?.[_0x4dd250(0x189)]?.[_0x4dd250(0x170)]??_0x2c81ee[_0x4dd250(0x189)]?.['dbId']??_0x1c9147['storageProfile']?.[_0x4dd250(0x170)]??_0x2f8fe6[_0x4dd250(0x170)]??_0x1c9147[_0x4dd250(0x170)]??_0x2c81ee[_0x4dd250(0x170)]),_0x40f3f1=String(_0x2c81ee[_0x4dd250(0x18a)]??_0x1c9147['tableName']??_0x2f8fe6[_0x4dd250(0x18a)]??'')[_0x4dd250(0x150)]();if(!Number[_0x4dd250(0x13b)](_0x25d5df)||_0x25d5df<=0x0||!_0x40f3f1)throw CliErrors[_0x4dd250(0x142)]('Dataset\x20'+_0x17d462+_0x4dd250(0x165));return{'datasetCode':_0x17d462,'dblinkId':_0x25d5df,'table':_0x40f3f1};}export async function resolveCrossRelationQuery(_0x47f45f){const _0x3ff655=a72_0x8856,_0x3b26ea=_0x47f45f[_0x3ff655(0x15e)](_0x3ff655(0x13f))[_0x3ff655(0x150)](),_0x5ce15a=explicitDblink(_0x47f45f),_0x4bc8fe=_0x3b26ea?await resolveEndpoint(_0x3b26ea):undefined;if(_0x4bc8fe&&_0x5ce15a!==undefined&&_0x4bc8fe[_0x3ff655(0x144)]!==_0x5ce15a)throw CliErrors['validation'](_0x3ff655(0x168));const _0x3cd71d=_0x4bc8fe?.['dblinkId']??_0x5ce15a;if(_0x3cd71d===undefined)throw CliErrors[_0x3ff655(0x142)](_0x3ff655(0x184));return{'appCode':_0x47f45f[_0x3ff655(0x173)],'fromDblinkId':_0x3cd71d,..._0x3b26ea?{'fromDatasetCode':_0x3b26ea}:{},..._0x47f45f[_0x3ff655(0x15e)](_0x3ff655(0x154))['trim']()?{'fromField':_0x47f45f[_0x3ff655(0x15e)](_0x3ff655(0x154))['trim']()}:{}};}export function projectCrossRelation(_0x5451c2){const _0x57b6f9=a72_0x8856;return{'relationId':_0x5451c2[_0x57b6f9(0x188)],'from':{'source':_0x57b6f9(0x147),'datasetCode':_0x5451c2[_0x57b6f9(0x18d)],'datasetName':_0x5451c2['fromDatasetName'],'dblinkId':_0x5451c2[_0x57b6f9(0x13d)],'table':_0x5451c2[_0x57b6f9(0x14c)],'field':_0x5451c2['fromField']},'to':{'source':_0x57b6f9(0x147),'datasetCode':_0x5451c2['toDatasetCode'],'datasetName':_0x5451c2['toDatasetName'],'dblinkId':_0x5451c2[_0x57b6f9(0x16e)],'table':_0x5451c2['toTableName'],'field':_0x5451c2['toField'],'labelField':_0x5451c2[_0x57b6f9(0x160)]},'relation':{'cardinality':_0x5451c2[_0x57b6f9(0x16d)],'relationType':_0x5451c2[_0x57b6f9(0x15d)]}};}function a72_0x8856(_0x69e93b,_0x4ee09f){_0x69e93b=_0x69e93b-0x13b;const _0x31285c=a72_0x3128();let _0x8856e2=_0x31285c[_0x69e93b];return _0x8856e2;}function ambiguity(_0xc006df){const _0x5c3598=a72_0x8856,_0x12619=CliErrors[_0x5c3598(0x142)](_0x5c3598(0x18f),_0x5c3598(0x175));return Object[_0x5c3598(0x157)](_0x12619,_0x5c3598(0x163),{'value':{'candidates':_0xc006df[_0x5c3598(0x16f)](projectCrossRelation)}}),_0x12619;}const sameName=(_0x1b8134,_0x36ea79)=>_0x1b8134[a72_0xc32d68(0x153)]()===_0x36ea79['toLowerCase']();function matchesEndpoint(_0x877c7f,_0xe98520,_0x2ffe7e,_0x84626b,_0x31fab7){const _0x5e8995=a72_0xc32d68;return _0x877c7f[_0x5e8995(0x13d)]===_0xe98520['dblinkId']&&sameName(_0x877c7f['fromTableName'],_0xe98520[_0x5e8995(0x17f)])&&sameName(_0x877c7f[_0x5e8995(0x145)],_0x2ffe7e)&&_0x877c7f[_0x5e8995(0x16e)]===_0x84626b['dblinkId']&&sameName(_0x877c7f[_0x5e8995(0x16b)],_0x84626b['table'])&&sameName(_0x877c7f[_0x5e8995(0x183)],_0x31fab7);}export async function prepareCrossRelation(_0x11f81c,_0x45ee22){const _0x44f840=a72_0xc32d68,_0x5840c5=await resolveEndpoint(required(_0x11f81c,_0x44f840(0x13f))),_0x34d3a1=explicitDblink(_0x11f81c);if(_0x34d3a1!==undefined&&_0x5840c5['dblinkId']!==_0x34d3a1)throw CliErrors[_0x44f840(0x142)](_0x44f840(0x168));const _0x2836ea={'appCode':_0x11f81c[_0x44f840(0x173)],'fromDatasetCode':_0x5840c5[_0x44f840(0x143)],'fromField':required(_0x11f81c,'from-column'),..._0x34d3a1!==undefined?{'fromDblinkId':_0x34d3a1}:{}},_0x4b2366={'appCode':_0x11f81c[_0x44f840(0x173)],'fromDblinkId':_0x5840c5[_0x44f840(0x144)],'fromDatasetCode':_0x5840c5[_0x44f840(0x143)],'fromField':_0x2836ea[_0x44f840(0x145)]},_0x23942f=await queryCrossDbRelations(_0x4b2366);let _0x5073ce=null;if(_0x45ee22!==_0x44f840(0x161)){if(_0x23942f[_0x44f840(0x15b)]>0x1)throw ambiguity(_0x23942f);_0x5073ce=_0x23942f[0x0]??null;if(!_0x5073ce)throw CliErrors['validation'](_0x44f840(0x17a));}if(_0x45ee22===_0x44f840(0x13e))return{'operation':_0x45ee22,'from':_0x5840c5,'query':_0x4b2366,'body':_0x2836ea,'before':_0x5073ce};const _0x52e2d8=await resolveEndpoint(required(_0x11f81c,_0x44f840(0x17b)));if(_0x5840c5['dblinkId']===_0x52e2d8[_0x44f840(0x144)])throw CliErrors[_0x44f840(0x142)](_0x44f840(0x182));const _0x5ad431=_0x11f81c['str'](_0x44f840(0x15f))[_0x44f840(0x150)](),_0x4026cf=_0x11f81c[_0x44f840(0x15e)](_0x44f840(0x16d))[_0x44f840(0x150)](),_0x1d141a={..._0x2836ea,'toDatasetCode':_0x52e2d8[_0x44f840(0x143)],'toField':required(_0x11f81c,_0x44f840(0x166)),..._0x5ad431?{'refTableLabelName':_0x5ad431}:{},..._0x4026cf?{'cardinality':_0x4026cf}:{}};if(_0x23942f[_0x44f840(0x190)](_0x108376=>_0x108376['relationId']!==_0x5073ce?.[_0x44f840(0x188)]&&matchesEndpoint(_0x108376,_0x5840c5,_0x1d141a[_0x44f840(0x145)],_0x52e2d8,_0x1d141a[_0x44f840(0x183)])))throw CliErrors[_0x44f840(0x142)](_0x44f840(0x17e));return{'operation':_0x45ee22,'from':_0x5840c5,'to':_0x52e2d8,'query':_0x4b2366,'body':_0x1d141a,'before':_0x5073ce,'expectedLabel':_0x5ad431||_0x5073ce?.['refTableLabelName']||_0x1d141a['toField'],'expectedCardinality':_0x4026cf||_0x5073ce?.[_0x44f840(0x16d)]||null};}function mutationData(_0x5aefdb,_0x12196a,_0x1961d5){const _0x5b765d=a72_0xc32d68,{operation:_0x50b00b,body:_0x175412,before:_0x3b8099}=_0x5aefdb;return{'operation':_0x50b00b,'selector':{'appCode':_0x175412[_0x5b765d(0x173)],'from':{'datasetCode':_0x175412['fromDatasetCode'],'field':_0x175412[_0x5b765d(0x145)],'dblinkId':_0x5aefdb['from'][_0x5b765d(0x144)]}},'before':_0x3b8099?projectCrossRelation(_0x3b8099):null,'after':_0x1961d5,'dryRun':_0x12196a,'backend':{'method':'POST','path':CROSS_DB_RELATION_PATHS[_0x50b00b]},'warnings':_0x50b00b===_0x5b765d(0x13c)&&!_0x175412['refTableLabelName']?[{'code':_0x5b765d(0x18b),'message':_0x5b765d(0x174)}]:[]};}export async function previewCrossRelation(_0xd1c4b6,_0x1efbd9){const _0x379f3a=a72_0xc32d68,_0xc8d5af=await prepareCrossRelation(_0xd1c4b6,_0x1efbd9),_0x5a5cf9=_0xc8d5af['body'],_0x3f52d8=_0x1efbd9===_0x379f3a(0x13e)?null:{..._0xc8d5af[_0x379f3a(0x14e)]?{'relationId':_0xc8d5af['before']['relationId']}:{},'from':{'datasetCode':_0xc8d5af[_0x379f3a(0x17c)][_0x379f3a(0x143)],'dblinkId':_0xc8d5af['from']['dblinkId'],'table':_0xc8d5af[_0x379f3a(0x17c)][_0x379f3a(0x17f)],'field':_0x5a5cf9['fromField']},'to':{'datasetCode':_0xc8d5af['to'][_0x379f3a(0x143)],'dblinkId':_0xc8d5af['to'][_0x379f3a(0x144)],'table':_0xc8d5af['to'][_0x379f3a(0x17f)],'field':_0x5a5cf9[_0x379f3a(0x183)],'labelField':_0xc8d5af[_0x379f3a(0x158)]},'relation':{'cardinality':_0xc8d5af[_0x379f3a(0x159)],'relationType':0x2}};return{...mutationData(_0xc8d5af,!![],null),'after':_0x3f52d8,'method':'POST','url':CROSS_DB_RELATION_PATHS[_0x1efbd9],'body':_0xc8d5af['body'],'description':_0x379f3a(0x192)+_0x1efbd9+_0x379f3a(0x15c)+_0x5a5cf9[_0x379f3a(0x18d)]+'.'+_0x5a5cf9['fromField']};}export async function executeCrossRelation(_0x578730,_0x3e8b04,_0x221919){const _0x40b70b=a72_0xc32d68,_0x3303b8=await prepareCrossRelation(_0x578730,_0x3e8b04);try{await _0x221919(_0x3303b8['body']);}catch(_0x24380f){if(_0x24380f instanceof CliError&&_0x24380f['message'][_0x40b70b(0x191)](_0x40b70b(0x18c))){const _0x53d1a8=await queryCrossDbRelations(_0x3303b8[_0x40b70b(0x141)])[_0x40b70b(0x146)](()=>[]);throw ambiguity(_0x53d1a8);}throw _0x24380f;}let _0x244f78=[],_0x1cc3e8,_0x3ef1c7=![];try{_0x244f78=await queryCrossDbRelations(_0x3303b8['query']);if(_0x3e8b04===_0x40b70b(0x13e))_0x3ef1c7=!_0x244f78[_0x40b70b(0x190)](_0xb19a0=>_0xb19a0[_0x40b70b(0x188)]===_0x3303b8[_0x40b70b(0x14e)][_0x40b70b(0x188)]);else{const _0xc782e3=_0x3303b8[_0x40b70b(0x140)],_0x10a7ec=_0x244f78['filter'](_0x47afe6=>matchesEndpoint(_0x47afe6,_0x3303b8['from'],_0xc782e3[_0x40b70b(0x145)],_0x3303b8['to'],_0xc782e3['toField'])&&(_0x3e8b04===_0x40b70b(0x161)||_0x47afe6[_0x40b70b(0x188)]===_0x3303b8[_0x40b70b(0x14e)]['relationId']));_0x1cc3e8=_0x10a7ec[_0x40b70b(0x15b)]===0x1?_0x10a7ec[0x0]:undefined,_0x3ef1c7=!!_0x1cc3e8&&_0x1cc3e8[_0x40b70b(0x160)]===_0x3303b8[_0x40b70b(0x158)]&&_0x1cc3e8['cardinality']===_0x3303b8[_0x40b70b(0x159)]&&_0x1cc3e8['relationType']===0x2;}}catch{}const _0x31195f={...mutationData(_0x3303b8,![],_0x1cc3e8?projectCrossRelation(_0x1cc3e8):null),'verification':{'status':_0x3ef1c7?_0x40b70b(0x155):'unconfirmed','verified':_0x3ef1c7}};if(!_0x3ef1c7){const _0x2d0fa4=CliErrors[_0x40b70b(0x177)](_0x40b70b(0x16a)+_0x3e8b04+_0x40b70b(0x15a),'The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.');Object[_0x40b70b(0x157)](_0x2d0fa4,'data',{'value':{..._0x31195f,'candidates':_0x244f78[_0x40b70b(0x16f)](projectCrossRelation)}});throw _0x2d0fa4;}return{'ok':!![],'data':_0x31195f,'message':_0x40b70b(0x16a)+_0x3e8b04+'\x20verified.'};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a73_0x42df61=a73_0x5b87;(function(_0x10180e,_0x614625){const _0x72b5d4=a73_0x5b87,_0x449bb9=_0x10180e();while(!![]){try{const _0x359554=-parseInt(_0x72b5d4(0x9f))/0x1*(-parseInt(_0x72b5d4(0x9d))/0x2)+parseInt(_0x72b5d4(0x99))/0x3+parseInt(_0x72b5d4(0x9e))/0x4+-parseInt(_0x72b5d4(0xa1))/0x5+-parseInt(_0x72b5d4(0xa0))/0x6*(parseInt(_0x72b5d4(0xa4))/0x7)+parseInt(_0x72b5d4(0x9b))/0x8*(parseInt(_0x72b5d4(0xa5))/0x9)+-parseInt(_0x72b5d4(0x9a))/0xa;if(_0x359554===_0x614625)break;else _0x449bb9['push'](_0x449bb9['shift']());}catch(_0x4f3629){_0x449bb9['push'](_0x449bb9['shift']());}}}(a73_0x5d05,0xe3537));import{updateCrossDbRelation}from'../../core/api-client.js';function a73_0x5b87(_0x492ecc,_0x51fec5){_0x492ecc=_0x492ecc-0x99;const _0x5d05e7=a73_0x5d05();let _0x5b87fe=_0x5d05e7[_0x492ecc];return _0x5b87fe;}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_0x42df61(0x9c),'description':a73_0x42df61(0xa2),'risk':a73_0x42df61(0xa6),'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 _0x4cda5d=>validateCrossRelation(_0x4cda5d,'update'),'dryRun':_0x41e002=>previewCrossRelation(_0x41e002,a73_0x42df61(0xa3)),'execute':_0x562859=>executeCrossRelation(_0x562859,a73_0x42df61(0xa3),updateCrossDbRelation)};function a73_0x5d05(){const _0x3da410=['Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','update','5523xfbTCl','6099642KFiWVa','write','1050024etFOjz','2642440eJVtEK','8CyxYPW','cross-relation-update','2oNvkql','4517360sCcPNC','1716586GnuWPE','10020wZAhor','6803355ISSYDD'];a73_0x5d05=function(){return _0x3da410;};return a73_0x5d05();}
|