@lovrabet/rabetbase-cli 2.5.3-beta.3 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/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/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/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/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/service.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/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/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.d.ts +5 -3
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-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-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/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.d.ts +7 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -1
- package/skills/rabetbase/SKILL.md +7 -5
- package/skills/rabetbase/guides/backend-function.md +5 -1
- package/skills/rabetbase/guides/bff-creation-workflow.md +3 -1
- package/skills/rabetbase/guides/cross-database-bff.md +70 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +35 -33
- package/skills/rabetbase/guides/sql-creation-workflow.md +2 -0
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +5 -1
- package/skills/rabetbase.manifest.json +4 -3
- package/templates/README.md +41 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a58_0x36ec76=a58_0x16ce;function a58_0x16ce(_0x1fa659,_0xf351e6){_0x1fa659=_0x1fa659-0x1bb;const _0x1f1702=a58_0x1f17();let _0x16ce6a=_0x1f1702[_0x1fa659];return _0x16ce6a;}(function(_0x500071,_0x304335){const _0x5d51c0=a58_0x16ce,_0x479e32=_0x500071();while(!![]){try{const _0x523715=parseInt(_0x5d51c0(0x1bf))/0x1+parseInt(_0x5d51c0(0x1d0))/0x2*(-parseInt(_0x5d51c0(0x1c1))/0x3)+parseInt(_0x5d51c0(0x1c9))/0x4+parseInt(_0x5d51c0(0x1c4))/0x5*(-parseInt(_0x5d51c0(0x1c0))/0x6)+-parseInt(_0x5d51c0(0x1c7))/0x7+parseInt(_0x5d51c0(0x1bb))/0x8*(parseInt(_0x5d51c0(0x1be))/0x9)+-parseInt(_0x5d51c0(0x1bc))/0xa;if(_0x523715===_0x304335)break;else _0x479e32['push'](_0x479e32['shift']());}catch(_0x48ddb5){_0x479e32['push'](_0x479e32['shift']());}}}(a58_0x1f17,0x95350));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(_0x11047d){const _0x13bf4c=a58_0x16ce,_0x3c4b80=_0x11047d['str'](_0x13bf4c(0x1c2));if(!_0x3c4b80)throw CliErrors['validation']('Missing\x20key.','Usage:\x20'+CLI_BIN_NAME+_0x13bf4c(0x1cd));const _0x524ce4=readConfig(),_0x30ba3b=_0x3c4b80===_0x13bf4c(0x1cb)?_0x13bf4c(0x1c8):_0x3c4b80,_0x29db0f=_0x524ce4[_0x30ba3b];if(_0x29db0f===undefined)throw CliErrors[_0x13bf4c(0x1bd)](_0x13bf4c(0x1cc)+_0x3c4b80);return{'ok':!![],'data':typeof _0x29db0f==='object'?_0x29db0f:{[_0x30ba3b]:_0x29db0f},'message':typeof _0x29db0f===_0x13bf4c(0x1c3)?undefined:String(_0x29db0f)};}export const configGetDefinition={'service':a58_0x36ec76(0x1ce),'command':a58_0x36ec76(0x1ca),'description':a58_0x36ec76(0x1c5),'risk':a58_0x36ec76(0x1c6),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a58_0x36ec76(0x1c2),'type':a58_0x36ec76(0x1cf),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};function a58_0x1f17(){const _0x5c23c7=['388120SfDlbn','7480630gEpwNt','validation','198kowaut','792567UfINsJ','2731110wycTci','147CqkCwm','key','object','5LiLsFd','Get\x20a\x20config\x20value\x20by\x20key','read','4278603tWBUcg','appcode','4597092TlTyHF','get','app','Key\x20not\x20found:\x20','\x20config\x20get\x20--key\x20<key>','config','string','23818pauVoF'];a58_0x1f17=function(){return _0x5c23c7;};return a58_0x1f17();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1d152e,_0x84c90f){const _0x47b021=a59_0x4d4e,_0x390cb2=_0x1d152e();while(!![]){try{const _0x459a8d=parseInt(_0x47b021(0x93))/0x1+-parseInt(_0x47b021(0x8c))/0x2+-parseInt(_0x47b021(0x8d))/0x3+parseInt(_0x47b021(0x8e))/0x4*(parseInt(_0x47b021(0x91))/0x5)+-parseInt(_0x47b021(0x90))/0x6+-parseInt(_0x47b021(0x92))/0x7+-parseInt(_0x47b021(0x8f))/0x8*(-parseInt(_0x47b021(0x94))/0x9);if(_0x459a8d===_0x84c90f)break;else _0x390cb2['push'](_0x390cb2['shift']());}catch(_0x1b05cd){_0x390cb2['push'](_0x390cb2['shift']());}}}(a59_0x1214,0x5e0ab));function a59_0x4d4e(_0x4366a1,_0x357e7e){_0x4366a1=_0x4366a1-0x8c;const _0x1214c7=a59_0x1214();let _0x4d4ec8=_0x1214c7[_0x4366a1];return _0x4d4ec8;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a59_0x1214(){const _0x5584ae=['794178pFBdHY','1488SucJnA','6688976NdcQee','4303710BFjKip','9340arWiBE','3597314WNPTKF','399374zgJcem','9xGPcdj','98568vwJJfd'];a59_0x1214=function(){return _0x5584ae;};return a59_0x1214();}import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a60_0x22f5f9=a60_0x2843;(function(_0x27c302,_0x1f2935){const _0x3a0a33=a60_0x2843,_0x57c296=_0x27c302();while(!![]){try{const _0x2f898a=-parseInt(_0x3a0a33(0x1f5))/0x1*(-parseInt(_0x3a0a33(0x1ed))/0x2)+-parseInt(_0x3a0a33(0x1f7))/0x3+-parseInt(_0x3a0a33(0x1da))/0x4*(-parseInt(_0x3a0a33(0x1e0))/0x5)+-parseInt(_0x3a0a33(0x1d6))/0x6*(-parseInt(_0x3a0a33(0x1ea))/0x7)+parseInt(_0x3a0a33(0x1e1))/0x8+-parseInt(_0x3a0a33(0x1f3))/0x9*(-parseInt(_0x3a0a33(0x200))/0xa)+-parseInt(_0x3a0a33(0x1e3))/0xb;if(_0x2f898a===_0x1f2935)break;else _0x57c296['push'](_0x57c296['shift']());}catch(_0x3f0100){_0x57c296['push'](_0x57c296['shift']());}}}(a60_0x5916,0xd84b7));function a60_0x5916(){const _0x126b92=['2lHhquO','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','enterprise-v1','write','manifestDomains','map','44559ALbDdJ','region','138077EFQizE','ExitPromptError','604620lAwjMx','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','Custom\x20Runtime\x20HTTPS\x20origin','Custom\x20User\x20HTTPS\x20origin','Select\x20Lovrabet\x20region','nonInteractive','assign','global','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','1310rpCSjO','Independent-deployment\x20Domain\x20JSON\x20file','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','kb-domain','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','length','Custom\x20certificate\x20service\x20HTTPS\x20origin','str','Custom\x20knowledge-base\x20HTTPS\x20origin','Custom\x20SkillHub\x20HTTPS\x20origin','runtime-domain','cdn','project','74322mwwhMS','join','user-domain','name','26916BwXBlo','localDomain','domains','independent','mode','app-domain','185aQdHcF','14084696amDIVe','domain-config','28197818YVOXBr','api-domain','string','Custom\x20platform\x20API\x20HTTPS\x20origin','label','Custom\x20local\x20callback\x20HTTPS\x20origin','validation','483HBImPe','Available\x20regions:\x20','keys'];a60_0x5916=function(){return _0x126b92;};return a60_0x5916();}import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';function a60_0x2843(_0x4478c4,_0xf10c0b){_0x4478c4=_0x4478c4-0x1d3;const _0x591602=a60_0x5916();let _0x2843e4=_0x591602[_0x4478c4];return _0x2843e4;}import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a60_0x22f5f9(0x1f4),'type':a60_0x22f5f9(0x1e5),'description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES[a60_0x22f5f9(0x1d7)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a60_0x22f5f9(0x1e2),'type':a60_0x22f5f9(0x1e5),'description':a60_0x22f5f9(0x201)},{'name':a60_0x22f5f9(0x1d8),'type':'string','description':a60_0x22f5f9(0x1fa)},{'name':a60_0x22f5f9(0x1e4),'type':a60_0x22f5f9(0x1e5),'description':a60_0x22f5f9(0x1e6)},{'name':a60_0x22f5f9(0x1d3),'type':'string','description':a60_0x22f5f9(0x1f9)},{'name':'skill-domain','type':a60_0x22f5f9(0x1e5),'description':a60_0x22f5f9(0x209)},{'name':a60_0x22f5f9(0x203),'type':a60_0x22f5f9(0x1e5),'description':a60_0x22f5f9(0x208)},{'name':a60_0x22f5f9(0x1df),'type':a60_0x22f5f9(0x1e5),'description':'Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin'},{'name':'local-domain','type':a60_0x22f5f9(0x1e5),'description':a60_0x22f5f9(0x1e8)},{'name':'certificate-domain','type':a60_0x22f5f9(0x1e5),'description':a60_0x22f5f9(0x206)}];async function resolveRegion(_0x320f27){const _0x4e73e5=a60_0x22f5f9,_0x3db835=_0x320f27[_0x4e73e5(0x207)](_0x4e73e5(0x1f4));if(_0x3db835){if(!isEnabledLovrabetRegion(_0x3db835))throw CliErrors['validation']('Region\x20\x22'+_0x3db835+'\x22\x20is\x20not\x20currently\x20available.',_0x4e73e5(0x1eb)+ENABLED_LOVRABET_REGION_VALUES[_0x4e73e5(0x1d7)](',\x20'));return _0x3db835;}if(_0x320f27[_0x4e73e5(0x1fc)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x4e73e5(0x1fb),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x4e73e5(0x1f2)](_0x587c00=>({'name':getOfficialRoutingProfile(_0x587c00)[_0x4e73e5(0x1e7)]+'\x20('+_0x587c00+')','value':_0x587c00}))});}catch(_0x31f6c6){if(_0x31f6c6?.[_0x4e73e5(0x1d9)]===_0x4e73e5(0x1f6))throw CliErrors['cancelled']();throw _0x31f6c6;}}export async function executeConfigInit(_0x3bb49d){const _0x5de04a=a60_0x22f5f9,_0x46389a=resolveDomainConfigInput(_0x3bb49d),_0x3649d2=_0x46389a[_0x5de04a(0x1dc)],_0x58a6fb=Object['keys'](_0x3649d2)[_0x5de04a(0x205)]>0x0;if(_0x58a6fb&&_0x3bb49d[_0x5de04a(0x207)](_0x5de04a(0x1f4)))throw CliErrors[_0x5de04a(0x1e9)](_0x5de04a(0x202));if(!!_0x3649d2[_0x5de04a(0x1db)]!==!!_0x3649d2['certificateDomain'])throw CliErrors[_0x5de04a(0x1e9)](_0x5de04a(0x1ff));const _0x1169e3=_0x3bb49d['bool'](_0x5de04a(0x1fe))?'global':_0x5de04a(0x1d5),_0x587c48=readScopedConfig(_0x1169e3);for(const _0x383c42 of DOMAIN_CONFIG_FIELDS)delete _0x587c48[_0x383c42];for(const _0x205c87 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x587c48[_0x205c87];delete _0x587c48['routing'];let _0x3f44e3=null;if(_0x58a6fb)delete _0x587c48['region'],_0x46389a[_0x5de04a(0x1de)]===_0x5de04a(0x1ef)?_0x587c48['routing']={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x46389a[_0x5de04a(0x1f1)],'cdn':_0x46389a['cdn']}:Object[_0x5de04a(0x1fd)](_0x587c48,_0x3649d2);else{_0x3f44e3=await resolveRegion(_0x3bb49d);if(_0x3f44e3===DEFAULT_LOVRABET_REGION)delete _0x587c48['region'];else _0x587c48[_0x5de04a(0x1f4)]=_0x3f44e3;}return writeScopedConfig(_0x587c48,_0x1169e3),{'ok':!![],'message':_0x58a6fb?_0x5de04a(0x1f8)+Object[_0x5de04a(0x1ec)](_0x46389a['mode']==='enterprise-v1'?_0x46389a[_0x5de04a(0x1f1)]:_0x3649d2)['join'](',\x20')+'.':_0x5de04a(0x204)+_0x3f44e3+'.','data':{'mode':_0x58a6fb?_0x5de04a(0x1dd):'official','protocol':_0x46389a[_0x5de04a(0x1de)]===_0x5de04a(0x1ef)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x3f44e3,'domains':_0x3649d2,'cdn':_0x46389a[_0x5de04a(0x1de)]===_0x5de04a(0x1ef)?_0x46389a[_0x5de04a(0x1d4)]:undefined}};}export const configInitDefinition={'service':'config','command':'init','description':a60_0x22f5f9(0x1ee),'risk':a60_0x22f5f9(0x1f0),'confirmationDescription':'Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0xa4fab3=a61_0x1f7c;(function(_0x29d720,_0x48d878){const _0x4663f5=a61_0x1f7c,_0x3661c8=_0x29d720();while(!![]){try{const _0x332c64=-parseInt(_0x4663f5(0x188))/0x1*(parseInt(_0x4663f5(0x184))/0x2)+-parseInt(_0x4663f5(0x18a))/0x3+-parseInt(_0x4663f5(0x18c))/0x4+-parseInt(_0x4663f5(0x18e))/0x5*(-parseInt(_0x4663f5(0x18f))/0x6)+-parseInt(_0x4663f5(0x187))/0x7+parseInt(_0x4663f5(0x18d))/0x8+parseInt(_0x4663f5(0x189))/0x9;if(_0x332c64===_0x48d878)break;else _0x3661c8['push'](_0x3661c8['shift']());}catch(_0x5f2d9a){_0x3661c8['push'](_0x3661c8['shift']());}}}(a61_0x461b,0xef237));function a61_0x1f7c(_0x268be4,_0x342c9c){_0x268be4=_0x268be4-0x184;const _0x461b18=a61_0x461b();let _0x1f7cc1=_0x461b18[_0x268be4];return _0x1f7cc1;}function a61_0x461b(){const _0xfdc16d=['10869520ABldVX','2499005EDFcEH','6YpOKsS','config','global','485974ymDQaa','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','read','1382675uiFeuJ','7ISamHt','39440142jEUxrg','4818225Ngvwac','boolean','7026836ODMISu'];a61_0x461b=function(){return _0xfdc16d;};return a61_0x461b();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x11e2a2){const _0x3ea55b=a61_0x1f7c,_0x2268fd=_0x11e2a2['bool'](_0x3ea55b(0x191))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x2268fd};}export const configListDefinition={'service':a61_0xa4fab3(0x190),'command':'list','description':'List\x20all\x20config\x20values','risk':a61_0xa4fab3(0x186),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':a61_0xa4fab3(0x18b),'description':a61_0xa4fab3(0x185),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x4c0e34=a62_0xc416;function a62_0xc416(_0x3e222c,_0x427bcd){_0x3e222c=_0x3e222c-0xc5;const _0x1862a7=a62_0x1862();let _0xc41645=_0x1862a7[_0x3e222c];return _0xc41645;}(function(_0x1bd7d6,_0x310ffd){const _0x3f1789=a62_0xc416,_0x56ca93=_0x1bd7d6();while(!![]){try{const _0xc1e9c8=-parseInt(_0x3f1789(0xef))/0x1*(parseInt(_0x3f1789(0xf9))/0x2)+parseInt(_0x3f1789(0xe7))/0x3+-parseInt(_0x3f1789(0xed))/0x4*(parseInt(_0x3f1789(0xd0))/0x5)+-parseInt(_0x3f1789(0xfa))/0x6*(parseInt(_0x3f1789(0xec))/0x7)+-parseInt(_0x3f1789(0xcd))/0x8*(parseInt(_0x3f1789(0xcc))/0x9)+parseInt(_0x3f1789(0xcf))/0xa*(parseInt(_0x3f1789(0xd2))/0xb)+-parseInt(_0x3f1789(0xd5))/0xc*(-parseInt(_0x3f1789(0xd1))/0xd);if(_0xc1e9c8===_0x310ffd)break;else _0x56ca93['push'](_0x56ca93['shift']());}catch(_0x377c06){_0x56ca93['push'](_0x56ca93['shift']());}}}(a62_0x1862,0xee027));import{CliErrors}from'../../errors.js';function a62_0x1862(){const _0x581ed4=['locale','336QyPGzi','9868UaPbSu','value','319soBrEz','bool','Config\x20value','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','\x22.\x20Allowed:\x20','riskLevel','Invalid\x20locale\x20value.','Missing\x20value.','validation','`,\x20`','8276ForvPS','134760CJtdiN','\x20set\x20to:\x20','config','appcode','Project','Set\x20a\x20config\x20value','global','object','env','140004YvzGDM','904QPPrfs','app','110UnvRDX','3065nkpFfz','15011841ijJqwQ','1630189PmbFKr','\x20workspace\x20add\x20<name>\x20--appcode\x20','boolean','36QguIxN','join','set','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','apps','\x22\x20is\x20not\x20settable.','Missing\x20key.','Usage:\x20','Global','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','string','str','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','length','\x20appcode\x20set\x20to:\x20','Settable\x20top-level\x20keys:\x20','4645884jTFkVY','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','key','Top-level\x20key\x20\x22'];a62_0x1862=function(){return _0x581ed4;};return a62_0x1862();}import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x2adbac){const _0x195aaf=a62_0xc416,_0x3f4d02=_0x2adbac[_0x195aaf(0xe2)](_0x195aaf(0xe9)),_0x4d9905=_0x2adbac['str']('value');if(!_0x3f4d02)throw CliErrors[_0x195aaf(0xf7)](_0x195aaf(0xdc),_0x195aaf(0xdd)+CLI_BIN_NAME+_0x195aaf(0xe0));if(_0x4d9905===undefined||_0x4d9905==='')throw CliErrors[_0x195aaf(0xf7)](_0x195aaf(0xf6),_0x195aaf(0xdd)+CLI_BIN_NAME+_0x195aaf(0xe0));let _0x528cfa=_0x3f4d02,_0x40127b=_0x4d9905;if(_0x4d9905['length']>0x1f4)throw CliErrors[_0x195aaf(0xf7)](_0x195aaf(0xf2));if(_0x3f4d02===_0x195aaf(0xf4))throw CliErrors[_0x195aaf(0xf7)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x3f4d02))throw CliErrors[_0x195aaf(0xf7)](_0x195aaf(0xea)+_0x3f4d02+_0x195aaf(0xdb),_0x195aaf(0xe6)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x3f4d02]&&!CONFIG_ENUM_VALUES[_0x3f4d02]['includes'](_0x4d9905))throw CliErrors[_0x195aaf(0xf7)]('Invalid\x20value\x20for\x20\x22'+_0x3f4d02+_0x195aaf(0xf3)+CONFIG_ENUM_VALUES[_0x3f4d02][_0x195aaf(0xd6)](',\x20'));if(_0x3f4d02===_0x195aaf(0xeb)&&!normalizeLocale(_0x4d9905))throw CliErrors[_0x195aaf(0xf7)](_0x195aaf(0xf5),_0x195aaf(0xd8));DOMAIN_CONFIG_FIELDS['includes'](_0x3f4d02)&&(_0x40127b=normalizeDomainOrigin(_0x3f4d02,_0x4d9905));const _0x55c29b={'global':_0x2adbac[_0x195aaf(0xf0)](_0x195aaf(0xc9))},_0x40ed92=resolveWriteScope(_0x55c29b),_0x542b63=readScopedConfig(_0x40ed92);_0x3f4d02===_0x195aaf(0xce)&&(_0x528cfa=_0x195aaf(0xc6),delete _0x542b63[_0x195aaf(0xce)]);_0x3f4d02===_0x195aaf(0xeb)&&(_0x40127b=normalizeLocale(_0x4d9905));if(_0x3f4d02==='env'){_0x40127b=normalizeEnv(_0x4d9905);if(!isProduction(_0x40127b)&&!isDaily(_0x40127b))throw CliErrors[_0x195aaf(0xf7)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x195aaf(0xe8));}if(_0x3f4d02===_0x195aaf(0xc6)){const _0x527cbe=_0x542b63[_0x195aaf(0xda)]&&typeof _0x542b63[_0x195aaf(0xda)]===_0x195aaf(0xca)?Object['keys'](_0x542b63[_0x195aaf(0xda)]):[];if(_0x527cbe[_0x195aaf(0xe4)]>0x0)throw CliErrors[_0x195aaf(0xf7)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Use\x20`'+CLI_BIN_NAME+_0x195aaf(0xd3)+_0x40127b+_0x195aaf(0xf8)+CLI_BIN_NAME+_0x195aaf(0xdf));const _0x1f38ab=buildCanonicalProjectConfig({..._0x542b63},{'appCodes':[_0x40127b],'env':typeof _0x542b63['env']===_0x195aaf(0xe1)?_0x542b63[_0x195aaf(0xcb)]:undefined});writeScopedConfig(_0x1f38ab,_0x40ed92);const _0x302092=_0x40ed92===_0x195aaf(0xc9)?_0x195aaf(0xde):_0x195aaf(0xc7);return{'ok':!![],'message':'✓\x20'+_0x302092+_0x195aaf(0xe5)+_0x40127b+_0x195aaf(0xe3)};}_0x542b63[_0x528cfa]=_0x40127b,writeScopedConfig(_0x542b63,_0x40ed92);const _0x3e3650=_0x40ed92===_0x195aaf(0xc9)?'Global':_0x195aaf(0xc7);return{'ok':!![],'message':'✓\x20'+_0x3e3650+'\x20'+_0x528cfa+_0x195aaf(0xfb)+_0x40127b};}export const configSetDefinition={'service':a62_0x4c0e34(0xc5),'command':a62_0x4c0e34(0xd7),'description':a62_0x4c0e34(0xc8),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a62_0x4c0e34(0xee),'type':a62_0x4c0e34(0xe1),'description':a62_0x4c0e34(0xf1),'required':!![]},{'name':a62_0x4c0e34(0xc9),'type':a62_0x4c0e34(0xd4),'description':a62_0x4c0e34(0xd9),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x590df0,_0x40dd47){var _0x5819a7=a63_0x34f5,_0x51473a=_0x590df0();while(!![]){try{var _0x496c26=-parseInt(_0x5819a7(0x1a7))/0x1*(parseInt(_0x5819a7(0x1b3))/0x2)+-parseInt(_0x5819a7(0x1a8))/0x3*(parseInt(_0x5819a7(0x1a3))/0x4)+parseInt(_0x5819a7(0x1b2))/0x5*(-parseInt(_0x5819a7(0x1aa))/0x6)+-parseInt(_0x5819a7(0x1a5))/0x7*(-parseInt(_0x5819a7(0x1ab))/0x8)+-parseInt(_0x5819a7(0x1a4))/0x9*(-parseInt(_0x5819a7(0x1a6))/0xa)+parseInt(_0x5819a7(0x1ac))/0xb*(-parseInt(_0x5819a7(0x1af))/0xc)+parseInt(_0x5819a7(0x1a2))/0xd*(parseInt(_0x5819a7(0x1ad))/0xe);if(_0x496c26===_0x40dd47)break;else _0x51473a['push'](_0x51473a['shift']());}catch(_0x3798d7){_0x51473a['push'](_0x51473a['shift']());}}}(a63_0x2b99,0x5bc70));function a63_0x34f5(_0x18ce13,_0x2c030a){_0x18ce13=_0x18ce13-0x1a2;var _0x2b9946=a63_0x2b99();var _0x34f51c=_0x2b9946[_0x18ce13];return _0x34f51c;}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';function a63_0x2b99(){var _0x40eb6a=['4gaOYxr','2340QMroAg','2179849PRepWh','15210fBznyc','51zvUrBf','2114367ULjHXc','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','951684mfrOAz','16ZddLcD','868835IBVvDr','18522fivcpf','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','36CGKsvf','project','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','5KwWoov','1910ETIkyy','4979wTzexM'];a63_0x2b99=function(){return _0x40eb6a;};return a63_0x2b99();}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x25d5f){var _0x3d6545=a63_0x34f5;if(_0x25d5f['global'])return'global';if(!isInProject())throw CliErrors['validation'](_0x3d6545(0x1a9),_0x3d6545(0x1ae)+CLI_BIN_NAME+_0x3d6545(0x1b1));return _0x3d6545(0x1b0);}export function readScopedConfig(_0xdd9bc){return readConfigFile(resolveWriteConfigPath(_0xdd9bc));}export function writeScopedConfig(_0x302659,_0x2df62a){writeConfigFile(resolveWriteConfigPath(_0x2df62a),_0x302659);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a64_0x3a1ebf=a64_0x1ebe;(function(_0x3ea1ed,_0x38d1e2){const _0x4bd695=a64_0x1ebe,_0x43df95=_0x3ea1ed();while(!![]){try{const _0x3be099=-parseInt(_0x4bd695(0x1b8))/0x1*(parseInt(_0x4bd695(0x16f))/0x2)+-parseInt(_0x4bd695(0x169))/0x3*(-parseInt(_0x4bd695(0x1a3))/0x4)+-parseInt(_0x4bd695(0x19b))/0x5+-parseInt(_0x4bd695(0x174))/0x6*(parseInt(_0x4bd695(0x16b))/0x7)+-parseInt(_0x4bd695(0x1b0))/0x8+-parseInt(_0x4bd695(0x1b6))/0x9+parseInt(_0x4bd695(0x181))/0xa*(parseInt(_0x4bd695(0x17c))/0xb);if(_0x3be099===_0x38d1e2)break;else _0x43df95['push'](_0x43df95['shift']());}catch(_0x201871){_0x43df95['push'](_0x43df95['shift']());}}}(a64_0x546c,0x5915b));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a64_0x3a1ebf(0x183),a64_0x3a1ebf(0x1bd)]),SUPPORTED_FIELD_TYPES=new Set(['TEXT',a64_0x3a1ebf(0x172),a64_0x3a1ebf(0x188),a64_0x3a1ebf(0x18d),a64_0x3a1ebf(0x179),'MULTI_SELECT',a64_0x3a1ebf(0x163),a64_0x3a1ebf(0x1a1),'ADDRESS','UPLOAD']);export function isDatasetBatchDesign(_0xdea19f){const _0xcbe239=a64_0x3a1ebf;return isObject(_0xdea19f)&&_0xdea19f[_0xcbe239(0x15d)]==='dataset-batch';}export function validateDatasetBatchDesign(_0x3469d2){const _0x4099de=a64_0x3a1ebf;(!isObject(_0x3469d2)||_0x3469d2['kind']!=='dataset-batch')&&fail(_0x4099de(0x1b2));_0x3469d2[_0x4099de(0x182)]!==0x1&&fail(_0x4099de(0x177));const _0x507a35=objectArray(_0x3469d2['datasets'],_0x4099de(0x186),0x1,0x14),_0x56d4c3=objectArray(_0x3469d2[_0x4099de(0x178)],_0x4099de(0x178),0x0,0xc8),_0x453fe0=objectArray(_0x3469d2['unresolvedRelations'],_0x4099de(0x19e),0x0,0xc8),_0x58be39=new Set(),_0x5d6e08=new Map();for(const [_0x14a40b,_0x312c6c]of _0x507a35[_0x4099de(0x1bc)]()){const _0x3ecd50=requiredString(_0x312c6c[_0x4099de(0x17a)],'datasets['+_0x14a40b+_0x4099de(0x193));!LOCAL_KEY[_0x4099de(0x187)](_0x3ecd50)&&fail('datasets['+_0x14a40b+_0x4099de(0x171)+LOCAL_KEY[_0x4099de(0x1af)]+'.');_0x58be39[_0x4099de(0x1c2)](_0x3ecd50)&&fail(_0x4099de(0x18c));_0x58be39['add'](_0x3ecd50);!isObject(_0x312c6c[_0x4099de(0x1b3)])&&fail(_0x4099de(0x16c)+_0x14a40b+_0x4099de(0x170));rejectServerDatasetIdentity(_0x312c6c[_0x4099de(0x1b3)],_0x4099de(0x16c)+_0x14a40b+_0x4099de(0x194));if(!isObject(_0x312c6c[_0x4099de(0x1b3)][_0x4099de(0x17d)]))fail(_0x4099de(0x16c)+_0x14a40b+_0x4099de(0x191));rejectServerDatasetIdentity(_0x312c6c[_0x4099de(0x1b3)][_0x4099de(0x17d)],'datasets['+_0x14a40b+_0x4099de(0x167)),requiredString(_0x312c6c['design'][_0x4099de(0x17d)][_0x4099de(0x16e)],_0x4099de(0x16c)+_0x14a40b+_0x4099de(0x175));_0x4099de(0x178)in _0x312c6c[_0x4099de(0x1b3)]&&(!Array['isArray'](_0x312c6c[_0x4099de(0x1b3)][_0x4099de(0x178)])||_0x312c6c[_0x4099de(0x1b3)][_0x4099de(0x178)]['length']!==0x0)&&fail(_0x4099de(0x16c)+_0x14a40b+_0x4099de(0x1a9));const _0x43e1cd=objectArray(_0x312c6c[_0x4099de(0x1b3)][_0x4099de(0x18e)],_0x4099de(0x16c)+_0x14a40b+_0x4099de(0x185),0x1,0xc8),_0x3cb44b=new Map();for(const [_0x431312,_0x12e57c]of _0x43e1cd[_0x4099de(0x1bc)]()){const _0x204fe4=fieldName(_0x12e57c);if(!_0x204fe4)fail(_0x4099de(0x16c)+_0x14a40b+_0x4099de(0x184)+_0x431312+']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.');const _0x33acdc=_0x204fe4[_0x4099de(0x189)]();if(_0x3cb44b[_0x4099de(0x1c2)](_0x33acdc))fail('Dataset\x20'+_0x3ecd50+'\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.');const _0xea0238=stringValue(_0x12e57c[_0x4099de(0x15b)]??_0x12e57c[_0x4099de(0x1ba)])[_0x4099de(0x17f)]();if(!SUPPORTED_FIELD_TYPES[_0x4099de(0x1c2)](_0xea0238))fail('datasets['+_0x14a40b+_0x4099de(0x184)+_0x431312+'].type\x20is\x20not\x20supported.');_0x3cb44b[_0x4099de(0x1bf)](_0x33acdc,_0xea0238),[_0x12e57c[_0x4099de(0x166)],_0x12e57c[_0x4099de(0x195)],_0x12e57c[_0x4099de(0x176)]]['some'](_0x1b612b=>stringValue(_0x1b612b))&&fail(_0x4099de(0x16c)+_0x14a40b+_0x4099de(0x184)+_0x431312+_0x4099de(0x190));}_0x5d6e08['set'](_0x3ecd50,_0x3cb44b);}const _0x56df3c=new Set(),_0x158fa9=new Set();for(const [_0x3a2f4a,_0x4e9700]of _0x56d4c3[_0x4099de(0x1bc)]()){const _0x1b3887=validateRelation(_0x4e9700,_0x3a2f4a,_0x58be39,_0x5d6e08);if(_0x56df3c[_0x4099de(0x1c2)](_0x1b3887))fail(_0x4099de(0x1a8));_0x56df3c[_0x4099de(0x1a6)](_0x1b3887);const _0x3738ce=_0x1b3887['split']('\x00',0x2)[_0x4099de(0x165)]('\x00');if(_0x158fa9[_0x4099de(0x1c2)](_0x3738ce))fail(_0x4099de(0x16d));_0x158fa9[_0x4099de(0x1a6)](_0x3738ce);}for(const [_0x20e767,_0x2e8f58]of _0x453fe0[_0x4099de(0x1bc)]()){requiredString(_0x2e8f58[_0x4099de(0x162)],_0x4099de(0x199)+_0x20e767+'].reason'),validateConfidence(_0x2e8f58[_0x4099de(0x1c1)],_0x4099de(0x199)+_0x20e767+'].confidence');}return _0x3469d2;}export function reconcileBatchResult(_0x4695f6){const _0x51a9a1=a64_0x3a1ebf;if(!isObject(_0x4695f6))return null;try{const _0x220dc7=stringArray(_0x4695f6[_0x51a9a1(0x196)],_0x51a9a1(0x196),0x1,0x14),_0x15fcc3=new Set(_0x220dc7);if(_0x15fcc3[_0x51a9a1(0x1b4)]!==_0x220dc7[_0x51a9a1(0x197)]||_0x220dc7[_0x51a9a1(0x19d)](_0x2e7fe7=>!LOCAL_KEY['test'](_0x2e7fe7)))return null;const _0xe632f1=objectArray(_0x4695f6[_0x51a9a1(0x1b7)],_0x51a9a1(0x1b7),0x1,0x14),_0xb01a0a=new Map(),_0x13fbc1=new Set();for(const _0x377f50 of _0xe632f1){const _0x11b687=requiredString(_0x377f50[_0x51a9a1(0x17a)],'createdDatasets[].localKey'),_0x31868c=requiredString(_0x377f50['code']??_0x377f50[_0x51a9a1(0x1a7)],_0x51a9a1(0x161));if(_0xb01a0a[_0x51a9a1(0x1c2)](_0x11b687)||_0x13fbc1[_0x51a9a1(0x1c2)](_0x31868c))return null;_0xb01a0a[_0x51a9a1(0x1bf)](_0x11b687,_0x31868c),_0x13fbc1[_0x51a9a1(0x1a6)](_0x31868c);}if(!sameSet(_0x15fcc3,new Set(_0xb01a0a[_0x51a9a1(0x168)]())))return null;const _0x2cd328=objectArray(_0x4695f6[_0x51a9a1(0x198)],'expectedRelations',0x0,0xc8),_0x584596=objectArray(_0x4695f6['createdRelations'],_0x51a9a1(0x19c),0x0,0xc8),_0x2013e1=relationTupleSet(_0x2cd328,![],_0xb01a0a),_0x354d46=relationTupleSet(_0x584596,!![],_0xb01a0a);if(!_0x2013e1||!_0x354d46||!sameSet(_0x2013e1,_0x354d46))return null;const _0x4550fd=objectArray(_0x4695f6[_0x51a9a1(0x19e)],_0x51a9a1(0x19e),0x0,0xc8);return{'expectedLocalKeys':_0x220dc7,'expectedRelations':_0x2cd328,'createdDatasets':_0xe632f1,'createdRelations':_0x584596,'unresolvedRelations':_0x4550fd,...isObject(_0x4695f6[_0x51a9a1(0x1c0)])?{'metrics':_0x4695f6[_0x51a9a1(0x1c0)]}:{}};}catch{return null;}}function validateRelation(_0x311115,_0xcc36c7,_0xc74754,_0x6f1cad){const _0x1e6fc6=a64_0x3a1ebf,_0x4545b4=_0x1e6fc6(0x19a)+_0xcc36c7+']',_0x311132=requiredString(_0x311115[_0x1e6fc6(0x15e)],_0x4545b4+_0x1e6fc6(0x17b)),_0xb86ff6=requiredString(_0x311115[_0x1e6fc6(0x164)],_0x4545b4+'.toDatasetKey'),_0x15d5a6=requiredString(_0x311115[_0x1e6fc6(0x1a0)],_0x4545b4+_0x1e6fc6(0x18b))[_0x1e6fc6(0x189)](),_0x340cae=requiredString(_0x311115['toField'],_0x4545b4+_0x1e6fc6(0x15c))['toLowerCase']();if(!_0xc74754[_0x1e6fc6(0x1c2)](_0x311132)||!_0xc74754['has'](_0xb86ff6))fail(_0x4545b4+'\x20references\x20an\x20unknown\x20dataset\x20localKey.');const _0x58a892=_0x6f1cad['get'](_0x311132)?.[_0x1e6fc6(0x16a)](_0x15d5a6),_0x3b11e8=_0x6f1cad[_0x1e6fc6(0x16a)](_0xb86ff6)?.['get'](_0x340cae);if(_0x58a892===undefined||_0x3b11e8===undefined)fail(_0x4545b4+'\x20references\x20an\x20unknown\x20field.');if(_0x58a892&&_0x3b11e8&&_0x58a892!==_0x3b11e8)fail(_0x4545b4+_0x1e6fc6(0x160));const _0x156dc1=stringValue(_0x311115['relationType'])||_0x1e6fc6(0x18f);if(_0x156dc1!==_0x1e6fc6(0x18f))fail(_0x4545b4+'.relationType\x20must\x20be\x20\x22lookup\x22.');const _0x503e95=stringValue(_0x311115['cardinality'])||_0x1e6fc6(0x183);if(!SUPPORTED_CARDINALITIES[_0x1e6fc6(0x1c2)](_0x503e95))fail(_0x4545b4+_0x1e6fc6(0x1b9));return requiredString(_0x311115['reason'],_0x4545b4+_0x1e6fc6(0x1bb)),validateConfidence(_0x311115[_0x1e6fc6(0x1c1)],_0x4545b4+_0x1e6fc6(0x180)),tuple(_0x311132,_0x15d5a6,_0xb86ff6,_0x340cae,_0x1e6fc6(0x18f),_0x503e95);}function relationTupleSet(_0x97da3e,_0x4fe0c6,_0x207ccb){const _0x2efe8f=a64_0x3a1ebf,_0x3ce26b=new Set();for(const _0x55eb3f of _0x97da3e){const _0x3e614e=stringValue(_0x55eb3f[_0x2efe8f(0x15e)]),_0x527562=stringValue(_0x55eb3f[_0x2efe8f(0x164)]),_0x4dd70b=stringValue(_0x55eb3f[_0x2efe8f(0x1a0)])['toLowerCase'](),_0x8be7a6=stringValue(_0x55eb3f[_0x2efe8f(0x15a)])[_0x2efe8f(0x189)](),_0x30e90e=stringValue(_0x55eb3f['relationType']),_0x2ec12e=stringValue(_0x55eb3f[_0x2efe8f(0x1ac)]);if(!_0x3e614e||!_0x527562||!_0x4dd70b||!_0x8be7a6||_0x30e90e!==_0x2efe8f(0x18f)||!SUPPORTED_CARDINALITIES[_0x2efe8f(0x1c2)](_0x2ec12e))return null;if(!_0x207ccb[_0x2efe8f(0x1c2)](_0x3e614e)||!_0x207ccb[_0x2efe8f(0x1c2)](_0x527562))return null;if(_0x4fe0c6&&(stringValue(_0x55eb3f[_0x2efe8f(0x173)])!==_0x207ccb['get'](_0x3e614e)||stringValue(_0x55eb3f[_0x2efe8f(0x1a4)])!==_0x207ccb[_0x2efe8f(0x16a)](_0x527562)))return null;const _0x5cfbe6=tuple(_0x3e614e,_0x4dd70b,_0x527562,_0x8be7a6,_0x30e90e,_0x2ec12e);if(_0x3ce26b[_0x2efe8f(0x1c2)](_0x5cfbe6))return null;_0x3ce26b['add'](_0x5cfbe6);}return _0x3ce26b;}function rejectServerDatasetIdentity(_0x2aa699,_0x38d922){const _0x19ac82=a64_0x3a1ebf;for(const _0x5e31bc of['id','datasetId',_0x19ac82(0x19f),_0x19ac82(0x1b5),_0x19ac82(0x1a7),_0x19ac82(0x1aa)]){if(_0x2aa699[_0x5e31bc]!==undefined&&_0x2aa699[_0x5e31bc]!==null&&_0x2aa699[_0x5e31bc]!=='')fail(_0x38d922+'.'+_0x5e31bc+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function a64_0x546c(){const _0x51daf5=['336IRfUSM','].design.dataset.datasetName','refTableLabelField','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','relations','SELECT','localKey','.fromDatasetKey','11kpTjHK','dataset','isFinite','toUpperCase','.confidence','20221630pbpTpy','schemaVersion','MANY_TO_ONE','].design.fields[','].design.fields','datasets','test','DATETIME','toLowerCase','\x20must\x20be\x20between\x200\x20and\x201.','.fromField','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','BOOLEAN','fields','lookup',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','].design.dataset\x20must\x20be\x20an\x20object.','\x20non-empty\x20strings.','].localKey','].design','refTableField','expectedLocalKeys','length','expectedRelations','unresolvedRelations[','relations[','2398190wQGCxK','createdRelations','some','unresolvedRelations','modelId','fromField','USER','validation','456PoSlhi','toDatasetCode','isArray','add','datasetCode','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','modelCode','\x20must\x20contain\x20','cardinality','trim','object','source','4483072itpAyR','name','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','design','size','code','4605093pbsjue','createdDatasets','710531zgUtOV','.cardinality\x20is\x20not\x20supported.','fieldType','.reason','entries','ONE_TO_ONE','string','set','metrics','confidence','has','\x20is\x20required.','toField','type','.toField','kind','fromDatasetKey','fieldCode','\x20connects\x20incompatible\x20field\x20types.','createdDatasets[].code','reason','DATE_RANGE','toDatasetKey','join','refTable','].design.dataset','keys','16449WOfoAz','get','2513jtZgcl','datasets[','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','datasetName','2DhAgKj','].design\x20must\x20be\x20an\x20object.','].localKey\x20must\x20match\x20','NUMBER','fromDatasetCode'];a64_0x546c=function(){return _0x51daf5;};return a64_0x546c();}function a64_0x1ebe(_0x46a768,_0x7d477b){_0x46a768=_0x46a768-0x15a;const _0x546c2d=a64_0x546c();let _0x1ebe0e=_0x546c2d[_0x46a768];return _0x1ebe0e;}function objectArray(_0x2ef4e9,_0x40aec3,_0x4e201f,_0x36f7e8){const _0x4388bb=a64_0x3a1ebf;return(!Array[_0x4388bb(0x1a5)](_0x2ef4e9)||_0x2ef4e9[_0x4388bb(0x197)]<_0x4e201f||_0x2ef4e9[_0x4388bb(0x197)]>_0x36f7e8||_0x2ef4e9[_0x4388bb(0x19d)](_0x1da4d9=>!isObject(_0x1da4d9)))&&fail(_0x40aec3+_0x4388bb(0x1ab)+_0x4e201f+'..'+_0x36f7e8+'\x20objects.'),_0x2ef4e9;}function stringArray(_0x492444,_0x3db4a4,_0x15c6bd,_0xd7a55d){const _0x29009a=a64_0x3a1ebf;return(!Array[_0x29009a(0x1a5)](_0x492444)||_0x492444[_0x29009a(0x197)]<_0x15c6bd||_0x492444[_0x29009a(0x197)]>_0xd7a55d||_0x492444['some'](_0x2acb63=>typeof _0x2acb63!=='string'||!_0x2acb63['trim']()))&&fail(_0x3db4a4+_0x29009a(0x1ab)+_0x15c6bd+'..'+_0xd7a55d+_0x29009a(0x192)),_0x492444;}function requiredString(_0x3771dd,_0x44870a){const _0x4aeb59=a64_0x3a1ebf,_0xbe48=stringValue(_0x3771dd);if(!_0xbe48)fail(_0x44870a+_0x4aeb59(0x1c3));return _0xbe48;}function stringValue(_0x4567fc){const _0x2fc2f2=a64_0x3a1ebf;return typeof _0x4567fc===_0x2fc2f2(0x1be)?_0x4567fc[_0x2fc2f2(0x1ad)]():'';}function fieldName(_0x51d577){const _0x2a0ed6=a64_0x3a1ebf;return stringValue(_0x51d577[_0x2a0ed6(0x1b5)]??_0x51d577[_0x2a0ed6(0x15f)]??_0x51d577[_0x2a0ed6(0x1b1)]??_0x51d577['fieldName']);}function validateConfidence(_0x55df70,_0x5b6695){const _0x431116=a64_0x3a1ebf;_0x55df70!==undefined&&_0x55df70!==null&&(typeof _0x55df70!=='number'||!Number[_0x431116(0x17e)](_0x55df70)||_0x55df70<0x0||_0x55df70>0x1)&&fail(_0x5b6695+_0x431116(0x18a));}function tuple(..._0x1f8115){const _0x602f0=a64_0x3a1ebf;return _0x1f8115['map']((_0x44957e,_0x5c35e7)=>_0x5c35e7===0x1||_0x5c35e7===0x3?_0x44957e[_0x602f0(0x189)]():_0x44957e)[_0x602f0(0x165)]('\x00');}function sameSet(_0x3a9024,_0x356b1b){const _0xea113b=a64_0x3a1ebf;return _0x3a9024[_0xea113b(0x1b4)]===_0x356b1b[_0xea113b(0x1b4)]&&[..._0x3a9024]['every'](_0x2f11ba=>_0x356b1b[_0xea113b(0x1c2)](_0x2f11ba));}function isObject(_0x1c91fd){const _0x190567=a64_0x3a1ebf;return typeof _0x1c91fd===_0x190567(0x1ae)&&_0x1c91fd!==null&&!Array[_0x190567(0x1a5)](_0x1c91fd);}function fail(_0x56a039){const _0x3afa2f=a64_0x3a1ebf;throw CliErrors[_0x3afa2f(0x1a2)](_0x56a039);}
|
|
1
|
+
const a64_0x5c52bf=a64_0x423f;(function(_0x5d1a3c,_0x133678){const _0x5eace1=a64_0x423f,_0x11b566=_0x5d1a3c();while(!![]){try{const _0x54dad2=-parseInt(_0x5eace1(0xe4))/0x1+-parseInt(_0x5eace1(0x12c))/0x2*(parseInt(_0x5eace1(0x106))/0x3)+-parseInt(_0x5eace1(0x129))/0x4+-parseInt(_0x5eace1(0x11c))/0x5*(-parseInt(_0x5eace1(0xde))/0x6)+parseInt(_0x5eace1(0xd4))/0x7+-parseInt(_0x5eace1(0xd1))/0x8*(parseInt(_0x5eace1(0xe5))/0x9)+-parseInt(_0x5eace1(0x130))/0xa*(-parseInt(_0x5eace1(0x100))/0xb);if(_0x54dad2===_0x133678)break;else _0x11b566['push'](_0x11b566['shift']());}catch(_0x6246c9){_0x11b566['push'](_0x11b566['shift']());}}}(a64_0x1869,0xc59d6));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a64_0x5c52bf(0x105),a64_0x5c52bf(0xd3)]),SUPPORTED_FIELD_TYPES=new Set(['TEXT',a64_0x5c52bf(0x131),'DATETIME',a64_0x5c52bf(0x103),a64_0x5c52bf(0x13c),a64_0x5c52bf(0x11a),'DATE_RANGE',a64_0x5c52bf(0xfd),'ADDRESS',a64_0x5c52bf(0xfe)]);export function isDatasetBatchDesign(_0x5bb4f8){const _0x246779=a64_0x5c52bf;return isObject(_0x5bb4f8)&&_0x5bb4f8['kind']===_0x246779(0xdc);}export function validateDatasetBatchDesign(_0x510f5b){const _0x108e89=a64_0x5c52bf;(!isObject(_0x510f5b)||_0x510f5b['kind']!==_0x108e89(0xdc))&&fail(_0x108e89(0x110));_0x510f5b['schemaVersion']!==0x1&&fail(_0x108e89(0x101));const _0x3f4c83=objectArray(_0x510f5b['datasets'],'datasets',0x1,0x14),_0x5aa298=objectArray(_0x510f5b[_0x108e89(0x10b)],_0x108e89(0x10b),0x0,0xc8),_0x44c471=objectArray(_0x510f5b[_0x108e89(0x102)],_0x108e89(0x102),0x0,0xc8),_0x11b81c=new Set(),_0x3a95cb=new Map();for(const [_0x143e7d,_0x444dce]of _0x3f4c83[_0x108e89(0x107)]()){const _0x380f81=requiredString(_0x444dce[_0x108e89(0x104)],_0x108e89(0xe6)+_0x143e7d+_0x108e89(0x10d));!LOCAL_KEY[_0x108e89(0x114)](_0x380f81)&&fail(_0x108e89(0xe6)+_0x143e7d+_0x108e89(0xda)+LOCAL_KEY[_0x108e89(0x128)]+'.');_0x11b81c[_0x108e89(0xd5)](_0x380f81)&&fail('Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.');_0x11b81c[_0x108e89(0x12b)](_0x380f81);!isObject(_0x444dce['design'])&&fail(_0x108e89(0xe6)+_0x143e7d+_0x108e89(0xfa));rejectServerDatasetIdentity(_0x444dce[_0x108e89(0x109)],_0x108e89(0xe6)+_0x143e7d+_0x108e89(0x12d));if(!isObject(_0x444dce[_0x108e89(0x109)]['dataset']))fail(_0x108e89(0xe6)+_0x143e7d+_0x108e89(0xeb));rejectServerDatasetIdentity(_0x444dce[_0x108e89(0x109)][_0x108e89(0xe0)],_0x108e89(0xe6)+_0x143e7d+_0x108e89(0xf0)),requiredString(_0x444dce[_0x108e89(0x109)]['dataset'][_0x108e89(0xe2)],'datasets['+_0x143e7d+'].design.dataset.datasetName');_0x108e89(0x10b)in _0x444dce[_0x108e89(0x109)]&&(!Array[_0x108e89(0x132)](_0x444dce[_0x108e89(0x109)][_0x108e89(0x10b)])||_0x444dce[_0x108e89(0x109)][_0x108e89(0x10b)][_0x108e89(0x112)]!==0x0)&&fail(_0x108e89(0xe6)+_0x143e7d+_0x108e89(0xf3));const _0x35ff86=objectArray(_0x444dce['design'][_0x108e89(0x11e)],_0x108e89(0xe6)+_0x143e7d+'].design.fields',0x1,0xc8),_0x52422d=new Map();for(const [_0x4f93e7,_0xab4b4a]of _0x35ff86['entries']()){const _0x16d55d=fieldName(_0xab4b4a);if(!_0x16d55d)fail(_0x108e89(0xe6)+_0x143e7d+_0x108e89(0x125)+_0x4f93e7+_0x108e89(0xf1));const _0x37599a=_0x16d55d[_0x108e89(0xd9)]();if(_0x52422d[_0x108e89(0xd5)](_0x37599a))fail(_0x108e89(0x115)+_0x380f81+_0x108e89(0x118));const _0x3aaae4=stringValue(_0xab4b4a[_0x108e89(0xee)]??_0xab4b4a[_0x108e89(0x113)])[_0x108e89(0x124)]();if(!SUPPORTED_FIELD_TYPES['has'](_0x3aaae4))fail(_0x108e89(0xe6)+_0x143e7d+_0x108e89(0x125)+_0x4f93e7+_0x108e89(0xf5));_0x52422d[_0x108e89(0x111)](_0x37599a,_0x3aaae4),[_0xab4b4a[_0x108e89(0x126)],_0xab4b4a[_0x108e89(0x11b)],_0xab4b4a[_0x108e89(0xed)]][_0x108e89(0xdd)](_0x199a60=>stringValue(_0x199a60))&&fail(_0x108e89(0xe6)+_0x143e7d+_0x108e89(0x125)+_0x4f93e7+_0x108e89(0x136));}_0x3a95cb[_0x108e89(0x111)](_0x380f81,_0x52422d);}const _0x19248f=new Set(),_0x128dac=new Set();for(const [_0x1b4616,_0x5c474e]of _0x5aa298[_0x108e89(0x107)]()){const _0xf59a70=validateRelation(_0x5c474e,_0x1b4616,_0x11b81c,_0x3a95cb);if(_0x19248f['has'](_0xf59a70))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0x19248f['add'](_0xf59a70);const _0x311278=_0xf59a70[_0x108e89(0xfc)]('\x00',0x2)['join']('\x00');if(_0x128dac[_0x108e89(0xd5)](_0x311278))fail(_0x108e89(0x10e));_0x128dac[_0x108e89(0x12b)](_0x311278);}for(const [_0x482ef1,_0x1471e6]of _0x44c471[_0x108e89(0x107)]()){requiredString(_0x1471e6[_0x108e89(0xfb)],_0x108e89(0xec)+_0x482ef1+_0x108e89(0x12a)),validateConfidence(_0x1471e6[_0x108e89(0xe9)],_0x108e89(0xec)+_0x482ef1+_0x108e89(0xf9));}return _0x510f5b;}export function reconcileBatchResult(_0x59df53){const _0x45024c=a64_0x5c52bf;if(!isObject(_0x59df53))return null;try{const _0x766115=stringArray(_0x59df53[_0x45024c(0x122)],_0x45024c(0x122),0x1,0x14),_0x3e8679=new Set(_0x766115);if(_0x3e8679['size']!==_0x766115[_0x45024c(0x112)]||_0x766115[_0x45024c(0xdd)](_0x3230df=>!LOCAL_KEY[_0x45024c(0x114)](_0x3230df)))return null;const _0x27d83f=objectArray(_0x59df53[_0x45024c(0x10f)],_0x45024c(0x10f),0x1,0x14),_0x562a69=new Map(),_0x4128b9=new Set();for(const _0x59d533 of _0x27d83f){const _0x105a6a=requiredString(_0x59d533[_0x45024c(0x104)],_0x45024c(0x121)),_0x2fb318=requiredString(_0x59d533[_0x45024c(0xdf)]??_0x59d533['datasetCode'],'createdDatasets[].code');if(_0x562a69[_0x45024c(0xd5)](_0x105a6a)||_0x4128b9['has'](_0x2fb318))return null;_0x562a69[_0x45024c(0x111)](_0x105a6a,_0x2fb318),_0x4128b9[_0x45024c(0x12b)](_0x2fb318);}if(!sameSet(_0x3e8679,new Set(_0x562a69['keys']())))return null;const _0x120edc=objectArray(_0x59df53[_0x45024c(0x117)],_0x45024c(0x117),0x0,0xc8),_0x1c7048=objectArray(_0x59df53[_0x45024c(0xf4)],_0x45024c(0xf4),0x0,0xc8),_0x4a6ea7=relationTupleSet(_0x120edc,![],_0x562a69),_0x38328e=relationTupleSet(_0x1c7048,!![],_0x562a69);if(!_0x4a6ea7||!_0x38328e||!sameSet(_0x4a6ea7,_0x38328e))return null;const _0x54bd2b=objectArray(_0x59df53[_0x45024c(0x102)],_0x45024c(0x102),0x0,0xc8);return{'expectedLocalKeys':_0x766115,'expectedRelations':_0x120edc,'createdDatasets':_0x27d83f,'createdRelations':_0x1c7048,'unresolvedRelations':_0x54bd2b,...isObject(_0x59df53[_0x45024c(0xe7)])?{'metrics':_0x59df53['metrics']}:{}};}catch{return null;}}function validateRelation(_0x5792b8,_0xf31892,_0x2a88ab,_0xa17af1){const _0x2376db=a64_0x5c52bf,_0x11ef26='relations['+_0xf31892+']',_0xde18fa=requiredString(_0x5792b8[_0x2376db(0x138)],_0x11ef26+'.fromDatasetKey'),_0x208a98=requiredString(_0x5792b8[_0x2376db(0xf7)],_0x11ef26+_0x2376db(0x10c)),_0x561c54=requiredString(_0x5792b8[_0x2376db(0xd7)],_0x11ef26+_0x2376db(0xe1))[_0x2376db(0xd9)](),_0x31772f=requiredString(_0x5792b8[_0x2376db(0xf2)],_0x11ef26+_0x2376db(0xf6))[_0x2376db(0xd9)]();if(!_0x2a88ab['has'](_0xde18fa)||!_0x2a88ab[_0x2376db(0xd5)](_0x208a98))fail(_0x11ef26+'\x20references\x20an\x20unknown\x20dataset\x20localKey.');const _0x1c88a9=_0xa17af1[_0x2376db(0x116)](_0xde18fa)?.[_0x2376db(0x116)](_0x561c54),_0x20cb91=_0xa17af1[_0x2376db(0x116)](_0x208a98)?.['get'](_0x31772f);if(_0x1c88a9===undefined||_0x20cb91===undefined)fail(_0x11ef26+_0x2376db(0x139));if(_0x1c88a9&&_0x20cb91&&_0x1c88a9!==_0x20cb91)fail(_0x11ef26+_0x2376db(0x119));const _0x538413=stringValue(_0x5792b8['relationType'])||_0x2376db(0x137);if(_0x538413!=='lookup')fail(_0x11ef26+_0x2376db(0xff));const _0x488b5b=stringValue(_0x5792b8['cardinality'])||_0x2376db(0x105);if(!SUPPORTED_CARDINALITIES[_0x2376db(0xd5)](_0x488b5b))fail(_0x11ef26+_0x2376db(0xd2));return requiredString(_0x5792b8[_0x2376db(0xfb)],_0x11ef26+_0x2376db(0x123)),validateConfidence(_0x5792b8['confidence'],_0x11ef26+_0x2376db(0xdb)),tuple(_0xde18fa,_0x561c54,_0x208a98,_0x31772f,'lookup',_0x488b5b);}function relationTupleSet(_0xcd43,_0xc544c8,_0x10a0ad){const _0x5d48d1=a64_0x5c52bf,_0x42804d=new Set();for(const _0x30eca2 of _0xcd43){const _0x1949ff=stringValue(_0x30eca2['fromDatasetKey']),_0x160562=stringValue(_0x30eca2[_0x5d48d1(0xf7)]),_0x5f0ad6=stringValue(_0x30eca2[_0x5d48d1(0xd7)])['toLowerCase'](),_0x566b3d=stringValue(_0x30eca2[_0x5d48d1(0xf2)])[_0x5d48d1(0xd9)](),_0x34c036=stringValue(_0x30eca2[_0x5d48d1(0xef)]),_0x2cdcde=stringValue(_0x30eca2[_0x5d48d1(0xe3)]);if(!_0x1949ff||!_0x160562||!_0x5f0ad6||!_0x566b3d||_0x34c036!==_0x5d48d1(0x137)||!SUPPORTED_CARDINALITIES[_0x5d48d1(0xd5)](_0x2cdcde))return null;if(!_0x10a0ad['has'](_0x1949ff)||!_0x10a0ad['has'](_0x160562))return null;if(_0xc544c8&&(stringValue(_0x30eca2[_0x5d48d1(0x120)])!==_0x10a0ad[_0x5d48d1(0x116)](_0x1949ff)||stringValue(_0x30eca2[_0x5d48d1(0xd6)])!==_0x10a0ad[_0x5d48d1(0x116)](_0x160562)))return null;const _0x374f79=tuple(_0x1949ff,_0x5f0ad6,_0x160562,_0x566b3d,_0x34c036,_0x2cdcde);if(_0x42804d['has'](_0x374f79))return null;_0x42804d['add'](_0x374f79);}return _0x42804d;}function rejectServerDatasetIdentity(_0x414730,_0x5315e6){const _0x148dcd=a64_0x5c52bf;for(const _0x482d73 of['id',_0x148dcd(0xea),'modelId',_0x148dcd(0xdf),_0x148dcd(0x11f),_0x148dcd(0x11d)]){if(_0x414730[_0x482d73]!==undefined&&_0x414730[_0x482d73]!==null&&_0x414730[_0x482d73]!=='')fail(_0x5315e6+'.'+_0x482d73+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function a64_0x423f(_0x13260e,_0x3eb0d5){_0x13260e=_0x13260e-0xd1;const _0x186915=a64_0x1869();let _0x423fc7=_0x186915[_0x13260e];return _0x423fc7;}function objectArray(_0x3e6721,_0x1f0fae,_0x46d663,_0x15bc0b){const _0x9918d6=a64_0x5c52bf;return(!Array['isArray'](_0x3e6721)||_0x3e6721[_0x9918d6(0x112)]<_0x46d663||_0x3e6721[_0x9918d6(0x112)]>_0x15bc0b||_0x3e6721[_0x9918d6(0xdd)](_0x490dac=>!isObject(_0x490dac)))&&fail(_0x1f0fae+'\x20must\x20contain\x20'+_0x46d663+'..'+_0x15bc0b+_0x9918d6(0x133)),_0x3e6721;}function stringArray(_0x2a3f57,_0x1b6796,_0x1a8780,_0xfa4a10){const _0x12d412=a64_0x5c52bf;return(!Array[_0x12d412(0x132)](_0x2a3f57)||_0x2a3f57[_0x12d412(0x112)]<_0x1a8780||_0x2a3f57[_0x12d412(0x112)]>_0xfa4a10||_0x2a3f57[_0x12d412(0xdd)](_0x244a7f=>typeof _0x244a7f!==_0x12d412(0x10a)||!_0x244a7f[_0x12d412(0x12e)]()))&&fail(_0x1b6796+_0x12d412(0x13d)+_0x1a8780+'..'+_0xfa4a10+_0x12d412(0x108)),_0x2a3f57;}function requiredString(_0x761400,_0x15b998){const _0x11eb1f=a64_0x5c52bf,_0x217e7d=stringValue(_0x761400);if(!_0x217e7d)fail(_0x15b998+_0x11eb1f(0x13a));return _0x217e7d;}function stringValue(_0x21d7cf){const _0x4a25be=a64_0x5c52bf;return typeof _0x21d7cf===_0x4a25be(0x10a)?_0x21d7cf[_0x4a25be(0x12e)]():'';}function fieldName(_0x5717ef){const _0x32a066=a64_0x5c52bf;return stringValue(_0x5717ef[_0x32a066(0xdf)]??_0x5717ef[_0x32a066(0x135)]??_0x5717ef['name']??_0x5717ef[_0x32a066(0x13b)]);}function validateConfidence(_0x5f0e04,_0x2ef2b8){_0x5f0e04!==undefined&&_0x5f0e04!==null&&(typeof _0x5f0e04!=='number'||!Number['isFinite'](_0x5f0e04)||_0x5f0e04<0x0||_0x5f0e04>0x1)&&fail(_0x2ef2b8+'\x20must\x20be\x20between\x200\x20and\x201.');}function tuple(..._0x43a39b){const _0x160b85=a64_0x5c52bf;return _0x43a39b[_0x160b85(0x12f)]((_0x585459,_0x23e74d)=>_0x23e74d===0x1||_0x23e74d===0x3?_0x585459[_0x160b85(0xd9)]():_0x585459)[_0x160b85(0xe8)]('\x00');}function a64_0x1869(){const _0xdee871=['SELECT','\x20must\x20contain\x20','400nqpoKf','.cardinality\x20is\x20not\x20supported.','ONE_TO_ONE','3594815wMTtGJ','has','toDatasetCode','fromField','size','toLowerCase','].localKey\x20must\x20match\x20','.confidence','dataset-batch','some','24bPRwDr','code','dataset','.fromField','datasetName','cardinality','154182UwdIrr','141795xtkHRV','datasets[','metrics','join','confidence','datasetId','].design.dataset\x20must\x20be\x20an\x20object.','unresolvedRelations[','refTableLabelField','type','relationType','].design.dataset',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','toField','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','createdRelations','].type\x20is\x20not\x20supported.','.toField','toDatasetKey','every','].confidence','].design\x20must\x20be\x20an\x20object.','reason','split','USER','UPLOAD','.relationType\x20must\x20be\x20\x22lookup\x22.','451oruRpq','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','unresolvedRelations','BOOLEAN','localKey','MANY_TO_ONE','159sYyVCY','entries','\x20non-empty\x20strings.','design','string','relations','.toDatasetKey','].localKey','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','createdDatasets','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','set','length','fieldType','test','Dataset\x20','get','expectedRelations','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','\x20connects\x20incompatible\x20field\x20types.','MULTI_SELECT','refTableField','1472155qyRBwF','modelCode','fields','datasetCode','fromDatasetCode','createdDatasets[].localKey','expectedLocalKeys','.reason','toUpperCase','].design.fields[','refTable','validation','source','5594976LdBzQp','].reason','add','2266TdmtQJ','].design','trim','map','370460sYiMtl','NUMBER','isArray','\x20objects.','object','fieldCode',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','lookup','fromDatasetKey','\x20references\x20an\x20unknown\x20field.','\x20is\x20required.','fieldName'];a64_0x1869=function(){return _0xdee871;};return a64_0x1869();}function sameSet(_0x1d1b86,_0x286fe9){const _0x154b58=a64_0x5c52bf;return _0x1d1b86[_0x154b58(0xd8)]===_0x286fe9[_0x154b58(0xd8)]&&[..._0x1d1b86][_0x154b58(0xf8)](_0x451524=>_0x286fe9['has'](_0x451524));}function isObject(_0x5197ad){const _0x11254b=a64_0x5c52bf;return typeof _0x5197ad===_0x11254b(0x134)&&_0x5197ad!==null&&!Array[_0x11254b(0x132)](_0x5197ad);}function fail(_0x2b1bd1){const _0x2918ba=a64_0x5c52bf;throw CliErrors[_0x2918ba(0x127)](_0x2b1bd1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x50a72d=a65_0x3431;(function(_0x1bdb11,_0x3820c7){const _0xb98b10=a65_0x3431,_0x318b6b=_0x1bdb11();while(!![]){try{const _0x37d6f2=-parseInt(_0xb98b10(0x131))/0x1+parseInt(_0xb98b10(0x140))/0x2*(parseInt(_0xb98b10(0x153))/0x3)+-parseInt(_0xb98b10(0x16a))/0x4*(-parseInt(_0xb98b10(0x14d))/0x5)+parseInt(_0xb98b10(0x138))/0x6+parseInt(_0xb98b10(0x123))/0x7*(parseInt(_0xb98b10(0x12a))/0x8)+parseInt(_0xb98b10(0x160))/0x9+-parseInt(_0xb98b10(0x124))/0xa*(parseInt(_0xb98b10(0x137))/0xb);if(_0x37d6f2===_0x3820c7)break;else _0x318b6b['push'](_0x318b6b['shift']());}catch(_0x1f6133){_0x318b6b['push'](_0x318b6b['shift']());}}}(a65_0x198f,0x235d1));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';function a65_0x3431(_0x4da6d1,_0x3ae33d){_0x4da6d1=_0x4da6d1-0x123;const _0x198fd9=a65_0x198f();let _0x343114=_0x198fd9[_0x4da6d1];return _0x343114;}const DB_TABLE_BACKEND_PATH=a65_0x50a72d(0x136),METADATA_BACKEND_PATH=a65_0x50a72d(0x167),UNGROUPED_BUSINESS_GROUP=a65_0x50a72d(0x142);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x34ea82,input:_0xba0ab5,dryRun:_0x11a975}){const _0x2dd7f1=a65_0x50a72d;validateInput(_0xba0ab5);const _0xb83f16=normalizeBusinessGroupArgument(_0xba0ab5[_0x2dd7f1(0x147)]),_0x11434c=await getDatasetDetail(_0xba0ab5[_0x2dd7f1(0x148)]),_0x44d751=resolveBusinessGroupDataset(_0x11434c,_0xba0ab5[_0x2dd7f1(0x148)]);assertBusinessGroupUpdateSupported(_0x44d751,_0xb83f16);const _0x24b546=loadCurrentBusinessGroup(_0x11434c,_0x44d751);assertExpectedBusinessGroup(_0x24b546,_0xba0ab5['expectBusinessGroup']);const _0x1e7646=buildBackendPlan(_0x34ea82,_0x44d751,_0xb83f16),_0x4ba6f0=_0x24b546!==_0xb83f16;let _0x51542f;if(_0x4ba6f0&&!_0x11a975){_0x1e7646[_0x2dd7f1(0x15f)]===_0x2dd7f1(0x165)?await updateDbTableBusinessGroup(_0x1e7646[_0x2dd7f1(0x127)]):await updateErBusinessGroup(_0x1e7646[_0x2dd7f1(0x127)]);const _0x90bcdf=await getDatasetDetail(_0x44d751[_0x2dd7f1(0x148)]),_0x2f8b98=resolveBusinessGroupDataset(_0x90bcdf,_0x44d751['code']),_0x25a6f3=loadCurrentBusinessGroup(_0x90bcdf,_0x2f8b98);if(_0x25a6f3!==_0xb83f16)throw CliErrors['apiError'](_0x2dd7f1(0x132),_0x2dd7f1(0x16b)+JSON[_0x2dd7f1(0x139)](displayBusinessGroup(_0xb83f16))+_0x2dd7f1(0x143)+JSON[_0x2dd7f1(0x139)](displayBusinessGroup(_0x25a6f3))+'.');_0x51542f={'verified':!![],'status':_0x2dd7f1(0x15b),'afterReadback':{'businessGroup':displayBusinessGroup(_0x25a6f3)}};}else!_0x4ba6f0&&(_0x51542f={'verified':!![],'status':_0x2dd7f1(0x151),'afterReadback':{'businessGroup':displayBusinessGroup(_0x24b546)}});const _0x131902={'operation':_0x2dd7f1(0x130),'appCode':_0x34ea82,'selector':{'code':_0x44d751[_0x2dd7f1(0x148)]},'dataset':{'id':_0x44d751['id'],'code':_0x44d751[_0x2dd7f1(0x148)],'name':_0x44d751[_0x2dd7f1(0x15e)],'sourceType':_0x44d751[_0x2dd7f1(0x156)]},'before':{'businessGroup':displayBusinessGroup(_0x24b546)},'after':{'businessGroup':displayBusinessGroup(_0xb83f16)},'changed':_0x4ba6f0,'dryRun':_0x11a975,'submitted':_0x4ba6f0&&!_0x11a975,'backend':{'method':_0x1e7646['method'],'path':_0x1e7646[_0x2dd7f1(0x13a)],'payload':_0x1e7646[_0x2dd7f1(0x127)]},..._0x51542f?{'verification':_0x51542f}:{},'warnings':[]};return{'ok':!![],'data':_0x131902,'message':_0x4ba6f0?_0x11a975?_0x2dd7f1(0x12d)+_0x44d751['code']:_0x2dd7f1(0x13f)+_0x44d751['code']:_0x2dd7f1(0x12c)+_0x44d751[_0x2dd7f1(0x148)]};}export const datasetBusinessGroupUpdate={'service':a65_0x50a72d(0x162),'command':a65_0x50a72d(0x14c),'description':a65_0x50a72d(0x13d),'risk':a65_0x50a72d(0x145),'flags':[CODE_FLAG,{'name':'business-group','type':a65_0x50a72d(0x16e),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':a65_0x50a72d(0x129),'type':a65_0x50a72d(0x16e),'required':![],'description':a65_0x50a72d(0x14a)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x278b99){validateInput(readBusinessGroupUpdateInput(_0x278b99));},async 'dryRun'(_0x42cfa0){const _0x3d3dbd=a65_0x50a72d,_0x1f8169=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x42cfa0['appCode'],'input':readBusinessGroupUpdateInput(_0x42cfa0),'dryRun':!![]});return{'method':_0x1f8169[_0x3d3dbd(0x168)][_0x3d3dbd(0x163)][_0x3d3dbd(0x13e)],'url':_0x1f8169[_0x3d3dbd(0x168)]['backend'][_0x3d3dbd(0x13a)],'body':_0x1f8169[_0x3d3dbd(0x168)][_0x3d3dbd(0x163)]['payload'],'description':_0x1f8169[_0x3d3dbd(0x144)],..._0x1f8169[_0x3d3dbd(0x168)]};},async 'execute'(_0x3d06ac){const _0x34b9b2=a65_0x50a72d;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x3d06ac[_0x34b9b2(0x14b)],'input':readBusinessGroupUpdateInput(_0x3d06ac),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x168a64){const _0x3e23c4=a65_0x50a72d,_0xf106e3=_0x168a64[_0x3e23c4(0x14e)](_0x3e23c4(0x129));return{'code':trim(_0x168a64['str'](_0x3e23c4(0x148))),'businessGroup':_0x168a64['str'](_0x3e23c4(0x12e)),'expectBusinessGroup':_0xf106e3===undefined||_0xf106e3===''?undefined:_0xf106e3};}function validateInput(_0x28fbaa){const _0x1bce87=a65_0x50a72d;if(!trim(_0x28fbaa[_0x1bce87(0x148)]))throw CliErrors[_0x1bce87(0x16c)](_0x1bce87(0x159));if(_0x28fbaa[_0x1bce87(0x147)]===undefined)throw CliErrors['validation']('--business-group\x20is\x20required');if(!trim(_0x28fbaa[_0x1bce87(0x147)]))throw CliErrors[_0x1bce87(0x16c)](_0x1bce87(0x141));}function assertBusinessGroupUpdateSupported(_0x26f233,_0x24c0ab){const _0x41b14c=a65_0x50a72d;if(_0x26f233[_0x41b14c(0x156)]==='DB_TABLE'&&!_0x24c0ab)throw CliErrors[_0x41b14c(0x16c)](_0x41b14c(0x169));}function resolveBusinessGroupDataset(_0x32ce4c,_0x156686){const _0x1280de=a65_0x50a72d,_0x180c10=asPlainObject(_0x32ce4c['dataset']),_0x13c63e=asPlainObject(_0x32ce4c['dbtableConfig']),_0x2da4f8=resolveSourceType(_0x32ce4c,_0x180c10,_0x13c63e),_0x4bba83=firstString(_0x32ce4c[_0x1280de(0x13c)],_0x32ce4c['code'],_0x180c10[_0x1280de(0x134)],_0x156686)||_0x156686;return{'id':firstNumber(_0x32ce4c['modelId'],_0x32ce4c['id'],_0x180c10['datasetId'])??firstString(_0x32ce4c[_0x1280de(0x13b)],_0x32ce4c['id'],_0x180c10[_0x1280de(0x128)])??null,'code':_0x4bba83,'name':firstString(_0x32ce4c[_0x1280de(0x15e)],_0x180c10[_0x1280de(0x149)],_0x180c10['name'])||null,'sourceType':_0x2da4f8,'dbTableSelector':_0x2da4f8===_0x1280de(0x15c)?{'dbLinkId':firstNumber(_0x13c63e[_0x1280de(0x126)]),'tableName':firstString(_0x13c63e[_0x1280de(0x125)])||null}:null};}function resolveSourceType(_0x32b46c,_0x1d6ca3,_0x4391b3){const _0xb29804=a65_0x50a72d,_0x58b06a=firstString(_0x32b46c[_0xb29804(0x152)],_0x32b46c[_0xb29804(0x156)],_0x1d6ca3[_0xb29804(0x152)],_0x1d6ca3[_0xb29804(0x156)])?.[_0xb29804(0x133)]()[_0xb29804(0x158)]();if(_0x58b06a===_0xb29804(0x15c)||_0x58b06a===_0xb29804(0x157))return _0x58b06a;if(Object['keys'](_0x4391b3)[_0xb29804(0x135)]>0x0)return _0xb29804(0x15c);throw CliErrors[_0xb29804(0x16c)](_0xb29804(0x12f));}function loadCurrentBusinessGroup(_0x53221b,_0x1a6ec4){const _0x5a0ad2=a65_0x50a72d,_0x3d7f18=readBusinessGroupFromDatasetDetail(_0x53221b,_0x1a6ec4['sourceType']);if(_0x3d7f18['found'])return normalizeBusinessGroup(_0x3d7f18[_0x5a0ad2(0x150)]);return'';}function readBusinessGroupFromDatasetDetail(_0x38a76e,_0x1bf93c){const _0x568dac=a65_0x50a72d,_0x2688f5=asPlainObject(_0x38a76e[_0x568dac(0x162)]),_0xb33556=firstPresent(_0x38a76e[_0x568dac(0x147)]);if(_0xb33556[_0x568dac(0x166)])return _0xb33556;const _0x44ae1a=firstPresent(_0x2688f5[_0x568dac(0x147)]);if(_0x44ae1a[_0x568dac(0x166)])return _0x44ae1a;if(_0x1bf93c===_0x568dac(0x15c))return{'found':![]};const _0x5c3046=readBusinessGroupFromExtend(_0x38a76e[_0x568dac(0x16d)]);if(_0x5c3046[_0x568dac(0x166)])return _0x5c3046;return readBusinessGroupFromExtend(_0x2688f5[_0x568dac(0x16d)]);}function a65_0x198f(){const _0x23df6b=['18196rDMeWT','Expected\x20','validation','extend','string','140TbOEvM','30dCIjot','tableName','dbId','payload','datasetId','expect-business-group','109232eNVtiT','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','business-group','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','update','28975NrOhFm','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','trim','datasetCode','length','/smartapi/dblink/updateTableBusinessGroup','1905816zmnjFK','768360SuXUdF','stringify','path','modelId','modelCode','Update\x20business\x20scenario\x20group','method','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','6JvRHFz','--business-group\x20must\x20not\x20be\x20blank','ungrouped',',\x20actual\x20','message','write','isArray','businessGroup','code','datasetName','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','appCode','business-group-update','80jCcnOq','str','dbTableSelector','value','unchanged','source','128073RZMuyo','dbLinkId','POST','sourceType','METADATA','toUpperCase','--code\x20is\x20required','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','matched','DB_TABLE','metadata','name','kind','824355OnzRra','number','dataset','backend','isFinite','db-table','found','/smartapi/question/er-config/business-group/edit','data','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.'];a65_0x198f=function(){return _0x23df6b;};return a65_0x198f();}function readBusinessGroupFromExtend(_0xd29e6e){const _0x37e250=a65_0x50a72d;if(_0xd29e6e===undefined||_0xd29e6e===null||_0xd29e6e==='')return{'found':![]};if(typeof _0xd29e6e===_0x37e250(0x16e))try{const _0x48626c=JSON['parse'](_0xd29e6e);return readBusinessGroupFromExtend(_0x48626c);}catch{return{'found':![]};}const _0x3bbb90=asPlainObject(_0xd29e6e);if(Object['prototype']['hasOwnProperty']['call'](_0x3bbb90,_0x37e250(0x147)))return{'found':!![],'value':_0x3bbb90[_0x37e250(0x147)]};return{'found':![]};}function firstPresent(..._0x20de2c){for(const _0x451a8d of _0x20de2c){if(_0x451a8d!==undefined&&_0x451a8d!==null)return{'found':!![],'value':_0x451a8d};}return{'found':![]};}function assertExpectedBusinessGroup(_0x2c353f,_0x5da469){const _0x5d5d78=a65_0x50a72d;if(_0x5da469===undefined)return;const _0x1dd8d3=normalizeBusinessGroupArgument(_0x5da469);if(_0x2c353f!==_0x1dd8d3)throw CliErrors[_0x5d5d78(0x16c)]('Expectation\x20mismatch\x20at\x20businessGroup',_0x5d5d78(0x16b)+JSON['stringify'](_0x1dd8d3)+',\x20actual\x20'+JSON[_0x5d5d78(0x139)](_0x2c353f));}function buildBackendPlan(_0x518fba,_0x271f3d,_0x3e5de2){const _0x2b08a9=a65_0x50a72d;if(_0x271f3d['sourceType']===_0x2b08a9(0x15c)){if(!_0x271f3d[_0x2b08a9(0x14f)]||_0x271f3d['dbTableSelector'][_0x2b08a9(0x154)]===null||!_0x271f3d[_0x2b08a9(0x14f)][_0x2b08a9(0x125)])throw CliErrors[_0x2b08a9(0x16c)](_0x2b08a9(0x15a),_0x2b08a9(0x12b));return{'kind':_0x2b08a9(0x165),'method':_0x2b08a9(0x155),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x271f3d[_0x2b08a9(0x14f)][_0x2b08a9(0x154)],'tableName':_0x271f3d[_0x2b08a9(0x14f)][_0x2b08a9(0x125)],'businessGroup':_0x3e5de2}};}return{'kind':_0x2b08a9(0x15d),'method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x518fba,'datasetCode':_0x271f3d[_0x2b08a9(0x148)],'businessGroup':_0x3e5de2}};}function normalizeBusinessGroup(_0x3fe831){const _0x1784e3=a65_0x50a72d;if(_0x3fe831===undefined||_0x3fe831===null)return'';return String(_0x3fe831)[_0x1784e3(0x133)]();}function normalizeBusinessGroupArgument(_0x22a3b4){const _0x163320=normalizeBusinessGroup(_0x22a3b4);return _0x163320===UNGROUPED_BUSINESS_GROUP?'':_0x163320;}function displayBusinessGroup(_0x1da598){return _0x1da598||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x452cd1){const _0x5cfc70=a65_0x50a72d;if(!_0x452cd1||typeof _0x452cd1!=='object'||Array[_0x5cfc70(0x146)](_0x452cd1))return{};return _0x452cd1;}function firstString(..._0x3793db){const _0x320235=a65_0x50a72d;for(const _0x573961 of _0x3793db){if(typeof _0x573961==='string'&&_0x573961[_0x320235(0x133)]())return _0x573961[_0x320235(0x133)]();if(typeof _0x573961==='number'&&Number[_0x320235(0x164)](_0x573961))return String(_0x573961);}return undefined;}function firstNumber(..._0xbd2b70){const _0x401f9a=a65_0x50a72d;for(const _0x141aaf of _0xbd2b70){if(typeof _0x141aaf===_0x401f9a(0x161)&&Number[_0x401f9a(0x164)](_0x141aaf))return _0x141aaf;if(typeof _0x141aaf==='string'&&_0x141aaf[_0x401f9a(0x133)]()&&Number['isFinite'](Number(_0x141aaf)))return Number(_0x141aaf);}return null;}function trim(_0x2de626){const _0x2a9fda=a65_0x50a72d;return String(_0x2de626||'')[_0x2a9fda(0x133)]();}
|
|
1
|
+
const a65_0x2fc42d=a65_0x1172;(function(_0x2f7bbe,_0x5541ff){const _0xe6ed02=a65_0x1172,_0x24a61a=_0x2f7bbe();while(!![]){try{const _0x327ca5=parseInt(_0xe6ed02(0xa2))/0x1*(-parseInt(_0xe6ed02(0xc2))/0x2)+parseInt(_0xe6ed02(0x82))/0x3+parseInt(_0xe6ed02(0xb6))/0x4*(parseInt(_0xe6ed02(0xcd))/0x5)+-parseInt(_0xe6ed02(0xc6))/0x6+parseInt(_0xe6ed02(0x96))/0x7*(-parseInt(_0xe6ed02(0x81))/0x8)+parseInt(_0xe6ed02(0xc0))/0x9+-parseInt(_0xe6ed02(0xc1))/0xa;if(_0x327ca5===_0x5541ff)break;else _0x24a61a['push'](_0x24a61a['shift']());}catch(_0x1bfba0){_0x24a61a['push'](_0x24a61a['shift']());}}}(a65_0x590d,0x58a52));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=a65_0x2fc42d(0x8f),METADATA_BACKEND_PATH=a65_0x2fc42d(0x8a),UNGROUPED_BUSINESS_GROUP=a65_0x2fc42d(0x8c);function a65_0x1172(_0x1ed3fd,_0xa29ab5){_0x1ed3fd=_0x1ed3fd-0x80;const _0x590dfe=a65_0x590d();let _0x11726d=_0x590dfe[_0x1ed3fd];return _0x11726d;}export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x34a0b6,input:_0x2dec28,dryRun:_0x36ea95}){const _0x1e14c4=a65_0x2fc42d;validateInput(_0x2dec28);const _0x156065=normalizeBusinessGroupArgument(_0x2dec28[_0x1e14c4(0xc7)]),_0x102e6a=await getDatasetDetail(_0x2dec28[_0x1e14c4(0x8b)]),_0x39067c=resolveBusinessGroupDataset(_0x102e6a,_0x2dec28[_0x1e14c4(0x8b)]);assertBusinessGroupUpdateSupported(_0x39067c,_0x156065);const _0x43855d=loadCurrentBusinessGroup(_0x102e6a,_0x39067c);assertExpectedBusinessGroup(_0x43855d,_0x2dec28[_0x1e14c4(0x90)]);const _0x5dcc78=buildBackendPlan(_0x34a0b6,_0x39067c,_0x156065),_0x2cbf78=_0x43855d!==_0x156065;let _0x49b0d4;if(_0x2cbf78&&!_0x36ea95){_0x5dcc78[_0x1e14c4(0xbc)]===_0x1e14c4(0x9e)?await updateDbTableBusinessGroup(_0x5dcc78[_0x1e14c4(0xb1)]):await updateErBusinessGroup(_0x5dcc78[_0x1e14c4(0xb1)]);const _0x47abf1=await getDatasetDetail(_0x39067c[_0x1e14c4(0x8b)]),_0x2d2259=resolveBusinessGroupDataset(_0x47abf1,_0x39067c[_0x1e14c4(0x8b)]),_0x433282=loadCurrentBusinessGroup(_0x47abf1,_0x2d2259);if(_0x433282!==_0x156065)throw CliErrors[_0x1e14c4(0xaa)](_0x1e14c4(0xa7),_0x1e14c4(0xb2)+JSON['stringify'](displayBusinessGroup(_0x156065))+',\x20actual\x20'+JSON['stringify'](displayBusinessGroup(_0x433282))+'.');_0x49b0d4={'verified':!![],'status':_0x1e14c4(0x97),'afterReadback':{'businessGroup':displayBusinessGroup(_0x433282)}};}else!_0x2cbf78&&(_0x49b0d4={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x43855d)}});const _0x2a79d6={'operation':_0x1e14c4(0xb4),'appCode':_0x34a0b6,'selector':{'code':_0x39067c[_0x1e14c4(0x8b)]},'dataset':{'id':_0x39067c['id'],'code':_0x39067c[_0x1e14c4(0x8b)],'name':_0x39067c['name'],'sourceType':_0x39067c[_0x1e14c4(0xab)]},'before':{'businessGroup':displayBusinessGroup(_0x43855d)},'after':{'businessGroup':displayBusinessGroup(_0x156065)},'changed':_0x2cbf78,'dryRun':_0x36ea95,'submitted':_0x2cbf78&&!_0x36ea95,'backend':{'method':_0x5dcc78[_0x1e14c4(0x84)],'path':_0x5dcc78[_0x1e14c4(0xb8)],'payload':_0x5dcc78['payload']},..._0x49b0d4?{'verification':_0x49b0d4}:{},'warnings':[]};return{'ok':!![],'data':_0x2a79d6,'message':_0x2cbf78?_0x36ea95?_0x1e14c4(0xbd)+_0x39067c[_0x1e14c4(0x8b)]:_0x1e14c4(0x93)+_0x39067c['code']:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x39067c[_0x1e14c4(0x8b)]};}export const datasetBusinessGroupUpdate={'service':a65_0x2fc42d(0x95),'command':a65_0x2fc42d(0xc5),'description':a65_0x2fc42d(0xa6),'risk':'write','flags':[CODE_FLAG,{'name':a65_0x2fc42d(0xa9),'type':a65_0x2fc42d(0xc4),'required':!![],'description':a65_0x2fc42d(0xad)},{'name':'expect-business-group','type':a65_0x2fc42d(0xc4),'required':![],'description':a65_0x2fc42d(0xca)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x16e8fe){validateInput(readBusinessGroupUpdateInput(_0x16e8fe));},async 'dryRun'(_0x586fc3){const _0x389349=a65_0x2fc42d,_0x2c8621=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x586fc3[_0x389349(0xc8)],'input':readBusinessGroupUpdateInput(_0x586fc3),'dryRun':!![]});return{'method':_0x2c8621[_0x389349(0x9c)]['backend'][_0x389349(0x84)],'url':_0x2c8621[_0x389349(0x9c)]['backend'][_0x389349(0xb8)],'body':_0x2c8621[_0x389349(0x9c)][_0x389349(0xbe)][_0x389349(0xb1)],'description':_0x2c8621['message'],..._0x2c8621[_0x389349(0x9c)]};},async 'execute'(_0x36b1b1){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x36b1b1['appCode'],'input':readBusinessGroupUpdateInput(_0x36b1b1),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x340a75){const _0x17a7ea=a65_0x2fc42d,_0x19dfd6=_0x340a75[_0x17a7ea(0x86)](_0x17a7ea(0xc9));return{'code':trim(_0x340a75[_0x17a7ea(0x86)](_0x17a7ea(0x8b))),'businessGroup':_0x340a75[_0x17a7ea(0x86)](_0x17a7ea(0xa9)),'expectBusinessGroup':_0x19dfd6===undefined||_0x19dfd6===''?undefined:_0x19dfd6};}function validateInput(_0x4b4d6e){const _0x45a045=a65_0x2fc42d;if(!trim(_0x4b4d6e['code']))throw CliErrors[_0x45a045(0x99)](_0x45a045(0xb3));if(_0x4b4d6e[_0x45a045(0xc7)]===undefined)throw CliErrors[_0x45a045(0x99)](_0x45a045(0xbf));if(!trim(_0x4b4d6e[_0x45a045(0xc7)]))throw CliErrors[_0x45a045(0x99)](_0x45a045(0x9f));}function assertBusinessGroupUpdateSupported(_0x15d2c7,_0x1da0dc){const _0x37db50=a65_0x2fc42d;if(_0x15d2c7['sourceType']==='DB_TABLE'&&!_0x1da0dc)throw CliErrors[_0x37db50(0x99)](_0x37db50(0xaf));}function resolveBusinessGroupDataset(_0x493f0a,_0x198b80){const _0x3f028e=a65_0x2fc42d,_0xef952d=asPlainObject(_0x493f0a[_0x3f028e(0x95)]),_0x2248c7=asPlainObject(_0x493f0a[_0x3f028e(0x9b)]),_0x5d7d25=resolveSourceType(_0x493f0a,_0xef952d,_0x2248c7),_0x4bc68c=firstString(_0x493f0a[_0x3f028e(0xb5)],_0x493f0a[_0x3f028e(0x8b)],_0xef952d['datasetCode'],_0x198b80)||_0x198b80;return{'id':firstNumber(_0x493f0a['modelId'],_0x493f0a['id'],_0xef952d[_0x3f028e(0x8e)])??firstString(_0x493f0a[_0x3f028e(0x83)],_0x493f0a['id'],_0xef952d['datasetId'])??null,'code':_0x4bc68c,'name':firstString(_0x493f0a['name'],_0xef952d[_0x3f028e(0x9a)],_0xef952d[_0x3f028e(0x9d)])||null,'sourceType':_0x5d7d25,'dbTableSelector':_0x5d7d25===_0x3f028e(0xbb)?{'dbLinkId':firstNumber(_0x2248c7[_0x3f028e(0x80)]),'tableName':firstString(_0x2248c7[_0x3f028e(0x87)])||null}:null};}function resolveSourceType(_0x33f235,_0x37e817,_0x2a7f69){const _0x38f6de=a65_0x2fc42d,_0x5d48c3=firstString(_0x33f235[_0x38f6de(0xa3)],_0x33f235[_0x38f6de(0xab)],_0x37e817[_0x38f6de(0xa3)],_0x37e817['sourceType'])?.['trim']()[_0x38f6de(0xb7)]();if(_0x5d48c3===_0x38f6de(0xbb)||_0x5d48c3===_0x38f6de(0xb0))return _0x5d48c3;if(Object[_0x38f6de(0x92)](_0x2a7f69)[_0x38f6de(0xac)]>0x0)return _0x38f6de(0xbb);throw CliErrors['validation'](_0x38f6de(0xa8));}function loadCurrentBusinessGroup(_0x11c90,_0x9cac88){const _0x1e0412=a65_0x2fc42d,_0xb651d6=readBusinessGroupFromDatasetDetail(_0x11c90,_0x9cac88[_0x1e0412(0xab)]);if(_0xb651d6[_0x1e0412(0xcc)])return normalizeBusinessGroup(_0xb651d6['value']);return'';}function a65_0x590d(){const _0x459333=['number','DB_TABLE','kind','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','backend','--business-group\x20is\x20required','5232726xxITRN','1323790XSVKbi','2RvjmhW','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','string','business-group-update','2145450zwhIOn','businessGroup','appCode','expect-business-group','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','dbTableSelector','found','144545UDhmmi',',\x20actual\x20','dbId','8vBkqLe','1628955qCwoGa','modelId','method','POST','str','tableName','metadata','trim','/smartapi/question/er-config/business-group/edit','code','ungrouped','isFinite','datasetId','/smartapi/dblink/updateTableBusinessGroup','expectBusinessGroup','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','keys','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','dbLinkId','dataset','402108HhIXck','matched','parse','validation','datasetName','dbtableConfig','data','name','db-table','--business-group\x20must\x20not\x20be\x20blank','Expectation\x20mismatch\x20at\x20businessGroup','extend','445183AVVxDd','source','stringify','isArray','Update\x20business\x20scenario\x20group','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','business-group','apiError','sourceType','length','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','hasOwnProperty','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','METADATA','payload','Expected\x20','--code\x20is\x20required','update','modelCode','32zajglL','toUpperCase','path','call'];a65_0x590d=function(){return _0x459333;};return a65_0x590d();}function readBusinessGroupFromDatasetDetail(_0x225094,_0x17a050){const _0x56b8eb=a65_0x2fc42d,_0x43745d=asPlainObject(_0x225094['dataset']),_0x215e80=firstPresent(_0x225094[_0x56b8eb(0xc7)]);if(_0x215e80[_0x56b8eb(0xcc)])return _0x215e80;const _0x4b0ec5=firstPresent(_0x43745d[_0x56b8eb(0xc7)]);if(_0x4b0ec5[_0x56b8eb(0xcc)])return _0x4b0ec5;if(_0x17a050===_0x56b8eb(0xbb))return{'found':![]};const _0x17bd24=readBusinessGroupFromExtend(_0x225094['extend']);if(_0x17bd24['found'])return _0x17bd24;return readBusinessGroupFromExtend(_0x43745d[_0x56b8eb(0xa1)]);}function readBusinessGroupFromExtend(_0xc68cba){const _0x27032c=a65_0x2fc42d;if(_0xc68cba===undefined||_0xc68cba===null||_0xc68cba==='')return{'found':![]};if(typeof _0xc68cba===_0x27032c(0xc4))try{const _0x5e2c70=JSON[_0x27032c(0x98)](_0xc68cba);return readBusinessGroupFromExtend(_0x5e2c70);}catch{return{'found':![]};}const _0xad5ec4=asPlainObject(_0xc68cba);if(Object['prototype'][_0x27032c(0xae)][_0x27032c(0xb9)](_0xad5ec4,_0x27032c(0xc7)))return{'found':!![],'value':_0xad5ec4['businessGroup']};return{'found':![]};}function firstPresent(..._0x28fe15){for(const _0x50c0f4 of _0x28fe15){if(_0x50c0f4!==undefined&&_0x50c0f4!==null)return{'found':!![],'value':_0x50c0f4};}return{'found':![]};}function assertExpectedBusinessGroup(_0x8d47cd,_0x22c4bc){const _0x17e3b3=a65_0x2fc42d;if(_0x22c4bc===undefined)return;const _0x3939c4=normalizeBusinessGroupArgument(_0x22c4bc);if(_0x8d47cd!==_0x3939c4)throw CliErrors['validation'](_0x17e3b3(0xa0),_0x17e3b3(0xb2)+JSON[_0x17e3b3(0xa4)](_0x3939c4)+_0x17e3b3(0xce)+JSON[_0x17e3b3(0xa4)](_0x8d47cd));}function buildBackendPlan(_0x8c97e2,_0x362b2b,_0xf1097c){const _0x185774=a65_0x2fc42d;if(_0x362b2b['sourceType']===_0x185774(0xbb)){if(!_0x362b2b[_0x185774(0xcb)]||_0x362b2b[_0x185774(0xcb)][_0x185774(0x94)]===null||!_0x362b2b['dbTableSelector']['tableName'])throw CliErrors[_0x185774(0x99)](_0x185774(0xc3),_0x185774(0x91));return{'kind':_0x185774(0x9e),'method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x362b2b[_0x185774(0xcb)][_0x185774(0x94)],'tableName':_0x362b2b[_0x185774(0xcb)]['tableName'],'businessGroup':_0xf1097c}};}return{'kind':_0x185774(0x88),'method':_0x185774(0x85),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x8c97e2,'datasetCode':_0x362b2b[_0x185774(0x8b)],'businessGroup':_0xf1097c}};}function normalizeBusinessGroup(_0x3f6ec2){const _0x547f42=a65_0x2fc42d;if(_0x3f6ec2===undefined||_0x3f6ec2===null)return'';return String(_0x3f6ec2)[_0x547f42(0x89)]();}function normalizeBusinessGroupArgument(_0x2e1760){const _0x2a1e1d=normalizeBusinessGroup(_0x2e1760);return _0x2a1e1d===UNGROUPED_BUSINESS_GROUP?'':_0x2a1e1d;}function displayBusinessGroup(_0x4d97b5){return _0x4d97b5||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0xe9afc){const _0x225eb0=a65_0x2fc42d;if(!_0xe9afc||typeof _0xe9afc!=='object'||Array[_0x225eb0(0xa5)](_0xe9afc))return{};return _0xe9afc;}function firstString(..._0x3cc7fd){const _0x53df0e=a65_0x2fc42d;for(const _0x3bb9a0 of _0x3cc7fd){if(typeof _0x3bb9a0===_0x53df0e(0xc4)&&_0x3bb9a0[_0x53df0e(0x89)]())return _0x3bb9a0['trim']();if(typeof _0x3bb9a0==='number'&&Number[_0x53df0e(0x8d)](_0x3bb9a0))return String(_0x3bb9a0);}return undefined;}function firstNumber(..._0x55aa27){const _0x1a6894=a65_0x2fc42d;for(const _0x29b879 of _0x55aa27){if(typeof _0x29b879===_0x1a6894(0xba)&&Number[_0x1a6894(0x8d)](_0x29b879))return _0x29b879;if(typeof _0x29b879===_0x1a6894(0xc4)&&_0x29b879['trim']()&&Number[_0x1a6894(0x8d)](Number(_0x29b879)))return Number(_0x29b879);}return null;}function trim(_0x3e888c){const _0x80589c=a65_0x2fc42d;return String(_0x3e888c||'')[_0x80589c(0x89)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a66_0x3c1b(_0x109935,_0x1c82c8){_0x109935=_0x109935-0x9d;const _0x53402f=a66_0x5340();let _0x3c1be9=_0x53402f[_0x109935];return _0x3c1be9;}const a66_0x3aa153=a66_0x3c1b;(function(_0x6242d,_0x54ed06){const _0x120793=a66_0x3c1b,_0x505dd6=_0x6242d();while(!![]){try{const _0x4d2ca1=parseInt(_0x120793(0xa8))/0x1+-parseInt(_0x120793(0xa0))/0x2+-parseInt(_0x120793(0x9d))/0x3+-parseInt(_0x120793(0xad))/0x4+-parseInt(_0x120793(0xa9))/0x5+-parseInt(_0x120793(0xa3))/0x6*(-parseInt(_0x120793(0xae))/0x7)+-parseInt(_0x120793(0xa6))/0x8*(-parseInt(_0x120793(0xac))/0x9);if(_0x4d2ca1===_0x54ed06)break;else _0x505dd6['push'](_0x505dd6['shift']());}catch(_0x38f55b){_0x505dd6['push'](_0x505dd6['shift']());}}}(a66_0x5340,0x5fcc2));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a66_0x5340(){const _0x10df7e=['businessGroup','490395CtMxOQ','length','DB_TABLE','1113322lfJVBe','dbid','business-groups','14946KaGGgp','trim','read','7352FdxZNp','appCode','454375azoNdV','3271380iAfMCP','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','ungrouped','10917TzPVBO','783648kKTCNz','1106RAcQdE','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA'];a66_0x5340=function(){return _0x10df7e;};return a66_0x5340();}export const datasetBusinessGroups={'service':'dataset','command':a66_0x3aa153(0xa2),'description':a66_0x3aa153(0xaf),'risk':a66_0x3aa153(0xa5),'flags':[{'name':'dbid','type':'number','required':!![],'description':a66_0x3aa153(0xaa)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2f195b){const _0x522c83=a66_0x3aa153,_0x3c50f4=_0x2f195b['num'](_0x522c83(0xa1)),_0x2978aa=await getErBusinessGroupSummary(_0x2f195b[_0x522c83(0xa7)],_0x3c50f4),_0x4918ed=_0x2978aa['groups']['map'](_0x2afa9f=>({..._0x2afa9f,'businessGroup':_0x2afa9f[_0x522c83(0xb0)][_0x522c83(0xa4)]()||_0x522c83(0xab)}));return{'ok':!![],'data':{..._0x2978aa,'groups':_0x4918ed,'scope':_0x522c83(0x9f)},'message':'Found\x20'+_0x4918ed[_0x522c83(0x9e)]+'\x20business\x20group(s)\x20for\x20database\x20connection\x20'+_0x3c50f4};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a67_0x24c24c=a67_0x6dfa;(function(_0x1bb7a7,_0x112fae){const _0x22f9ab=a67_0x6dfa,_0x291db6=_0x1bb7a7();while(!![]){try{const _0x21e08f=parseInt(_0x22f9ab(0x12f))/0x1*(parseInt(_0x22f9ab(0x138))/0x2)+-parseInt(_0x22f9ab(0x120))/0x3*(parseInt(_0x22f9ab(0x13f))/0x4)+-parseInt(_0x22f9ab(0x12a))/0x5*(parseInt(_0x22f9ab(0x12d))/0x6)+-parseInt(_0x22f9ab(0x124))/0x7*(-parseInt(_0x22f9ab(0x134))/0x8)+parseInt(_0x22f9ab(0x12b))/0x9+parseInt(_0x22f9ab(0x13e))/0xa*(parseInt(_0x22f9ab(0x126))/0xb)+parseInt(_0x22f9ab(0x137))/0xc;if(_0x21e08f===_0x112fae)break;else _0x291db6['push'](_0x291db6['shift']());}catch(_0x5a1791){_0x291db6['push'](_0x291db6['shift']());}}}(a67_0x4f06,0xadf69));function a67_0x6dfa(_0x103245,_0xa5fad7){_0x103245=_0x103245-0x11c;const _0x4f06cf=a67_0x4f06();let _0x6dfafd=_0x4f06cf[_0x103245];return _0x6dfafd;}import{CliErrors}from'../../errors.js';function a67_0x4f06(){const _0x248e51=['1489680qHCNKW','21742dkTdrF','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','name','SQL\x20schema\x20validation','unknown','UNKNOWN','10EtAbKC','8SnSCyY','filter','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','tableName','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','185817SkwAOv','dataset','lovrabet','source','56dyuxgO','datasetName','6126604WuytjB','trim','join','dbtableConfig','2645lblBdj','4279239XJBRYv','sourceType','10554vGPZNX','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','1wbGtko','code','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','\x20is\x20','599496vVbQfy','length','dbId'];a67_0x4f06=function(){return _0x248e51;};return a67_0x4f06();}export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a67_0x24c24c(0x122),'filter':a67_0x24c24c(0x132),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY=a67_0x24c24c(0x12e);function valueToString(_0x5ac96f){const _0x268e1d=a67_0x24c24c;return _0x5ac96f==null?'':String(_0x5ac96f)[_0x268e1d(0x127)]();}function getDatasetCode(_0x45897a){const _0x2c6a1a=a67_0x24c24c;return valueToString(_0x45897a[_0x2c6a1a(0x130)]??_0x45897a['modelCode']??_0x45897a[_0x2c6a1a(0x121)]?.['datasetCode']);}function getDatasetName(_0xe8d547){const _0x36aa92=a67_0x24c24c;return valueToString(_0xe8d547[_0x36aa92(0x13a)]??_0xe8d547['dataset']?.[_0x36aa92(0x125)])||_0x36aa92(0x13c);}function getDatasetSource(_0x45d44c){const _0x2a8d78=a67_0x24c24c;return valueToString(_0x45d44c[_0x2a8d78(0x123)]??_0x45d44c[_0x2a8d78(0x121)]?.[_0x2a8d78(0x12c)])['toUpperCase']();}function getDbtableConfig(_0x3ff85b){const _0x4ccefc=a67_0x24c24c,_0x5122a8=_0x3ff85b[_0x4ccefc(0x129)]??_0x3ff85b['dbtable'];return _0x5122a8&&typeof _0x5122a8==='object'?_0x5122a8:{};}export function isDbTableBackedDataset(_0x2e170f){const _0x3800d5=a67_0x24c24c,_0x5ac7d0=getDatasetSource(_0x2e170f);if(_0x5ac7d0==='METADATA')return![];const _0x48ab2b=getDbtableConfig(_0x2e170f),_0x993998=_0x48ab2b[_0x3800d5(0x136)]??_0x48ab2b['id'],_0x2ac61a=valueToString(_0x48ab2b['tableName']??_0x2e170f[_0x3800d5(0x11e)]??_0x2e170f['dataset']?.[_0x3800d5(0x11e)]);return _0x993998!==undefined&&_0x993998!==null&&_0x2ac61a[_0x3800d5(0x135)]>0x0;}export function filterDbTableBackedDatasets(_0x21c405){const _0x1391ac=a67_0x24c24c;return _0x21c405[_0x1391ac(0x11c)](_0x10c863=>isDbTableBackedDataset(_0x10c863));}export function buildDbTableBackedRequirementMessage(_0x3e2107,_0x208f2d=a67_0x24c24c(0x13b)){const _0x33fc50=a67_0x24c24c,_0x1e5fcb=getDatasetSource(_0x3e2107)||_0x33fc50(0x13d),_0x282a67=getDatasetName(_0x3e2107),_0x21b5ed=getDatasetCode(_0x3e2107),_0x542f73=_0x21b5ed?'\x20('+_0x21b5ed+')':'';return['The\x20current\x20dataset\x20\x22'+_0x282a67+'\x22'+_0x542f73+_0x33fc50(0x133)+_0x1e5fcb+_0x33fc50(0x139)+_0x208f2d+'.',_0x33fc50(0x131),_0x33fc50(0x11d),_0x33fc50(0x11f)+RUNTIME_DATA_ACCESS_COMMANDS[_0x33fc50(0x11c)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'.'][_0x33fc50(0x128)]('\x20');}export function assertDatasetIsDbTableBacked(_0x310fce,_0x1e1db9){if(!isDbTableBackedDataset(_0x310fce))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x310fce,_0x1e1db9));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x5624bb=a68_0x29d7;(function(_0x1c8e67,_0x314e21){const _0x2416a4=a68_0x29d7,_0x4cacec=_0x1c8e67();while(!![]){try{const _0x4f9c28=-parseInt(_0x2416a4(0xeb))/0x1*(-parseInt(_0x2416a4(0xec))/0x2)+-parseInt(_0x2416a4(0xe8))/0x3*(parseInt(_0x2416a4(0xee))/0x4)+parseInt(_0x2416a4(0xe6))/0x5*(parseInt(_0x2416a4(0xea))/0x6)+-parseInt(_0x2416a4(0xe3))/0x7*(parseInt(_0x2416a4(0xe0))/0x8)+-parseInt(_0x2416a4(0xe5))/0x9+-parseInt(_0x2416a4(0xe7))/0xa*(-parseInt(_0x2416a4(0xe2))/0xb)+-parseInt(_0x2416a4(0xe1))/0xc;if(_0x4f9c28===_0x314e21)break;else _0x4cacec['push'](_0x4cacec['shift']());}catch(_0x8e18e5){_0x4cacec['push'](_0x4cacec['shift']());}}}(a68_0x3521,0x54eb7));import{createCrossDbRelation}from'../../core/api-client.js';function a68_0x29d7(_0x283825,_0x46fe18){_0x283825=_0x283825-0xe0;const _0x3521da=a68_0x3521();let _0x29d74c=_0x3521da[_0x283825];return _0x29d74c;}function a68_0x3521(){const _0x16d03b=['91048erIeiH','1574160dTZwzZ','895653ScIEUV','7SqxPMO','cross-relation-create','2998044ecCqgt','3140ZHhpnm','30VhpQuB','250329JlyRQE','write','1602LySwVC','578449ifLPvX','2HHkNry','create','8fqdYgb','dataset'];a68_0x3521=function(){return _0x16d03b;};return a68_0x3521();}import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationCreate={'service':a68_0x5624bb(0xef),'command':a68_0x5624bb(0xe4),'description':'Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','risk':a68_0x5624bb(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 _0x1e2244=>validateCrossRelation(_0x1e2244,a68_0x5624bb(0xed)),'dryRun':_0x4403e3=>previewCrossRelation(_0x4403e3,a68_0x5624bb(0xed)),'execute':_0x38a948=>executeCrossRelation(_0x38a948,a68_0x5624bb(0xed),createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x5da7bf=a69_0x1ee1;(function(_0x31e1d8,_0x47dd48){const _0x2dfd96=a69_0x1ee1,_0x182b87=_0x31e1d8();while(!![]){try{const _0x5bf1d5=-parseInt(_0x2dfd96(0xe1))/0x1+parseInt(_0x2dfd96(0xe8))/0x2*(parseInt(_0x2dfd96(0xe2))/0x3)+-parseInt(_0x2dfd96(0xe3))/0x4*(parseInt(_0x2dfd96(0xe4))/0x5)+parseInt(_0x2dfd96(0xe0))/0x6*(-parseInt(_0x2dfd96(0xea))/0x7)+-parseInt(_0x2dfd96(0xec))/0x8*(parseInt(_0x2dfd96(0xdf))/0x9)+-parseInt(_0x2dfd96(0xe7))/0xa+parseInt(_0x2dfd96(0xe5))/0xb;if(_0x5bf1d5===_0x47dd48)break;else _0x182b87['push'](_0x182b87['shift']());}catch(_0x8c7c50){_0x182b87['push'](_0x182b87['shift']());}}}(a69_0x24f9,0xc437c));import{deleteCrossDbRelation}from'../../core/api-client.js';function a69_0x24f9(){const _0x3b06dc=['11119150HokETf','743818yhwGfF','delete','98KRNLIS','Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','200hGZMWL','cross-relation-delete','82791rNSxxg','536262ecIXVW','823938eRhVBG','9eNfHKL','632984NQbYlo','5ALyjVj','35896663YhFVSN','high-risk-write'];a69_0x24f9=function(){return _0x3b06dc;};return a69_0x24f9();}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 a69_0x1ee1(_0x526db1,_0x51ad47){_0x526db1=_0x526db1-0xde;const _0x24f996=a69_0x24f9();let _0x1ee1c1=_0x24f996[_0x526db1];return _0x1ee1c1;}export const datasetCrossRelationDelete={'service':'dataset','command':a69_0x5da7bf(0xde),'description':a69_0x5da7bf(0xeb),'risk':a69_0x5da7bf(0xe6),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x474501=>validateCrossRelation(_0x474501,a69_0x5da7bf(0xe9)),'dryRun':_0x24bfa4=>previewCrossRelation(_0x24bfa4,a69_0x5da7bf(0xe9)),'execute':_0x28b24f=>executeCrossRelation(_0x28b24f,a69_0x5da7bf(0xe9),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x3ce78a=a70_0x7c8b;(function(_0xbf6f48,_0x217159){const _0x17685d=a70_0x7c8b,_0x42cac3=_0xbf6f48();while(!![]){try{const _0x3e7ede=parseInt(_0x17685d(0x127))/0x1+-parseInt(_0x17685d(0x126))/0x2+parseInt(_0x17685d(0x12a))/0x3+-parseInt(_0x17685d(0x133))/0x4*(-parseInt(_0x17685d(0x129))/0x5)+-parseInt(_0x17685d(0x12b))/0x6*(parseInt(_0x17685d(0x134))/0x7)+-parseInt(_0x17685d(0x125))/0x8*(-parseInt(_0x17685d(0x12f))/0x9)+-parseInt(_0x17685d(0x130))/0xa*(parseInt(_0x17685d(0x131))/0xb);if(_0x3e7ede===_0x217159)break;else _0x42cac3['push'](_0x42cac3['shift']());}catch(_0x13693c){_0x42cac3['push'](_0x42cac3['shift']());}}}(a70_0x2c0c,0x810dd));function a70_0x2c0c(){const _0x4084c6=['List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','2548648eYyqap','1410932ilvMfm','887004MXTpvR','length','5YrelTb','2641122JXDPvY','220398pHehKB','cross-relation-list','Cross-database\x20relations:\x20','list','9cZgXRh','1840oNBZWy','61622QffDLp','appCode','4094956akmtHV','161MQbdMT','dataset','map'];a70_0x2c0c=function(){return _0x4084c6;};return a70_0x2c0c();}function a70_0x7c8b(_0x40d82c,_0xfc71dd){_0x40d82c=_0x40d82c-0x124;const _0x2c0c5c=a70_0x2c0c();let _0x7c8bfb=_0x2c0c5c[_0x40d82c];return _0x7c8bfb;}import{queryCrossDbRelations}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CROSS_RELATION_DBLINK_FLAG,CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG}from'../../commands/common/flags.js';import{projectCrossRelation,resolveCrossRelationQuery,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationList={'service':a70_0x3ce78a(0x135),'command':a70_0x3ce78a(0x12c),'description':a70_0x3ce78a(0x124),'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 _0xe1a8bf=>validateCrossRelation(_0xe1a8bf,a70_0x3ce78a(0x12e)),async 'execute'(_0x658eb1){const _0x18e6b5=a70_0x3ce78a,_0x179d34=await resolveCrossRelationQuery(_0x658eb1),_0x476cd5=await queryCrossDbRelations(_0x179d34);return{'ok':!![],'data':{'appCode':_0x658eb1[_0x18e6b5(0x132)],'selector':_0x179d34,'total':_0x476cd5[_0x18e6b5(0x128)],'relations':_0x476cd5[_0x18e6b5(0x136)](projectCrossRelation)},'message':_0x18e6b5(0x12d)+_0x476cd5['length']+'\x20relation(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a71_0xf9ebde=a71_0x3737;(function(_0x25b4c4,_0x1779fc){const _0x228a65=a71_0x3737,_0x23794f=_0x25b4c4();while(!![]){try{const _0x1d4151=parseInt(_0x228a65(0x1da))/0x1*(parseInt(_0x228a65(0x1d0))/0x2)+-parseInt(_0x228a65(0x1d3))/0x3+-parseInt(_0x228a65(0x215))/0x4*(-parseInt(_0x228a65(0x1e6))/0x5)+parseInt(_0x228a65(0x1e1))/0x6*(-parseInt(_0x228a65(0x1f1))/0x7)+parseInt(_0x228a65(0x1e4))/0x8+parseInt(_0x228a65(0x200))/0x9+-parseInt(_0x228a65(0x1cf))/0xa*(parseInt(_0x228a65(0x1cc))/0xb);if(_0x1d4151===_0x1779fc)break;else _0x23794f['push'](_0x23794f['shift']());}catch(_0x4fba95){_0x23794f['push'](_0x23794f['shift']());}}}(a71_0x3cc6,0xe74ea));import{getDatasetDetail,queryCrossDbRelations}from'../../core/api-client.js';import{CROSS_DB_RELATION_PATHS}from'../../core/cross-db-relation.js';function a71_0x3737(_0x5c0720,_0x59b8b2){_0x5c0720=_0x5c0720-0x1c8;const _0x3cc621=a71_0x3cc6();let _0x3737dd=_0x3cc621[_0x5c0720];return _0x3737dd;}import{CliError,CliErrors}from'../../errors.js';import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0x33b2a0,_0x128dac){const _0x5206f4=a71_0x3737,_0x5cc951=_0x33b2a0[_0x5206f4(0x1e0)](_0x128dac)[_0x5206f4(0x204)]();if(!_0x5cc951)throw CliErrors[_0x5206f4(0x201)](_0x128dac);return _0x5cc951;}function explicitDblink(_0x172735){const _0x249a98=a71_0x3737,_0xef41ff=_0x172735['flag'](_0x249a98(0x206));if(_0xef41ff===undefined||_0xef41ff===null)return undefined;const _0x4f0092=Number(_0xef41ff);if(!Number[_0x249a98(0x21a)](_0x4f0092)||_0x4f0092<=0x0)throw CliErrors[_0x249a98(0x208)]('--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x4f0092;}function a71_0x3cc6(){const _0x5d5b32=['create','\x20write\x20was\x20not\x20verified.','trim','body','from-dblink-id','dataset','validation','sourceType','fromField','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','delete','before','Dataset\x20','from-column','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','update','expectedLabel','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','datasetCode','4MUJzJo','Cross-database\x20relation\x20','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','extend','from-datasetcode','isSafeInteger','relationId','fromDatasetName','catch','toDatasetName','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','defineProperty','toDblinkId','tableName','string','length','parse','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','4310801oomQeJ','refTableLabelName','filter','20BYpBEN','227002rzeYrN','list','to-label-column','1687071PFdfGU','data','message','includes','POST','dbtable','toTableName','4rEdKEV','to-column','toLowerCase','to-datasetcode','toField','query','str','1960164hTfiWL','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','1144384AHKmFY','cardinality','5002025KrltGL','appCode','multiple\x20cross-database\x20relations\x20matched','DB_TABLE','map','\x20a\x20cross-database\x20relation\x20for\x20','some','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','fromDatasetCode','apiError','unconfirmed','7oNvNcJ','from','label_inherited','table','toDatasetCode','dblinkId','fromDblinkId','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','Invalid\x20--cardinality.','fromTableName','relationType','\x20has\x20invalid\x20storage\x20configuration.','dbtableConfig','storageProfile','dbId','9205290lDUlhJ','flagMissing'];a71_0x3cc6=function(){return _0x5d5b32;};return a71_0x3cc6();}export function validateCrossRelation(_0x1e410f,_0xe988d2){const _0xb63f51=a71_0x3737,_0x5a5a7f=explicitDblink(_0x1e410f);if(_0xe988d2===_0xb63f51(0x1d1)){if(!_0x1e410f[_0xb63f51(0x1e0)]('from-datasetcode')['trim']()&&_0x5a5a7f===undefined)throw CliErrors[_0xb63f51(0x208)](_0xb63f51(0x20b));return;}required(_0x1e410f,_0xb63f51(0x219)),required(_0x1e410f,_0xb63f51(0x20f));if(_0xe988d2!==_0xb63f51(0x20c)){required(_0x1e410f,_0xb63f51(0x1dd)),required(_0x1e410f,_0xb63f51(0x1db));const _0x378f60=_0x1e410f[_0xb63f51(0x1e0)](_0xb63f51(0x1e5))['trim']();if(_0x378f60&&!CROSS_RELATION_CARDINALITY_FLAG['enum'][_0xb63f51(0x1d6)](_0x378f60))throw CliErrors[_0xb63f51(0x208)](_0xb63f51(0x1f9));}}async function resolveEndpoint(_0xd05b14){const _0x1c271d=a71_0x3737,_0x2ce7b6=await getDatasetDetail(_0xd05b14),_0x3ca632=_0x2ce7b6?.[_0x1c271d(0x207)]??{};if((_0x2ce7b6?.['source']??_0x3ca632[_0x1c271d(0x209)])!==_0x1c271d(0x1e9))throw CliErrors['validation'](_0x1c271d(0x20e)+_0xd05b14+_0x1c271d(0x217));const _0x519646=_0x2ce7b6[_0x1c271d(0x1fd)]??_0x2ce7b6[_0x1c271d(0x1d8)]??{};let _0x5de883=_0x2ce7b6[_0x1c271d(0x218)]??_0x3ca632[_0x1c271d(0x218)]??{};if(typeof _0x5de883===_0x1c271d(0x1c8))try{_0x5de883=_0x5de883[_0x1c271d(0x204)]()?JSON[_0x1c271d(0x1ca)](_0x5de883):{};}catch{throw CliErrors['validation'](_0x1c271d(0x20e)+_0xd05b14+_0x1c271d(0x1fc));}const _0x52671e=Number(_0x5de883?.[_0x1c271d(0x1fe)]?.[_0x1c271d(0x1ff)]??_0x2ce7b6[_0x1c271d(0x1fe)]?.[_0x1c271d(0x1ff)]??_0x3ca632['storageProfile']?.['dbId']??_0x519646[_0x1c271d(0x1ff)]??_0x3ca632['dbId']??_0x2ce7b6[_0x1c271d(0x1ff)]),_0x129406=String(_0x2ce7b6['tableName']??_0x3ca632[_0x1c271d(0x222)]??_0x519646[_0x1c271d(0x222)]??'')[_0x1c271d(0x204)]();if(!Number['isSafeInteger'](_0x52671e)||_0x52671e<=0x0||!_0x129406)throw CliErrors[_0x1c271d(0x208)](_0x1c271d(0x20e)+_0xd05b14+_0x1c271d(0x21f));return{'datasetCode':_0xd05b14,'dblinkId':_0x52671e,'table':_0x129406};}export async function resolveCrossRelationQuery(_0x2f9d76){const _0x2fb735=a71_0x3737,_0x3b0199=_0x2f9d76[_0x2fb735(0x1e0)](_0x2fb735(0x219))[_0x2fb735(0x204)](),_0x4c3266=explicitDblink(_0x2f9d76),_0x30872=_0x3b0199?await resolveEndpoint(_0x3b0199):undefined;if(_0x30872&&_0x4c3266!==undefined&&_0x30872['dblinkId']!==_0x4c3266)throw CliErrors['validation'](_0x2fb735(0x1e2));const _0x34f8c5=_0x30872?.['dblinkId']??_0x4c3266;if(_0x34f8c5===undefined)throw CliErrors['validation']('Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.');return{'appCode':_0x2f9d76[_0x2fb735(0x1e7)],'fromDblinkId':_0x34f8c5,..._0x3b0199?{'fromDatasetCode':_0x3b0199}:{},..._0x2f9d76[_0x2fb735(0x1e0)](_0x2fb735(0x20f))[_0x2fb735(0x204)]()?{'fromField':_0x2f9d76['str'](_0x2fb735(0x20f))[_0x2fb735(0x204)]()}:{}};}export function projectCrossRelation(_0x434b1a){const _0x9300c7=a71_0x3737;return{'relationId':_0x434b1a[_0x9300c7(0x21b)],'from':{'source':'DB_TABLE','datasetCode':_0x434b1a['fromDatasetCode'],'datasetName':_0x434b1a[_0x9300c7(0x21c)],'dblinkId':_0x434b1a[_0x9300c7(0x1f7)],'table':_0x434b1a['fromTableName'],'field':_0x434b1a[_0x9300c7(0x20a)]},'to':{'source':'DB_TABLE','datasetCode':_0x434b1a[_0x9300c7(0x1f5)],'datasetName':_0x434b1a[_0x9300c7(0x21e)],'dblinkId':_0x434b1a[_0x9300c7(0x221)],'table':_0x434b1a[_0x9300c7(0x1d9)],'field':_0x434b1a[_0x9300c7(0x1de)],'labelField':_0x434b1a[_0x9300c7(0x1cd)]},'relation':{'cardinality':_0x434b1a['cardinality'],'relationType':_0x434b1a[_0x9300c7(0x1fb)]}};}function ambiguity(_0x298dd4){const _0x5471fc=a71_0x3737,_0x4dab24=CliErrors['validation'](_0x5471fc(0x210),_0x5471fc(0x213));return Object[_0x5471fc(0x220)](_0x4dab24,_0x5471fc(0x1d4),{'value':{'candidates':_0x298dd4[_0x5471fc(0x1ea)](projectCrossRelation)}}),_0x4dab24;}const sameName=(_0x4684ab,_0xe1327f)=>_0x4684ab[a71_0xf9ebde(0x1dc)]()===_0xe1327f[a71_0xf9ebde(0x1dc)]();function matchesEndpoint(_0x2acac6,_0x1e7042,_0x5ec78a,_0x52785d,_0x1acfc6){const _0xc0b950=a71_0xf9ebde;return _0x2acac6[_0xc0b950(0x1f7)]===_0x1e7042['dblinkId']&&sameName(_0x2acac6[_0xc0b950(0x1fa)],_0x1e7042[_0xc0b950(0x1f4)])&&sameName(_0x2acac6[_0xc0b950(0x20a)],_0x5ec78a)&&_0x2acac6[_0xc0b950(0x221)]===_0x52785d[_0xc0b950(0x1f6)]&&sameName(_0x2acac6[_0xc0b950(0x1d9)],_0x52785d[_0xc0b950(0x1f4)])&&sameName(_0x2acac6[_0xc0b950(0x1de)],_0x1acfc6);}export async function prepareCrossRelation(_0x19343d,_0x4da4c3){const _0x5b132b=a71_0xf9ebde,_0xc228=await resolveEndpoint(required(_0x19343d,_0x5b132b(0x219))),_0x461a5c=explicitDblink(_0x19343d);if(_0x461a5c!==undefined&&_0xc228[_0x5b132b(0x1f6)]!==_0x461a5c)throw CliErrors[_0x5b132b(0x208)](_0x5b132b(0x1e2));const _0x499527={'appCode':_0x19343d['appCode'],'fromDatasetCode':_0xc228['datasetCode'],'fromField':required(_0x19343d,'from-column'),..._0x461a5c!==undefined?{'fromDblinkId':_0x461a5c}:{}},_0x19dbb1={'appCode':_0x19343d[_0x5b132b(0x1e7)],'fromDblinkId':_0xc228[_0x5b132b(0x1f6)],'fromDatasetCode':_0xc228[_0x5b132b(0x214)],'fromField':_0x499527[_0x5b132b(0x20a)]},_0x16ffe7=await queryCrossDbRelations(_0x19dbb1);let _0x29ddb3=null;if(_0x4da4c3!==_0x5b132b(0x202)){if(_0x16ffe7[_0x5b132b(0x1c9)]>0x1)throw ambiguity(_0x16ffe7);_0x29ddb3=_0x16ffe7[0x0]??null;if(!_0x29ddb3)throw CliErrors[_0x5b132b(0x208)](_0x5b132b(0x1ed));}if(_0x4da4c3==='delete')return{'operation':_0x4da4c3,'from':_0xc228,'query':_0x19dbb1,'body':_0x499527,'before':_0x29ddb3};const _0x5a1bae=await resolveEndpoint(required(_0x19343d,'to-datasetcode'));if(_0xc228[_0x5b132b(0x1f6)]===_0x5a1bae[_0x5b132b(0x1f6)])throw CliErrors[_0x5b132b(0x208)](_0x5b132b(0x1f8));const _0x30277e=_0x19343d[_0x5b132b(0x1e0)](_0x5b132b(0x1d2))[_0x5b132b(0x204)](),_0xf9f249=_0x19343d[_0x5b132b(0x1e0)]('cardinality')[_0x5b132b(0x204)](),_0x142f0c={..._0x499527,'toDatasetCode':_0x5a1bae[_0x5b132b(0x214)],'toField':required(_0x19343d,_0x5b132b(0x1db)),..._0x30277e?{'refTableLabelName':_0x30277e}:{},..._0xf9f249?{'cardinality':_0xf9f249}:{}};if(_0x16ffe7[_0x5b132b(0x1ec)](_0x4a99ac=>_0x4a99ac[_0x5b132b(0x21b)]!==_0x29ddb3?.[_0x5b132b(0x21b)]&&matchesEndpoint(_0x4a99ac,_0xc228,_0x142f0c['fromField'],_0x5a1bae,_0x142f0c[_0x5b132b(0x1de)])))throw CliErrors[_0x5b132b(0x208)](_0x5b132b(0x1cb));return{'operation':_0x4da4c3,'from':_0xc228,'to':_0x5a1bae,'query':_0x19dbb1,'body':_0x142f0c,'before':_0x29ddb3,'expectedLabel':_0x30277e||_0x29ddb3?.[_0x5b132b(0x1cd)]||_0x142f0c[_0x5b132b(0x1de)],'expectedCardinality':_0xf9f249||_0x29ddb3?.['cardinality']||null};}function mutationData(_0x53cd7a,_0x312427,_0x113ad3){const _0x2684fb=a71_0xf9ebde,{operation:_0xaf946e,body:_0x300fc2,before:_0x162f05}=_0x53cd7a;return{'operation':_0xaf946e,'selector':{'appCode':_0x300fc2['appCode'],'from':{'datasetCode':_0x300fc2[_0x2684fb(0x1ee)],'field':_0x300fc2[_0x2684fb(0x20a)],'dblinkId':_0x53cd7a[_0x2684fb(0x1f2)][_0x2684fb(0x1f6)]}},'before':_0x162f05?projectCrossRelation(_0x162f05):null,'after':_0x113ad3,'dryRun':_0x312427,'backend':{'method':_0x2684fb(0x1d7),'path':CROSS_DB_RELATION_PATHS[_0xaf946e]},'warnings':_0xaf946e===_0x2684fb(0x211)&&!_0x300fc2[_0x2684fb(0x1cd)]?[{'code':_0x2684fb(0x1f3),'message':_0x2684fb(0x1e3)}]:[]};}export async function previewCrossRelation(_0x1074cf,_0x25571c){const _0x309456=a71_0xf9ebde,_0x19a3f8=await prepareCrossRelation(_0x1074cf,_0x25571c),_0x3bfb84=_0x19a3f8[_0x309456(0x205)],_0x26f1fe=_0x25571c===_0x309456(0x20c)?null:{..._0x19a3f8[_0x309456(0x20d)]?{'relationId':_0x19a3f8[_0x309456(0x20d)][_0x309456(0x21b)]}:{},'from':{'datasetCode':_0x19a3f8[_0x309456(0x1f2)][_0x309456(0x214)],'dblinkId':_0x19a3f8[_0x309456(0x1f2)][_0x309456(0x1f6)],'table':_0x19a3f8['from']['table'],'field':_0x3bfb84[_0x309456(0x20a)]},'to':{'datasetCode':_0x19a3f8['to'][_0x309456(0x214)],'dblinkId':_0x19a3f8['to'][_0x309456(0x1f6)],'table':_0x19a3f8['to']['table'],'field':_0x3bfb84['toField'],'labelField':_0x19a3f8[_0x309456(0x212)]},'relation':{'cardinality':_0x19a3f8['expectedCardinality'],'relationType':0x2}};return{...mutationData(_0x19a3f8,!![],null),'after':_0x26f1fe,'method':_0x309456(0x1d7),'url':CROSS_DB_RELATION_PATHS[_0x25571c],'body':_0x19a3f8[_0x309456(0x205)],'description':'Would\x20'+_0x25571c+_0x309456(0x1eb)+_0x3bfb84[_0x309456(0x1ee)]+'.'+_0x3bfb84[_0x309456(0x20a)]};}export async function executeCrossRelation(_0xee5bf8,_0x38eb59,_0x18357a){const _0x193f9c=a71_0xf9ebde,_0x4da3a2=await prepareCrossRelation(_0xee5bf8,_0x38eb59);try{await _0x18357a(_0x4da3a2[_0x193f9c(0x205)]);}catch(_0x5b1b5d){if(_0x5b1b5d instanceof CliError&&_0x5b1b5d[_0x193f9c(0x1d5)][_0x193f9c(0x1d6)](_0x193f9c(0x1e8))){const _0x5b97ac=await queryCrossDbRelations(_0x4da3a2[_0x193f9c(0x1df)])[_0x193f9c(0x21d)](()=>[]);throw ambiguity(_0x5b97ac);}throw _0x5b1b5d;}let _0x1de60d=[],_0x5345f0,_0x2391ff=![];try{_0x1de60d=await queryCrossDbRelations(_0x4da3a2[_0x193f9c(0x1df)]);if(_0x38eb59===_0x193f9c(0x20c))_0x2391ff=!_0x1de60d[_0x193f9c(0x1ec)](_0xdd207e=>_0xdd207e['relationId']===_0x4da3a2['before']['relationId']);else{const _0xdf4b1d=_0x4da3a2['body'],_0x159353=_0x1de60d[_0x193f9c(0x1ce)](_0x3c92da=>matchesEndpoint(_0x3c92da,_0x4da3a2['from'],_0xdf4b1d['fromField'],_0x4da3a2['to'],_0xdf4b1d[_0x193f9c(0x1de)])&&(_0x38eb59===_0x193f9c(0x202)||_0x3c92da[_0x193f9c(0x21b)]===_0x4da3a2['before'][_0x193f9c(0x21b)]));_0x5345f0=_0x159353[_0x193f9c(0x1c9)]===0x1?_0x159353[0x0]:undefined,_0x2391ff=!!_0x5345f0&&_0x5345f0['refTableLabelName']===_0x4da3a2[_0x193f9c(0x212)]&&_0x5345f0[_0x193f9c(0x1e5)]===_0x4da3a2['expectedCardinality']&&_0x5345f0[_0x193f9c(0x1fb)]===0x2;}}catch{}const _0x5cfcd6={...mutationData(_0x4da3a2,![],_0x5345f0?projectCrossRelation(_0x5345f0):null),'verification':{'status':_0x2391ff?'matched':_0x193f9c(0x1f0),'verified':_0x2391ff}};if(!_0x2391ff){const _0x4f37b3=CliErrors[_0x193f9c(0x1ef)]('Cross-database\x20relation\x20'+_0x38eb59+_0x193f9c(0x203),'The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.');Object[_0x193f9c(0x220)](_0x4f37b3,'data',{'value':{..._0x5cfcd6,'candidates':_0x1de60d['map'](projectCrossRelation)}});throw _0x4f37b3;}return{'ok':!![],'data':_0x5cfcd6,'message':_0x193f9c(0x216)+_0x38eb59+'\x20verified.'};}
|
|
1
|
+
const a71_0x12f2bc=a71_0x1358;function a71_0xfc4c(){const _0x2c1d41=['from-datasetcode','enum','Would\x20','Cross-database\x20relation\x20','extend','toDatasetCode','multiple\x20cross-database\x20relations\x20matched','997915ZaoNXu','some','storageProfile','dbtable','catch','trim','expectedCardinality','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','refTableLabelName','Invalid\x20--cardinality.','toDblinkId','flag','110EcZjhO','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','body','str','create','49399GOjMed','appCode','label_inherited','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','856LFxyki','dbId','before','14964bPTjgF','dataset','1180hAwjQc','3105420MPkIzI','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','length','includes','fromDblinkId','fromDatasetCode','to-column','unconfirmed','fromTableName','string','dbtableConfig','source','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','flagMissing','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','relationId','to-datasetcode','expectedLabel','data','toField','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','DB_TABLE','toLowerCase','list','POST','relationType','dblinkId','70911OTnNOt','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','toTableName','2293012CdokEg','table','sourceType','1460sjsMTi','parse','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','validation','cardinality','delete','update','map','12iufgdZ','1035472FjfcSM','toDatasetName','Dataset\x20','fromField','from-column','apiError','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','tableName','from','query','datasetCode','isSafeInteger','fromDatasetName'];a71_0xfc4c=function(){return _0x2c1d41;};return a71_0xfc4c();}(function(_0x59ee4a,_0x3e8cc0){const _0x35d7dc=a71_0x1358,_0xbcb5c3=_0x59ee4a();while(!![]){try{const _0x5a4c28=parseInt(_0x35d7dc(0x17c))/0x1+-parseInt(_0x35d7dc(0x15c))/0x2+parseInt(_0x35d7dc(0x167))/0x3*(parseInt(_0x35d7dc(0x168))/0x4)+parseInt(_0x35d7dc(0x15f))/0x5*(parseInt(_0x35d7dc(0x195))/0x6)+-parseInt(_0x35d7dc(0x18d))/0x7*(-parseInt(_0x35d7dc(0x192))/0x8)+parseInt(_0x35d7dc(0x159))/0x9*(parseInt(_0x35d7dc(0x197))/0xa)+-parseInt(_0x35d7dc(0x188))/0xb*(parseInt(_0x35d7dc(0x198))/0xc);if(_0x5a4c28===_0x3e8cc0)break;else _0xbcb5c3['push'](_0xbcb5c3['shift']());}catch(_0x1cb9fd){_0xbcb5c3['push'](_0xbcb5c3['shift']());}}}(a71_0xfc4c,0xadda4));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(_0x557f95,_0x47961f){const _0xd459fa=a71_0x1358,_0x60858e=_0x557f95[_0xd459fa(0x18b)](_0x47961f)[_0xd459fa(0x181)]();if(!_0x60858e)throw CliErrors[_0xd459fa(0x1a6)](_0x47961f);return _0x60858e;}function explicitDblink(_0x4c67dc){const _0xb7f640=a71_0x1358,_0x2cc6fe=_0x4c67dc[_0xb7f640(0x187)]('from-dblink-id');if(_0x2cc6fe===undefined||_0x2cc6fe===null)return undefined;const _0x3c90ca=Number(_0x2cc6fe);if(!Number['isSafeInteger'](_0x3c90ca)||_0x3c90ca<=0x0)throw CliErrors[_0xb7f640(0x162)](_0xb7f640(0x16e));return _0x3c90ca;}export function validateCrossRelation(_0x9f8db9,_0x576154){const _0x366931=a71_0x1358,_0x3884d1=explicitDblink(_0x9f8db9);if(_0x576154===_0x366931(0x155)){if(!_0x9f8db9[_0x366931(0x18b)]('from-datasetcode')['trim']()&&_0x3884d1===undefined)throw CliErrors[_0x366931(0x162)](_0x366931(0x1a5));return;}required(_0x9f8db9,_0x366931(0x175)),required(_0x9f8db9,_0x366931(0x16c));if(_0x576154!==_0x366931(0x164)){required(_0x9f8db9,'to-datasetcode'),required(_0x9f8db9,_0x366931(0x19e));const _0x5ace5b=_0x9f8db9[_0x366931(0x18b)](_0x366931(0x163))[_0x366931(0x181)]();if(_0x5ace5b&&!CROSS_RELATION_CARDINALITY_FLAG[_0x366931(0x176)][_0x366931(0x19b)](_0x5ace5b))throw CliErrors[_0x366931(0x162)](_0x366931(0x185));}}async function resolveEndpoint(_0x5e98c5){const _0x299b42=a71_0x1358,_0x19c29b=await getDatasetDetail(_0x5e98c5),_0x2be50c=_0x19c29b?.[_0x299b42(0x196)]??{};if((_0x19c29b?.[_0x299b42(0x1a3)]??_0x2be50c[_0x299b42(0x15e)])!==_0x299b42(0x153))throw CliErrors[_0x299b42(0x162)](_0x299b42(0x16a)+_0x5e98c5+_0x299b42(0x1a4));const _0xe4e90a=_0x19c29b[_0x299b42(0x1a2)]??_0x19c29b[_0x299b42(0x17f)]??{};let _0x14d661=_0x19c29b[_0x299b42(0x179)]??_0x2be50c[_0x299b42(0x179)]??{};if(typeof _0x14d661===_0x299b42(0x1a1))try{_0x14d661=_0x14d661[_0x299b42(0x181)]()?JSON[_0x299b42(0x160)](_0x14d661):{};}catch{throw CliErrors[_0x299b42(0x162)](_0x299b42(0x16a)+_0x5e98c5+'\x20has\x20invalid\x20storage\x20configuration.');}const _0x1d68c8=Number(_0x14d661?.[_0x299b42(0x17e)]?.[_0x299b42(0x193)]??_0x19c29b[_0x299b42(0x17e)]?.[_0x299b42(0x193)]??_0x2be50c['storageProfile']?.[_0x299b42(0x193)]??_0xe4e90a[_0x299b42(0x193)]??_0x2be50c[_0x299b42(0x193)]??_0x19c29b[_0x299b42(0x193)]),_0x3a9642=String(_0x19c29b[_0x299b42(0x16f)]??_0x2be50c[_0x299b42(0x16f)]??_0xe4e90a[_0x299b42(0x16f)]??'')[_0x299b42(0x181)]();if(!Number[_0x299b42(0x173)](_0x1d68c8)||_0x1d68c8<=0x0||!_0x3a9642)throw CliErrors['validation'](_0x299b42(0x16a)+_0x5e98c5+_0x299b42(0x191));return{'datasetCode':_0x5e98c5,'dblinkId':_0x1d68c8,'table':_0x3a9642};}export async function resolveCrossRelationQuery(_0x5470e0){const _0xb54de2=a71_0x1358,_0x38e692=_0x5470e0['str'](_0xb54de2(0x175))[_0xb54de2(0x181)](),_0x286ce4=explicitDblink(_0x5470e0),_0x43054b=_0x38e692?await resolveEndpoint(_0x38e692):undefined;if(_0x43054b&&_0x286ce4!==undefined&&_0x43054b[_0xb54de2(0x158)]!==_0x286ce4)throw CliErrors['validation'](_0xb54de2(0x152));const _0x70e3c9=_0x43054b?.['dblinkId']??_0x286ce4;if(_0x70e3c9===undefined)throw CliErrors['validation']('Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.');return{'appCode':_0x5470e0[_0xb54de2(0x18e)],'fromDblinkId':_0x70e3c9,..._0x38e692?{'fromDatasetCode':_0x38e692}:{},..._0x5470e0['str'](_0xb54de2(0x16c))['trim']()?{'fromField':_0x5470e0['str'](_0xb54de2(0x16c))[_0xb54de2(0x181)]()}:{}};}export function projectCrossRelation(_0x4be99b){const _0x335991=a71_0x1358;return{'relationId':_0x4be99b['relationId'],'from':{'source':_0x335991(0x153),'datasetCode':_0x4be99b[_0x335991(0x19d)],'datasetName':_0x4be99b[_0x335991(0x174)],'dblinkId':_0x4be99b[_0x335991(0x19c)],'table':_0x4be99b[_0x335991(0x1a0)],'field':_0x4be99b[_0x335991(0x16b)]},'to':{'source':_0x335991(0x153),'datasetCode':_0x4be99b[_0x335991(0x17a)],'datasetName':_0x4be99b[_0x335991(0x169)],'dblinkId':_0x4be99b[_0x335991(0x186)],'table':_0x4be99b[_0x335991(0x15b)],'field':_0x4be99b[_0x335991(0x151)],'labelField':_0x4be99b['refTableLabelName']},'relation':{'cardinality':_0x4be99b[_0x335991(0x163)],'relationType':_0x4be99b[_0x335991(0x157)]}};}function ambiguity(_0x29aca3){const _0x16b665=a71_0x1358,_0x3b0d72=CliErrors[_0x16b665(0x162)](_0x16b665(0x189),_0x16b665(0x15a));return Object['defineProperty'](_0x3b0d72,_0x16b665(0x150),{'value':{'candidates':_0x29aca3[_0x16b665(0x166)](projectCrossRelation)}}),_0x3b0d72;}function a71_0x1358(_0x396c64,_0x2721bf){_0x396c64=_0x396c64-0x14f;const _0xfc4cd5=a71_0xfc4c();let _0x1358a6=_0xfc4cd5[_0x396c64];return _0x1358a6;}const sameName=(_0x32ceb2,_0xe368eb)=>_0x32ceb2[a71_0x12f2bc(0x154)]()===_0xe368eb[a71_0x12f2bc(0x154)]();function matchesEndpoint(_0x91f60f,_0x25cd7e,_0x5c94f9,_0x234d97,_0x13fce4){const _0x36d30f=a71_0x12f2bc;return _0x91f60f[_0x36d30f(0x19c)]===_0x25cd7e[_0x36d30f(0x158)]&&sameName(_0x91f60f['fromTableName'],_0x25cd7e[_0x36d30f(0x15d)])&&sameName(_0x91f60f[_0x36d30f(0x16b)],_0x5c94f9)&&_0x91f60f[_0x36d30f(0x186)]===_0x234d97['dblinkId']&&sameName(_0x91f60f[_0x36d30f(0x15b)],_0x234d97[_0x36d30f(0x15d)])&&sameName(_0x91f60f[_0x36d30f(0x151)],_0x13fce4);}export async function prepareCrossRelation(_0x4ba31f,_0x389859){const _0x27180a=a71_0x12f2bc,_0x392f69=await resolveEndpoint(required(_0x4ba31f,_0x27180a(0x175))),_0x43c047=explicitDblink(_0x4ba31f);if(_0x43c047!==undefined&&_0x392f69[_0x27180a(0x158)]!==_0x43c047)throw CliErrors['validation'](_0x27180a(0x152));const _0x3ec768={'appCode':_0x4ba31f[_0x27180a(0x18e)],'fromDatasetCode':_0x392f69[_0x27180a(0x172)],'fromField':required(_0x4ba31f,_0x27180a(0x16c)),..._0x43c047!==undefined?{'fromDblinkId':_0x43c047}:{}},_0x2eeedd={'appCode':_0x4ba31f[_0x27180a(0x18e)],'fromDblinkId':_0x392f69[_0x27180a(0x158)],'fromDatasetCode':_0x392f69['datasetCode'],'fromField':_0x3ec768[_0x27180a(0x16b)]},_0x17466d=await queryCrossDbRelations(_0x2eeedd);let _0x30c681=null;if(_0x389859!==_0x27180a(0x18c)){if(_0x17466d[_0x27180a(0x19a)]>0x1)throw ambiguity(_0x17466d);_0x30c681=_0x17466d[0x0]??null;if(!_0x30c681)throw CliErrors['validation'](_0x27180a(0x183));}if(_0x389859===_0x27180a(0x164))return{'operation':_0x389859,'from':_0x392f69,'query':_0x2eeedd,'body':_0x3ec768,'before':_0x30c681};const _0x4844bc=await resolveEndpoint(required(_0x4ba31f,_0x27180a(0x1a9)));if(_0x392f69['dblinkId']===_0x4844bc['dblinkId'])throw CliErrors[_0x27180a(0x162)](_0x27180a(0x190));const _0x471403=_0x4ba31f['str']('to-label-column')['trim'](),_0x371dad=_0x4ba31f[_0x27180a(0x18b)](_0x27180a(0x163))['trim'](),_0x58f00b={..._0x3ec768,'toDatasetCode':_0x4844bc['datasetCode'],'toField':required(_0x4ba31f,_0x27180a(0x19e)),..._0x471403?{'refTableLabelName':_0x471403}:{},..._0x371dad?{'cardinality':_0x371dad}:{}};if(_0x17466d[_0x27180a(0x17d)](_0x4769de=>_0x4769de['relationId']!==_0x30c681?.['relationId']&&matchesEndpoint(_0x4769de,_0x392f69,_0x58f00b[_0x27180a(0x16b)],_0x4844bc,_0x58f00b[_0x27180a(0x151)])))throw CliErrors[_0x27180a(0x162)](_0x27180a(0x199));return{'operation':_0x389859,'from':_0x392f69,'to':_0x4844bc,'query':_0x2eeedd,'body':_0x58f00b,'before':_0x30c681,'expectedLabel':_0x471403||_0x30c681?.[_0x27180a(0x184)]||_0x58f00b[_0x27180a(0x151)],'expectedCardinality':_0x371dad||_0x30c681?.[_0x27180a(0x163)]||null};}function mutationData(_0x21a4b5,_0x6968a6,_0x1fb206){const _0x402a70=a71_0x12f2bc,{operation:_0x55e215,body:_0x97a449,before:_0x200efa}=_0x21a4b5;return{'operation':_0x55e215,'selector':{'appCode':_0x97a449[_0x402a70(0x18e)],'from':{'datasetCode':_0x97a449[_0x402a70(0x19d)],'field':_0x97a449[_0x402a70(0x16b)],'dblinkId':_0x21a4b5[_0x402a70(0x170)][_0x402a70(0x158)]}},'before':_0x200efa?projectCrossRelation(_0x200efa):null,'after':_0x1fb206,'dryRun':_0x6968a6,'backend':{'method':_0x402a70(0x156),'path':CROSS_DB_RELATION_PATHS[_0x55e215]},'warnings':_0x55e215===_0x402a70(0x165)&&!_0x97a449[_0x402a70(0x184)]?[{'code':_0x402a70(0x18f),'message':_0x402a70(0x161)}]:[]};}export async function previewCrossRelation(_0x28bff6,_0x270069){const _0x1c7e59=a71_0x12f2bc,_0x2c94c1=await prepareCrossRelation(_0x28bff6,_0x270069),_0x3a86f4=_0x2c94c1[_0x1c7e59(0x18a)],_0x295535=_0x270069===_0x1c7e59(0x164)?null:{..._0x2c94c1['before']?{'relationId':_0x2c94c1[_0x1c7e59(0x194)][_0x1c7e59(0x1a8)]}:{},'from':{'datasetCode':_0x2c94c1['from']['datasetCode'],'dblinkId':_0x2c94c1[_0x1c7e59(0x170)][_0x1c7e59(0x158)],'table':_0x2c94c1[_0x1c7e59(0x170)][_0x1c7e59(0x15d)],'field':_0x3a86f4[_0x1c7e59(0x16b)]},'to':{'datasetCode':_0x2c94c1['to']['datasetCode'],'dblinkId':_0x2c94c1['to'][_0x1c7e59(0x158)],'table':_0x2c94c1['to'][_0x1c7e59(0x15d)],'field':_0x3a86f4[_0x1c7e59(0x151)],'labelField':_0x2c94c1[_0x1c7e59(0x14f)]},'relation':{'cardinality':_0x2c94c1[_0x1c7e59(0x182)],'relationType':0x2}};return{...mutationData(_0x2c94c1,!![],null),'after':_0x295535,'method':_0x1c7e59(0x156),'url':CROSS_DB_RELATION_PATHS[_0x270069],'body':_0x2c94c1['body'],'description':_0x1c7e59(0x177)+_0x270069+'\x20a\x20cross-database\x20relation\x20for\x20'+_0x3a86f4['fromDatasetCode']+'.'+_0x3a86f4[_0x1c7e59(0x16b)]};}export async function executeCrossRelation(_0x2efa00,_0x4b424f,_0x534859){const _0x33eeb4=a71_0x12f2bc,_0x292ab8=await prepareCrossRelation(_0x2efa00,_0x4b424f);try{await _0x534859(_0x292ab8[_0x33eeb4(0x18a)]);}catch(_0xa1fbd3){if(_0xa1fbd3 instanceof CliError&&_0xa1fbd3['message']['includes'](_0x33eeb4(0x17b))){const _0x569859=await queryCrossDbRelations(_0x292ab8[_0x33eeb4(0x171)])[_0x33eeb4(0x180)](()=>[]);throw ambiguity(_0x569859);}throw _0xa1fbd3;}let _0x47abda=[],_0x57085a,_0x3e577e=![];try{_0x47abda=await queryCrossDbRelations(_0x292ab8[_0x33eeb4(0x171)]);if(_0x4b424f===_0x33eeb4(0x164))_0x3e577e=!_0x47abda['some'](_0x58b018=>_0x58b018[_0x33eeb4(0x1a8)]===_0x292ab8['before'][_0x33eeb4(0x1a8)]);else{const _0xa7ff18=_0x292ab8[_0x33eeb4(0x18a)],_0x396365=_0x47abda['filter'](_0x5c560e=>matchesEndpoint(_0x5c560e,_0x292ab8[_0x33eeb4(0x170)],_0xa7ff18[_0x33eeb4(0x16b)],_0x292ab8['to'],_0xa7ff18[_0x33eeb4(0x151)])&&(_0x4b424f===_0x33eeb4(0x18c)||_0x5c560e[_0x33eeb4(0x1a8)]===_0x292ab8[_0x33eeb4(0x194)]['relationId']));_0x57085a=_0x396365['length']===0x1?_0x396365[0x0]:undefined,_0x3e577e=!!_0x57085a&&_0x57085a[_0x33eeb4(0x184)]===_0x292ab8[_0x33eeb4(0x14f)]&&_0x57085a['cardinality']===_0x292ab8['expectedCardinality']&&_0x57085a[_0x33eeb4(0x157)]===0x2;}}catch{}const _0x5712a4={...mutationData(_0x292ab8,![],_0x57085a?projectCrossRelation(_0x57085a):null),'verification':{'status':_0x3e577e?'matched':_0x33eeb4(0x19f),'verified':_0x3e577e}};if(!_0x3e577e){const _0x56ed5c=CliErrors[_0x33eeb4(0x16d)](_0x33eeb4(0x178)+_0x4b424f+'\x20write\x20was\x20not\x20verified.',_0x33eeb4(0x1a7));Object['defineProperty'](_0x56ed5c,_0x33eeb4(0x150),{'value':{..._0x5712a4,'candidates':_0x47abda[_0x33eeb4(0x166)](projectCrossRelation)}});throw _0x56ed5c;}return{'ok':!![],'data':_0x5712a4,'message':'Cross-database\x20relation\x20'+_0x4b424f+'\x20verified.'};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a72_0xf182(_0x26f881,_0x334984){_0x26f881=_0x26f881-0x14c;const _0x481944=a72_0x4819();let _0xf18267=_0x481944[_0x26f881];return _0xf18267;}function a72_0x4819(){const _0xc10000=['1011545ifuJLw','33KSoczT','3924137XQKaEy','13856lKTLNl','Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','dataset','390bEFijQ','4969302ByOCNQ','4cJCeay','write','5877XWfQFj','update','1473wtRWUF','3726129RCLTwg','4602550zVKKkE'];a72_0x4819=function(){return _0xc10000;};return a72_0x4819();}const a72_0x3eeeef=a72_0xf182;(function(_0x5266e4,_0x54d8e2){const _0x37af34=a72_0xf182,_0x44c125=_0x5266e4();while(!![]){try{const _0x361e86=parseInt(_0x37af34(0x14d))/0x1*(parseInt(_0x37af34(0x156))/0x2)+parseInt(_0x37af34(0x14e))/0x3+-parseInt(_0x37af34(0x158))/0x4*(parseInt(_0x37af34(0x150))/0x5)+-parseInt(_0x37af34(0x157))/0x6+parseInt(_0x37af34(0x152))/0x7+parseInt(_0x37af34(0x153))/0x8*(parseInt(_0x37af34(0x15a))/0x9)+-parseInt(_0x37af34(0x14f))/0xa*(parseInt(_0x37af34(0x151))/0xb);if(_0x361e86===_0x54d8e2)break;else _0x44c125['push'](_0x44c125['shift']());}catch(_0x4f8607){_0x44c125['push'](_0x44c125['shift']());}}}(a72_0x4819,0xc5a66));import{updateCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationUpdate={'service':a72_0x3eeeef(0x155),'command':'cross-relation-update','description':a72_0x3eeeef(0x154),'risk':a72_0x3eeeef(0x159),'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 _0x219579=>validateCrossRelation(_0x219579,a72_0x3eeeef(0x14c)),'dryRun':_0x48d510=>previewCrossRelation(_0x48d510,a72_0x3eeeef(0x14c)),'execute':_0x5e4366=>executeCrossRelation(_0x5e4366,a72_0x3eeeef(0x14c),updateCrossDbRelation)};
|