@lovrabet/rabetbase-cli 2.5.4-beta.1 → 2.5.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- 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.d.ts +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.d.ts +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.d.ts +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +4 -0
- 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.d.ts +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +14 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +1 -0
- 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.d.ts +15 -3
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +2 -2
- 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.d.ts +5 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
- package/skills/rabetbase/guides/sql-mybatis.md +12 -8
- package/skills/rabetbase/references/rabetbase-config.md +6 -4
- package/skills/rabetbase/references/rabetbase-init.md +7 -5
- package/skills/rabetbase/references/rabetbase-kb.md +8 -6
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0x18a4d1=a58_0x4161;(function(_0x402557,_0x28839c){const _0x5d23f0=a58_0x4161,_0x5331c7=_0x402557();while(!![]){try{const _0x5318d9=parseInt(_0x5d23f0(0x1e4))/0x1+-parseInt(_0x5d23f0(0x1ea))/0x2+parseInt(_0x5d23f0(0x1f2))/0x3*(parseInt(_0x5d23f0(0x1f3))/0x4)+parseInt(_0x5d23f0(0x1f0))/0x5*(-parseInt(_0x5d23f0(0x1e5))/0x6)+-parseInt(_0x5d23f0(0x1f1))/0x7*(parseInt(_0x5d23f0(0x1e6))/0x8)+-parseInt(_0x5d23f0(0x1ef))/0x9+parseInt(_0x5d23f0(0x1e9))/0xa;if(_0x5318d9===_0x28839c)break;else _0x5331c7['push'](_0x5331c7['shift']());}catch(_0x21ed89){_0x5331c7['push'](_0x5331c7['shift']());}}}(a58_0x2bdc,0x4fec6));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a58_0x2bdc(){const _0x1eb2a8=['133LPoWYj','960DRqzwt','3672ADWrNH','key','object','193473SMWOYK','7836JxVcOC','16712AkbGCZ','read','app','12331790KRbbtI','1038950PczktO','appcode','validation','\x20config\x20get\x20--key\x20<key>','Get\x20a\x20config\x20value\x20by\x20key','3026646iUkgyY','1905yHNbta'];a58_0x2bdc=function(){return _0x1eb2a8;};return a58_0x2bdc();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0xbf15d){const _0x3ea551=a58_0x4161,_0x2378e1=_0xbf15d['str'](_0x3ea551(0x1e2));if(!_0x2378e1)throw CliErrors[_0x3ea551(0x1ec)]('Missing\x20key.','Usage:\x20'+CLI_BIN_NAME+_0x3ea551(0x1ed));const _0x2db405=readConfig(),_0x587308=_0x2378e1===_0x3ea551(0x1e8)?_0x3ea551(0x1eb):_0x2378e1,_0x3cc0ee=_0x2db405[_0x587308];if(_0x3cc0ee===undefined)throw CliErrors[_0x3ea551(0x1ec)]('Key\x20not\x20found:\x20'+_0x2378e1);return{'ok':!![],'data':typeof _0x3cc0ee===_0x3ea551(0x1e3)?_0x3cc0ee:{[_0x587308]:_0x3cc0ee},'message':typeof _0x3cc0ee===_0x3ea551(0x1e3)?undefined:String(_0x3cc0ee)};}function a58_0x4161(_0x48ca06,_0x2399e2){_0x48ca06=_0x48ca06-0x1e2;const _0x2bdca5=a58_0x2bdc();let _0x4161ca=_0x2bdca5[_0x48ca06];return _0x4161ca;}export const configGetDefinition={'service':'config','command':'get','description':a58_0x18a4d1(0x1ee),'risk':a58_0x18a4d1(0x1e7),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a58_0x18a4d1(0x1e2),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a59_0x5ecc(){const _0x520479=['949355wDTyGb','1836726jvFRvQ','1772OsigFr','10205550RhkaLk','1246418bLDNhO','1419rmvWpU','4296447syBbdH','8fsNJaW','2716840ZRgjVP','7QSLDsk'];a59_0x5ecc=function(){return _0x520479;};return a59_0x5ecc();}(function(_0x229c49,_0x1f5f32){const _0x86b788=a59_0x3220,_0x4c1554=_0x229c49();while(!![]){try{const _0x3b6d84=-parseInt(_0x86b788(0x115))/0x1+parseInt(_0x86b788(0x10f))/0x2+-parseInt(_0x86b788(0x10c))/0x3*(parseInt(_0x86b788(0x113))/0x4)+-parseInt(_0x86b788(0x111))/0x5+parseInt(_0x86b788(0x112))/0x6*(-parseInt(_0x86b788(0x110))/0x7)+parseInt(_0x86b788(0x10e))/0x8*(parseInt(_0x86b788(0x10d))/0x9)+parseInt(_0x86b788(0x114))/0xa;if(_0x3b6d84===_0x1f5f32)break;else _0x4c1554['push'](_0x4c1554['shift']());}catch(_0xdec80c){_0x4c1554['push'](_0x4c1554['shift']());}}}(a59_0x5ecc,0xdccd9));function a59_0x3220(_0x547d3f,_0x3d2dbf){_0x547d3f=_0x547d3f-0x10c;const _0x5ecc41=a59_0x5ecc();let _0x322045=_0x5ecc41[_0x547d3f];return _0x322045;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -7,7 +7,7 @@ export declare function executeConfigInit(ctx: RuntimeContext): Promise<{
|
|
|
7
7
|
mode: string;
|
|
8
8
|
protocol: "lovrabet-routing/v1" | undefined;
|
|
9
9
|
region: "global" | "id" | "cn" | null;
|
|
10
|
-
domains: Partial<Record<"apiDomain" | "userDomain" | "runtimeDomain" | "skillDomain" | "kbDomain" | "appDomain" | "localDomain" | "certificateDomain", string>>;
|
|
10
|
+
domains: Partial<Record<"apiDomain" | "userDomain" | "runtimeDomain" | "skillDomain" | "kbDomain" | "kbServiceDomain" | "appDomain" | "localDomain" | "certificateDomain", string>>;
|
|
11
11
|
cdn: import("../../config/domain-config.js").EnterpriseRoutingCdn | undefined;
|
|
12
12
|
};
|
|
13
13
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x1aeeb6=a60_0x1b40;(function(_0x215a42,_0x41ec39){const _0x51d6d7=a60_0x1b40,_0x4ef984=_0x215a42();while(!![]){try{const _0x305b53=parseInt(_0x51d6d7(0x1ab))/0x1+-parseInt(_0x51d6d7(0x1a7))/0x2*(parseInt(_0x51d6d7(0x18d))/0x3)+-parseInt(_0x51d6d7(0x195))/0x4*(-parseInt(_0x51d6d7(0x17c))/0x5)+-parseInt(_0x51d6d7(0x178))/0x6+parseInt(_0x51d6d7(0x18c))/0x7*(parseInt(_0x51d6d7(0x181))/0x8)+-parseInt(_0x51d6d7(0x186))/0x9*(-parseInt(_0x51d6d7(0x1a0))/0xa)+parseInt(_0x51d6d7(0x177))/0xb*(parseInt(_0x51d6d7(0x171))/0xc);if(_0x305b53===_0x41ec39)break;else _0x4ef984['push'](_0x4ef984['shift']());}catch(_0x35a184){_0x4ef984['push'](_0x4ef984['shift']());}}}(a60_0x4f48,0xda8fd));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';function a60_0x4f48(){const _0xa2954a=['runtime-domain','bool','126uFbEMy','5586LPwQCW','assign','Region\x20\x22','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','nonInteractive','validation','region','Custom\x20local\x20callback\x20HTTPS\x20origin','4wAHvHp','mode','api-domain','certificateDomain','domain-config','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','map','certificate-domain','cancelled','routing','user-domain','311860retaVZ','enterprise-v1','independent','join','label','localDomain','Official\x20Lovrabet\x20region:\x20','1082MZrbuM','Custom\x20platform\x20API\x20HTTPS\x20origin','Custom\x20Runtime\x20HTTPS\x20origin','project','1110554vNmWfW','\x22\x20is\x20not\x20currently\x20available.','Custom\x20SkillHub\x20HTTPS\x20origin','keys','init','24fdFALY','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','cdn','manifestDomains','name','Custom\x20KB\x20Service\x20HTTPS\x20origin','6476283yeDJJs','6910410nVQvVB','Custom\x20certificate\x20service\x20HTTPS\x20origin','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','str','21430aYrlSD','ExitPromptError','app-domain','Independent-deployment\x20Domain\x20JSON\x20file','kb-service-domain','186184QxIROB','string','global','kb-domain','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','99fUthkD','Available\x20regions:\x20','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','skill-domain'];a60_0x4f48=function(){return _0xa2954a;};return a60_0x4f48();}import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':'region','type':a60_0x1aeeb6(0x182),'description':a60_0x1aeeb6(0x1a6)+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a60_0x1aeeb6(0x199),'type':a60_0x1aeeb6(0x182),'description':a60_0x1aeeb6(0x17f)},{'name':a60_0x1aeeb6(0x19f),'type':a60_0x1aeeb6(0x182),'description':'Custom\x20User\x20HTTPS\x20origin'},{'name':a60_0x1aeeb6(0x197),'type':a60_0x1aeeb6(0x182),'description':a60_0x1aeeb6(0x1a8)},{'name':a60_0x1aeeb6(0x18a),'type':a60_0x1aeeb6(0x182),'description':a60_0x1aeeb6(0x1a9)},{'name':a60_0x1aeeb6(0x189),'type':a60_0x1aeeb6(0x182),'description':a60_0x1aeeb6(0x16e)},{'name':a60_0x1aeeb6(0x184),'type':a60_0x1aeeb6(0x182),'description':'Custom\x20knowledge-base\x20HTTPS\x20origin'},{'name':a60_0x1aeeb6(0x180),'type':a60_0x1aeeb6(0x182),'description':a60_0x1aeeb6(0x176)},{'name':a60_0x1aeeb6(0x17e),'type':a60_0x1aeeb6(0x182),'description':a60_0x1aeeb6(0x172)},{'name':'local-domain','type':a60_0x1aeeb6(0x182),'description':a60_0x1aeeb6(0x194)},{'name':a60_0x1aeeb6(0x19c),'type':'string','description':a60_0x1aeeb6(0x179)}];function a60_0x1b40(_0x437ac5,_0x3bfb0e){_0x437ac5=_0x437ac5-0x16e;const _0x4f485e=a60_0x4f48();let _0x1b40bd=_0x4f485e[_0x437ac5];return _0x1b40bd;}async function resolveRegion(_0x4c536d){const _0x36da5a=a60_0x1aeeb6,_0x32b856=_0x4c536d[_0x36da5a(0x17b)](_0x36da5a(0x193));if(_0x32b856){if(!isEnabledLovrabetRegion(_0x32b856))throw CliErrors[_0x36da5a(0x192)](_0x36da5a(0x18f)+_0x32b856+_0x36da5a(0x1ac),_0x36da5a(0x187)+ENABLED_LOVRABET_REGION_VALUES[_0x36da5a(0x1a3)](',\x20'));return _0x32b856;}if(_0x4c536d[_0x36da5a(0x191)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x36da5a(0x19b)](_0x47b97d=>({'name':getOfficialRoutingProfile(_0x47b97d)[_0x36da5a(0x1a4)]+'\x20('+_0x47b97d+')','value':_0x47b97d}))});}catch(_0x3a69ab){if(_0x3a69ab?.[_0x36da5a(0x175)]===_0x36da5a(0x17d))throw CliErrors[_0x36da5a(0x19d)]();throw _0x3a69ab;}}export async function executeConfigInit(_0x1cb97d){const _0x333d17=a60_0x1aeeb6,_0x41ada8=resolveDomainConfigInput(_0x1cb97d),_0x38ffc2=_0x41ada8['domains'],_0xf7a4a7=Object['keys'](_0x38ffc2)['length']>0x0;if(_0xf7a4a7&&_0x1cb97d[_0x333d17(0x17b)](_0x333d17(0x193)))throw CliErrors[_0x333d17(0x192)](_0x333d17(0x190));if(!!_0x38ffc2[_0x333d17(0x1a5)]!==!!_0x38ffc2[_0x333d17(0x198)])throw CliErrors['validation'](_0x333d17(0x188));const _0x26c90c=_0x1cb97d[_0x333d17(0x18b)](_0x333d17(0x183))?_0x333d17(0x183):_0x333d17(0x1aa),_0x10da95=readScopedConfig(_0x26c90c);for(const _0x493382 of DOMAIN_CONFIG_FIELDS)delete _0x10da95[_0x493382];for(const _0x9b977c of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x10da95[_0x9b977c];delete _0x10da95[_0x333d17(0x19e)];let _0x5093c7=null;if(_0xf7a4a7)delete _0x10da95[_0x333d17(0x193)],_0x41ada8[_0x333d17(0x196)]===_0x333d17(0x1a1)?_0x10da95[_0x333d17(0x19e)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x41ada8[_0x333d17(0x174)],'cdn':_0x41ada8[_0x333d17(0x173)]}:Object[_0x333d17(0x18e)](_0x10da95,_0x38ffc2);else{_0x5093c7=await resolveRegion(_0x1cb97d);if(_0x5093c7===DEFAULT_LOVRABET_REGION)delete _0x10da95['region'];else _0x10da95[_0x333d17(0x193)]=_0x5093c7;}return writeScopedConfig(_0x10da95,_0x26c90c),{'ok':!![],'message':_0xf7a4a7?_0x333d17(0x19a)+Object[_0x333d17(0x16f)](_0x41ada8[_0x333d17(0x196)]==='enterprise-v1'?_0x41ada8[_0x333d17(0x174)]:_0x38ffc2)['join'](',\x20')+'.':'Rabetbase\x20connection\x20configured\x20for\x20region:\x20'+_0x5093c7+'.','data':{'mode':_0xf7a4a7?_0x333d17(0x1a2):'official','protocol':_0x41ada8[_0x333d17(0x196)]===_0x333d17(0x1a1)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x5093c7,'domains':_0x38ffc2,'cdn':_0x41ada8[_0x333d17(0x196)]===_0x333d17(0x1a1)?_0x41ada8['cdn']:undefined}};}export const configInitDefinition={'service':'config','command':a60_0x1aeeb6(0x170),'description':a60_0x1aeeb6(0x185),'risk':'write','confirmationDescription':a60_0x1aeeb6(0x17a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x299ed8=a61_0x3004;function a61_0x3004(_0x301e80,_0x3d173f){_0x301e80=_0x301e80-0x136;const _0x6ae97=a61_0x6ae9();let _0x3004d8=_0x6ae97[_0x301e80];return _0x3004d8;}(function(_0x56d3c9,_0x501be6){const _0x129ab1=a61_0x3004,_0x221006=_0x56d3c9();while(!![]){try{const _0x5a6249=parseInt(_0x129ab1(0x13d))/0x1+-parseInt(_0x129ab1(0x138))/0x2*(parseInt(_0x129ab1(0x137))/0x3)+parseInt(_0x129ab1(0x13c))/0x4*(-parseInt(_0x129ab1(0x136))/0x5)+-parseInt(_0x129ab1(0x139))/0x6*(-parseInt(_0x129ab1(0x13f))/0x7)+parseInt(_0x129ab1(0x140))/0x8*(-parseInt(_0x129ab1(0x13b))/0x9)+-parseInt(_0x129ab1(0x145))/0xa*(-parseInt(_0x129ab1(0x144))/0xb)+-parseInt(_0x129ab1(0x142))/0xc;if(_0x5a6249===_0x501be6)break;else _0x221006['push'](_0x221006['shift']());}catch(_0x16fdfe){_0x221006['push'](_0x221006['shift']());}}}(a61_0x6ae9,0x4dd72));import{readScopedConfig}from'../../commands/config/shared.js';function a61_0x6ae9(){const _0x23045d=['80waDpyG','config','4275540xVutYy','read','1397aKDuUT','45740zYfOfi','global','235BNrLgO','90639sdkwPK','14IMkirM','5766heMWgT','list','318375KQWDmo','7140PttjhO','271516RHMiVc','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','3437fQzkst'];a61_0x6ae9=function(){return _0x23045d;};return a61_0x6ae9();}import{readConfig}from'../../utils/config.js';async function execute(_0x2d6d61){const _0x42338e=a61_0x3004,_0x4f8fa2=_0x2d6d61['bool'](_0x42338e(0x146))?readScopedConfig(_0x42338e(0x146)):readConfig();return{'ok':!![],'data':_0x4f8fa2};}export const configListDefinition={'service':a61_0x299ed8(0x141),'command':a61_0x299ed8(0x13a),'description':'List\x20all\x20config\x20values','risk':a61_0x299ed8(0x143),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':'boolean','description':a61_0x299ed8(0x13e),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a62_0x2fca(){const _0x280388=['100sWMIVF','Missing\x20key.','riskLevel','length','env','Global','\x22\x20is\x20not\x20settable.','str','\x20appcode\x20set\x20to:\x20','Settable\x20top-level\x20keys:\x20','Missing\x20value.','609926KvJNmg','16531893lxMlyC','locale','Usage:\x20','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','144qXLhrZ','appcode','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','5920152EdZCJH','app','apps','`,\x20`','key','bool','Config\x20value','validation','\x20set\x20to:\x20','set','includes','1405170UCgNVu','\x20workspace\x20add\x20<name>\x20--appcode\x20','string','Set\x20a\x20config\x20value','Invalid\x20value\x20for\x20\x22','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Invalid\x20locale\x20value.','boolean','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','17403JoSLun','keys','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','18595onboZc','6087935hcWrzF','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','global','Use\x20`'];a62_0x2fca=function(){return _0x280388;};return a62_0x2fca();}const a62_0x5424c5=a62_0x550b;(function(_0x406af1,_0x4d400a){const _0x5357ee=a62_0x550b,_0x9698d3=_0x406af1();while(!![]){try{const _0x3dcc6f=-parseInt(_0x5357ee(0x111))/0x1+-parseInt(_0x5357ee(0xf5))/0x2+-parseInt(_0x5357ee(0xfe))/0x3*(-parseInt(_0x5357ee(0x106))/0x4)+-parseInt(_0x5357ee(0x101))/0x5*(parseInt(_0x5357ee(0xe7))/0x6)+-parseInt(_0x5357ee(0x102))/0x7+parseInt(_0x5357ee(0xea))/0x8+parseInt(_0x5357ee(0x112))/0x9;if(_0x3dcc6f===_0x4d400a)break;else _0x9698d3['push'](_0x9698d3['shift']());}catch(_0x143478){_0x9698d3['push'](_0x9698d3['shift']());}}}(a62_0x2fca,0x6df91));import{CliErrors}from'../../errors.js';function a62_0x550b(_0x40d434,_0x12bca4){_0x40d434=_0x40d434-0xe4;const _0x2fcaa3=a62_0x2fca();let _0x550bb5=_0x2fcaa3[_0x40d434];return _0x550bb5;}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(_0x1707f8){const _0x54a6bf=a62_0x550b,_0x1cc651=_0x1707f8['str'](_0x54a6bf(0xee)),_0x520943=_0x1707f8[_0x54a6bf(0x10d)]('value');if(!_0x1cc651)throw CliErrors[_0x54a6bf(0xf1)](_0x54a6bf(0x107),_0x54a6bf(0xe5)+CLI_BIN_NAME+_0x54a6bf(0xe6));if(_0x520943===undefined||_0x520943==='')throw CliErrors[_0x54a6bf(0xf1)](_0x54a6bf(0x110),_0x54a6bf(0xe5)+CLI_BIN_NAME+_0x54a6bf(0xe6));let _0x13c312=_0x1cc651,_0x27bd14=_0x520943;if(_0x520943[_0x54a6bf(0x109)]>0x1f4)throw CliErrors['validation']('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(_0x1cc651===_0x54a6bf(0x108))throw CliErrors[_0x54a6bf(0xf1)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x1cc651))throw CliErrors[_0x54a6bf(0xf1)]('Top-level\x20key\x20\x22'+_0x1cc651+_0x54a6bf(0x10c),_0x54a6bf(0x10f)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x1cc651]&&!CONFIG_ENUM_VALUES[_0x1cc651]['includes'](_0x520943))throw CliErrors[_0x54a6bf(0xf1)](_0x54a6bf(0xf9)+_0x1cc651+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x1cc651]['join'](',\x20'));if(_0x1cc651==='locale'&&!normalizeLocale(_0x520943))throw CliErrors[_0x54a6bf(0xf1)](_0x54a6bf(0xfb),_0x54a6bf(0xfa));DOMAIN_CONFIG_FIELDS[_0x54a6bf(0xf4)](_0x1cc651)&&(_0x27bd14=normalizeDomainOrigin(_0x1cc651,_0x520943));const _0x55fb4a={'global':_0x1707f8[_0x54a6bf(0xef)](_0x54a6bf(0x104))},_0x34bdcf=resolveWriteScope(_0x55fb4a),_0x4968ce=readScopedConfig(_0x34bdcf);_0x1cc651===_0x54a6bf(0xeb)&&(_0x13c312=_0x54a6bf(0xe8),delete _0x4968ce['app']);_0x1cc651===_0x54a6bf(0xe4)&&(_0x27bd14=normalizeLocale(_0x520943));if(_0x1cc651===_0x54a6bf(0x10a)){_0x27bd14=normalizeEnv(_0x520943);if(!isProduction(_0x27bd14)&&!isDaily(_0x27bd14))throw CliErrors['validation'](_0x54a6bf(0x100),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x1cc651===_0x54a6bf(0xe8)){const _0x285bc6=_0x4968ce[_0x54a6bf(0xec)]&&typeof _0x4968ce[_0x54a6bf(0xec)]==='object'?Object[_0x54a6bf(0xff)](_0x4968ce[_0x54a6bf(0xec)]):[];if(_0x285bc6[_0x54a6bf(0x109)]>0x0)throw CliErrors[_0x54a6bf(0xf1)](_0x54a6bf(0x103),_0x54a6bf(0x105)+CLI_BIN_NAME+_0x54a6bf(0xf6)+_0x27bd14+_0x54a6bf(0xed)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x161e18=buildCanonicalProjectConfig({..._0x4968ce},{'appCodes':[_0x27bd14],'env':typeof _0x4968ce[_0x54a6bf(0x10a)]===_0x54a6bf(0xf7)?_0x4968ce[_0x54a6bf(0x10a)]:undefined});writeScopedConfig(_0x161e18,_0x34bdcf);const _0x5dce4f=_0x34bdcf==='global'?_0x54a6bf(0x10b):'Project';return{'ok':!![],'message':'✓\x20'+_0x5dce4f+_0x54a6bf(0x10e)+_0x27bd14+_0x54a6bf(0xe9)};}_0x4968ce[_0x13c312]=_0x27bd14,writeScopedConfig(_0x4968ce,_0x34bdcf);const _0x4be38c=_0x34bdcf===_0x54a6bf(0x104)?_0x54a6bf(0x10b):'Project';return{'ok':!![],'message':'✓\x20'+_0x4be38c+'\x20'+_0x13c312+_0x54a6bf(0xf2)+_0x27bd14};}export const configSetDefinition={'service':'config','command':a62_0x5424c5(0xf3),'description':a62_0x5424c5(0xf8),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x5424c5(0xee),'type':a62_0x5424c5(0xf7),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':'string','description':a62_0x5424c5(0xf0),'required':!![]},{'name':'global','type':a62_0x5424c5(0xfc),'description':a62_0x5424c5(0xfd),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a63_0x5e9d(){var _0x1b57e3=['51DpLplw','69715xwguEJ','2793967YcWDRk','78788OdIiLf','16NAuuJF','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','4159746vBHwYv','797314cCbSjQ','1607481Iruaiq','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','127243hQPJng','12rTEKAH','global','project','10EzXrTw'];a63_0x5e9d=function(){return _0x1b57e3;};return a63_0x5e9d();}(function(_0x1eb34b,_0x4a35b1){var _0xf3953=a63_0x2449,_0x3c1366=_0x1eb34b();while(!![]){try{var _0x573b61=parseInt(_0xf3953(0xe6))/0x1+parseInt(_0xf3953(0xdf))/0x2*(parseInt(_0xf3953(0xdc))/0x3)+-parseInt(_0xf3953(0xd8))/0x4*(parseInt(_0xf3953(0xdd))/0x5)+-parseInt(_0xf3953(0xe2))/0x6+-parseInt(_0xf3953(0xe3))/0x7*(-parseInt(_0xf3953(0xe0))/0x8)+-parseInt(_0xf3953(0xe4))/0x9+-parseInt(_0xf3953(0xdb))/0xa*(-parseInt(_0xf3953(0xde))/0xb);if(_0x573b61===_0x4a35b1)break;else _0x3c1366['push'](_0x3c1366['shift']());}catch(_0x420fb7){_0x3c1366['push'](_0x3c1366['shift']());}}}(a63_0x5e9d,0x591d5));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a63_0x2449(_0x202094,_0x2801a2){_0x202094=_0x202094-0xd8;var _0x5e9d90=a63_0x5e9d();var _0x244979=_0x5e9d90[_0x202094];return _0x244979;}import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x5c3519){var _0x5e6bab=a63_0x2449;if(_0x5c3519[_0x5e6bab(0xd9)])return _0x5e6bab(0xd9);if(!isInProject())throw CliErrors['validation'](_0x5e6bab(0xe1),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x5e6bab(0xe5));return _0x5e6bab(0xda);}export function readScopedConfig(_0x14817e){return readConfigFile(resolveWriteConfigPath(_0x14817e));}export function writeScopedConfig(_0x41b540,_0x5e320c){writeConfigFile(resolveWriteConfigPath(_0x5e320c),_0x41b540);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a64_0x44c74d=a64_0x486a;(function(_0x448475,_0x47b374){const _0x567440=a64_0x486a,_0x543c04=_0x448475();while(!![]){try{const _0x344fce=-parseInt(_0x567440(0x156))/0x1*(parseInt(_0x567440(0x17a))/0x2)+parseInt(_0x567440(0x142))/0x3+-parseInt(_0x567440(0x187))/0x4*(parseInt(_0x567440(0x172))/0x5)+-parseInt(_0x567440(0x160))/0x6*(-parseInt(_0x567440(0x12f))/0x7)+-parseInt(_0x567440(0x18c))/0x8+parseInt(_0x567440(0x174))/0x9+-parseInt(_0x567440(0x158))/0xa*(parseInt(_0x567440(0x157))/0xb);if(_0x344fce===_0x47b374)break;else _0x543c04['push'](_0x543c04['shift']());}catch(_0x279a68){_0x543c04['push'](_0x543c04['shift']());}}}(a64_0x5681,0xc9e3c));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a64_0x44c74d(0x130),a64_0x44c74d(0x13c)]),SUPPORTED_FIELD_TYPES=new Set([a64_0x44c74d(0x196),'NUMBER',a64_0x44c74d(0x18e),a64_0x44c74d(0x132),a64_0x44c74d(0x131),a64_0x44c74d(0x168),a64_0x44c74d(0x171),a64_0x44c74d(0x181),a64_0x44c74d(0x155),a64_0x44c74d(0x179)]);export function isDatasetBatchDesign(_0x13acd5){const _0x420d78=a64_0x44c74d;return isObject(_0x13acd5)&&_0x13acd5[_0x420d78(0x18b)]===_0x420d78(0x15c);}export function validateDatasetBatchDesign(_0x3b7a27){const _0x3ffe70=a64_0x44c74d;(!isObject(_0x3b7a27)||_0x3b7a27[_0x3ffe70(0x18b)]!==_0x3ffe70(0x15c))&&fail(_0x3ffe70(0x14f));_0x3b7a27[_0x3ffe70(0x152)]!==0x1&&fail(_0x3ffe70(0x164));const _0x46a8ff=objectArray(_0x3b7a27[_0x3ffe70(0x17b)],'datasets',0x1,0x14),_0x3229f4=objectArray(_0x3b7a27[_0x3ffe70(0x15f)],_0x3ffe70(0x15f),0x0,0xc8),_0x16eb0a=objectArray(_0x3b7a27[_0x3ffe70(0x16f)],'unresolvedRelations',0x0,0xc8),_0xa7a6c=new Set(),_0x395b67=new Map();for(const [_0x191715,_0x2b5422]of _0x46a8ff[_0x3ffe70(0x176)]()){const _0xb7775a=requiredString(_0x2b5422[_0x3ffe70(0x198)],'datasets['+_0x191715+_0x3ffe70(0x162));!LOCAL_KEY['test'](_0xb7775a)&&fail(_0x3ffe70(0x148)+_0x191715+'].localKey\x20must\x20match\x20'+LOCAL_KEY['source']+'.');_0xa7a6c['has'](_0xb7775a)&&fail(_0x3ffe70(0x149));_0xa7a6c['add'](_0xb7775a);!isObject(_0x2b5422[_0x3ffe70(0x177)])&&fail('datasets['+_0x191715+_0x3ffe70(0x146));rejectServerDatasetIdentity(_0x2b5422['design'],_0x3ffe70(0x148)+_0x191715+_0x3ffe70(0x197));if(!isObject(_0x2b5422[_0x3ffe70(0x177)]['dataset']))fail('datasets['+_0x191715+_0x3ffe70(0x165));rejectServerDatasetIdentity(_0x2b5422[_0x3ffe70(0x177)][_0x3ffe70(0x19a)],'datasets['+_0x191715+_0x3ffe70(0x147)),requiredString(_0x2b5422['design']['dataset'][_0x3ffe70(0x14b)],_0x3ffe70(0x148)+_0x191715+_0x3ffe70(0x180));'relations'in _0x2b5422[_0x3ffe70(0x177)]&&(!Array[_0x3ffe70(0x167)](_0x2b5422[_0x3ffe70(0x177)][_0x3ffe70(0x15f)])||_0x2b5422[_0x3ffe70(0x177)][_0x3ffe70(0x15f)][_0x3ffe70(0x173)]!==0x0)&&fail(_0x3ffe70(0x148)+_0x191715+'].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.');const _0x5613ac=objectArray(_0x2b5422[_0x3ffe70(0x177)][_0x3ffe70(0x17e)],_0x3ffe70(0x148)+_0x191715+_0x3ffe70(0x141),0x1,0xc8),_0x4470e7=new Map();for(const [_0x5cdcf6,_0x4a27c6]of _0x5613ac[_0x3ffe70(0x176)]()){const _0x1d5d87=fieldName(_0x4a27c6);if(!_0x1d5d87)fail(_0x3ffe70(0x148)+_0x191715+'].design.fields['+_0x5cdcf6+_0x3ffe70(0x13b));const _0x5ef9e9=_0x1d5d87[_0x3ffe70(0x17f)]();if(_0x4470e7[_0x3ffe70(0x12c)](_0x5ef9e9))fail(_0x3ffe70(0x154)+_0xb7775a+_0x3ffe70(0x12b));const _0x185c5c=stringValue(_0x4a27c6[_0x3ffe70(0x159)]??_0x4a27c6[_0x3ffe70(0x161)])[_0x3ffe70(0x182)]();if(!SUPPORTED_FIELD_TYPES[_0x3ffe70(0x12c)](_0x185c5c))fail(_0x3ffe70(0x148)+_0x191715+_0x3ffe70(0x135)+_0x5cdcf6+_0x3ffe70(0x175));_0x4470e7[_0x3ffe70(0x140)](_0x5ef9e9,_0x185c5c),[_0x4a27c6[_0x3ffe70(0x192)],_0x4a27c6[_0x3ffe70(0x166)],_0x4a27c6[_0x3ffe70(0x129)]]['some'](_0x558dfb=>stringValue(_0x558dfb))&&fail(_0x3ffe70(0x148)+_0x191715+_0x3ffe70(0x135)+_0x5cdcf6+_0x3ffe70(0x13a));}_0x395b67[_0x3ffe70(0x140)](_0xb7775a,_0x4470e7);}const _0x113468=new Set(),_0xfc0661=new Set();for(const [_0x4d2ab6,_0x100440]of _0x3229f4['entries']()){const _0xe94ea5=validateRelation(_0x100440,_0x4d2ab6,_0xa7a6c,_0x395b67);if(_0x113468[_0x3ffe70(0x12c)](_0xe94ea5))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0x113468[_0x3ffe70(0x199)](_0xe94ea5);const _0x1f826e=_0xe94ea5[_0x3ffe70(0x191)]('\x00',0x2)['join']('\x00');if(_0xfc0661[_0x3ffe70(0x12c)](_0x1f826e))fail(_0x3ffe70(0x15d));_0xfc0661[_0x3ffe70(0x199)](_0x1f826e);}for(const [_0x323cb5,_0x22c53e]of _0x16eb0a[_0x3ffe70(0x176)]()){requiredString(_0x22c53e[_0x3ffe70(0x143)],_0x3ffe70(0x190)+_0x323cb5+'].reason'),validateConfidence(_0x22c53e[_0x3ffe70(0x15b)],_0x3ffe70(0x190)+_0x323cb5+_0x3ffe70(0x17d));}return _0x3b7a27;}export function reconcileBatchResult(_0x367e09){const _0x5542c4=a64_0x44c74d;if(!isObject(_0x367e09))return null;try{const _0x4b52b3=stringArray(_0x367e09['expectedLocalKeys'],_0x5542c4(0x194),0x1,0x14),_0xf20ba0=new Set(_0x4b52b3);if(_0xf20ba0[_0x5542c4(0x145)]!==_0x4b52b3[_0x5542c4(0x173)]||_0x4b52b3[_0x5542c4(0x19b)](_0x3011de=>!LOCAL_KEY[_0x5542c4(0x136)](_0x3011de)))return null;const _0x36aab7=objectArray(_0x367e09[_0x5542c4(0x16e)],_0x5542c4(0x16e),0x1,0x14),_0x4e2981=new Map(),_0xc17437=new Set();for(const _0x1bd7b2 of _0x36aab7){const _0x189a58=requiredString(_0x1bd7b2[_0x5542c4(0x198)],_0x5542c4(0x188)),_0x1142b6=requiredString(_0x1bd7b2['code']??_0x1bd7b2[_0x5542c4(0x15e)],'createdDatasets[].code');if(_0x4e2981[_0x5542c4(0x12c)](_0x189a58)||_0xc17437[_0x5542c4(0x12c)](_0x1142b6))return null;_0x4e2981[_0x5542c4(0x140)](_0x189a58,_0x1142b6),_0xc17437['add'](_0x1142b6);}if(!sameSet(_0xf20ba0,new Set(_0x4e2981['keys']())))return null;const _0x5b49c1=objectArray(_0x367e09['expectedRelations'],'expectedRelations',0x0,0xc8),_0x594fc0=objectArray(_0x367e09[_0x5542c4(0x12d)],_0x5542c4(0x12d),0x0,0xc8),_0x1baa72=relationTupleSet(_0x5b49c1,![],_0x4e2981),_0x2db398=relationTupleSet(_0x594fc0,!![],_0x4e2981);if(!_0x1baa72||!_0x2db398||!sameSet(_0x1baa72,_0x2db398))return null;const _0xef721e=objectArray(_0x367e09[_0x5542c4(0x16f)],_0x5542c4(0x16f),0x0,0xc8);return{'expectedLocalKeys':_0x4b52b3,'expectedRelations':_0x5b49c1,'createdDatasets':_0x36aab7,'createdRelations':_0x594fc0,'unresolvedRelations':_0xef721e,...isObject(_0x367e09[_0x5542c4(0x169)])?{'metrics':_0x367e09[_0x5542c4(0x169)]}:{}};}catch{return null;}}function validateRelation(_0xcb76a,_0x347211,_0x571363,_0x28592b){const _0x49cf29=a64_0x44c74d,_0x1c4a8d=_0x49cf29(0x138)+_0x347211+']',_0x520f12=requiredString(_0xcb76a['fromDatasetKey'],_0x1c4a8d+'.fromDatasetKey'),_0x36d432=requiredString(_0xcb76a['toDatasetKey'],_0x1c4a8d+_0x49cf29(0x16b)),_0x34500b=requiredString(_0xcb76a[_0x49cf29(0x170)],_0x1c4a8d+_0x49cf29(0x14e))[_0x49cf29(0x17f)](),_0x3ba9d5=requiredString(_0xcb76a[_0x49cf29(0x18f)],_0x1c4a8d+_0x49cf29(0x16d))[_0x49cf29(0x17f)]();if(!_0x571363[_0x49cf29(0x12c)](_0x520f12)||!_0x571363['has'](_0x36d432))fail(_0x1c4a8d+_0x49cf29(0x189));const _0x46830c=_0x28592b['get'](_0x520f12)?.['get'](_0x34500b),_0x48197c=_0x28592b['get'](_0x36d432)?.[_0x49cf29(0x12e)](_0x3ba9d5);if(_0x46830c===undefined||_0x48197c===undefined)fail(_0x1c4a8d+'\x20references\x20an\x20unknown\x20field.');if(_0x46830c&&_0x48197c&&_0x46830c!==_0x48197c)fail(_0x1c4a8d+_0x49cf29(0x17c));const _0x1d6faf=stringValue(_0xcb76a[_0x49cf29(0x18d)])||_0x49cf29(0x144);if(_0x1d6faf!==_0x49cf29(0x144))fail(_0x1c4a8d+_0x49cf29(0x13f));const _0xa45447=stringValue(_0xcb76a['cardinality'])||_0x49cf29(0x130);if(!SUPPORTED_CARDINALITIES[_0x49cf29(0x12c)](_0xa45447))fail(_0x1c4a8d+_0x49cf29(0x14d));return requiredString(_0xcb76a[_0x49cf29(0x143)],_0x1c4a8d+_0x49cf29(0x178)),validateConfidence(_0xcb76a[_0x49cf29(0x15b)],_0x1c4a8d+_0x49cf29(0x18a)),tuple(_0x520f12,_0x34500b,_0x36d432,_0x3ba9d5,_0x49cf29(0x144),_0xa45447);}function a64_0x486a(_0xadc430,_0x23b3f1){_0xadc430=_0xadc430-0x128;const _0x56815f=a64_0x5681();let _0x486a7f=_0x56815f[_0xadc430];return _0x486a7f;}function relationTupleSet(_0x3eb4bd,_0x34ba46,_0xbfc375){const _0x484bc8=a64_0x44c74d,_0x98275d=new Set();for(const _0x1d8d9e of _0x3eb4bd){const _0x2f3aed=stringValue(_0x1d8d9e[_0x484bc8(0x13e)]),_0x293c09=stringValue(_0x1d8d9e[_0x484bc8(0x12a)]),_0x347220=stringValue(_0x1d8d9e[_0x484bc8(0x170)])['toLowerCase'](),_0x2f90f1=stringValue(_0x1d8d9e[_0x484bc8(0x18f)])[_0x484bc8(0x17f)](),_0x52a4a5=stringValue(_0x1d8d9e[_0x484bc8(0x18d)]),_0x19b1fd=stringValue(_0x1d8d9e[_0x484bc8(0x128)]);if(!_0x2f3aed||!_0x293c09||!_0x347220||!_0x2f90f1||_0x52a4a5!==_0x484bc8(0x144)||!SUPPORTED_CARDINALITIES[_0x484bc8(0x12c)](_0x19b1fd))return null;if(!_0xbfc375[_0x484bc8(0x12c)](_0x2f3aed)||!_0xbfc375[_0x484bc8(0x12c)](_0x293c09))return null;if(_0x34ba46&&(stringValue(_0x1d8d9e[_0x484bc8(0x139)])!==_0xbfc375['get'](_0x2f3aed)||stringValue(_0x1d8d9e[_0x484bc8(0x13d)])!==_0xbfc375['get'](_0x293c09)))return null;const _0x4d5bef=tuple(_0x2f3aed,_0x347220,_0x293c09,_0x2f90f1,_0x52a4a5,_0x19b1fd);if(_0x98275d[_0x484bc8(0x12c)](_0x4d5bef))return null;_0x98275d['add'](_0x4d5bef);}return _0x98275d;}function rejectServerDatasetIdentity(_0x44537e,_0x4b781b){const _0x103d54=a64_0x44c74d;for(const _0x41e085 of['id',_0x103d54(0x185),'modelId',_0x103d54(0x16a),'datasetCode',_0x103d54(0x15a)]){if(_0x44537e[_0x41e085]!==undefined&&_0x44537e[_0x41e085]!==null&&_0x44537e[_0x41e085]!=='')fail(_0x4b781b+'.'+_0x41e085+_0x103d54(0x133));}}function objectArray(_0x22bc31,_0x20545a,_0x2bb2a9,_0x4cc94d){const _0x2f9a45=a64_0x44c74d;return(!Array[_0x2f9a45(0x167)](_0x22bc31)||_0x22bc31['length']<_0x2bb2a9||_0x22bc31['length']>_0x4cc94d||_0x22bc31[_0x2f9a45(0x19b)](_0x4a0d4f=>!isObject(_0x4a0d4f)))&&fail(_0x20545a+_0x2f9a45(0x184)+_0x2bb2a9+'..'+_0x4cc94d+_0x2f9a45(0x137)),_0x22bc31;}function stringArray(_0x2fa695,_0x110d0a,_0x59217b,_0x5b603f){const _0x2c5e9d=a64_0x44c74d;return(!Array[_0x2c5e9d(0x167)](_0x2fa695)||_0x2fa695[_0x2c5e9d(0x173)]<_0x59217b||_0x2fa695[_0x2c5e9d(0x173)]>_0x5b603f||_0x2fa695[_0x2c5e9d(0x19b)](_0x4a7c58=>typeof _0x4a7c58!==_0x2c5e9d(0x186)||!_0x4a7c58[_0x2c5e9d(0x14a)]()))&&fail(_0x110d0a+_0x2c5e9d(0x184)+_0x59217b+'..'+_0x5b603f+_0x2c5e9d(0x163)),_0x2fa695;}function requiredString(_0x437db3,_0x40c0be){const _0x5cb56e=stringValue(_0x437db3);if(!_0x5cb56e)fail(_0x40c0be+'\x20is\x20required.');return _0x5cb56e;}function stringValue(_0x4aa235){const _0x52a88b=a64_0x44c74d;return typeof _0x4aa235===_0x52a88b(0x186)?_0x4aa235[_0x52a88b(0x14a)]():'';}function fieldName(_0x709d2b){const _0x413a30=a64_0x44c74d;return stringValue(_0x709d2b[_0x413a30(0x16a)]??_0x709d2b[_0x413a30(0x153)]??_0x709d2b['name']??_0x709d2b[_0x413a30(0x195)]);}function validateConfidence(_0x3095ad,_0x37b41a){const _0x34a20c=a64_0x44c74d;_0x3095ad!==undefined&&_0x3095ad!==null&&(typeof _0x3095ad!==_0x34a20c(0x151)||!Number[_0x34a20c(0x193)](_0x3095ad)||_0x3095ad<0x0||_0x3095ad>0x1)&&fail(_0x37b41a+'\x20must\x20be\x20between\x200\x20and\x201.');}function tuple(..._0x33b7e4){const _0x4b5047=a64_0x44c74d;return _0x33b7e4[_0x4b5047(0x14c)]((_0x5f4d8a,_0x256be5)=>_0x256be5===0x1||_0x256be5===0x3?_0x5f4d8a[_0x4b5047(0x17f)]():_0x5f4d8a)[_0x4b5047(0x16c)]('\x00');}function a64_0x5681(){const _0x184c80=[']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','ONE_TO_ONE','toDatasetCode','fromDatasetKey','.relationType\x20must\x20be\x20\x22lookup\x22.','set','].design.fields','4712178JkCYdK','reason','lookup','size','].design\x20must\x20be\x20an\x20object.','].design.dataset','datasets[','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','trim','datasetName','map','.cardinality\x20is\x20not\x20supported.','.fromField','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','object','number','schemaVersion','fieldCode','Dataset\x20','ADDRESS','35509dMSCKx','2508wosxbY','10160HMkplP','type','modelCode','confidence','dataset-batch','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','datasetCode','relations','6upEyzh','fieldType','].localKey','\x20non-empty\x20strings.','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','].design.dataset\x20must\x20be\x20an\x20object.','refTableField','isArray','MULTI_SELECT','metrics','code','.toDatasetKey','join','.toField','createdDatasets','unresolvedRelations','fromField','DATE_RANGE','100ZMxtbp','length','6738003XNnxVx','].type\x20is\x20not\x20supported.','entries','design','.reason','UPLOAD','90NaanVj','datasets','\x20connects\x20incompatible\x20field\x20types.','].confidence','fields','toLowerCase','].design.dataset.datasetName','USER','toUpperCase','every','\x20must\x20contain\x20','datasetId','string','44560OcKiyY','createdDatasets[].localKey','\x20references\x20an\x20unknown\x20dataset\x20localKey.','.confidence','kind','6407288hToMhH','relationType','DATETIME','toField','unresolvedRelations[','split','refTable','isFinite','expectedLocalKeys','fieldName','TEXT','].design','localKey','add','dataset','some','cardinality','refTableLabelField','toDatasetKey','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','has','createdRelations','get','9525677uaCKig','MANY_TO_ONE','SELECT','BOOLEAN','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','validation','].design.fields[','test','\x20objects.','relations[','fromDatasetCode',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.'];a64_0x5681=function(){return _0x184c80;};return a64_0x5681();}function sameSet(_0x454354,_0x5d93a5){const _0x6e12cd=a64_0x44c74d;return _0x454354[_0x6e12cd(0x145)]===_0x5d93a5[_0x6e12cd(0x145)]&&[..._0x454354][_0x6e12cd(0x183)](_0x44270d=>_0x5d93a5[_0x6e12cd(0x12c)](_0x44270d));}function isObject(_0x266bae){const _0x5c6786=a64_0x44c74d;return typeof _0x266bae===_0x5c6786(0x150)&&_0x266bae!==null&&!Array[_0x5c6786(0x167)](_0x266bae);}function fail(_0x561809){const _0x326a36=a64_0x44c74d;throw CliErrors[_0x326a36(0x134)](_0x561809);}
|
|
1
|
+
const a64_0x19993e=a64_0x56c6;(function(_0x4fc368,_0x2fd97c){const _0xd91250=a64_0x56c6,_0x2538e0=_0x4fc368();while(!![]){try{const _0x39f4a2=-parseInt(_0xd91250(0xc0))/0x1*(-parseInt(_0xd91250(0x9c))/0x2)+parseInt(_0xd91250(0xef))/0x3*(parseInt(_0xd91250(0xc1))/0x4)+parseInt(_0xd91250(0xa1))/0x5+parseInt(_0xd91250(0xbe))/0x6+-parseInt(_0xd91250(0xa5))/0x7*(parseInt(_0xd91250(0x97))/0x8)+parseInt(_0xd91250(0xf4))/0x9+-parseInt(_0xd91250(0xa9))/0xa;if(_0x39f4a2===_0x2fd97c)break;else _0x2538e0['push'](_0x2538e0['shift']());}catch(_0x205566){_0x2538e0['push'](_0x2538e0['shift']());}}}(a64_0xcace,0x9ab22));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a64_0x19993e(0xf3),a64_0x19993e(0xd1)]),SUPPORTED_FIELD_TYPES=new Set(['TEXT','NUMBER','DATETIME','BOOLEAN','SELECT',a64_0x19993e(0x98),a64_0x19993e(0xfb),'USER',a64_0x19993e(0x9d),'UPLOAD']);export function isDatasetBatchDesign(_0x4da6ff){return isObject(_0x4da6ff)&&_0x4da6ff['kind']==='dataset-batch';}export function validateDatasetBatchDesign(_0x49983c){const _0x374dea=a64_0x19993e;(!isObject(_0x49983c)||_0x49983c[_0x374dea(0xae)]!==_0x374dea(0xde))&&fail(_0x374dea(0xd8));_0x49983c[_0x374dea(0xb3)]!==0x1&&fail(_0x374dea(0xf8));const _0x5f1746=objectArray(_0x49983c[_0x374dea(0xf7)],_0x374dea(0xf7),0x1,0x14),_0x56a1fb=objectArray(_0x49983c[_0x374dea(0xce)],_0x374dea(0xce),0x0,0xc8),_0x164ff0=objectArray(_0x49983c[_0x374dea(0xb2)],_0x374dea(0xb2),0x0,0xc8),_0x430776=new Set(),_0x23cc62=new Map();for(const [_0x3aa568,_0x793b38]of _0x5f1746[_0x374dea(0xb9)]()){const _0xea3b4e=requiredString(_0x793b38[_0x374dea(0xdb)],_0x374dea(0xc9)+_0x3aa568+_0x374dea(0xdc));!LOCAL_KEY[_0x374dea(0xd5)](_0xea3b4e)&&fail(_0x374dea(0xc9)+_0x3aa568+'].localKey\x20must\x20match\x20'+LOCAL_KEY[_0x374dea(0xac)]+'.');_0x430776[_0x374dea(0xc8)](_0xea3b4e)&&fail(_0x374dea(0xba));_0x430776[_0x374dea(0xe6)](_0xea3b4e);!isObject(_0x793b38[_0x374dea(0xb8)])&&fail(_0x374dea(0xc9)+_0x3aa568+_0x374dea(0xb6));rejectServerDatasetIdentity(_0x793b38[_0x374dea(0xb8)],_0x374dea(0xc9)+_0x3aa568+'].design');if(!isObject(_0x793b38[_0x374dea(0xb8)][_0x374dea(0xcc)]))fail('datasets['+_0x3aa568+_0x374dea(0xaf));rejectServerDatasetIdentity(_0x793b38[_0x374dea(0xb8)][_0x374dea(0xcc)],'datasets['+_0x3aa568+_0x374dea(0xed)),requiredString(_0x793b38[_0x374dea(0xb8)][_0x374dea(0xcc)][_0x374dea(0xe0)],_0x374dea(0xc9)+_0x3aa568+'].design.dataset.datasetName');_0x374dea(0xce)in _0x793b38[_0x374dea(0xb8)]&&(!Array[_0x374dea(0xaa)](_0x793b38[_0x374dea(0xb8)][_0x374dea(0xce)])||_0x793b38[_0x374dea(0xb8)][_0x374dea(0xce)][_0x374dea(0xe4)]!==0x0)&&fail(_0x374dea(0xc9)+_0x3aa568+'].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.');const _0x143115=objectArray(_0x793b38[_0x374dea(0xb8)]['fields'],'datasets['+_0x3aa568+_0x374dea(0xc6),0x1,0xc8),_0xbaece0=new Map();for(const [_0x13fe5e,_0x5c9323]of _0x143115['entries']()){const _0x46a763=fieldName(_0x5c9323);if(!_0x46a763)fail('datasets['+_0x3aa568+_0x374dea(0xd7)+_0x13fe5e+_0x374dea(0xb0));const _0x254c98=_0x46a763['toLowerCase']();if(_0xbaece0[_0x374dea(0xc8)](_0x254c98))fail(_0x374dea(0xd4)+_0xea3b4e+_0x374dea(0xea));const _0x29de66=stringValue(_0x5c9323[_0x374dea(0xf5)]??_0x5c9323[_0x374dea(0xf1)])[_0x374dea(0xa8)]();if(!SUPPORTED_FIELD_TYPES['has'](_0x29de66))fail(_0x374dea(0xc9)+_0x3aa568+'].design.fields['+_0x13fe5e+_0x374dea(0xf0));_0xbaece0[_0x374dea(0xc2)](_0x254c98,_0x29de66),[_0x5c9323['refTable'],_0x5c9323[_0x374dea(0xe7)],_0x5c9323[_0x374dea(0x9e)]]['some'](_0x344cb0=>stringValue(_0x344cb0))&&fail(_0x374dea(0xc9)+_0x3aa568+_0x374dea(0xd7)+_0x13fe5e+_0x374dea(0xca));}_0x23cc62['set'](_0xea3b4e,_0xbaece0);}const _0x512a4c=new Set(),_0x4168d2=new Set();for(const [_0x59404f,_0x28b0cc]of _0x56a1fb[_0x374dea(0xb9)]()){const _0x35bd3f=validateRelation(_0x28b0cc,_0x59404f,_0x430776,_0x23cc62);if(_0x512a4c[_0x374dea(0xc8)](_0x35bd3f))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0x512a4c[_0x374dea(0xe6)](_0x35bd3f);const _0x3d9fa6=_0x35bd3f[_0x374dea(0xc5)]('\x00',0x2)[_0x374dea(0xe2)]('\x00');if(_0x4168d2[_0x374dea(0xc8)](_0x3d9fa6))fail(_0x374dea(0xee));_0x4168d2[_0x374dea(0xe6)](_0x3d9fa6);}for(const [_0x490598,_0x352725]of _0x164ff0[_0x374dea(0xb9)]()){requiredString(_0x352725[_0x374dea(0xa4)],_0x374dea(0x99)+_0x490598+_0x374dea(0xd6)),validateConfidence(_0x352725[_0x374dea(0xbc)],_0x374dea(0x99)+_0x490598+_0x374dea(0xad));}return _0x49983c;}export function reconcileBatchResult(_0x5aacd6){const _0x2417f2=a64_0x19993e;if(!isObject(_0x5aacd6))return null;try{const _0x414c04=stringArray(_0x5aacd6[_0x2417f2(0xa7)],_0x2417f2(0xa7),0x1,0x14),_0x2ffdc3=new Set(_0x414c04);if(_0x2ffdc3[_0x2417f2(0xab)]!==_0x414c04['length']||_0x414c04[_0x2417f2(0xbf)](_0x17aa83=>!LOCAL_KEY['test'](_0x17aa83)))return null;const _0x3add7c=objectArray(_0x5aacd6[_0x2417f2(0xfa)],_0x2417f2(0xfa),0x1,0x14),_0x5ad95d=new Map(),_0x5824b6=new Set();for(const _0x29d880 of _0x3add7c){const _0x577651=requiredString(_0x29d880[_0x2417f2(0xdb)],_0x2417f2(0xdf)),_0x201859=requiredString(_0x29d880[_0x2417f2(0xb7)]??_0x29d880['datasetCode'],_0x2417f2(0x9b));if(_0x5ad95d[_0x2417f2(0xc8)](_0x577651)||_0x5824b6[_0x2417f2(0xc8)](_0x201859))return null;_0x5ad95d[_0x2417f2(0xc2)](_0x577651,_0x201859),_0x5824b6['add'](_0x201859);}if(!sameSet(_0x2ffdc3,new Set(_0x5ad95d['keys']())))return null;const _0x11812=objectArray(_0x5aacd6['expectedRelations'],'expectedRelations',0x0,0xc8),_0xcdd516=objectArray(_0x5aacd6['createdRelations'],_0x2417f2(0xc3),0x0,0xc8),_0x52acb5=relationTupleSet(_0x11812,![],_0x5ad95d),_0x2c5bf7=relationTupleSet(_0xcdd516,!![],_0x5ad95d);if(!_0x52acb5||!_0x2c5bf7||!sameSet(_0x52acb5,_0x2c5bf7))return null;const _0x84e240=objectArray(_0x5aacd6['unresolvedRelations'],_0x2417f2(0xb2),0x0,0xc8);return{'expectedLocalKeys':_0x414c04,'expectedRelations':_0x11812,'createdDatasets':_0x3add7c,'createdRelations':_0xcdd516,'unresolvedRelations':_0x84e240,...isObject(_0x5aacd6[_0x2417f2(0xe3)])?{'metrics':_0x5aacd6[_0x2417f2(0xe3)]}:{}};}catch{return null;}}function validateRelation(_0x232d83,_0x2e311b,_0x839bb5,_0x396100){const _0x19625f=a64_0x19993e,_0x48bde3=_0x19625f(0xc7)+_0x2e311b+']',_0x4f2087=requiredString(_0x232d83[_0x19625f(0xbd)],_0x48bde3+'.fromDatasetKey'),_0x1094c0=requiredString(_0x232d83[_0x19625f(0x95)],_0x48bde3+_0x19625f(0xcd)),_0xdafca5=requiredString(_0x232d83[_0x19625f(0xb4)],_0x48bde3+_0x19625f(0xec))[_0x19625f(0xb5)](),_0x268a17=requiredString(_0x232d83[_0x19625f(0xd3)],_0x48bde3+'.toField')['toLowerCase']();if(!_0x839bb5[_0x19625f(0xc8)](_0x4f2087)||!_0x839bb5[_0x19625f(0xc8)](_0x1094c0))fail(_0x48bde3+_0x19625f(0xbb));const _0x525e8e=_0x396100[_0x19625f(0x92)](_0x4f2087)?.[_0x19625f(0x92)](_0xdafca5),_0x13ded9=_0x396100[_0x19625f(0x92)](_0x1094c0)?.['get'](_0x268a17);if(_0x525e8e===undefined||_0x13ded9===undefined)fail(_0x48bde3+_0x19625f(0xa6));if(_0x525e8e&&_0x13ded9&&_0x525e8e!==_0x13ded9)fail(_0x48bde3+_0x19625f(0xe1));const _0x24deb0=stringValue(_0x232d83[_0x19625f(0xcf)])||_0x19625f(0x93);if(_0x24deb0!=='lookup')fail(_0x48bde3+'.relationType\x20must\x20be\x20\x22lookup\x22.');const _0xcad885=stringValue(_0x232d83['cardinality'])||_0x19625f(0xf3);if(!SUPPORTED_CARDINALITIES[_0x19625f(0xc8)](_0xcad885))fail(_0x48bde3+_0x19625f(0xd9));return requiredString(_0x232d83[_0x19625f(0xa4)],_0x48bde3+_0x19625f(0x9a)),validateConfidence(_0x232d83[_0x19625f(0xbc)],_0x48bde3+_0x19625f(0xda)),tuple(_0x4f2087,_0xdafca5,_0x1094c0,_0x268a17,_0x19625f(0x93),_0xcad885);}function relationTupleSet(_0x512713,_0x36b535,_0x3cc475){const _0x1721b9=a64_0x19993e,_0x452dea=new Set();for(const _0x2f70d0 of _0x512713){const _0x31d05f=stringValue(_0x2f70d0[_0x1721b9(0xbd)]),_0x23b092=stringValue(_0x2f70d0[_0x1721b9(0x95)]),_0x3fb406=stringValue(_0x2f70d0['fromField'])[_0x1721b9(0xb5)](),_0x257ff6=stringValue(_0x2f70d0['toField'])[_0x1721b9(0xb5)](),_0x49947f=stringValue(_0x2f70d0[_0x1721b9(0xcf)]),_0x1617f7=stringValue(_0x2f70d0[_0x1721b9(0xb1)]);if(!_0x31d05f||!_0x23b092||!_0x3fb406||!_0x257ff6||_0x49947f!==_0x1721b9(0x93)||!SUPPORTED_CARDINALITIES[_0x1721b9(0xc8)](_0x1617f7))return null;if(!_0x3cc475[_0x1721b9(0xc8)](_0x31d05f)||!_0x3cc475[_0x1721b9(0xc8)](_0x23b092))return null;if(_0x36b535&&(stringValue(_0x2f70d0[_0x1721b9(0xdd)])!==_0x3cc475[_0x1721b9(0x92)](_0x31d05f)||stringValue(_0x2f70d0[_0x1721b9(0xa0)])!==_0x3cc475[_0x1721b9(0x92)](_0x23b092)))return null;const _0x3377d0=tuple(_0x31d05f,_0x3fb406,_0x23b092,_0x257ff6,_0x49947f,_0x1617f7);if(_0x452dea[_0x1721b9(0xc8)](_0x3377d0))return null;_0x452dea[_0x1721b9(0xe6)](_0x3377d0);}return _0x452dea;}function a64_0x56c6(_0x137222,_0x431834){_0x137222=_0x137222-0x92;const _0xcace0a=a64_0xcace();let _0x56c68f=_0xcace0a[_0x137222];return _0x56c68f;}function rejectServerDatasetIdentity(_0xbe00c8,_0x474d64){const _0x9ca1d=a64_0x19993e;for(const _0x484102 of['id','datasetId',_0x9ca1d(0xd2),_0x9ca1d(0xb7),_0x9ca1d(0xa2),_0x9ca1d(0x9f)]){if(_0xbe00c8[_0x484102]!==undefined&&_0xbe00c8[_0x484102]!==null&&_0xbe00c8[_0x484102]!=='')fail(_0x474d64+'.'+_0x484102+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function objectArray(_0x33666c,_0x504848,_0xa2e493,_0x353170){const _0x4366ac=a64_0x19993e;return(!Array[_0x4366ac(0xaa)](_0x33666c)||_0x33666c[_0x4366ac(0xe4)]<_0xa2e493||_0x33666c['length']>_0x353170||_0x33666c[_0x4366ac(0xbf)](_0x4a19c4=>!isObject(_0x4a19c4)))&&fail(_0x504848+_0x4366ac(0xe5)+_0xa2e493+'..'+_0x353170+_0x4366ac(0xe9)),_0x33666c;}function stringArray(_0x2cbe6f,_0x4ed12d,_0x9eb6d2,_0x37769f){const _0x4351f7=a64_0x19993e;return(!Array[_0x4351f7(0xaa)](_0x2cbe6f)||_0x2cbe6f['length']<_0x9eb6d2||_0x2cbe6f[_0x4351f7(0xe4)]>_0x37769f||_0x2cbe6f[_0x4351f7(0xbf)](_0x4b2aac=>typeof _0x4b2aac!==_0x4351f7(0xeb)||!_0x4b2aac[_0x4351f7(0x96)]()))&&fail(_0x4ed12d+'\x20must\x20contain\x20'+_0x9eb6d2+'..'+_0x37769f+'\x20non-empty\x20strings.'),_0x2cbe6f;}function requiredString(_0x4bd463,_0x11c98a){const _0x11d500=a64_0x19993e,_0x47317b=stringValue(_0x4bd463);if(!_0x47317b)fail(_0x11c98a+_0x11d500(0xf9));return _0x47317b;}function stringValue(_0x1c30ed){const _0x1bbc68=a64_0x19993e;return typeof _0x1c30ed==='string'?_0x1c30ed[_0x1bbc68(0x96)]():'';}function fieldName(_0x2c3a1b){const _0x420f7e=a64_0x19993e;return stringValue(_0x2c3a1b[_0x420f7e(0xb7)]??_0x2c3a1b[_0x420f7e(0xc4)]??_0x2c3a1b[_0x420f7e(0xe8)]??_0x2c3a1b['fieldName']);}function validateConfidence(_0x583e4a,_0x1e407c){const _0x382684=a64_0x19993e;_0x583e4a!==undefined&&_0x583e4a!==null&&(typeof _0x583e4a!==_0x382684(0xcb)||!Number[_0x382684(0xf2)](_0x583e4a)||_0x583e4a<0x0||_0x583e4a>0x1)&&fail(_0x1e407c+_0x382684(0x94));}function tuple(..._0x17ccdb){const _0x1a36e7=a64_0x19993e;return _0x17ccdb[_0x1a36e7(0xd0)]((_0x39ba8d,_0x5d9720)=>_0x5d9720===0x1||_0x5d9720===0x3?_0x39ba8d['toLowerCase']():_0x39ba8d)[_0x1a36e7(0xe2)]('\x00');}function sameSet(_0x166334,_0xf78f6c){const _0xdaad78=a64_0x19993e;return _0x166334[_0xdaad78(0xab)]===_0xf78f6c[_0xdaad78(0xab)]&&[..._0x166334][_0xdaad78(0xf6)](_0x16bf5b=>_0xf78f6c['has'](_0x16bf5b));}function a64_0xcace(){const _0xea5c3d=['modelId','toField','Dataset\x20','test','].reason','].design.fields[','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','.cardinality\x20is\x20not\x20supported.','.confidence','localKey','].localKey','fromDatasetCode','dataset-batch','createdDatasets[].localKey','datasetName','\x20connects\x20incompatible\x20field\x20types.','join','metrics','length','\x20must\x20contain\x20','add','refTableField','name','\x20objects.','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','string','.fromField','].design.dataset','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','6aWngCb','].type\x20is\x20not\x20supported.','fieldType','isFinite','MANY_TO_ONE','1004967VvdIPD','type','every','datasets','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','\x20is\x20required.','createdDatasets','DATE_RANGE','get','lookup','\x20must\x20be\x20between\x200\x20and\x201.','toDatasetKey','trim','383224vZfeJZ','MULTI_SELECT','unresolvedRelations[','.reason','createdDatasets[].code','2WzfDKG','ADDRESS','refTableLabelField','modelCode','toDatasetCode','4773755SxGFzE','datasetCode','object','reason','7yvnqxW','\x20references\x20an\x20unknown\x20field.','expectedLocalKeys','toUpperCase','17032390ndilZi','isArray','size','source','].confidence','kind','].design.dataset\x20must\x20be\x20an\x20object.',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','cardinality','unresolvedRelations','schemaVersion','fromField','toLowerCase','].design\x20must\x20be\x20an\x20object.','code','design','entries','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','\x20references\x20an\x20unknown\x20dataset\x20localKey.','confidence','fromDatasetKey','3027000JUUEAk','some','122828wAQESJ','1382068iNeypC','set','createdRelations','fieldCode','split','].design.fields','relations[','has','datasets[',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','number','dataset','.toDatasetKey','relations','relationType','map','ONE_TO_ONE'];a64_0xcace=function(){return _0xea5c3d;};return a64_0xcace();}function isObject(_0x2f8253){const _0xe8b749=a64_0x19993e;return typeof _0x2f8253===_0xe8b749(0xa3)&&_0x2f8253!==null&&!Array[_0xe8b749(0xaa)](_0x2f8253);}function fail(_0x85d633){throw CliErrors['validation'](_0x85d633);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a65_0x96d8(){const _0x5cd8ed=['update','isFinite','keys','Expected\x20','modelCode','--business-group\x20must\x20not\x20be\x20blank','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','36joqTKA','dbTableSelector','datasetCode','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','modelId','unchanged','1181305qjURJm','business-group-update','extend','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','datasetId','data','4021400vjQwlh','/smartapi/dblink/updateTableBusinessGroup','validation','appCode','--business-group\x20is\x20required','datasetName','1362702ukxUIo','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','trim','write','number','string','business-group','source','2186296xdypSJ','ungrouped','Update\x20business\x20scenario\x20group','dataset','expect-business-group','backend','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','found','value','Expectation\x20mismatch\x20at\x20businessGroup','length','prototype',',\x20actual\x20','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','db-table','tableName','sourceType','stringify','code','dbtableConfig','3309680qtJIrg','toUpperCase','matched','object','path','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','name','109698IndsXG','businessGroup','message','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','METADATA','isArray','--code\x20is\x20required','/smartapi/question/er-config/business-group/edit','metadata','dbLinkId','payload','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','DB_TABLE','POST','expectBusinessGroup','str','5450680EKBjgR'];a65_0x96d8=function(){return _0x5cd8ed;};return a65_0x96d8();}const a65_0x509938=a65_0x4d4d;(function(_0x3c6cd4,_0x5ef181){const _0xaf3e66=a65_0x4d4d,_0x8229bd=_0x3c6cd4();while(!![]){try{const _0x3d72ec=-parseInt(_0xaf3e66(0x222))/0x1+parseInt(_0xaf3e66(0x21c))/0x2*(parseInt(_0xaf3e66(0x204))/0x3)+parseInt(_0xaf3e66(0x228))/0x4+parseInt(_0xaf3e66(0x214))/0x5+-parseInt(_0xaf3e66(0x1e1))/0x6+-parseInt(_0xaf3e66(0x1e9))/0x7+-parseInt(_0xaf3e66(0x1fd))/0x8;if(_0x3d72ec===_0x5ef181)break;else _0x8229bd['push'](_0x8229bd['shift']());}catch(_0x6ee1e4){_0x8229bd['push'](_0x8229bd['shift']());}}}(a65_0x96d8,0x972ce));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a65_0x4d4d(_0x22b611,_0x446974){_0x22b611=_0x22b611-0x1e1;const _0x96d8c4=a65_0x96d8();let _0x4d4ddf=_0x96d8c4[_0x22b611];return _0x4d4ddf;}const DB_TABLE_BACKEND_PATH=a65_0x509938(0x229),METADATA_BACKEND_PATH=a65_0x509938(0x20b),UNGROUPED_BUSINESS_GROUP=a65_0x509938(0x1ea);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x196803,input:_0x52500b,dryRun:_0x1f5af4}){const _0x158194=a65_0x509938;validateInput(_0x52500b);const _0x25825f=normalizeBusinessGroupArgument(_0x52500b['businessGroup']),_0x9e3610=await getDatasetDetail(_0x52500b[_0x158194(0x1fb)]),_0x14e2e6=resolveBusinessGroupDataset(_0x9e3610,_0x52500b[_0x158194(0x1fb)]);assertBusinessGroupUpdateSupported(_0x14e2e6,_0x25825f);const _0x574dd0=loadCurrentBusinessGroup(_0x9e3610,_0x14e2e6);assertExpectedBusinessGroup(_0x574dd0,_0x52500b[_0x158194(0x212)]);const _0x33bab6=buildBackendPlan(_0x196803,_0x14e2e6,_0x25825f),_0x2e0559=_0x574dd0!==_0x25825f;let _0x234f09;if(_0x2e0559&&!_0x1f5af4){_0x33bab6['kind']==='db-table'?await updateDbTableBusinessGroup(_0x33bab6[_0x158194(0x20e)]):await updateErBusinessGroup(_0x33bab6[_0x158194(0x20e)]);const _0x1f8e60=await getDatasetDetail(_0x14e2e6[_0x158194(0x1fb)]),_0x2d1c30=resolveBusinessGroupDataset(_0x1f8e60,_0x14e2e6[_0x158194(0x1fb)]),_0x34c06f=loadCurrentBusinessGroup(_0x1f8e60,_0x2d1c30);if(_0x34c06f!==_0x25825f)throw CliErrors['apiError'](_0x158194(0x202),_0x158194(0x218)+JSON[_0x158194(0x1fa)](displayBusinessGroup(_0x25825f))+',\x20actual\x20'+JSON['stringify'](displayBusinessGroup(_0x34c06f))+'.');_0x234f09={'verified':!![],'status':_0x158194(0x1ff),'afterReadback':{'businessGroup':displayBusinessGroup(_0x34c06f)}};}else!_0x2e0559&&(_0x234f09={'verified':!![],'status':_0x158194(0x221),'afterReadback':{'businessGroup':displayBusinessGroup(_0x574dd0)}});const _0x352268={'operation':_0x158194(0x215),'appCode':_0x196803,'selector':{'code':_0x14e2e6[_0x158194(0x1fb)]},'dataset':{'id':_0x14e2e6['id'],'code':_0x14e2e6[_0x158194(0x1fb)],'name':_0x14e2e6['name'],'sourceType':_0x14e2e6['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x574dd0)},'after':{'businessGroup':displayBusinessGroup(_0x25825f)},'changed':_0x2e0559,'dryRun':_0x1f5af4,'submitted':_0x2e0559&&!_0x1f5af4,'backend':{'method':_0x33bab6['method'],'path':_0x33bab6[_0x158194(0x201)],'payload':_0x33bab6[_0x158194(0x20e)]},..._0x234f09?{'verification':_0x234f09}:{},'warnings':[]};return{'ok':!![],'data':_0x352268,'message':_0x2e0559?_0x1f5af4?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x14e2e6[_0x158194(0x1fb)]:_0x158194(0x20f)+_0x14e2e6[_0x158194(0x1fb)]:_0x158194(0x207)+_0x14e2e6[_0x158194(0x1fb)]};}export const datasetBusinessGroupUpdate={'service':a65_0x509938(0x1ec),'command':a65_0x509938(0x223),'description':a65_0x509938(0x1eb),'risk':a65_0x509938(0x1e4),'flags':[CODE_FLAG,{'name':a65_0x509938(0x1e7),'type':'string','required':!![],'description':a65_0x509938(0x21f)},{'name':'expect-business-group','type':a65_0x509938(0x1e6),'required':![],'description':a65_0x509938(0x1f6)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x37b308){validateInput(readBusinessGroupUpdateInput(_0x37b308));},async 'dryRun'(_0x33ee4c){const _0x4030fc=a65_0x509938,_0x1506ac=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x33ee4c[_0x4030fc(0x22b)],'input':readBusinessGroupUpdateInput(_0x33ee4c),'dryRun':!![]});return{'method':_0x1506ac[_0x4030fc(0x227)][_0x4030fc(0x1ee)]['method'],'url':_0x1506ac[_0x4030fc(0x227)][_0x4030fc(0x1ee)][_0x4030fc(0x201)],'body':_0x1506ac['data']['backend']['payload'],'description':_0x1506ac[_0x4030fc(0x206)],..._0x1506ac[_0x4030fc(0x227)]};},async 'execute'(_0x72875a){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x72875a['appCode'],'input':readBusinessGroupUpdateInput(_0x72875a),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x434c24){const _0x199818=a65_0x509938,_0x41fd2c=_0x434c24[_0x199818(0x213)](_0x199818(0x1ed));return{'code':trim(_0x434c24['str'](_0x199818(0x1fb))),'businessGroup':_0x434c24[_0x199818(0x213)]('business-group'),'expectBusinessGroup':_0x41fd2c===undefined||_0x41fd2c===''?undefined:_0x41fd2c};}function validateInput(_0x536fc6){const _0x362713=a65_0x509938;if(!trim(_0x536fc6[_0x362713(0x1fb)]))throw CliErrors[_0x362713(0x22a)](_0x362713(0x20a));if(_0x536fc6[_0x362713(0x205)]===undefined)throw CliErrors[_0x362713(0x22a)](_0x362713(0x22c));if(!trim(_0x536fc6[_0x362713(0x205)]))throw CliErrors[_0x362713(0x22a)](_0x362713(0x21a));}function assertBusinessGroupUpdateSupported(_0x24b204,_0x1658e0){const _0x701f7e=a65_0x509938;if(_0x24b204['sourceType']===_0x701f7e(0x210)&&!_0x1658e0)throw CliErrors[_0x701f7e(0x22a)](_0x701f7e(0x225));}function resolveBusinessGroupDataset(_0x30ee78,_0x5b51a7){const _0x191c3b=a65_0x509938,_0x4bf4f7=asPlainObject(_0x30ee78['dataset']),_0x432a53=asPlainObject(_0x30ee78[_0x191c3b(0x1fc)]),_0x374ce3=resolveSourceType(_0x30ee78,_0x4bf4f7,_0x432a53),_0x4dc939=firstString(_0x30ee78[_0x191c3b(0x219)],_0x30ee78[_0x191c3b(0x1fb)],_0x4bf4f7[_0x191c3b(0x21e)],_0x5b51a7)||_0x5b51a7;return{'id':firstNumber(_0x30ee78[_0x191c3b(0x220)],_0x30ee78['id'],_0x4bf4f7[_0x191c3b(0x226)])??firstString(_0x30ee78[_0x191c3b(0x220)],_0x30ee78['id'],_0x4bf4f7[_0x191c3b(0x226)])??null,'code':_0x4dc939,'name':firstString(_0x30ee78['name'],_0x4bf4f7[_0x191c3b(0x22d)],_0x4bf4f7[_0x191c3b(0x203)])||null,'sourceType':_0x374ce3,'dbTableSelector':_0x374ce3==='DB_TABLE'?{'dbLinkId':firstNumber(_0x432a53['dbId']),'tableName':firstString(_0x432a53[_0x191c3b(0x1f8)])||null}:null};}function resolveSourceType(_0x1e5ad7,_0x1275f9,_0x29f9ae){const _0x3e8599=a65_0x509938,_0x3c8659=firstString(_0x1e5ad7[_0x3e8599(0x1e8)],_0x1e5ad7[_0x3e8599(0x1f9)],_0x1275f9['source'],_0x1275f9[_0x3e8599(0x1f9)])?.[_0x3e8599(0x1e3)]()[_0x3e8599(0x1fe)]();if(_0x3c8659==='DB_TABLE'||_0x3c8659===_0x3e8599(0x208))return _0x3c8659;if(Object[_0x3e8599(0x217)](_0x29f9ae)[_0x3e8599(0x1f3)]>0x0)return'DB_TABLE';throw CliErrors[_0x3e8599(0x22a)](_0x3e8599(0x21b));}function loadCurrentBusinessGroup(_0x16a38,_0xf12880){const _0x4c49d7=a65_0x509938,_0x2826dd=readBusinessGroupFromDatasetDetail(_0x16a38,_0xf12880[_0x4c49d7(0x1f9)]);if(_0x2826dd[_0x4c49d7(0x1f0)])return normalizeBusinessGroup(_0x2826dd[_0x4c49d7(0x1f1)]);return'';}function readBusinessGroupFromDatasetDetail(_0x40ce42,_0x102cd7){const _0x288139=a65_0x509938,_0x5cd4d6=asPlainObject(_0x40ce42[_0x288139(0x1ec)]),_0x553ac2=firstPresent(_0x40ce42['businessGroup']);if(_0x553ac2[_0x288139(0x1f0)])return _0x553ac2;const _0xa9a8f6=firstPresent(_0x5cd4d6[_0x288139(0x205)]);if(_0xa9a8f6[_0x288139(0x1f0)])return _0xa9a8f6;if(_0x102cd7===_0x288139(0x210))return{'found':![]};const _0x17c99c=readBusinessGroupFromExtend(_0x40ce42['extend']);if(_0x17c99c[_0x288139(0x1f0)])return _0x17c99c;return readBusinessGroupFromExtend(_0x5cd4d6[_0x288139(0x224)]);}function readBusinessGroupFromExtend(_0x4c8cfa){const _0x31ca14=a65_0x509938;if(_0x4c8cfa===undefined||_0x4c8cfa===null||_0x4c8cfa==='')return{'found':![]};if(typeof _0x4c8cfa===_0x31ca14(0x1e6))try{const _0x21925b=JSON['parse'](_0x4c8cfa);return readBusinessGroupFromExtend(_0x21925b);}catch{return{'found':![]};}const _0x79926c=asPlainObject(_0x4c8cfa);if(Object[_0x31ca14(0x1f4)]['hasOwnProperty']['call'](_0x79926c,_0x31ca14(0x205)))return{'found':!![],'value':_0x79926c['businessGroup']};return{'found':![]};}function firstPresent(..._0x557d96){for(const _0x40f7b9 of _0x557d96){if(_0x40f7b9!==undefined&&_0x40f7b9!==null)return{'found':!![],'value':_0x40f7b9};}return{'found':![]};}function assertExpectedBusinessGroup(_0x34a27f,_0x561ff5){const _0x1163d4=a65_0x509938;if(_0x561ff5===undefined)return;const _0x2002c3=normalizeBusinessGroupArgument(_0x561ff5);if(_0x34a27f!==_0x2002c3)throw CliErrors[_0x1163d4(0x22a)](_0x1163d4(0x1f2),'Expected\x20'+JSON[_0x1163d4(0x1fa)](_0x2002c3)+_0x1163d4(0x1f5)+JSON[_0x1163d4(0x1fa)](_0x34a27f));}function buildBackendPlan(_0x5b8aac,_0x210e99,_0x1819c7){const _0x1945cb=a65_0x509938;if(_0x210e99[_0x1945cb(0x1f9)]===_0x1945cb(0x210)){if(!_0x210e99[_0x1945cb(0x21d)]||_0x210e99['dbTableSelector'][_0x1945cb(0x20d)]===null||!_0x210e99['dbTableSelector'][_0x1945cb(0x1f8)])throw CliErrors[_0x1945cb(0x22a)](_0x1945cb(0x1e2),_0x1945cb(0x1ef));return{'kind':_0x1945cb(0x1f7),'method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x210e99[_0x1945cb(0x21d)][_0x1945cb(0x20d)],'tableName':_0x210e99[_0x1945cb(0x21d)]['tableName'],'businessGroup':_0x1819c7}};}return{'kind':_0x1945cb(0x20c),'method':_0x1945cb(0x211),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x5b8aac,'datasetCode':_0x210e99['code'],'businessGroup':_0x1819c7}};}function normalizeBusinessGroup(_0x421ae8){const _0x3c23e2=a65_0x509938;if(_0x421ae8===undefined||_0x421ae8===null)return'';return String(_0x421ae8)[_0x3c23e2(0x1e3)]();}function normalizeBusinessGroupArgument(_0x396a37){const _0x308ec2=normalizeBusinessGroup(_0x396a37);return _0x308ec2===UNGROUPED_BUSINESS_GROUP?'':_0x308ec2;}function displayBusinessGroup(_0x3427df){return _0x3427df||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x7844ed){const _0x278b69=a65_0x509938;if(!_0x7844ed||typeof _0x7844ed!==_0x278b69(0x200)||Array[_0x278b69(0x209)](_0x7844ed))return{};return _0x7844ed;}function firstString(..._0x4085b5){const _0x2f27c4=a65_0x509938;for(const _0x19d104 of _0x4085b5){if(typeof _0x19d104===_0x2f27c4(0x1e6)&&_0x19d104[_0x2f27c4(0x1e3)]())return _0x19d104[_0x2f27c4(0x1e3)]();if(typeof _0x19d104===_0x2f27c4(0x1e5)&&Number[_0x2f27c4(0x216)](_0x19d104))return String(_0x19d104);}return undefined;}function firstNumber(..._0x3a9186){const _0x16387f=a65_0x509938;for(const _0x1ea0bf of _0x3a9186){if(typeof _0x1ea0bf===_0x16387f(0x1e5)&&Number['isFinite'](_0x1ea0bf))return _0x1ea0bf;if(typeof _0x1ea0bf===_0x16387f(0x1e6)&&_0x1ea0bf[_0x16387f(0x1e3)]()&&Number[_0x16387f(0x216)](Number(_0x1ea0bf)))return Number(_0x1ea0bf);}return null;}function trim(_0x1c2052){return String(_0x1c2052||'')['trim']();}
|
|
1
|
+
const a65_0x5c2180=a65_0xfb21;(function(_0x517412,_0x42105a){const _0x38a0a8=a65_0xfb21,_0x4002ab=_0x517412();while(!![]){try{const _0x1894b7=parseInt(_0x38a0a8(0x14c))/0x1*(-parseInt(_0x38a0a8(0x146))/0x2)+-parseInt(_0x38a0a8(0x169))/0x3+-parseInt(_0x38a0a8(0x15c))/0x4+parseInt(_0x38a0a8(0x157))/0x5*(-parseInt(_0x38a0a8(0x147))/0x6)+parseInt(_0x38a0a8(0x14d))/0x7*(parseInt(_0x38a0a8(0x178))/0x8)+parseInt(_0x38a0a8(0x144))/0x9+parseInt(_0x38a0a8(0x15d))/0xa*(parseInt(_0x38a0a8(0x153))/0xb);if(_0x1894b7===_0x42105a)break;else _0x4002ab['push'](_0x4002ab['shift']());}catch(_0x53e45b){_0x4002ab['push'](_0x4002ab['shift']());}}}(a65_0x44cf,0xee1e1));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_0x5c2180(0x17a),UNGROUPED_BUSINESS_GROUP=a65_0x5c2180(0x158);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x19c653,input:_0x277874,dryRun:_0x2ee78b}){const _0x227aad=a65_0x5c2180;validateInput(_0x277874);const _0x1395f6=normalizeBusinessGroupArgument(_0x277874[_0x227aad(0x163)]),_0x42fca3=await getDatasetDetail(_0x277874[_0x227aad(0x13d)]),_0x2ee05b=resolveBusinessGroupDataset(_0x42fca3,_0x277874['code']);assertBusinessGroupUpdateSupported(_0x2ee05b,_0x1395f6);const _0x37f9c1=loadCurrentBusinessGroup(_0x42fca3,_0x2ee05b);assertExpectedBusinessGroup(_0x37f9c1,_0x277874[_0x227aad(0x14f)]);const _0x280ed9=buildBackendPlan(_0x19c653,_0x2ee05b,_0x1395f6),_0x1402bf=_0x37f9c1!==_0x1395f6;let _0x4d2e8b;if(_0x1402bf&&!_0x2ee78b){_0x280ed9['kind']===_0x227aad(0x176)?await updateDbTableBusinessGroup(_0x280ed9[_0x227aad(0x15a)]):await updateErBusinessGroup(_0x280ed9[_0x227aad(0x15a)]);const _0x86e17d=await getDatasetDetail(_0x2ee05b[_0x227aad(0x13d)]),_0x1b7d5b=resolveBusinessGroupDataset(_0x86e17d,_0x2ee05b[_0x227aad(0x13d)]),_0x35aacc=loadCurrentBusinessGroup(_0x86e17d,_0x1b7d5b);if(_0x35aacc!==_0x1395f6)throw CliErrors[_0x227aad(0x171)](_0x227aad(0x140),'Expected\x20'+JSON['stringify'](displayBusinessGroup(_0x1395f6))+',\x20actual\x20'+JSON['stringify'](displayBusinessGroup(_0x35aacc))+'.');_0x4d2e8b={'verified':!![],'status':_0x227aad(0x145),'afterReadback':{'businessGroup':displayBusinessGroup(_0x35aacc)}};}else!_0x1402bf&&(_0x4d2e8b={'verified':!![],'status':_0x227aad(0x14b),'afterReadback':{'businessGroup':displayBusinessGroup(_0x37f9c1)}});const _0x1b3e9d={'operation':_0x227aad(0x150),'appCode':_0x19c653,'selector':{'code':_0x2ee05b[_0x227aad(0x13d)]},'dataset':{'id':_0x2ee05b['id'],'code':_0x2ee05b['code'],'name':_0x2ee05b['name'],'sourceType':_0x2ee05b[_0x227aad(0x131)]},'before':{'businessGroup':displayBusinessGroup(_0x37f9c1)},'after':{'businessGroup':displayBusinessGroup(_0x1395f6)},'changed':_0x1402bf,'dryRun':_0x2ee78b,'submitted':_0x1402bf&&!_0x2ee78b,'backend':{'method':_0x280ed9[_0x227aad(0x16e)],'path':_0x280ed9[_0x227aad(0x152)],'payload':_0x280ed9[_0x227aad(0x15a)]},..._0x4d2e8b?{'verification':_0x4d2e8b}:{},'warnings':[]};return{'ok':!![],'data':_0x1b3e9d,'message':_0x1402bf?_0x2ee78b?_0x227aad(0x160)+_0x2ee05b[_0x227aad(0x13d)]:_0x227aad(0x141)+_0x2ee05b[_0x227aad(0x13d)]:_0x227aad(0x155)+_0x2ee05b[_0x227aad(0x13d)]};}export const datasetBusinessGroupUpdate={'service':a65_0x5c2180(0x15b),'command':a65_0x5c2180(0x16a),'description':'Update\x20business\x20scenario\x20group','risk':a65_0x5c2180(0x14e),'flags':[CODE_FLAG,{'name':a65_0x5c2180(0x135),'type':a65_0x5c2180(0x16d),'required':!![],'description':a65_0x5c2180(0x15e)},{'name':a65_0x5c2180(0x148),'type':a65_0x5c2180(0x16d),'required':![],'description':a65_0x5c2180(0x177)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x113a9a){validateInput(readBusinessGroupUpdateInput(_0x113a9a));},async 'dryRun'(_0x242170){const _0x579273=a65_0x5c2180,_0x363c04=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x242170[_0x579273(0x14a)],'input':readBusinessGroupUpdateInput(_0x242170),'dryRun':!![]});return{'method':_0x363c04[_0x579273(0x13e)]['backend'][_0x579273(0x16e)],'url':_0x363c04[_0x579273(0x13e)][_0x579273(0x13b)][_0x579273(0x152)],'body':_0x363c04[_0x579273(0x13e)][_0x579273(0x13b)][_0x579273(0x15a)],'description':_0x363c04[_0x579273(0x16c)],..._0x363c04[_0x579273(0x13e)]};},async 'execute'(_0x42694b){const _0x4aa0f7=a65_0x5c2180;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x42694b[_0x4aa0f7(0x14a)],'input':readBusinessGroupUpdateInput(_0x42694b),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x118e73){const _0x5b5145=a65_0x5c2180,_0x173e72=_0x118e73['str']('expect-business-group');return{'code':trim(_0x118e73[_0x5b5145(0x134)](_0x5b5145(0x13d))),'businessGroup':_0x118e73[_0x5b5145(0x134)](_0x5b5145(0x135)),'expectBusinessGroup':_0x173e72===undefined||_0x173e72===''?undefined:_0x173e72};}function validateInput(_0x28cd5a){const _0x3764e2=a65_0x5c2180;if(!trim(_0x28cd5a[_0x3764e2(0x13d)]))throw CliErrors['validation']('--code\x20is\x20required');if(_0x28cd5a[_0x3764e2(0x163)]===undefined)throw CliErrors[_0x3764e2(0x13a)]('--business-group\x20is\x20required');if(!trim(_0x28cd5a[_0x3764e2(0x163)]))throw CliErrors['validation'](_0x3764e2(0x172));}function assertBusinessGroupUpdateSupported(_0x3e0f10,_0x260090){const _0x4a3e39=a65_0x5c2180;if(_0x3e0f10[_0x4a3e39(0x131)]==='DB_TABLE'&&!_0x260090)throw CliErrors[_0x4a3e39(0x13a)](_0x4a3e39(0x16b));}function resolveBusinessGroupDataset(_0x51c3bc,_0x583629){const _0x11d793=a65_0x5c2180,_0x22167e=asPlainObject(_0x51c3bc['dataset']),_0x4e4ebc=asPlainObject(_0x51c3bc[_0x11d793(0x170)]),_0x28459e=resolveSourceType(_0x51c3bc,_0x22167e,_0x4e4ebc),_0x9ac6c3=firstString(_0x51c3bc[_0x11d793(0x179)],_0x51c3bc['code'],_0x22167e[_0x11d793(0x151)],_0x583629)||_0x583629;return{'id':firstNumber(_0x51c3bc['modelId'],_0x51c3bc['id'],_0x22167e['datasetId'])??firstString(_0x51c3bc['modelId'],_0x51c3bc['id'],_0x22167e[_0x11d793(0x139)])??null,'code':_0x9ac6c3,'name':firstString(_0x51c3bc[_0x11d793(0x164)],_0x22167e[_0x11d793(0x137)],_0x22167e[_0x11d793(0x164)])||null,'sourceType':_0x28459e,'dbTableSelector':_0x28459e===_0x11d793(0x132)?{'dbLinkId':firstNumber(_0x4e4ebc[_0x11d793(0x165)]),'tableName':firstString(_0x4e4ebc[_0x11d793(0x143)])||null}:null};}function resolveSourceType(_0x650fad,_0x91574a,_0x194ca9){const _0x293739=a65_0x5c2180,_0x5deb9b=firstString(_0x650fad[_0x293739(0x13c)],_0x650fad[_0x293739(0x131)],_0x91574a[_0x293739(0x13c)],_0x91574a[_0x293739(0x131)])?.[_0x293739(0x142)]()['toUpperCase']();if(_0x5deb9b===_0x293739(0x132)||_0x5deb9b===_0x293739(0x175))return _0x5deb9b;if(Object[_0x293739(0x136)](_0x194ca9)[_0x293739(0x15f)]>0x0)return _0x293739(0x132);throw CliErrors['validation'](_0x293739(0x167));}function loadCurrentBusinessGroup(_0x2f670f,_0x50c853){const _0x262107=a65_0x5c2180,_0x193329=readBusinessGroupFromDatasetDetail(_0x2f670f,_0x50c853[_0x262107(0x131)]);if(_0x193329['found'])return normalizeBusinessGroup(_0x193329[_0x262107(0x159)]);return'';}function readBusinessGroupFromDatasetDetail(_0x34b69e,_0x13cd31){const _0xf9561e=a65_0x5c2180,_0x2f7f39=asPlainObject(_0x34b69e[_0xf9561e(0x15b)]),_0x1db27e=firstPresent(_0x34b69e[_0xf9561e(0x163)]);if(_0x1db27e[_0xf9561e(0x161)])return _0x1db27e;const _0x32a9cc=firstPresent(_0x2f7f39[_0xf9561e(0x163)]);if(_0x32a9cc[_0xf9561e(0x161)])return _0x32a9cc;if(_0x13cd31===_0xf9561e(0x132))return{'found':![]};const _0x20194f=readBusinessGroupFromExtend(_0x34b69e['extend']);if(_0x20194f[_0xf9561e(0x161)])return _0x20194f;return readBusinessGroupFromExtend(_0x2f7f39[_0xf9561e(0x168)]);}function a65_0x44cf(){const _0x48d8a2=['Expectation\x20mismatch\x20at\x20businessGroup','METADATA','db-table','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','8xxFVyN','modelCode','/smartapi/question/er-config/business-group/edit','sourceType','DB_TABLE','call','str','business-group','keys','datasetName',',\x20actual\x20','datasetId','validation','backend','source','code','data','isFinite','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','trim','tableName','4120524ZXcuYJ','matched','1635766PLGWxF','3162kpFocc','expect-business-group','dbTableSelector','appCode','unchanged','1hSpbqn','2888809kZnIkV','write','expectBusinessGroup','update','datasetCode','path','43606915KpbEbY','POST','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','stringify','565wnhyYq','ungrouped','value','payload','dataset','7733108QbLity','10wPZtwp','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','length','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','found','parse','businessGroup','name','dbId','dbLinkId','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','extend','3146244XfTjaC','business-group-update','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','message','string','method','number','dbtableConfig','apiError','--business-group\x20must\x20not\x20be\x20blank','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.'];a65_0x44cf=function(){return _0x48d8a2;};return a65_0x44cf();}function readBusinessGroupFromExtend(_0x58a361){const _0x3945e5=a65_0x5c2180;if(_0x58a361===undefined||_0x58a361===null||_0x58a361==='')return{'found':![]};if(typeof _0x58a361==='string')try{const _0xf08ad4=JSON[_0x3945e5(0x162)](_0x58a361);return readBusinessGroupFromExtend(_0xf08ad4);}catch{return{'found':![]};}const _0x4d168f=asPlainObject(_0x58a361);if(Object['prototype']['hasOwnProperty'][_0x3945e5(0x133)](_0x4d168f,_0x3945e5(0x163)))return{'found':!![],'value':_0x4d168f[_0x3945e5(0x163)]};return{'found':![]};}function firstPresent(..._0x49229b){for(const _0x37e8eb of _0x49229b){if(_0x37e8eb!==undefined&&_0x37e8eb!==null)return{'found':!![],'value':_0x37e8eb};}return{'found':![]};}function assertExpectedBusinessGroup(_0x559d9a,_0x2783e6){const _0x5865ab=a65_0x5c2180;if(_0x2783e6===undefined)return;const _0x10c0bd=normalizeBusinessGroupArgument(_0x2783e6);if(_0x559d9a!==_0x10c0bd)throw CliErrors[_0x5865ab(0x13a)](_0x5865ab(0x174),'Expected\x20'+JSON[_0x5865ab(0x156)](_0x10c0bd)+_0x5865ab(0x138)+JSON[_0x5865ab(0x156)](_0x559d9a));}function buildBackendPlan(_0x1da1fa,_0x55a243,_0xaa44b2){const _0x5949b4=a65_0x5c2180;if(_0x55a243[_0x5949b4(0x131)]===_0x5949b4(0x132)){if(!_0x55a243['dbTableSelector']||_0x55a243[_0x5949b4(0x149)]['dbLinkId']===null||!_0x55a243[_0x5949b4(0x149)][_0x5949b4(0x143)])throw CliErrors[_0x5949b4(0x13a)](_0x5949b4(0x173),'Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.');return{'kind':_0x5949b4(0x176),'method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x55a243[_0x5949b4(0x149)][_0x5949b4(0x166)],'tableName':_0x55a243[_0x5949b4(0x149)][_0x5949b4(0x143)],'businessGroup':_0xaa44b2}};}return{'kind':'metadata','method':_0x5949b4(0x154),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x1da1fa,'datasetCode':_0x55a243['code'],'businessGroup':_0xaa44b2}};}function normalizeBusinessGroup(_0xcf0037){const _0x1778e9=a65_0x5c2180;if(_0xcf0037===undefined||_0xcf0037===null)return'';return String(_0xcf0037)[_0x1778e9(0x142)]();}function normalizeBusinessGroupArgument(_0x268fff){const _0x3e52c4=normalizeBusinessGroup(_0x268fff);return _0x3e52c4===UNGROUPED_BUSINESS_GROUP?'':_0x3e52c4;}function displayBusinessGroup(_0x1397a3){return _0x1397a3||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0xa678af){if(!_0xa678af||typeof _0xa678af!=='object'||Array['isArray'](_0xa678af))return{};return _0xa678af;}function firstString(..._0x4fe56a){const _0x156a6a=a65_0x5c2180;for(const _0x5ea1ba of _0x4fe56a){if(typeof _0x5ea1ba==='string'&&_0x5ea1ba[_0x156a6a(0x142)]())return _0x5ea1ba[_0x156a6a(0x142)]();if(typeof _0x5ea1ba===_0x156a6a(0x16f)&&Number['isFinite'](_0x5ea1ba))return String(_0x5ea1ba);}return undefined;}function a65_0xfb21(_0x479680,_0x4ece5f){_0x479680=_0x479680-0x131;const _0x44cf42=a65_0x44cf();let _0xfb21e3=_0x44cf42[_0x479680];return _0xfb21e3;}function firstNumber(..._0x1d2332){const _0x3d51d2=a65_0x5c2180;for(const _0xb08c39 of _0x1d2332){if(typeof _0xb08c39==='number'&&Number['isFinite'](_0xb08c39))return _0xb08c39;if(typeof _0xb08c39===_0x3d51d2(0x16d)&&_0xb08c39[_0x3d51d2(0x142)]()&&Number[_0x3d51d2(0x13f)](Number(_0xb08c39)))return Number(_0xb08c39);}return null;}function trim(_0x175c86){const _0x10c4ba=a65_0x5c2180;return String(_0x175c86||'')[_0x10c4ba(0x142)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x281ee2=a66_0x593c;(function(_0x8052b7,_0x174421){const _0x59299a=a66_0x593c,_0xa1285a=_0x8052b7();while(!![]){try{const _0x36fbc=-parseInt(_0x59299a(0x17d))/0x1+-parseInt(_0x59299a(0x190))/0x2*(parseInt(_0x59299a(0x185))/0x3)+-parseInt(_0x59299a(0x17c))/0x4*(parseInt(_0x59299a(0x17b))/0x5)+parseInt(_0x59299a(0x188))/0x6+parseInt(_0x59299a(0x17f))/0x7+-parseInt(_0x59299a(0x187))/0x8*(-parseInt(_0x59299a(0x180))/0x9)+-parseInt(_0x59299a(0x18c))/0xa*(-parseInt(_0x59299a(0x18d))/0xb);if(_0x36fbc===_0x174421)break;else _0xa1285a['push'](_0xa1285a['shift']());}catch(_0x25b668){_0xa1285a['push'](_0xa1285a['shift']());}}}(a66_0x3683,0x509ae));function a66_0x593c(_0x5af954,_0x486193){_0x5af954=_0x5af954-0x178;const _0x36833d=a66_0x3683();let _0x593c13=_0x36833d[_0x5af954];return _0x593c13;}function a66_0x3683(){const _0x3bcdb1=['Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','2387224xhSyUl','35550mpWqkC','Found\x20','map','trim','groups','3QLRqbq','business-groups','8urMpOl','136428CGAeCO','dataset','\x20business\x20group(s)\x20for\x20database\x20connection\x20','DB_TABLE','900ZsXklW','108581bXOegp','length','read','1261726lRBFUj','num','appCode','ungrouped','dbid','businessGroup','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','10NZgfVM','112172CXsHfD','239003CXbxvW'];a66_0x3683=function(){return _0x3bcdb1;};return a66_0x3683();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a66_0x281ee2(0x189),'command':a66_0x281ee2(0x186),'description':a66_0x281ee2(0x17a),'risk':a66_0x281ee2(0x18f),'flags':[{'name':'dbid','type':'number','required':!![],'description':a66_0x281ee2(0x17e)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1f07d2){const _0x115efd=a66_0x281ee2,_0x4ac397=_0x1f07d2[_0x115efd(0x191)](_0x115efd(0x178)),_0x4334e1=await getErBusinessGroupSummary(_0x1f07d2[_0x115efd(0x192)],_0x4ac397),_0x2b332d=_0x4334e1[_0x115efd(0x184)][_0x115efd(0x182)](_0x3f25e0=>({..._0x3f25e0,'businessGroup':_0x3f25e0[_0x115efd(0x179)][_0x115efd(0x183)]()||_0x115efd(0x193)}));return{'ok':!![],'data':{..._0x4334e1,'groups':_0x2b332d,'scope':_0x115efd(0x18b)},'message':_0x115efd(0x181)+_0x2b332d[_0x115efd(0x18e)]+_0x115efd(0x18a)+_0x4ac397};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a67_0x24ca56=a67_0x5064;(function(_0x494230,_0x430978){const _0x2134ab=a67_0x5064,_0x1fa4bc=_0x494230();while(!![]){try{const _0x4dbe3e=-parseInt(_0x2134ab(0x180))/0x1+-parseInt(_0x2134ab(0x178))/0x2*(-parseInt(_0x2134ab(0x183))/0x3)+-parseInt(_0x2134ab(0x16a))/0x4+parseInt(_0x2134ab(0x177))/0x5+parseInt(_0x2134ab(0x179))/0x6*(parseInt(_0x2134ab(0x176))/0x7)+-parseInt(_0x2134ab(0x16b))/0x8*(parseInt(_0x2134ab(0x17a))/0x9)+-parseInt(_0x2134ab(0x182))/0xa*(-parseInt(_0x2134ab(0x173))/0xb);if(_0x4dbe3e===_0x430978)break;else _0x1fa4bc['push'](_0x1fa4bc['shift']());}catch(_0x3e9a63){_0x1fa4bc['push'](_0x1fa4bc['shift']());}}}(a67_0x1ea8,0x9e529));function a67_0x5064(_0x5ba8a1,_0xb640b6){_0x5ba8a1=_0x5ba8a1-0x166;const _0x1ea8c2=a67_0x1ea8();let _0x506462=_0x1ea8c2[_0x5ba8a1];return _0x506462;}import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a67_0x24ca56(0x181),'filter':a67_0x24ca56(0x17b),'getOne':a67_0x24ca56(0x17f)};export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x5766b1){return _0x5766b1==null?'':String(_0x5766b1)['trim']();}function getDatasetCode(_0xa61a1e){const _0x748b78=a67_0x24ca56;return valueToString(_0xa61a1e[_0x748b78(0x168)]??_0xa61a1e['modelCode']??_0xa61a1e[_0x748b78(0x174)]?.[_0x748b78(0x16e)]);}function getDatasetName(_0x10f3c2){const _0x3b6aad=a67_0x24ca56;return valueToString(_0x10f3c2[_0x3b6aad(0x169)]??_0x10f3c2[_0x3b6aad(0x174)]?.['datasetName'])||_0x3b6aad(0x17e);}function getDatasetSource(_0xa466fd){const _0x1ecfd5=a67_0x24ca56;return valueToString(_0xa466fd[_0x1ecfd5(0x167)]??_0xa466fd[_0x1ecfd5(0x174)]?.[_0x1ecfd5(0x175)])['toUpperCase']();}function getDbtableConfig(_0x3ba931){const _0xaa8967=_0x3ba931['dbtableConfig']??_0x3ba931['dbtable'];return _0xaa8967&&typeof _0xaa8967==='object'?_0xaa8967:{};}function a67_0x1ea8(){const _0x3bcd4a=['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','length','unknown','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','930462nIoWXc','lovrabet','20JVOdmp','6crbVyY','The\x20current\x20dataset\x20\x22','SQL\x20schema\x20validation','source','code','name','3125892SDekhN','1653216aTIFxZ','filter','tableName','datasetCode','validation','dbId','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','getOne','812339DvFkqa','dataset','sourceType','3101bWVsAt','6433865TPYRQh','576854jyBdlf','10326RXybZs','18WlvyQo'];a67_0x1ea8=function(){return _0x3bcd4a;};return a67_0x1ea8();}export function isDbTableBackedDataset(_0x1b3ce8){const _0x557e88=a67_0x24ca56,_0x381496=getDatasetSource(_0x1b3ce8);if(_0x381496==='METADATA')return![];const _0x479eee=getDbtableConfig(_0x1b3ce8),_0x1efe80=_0x479eee[_0x557e88(0x170)]??_0x479eee['id'],_0x529a0b=valueToString(_0x479eee[_0x557e88(0x16d)]??_0x1b3ce8[_0x557e88(0x16d)]??_0x1b3ce8[_0x557e88(0x174)]?.['tableName']);return _0x1efe80!==undefined&&_0x1efe80!==null&&_0x529a0b[_0x557e88(0x17d)]>0x0;}export function filterDbTableBackedDatasets(_0x2f7c64){return _0x2f7c64['filter'](_0x556579=>isDbTableBackedDataset(_0x556579));}export function buildDbTableBackedRequirementMessage(_0x47e240,_0x27197f=a67_0x24ca56(0x166)){const _0x24d675=a67_0x24ca56,_0x5e7d68=getDatasetSource(_0x47e240)||'UNKNOWN',_0x4cfcfb=getDatasetName(_0x47e240),_0x351bea=getDatasetCode(_0x47e240),_0xf4edc9=_0x351bea?'\x20('+_0x351bea+')':'';return[_0x24d675(0x184)+_0x4cfcfb+'\x22'+_0xf4edc9+'\x20is\x20'+_0x5e7d68+_0x24d675(0x17c)+_0x27197f+'.',_0x24d675(0x171),'Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x24d675(0x16c)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x24d675(0x172)]+'.']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x442caa,_0x4aac90){const _0x2f8bc4=a67_0x24ca56;if(!isDbTableBackedDataset(_0x442caa))throw CliErrors[_0x2f8bc4(0x16f)](buildDbTableBackedRequirementMessage(_0x442caa,_0x4aac90));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x1a4da0=a68_0x32e2;(function(_0x582be8,_0x39eb44){const _0x512961=a68_0x32e2,_0x27c2ef=_0x582be8();while(!![]){try{const _0x810f21=parseInt(_0x512961(0xdf))/0x1*(parseInt(_0x512961(0xe0))/0x2)+parseInt(_0x512961(0xd8))/0x3+-parseInt(_0x512961(0xe2))/0x4*(parseInt(_0x512961(0xe1))/0x5)+-parseInt(_0x512961(0xdb))/0x6+parseInt(_0x512961(0xe3))/0x7+-parseInt(_0x512961(0xdd))/0x8+parseInt(_0x512961(0xdc))/0x9;if(_0x810f21===_0x39eb44)break;else _0x27c2ef['push'](_0x27c2ef['shift']());}catch(_0x695826){_0x27c2ef['push'](_0x27c2ef['shift']());}}}(a68_0x1b34,0xb47d4));import{createCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationCreate={'service':a68_0x1a4da0(0xd9),'command':'cross-relation-create','description':a68_0x1a4da0(0xd7),'risk':a68_0x1a4da0(0xda),'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 _0x394139=>validateCrossRelation(_0x394139,a68_0x1a4da0(0xde)),'dryRun':_0x3f5984=>previewCrossRelation(_0x3f5984,a68_0x1a4da0(0xde)),'execute':_0xa4a4ed=>executeCrossRelation(_0xa4a4ed,a68_0x1a4da0(0xde),createCrossDbRelation)};function a68_0x32e2(_0x455bae,_0x3fbc4a){_0x455bae=_0x455bae-0xd7;const _0x1b3403=a68_0x1b34();let _0x32e293=_0x1b3403[_0x455bae];return _0x32e293;}function a68_0x1b34(){const _0x538884=['dataset','write','2706150yhPnwJ','5852133sHnRUE','8792928AcszSp','create','223RPRoFO','10574cpsllj','9635LHKSoV','2836LWkjBx','8625344JPwkxa','Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','1782714BMAiMx'];a68_0x1b34=function(){return _0x538884;};return a68_0x1b34();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x57c90f=a69_0x4dc9;function a69_0x363f(){const _0x1926bc=['56671AXokYd','3223196xKuhFN','cross-relation-delete','6430196DjXHqh','1067YyJHQv','1668600zGCjMG','high-risk-write','966JyVqsc','264612KhXdVA','1487223EXImHR','60BMzZKF','36136oKlXRs','5CDVaIZ','Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','delete','3GBCHeF'];a69_0x363f=function(){return _0x1926bc;};return a69_0x363f();}(function(_0xba4f0a,_0x33e088){const _0x44cfb7=a69_0x4dc9,_0x282295=_0xba4f0a();while(!![]){try{const _0x7f0147=parseInt(_0x44cfb7(0xaa))/0x1+-parseInt(_0x44cfb7(0xab))/0x2*(parseInt(_0x44cfb7(0xa9))/0x3)+-parseInt(_0x44cfb7(0xad))/0x4*(parseInt(_0x44cfb7(0xa6))/0x5)+parseInt(_0x44cfb7(0xaf))/0x6+-parseInt(_0x44cfb7(0xb1))/0x7*(-parseInt(_0x44cfb7(0xa5))/0x8)+parseInt(_0x44cfb7(0xa3))/0x9*(parseInt(_0x44cfb7(0xa4))/0xa)+-parseInt(_0x44cfb7(0xae))/0xb*(-parseInt(_0x44cfb7(0xb2))/0xc);if(_0x7f0147===_0x33e088)break;else _0x282295['push'](_0x282295['shift']());}catch(_0x19ab36){_0x282295['push'](_0x282295['shift']());}}}(a69_0x363f,0xd4417));import{deleteCrossDbRelation}from'../../core/api-client.js';function a69_0x4dc9(_0x13fc69,_0x87b9c6){_0x13fc69=_0x13fc69-0xa3;const _0x363f79=a69_0x363f();let _0x4dc906=_0x363f79[_0x13fc69];return _0x4dc906;}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';export const datasetCrossRelationDelete={'service':'dataset','command':a69_0x57c90f(0xac),'description':a69_0x57c90f(0xa7),'risk':a69_0x57c90f(0xb0),'strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x3e4e9f=>validateCrossRelation(_0x3e4e9f,a69_0x57c90f(0xa8)),'dryRun':_0x35b870=>previewCrossRelation(_0x35b870,a69_0x57c90f(0xa8)),'execute':_0x3f15a0=>executeCrossRelation(_0x3f15a0,a69_0x57c90f(0xa8),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x3a2a8b=a70_0x5da3;(function(_0x469651,_0x15025a){const _0x5ca75c=a70_0x5da3,_0x196f92=_0x469651();while(!![]){try{const _0x4c5fd6=-parseInt(_0x5ca75c(0x1bf))/0x1+-parseInt(_0x5ca75c(0x1bc))/0x2*(parseInt(_0x5ca75c(0x1c0))/0x3)+parseInt(_0x5ca75c(0x1bb))/0x4+-parseInt(_0x5ca75c(0x1b7))/0x5*(-parseInt(_0x5ca75c(0x1c6))/0x6)+-parseInt(_0x5ca75c(0x1c5))/0x7*(parseInt(_0x5ca75c(0x1cb))/0x8)+-parseInt(_0x5ca75c(0x1bd))/0x9*(parseInt(_0x5ca75c(0x1c1))/0xa)+-parseInt(_0x5ca75c(0x1c8))/0xb*(-parseInt(_0x5ca75c(0x1ba))/0xc);if(_0x4c5fd6===_0x15025a)break;else _0x196f92['push'](_0x196f92['shift']());}catch(_0x1abd74){_0x196f92['push'](_0x196f92['shift']());}}}(a70_0x477d,0x2c12d));function a70_0x5da3(_0x108a2f,_0x4fb294){_0x108a2f=_0x108a2f-0x1b7;const _0x477d3d=a70_0x477d();let _0x5da38e=_0x477d3d[_0x108a2f];return _0x5da38e;}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_0x3a2a8b(0x1b9),'command':a70_0x3a2a8b(0x1c4),'description':a70_0x3a2a8b(0x1b8),'risk':a70_0x3a2a8b(0x1c9),'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 _0xef9059=>validateCrossRelation(_0xef9059,a70_0x3a2a8b(0x1c3)),async 'execute'(_0x3659e6){const _0x8fec07=a70_0x3a2a8b,_0x38fcb3=await resolveCrossRelationQuery(_0x3659e6),_0x100179=await queryCrossDbRelations(_0x38fcb3);return{'ok':!![],'data':{'appCode':_0x3659e6[_0x8fec07(0x1ca)],'selector':_0x38fcb3,'total':_0x100179[_0x8fec07(0x1c7)],'relations':_0x100179[_0x8fec07(0x1c2)](projectCrossRelation)},'message':'Cross-database\x20relations:\x20'+_0x100179[_0x8fec07(0x1c7)]+_0x8fec07(0x1be)};}};function a70_0x477d(){const _0x5209f5=['1711629EDiuya','\x20relation(s)','66159PVuRBA','2997IjtoPz','10nTiKMY','map','list','cross-relation-list','502166RNlTlr','1614qEVUcz','length','6488999PPWixw','read','appCode','32WnHQEA','2405uiVNkj','List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','dataset','12UuvbFS','441652VSjgxD','212CkFQIA'];a70_0x477d=function(){return _0x5209f5;};return a70_0x477d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a71_0x5dec75=a71_0x8008;(function(_0x52bb62,_0x327d96){const _0x2b299e=a71_0x8008,_0xfdc436=_0x52bb62();while(!![]){try{const _0x3c1865=parseInt(_0x2b299e(0xbb))/0x1+parseInt(_0x2b299e(0x98))/0x2*(parseInt(_0x2b299e(0xa1))/0x3)+-parseInt(_0x2b299e(0xaf))/0x4+-parseInt(_0x2b299e(0xa5))/0x5*(parseInt(_0x2b299e(0xc3))/0x6)+-parseInt(_0x2b299e(0xa2))/0x7*(-parseInt(_0x2b299e(0xac))/0x8)+-parseInt(_0x2b299e(0xbd))/0x9+parseInt(_0x2b299e(0xdf))/0xa;if(_0x3c1865===_0x327d96)break;else _0xfdc436['push'](_0xfdc436['shift']());}catch(_0x2137c7){_0xfdc436['push'](_0xfdc436['shift']());}}}(a71_0x48bc,0x9d56a));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(_0x139e8e,_0x3bd206){const _0x47e21c=a71_0x8008,_0x1c8b18=_0x139e8e['str'](_0x3bd206)[_0x47e21c(0xcb)]();if(!_0x1c8b18)throw CliErrors[_0x47e21c(0xd1)](_0x3bd206);return _0x1c8b18;}function explicitDblink(_0x331152){const _0x5d1009=a71_0x8008,_0x5a960a=_0x331152['flag']('from-dblink-id');if(_0x5a960a===undefined||_0x5a960a===null)return undefined;const _0x35aa97=Number(_0x5a960a);if(!Number['isSafeInteger'](_0x35aa97)||_0x35aa97<=0x0)throw CliErrors[_0x5d1009(0xd8)]('--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x35aa97;}export function validateCrossRelation(_0x37222b,_0x3621ef){const _0x5b4ecd=a71_0x8008,_0x538896=explicitDblink(_0x37222b);if(_0x3621ef===_0x5b4ecd(0x9e)){if(!_0x37222b['str']('from-datasetcode')[_0x5b4ecd(0xcb)]()&&_0x538896===undefined)throw CliErrors[_0x5b4ecd(0xd8)](_0x5b4ecd(0xd2));return;}required(_0x37222b,_0x5b4ecd(0xa9)),required(_0x37222b,_0x5b4ecd(0xe0));if(_0x3621ef!==_0x5b4ecd(0xa4)){required(_0x37222b,_0x5b4ecd(0xd9)),required(_0x37222b,_0x5b4ecd(0xc5));const _0x45f44c=_0x37222b[_0x5b4ecd(0x9d)](_0x5b4ecd(0xbf))[_0x5b4ecd(0xcb)]();if(_0x45f44c&&!CROSS_RELATION_CARDINALITY_FLAG[_0x5b4ecd(0xd7)]['includes'](_0x45f44c))throw CliErrors[_0x5b4ecd(0xd8)](_0x5b4ecd(0xa8));}}async function resolveEndpoint(_0x3de697){const _0x522e6=a71_0x8008,_0x332b07=await getDatasetDetail(_0x3de697),_0x27808c=_0x332b07?.[_0x522e6(0xc4)]??{};if((_0x332b07?.[_0x522e6(0x94)]??_0x27808c['sourceType'])!==_0x522e6(0xdd))throw CliErrors['validation'](_0x522e6(0xe1)+_0x3de697+_0x522e6(0x9c));const _0x520dbe=_0x332b07[_0x522e6(0xc1)]??_0x332b07[_0x522e6(0xa3)]??{};let _0x238492=_0x332b07[_0x522e6(0xb7)]??_0x27808c[_0x522e6(0xb7)]??{};if(typeof _0x238492==='string')try{_0x238492=_0x238492[_0x522e6(0xcb)]()?JSON[_0x522e6(0xc6)](_0x238492):{};}catch{throw CliErrors[_0x522e6(0xd8)](_0x522e6(0xe1)+_0x3de697+'\x20has\x20invalid\x20storage\x20configuration.');}const _0x2611e0=Number(_0x238492?.[_0x522e6(0xc2)]?.[_0x522e6(0xd3)]??_0x332b07[_0x522e6(0xc2)]?.[_0x522e6(0xd3)]??_0x27808c[_0x522e6(0xc2)]?.[_0x522e6(0xd3)]??_0x520dbe[_0x522e6(0xd3)]??_0x27808c[_0x522e6(0xd3)]??_0x332b07[_0x522e6(0xd3)]),_0x4d5e14=String(_0x332b07[_0x522e6(0xca)]??_0x27808c['tableName']??_0x520dbe[_0x522e6(0xca)]??'')[_0x522e6(0xcb)]();if(!Number[_0x522e6(0xd6)](_0x2611e0)||_0x2611e0<=0x0||!_0x4d5e14)throw CliErrors[_0x522e6(0xd8)](_0x522e6(0xe1)+_0x3de697+_0x522e6(0xcf));return{'datasetCode':_0x3de697,'dblinkId':_0x2611e0,'table':_0x4d5e14};}function a71_0x8008(_0x58b586,_0x59da48){_0x58b586=_0x58b586-0x93;const _0x48bc80=a71_0x48bc();let _0x80083b=_0x48bc80[_0x58b586];return _0x80083b;}export async function resolveCrossRelationQuery(_0x173508){const _0x3b1834=a71_0x8008,_0x109289=_0x173508[_0x3b1834(0x9d)]('from-datasetcode')[_0x3b1834(0xcb)](),_0x58c496=explicitDblink(_0x173508),_0x5a4e7b=_0x109289?await resolveEndpoint(_0x109289):undefined;if(_0x5a4e7b&&_0x58c496!==undefined&&_0x5a4e7b[_0x3b1834(0xb0)]!==_0x58c496)throw CliErrors['validation']('--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.');const _0x345377=_0x5a4e7b?.[_0x3b1834(0xb0)]??_0x58c496;if(_0x345377===undefined)throw CliErrors[_0x3b1834(0xd8)](_0x3b1834(0xd2));return{'appCode':_0x173508[_0x3b1834(0xd4)],'fromDblinkId':_0x345377,..._0x109289?{'fromDatasetCode':_0x109289}:{},..._0x173508[_0x3b1834(0x9d)]('from-column')[_0x3b1834(0xcb)]()?{'fromField':_0x173508[_0x3b1834(0x9d)](_0x3b1834(0xe0))[_0x3b1834(0xcb)]()}:{}};}export function projectCrossRelation(_0x16eeba){const _0x1fcd44=a71_0x8008;return{'relationId':_0x16eeba['relationId'],'from':{'source':_0x1fcd44(0xdd),'datasetCode':_0x16eeba[_0x1fcd44(0x9a)],'datasetName':_0x16eeba[_0x1fcd44(0xcd)],'dblinkId':_0x16eeba[_0x1fcd44(0xcc)],'table':_0x16eeba[_0x1fcd44(0x93)],'field':_0x16eeba[_0x1fcd44(0x97)]},'to':{'source':_0x1fcd44(0xdd),'datasetCode':_0x16eeba['toDatasetCode'],'datasetName':_0x16eeba['toDatasetName'],'dblinkId':_0x16eeba['toDblinkId'],'table':_0x16eeba[_0x1fcd44(0xb9)],'field':_0x16eeba[_0x1fcd44(0xe6)],'labelField':_0x16eeba[_0x1fcd44(0xde)]},'relation':{'cardinality':_0x16eeba[_0x1fcd44(0xbf)],'relationType':_0x16eeba['relationType']}};}function ambiguity(_0x222ea8){const _0x128565=a71_0x8008,_0x44e226=CliErrors[_0x128565(0xd8)]('Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.',_0x128565(0xdb));return Object[_0x128565(0xc7)](_0x44e226,_0x128565(0xba),{'value':{'candidates':_0x222ea8['map'](projectCrossRelation)}}),_0x44e226;}const sameName=(_0x464ee5,_0x451a6d)=>_0x464ee5['toLowerCase']()===_0x451a6d[a71_0x5dec75(0xda)]();function matchesEndpoint(_0x35cbc2,_0x1da94f,_0x2870e5,_0x242546,_0x5bae4f){const _0x258564=a71_0x5dec75;return _0x35cbc2['fromDblinkId']===_0x1da94f['dblinkId']&&sameName(_0x35cbc2[_0x258564(0x93)],_0x1da94f[_0x258564(0xaa)])&&sameName(_0x35cbc2['fromField'],_0x2870e5)&&_0x35cbc2[_0x258564(0xb1)]===_0x242546['dblinkId']&&sameName(_0x35cbc2[_0x258564(0xb9)],_0x242546[_0x258564(0xaa)])&&sameName(_0x35cbc2[_0x258564(0xe6)],_0x5bae4f);}export async function prepareCrossRelation(_0x595b5d,_0x418ad3){const _0x4db101=a71_0x5dec75,_0x598a09=await resolveEndpoint(required(_0x595b5d,_0x4db101(0xa9))),_0x2c8930=explicitDblink(_0x595b5d);if(_0x2c8930!==undefined&&_0x598a09[_0x4db101(0xb0)]!==_0x2c8930)throw CliErrors[_0x4db101(0xd8)](_0x4db101(0xbc));const _0x259e97={'appCode':_0x595b5d[_0x4db101(0xd4)],'fromDatasetCode':_0x598a09[_0x4db101(0xa0)],'fromField':required(_0x595b5d,_0x4db101(0xe0)),..._0x2c8930!==undefined?{'fromDblinkId':_0x2c8930}:{}},_0x4e67ab={'appCode':_0x595b5d[_0x4db101(0xd4)],'fromDblinkId':_0x598a09[_0x4db101(0xb0)],'fromDatasetCode':_0x598a09[_0x4db101(0xa0)],'fromField':_0x259e97[_0x4db101(0x97)]},_0x22d780=await queryCrossDbRelations(_0x4e67ab);let _0x1b5708=null;if(_0x418ad3!==_0x4db101(0xb8)){if(_0x22d780[_0x4db101(0xb4)]>0x1)throw ambiguity(_0x22d780);_0x1b5708=_0x22d780[0x0]??null;if(!_0x1b5708)throw CliErrors['validation'](_0x4db101(0xce));}if(_0x418ad3==='delete')return{'operation':_0x418ad3,'from':_0x598a09,'query':_0x4e67ab,'body':_0x259e97,'before':_0x1b5708};const _0x24a347=await resolveEndpoint(required(_0x595b5d,_0x4db101(0xd9)));if(_0x598a09[_0x4db101(0xb0)]===_0x24a347[_0x4db101(0xb0)])throw CliErrors[_0x4db101(0xd8)](_0x4db101(0xe2));const _0x5d2432=_0x595b5d[_0x4db101(0x9d)]('to-label-column')[_0x4db101(0xcb)](),_0x111824=_0x595b5d['str']('cardinality')[_0x4db101(0xcb)](),_0x1c65f2={..._0x259e97,'toDatasetCode':_0x24a347[_0x4db101(0xa0)],'toField':required(_0x595b5d,_0x4db101(0xc5)),..._0x5d2432?{'refTableLabelName':_0x5d2432}:{},..._0x111824?{'cardinality':_0x111824}:{}};if(_0x22d780[_0x4db101(0xab)](_0x363ef6=>_0x363ef6[_0x4db101(0x9b)]!==_0x1b5708?.[_0x4db101(0x9b)]&&matchesEndpoint(_0x363ef6,_0x598a09,_0x1c65f2[_0x4db101(0x97)],_0x24a347,_0x1c65f2[_0x4db101(0xe6)])))throw CliErrors[_0x4db101(0xd8)](_0x4db101(0xdc));return{'operation':_0x418ad3,'from':_0x598a09,'to':_0x24a347,'query':_0x4e67ab,'body':_0x1c65f2,'before':_0x1b5708,'expectedLabel':_0x5d2432||_0x1b5708?.[_0x4db101(0xde)]||_0x1c65f2[_0x4db101(0xe6)],'expectedCardinality':_0x111824||_0x1b5708?.['cardinality']||null};}function mutationData(_0x32832b,_0x428fee,_0x29b584){const _0x31123a=a71_0x5dec75,{operation:_0x491cd5,body:_0x228b50,before:_0x1a1f55}=_0x32832b;return{'operation':_0x491cd5,'selector':{'appCode':_0x228b50[_0x31123a(0xd4)],'from':{'datasetCode':_0x228b50[_0x31123a(0x9a)],'field':_0x228b50['fromField'],'dblinkId':_0x32832b[_0x31123a(0xe5)][_0x31123a(0xb0)]}},'before':_0x1a1f55?projectCrossRelation(_0x1a1f55):null,'after':_0x29b584,'dryRun':_0x428fee,'backend':{'method':_0x31123a(0xa7),'path':CROSS_DB_RELATION_PATHS[_0x491cd5]},'warnings':_0x491cd5===_0x31123a(0xe4)&&!_0x228b50[_0x31123a(0xde)]?[{'code':_0x31123a(0xd0),'message':_0x31123a(0xd5)}]:[]};}export async function previewCrossRelation(_0x22ae0b,_0x310282){const _0x59d4cb=a71_0x5dec75,_0x19c9ee=await prepareCrossRelation(_0x22ae0b,_0x310282),_0x5cf42f=_0x19c9ee['body'],_0x46106c=_0x310282==='delete'?null:{..._0x19c9ee[_0x59d4cb(0xad)]?{'relationId':_0x19c9ee[_0x59d4cb(0xad)][_0x59d4cb(0x9b)]}:{},'from':{'datasetCode':_0x19c9ee[_0x59d4cb(0xe5)][_0x59d4cb(0xa0)],'dblinkId':_0x19c9ee[_0x59d4cb(0xe5)][_0x59d4cb(0xb0)],'table':_0x19c9ee['from'][_0x59d4cb(0xaa)],'field':_0x5cf42f[_0x59d4cb(0x97)]},'to':{'datasetCode':_0x19c9ee['to'][_0x59d4cb(0xa0)],'dblinkId':_0x19c9ee['to'][_0x59d4cb(0xb0)],'table':_0x19c9ee['to'][_0x59d4cb(0xaa)],'field':_0x5cf42f['toField'],'labelField':_0x19c9ee['expectedLabel']},'relation':{'cardinality':_0x19c9ee[_0x59d4cb(0xb6)],'relationType':0x2}};return{...mutationData(_0x19c9ee,!![],null),'after':_0x46106c,'method':_0x59d4cb(0xa7),'url':CROSS_DB_RELATION_PATHS[_0x310282],'body':_0x19c9ee[_0x59d4cb(0xb3)],'description':_0x59d4cb(0xbe)+_0x310282+_0x59d4cb(0xb2)+_0x5cf42f[_0x59d4cb(0x9a)]+'.'+_0x5cf42f[_0x59d4cb(0x97)]};}function a71_0x48bc(){const _0x40c065=['Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','dbId','appCode','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','isSafeInteger','enum','validation','to-datasetcode','toLowerCase','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','DB_TABLE','refTableLabelName','21955110Wemuxp','from-column','Dataset\x20','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','Cross-database\x20relation\x20','update','from','toField','fromTableName','source','unconfirmed','matched','fromField','244684xayGlo','relationType','fromDatasetCode','relationId','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','str','list','includes','datasetCode','3hmLgxc','21FQylEd','dbtable','delete','55pIdpsN','message','POST','Invalid\x20--cardinality.','from-datasetcode','table','some','689576fIWyuO','before','catch','5110124cSjDRI','dblinkId','toDblinkId','\x20a\x20cross-database\x20relation\x20for\x20','body','length','multiple\x20cross-database\x20relations\x20matched','expectedCardinality','extend','create','toTableName','data','731693HTbObm','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','3259917FXOnTS','Would\x20','cardinality','query','dbtableConfig','storageProfile','558510JWZDdc','dataset','to-column','parse','defineProperty','apiError','filter','tableName','trim','fromDblinkId','fromDatasetName','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','label_inherited','flagMissing'];a71_0x48bc=function(){return _0x40c065;};return a71_0x48bc();}export async function executeCrossRelation(_0x3cea9d,_0x58e7a8,_0x244bb1){const _0x4dfe76=a71_0x5dec75,_0x18bb46=await prepareCrossRelation(_0x3cea9d,_0x58e7a8);try{await _0x244bb1(_0x18bb46[_0x4dfe76(0xb3)]);}catch(_0x26efb9){if(_0x26efb9 instanceof CliError&&_0x26efb9[_0x4dfe76(0xa6)][_0x4dfe76(0x9f)](_0x4dfe76(0xb5))){const _0x1ffd9e=await queryCrossDbRelations(_0x18bb46['query'])[_0x4dfe76(0xae)](()=>[]);throw ambiguity(_0x1ffd9e);}throw _0x26efb9;}let _0x275c1f=[],_0x2ed05b,_0x28fe91=![];try{_0x275c1f=await queryCrossDbRelations(_0x18bb46[_0x4dfe76(0xc0)]);if(_0x58e7a8==='delete')_0x28fe91=!_0x275c1f[_0x4dfe76(0xab)](_0x3fc68f=>_0x3fc68f[_0x4dfe76(0x9b)]===_0x18bb46[_0x4dfe76(0xad)]['relationId']);else{const _0x2176c9=_0x18bb46['body'],_0x283837=_0x275c1f[_0x4dfe76(0xc9)](_0x182819=>matchesEndpoint(_0x182819,_0x18bb46[_0x4dfe76(0xe5)],_0x2176c9[_0x4dfe76(0x97)],_0x18bb46['to'],_0x2176c9[_0x4dfe76(0xe6)])&&(_0x58e7a8===_0x4dfe76(0xb8)||_0x182819[_0x4dfe76(0x9b)]===_0x18bb46['before'][_0x4dfe76(0x9b)]));_0x2ed05b=_0x283837[_0x4dfe76(0xb4)]===0x1?_0x283837[0x0]:undefined,_0x28fe91=!!_0x2ed05b&&_0x2ed05b[_0x4dfe76(0xde)]===_0x18bb46['expectedLabel']&&_0x2ed05b['cardinality']===_0x18bb46[_0x4dfe76(0xb6)]&&_0x2ed05b[_0x4dfe76(0x99)]===0x2;}}catch{}const _0x4db589={...mutationData(_0x18bb46,![],_0x2ed05b?projectCrossRelation(_0x2ed05b):null),'verification':{'status':_0x28fe91?_0x4dfe76(0x96):_0x4dfe76(0x95),'verified':_0x28fe91}};if(!_0x28fe91){const _0x25fb03=CliErrors[_0x4dfe76(0xc8)](_0x4dfe76(0xe3)+_0x58e7a8+'\x20write\x20was\x20not\x20verified.','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.');Object[_0x4dfe76(0xc7)](_0x25fb03,_0x4dfe76(0xba),{'value':{..._0x4db589,'candidates':_0x275c1f['map'](projectCrossRelation)}});throw _0x25fb03;}return{'ok':!![],'data':_0x4db589,'message':'Cross-database\x20relation\x20'+_0x58e7a8+'\x20verified.'};}
|
|
1
|
+
const a71_0x51c616=a71_0x4c69;(function(_0x457385,_0x347b9e){const _0x21d1c8=a71_0x4c69,_0x3f1c4f=_0x457385();while(!![]){try{const _0x4eea85=-parseInt(_0x21d1c8(0x175))/0x1*(-parseInt(_0x21d1c8(0x189))/0x2)+parseInt(_0x21d1c8(0x187))/0x3+-parseInt(_0x21d1c8(0x16c))/0x4+parseInt(_0x21d1c8(0x18b))/0x5*(-parseInt(_0x21d1c8(0x16a))/0x6)+-parseInt(_0x21d1c8(0x183))/0x7*(-parseInt(_0x21d1c8(0x13f))/0x8)+-parseInt(_0x21d1c8(0x14d))/0x9+parseInt(_0x21d1c8(0x132))/0xa;if(_0x4eea85===_0x347b9e)break;else _0x3f1c4f['push'](_0x3f1c4f['shift']());}catch(_0x2cee99){_0x3f1c4f['push'](_0x3f1c4f['shift']());}}}(a71_0xa410,0xcfcef));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(_0x147948,_0x4a6182){const _0x1ed7eb=a71_0x4c69,_0x298fae=_0x147948[_0x1ed7eb(0x160)](_0x4a6182)[_0x1ed7eb(0x173)]();if(!_0x298fae)throw CliErrors[_0x1ed7eb(0x177)](_0x4a6182);return _0x298fae;}function a71_0x4c69(_0x3abde8,_0x3b1b3b){_0x3abde8=_0x3abde8-0x130;const _0xa41099=a71_0xa410();let _0x4c6952=_0xa41099[_0x3abde8];return _0x4c6952;}function explicitDblink(_0x43bad7){const _0xeed2bf=a71_0x4c69,_0x39164e=_0x43bad7[_0xeed2bf(0x186)]('from-dblink-id');if(_0x39164e===undefined||_0x39164e===null)return undefined;const _0x43ef15=Number(_0x39164e);if(!Number['isSafeInteger'](_0x43ef15)||_0x43ef15<=0x0)throw CliErrors[_0xeed2bf(0x17d)](_0xeed2bf(0x165));return _0x43ef15;}export function validateCrossRelation(_0x4598df,_0x2cc546){const _0x440c81=a71_0x4c69,_0x575874=explicitDblink(_0x4598df);if(_0x2cc546===_0x440c81(0x137)){if(!_0x4598df['str']('from-datasetcode')[_0x440c81(0x173)]()&&_0x575874===undefined)throw CliErrors[_0x440c81(0x17d)](_0x440c81(0x142));return;}required(_0x4598df,'from-datasetcode'),required(_0x4598df,_0x440c81(0x163));if(_0x2cc546!==_0x440c81(0x14a)){required(_0x4598df,_0x440c81(0x161)),required(_0x4598df,'to-column');const _0x16a0aa=_0x4598df[_0x440c81(0x160)](_0x440c81(0x167))[_0x440c81(0x173)]();if(_0x16a0aa&&!CROSS_RELATION_CARDINALITY_FLAG[_0x440c81(0x169)][_0x440c81(0x155)](_0x16a0aa))throw CliErrors[_0x440c81(0x17d)](_0x440c81(0x140));}}async function resolveEndpoint(_0x3dc4ae){const _0x4999d3=a71_0x4c69,_0x86834d=await getDatasetDetail(_0x3dc4ae),_0x5811bd=_0x86834d?.[_0x4999d3(0x184)]??{};if((_0x86834d?.[_0x4999d3(0x131)]??_0x5811bd[_0x4999d3(0x145)])!=='DB_TABLE')throw CliErrors[_0x4999d3(0x17d)](_0x4999d3(0x176)+_0x3dc4ae+_0x4999d3(0x162));const _0x25002c=_0x86834d[_0x4999d3(0x157)]??_0x86834d[_0x4999d3(0x134)]??{};let _0xf2b5a1=_0x86834d[_0x4999d3(0x16d)]??_0x5811bd[_0x4999d3(0x16d)]??{};if(typeof _0xf2b5a1===_0x4999d3(0x172))try{_0xf2b5a1=_0xf2b5a1[_0x4999d3(0x173)]()?JSON[_0x4999d3(0x152)](_0xf2b5a1):{};}catch{throw CliErrors[_0x4999d3(0x17d)](_0x4999d3(0x176)+_0x3dc4ae+_0x4999d3(0x146));}const _0x26215c=Number(_0xf2b5a1?.[_0x4999d3(0x15d)]?.[_0x4999d3(0x154)]??_0x86834d[_0x4999d3(0x15d)]?.[_0x4999d3(0x154)]??_0x5811bd[_0x4999d3(0x15d)]?.['dbId']??_0x25002c['dbId']??_0x5811bd['dbId']??_0x86834d['dbId']),_0x469e9f=String(_0x86834d[_0x4999d3(0x14c)]??_0x5811bd[_0x4999d3(0x14c)]??_0x25002c[_0x4999d3(0x14c)]??'')[_0x4999d3(0x173)]();if(!Number[_0x4999d3(0x135)](_0x26215c)||_0x26215c<=0x0||!_0x469e9f)throw CliErrors[_0x4999d3(0x17d)](_0x4999d3(0x176)+_0x3dc4ae+_0x4999d3(0x171));return{'datasetCode':_0x3dc4ae,'dblinkId':_0x26215c,'table':_0x469e9f};}export async function resolveCrossRelationQuery(_0x1cbc6d){const _0x1e520b=a71_0x4c69,_0x343cc3=_0x1cbc6d['str'](_0x1e520b(0x147))[_0x1e520b(0x173)](),_0xe623c2=explicitDblink(_0x1cbc6d),_0x1c4ebb=_0x343cc3?await resolveEndpoint(_0x343cc3):undefined;if(_0x1c4ebb&&_0xe623c2!==undefined&&_0x1c4ebb[_0x1e520b(0x141)]!==_0xe623c2)throw CliErrors['validation'](_0x1e520b(0x15c));const _0x3518c1=_0x1c4ebb?.[_0x1e520b(0x141)]??_0xe623c2;if(_0x3518c1===undefined)throw CliErrors[_0x1e520b(0x17d)](_0x1e520b(0x142));return{'appCode':_0x1cbc6d[_0x1e520b(0x181)],'fromDblinkId':_0x3518c1,..._0x343cc3?{'fromDatasetCode':_0x343cc3}:{},..._0x1cbc6d[_0x1e520b(0x160)]('from-column')[_0x1e520b(0x173)]()?{'fromField':_0x1cbc6d[_0x1e520b(0x160)]('from-column')[_0x1e520b(0x173)]()}:{}};}export function projectCrossRelation(_0x260dbb){const _0x517278=a71_0x4c69;return{'relationId':_0x260dbb[_0x517278(0x159)],'from':{'source':_0x517278(0x179),'datasetCode':_0x260dbb['fromDatasetCode'],'datasetName':_0x260dbb['fromDatasetName'],'dblinkId':_0x260dbb['fromDblinkId'],'table':_0x260dbb[_0x517278(0x151)],'field':_0x260dbb[_0x517278(0x144)]},'to':{'source':'DB_TABLE','datasetCode':_0x260dbb[_0x517278(0x130)],'datasetName':_0x260dbb[_0x517278(0x16f)],'dblinkId':_0x260dbb[_0x517278(0x13d)],'table':_0x260dbb[_0x517278(0x182)],'field':_0x260dbb['toField'],'labelField':_0x260dbb[_0x517278(0x185)]},'relation':{'cardinality':_0x260dbb[_0x517278(0x167)],'relationType':_0x260dbb['relationType']}};}function ambiguity(_0x2682d2){const _0x501001=a71_0x4c69,_0x5c0f17=CliErrors['validation']('Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.',_0x501001(0x13b));return Object[_0x501001(0x16b)](_0x5c0f17,_0x501001(0x15b),{'value':{'candidates':_0x2682d2[_0x501001(0x16e)](projectCrossRelation)}}),_0x5c0f17;}const sameName=(_0x2cfbce,_0x4ea86a)=>_0x2cfbce[a71_0x51c616(0x15a)]()===_0x4ea86a[a71_0x51c616(0x15a)]();function matchesEndpoint(_0xa96c22,_0xb11e56,_0x443146,_0x5d34f7,_0x475926){const _0x1ef794=a71_0x51c616;return _0xa96c22[_0x1ef794(0x138)]===_0xb11e56[_0x1ef794(0x141)]&&sameName(_0xa96c22['fromTableName'],_0xb11e56[_0x1ef794(0x17b)])&&sameName(_0xa96c22[_0x1ef794(0x144)],_0x443146)&&_0xa96c22[_0x1ef794(0x13d)]===_0x5d34f7[_0x1ef794(0x141)]&&sameName(_0xa96c22[_0x1ef794(0x182)],_0x5d34f7[_0x1ef794(0x17b)])&&sameName(_0xa96c22[_0x1ef794(0x17e)],_0x475926);}export async function prepareCrossRelation(_0x1de0d2,_0x2d6189){const _0x2a044c=a71_0x51c616,_0x47aeab=await resolveEndpoint(required(_0x1de0d2,'from-datasetcode')),_0x19f696=explicitDblink(_0x1de0d2);if(_0x19f696!==undefined&&_0x47aeab[_0x2a044c(0x141)]!==_0x19f696)throw CliErrors[_0x2a044c(0x17d)](_0x2a044c(0x15c));const _0xa53191={'appCode':_0x1de0d2[_0x2a044c(0x181)],'fromDatasetCode':_0x47aeab[_0x2a044c(0x13a)],'fromField':required(_0x1de0d2,_0x2a044c(0x163)),..._0x19f696!==undefined?{'fromDblinkId':_0x19f696}:{}},_0x3b1cd3={'appCode':_0x1de0d2[_0x2a044c(0x181)],'fromDblinkId':_0x47aeab[_0x2a044c(0x141)],'fromDatasetCode':_0x47aeab[_0x2a044c(0x13a)],'fromField':_0xa53191[_0x2a044c(0x144)]},_0x135d4c=await queryCrossDbRelations(_0x3b1cd3);let _0x2c3548=null;if(_0x2d6189!=='create'){if(_0x135d4c[_0x2a044c(0x15f)]>0x1)throw ambiguity(_0x135d4c);_0x2c3548=_0x135d4c[0x0]??null;if(!_0x2c3548)throw CliErrors[_0x2a044c(0x17d)](_0x2a044c(0x178));}if(_0x2d6189===_0x2a044c(0x14a))return{'operation':_0x2d6189,'from':_0x47aeab,'query':_0x3b1cd3,'body':_0xa53191,'before':_0x2c3548};const _0x3b2f12=await resolveEndpoint(required(_0x1de0d2,'to-datasetcode'));if(_0x47aeab['dblinkId']===_0x3b2f12[_0x2a044c(0x141)])throw CliErrors['validation'](_0x2a044c(0x188));const _0x58b171=_0x1de0d2['str'](_0x2a044c(0x143))['trim'](),_0x2173a9=_0x1de0d2[_0x2a044c(0x160)]('cardinality')[_0x2a044c(0x173)](),_0x49ffda={..._0xa53191,'toDatasetCode':_0x3b2f12[_0x2a044c(0x13a)],'toField':required(_0x1de0d2,_0x2a044c(0x156)),..._0x58b171?{'refTableLabelName':_0x58b171}:{},..._0x2173a9?{'cardinality':_0x2173a9}:{}};if(_0x135d4c[_0x2a044c(0x158)](_0xef2c3a=>_0xef2c3a[_0x2a044c(0x159)]!==_0x2c3548?.['relationId']&&matchesEndpoint(_0xef2c3a,_0x47aeab,_0x49ffda[_0x2a044c(0x144)],_0x3b2f12,_0x49ffda['toField'])))throw CliErrors[_0x2a044c(0x17d)]('Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.');return{'operation':_0x2d6189,'from':_0x47aeab,'to':_0x3b2f12,'query':_0x3b1cd3,'body':_0x49ffda,'before':_0x2c3548,'expectedLabel':_0x58b171||_0x2c3548?.[_0x2a044c(0x185)]||_0x49ffda[_0x2a044c(0x17e)],'expectedCardinality':_0x2173a9||_0x2c3548?.[_0x2a044c(0x167)]||null};}function mutationData(_0x17a107,_0x59918b,_0xb3088e){const _0x5a3fa8=a71_0x51c616,{operation:_0x2b5109,body:_0x396b13,before:_0x16de82}=_0x17a107;return{'operation':_0x2b5109,'selector':{'appCode':_0x396b13[_0x5a3fa8(0x181)],'from':{'datasetCode':_0x396b13['fromDatasetCode'],'field':_0x396b13[_0x5a3fa8(0x144)],'dblinkId':_0x17a107[_0x5a3fa8(0x18d)][_0x5a3fa8(0x141)]}},'before':_0x16de82?projectCrossRelation(_0x16de82):null,'after':_0xb3088e,'dryRun':_0x59918b,'backend':{'method':_0x5a3fa8(0x149),'path':CROSS_DB_RELATION_PATHS[_0x2b5109]},'warnings':_0x2b5109===_0x5a3fa8(0x17f)&&!_0x396b13['refTableLabelName']?[{'code':_0x5a3fa8(0x13c),'message':_0x5a3fa8(0x133)}]:[]};}export async function previewCrossRelation(_0x1f8482,_0x5d64cf){const _0x32acb7=a71_0x51c616,_0x7b39ed=await prepareCrossRelation(_0x1f8482,_0x5d64cf),_0x448d96=_0x7b39ed[_0x32acb7(0x18a)],_0x39fdea=_0x5d64cf===_0x32acb7(0x14a)?null:{..._0x7b39ed[_0x32acb7(0x164)]?{'relationId':_0x7b39ed['before'][_0x32acb7(0x159)]}:{},'from':{'datasetCode':_0x7b39ed[_0x32acb7(0x18d)]['datasetCode'],'dblinkId':_0x7b39ed[_0x32acb7(0x18d)][_0x32acb7(0x141)],'table':_0x7b39ed[_0x32acb7(0x18d)][_0x32acb7(0x17b)],'field':_0x448d96[_0x32acb7(0x144)]},'to':{'datasetCode':_0x7b39ed['to']['datasetCode'],'dblinkId':_0x7b39ed['to']['dblinkId'],'table':_0x7b39ed['to']['table'],'field':_0x448d96['toField'],'labelField':_0x7b39ed['expectedLabel']},'relation':{'cardinality':_0x7b39ed[_0x32acb7(0x174)],'relationType':0x2}};return{...mutationData(_0x7b39ed,!![],null),'after':_0x39fdea,'method':'POST','url':CROSS_DB_RELATION_PATHS[_0x5d64cf],'body':_0x7b39ed['body'],'description':_0x32acb7(0x168)+_0x5d64cf+_0x32acb7(0x17a)+_0x448d96[_0x32acb7(0x18c)]+'.'+_0x448d96[_0x32acb7(0x144)]};}export async function executeCrossRelation(_0x494580,_0x3f1ba1,_0x4adb68){const _0xfbd9ad=a71_0x51c616,_0x59d0e7=await prepareCrossRelation(_0x494580,_0x3f1ba1);try{await _0x4adb68(_0x59d0e7[_0xfbd9ad(0x18a)]);}catch(_0x4b332a){if(_0x4b332a instanceof CliError&&_0x4b332a[_0xfbd9ad(0x139)]['includes'](_0xfbd9ad(0x170))){const _0x3c15b8=await queryCrossDbRelations(_0x59d0e7[_0xfbd9ad(0x13e)])['catch'](()=>[]);throw ambiguity(_0x3c15b8);}throw _0x4b332a;}let _0x15520d=[],_0x41af17,_0x4e3f6f=![];try{_0x15520d=await queryCrossDbRelations(_0x59d0e7[_0xfbd9ad(0x13e)]);if(_0x3f1ba1===_0xfbd9ad(0x14a))_0x4e3f6f=!_0x15520d[_0xfbd9ad(0x158)](_0x2214cf=>_0x2214cf[_0xfbd9ad(0x159)]===_0x59d0e7[_0xfbd9ad(0x164)]['relationId']);else{const _0x21e28f=_0x59d0e7[_0xfbd9ad(0x18a)],_0x59ab1f=_0x15520d[_0xfbd9ad(0x180)](_0x2cba58=>matchesEndpoint(_0x2cba58,_0x59d0e7[_0xfbd9ad(0x18d)],_0x21e28f['fromField'],_0x59d0e7['to'],_0x21e28f[_0xfbd9ad(0x17e)])&&(_0x3f1ba1===_0xfbd9ad(0x15e)||_0x2cba58[_0xfbd9ad(0x159)]===_0x59d0e7['before']['relationId']));_0x41af17=_0x59ab1f[_0xfbd9ad(0x15f)]===0x1?_0x59ab1f[0x0]:undefined,_0x4e3f6f=!!_0x41af17&&_0x41af17[_0xfbd9ad(0x185)]===_0x59d0e7[_0xfbd9ad(0x14e)]&&_0x41af17['cardinality']===_0x59d0e7[_0xfbd9ad(0x174)]&&_0x41af17[_0xfbd9ad(0x148)]===0x2;}}catch{}const _0x5edc00={...mutationData(_0x59d0e7,![],_0x41af17?projectCrossRelation(_0x41af17):null),'verification':{'status':_0x4e3f6f?_0xfbd9ad(0x17c):_0xfbd9ad(0x150),'verified':_0x4e3f6f}};if(!_0x4e3f6f){const _0x19f5fd=CliErrors[_0xfbd9ad(0x14f)](_0xfbd9ad(0x153)+_0x3f1ba1+_0xfbd9ad(0x14b),_0xfbd9ad(0x136));Object[_0xfbd9ad(0x16b)](_0x19f5fd,_0xfbd9ad(0x15b),{'value':{..._0x5edc00,'candidates':_0x15520d[_0xfbd9ad(0x16e)](projectCrossRelation)}});throw _0x19f5fd;}return{'ok':!![],'data':_0x5edc00,'message':'Cross-database\x20relation\x20'+_0x3f1ba1+_0xfbd9ad(0x166)};}function a71_0xa410(){const _0x12bd27=['7296138QtOPjT','expectedLabel','apiError','unconfirmed','fromTableName','parse','Cross-database\x20relation\x20','dbId','includes','to-column','dbtableConfig','some','relationId','toLowerCase','data','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','storageProfile','create','length','str','to-datasetcode','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','from-column','before','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20verified.','cardinality','Would\x20','enum','7162026goLeJr','defineProperty','5621980wjRhEH','extend','map','toDatasetName','multiple\x20cross-database\x20relations\x20matched','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','string','trim','expectedCardinality','16593FPOKkl','Dataset\x20','flagMissing','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','DB_TABLE','\x20a\x20cross-database\x20relation\x20for\x20','table','matched','validation','toField','update','filter','appCode','toTableName','161fVJXWo','dataset','refTableLabelName','flag','1416015zZbwTf','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','38gXtgMe','body','5NBUHTX','fromDatasetCode','from','toDatasetCode','source','18229800gBfEXw','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','dbtable','isSafeInteger','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','list','fromDblinkId','message','datasetCode','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','label_inherited','toDblinkId','query','574184rVWCpp','Invalid\x20--cardinality.','dblinkId','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','to-label-column','fromField','sourceType','\x20has\x20invalid\x20storage\x20configuration.','from-datasetcode','relationType','POST','delete','\x20write\x20was\x20not\x20verified.','tableName'];a71_0xa410=function(){return _0x12bd27;};return a71_0xa410();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x280ef4=a72_0x3c46;(function(_0x1bf068,_0x2742f8){const _0x15fc1d=a72_0x3c46,_0x4cfd9d=_0x1bf068();while(!![]){try{const _0x2920c2=parseInt(_0x15fc1d(0xd1))/0x1+-parseInt(_0x15fc1d(0xd2))/0x2*(parseInt(_0x15fc1d(0xde))/0x3)+parseInt(_0x15fc1d(0xd6))/0x4+parseInt(_0x15fc1d(0xd5))/0x5*(parseInt(_0x15fc1d(0xce))/0x6)+parseInt(_0x15fc1d(0xdb))/0x7*(parseInt(_0x15fc1d(0xd8))/0x8)+parseInt(_0x15fc1d(0xd0))/0x9*(-parseInt(_0x15fc1d(0xdc))/0xa)+parseInt(_0x15fc1d(0xd3))/0xb*(-parseInt(_0x15fc1d(0xda))/0xc);if(_0x2920c2===_0x2742f8)break;else _0x4cfd9d['push'](_0x4cfd9d['shift']());}catch(_0x112f57){_0x4cfd9d['push'](_0x4cfd9d['shift']());}}}(a72_0x5487,0x33e7e));import{updateCrossDbRelation}from'../../core/api-client.js';function a72_0x5487(){const _0x4ade1b=['dataset','84NYGyha','573162ukkdGu','write','18CcDgTC','222996EaCaKy','19624xwwbky','22TqKEZJ','update','10Cnpceb','1599840JXVLmW','Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','752TScGIP','cross-relation-update','3802920QflnXv','30387mzkYhn','504510JMiASS'];a72_0x5487=function(){return _0x4ade1b;};return a72_0x5487();}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';function a72_0x3c46(_0x518507,_0x34b2e9){_0x518507=_0x518507-0xce;const _0x548768=a72_0x5487();let _0x3c46c6=_0x548768[_0x518507];return _0x3c46c6;}import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationUpdate={'service':a72_0x280ef4(0xdd),'command':a72_0x280ef4(0xd9),'description':a72_0x280ef4(0xd7),'risk':a72_0x280ef4(0xcf),'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 _0x2754aa=>validateCrossRelation(_0x2754aa,a72_0x280ef4(0xd4)),'dryRun':_0x5ab2cf=>previewCrossRelation(_0x5ab2cf,a72_0x280ef4(0xd4)),'execute':_0x374c69=>executeCrossRelation(_0x374c69,'update',updateCrossDbRelation)};
|