@lovrabet/rabetbase-cli 2.5.3-beta.4 → 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.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.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
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
|
-
(function(
|
|
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
|
-
const
|
|
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
|
-
function
|
|
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_0x21cf6e=a64_0x17a4;(function(_0x12d80c,_0x4535d6){const _0x26d58c=a64_0x17a4,_0x311846=_0x12d80c();while(!![]){try{const _0x57b6a6=parseInt(_0x26d58c(0x124))/0x1*(-parseInt(_0x26d58c(0x151))/0x2)+-parseInt(_0x26d58c(0x13e))/0x3+parseInt(_0x26d58c(0x16b))/0x4+-parseInt(_0x26d58c(0x12d))/0x5*(-parseInt(_0x26d58c(0x17c))/0x6)+-parseInt(_0x26d58c(0x11c))/0x7+-parseInt(_0x26d58c(0x147))/0x8+parseInt(_0x26d58c(0x170))/0x9*(parseInt(_0x26d58c(0x177))/0xa);if(_0x57b6a6===_0x4535d6)break;else _0x311846['push'](_0x311846['shift']());}catch(_0x4727e9){_0x311846['push'](_0x311846['shift']());}}}(a64_0x2890,0xea1c6));import{CliErrors}from'../../errors.js';function a64_0x17a4(_0x1d22ac,_0x127c6d){_0x1d22ac=_0x1d22ac-0x11b;const _0x289045=a64_0x2890();let _0x17a49c=_0x289045[_0x1d22ac];return _0x17a49c;}const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a64_0x21cf6e(0x155),a64_0x21cf6e(0x168)]),SUPPORTED_FIELD_TYPES=new Set([a64_0x21cf6e(0x142),a64_0x21cf6e(0x13f),a64_0x21cf6e(0x15d),'BOOLEAN',a64_0x21cf6e(0x180),a64_0x21cf6e(0x138),a64_0x21cf6e(0x16a),a64_0x21cf6e(0x171),a64_0x21cf6e(0x176),a64_0x21cf6e(0x12c)]);export function isDatasetBatchDesign(_0x2f9f49){const _0x1fc146=a64_0x21cf6e;return isObject(_0x2f9f49)&&_0x2f9f49[_0x1fc146(0x17d)]==='dataset-batch';}export function validateDatasetBatchDesign(_0x8f5ca3){const _0x251edc=a64_0x21cf6e;(!isObject(_0x8f5ca3)||_0x8f5ca3[_0x251edc(0x17d)]!=='dataset-batch')&&fail('Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.');_0x8f5ca3[_0x251edc(0x127)]!==0x1&&fail('Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.');const _0x2f988d=objectArray(_0x8f5ca3[_0x251edc(0x165)],_0x251edc(0x165),0x1,0x14),_0x312f2d=objectArray(_0x8f5ca3[_0x251edc(0x122)],'relations',0x0,0xc8),_0xd66fd4=objectArray(_0x8f5ca3[_0x251edc(0x16d)],_0x251edc(0x16d),0x0,0xc8),_0x547ab0=new Set(),_0x401144=new Map();for(const [_0x201ffb,_0x3ffc23]of _0x2f988d[_0x251edc(0x173)]()){const _0x232079=requiredString(_0x3ffc23[_0x251edc(0x14f)],_0x251edc(0x183)+_0x201ffb+'].localKey');!LOCAL_KEY[_0x251edc(0x16c)](_0x232079)&&fail(_0x251edc(0x183)+_0x201ffb+_0x251edc(0x179)+LOCAL_KEY[_0x251edc(0x123)]+'.');_0x547ab0['has'](_0x232079)&&fail(_0x251edc(0x131));_0x547ab0[_0x251edc(0x11d)](_0x232079);!isObject(_0x3ffc23[_0x251edc(0x172)])&&fail('datasets['+_0x201ffb+_0x251edc(0x154));rejectServerDatasetIdentity(_0x3ffc23['design'],_0x251edc(0x183)+_0x201ffb+_0x251edc(0x12e));if(!isObject(_0x3ffc23[_0x251edc(0x172)]['dataset']))fail(_0x251edc(0x183)+_0x201ffb+'].design.dataset\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x3ffc23[_0x251edc(0x172)]['dataset'],_0x251edc(0x183)+_0x201ffb+_0x251edc(0x17a)),requiredString(_0x3ffc23['design'][_0x251edc(0x11f)][_0x251edc(0x129)],'datasets['+_0x201ffb+_0x251edc(0x160));_0x251edc(0x122)in _0x3ffc23[_0x251edc(0x172)]&&(!Array[_0x251edc(0x15a)](_0x3ffc23[_0x251edc(0x172)][_0x251edc(0x122)])||_0x3ffc23['design'][_0x251edc(0x122)][_0x251edc(0x137)]!==0x0)&&fail(_0x251edc(0x183)+_0x201ffb+'].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.');const _0x216eb9=objectArray(_0x3ffc23[_0x251edc(0x172)][_0x251edc(0x158)],_0x251edc(0x183)+_0x201ffb+_0x251edc(0x185),0x1,0xc8),_0x2ca207=new Map();for(const [_0x5808b6,_0x514e47]of _0x216eb9[_0x251edc(0x173)]()){const _0x2b6ca1=fieldName(_0x514e47);if(!_0x2b6ca1)fail('datasets['+_0x201ffb+_0x251edc(0x156)+_0x5808b6+_0x251edc(0x163));const _0x5b0b7b=_0x2b6ca1[_0x251edc(0x17b)]();if(_0x2ca207['has'](_0x5b0b7b))fail(_0x251edc(0x120)+_0x232079+_0x251edc(0x11e));const _0x45f4c2=stringValue(_0x514e47['type']??_0x514e47[_0x251edc(0x14e)])[_0x251edc(0x150)]();if(!SUPPORTED_FIELD_TYPES[_0x251edc(0x135)](_0x45f4c2))fail(_0x251edc(0x183)+_0x201ffb+_0x251edc(0x156)+_0x5808b6+'].type\x20is\x20not\x20supported.');_0x2ca207[_0x251edc(0x15f)](_0x5b0b7b,_0x45f4c2),[_0x514e47[_0x251edc(0x128)],_0x514e47[_0x251edc(0x167)],_0x514e47[_0x251edc(0x139)]]['some'](_0x18f8c9=>stringValue(_0x18f8c9))&&fail(_0x251edc(0x183)+_0x201ffb+_0x251edc(0x156)+_0x5808b6+_0x251edc(0x164));}_0x401144[_0x251edc(0x15f)](_0x232079,_0x2ca207);}const _0x17e102=new Set(),_0x242784=new Set();for(const [_0x3a0edf,_0x56db77]of _0x312f2d['entries']()){const _0xfb61c5=validateRelation(_0x56db77,_0x3a0edf,_0x547ab0,_0x401144);if(_0x17e102[_0x251edc(0x135)](_0xfb61c5))fail(_0x251edc(0x11b));_0x17e102[_0x251edc(0x11d)](_0xfb61c5);const _0x1f2127=_0xfb61c5[_0x251edc(0x144)]('\x00',0x2)[_0x251edc(0x149)]('\x00');if(_0x242784['has'](_0x1f2127))fail(_0x251edc(0x121));_0x242784[_0x251edc(0x11d)](_0x1f2127);}for(const [_0x5bb7e6,_0x21a581]of _0xd66fd4[_0x251edc(0x173)]()){requiredString(_0x21a581[_0x251edc(0x143)],_0x251edc(0x159)+_0x5bb7e6+'].reason'),validateConfidence(_0x21a581[_0x251edc(0x132)],'unresolvedRelations['+_0x5bb7e6+_0x251edc(0x186));}return _0x8f5ca3;}export function reconcileBatchResult(_0x1264cc){const _0x1d93b1=a64_0x21cf6e;if(!isObject(_0x1264cc))return null;try{const _0xba757f=stringArray(_0x1264cc[_0x1d93b1(0x152)],_0x1d93b1(0x152),0x1,0x14),_0x1ca17e=new Set(_0xba757f);if(_0x1ca17e['size']!==_0xba757f[_0x1d93b1(0x137)]||_0xba757f['some'](_0x43da2f=>!LOCAL_KEY[_0x1d93b1(0x16c)](_0x43da2f)))return null;const _0x1e2a96=objectArray(_0x1264cc[_0x1d93b1(0x148)],_0x1d93b1(0x148),0x1,0x14),_0x4a0d64=new Map(),_0x439eef=new Set();for(const _0xcd238c of _0x1e2a96){const _0xa78ab8=requiredString(_0xcd238c['localKey'],_0x1d93b1(0x133)),_0x5cc16c=requiredString(_0xcd238c[_0x1d93b1(0x15b)]??_0xcd238c[_0x1d93b1(0x141)],_0x1d93b1(0x184));if(_0x4a0d64[_0x1d93b1(0x135)](_0xa78ab8)||_0x439eef['has'](_0x5cc16c))return null;_0x4a0d64['set'](_0xa78ab8,_0x5cc16c),_0x439eef['add'](_0x5cc16c);}if(!sameSet(_0x1ca17e,new Set(_0x4a0d64['keys']())))return null;const _0x33099e=objectArray(_0x1264cc[_0x1d93b1(0x182)],_0x1d93b1(0x182),0x0,0xc8),_0x35e4d0=objectArray(_0x1264cc[_0x1d93b1(0x13c)],_0x1d93b1(0x13c),0x0,0xc8),_0x34d0d4=relationTupleSet(_0x33099e,![],_0x4a0d64),_0x417224=relationTupleSet(_0x35e4d0,!![],_0x4a0d64);if(!_0x34d0d4||!_0x417224||!sameSet(_0x34d0d4,_0x417224))return null;const _0xc1216f=objectArray(_0x1264cc['unresolvedRelations'],'unresolvedRelations',0x0,0xc8);return{'expectedLocalKeys':_0xba757f,'expectedRelations':_0x33099e,'createdDatasets':_0x1e2a96,'createdRelations':_0x35e4d0,'unresolvedRelations':_0xc1216f,...isObject(_0x1264cc[_0x1d93b1(0x134)])?{'metrics':_0x1264cc[_0x1d93b1(0x134)]}:{}};}catch{return null;}}function validateRelation(_0x3498a7,_0x19ced9,_0x5afbe1,_0x4ddf69){const _0x2a8a26=a64_0x21cf6e,_0x3cfc7b=_0x2a8a26(0x17f)+_0x19ced9+']',_0x39a70d=requiredString(_0x3498a7[_0x2a8a26(0x15c)],_0x3cfc7b+_0x2a8a26(0x14d)),_0x442635=requiredString(_0x3498a7[_0x2a8a26(0x174)],_0x3cfc7b+_0x2a8a26(0x13b)),_0x1575ca=requiredString(_0x3498a7[_0x2a8a26(0x13a)],_0x3cfc7b+'.fromField')[_0x2a8a26(0x17b)](),_0x344896=requiredString(_0x3498a7[_0x2a8a26(0x166)],_0x3cfc7b+'.toField')['toLowerCase']();if(!_0x5afbe1[_0x2a8a26(0x135)](_0x39a70d)||!_0x5afbe1[_0x2a8a26(0x135)](_0x442635))fail(_0x3cfc7b+_0x2a8a26(0x140));const _0x20a680=_0x4ddf69['get'](_0x39a70d)?.[_0x2a8a26(0x125)](_0x1575ca),_0x3b321c=_0x4ddf69[_0x2a8a26(0x125)](_0x442635)?.[_0x2a8a26(0x125)](_0x344896);if(_0x20a680===undefined||_0x3b321c===undefined)fail(_0x3cfc7b+_0x2a8a26(0x187));if(_0x20a680&&_0x3b321c&&_0x20a680!==_0x3b321c)fail(_0x3cfc7b+_0x2a8a26(0x181));const _0x2d3be9=stringValue(_0x3498a7['relationType'])||'lookup';if(_0x2d3be9!==_0x2a8a26(0x14a))fail(_0x3cfc7b+_0x2a8a26(0x14c));const _0x549d8c=stringValue(_0x3498a7['cardinality'])||_0x2a8a26(0x155);if(!SUPPORTED_CARDINALITIES[_0x2a8a26(0x135)](_0x549d8c))fail(_0x3cfc7b+'.cardinality\x20is\x20not\x20supported.');return requiredString(_0x3498a7[_0x2a8a26(0x143)],_0x3cfc7b+_0x2a8a26(0x17e)),validateConfidence(_0x3498a7[_0x2a8a26(0x132)],_0x3cfc7b+'.confidence'),tuple(_0x39a70d,_0x1575ca,_0x442635,_0x344896,_0x2a8a26(0x14a),_0x549d8c);}function relationTupleSet(_0x1c78fe,_0x5146f3,_0x4c6f1e){const _0x500e71=a64_0x21cf6e,_0x3f4695=new Set();for(const _0x4c63ae of _0x1c78fe){const _0x4293b5=stringValue(_0x4c63ae['fromDatasetKey']),_0x16b31d=stringValue(_0x4c63ae[_0x500e71(0x174)]),_0x543050=stringValue(_0x4c63ae[_0x500e71(0x13a)])[_0x500e71(0x17b)](),_0x5c5b33=stringValue(_0x4c63ae[_0x500e71(0x166)])[_0x500e71(0x17b)](),_0x5ddf46=stringValue(_0x4c63ae['relationType']),_0x9fe7a2=stringValue(_0x4c63ae['cardinality']);if(!_0x4293b5||!_0x16b31d||!_0x543050||!_0x5c5b33||_0x5ddf46!==_0x500e71(0x14a)||!SUPPORTED_CARDINALITIES[_0x500e71(0x135)](_0x9fe7a2))return null;if(!_0x4c6f1e['has'](_0x4293b5)||!_0x4c6f1e[_0x500e71(0x135)](_0x16b31d))return null;if(_0x5146f3&&(stringValue(_0x4c63ae['fromDatasetCode'])!==_0x4c6f1e[_0x500e71(0x125)](_0x4293b5)||stringValue(_0x4c63ae[_0x500e71(0x13d)])!==_0x4c6f1e[_0x500e71(0x125)](_0x16b31d)))return null;const _0x2e9798=tuple(_0x4293b5,_0x543050,_0x16b31d,_0x5c5b33,_0x5ddf46,_0x9fe7a2);if(_0x3f4695['has'](_0x2e9798))return null;_0x3f4695[_0x500e71(0x11d)](_0x2e9798);}return _0x3f4695;}function rejectServerDatasetIdentity(_0x253aa9,_0x144dcd){const _0x377c7b=a64_0x21cf6e;for(const _0x1f98a6 of['id',_0x377c7b(0x162),_0x377c7b(0x146),_0x377c7b(0x15b),_0x377c7b(0x141),_0x377c7b(0x126)]){if(_0x253aa9[_0x1f98a6]!==undefined&&_0x253aa9[_0x1f98a6]!==null&&_0x253aa9[_0x1f98a6]!=='')fail(_0x144dcd+'.'+_0x1f98a6+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function objectArray(_0x35dd05,_0x4b8bf8,_0xdcfe62,_0x26ba9a){const _0x353e92=a64_0x21cf6e;return(!Array[_0x353e92(0x15a)](_0x35dd05)||_0x35dd05[_0x353e92(0x137)]<_0xdcfe62||_0x35dd05[_0x353e92(0x137)]>_0x26ba9a||_0x35dd05[_0x353e92(0x16e)](_0x134831=>!isObject(_0x134831)))&&fail(_0x4b8bf8+_0x353e92(0x175)+_0xdcfe62+'..'+_0x26ba9a+_0x353e92(0x15e)),_0x35dd05;}function stringArray(_0x40b345,_0x43dc73,_0x5061ed,_0x1d9dc2){const _0x5d31b6=a64_0x21cf6e;return(!Array['isArray'](_0x40b345)||_0x40b345['length']<_0x5061ed||_0x40b345[_0x5d31b6(0x137)]>_0x1d9dc2||_0x40b345[_0x5d31b6(0x16e)](_0x34554f=>typeof _0x34554f!==_0x5d31b6(0x16f)||!_0x34554f[_0x5d31b6(0x169)]()))&&fail(_0x43dc73+_0x5d31b6(0x175)+_0x5061ed+'..'+_0x1d9dc2+_0x5d31b6(0x12a)),_0x40b345;}function requiredString(_0x29fe26,_0x5518f8){const _0x4ddb6f=a64_0x21cf6e,_0x5d2cf3=stringValue(_0x29fe26);if(!_0x5d2cf3)fail(_0x5518f8+_0x4ddb6f(0x157));return _0x5d2cf3;}function stringValue(_0x44534a){return typeof _0x44534a==='string'?_0x44534a['trim']():'';}function fieldName(_0x27f5){const _0x3f7581=a64_0x21cf6e;return stringValue(_0x27f5[_0x3f7581(0x15b)]??_0x27f5[_0x3f7581(0x178)]??_0x27f5['name']??_0x27f5[_0x3f7581(0x153)]);}function validateConfidence(_0xa843c1,_0x452351){const _0x21e9f3=a64_0x21cf6e;_0xa843c1!==undefined&&_0xa843c1!==null&&(typeof _0xa843c1!==_0x21e9f3(0x145)||!Number[_0x21e9f3(0x14b)](_0xa843c1)||_0xa843c1<0x0||_0xa843c1>0x1)&&fail(_0x452351+_0x21e9f3(0x136));}function tuple(..._0x3cc0dd){const _0xe2662a=a64_0x21cf6e;return _0x3cc0dd[_0xe2662a(0x12b)]((_0x2b6e20,_0x345ca1)=>_0x345ca1===0x1||_0x345ca1===0x3?_0x2b6e20[_0xe2662a(0x17b)]():_0x2b6e20)[_0xe2662a(0x149)]('\x00');}function sameSet(_0x2be565,_0x207faa){const _0x5a36bd=a64_0x21cf6e;return _0x2be565[_0x5a36bd(0x130)]===_0x207faa[_0x5a36bd(0x130)]&&[..._0x2be565][_0x5a36bd(0x161)](_0x3e4c6b=>_0x207faa[_0x5a36bd(0x135)](_0x3e4c6b));}function isObject(_0x364098){const _0xa2f8f1=a64_0x21cf6e;return typeof _0x364098===_0xa2f8f1(0x12f)&&_0x364098!==null&&!Array[_0xa2f8f1(0x15a)](_0x364098);}function a64_0x2890(){const _0x2ca1f7=['localKey','toUpperCase','2XVcJdy','expectedLocalKeys','fieldName','].design\x20must\x20be\x20an\x20object.','MANY_TO_ONE','].design.fields[','\x20is\x20required.','fields','unresolvedRelations[','isArray','code','fromDatasetKey','DATETIME','\x20objects.','set','].design.dataset.datasetName','every','datasetId',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','datasets','toField','refTableField','ONE_TO_ONE','trim','DATE_RANGE','1918700lurAbf','test','unresolvedRelations','some','string','16096437PiYXKF','USER','design','entries','toDatasetKey','\x20must\x20contain\x20','ADDRESS','10bIbhwJ','fieldCode','].localKey\x20must\x20match\x20','].design.dataset','toLowerCase','1590IFcfcA','kind','.reason','relations[','SELECT','\x20connects\x20incompatible\x20field\x20types.','expectedRelations','datasets[','createdDatasets[].code','].design.fields','].confidence','\x20references\x20an\x20unknown\x20field.','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','7434658BjMTal','add','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','dataset','Dataset\x20','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','relations','source','411143YjPZmX','get','modelCode','schemaVersion','refTable','datasetName','\x20non-empty\x20strings.','map','UPLOAD','25940diqKkh','].design','object','size','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','confidence','createdDatasets[].localKey','metrics','has','\x20must\x20be\x20between\x200\x20and\x201.','length','MULTI_SELECT','refTableLabelField','fromField','.toDatasetKey','createdRelations','toDatasetCode','520905MLSKuB','NUMBER','\x20references\x20an\x20unknown\x20dataset\x20localKey.','datasetCode','TEXT','reason','split','number','modelId','8297584NQABFD','createdDatasets','join','lookup','isFinite','.relationType\x20must\x20be\x20\x22lookup\x22.','.fromDatasetKey','fieldType'];a64_0x2890=function(){return _0x2ca1f7;};return a64_0x2890();}function fail(_0x3811f1){throw CliErrors['validation'](_0x3811f1);}
|
|
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_0x7e18bc=a65_0x1ec0;(function(_0xa2a6ac,_0x42867b){const _0x472a27=a65_0x1ec0,_0x18c680=_0xa2a6ac();while(!![]){try{const _0x532f8a=parseInt(_0x472a27(0x1e6))/0x1*(parseInt(_0x472a27(0x1c6))/0x2)+parseInt(_0x472a27(0x204))/0x3+-parseInt(_0x472a27(0x1f9))/0x4+parseInt(_0x472a27(0x1d2))/0x5+parseInt(_0x472a27(0x1cf))/0x6*(parseInt(_0x472a27(0x1fb))/0x7)+-parseInt(_0x472a27(0x1f1))/0x8+-parseInt(_0x472a27(0x1fc))/0x9*(parseInt(_0x472a27(0x1c7))/0xa);if(_0x532f8a===_0x42867b)break;else _0x18c680['push'](_0x18c680['shift']());}catch(_0x946f3d){_0x18c680['push'](_0x18c680['shift']());}}}(a65_0x4c00,0x87791));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH='/smartapi/dblink/updateTableBusinessGroup',METADATA_BACKEND_PATH=a65_0x7e18bc(0x1fa),UNGROUPED_BUSINESS_GROUP=a65_0x7e18bc(0x203);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x1d4dfd,input:_0x251061,dryRun:_0x3ec226}){const _0x2bf35a=a65_0x7e18bc;validateInput(_0x251061);const _0x145372=normalizeBusinessGroupArgument(_0x251061[_0x2bf35a(0x205)]),_0x2b5f81=await getDatasetDetail(_0x251061['code']),_0xc40b41=resolveBusinessGroupDataset(_0x2b5f81,_0x251061['code']);assertBusinessGroupUpdateSupported(_0xc40b41,_0x145372);const _0x56f32b=loadCurrentBusinessGroup(_0x2b5f81,_0xc40b41);assertExpectedBusinessGroup(_0x56f32b,_0x251061['expectBusinessGroup']);const _0x397558=buildBackendPlan(_0x1d4dfd,_0xc40b41,_0x145372),_0x339ccd=_0x56f32b!==_0x145372;let _0x36d0c3;if(_0x339ccd&&!_0x3ec226){_0x397558['kind']===_0x2bf35a(0x200)?await updateDbTableBusinessGroup(_0x397558[_0x2bf35a(0x1d3)]):await updateErBusinessGroup(_0x397558['payload']);const _0x3bece3=await getDatasetDetail(_0xc40b41[_0x2bf35a(0x207)]),_0x1a8b2e=resolveBusinessGroupDataset(_0x3bece3,_0xc40b41[_0x2bf35a(0x207)]),_0x4ec7d4=loadCurrentBusinessGroup(_0x3bece3,_0x1a8b2e);if(_0x4ec7d4!==_0x145372)throw CliErrors[_0x2bf35a(0x1ef)](_0x2bf35a(0x1be),_0x2bf35a(0x1ee)+JSON['stringify'](displayBusinessGroup(_0x145372))+_0x2bf35a(0x1d6)+JSON[_0x2bf35a(0x1fe)](displayBusinessGroup(_0x4ec7d4))+'.');_0x36d0c3={'verified':!![],'status':_0x2bf35a(0x1df),'afterReadback':{'businessGroup':displayBusinessGroup(_0x4ec7d4)}};}else!_0x339ccd&&(_0x36d0c3={'verified':!![],'status':_0x2bf35a(0x1f2),'afterReadback':{'businessGroup':displayBusinessGroup(_0x56f32b)}});const _0xdae081={'operation':_0x2bf35a(0x1f0),'appCode':_0x1d4dfd,'selector':{'code':_0xc40b41[_0x2bf35a(0x207)]},'dataset':{'id':_0xc40b41['id'],'code':_0xc40b41[_0x2bf35a(0x207)],'name':_0xc40b41['name'],'sourceType':_0xc40b41['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x56f32b)},'after':{'businessGroup':displayBusinessGroup(_0x145372)},'changed':_0x339ccd,'dryRun':_0x3ec226,'submitted':_0x339ccd&&!_0x3ec226,'backend':{'method':_0x397558[_0x2bf35a(0x1c8)],'path':_0x397558[_0x2bf35a(0x1eb)],'payload':_0x397558[_0x2bf35a(0x1d3)]},..._0x36d0c3?{'verification':_0x36d0c3}:{},'warnings':[]};return{'ok':!![],'data':_0xdae081,'message':_0x339ccd?_0x3ec226?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0xc40b41[_0x2bf35a(0x207)]:_0x2bf35a(0x1c1)+_0xc40b41[_0x2bf35a(0x207)]:_0x2bf35a(0x1fd)+_0xc40b41['code']};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a65_0x7e18bc(0x1de),'description':a65_0x7e18bc(0x1e4),'risk':a65_0x7e18bc(0x1dd),'flags':[CODE_FLAG,{'name':a65_0x7e18bc(0x1bd),'type':a65_0x7e18bc(0x1e8),'required':!![],'description':a65_0x7e18bc(0x1ea)},{'name':'expect-business-group','type':a65_0x7e18bc(0x1e8),'required':![],'description':a65_0x7e18bc(0x201)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x59c4d8){validateInput(readBusinessGroupUpdateInput(_0x59c4d8));},async 'dryRun'(_0x39d448){const _0x47ee25=a65_0x7e18bc,_0x26612f=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x39d448['appCode'],'input':readBusinessGroupUpdateInput(_0x39d448),'dryRun':!![]});return{'method':_0x26612f[_0x47ee25(0x1e9)][_0x47ee25(0x1e5)][_0x47ee25(0x1c8)],'url':_0x26612f[_0x47ee25(0x1e9)][_0x47ee25(0x1e5)]['path'],'body':_0x26612f[_0x47ee25(0x1e9)][_0x47ee25(0x1e5)][_0x47ee25(0x1d3)],'description':_0x26612f[_0x47ee25(0x1bc)],..._0x26612f[_0x47ee25(0x1e9)]};},async 'execute'(_0x3ba614){const _0x22a78b=a65_0x7e18bc;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x3ba614[_0x22a78b(0x1f6)],'input':readBusinessGroupUpdateInput(_0x3ba614),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x431f63){const _0x411876=a65_0x7e18bc,_0x393783=_0x431f63[_0x411876(0x1c0)](_0x411876(0x1ff));return{'code':trim(_0x431f63[_0x411876(0x1c0)](_0x411876(0x207))),'businessGroup':_0x431f63[_0x411876(0x1c0)](_0x411876(0x1bd)),'expectBusinessGroup':_0x393783===undefined||_0x393783===''?undefined:_0x393783};}function validateInput(_0x49767d){const _0x3b6c3c=a65_0x7e18bc;if(!trim(_0x49767d['code']))throw CliErrors[_0x3b6c3c(0x1e7)]('--code\x20is\x20required');if(_0x49767d[_0x3b6c3c(0x205)]===undefined)throw CliErrors[_0x3b6c3c(0x1e7)](_0x3b6c3c(0x1f7));if(!trim(_0x49767d[_0x3b6c3c(0x205)]))throw CliErrors[_0x3b6c3c(0x1e7)]('--business-group\x20must\x20not\x20be\x20blank');}function assertBusinessGroupUpdateSupported(_0x1fb45d,_0x2ff040){const _0x5273ad=a65_0x7e18bc;if(_0x1fb45d[_0x5273ad(0x1e1)]==='DB_TABLE'&&!_0x2ff040)throw CliErrors['validation'](_0x5273ad(0x1d0));}function resolveBusinessGroupDataset(_0x463139,_0x5e9256){const _0x57c52b=a65_0x7e18bc,_0x4da5f7=asPlainObject(_0x463139['dataset']),_0x511aa4=asPlainObject(_0x463139[_0x57c52b(0x1d8)]),_0x33bcf4=resolveSourceType(_0x463139,_0x4da5f7,_0x511aa4),_0x1c0bee=firstString(_0x463139[_0x57c52b(0x1c3)],_0x463139[_0x57c52b(0x207)],_0x4da5f7[_0x57c52b(0x1d9)],_0x5e9256)||_0x5e9256;return{'id':firstNumber(_0x463139['modelId'],_0x463139['id'],_0x4da5f7[_0x57c52b(0x1f4)])??firstString(_0x463139['modelId'],_0x463139['id'],_0x4da5f7[_0x57c52b(0x1f4)])??null,'code':_0x1c0bee,'name':firstString(_0x463139['name'],_0x4da5f7[_0x57c52b(0x1e0)],_0x4da5f7[_0x57c52b(0x202)])||null,'sourceType':_0x33bcf4,'dbTableSelector':_0x33bcf4===_0x57c52b(0x1c9)?{'dbLinkId':firstNumber(_0x511aa4[_0x57c52b(0x1e2)]),'tableName':firstString(_0x511aa4['tableName'])||null}:null};}function resolveSourceType(_0x45631d,_0x2cd925,_0x2e5d51){const _0x42c71d=a65_0x7e18bc,_0x44b27a=firstString(_0x45631d[_0x42c71d(0x1bf)],_0x45631d[_0x42c71d(0x1e1)],_0x2cd925[_0x42c71d(0x1bf)],_0x2cd925[_0x42c71d(0x1e1)])?.[_0x42c71d(0x1ce)]()[_0x42c71d(0x1cb)]();if(_0x44b27a===_0x42c71d(0x1c9)||_0x44b27a===_0x42c71d(0x1cd))return _0x44b27a;if(Object[_0x42c71d(0x1d5)](_0x2e5d51)[_0x42c71d(0x1c4)]>0x0)return _0x42c71d(0x1c9);throw CliErrors[_0x42c71d(0x1e7)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x2be4d2,_0x5f315c){const _0x2c860f=a65_0x7e18bc,_0x5c4d74=readBusinessGroupFromDatasetDetail(_0x2be4d2,_0x5f315c[_0x2c860f(0x1e1)]);if(_0x5c4d74[_0x2c860f(0x1da)])return normalizeBusinessGroup(_0x5c4d74[_0x2c860f(0x1db)]);return'';}function readBusinessGroupFromDatasetDetail(_0x58332c,_0x7518b9){const _0x4c7908=a65_0x7e18bc,_0x514038=asPlainObject(_0x58332c[_0x4c7908(0x1c2)]),_0x10a4de=firstPresent(_0x58332c[_0x4c7908(0x205)]);if(_0x10a4de['found'])return _0x10a4de;const _0x31425c=firstPresent(_0x514038[_0x4c7908(0x205)]);if(_0x31425c[_0x4c7908(0x1da)])return _0x31425c;if(_0x7518b9===_0x4c7908(0x1c9))return{'found':![]};const _0x312877=readBusinessGroupFromExtend(_0x58332c[_0x4c7908(0x1e3)]);if(_0x312877['found'])return _0x312877;return readBusinessGroupFromExtend(_0x514038['extend']);}function readBusinessGroupFromExtend(_0x119f63){const _0x1adb4f=a65_0x7e18bc;if(_0x119f63===undefined||_0x119f63===null||_0x119f63==='')return{'found':![]};if(typeof _0x119f63===_0x1adb4f(0x1e8))try{const _0x3e0ac1=JSON[_0x1adb4f(0x1f3)](_0x119f63);return readBusinessGroupFromExtend(_0x3e0ac1);}catch{return{'found':![]};}const _0x5d4279=asPlainObject(_0x119f63);if(Object[_0x1adb4f(0x206)][_0x1adb4f(0x1d1)]['call'](_0x5d4279,_0x1adb4f(0x205)))return{'found':!![],'value':_0x5d4279[_0x1adb4f(0x205)]};return{'found':![]};}function firstPresent(..._0x270fc9){for(const _0x348916 of _0x270fc9){if(_0x348916!==undefined&&_0x348916!==null)return{'found':!![],'value':_0x348916};}return{'found':![]};}function assertExpectedBusinessGroup(_0x185efc,_0x453ce3){const _0x5695c7=a65_0x7e18bc;if(_0x453ce3===undefined)return;const _0x5d6995=normalizeBusinessGroupArgument(_0x453ce3);if(_0x185efc!==_0x5d6995)throw CliErrors['validation'](_0x5695c7(0x1bb),'Expected\x20'+JSON[_0x5695c7(0x1fe)](_0x5d6995)+_0x5695c7(0x1d6)+JSON[_0x5695c7(0x1fe)](_0x185efc));}function buildBackendPlan(_0x4e0633,_0x3671a4,_0x5a16d7){const _0xa951f4=a65_0x7e18bc;if(_0x3671a4[_0xa951f4(0x1e1)]==='DB_TABLE'){if(!_0x3671a4[_0xa951f4(0x1cc)]||_0x3671a4[_0xa951f4(0x1cc)]['dbLinkId']===null||!_0x3671a4[_0xa951f4(0x1cc)][_0xa951f4(0x1d4)])throw CliErrors[_0xa951f4(0x1e7)](_0xa951f4(0x1d7),'Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.');return{'kind':_0xa951f4(0x200),'method':_0xa951f4(0x1ed),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x3671a4[_0xa951f4(0x1cc)][_0xa951f4(0x1ca)],'tableName':_0x3671a4['dbTableSelector'][_0xa951f4(0x1d4)],'businessGroup':_0x5a16d7}};}return{'kind':_0xa951f4(0x1f5),'method':_0xa951f4(0x1ed),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x4e0633,'datasetCode':_0x3671a4[_0xa951f4(0x207)],'businessGroup':_0x5a16d7}};}function a65_0x1ec0(_0x5acce0,_0x4b067a){_0x5acce0=_0x5acce0-0x1bb;const _0x4c0047=a65_0x4c00();let _0x1ec0d5=_0x4c0047[_0x5acce0];return _0x1ec0d5;}function normalizeBusinessGroup(_0x58ae5c){const _0x17a513=a65_0x7e18bc;if(_0x58ae5c===undefined||_0x58ae5c===null)return'';return String(_0x58ae5c)[_0x17a513(0x1ce)]();}function normalizeBusinessGroupArgument(_0x2bd81e){const _0x5073c3=normalizeBusinessGroup(_0x2bd81e);return _0x5073c3===UNGROUPED_BUSINESS_GROUP?'':_0x5073c3;}function displayBusinessGroup(_0x5e4600){return _0x5e4600||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x278316){const _0x1a6da9=a65_0x7e18bc;if(!_0x278316||typeof _0x278316!==_0x1a6da9(0x1ec)||Array[_0x1a6da9(0x1dc)](_0x278316))return{};return _0x278316;}function firstString(..._0xf07e90){const _0x42d090=a65_0x7e18bc;for(const _0x56d9ed of _0xf07e90){if(typeof _0x56d9ed===_0x42d090(0x1e8)&&_0x56d9ed[_0x42d090(0x1ce)]())return _0x56d9ed[_0x42d090(0x1ce)]();if(typeof _0x56d9ed===_0x42d090(0x1c5)&&Number[_0x42d090(0x1f8)](_0x56d9ed))return String(_0x56d9ed);}return undefined;}function firstNumber(..._0x222f0c){const _0x31d8a8=a65_0x7e18bc;for(const _0x5adae6 of _0x222f0c){if(typeof _0x5adae6===_0x31d8a8(0x1c5)&&Number[_0x31d8a8(0x1f8)](_0x5adae6))return _0x5adae6;if(typeof _0x5adae6===_0x31d8a8(0x1e8)&&_0x5adae6['trim']()&&Number[_0x31d8a8(0x1f8)](Number(_0x5adae6)))return Number(_0x5adae6);}return null;}function a65_0x4c00(){const _0x826b8=['businessGroup','prototype','code','Expectation\x20mismatch\x20at\x20businessGroup','message','business-group','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','source','str','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','dataset','modelCode','length','number','206462rhqrMD','10858690KpiQzK','method','DB_TABLE','dbLinkId','toUpperCase','dbTableSelector','METADATA','trim','42laVBzn','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','hasOwnProperty','4609075WXcOjI','payload','tableName','keys',',\x20actual\x20','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','dbtableConfig','datasetCode','found','value','isArray','write','business-group-update','matched','datasetName','sourceType','dbId','extend','Update\x20business\x20scenario\x20group','backend','9SJXHFM','validation','string','data','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','path','object','POST','Expected\x20','apiError','update','3120304ffACWJ','unchanged','parse','datasetId','metadata','appCode','--business-group\x20is\x20required','isFinite','3396624sOxZxq','/smartapi/question/er-config/business-group/edit','424795jiAeYt','9dIXtFV','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','stringify','expect-business-group','db-table','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','name','ungrouped','1812813zVaqUk'];a65_0x4c00=function(){return _0x826b8;};return a65_0x4c00();}function trim(_0x1e154b){const _0xb6eac=a65_0x7e18bc;return String(_0x1e154b||'')[_0xb6eac(0x1ce)]();}
|
|
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
|
-
const
|
|
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
|
-
const
|
|
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
|
-
|
|
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_0xc34f38=a71_0x1814;function a71_0x1814(_0x19cdae,_0x3b1ca6){_0x19cdae=_0x19cdae-0xb5;const _0xc04b8c=a71_0xc04b();let _0x1814be=_0xc04b8c[_0x19cdae];return _0x1814be;}(function(_0x512ec0,_0xd07e17){const _0x1273f5=a71_0x1814,_0x569c60=_0x512ec0();while(!![]){try{const _0x1360af=parseInt(_0x1273f5(0xc0))/0x1+parseInt(_0x1273f5(0xfe))/0x2+parseInt(_0x1273f5(0x109))/0x3+parseInt(_0x1273f5(0xc3))/0x4*(parseInt(_0x1273f5(0xd9))/0x5)+-parseInt(_0x1273f5(0xbe))/0x6*(-parseInt(_0x1273f5(0xb8))/0x7)+parseInt(_0x1273f5(0xfb))/0x8*(parseInt(_0x1273f5(0xe8))/0x9)+-parseInt(_0x1273f5(0x105))/0xa;if(_0x1360af===_0xd07e17)break;else _0x569c60['push'](_0x569c60['shift']());}catch(_0x3c9cfc){_0x569c60['push'](_0x569c60['shift']());}}}(a71_0xc04b,0x4723e));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(_0x4c8725,_0x1a5422){const _0x5551e2=a71_0x1814,_0x1a4e51=_0x4c8725[_0x5551e2(0xc4)](_0x1a5422)[_0x5551e2(0xc1)]();if(!_0x1a4e51)throw CliErrors['flagMissing'](_0x1a5422);return _0x1a4e51;}function explicitDblink(_0x18e357){const _0xcbc860=a71_0x1814,_0x4bb714=_0x18e357[_0xcbc860(0xb7)]('from-dblink-id');if(_0x4bb714===undefined||_0x4bb714===null)return undefined;const _0x56cb82=Number(_0x4bb714);if(!Number[_0xcbc860(0x107)](_0x56cb82)||_0x56cb82<=0x0)throw CliErrors['validation']('--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x56cb82;}export function validateCrossRelation(_0x5d58ac,_0x3acb11){const _0x2ea4b7=a71_0x1814,_0x42edc7=explicitDblink(_0x5d58ac);if(_0x3acb11==='list'){if(!_0x5d58ac[_0x2ea4b7(0xc4)](_0x2ea4b7(0xf3))[_0x2ea4b7(0xc1)]()&&_0x42edc7===undefined)throw CliErrors[_0x2ea4b7(0xc2)](_0x2ea4b7(0x10b));return;}required(_0x5d58ac,_0x2ea4b7(0xf3)),required(_0x5d58ac,_0x2ea4b7(0x10a));if(_0x3acb11!==_0x2ea4b7(0xf8)){required(_0x5d58ac,_0x2ea4b7(0xdc)),required(_0x5d58ac,'to-column');const _0x454ec2=_0x5d58ac[_0x2ea4b7(0xc4)](_0x2ea4b7(0xc7))['trim']();if(_0x454ec2&&!CROSS_RELATION_CARDINALITY_FLAG[_0x2ea4b7(0xf0)][_0x2ea4b7(0xe2)](_0x454ec2))throw CliErrors['validation'](_0x2ea4b7(0xcc));}}async function resolveEndpoint(_0x49eb3a){const _0x127f16=a71_0x1814,_0x52ab9f=await getDatasetDetail(_0x49eb3a),_0x598145=_0x52ab9f?.[_0x127f16(0xbc)]??{};if((_0x52ab9f?.[_0x127f16(0xbd)]??_0x598145[_0x127f16(0xff)])!=='DB_TABLE')throw CliErrors[_0x127f16(0xc2)](_0x127f16(0xce)+_0x49eb3a+_0x127f16(0xd1));const _0x3c35fe=_0x52ab9f[_0x127f16(0xbf)]??_0x52ab9f[_0x127f16(0xf4)]??{};let _0x24b027=_0x52ab9f[_0x127f16(0xfc)]??_0x598145[_0x127f16(0xfc)]??{};if(typeof _0x24b027==='string')try{_0x24b027=_0x24b027[_0x127f16(0xc1)]()?JSON[_0x127f16(0xba)](_0x24b027):{};}catch{throw CliErrors[_0x127f16(0xc2)](_0x127f16(0xce)+_0x49eb3a+_0x127f16(0xb6));}const _0x29e390=Number(_0x24b027?.['storageProfile']?.['dbId']??_0x52ab9f[_0x127f16(0xe0)]?.[_0x127f16(0xc6)]??_0x598145[_0x127f16(0xe0)]?.[_0x127f16(0xc6)]??_0x3c35fe[_0x127f16(0xc6)]??_0x598145['dbId']??_0x52ab9f[_0x127f16(0xc6)]),_0x798fef=String(_0x52ab9f['tableName']??_0x598145[_0x127f16(0xfa)]??_0x3c35fe[_0x127f16(0xfa)]??'')[_0x127f16(0xc1)]();if(!Number['isSafeInteger'](_0x29e390)||_0x29e390<=0x0||!_0x798fef)throw CliErrors['validation'](_0x127f16(0xce)+_0x49eb3a+_0x127f16(0xeb));return{'datasetCode':_0x49eb3a,'dblinkId':_0x29e390,'table':_0x798fef};}export async function resolveCrossRelationQuery(_0x4be0ce){const _0x27c976=a71_0x1814,_0x4249f2=_0x4be0ce[_0x27c976(0xc4)](_0x27c976(0xf3))[_0x27c976(0xc1)](),_0x29506a=explicitDblink(_0x4be0ce),_0x585c97=_0x4249f2?await resolveEndpoint(_0x4249f2):undefined;if(_0x585c97&&_0x29506a!==undefined&&_0x585c97['dblinkId']!==_0x29506a)throw CliErrors[_0x27c976(0xc2)]('--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.');const _0x4ee5d5=_0x585c97?.[_0x27c976(0x101)]??_0x29506a;if(_0x4ee5d5===undefined)throw CliErrors[_0x27c976(0xc2)](_0x27c976(0x10b));return{'appCode':_0x4be0ce[_0x27c976(0xb9)],'fromDblinkId':_0x4ee5d5,..._0x4249f2?{'fromDatasetCode':_0x4249f2}:{},..._0x4be0ce[_0x27c976(0xc4)](_0x27c976(0x10a))[_0x27c976(0xc1)]()?{'fromField':_0x4be0ce['str'](_0x27c976(0x10a))['trim']()}:{}};}export function projectCrossRelation(_0x59d7f4){const _0x59cb76=a71_0x1814;return{'relationId':_0x59d7f4['relationId'],'from':{'source':_0x59cb76(0xc5),'datasetCode':_0x59d7f4[_0x59cb76(0xef)],'datasetName':_0x59d7f4[_0x59cb76(0xf2)],'dblinkId':_0x59d7f4[_0x59cb76(0xd6)],'table':_0x59d7f4['fromTableName'],'field':_0x59d7f4[_0x59cb76(0xf7)]},'to':{'source':_0x59cb76(0xc5),'datasetCode':_0x59d7f4['toDatasetCode'],'datasetName':_0x59d7f4[_0x59cb76(0xd2)],'dblinkId':_0x59d7f4[_0x59cb76(0x106)],'table':_0x59d7f4[_0x59cb76(0x10c)],'field':_0x59d7f4[_0x59cb76(0xe5)],'labelField':_0x59d7f4['refTableLabelName']},'relation':{'cardinality':_0x59d7f4[_0x59cb76(0xc7)],'relationType':_0x59d7f4[_0x59cb76(0x108)]}};}function ambiguity(_0x5579c7){const _0x322c26=a71_0x1814,_0x2abfbd=CliErrors[_0x322c26(0xc2)](_0x322c26(0xe7),_0x322c26(0xdd));return Object[_0x322c26(0xd3)](_0x2abfbd,'data',{'value':{'candidates':_0x5579c7[_0x322c26(0x10d)](projectCrossRelation)}}),_0x2abfbd;}const sameName=(_0x27cd4d,_0x5f50b8)=>_0x27cd4d[a71_0xc34f38(0xe9)]()===_0x5f50b8['toLowerCase']();function matchesEndpoint(_0x11beb7,_0x45feee,_0x456b35,_0x17e6ff,_0x40a0d1){const _0x57e06e=a71_0xc34f38;return _0x11beb7['fromDblinkId']===_0x45feee[_0x57e06e(0x101)]&&sameName(_0x11beb7[_0x57e06e(0xcf)],_0x45feee['table'])&&sameName(_0x11beb7[_0x57e06e(0xf7)],_0x456b35)&&_0x11beb7[_0x57e06e(0x106)]===_0x17e6ff[_0x57e06e(0x101)]&&sameName(_0x11beb7[_0x57e06e(0x10c)],_0x17e6ff['table'])&&sameName(_0x11beb7['toField'],_0x40a0d1);}export async function prepareCrossRelation(_0x416fd8,_0x77e646){const _0x1031d5=a71_0xc34f38,_0x31452a=await resolveEndpoint(required(_0x416fd8,_0x1031d5(0xf3))),_0x27cfdd=explicitDblink(_0x416fd8);if(_0x27cfdd!==undefined&&_0x31452a[_0x1031d5(0x101)]!==_0x27cfdd)throw CliErrors[_0x1031d5(0xc2)](_0x1031d5(0xca));const _0x10d2d7={'appCode':_0x416fd8[_0x1031d5(0xb9)],'fromDatasetCode':_0x31452a[_0x1031d5(0xec)],'fromField':required(_0x416fd8,_0x1031d5(0x10a)),..._0x27cfdd!==undefined?{'fromDblinkId':_0x27cfdd}:{}},_0x461d74={'appCode':_0x416fd8[_0x1031d5(0xb9)],'fromDblinkId':_0x31452a[_0x1031d5(0x101)],'fromDatasetCode':_0x31452a[_0x1031d5(0xec)],'fromField':_0x10d2d7['fromField']},_0x344a72=await queryCrossDbRelations(_0x461d74);let _0x103510=null;if(_0x77e646!==_0x1031d5(0xda)){if(_0x344a72[_0x1031d5(0xd0)]>0x1)throw ambiguity(_0x344a72);_0x103510=_0x344a72[0x0]??null;if(!_0x103510)throw CliErrors[_0x1031d5(0xc2)](_0x1031d5(0xcb));}if(_0x77e646===_0x1031d5(0xf8))return{'operation':_0x77e646,'from':_0x31452a,'query':_0x461d74,'body':_0x10d2d7,'before':_0x103510};const _0x402b2a=await resolveEndpoint(required(_0x416fd8,_0x1031d5(0xdc)));if(_0x31452a[_0x1031d5(0x101)]===_0x402b2a[_0x1031d5(0x101)])throw CliErrors['validation'](_0x1031d5(0xf6));const _0x3dc914=_0x416fd8[_0x1031d5(0xc4)]('to-label-column')['trim'](),_0x16a226=_0x416fd8[_0x1031d5(0xc4)](_0x1031d5(0xc7))['trim'](),_0x42e77a={..._0x10d2d7,'toDatasetCode':_0x402b2a[_0x1031d5(0xec)],'toField':required(_0x416fd8,_0x1031d5(0xe6)),..._0x3dc914?{'refTableLabelName':_0x3dc914}:{},..._0x16a226?{'cardinality':_0x16a226}:{}};if(_0x344a72[_0x1031d5(0xd5)](_0x57bdd4=>_0x57bdd4['relationId']!==_0x103510?.['relationId']&&matchesEndpoint(_0x57bdd4,_0x31452a,_0x42e77a[_0x1031d5(0xf7)],_0x402b2a,_0x42e77a[_0x1031d5(0xe5)])))throw CliErrors['validation'](_0x1031d5(0x103));return{'operation':_0x77e646,'from':_0x31452a,'to':_0x402b2a,'query':_0x461d74,'body':_0x42e77a,'before':_0x103510,'expectedLabel':_0x3dc914||_0x103510?.['refTableLabelName']||_0x42e77a['toField'],'expectedCardinality':_0x16a226||_0x103510?.[_0x1031d5(0xc7)]||null};}function mutationData(_0x9c0da0,_0x4498d9,_0x1cf659){const _0x5c5171=a71_0xc34f38,{operation:_0x4c6932,body:_0x263cfb,before:_0x526488}=_0x9c0da0;return{'operation':_0x4c6932,'selector':{'appCode':_0x263cfb[_0x5c5171(0xb9)],'from':{'datasetCode':_0x263cfb[_0x5c5171(0xef)],'field':_0x263cfb[_0x5c5171(0xf7)],'dblinkId':_0x9c0da0['from']['dblinkId']}},'before':_0x526488?projectCrossRelation(_0x526488):null,'after':_0x1cf659,'dryRun':_0x4498d9,'backend':{'method':'POST','path':CROSS_DB_RELATION_PATHS[_0x4c6932]},'warnings':_0x4c6932==='update'&&!_0x263cfb[_0x5c5171(0xea)]?[{'code':_0x5c5171(0xee),'message':_0x5c5171(0xb5)}]:[]};}export async function previewCrossRelation(_0x1829bd,_0x517810){const _0x59460c=a71_0xc34f38,_0x236811=await prepareCrossRelation(_0x1829bd,_0x517810),_0x5637ba=_0x236811[_0x59460c(0x104)],_0x43393c=_0x517810==='delete'?null:{..._0x236811[_0x59460c(0xd4)]?{'relationId':_0x236811['before']['relationId']}:{},'from':{'datasetCode':_0x236811['from'][_0x59460c(0xec)],'dblinkId':_0x236811[_0x59460c(0xe3)][_0x59460c(0x101)],'table':_0x236811[_0x59460c(0xe3)][_0x59460c(0xf9)],'field':_0x5637ba['fromField']},'to':{'datasetCode':_0x236811['to'][_0x59460c(0xec)],'dblinkId':_0x236811['to'][_0x59460c(0x101)],'table':_0x236811['to'][_0x59460c(0xf9)],'field':_0x5637ba['toField'],'labelField':_0x236811[_0x59460c(0xfd)]},'relation':{'cardinality':_0x236811[_0x59460c(0xbb)],'relationType':0x2}};return{...mutationData(_0x236811,!![],null),'after':_0x43393c,'method':_0x59460c(0xd8),'url':CROSS_DB_RELATION_PATHS[_0x517810],'body':_0x236811['body'],'description':_0x59460c(0xf5)+_0x517810+_0x59460c(0xc9)+_0x5637ba[_0x59460c(0xef)]+'.'+_0x5637ba[_0x59460c(0xf7)]};}export async function executeCrossRelation(_0x2f8a58,_0x5d9859,_0x3415ff){const _0x2759fe=a71_0xc34f38,_0x43ae51=await prepareCrossRelation(_0x2f8a58,_0x5d9859);try{await _0x3415ff(_0x43ae51[_0x2759fe(0x104)]);}catch(_0x166fed){if(_0x166fed instanceof CliError&&_0x166fed[_0x2759fe(0xf1)]['includes'](_0x2759fe(0xd7))){const _0xcc855f=await queryCrossDbRelations(_0x43ae51[_0x2759fe(0xcd)])['catch'](()=>[]);throw ambiguity(_0xcc855f);}throw _0x166fed;}let _0x20811f=[],_0x1e41c7,_0x3de4ff=![];try{_0x20811f=await queryCrossDbRelations(_0x43ae51[_0x2759fe(0xcd)]);if(_0x5d9859===_0x2759fe(0xf8))_0x3de4ff=!_0x20811f['some'](_0x10e0ff=>_0x10e0ff[_0x2759fe(0xe4)]===_0x43ae51[_0x2759fe(0xd4)][_0x2759fe(0xe4)]);else{const _0x43270d=_0x43ae51[_0x2759fe(0x104)],_0x1c91db=_0x20811f[_0x2759fe(0xde)](_0x191dda=>matchesEndpoint(_0x191dda,_0x43ae51[_0x2759fe(0xe3)],_0x43270d[_0x2759fe(0xf7)],_0x43ae51['to'],_0x43270d[_0x2759fe(0xe5)])&&(_0x5d9859==='create'||_0x191dda[_0x2759fe(0xe4)]===_0x43ae51[_0x2759fe(0xd4)][_0x2759fe(0xe4)]));_0x1e41c7=_0x1c91db['length']===0x1?_0x1c91db[0x0]:undefined,_0x3de4ff=!!_0x1e41c7&&_0x1e41c7[_0x2759fe(0xea)]===_0x43ae51['expectedLabel']&&_0x1e41c7[_0x2759fe(0xc7)]===_0x43ae51[_0x2759fe(0xbb)]&&_0x1e41c7[_0x2759fe(0x108)]===0x2;}}catch{}const _0x5c43c6={...mutationData(_0x43ae51,![],_0x1e41c7?projectCrossRelation(_0x1e41c7):null),'verification':{'status':_0x3de4ff?_0x2759fe(0xe1):_0x2759fe(0x102),'verified':_0x3de4ff}};if(!_0x3de4ff){const _0x2c3985=CliErrors['apiError'](_0x2759fe(0xdb)+_0x5d9859+_0x2759fe(0xed),_0x2759fe(0xdf));Object[_0x2759fe(0xd3)](_0x2c3985,_0x2759fe(0x100),{'value':{..._0x5c43c6,'candidates':_0x20811f['map'](projectCrossRelation)}});throw _0x2c3985;}return{'ok':!![],'data':_0x5c43c6,'message':_0x2759fe(0xdb)+_0x5d9859+_0x2759fe(0xc8)};}function a71_0xc04b(){const _0x1818ff=['expectedCardinality','dataset','source','2931090LEldfM','dbtableConfig','451429pfDJkJ','trim','validation','8912BSGUEo','str','DB_TABLE','dbId','cardinality','\x20verified.','\x20a\x20cross-database\x20relation\x20for\x20','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','Invalid\x20--cardinality.','query','Dataset\x20','fromTableName','length','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','toDatasetName','defineProperty','before','some','fromDblinkId','multiple\x20cross-database\x20relations\x20matched','POST','290HFchAW','create','Cross-database\x20relation\x20','to-datasetcode','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','filter','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','storageProfile','matched','includes','from','relationId','toField','to-column','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','936FNsiNh','toLowerCase','refTableLabelName','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','datasetCode','\x20write\x20was\x20not\x20verified.','label_inherited','fromDatasetCode','enum','message','fromDatasetName','from-datasetcode','dbtable','Would\x20','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','fromField','delete','table','tableName','8808BCwZAc','extend','expectedLabel','940440Bfzvrm','sourceType','data','dblinkId','unconfirmed','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','body','15817450UQCwaj','toDblinkId','isSafeInteger','relationType','657729bXpAKv','from-column','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','toTableName','map','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','\x20has\x20invalid\x20storage\x20configuration.','flag','7AgULbH','appCode','parse'];a71_0xc04b=function(){return _0x1818ff;};return a71_0xc04b();}
|
|
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
|
-
function
|
|
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)};
|