@lovrabet/rabetbase-cli 2.5.4 → 2.5.5-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/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +39 -0
- package/skills/rabetbase-page-generation/references/component-baseline.md +18 -0
- package/skills/rabetbase-page-generation/references/generation.md +126 -0
- package/skills/rabetbase-page-generation/templates/onepage/build.mjs +48 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/index.jsx +4 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/index.jsx +194 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +721 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/editor.jsx +395 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/model.js +141 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/page.css +377 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/record-layout.jsx +90 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/responsive.jsx +70 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/README.md +21 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/index.jsx +4 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/preview.png +0 -0
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a59_0x2e83(_0x1cff53,_0x5147e2){_0x1cff53=_0x1cff53-0x88;const _0x5f7693=a59_0x5f76();let _0x2e8387=_0x5f7693[_0x1cff53];return _0x2e8387;}const a59_0x1b9c90=a59_0x2e83;(function(_0x29b83c,_0x6eced8){const _0x19ccf1=a59_0x2e83,_0x208e9b=_0x29b83c();while(!![]){try{const _0x59d5c5=parseInt(_0x19ccf1(0x9f))/0x1*(-parseInt(_0x19ccf1(0x93))/0x2)+parseInt(_0x19ccf1(0x90))/0x3+-parseInt(_0x19ccf1(0x8f))/0x4+parseInt(_0x19ccf1(0x89))/0x5+parseInt(_0x19ccf1(0x94))/0x6+-parseInt(_0x19ccf1(0x95))/0x7*(parseInt(_0x19ccf1(0x96))/0x8)+parseInt(_0x19ccf1(0x91))/0x9*(parseInt(_0x19ccf1(0x98))/0xa);if(_0x59d5c5===_0x6eced8)break;else _0x208e9b['push'](_0x208e9b['shift']());}catch(_0x194cd1){_0x208e9b['push'](_0x208e9b['shift']());}}}(a59_0x5f76,0x3f39f));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a59_0x5f76(){const _0x42a777=['1423667DDawLS','16TleGwt','validation','3739440gEKsBv','key','appcode','config','get','string','object','53397vrXfUb','\x20config\x20get\x20--key\x20<key>','1884395hJhNWH','Get\x20a\x20config\x20value\x20by\x20key','Missing\x20key.','Key\x20not\x20found:\x20','str','read','1285348UiBwxT','35073boqNXu','18WwBmgs','Usage:\x20','12YpMCGi','1025988VLKPJu'];a59_0x5f76=function(){return _0x42a777;};return a59_0x5f76();}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x55e6c7){const _0x2f93d4=a59_0x2e83,_0x375c4d=_0x55e6c7[_0x2f93d4(0x8d)](_0x2f93d4(0x99));if(!_0x375c4d)throw CliErrors[_0x2f93d4(0x97)](_0x2f93d4(0x8b),_0x2f93d4(0x92)+CLI_BIN_NAME+_0x2f93d4(0x88));const _0x5bf4b5=readConfig(),_0x2de04d=_0x375c4d==='app'?_0x2f93d4(0x9a):_0x375c4d,_0xac7537=_0x5bf4b5[_0x2de04d];if(_0xac7537===undefined)throw CliErrors[_0x2f93d4(0x97)](_0x2f93d4(0x8c)+_0x375c4d);return{'ok':!![],'data':typeof _0xac7537===_0x2f93d4(0x9e)?_0xac7537:{[_0x2de04d]:_0xac7537},'message':typeof _0xac7537===_0x2f93d4(0x9e)?undefined:String(_0xac7537)};}export const configGetDefinition={'service':a59_0x1b9c90(0x9b),'command':a59_0x1b9c90(0x9c),'description':a59_0x1b9c90(0x8a),'risk':a59_0x1b9c90(0x8e),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a59_0x1b9c90(0x99),'type':a59_0x1b9c90(0x9d),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41a841,_0x3e37f0){const _0x52e7d1=a60_0x542f,_0x3acffa=_0x41a841();while(!![]){try{const _0x2ea3ce=-parseInt(_0x52e7d1(0x164))/0x1+parseInt(_0x52e7d1(0x163))/0x2+parseInt(_0x52e7d1(0x161))/0x3*(parseInt(_0x52e7d1(0x162))/0x4)+-parseInt(_0x52e7d1(0x15e))/0x5*(-parseInt(_0x52e7d1(0x166))/0x6)+-parseInt(_0x52e7d1(0x15d))/0x7+-parseInt(_0x52e7d1(0x160))/0x8+parseInt(_0x52e7d1(0x165))/0x9*(parseInt(_0x52e7d1(0x15f))/0xa);if(_0x2ea3ce===_0x3e37f0)break;else _0x3acffa['push'](_0x3acffa['shift']());}catch(_0x52a313){_0x3acffa['push'](_0x3acffa['shift']());}}}(a60_0xf9c9,0x8d5d4));import{configListDefinition}from'../../commands/config/list.js';function a60_0x542f(_0x379abf,_0x199870){_0x379abf=_0x379abf-0x15d;const _0xf9c95=a60_0xf9c9();let _0x542fc8=_0xf9c95[_0x379abf];return _0x542fc8;}import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';function a60_0xf9c9(){const _0x5b9dae=['6424668PbnRNE','2055718EXjujm','5MOXabm','320kbwJBR','2399328uNtdWM','130701HUpsjh','24zWqQTj','1220366cRpwCs','1123249ARsdWL','99423StqoDe'];a60_0xf9c9=function(){return _0x5b9dae;};return a60_0xf9c9();}export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a61_0x478711=a61_0x5791;(function(_0x52895c,_0x3c5d01){const _0x125113=a61_0x5791,_0x342325=_0x52895c();while(!![]){try{const _0x101d6e=-parseInt(_0x125113(0x120))/0x1*(parseInt(_0x125113(0x125))/0x2)+-parseInt(_0x125113(0x138))/0x3*(-parseInt(_0x125113(0x11b))/0x4)+-parseInt(_0x125113(0x130))/0x5*(-parseInt(_0x125113(0x108))/0x6)+parseInt(_0x125113(0x13a))/0x7+parseInt(_0x125113(0x129))/0x8*(parseInt(_0x125113(0x116))/0x9)+parseInt(_0x125113(0x100))/0xa+-parseInt(_0x125113(0x137))/0xb;if(_0x101d6e===_0x3c5d01)break;else _0x342325['push'](_0x342325['shift']());}catch(_0x2999d8){_0x342325['push'](_0x342325['shift']());}}}(a61_0x2819,0xc2b5f));import{select}from'@inquirer/prompts';function a61_0x2819(){const _0x5cf46f=['str','enterprise-v1','certificateDomain','map','5SCEWdR','length','Custom\x20KB\x20Service\x20HTTPS\x20origin','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','mode','label','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','31241001aSCoYr','3cMJUnx','Custom\x20User\x20HTTPS\x20origin','10249855tjFrnQ','7184600nnAoJr','runtime-domain','user-domain','manifestDomains','string','Custom\x20SkillHub\x20HTTPS\x20origin','global','local-domain','4495422NFgkSv','independent','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','region','Custom\x20Runtime\x20HTTPS\x20origin','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','Available\x20regions:\x20','project','kb-domain','Select\x20Lovrabet\x20region','validation','nonInteractive','Custom\x20knowledge-base\x20HTTPS\x20origin','official','2222901wMQUks','cdn','domains','routing','bool','2920028VMQGNr','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','\x22\x20is\x20not\x20currently\x20available.','keys','config','145PZtfsQ','api-domain','skill-domain','localDomain','assign','10556bfQXMG','Custom\x20platform\x20API\x20HTTPS\x20origin','name','write','24NLNHrk','ExitPromptError','join'];a61_0x2819=function(){return _0x5cf46f;};return a61_0x2819();}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';function a61_0x5791(_0x52b057,_0x28f384){_0x52b057=_0x52b057-0x100;const _0x2819e3=a61_0x2819();let _0x57911f=_0x2819e3[_0x52b057];return _0x57911f;}import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a61_0x478711(0x10b),'type':'string','description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'domain-config','type':'string','description':'Independent-deployment\x20Domain\x20JSON\x20file'},{'name':a61_0x478711(0x102),'type':a61_0x478711(0x104),'description':a61_0x478711(0x139)},{'name':a61_0x478711(0x121),'type':a61_0x478711(0x104),'description':a61_0x478711(0x126)},{'name':a61_0x478711(0x101),'type':a61_0x478711(0x104),'description':a61_0x478711(0x10c)},{'name':a61_0x478711(0x122),'type':a61_0x478711(0x104),'description':a61_0x478711(0x105)},{'name':a61_0x478711(0x110),'type':'string','description':a61_0x478711(0x114)},{'name':'kb-service-domain','type':'string','description':a61_0x478711(0x132)},{'name':'app-domain','type':'string','description':a61_0x478711(0x10d)},{'name':a61_0x478711(0x107),'type':a61_0x478711(0x104),'description':'Custom\x20local\x20callback\x20HTTPS\x20origin'},{'name':'certificate-domain','type':a61_0x478711(0x104),'description':'Custom\x20certificate\x20service\x20HTTPS\x20origin'}];async function resolveRegion(_0xe5f242){const _0x3c9ee9=a61_0x478711,_0x281db1=_0xe5f242[_0x3c9ee9(0x12c)](_0x3c9ee9(0x10b));if(_0x281db1){if(!isEnabledLovrabetRegion(_0x281db1))throw CliErrors[_0x3c9ee9(0x112)]('Region\x20\x22'+_0x281db1+_0x3c9ee9(0x11d),_0x3c9ee9(0x10e)+ENABLED_LOVRABET_REGION_VALUES[_0x3c9ee9(0x12b)](',\x20'));return _0x281db1;}if(_0xe5f242[_0x3c9ee9(0x113)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x3c9ee9(0x111),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x3c9ee9(0x12f)](_0x5c3a6a=>({'name':getOfficialRoutingProfile(_0x5c3a6a)[_0x3c9ee9(0x135)]+'\x20('+_0x5c3a6a+')','value':_0x5c3a6a}))});}catch(_0x1ffdd0){if(_0x1ffdd0?.[_0x3c9ee9(0x127)]===_0x3c9ee9(0x12a))throw CliErrors['cancelled']();throw _0x1ffdd0;}}export async function executeConfigInit(_0x5477d6){const _0x411097=a61_0x478711,_0x5a4695=resolveDomainConfigInput(_0x5477d6),_0x44e47a=_0x5a4695[_0x411097(0x118)],_0x50669f=Object[_0x411097(0x11e)](_0x44e47a)[_0x411097(0x131)]>0x0;if(_0x50669f&&_0x5477d6['str'](_0x411097(0x10b)))throw CliErrors['validation'](_0x411097(0x10a));if(!!_0x44e47a[_0x411097(0x123)]!==!!_0x44e47a[_0x411097(0x12e)])throw CliErrors[_0x411097(0x112)]('Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.');const _0x4126b4=_0x5477d6[_0x411097(0x11a)](_0x411097(0x106))?_0x411097(0x106):_0x411097(0x10f),_0x54b9d1=readScopedConfig(_0x4126b4);for(const _0x4b451b of DOMAIN_CONFIG_FIELDS)delete _0x54b9d1[_0x4b451b];for(const _0x44dd65 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x54b9d1[_0x44dd65];delete _0x54b9d1[_0x411097(0x119)];let _0x3017e1=null;if(_0x50669f)delete _0x54b9d1[_0x411097(0x10b)],_0x5a4695[_0x411097(0x134)]===_0x411097(0x12d)?_0x54b9d1[_0x411097(0x119)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x5a4695[_0x411097(0x103)],'cdn':_0x5a4695[_0x411097(0x117)]}:Object[_0x411097(0x124)](_0x54b9d1,_0x44e47a);else{_0x3017e1=await resolveRegion(_0x5477d6);if(_0x3017e1===DEFAULT_LOVRABET_REGION)delete _0x54b9d1['region'];else _0x54b9d1[_0x411097(0x10b)]=_0x3017e1;}return writeScopedConfig(_0x54b9d1,_0x4126b4),{'ok':!![],'message':_0x50669f?_0x411097(0x133)+Object['keys'](_0x5a4695[_0x411097(0x134)]===_0x411097(0x12d)?_0x5a4695[_0x411097(0x103)]:_0x44e47a)[_0x411097(0x12b)](',\x20')+'.':'Rabetbase\x20connection\x20configured\x20for\x20region:\x20'+_0x3017e1+'.','data':{'mode':_0x50669f?_0x411097(0x109):_0x411097(0x115),'protocol':_0x5a4695[_0x411097(0x134)]===_0x411097(0x12d)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x3017e1,'domains':_0x44e47a,'cdn':_0x5a4695[_0x411097(0x134)]===_0x411097(0x12d)?_0x5a4695[_0x411097(0x117)]:undefined}};}export const configInitDefinition={'service':a61_0x478711(0x11f),'command':'init','description':a61_0x478711(0x11c),'risk':a61_0x478711(0x128),'confirmationDescription':a61_0x478711(0x136),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x4fba58=a62_0x5476;function a62_0x5476(_0x452e22,_0x207ab7){_0x452e22=_0x452e22-0x1da;const _0x590cad=a62_0x590c();let _0x547652=_0x590cad[_0x452e22];return _0x547652;}(function(_0x31c93f,_0x3ecd44){const _0x456959=a62_0x5476,_0x5ab6af=_0x31c93f();while(!![]){try{const _0xac2b7e=parseInt(_0x456959(0x1db))/0x1+parseInt(_0x456959(0x1e4))/0x2+-parseInt(_0x456959(0x1e8))/0x3+-parseInt(_0x456959(0x1e2))/0x4*(-parseInt(_0x456959(0x1dc))/0x5)+parseInt(_0x456959(0x1e5))/0x6*(-parseInt(_0x456959(0x1e6))/0x7)+parseInt(_0x456959(0x1e3))/0x8+-parseInt(_0x456959(0x1e1))/0x9;if(_0xac2b7e===_0x3ecd44)break;else _0x5ab6af['push'](_0x5ab6af['shift']());}catch(_0x1f9ca9){_0x5ab6af['push'](_0x5ab6af['shift']());}}}(a62_0x590c,0x19245));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x371bbc){const _0xcab6cf=a62_0x5476,_0x536e1=_0x371bbc[_0xcab6cf(0x1e7)](_0xcab6cf(0x1da))?readScopedConfig(_0xcab6cf(0x1da)):readConfig();return{'ok':!![],'data':_0x536e1};}function a62_0x590c(){const _0x381633=['543688WsiRNK','249032iPPYlv','90462AIcBjE','18smXtex','461979SYPXAN','bool','43527MTEOCO','global','147489DUVMvs','5XxtLdy','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','list','read','boolean','398610jcXXSF'];a62_0x590c=function(){return _0x381633;};return a62_0x590c();}export const configListDefinition={'service':'config','command':a62_0x4fba58(0x1de),'description':'List\x20all\x20config\x20values','risk':a62_0x4fba58(0x1df),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x4fba58(0x1da),'type':a62_0x4fba58(0x1e0),'description':a62_0x4fba58(0x1dd),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x4f2449=a63_0xcec1;function a63_0x4cf8(){const _0x4b03ed=['riskLevel','write','Missing\x20value.','Config\x20value','key','Settable\x20top-level\x20keys:\x20','locale','12mKPJcN','2fRuzfW','`,\x20`','string','keys','global','env','640016EUqDMo','1650410epCzIf','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Use\x20`','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','app','Project','Invalid\x20value\x20for\x20\x22','Invalid\x20locale\x20value.','object','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','length','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','108pTVeEj','455664dFZAGN','config','261930QfHpPJ','Usage:\x20','join','includes','apps','str','validation','appcode','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20workspace\x20add\x20<name>\x20--appcode\x20','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','\x20appcode\x20set\x20to:\x20','value','bool','Global','2544059NkCvll','\x22\x20is\x20not\x20settable.','228770BnvdtU','Top-level\x20key\x20\x22','\x20set\x20to:\x20','set','9042wgzgJF'];a63_0x4cf8=function(){return _0x4b03ed;};return a63_0x4cf8();}(function(_0x9c1af,_0x43926c){const _0x4c60f9=a63_0xcec1,_0x45d78f=_0x9c1af();while(!![]){try{const _0x5d434d=parseInt(_0x4c60f9(0x100))/0x1*(-parseInt(_0x4c60f9(0xe2))/0x2)+parseInt(_0x4c60f9(0xf7))/0x3*(-parseInt(_0x4c60f9(0xff))/0x4)+-parseInt(_0x4c60f9(0x107))/0x5+parseInt(_0x4c60f9(0xe0))/0x6+parseInt(_0x4c60f9(0xf1))/0x7+parseInt(_0x4c60f9(0x106))/0x8+-parseInt(_0x4c60f9(0xdf))/0x9*(-parseInt(_0x4c60f9(0xf3))/0xa);if(_0x5d434d===_0x43926c)break;else _0x45d78f['push'](_0x45d78f['shift']());}catch(_0x177958){_0x45d78f['push'](_0x45d78f['shift']());}}}(a63_0x4cf8,0x2f155));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a63_0xcec1(_0x3ee588,_0x3615eb){_0x3ee588=_0x3ee588-0xd3;const _0x4cf8fc=a63_0x4cf8();let _0xcec11a=_0x4cf8fc[_0x3ee588];return _0xcec11a;}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(_0x3a0440){const _0x17944e=a63_0xcec1,_0x42ba34=_0x3a0440[_0x17944e(0xe7)](_0x17944e(0xfc)),_0x5141d8=_0x3a0440[_0x17944e(0xe7)]('value');if(!_0x42ba34)throw CliErrors[_0x17944e(0xe8)]('Missing\x20key.','Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x5141d8===undefined||_0x5141d8==='')throw CliErrors['validation'](_0x17944e(0xfa),_0x17944e(0xe3)+CLI_BIN_NAME+_0x17944e(0xd5));let _0xa6714d=_0x42ba34,_0x5e0232=_0x5141d8;if(_0x5141d8[_0x17944e(0xdd)]>0x1f4)throw CliErrors['validation'](_0x17944e(0xd3));if(_0x42ba34===_0x17944e(0xf8))throw CliErrors[_0x17944e(0xe8)](_0x17944e(0xea));if(!isTopLevelConfigKey(_0x42ba34))throw CliErrors['validation'](_0x17944e(0xf4)+_0x42ba34+_0x17944e(0xf2),_0x17944e(0xfd)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x42ba34]&&!CONFIG_ENUM_VALUES[_0x42ba34][_0x17944e(0xe5)](_0x5141d8))throw CliErrors[_0x17944e(0xe8)](_0x17944e(0xd8)+_0x42ba34+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x42ba34][_0x17944e(0xe4)](',\x20'));if(_0x42ba34==='locale'&&!normalizeLocale(_0x5141d8))throw CliErrors[_0x17944e(0xe8)](_0x17944e(0xd9),_0x17944e(0x108));DOMAIN_CONFIG_FIELDS[_0x17944e(0xe5)](_0x42ba34)&&(_0x5e0232=normalizeDomainOrigin(_0x42ba34,_0x5141d8));const _0x344956={'global':_0x3a0440[_0x17944e(0xef)]('global')},_0x523d65=resolveWriteScope(_0x344956),_0x943782=readScopedConfig(_0x523d65);_0x42ba34==='app'&&(_0xa6714d=_0x17944e(0xe9),delete _0x943782[_0x17944e(0xd6)]);_0x42ba34===_0x17944e(0xfe)&&(_0x5e0232=normalizeLocale(_0x5141d8));if(_0x42ba34===_0x17944e(0x105)){_0x5e0232=normalizeEnv(_0x5141d8);if(!isProduction(_0x5e0232)&&!isDaily(_0x5e0232))throw CliErrors[_0x17944e(0xe8)](_0x17944e(0xd4),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x42ba34===_0x17944e(0xe9)){const _0x26e7ba=_0x943782[_0x17944e(0xe6)]&&typeof _0x943782[_0x17944e(0xe6)]===_0x17944e(0xda)?Object[_0x17944e(0x103)](_0x943782['apps']):[];if(_0x26e7ba[_0x17944e(0xdd)]>0x0)throw CliErrors[_0x17944e(0xe8)](_0x17944e(0xec),_0x17944e(0x109)+CLI_BIN_NAME+_0x17944e(0xeb)+_0x5e0232+_0x17944e(0x101)+CLI_BIN_NAME+_0x17944e(0xde));const _0x3cba91=buildCanonicalProjectConfig({..._0x943782},{'appCodes':[_0x5e0232],'env':typeof _0x943782['env']===_0x17944e(0x102)?_0x943782[_0x17944e(0x105)]:undefined});writeScopedConfig(_0x3cba91,_0x523d65);const _0x523c67=_0x523d65===_0x17944e(0x104)?_0x17944e(0xf0):_0x17944e(0xd7);return{'ok':!![],'message':'✓\x20'+_0x523c67+_0x17944e(0xed)+_0x5e0232+_0x17944e(0xdb)};}_0x943782[_0xa6714d]=_0x5e0232,writeScopedConfig(_0x943782,_0x523d65);const _0x29686f=_0x523d65===_0x17944e(0x104)?_0x17944e(0xf0):'Project';return{'ok':!![],'message':'✓\x20'+_0x29686f+'\x20'+_0xa6714d+_0x17944e(0xf5)+_0x5e0232};}export const configSetDefinition={'service':a63_0x4f2449(0xe1),'command':a63_0x4f2449(0xf6),'description':'Set\x20a\x20config\x20value','risk':a63_0x4f2449(0xf9),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a63_0x4f2449(0xfc),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a63_0x4f2449(0xee),'type':a63_0x4f2449(0x102),'description':a63_0x4f2449(0xfb),'required':!![]},{'name':'global','type':'boolean','description':a63_0x4f2449(0xdc),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a310d,_0x5b8e29){var _0x38795b=a64_0x3da5,_0x268189=_0x4a310d();while(!![]){try{var _0x487872=parseInt(_0x38795b(0x1e3))/0x1*(-parseInt(_0x38795b(0x1e4))/0x2)+parseInt(_0x38795b(0x1dd))/0x3+parseInt(_0x38795b(0x1e9))/0x4*(parseInt(_0x38795b(0x1ea))/0x5)+-parseInt(_0x38795b(0x1e1))/0x6+-parseInt(_0x38795b(0x1de))/0x7+parseInt(_0x38795b(0x1e7))/0x8*(parseInt(_0x38795b(0x1df))/0x9)+parseInt(_0x38795b(0x1e8))/0xa*(parseInt(_0x38795b(0x1eb))/0xb);if(_0x487872===_0x5b8e29)break;else _0x268189['push'](_0x268189['shift']());}catch(_0x290ce1){_0x268189['push'](_0x268189['shift']());}}}(a64_0x1c6c,0xb5f57));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';function a64_0x1c6c(){var _0x29b28a=['6138ENNvbl','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','3565032emIEcF','10DJRfNR','640GOJRgb','2505qBdpPK','10697698hxyFGC','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','4429368RfLBPK','7234304FsMpao','27NCvPtm','global','5470914VWQfWv','validation','383xyzuhl'];a64_0x1c6c=function(){return _0x29b28a;};return a64_0x1c6c();}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x17611b){var _0x2d9c1d=a64_0x3da5;if(_0x17611b['global'])return _0x2d9c1d(0x1e0);if(!isInProject())throw CliErrors[_0x2d9c1d(0x1e2)](_0x2d9c1d(0x1dc),_0x2d9c1d(0x1e6)+CLI_BIN_NAME+_0x2d9c1d(0x1e5));return'project';}export function readScopedConfig(_0x759afe){return readConfigFile(resolveWriteConfigPath(_0x759afe));}function a64_0x3da5(_0x3afaf8,_0x33e808){_0x3afaf8=_0x3afaf8-0x1dc;var _0x1c6ca6=a64_0x1c6c();var _0x3da549=_0x1c6ca6[_0x3afaf8];return _0x3da549;}export function writeScopedConfig(_0x5cf77c,_0x15536b){writeConfigFile(resolveWriteConfigPath(_0x15536b),_0x5cf77c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x20eeb3=a65_0x1ec7;function a65_0x3747(){const _0x1cf6f4=['relationType','set','createdRelations','unresolvedRelations[','].confidence','createdDatasets[].localKey','10jaHfdM','\x20non-empty\x20strings.','reason','trim','fieldCode','isArray','split','dataset','createdDatasets','].design.dataset.datasetName','modelCode','design','type','].reason','9616hshcKV','has','toField','refTableLabelField','1032876ySMxBx','MANY_TO_ONE','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','UPLOAD','\x20must\x20be\x20between\x200\x20and\x201.','fromDatasetKey','modelId','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','metrics','\x20objects.','datasets','relations','some','ADDRESS','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','code','object','unresolvedRelations','schemaVersion','every','USER','toDatasetCode','datasets[','keys','add','MULTI_SELECT','Dataset\x20','toLowerCase','map','expectedLocalKeys','string','expectedRelations','validation','refTableField','cardinality','DATETIME','fields','ONE_TO_ONE','.confidence','TEXT','2349990qEDgnK',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','datasetId','14mEvoRA','fromDatasetCode','.reason','.relationType\x20must\x20be\x20\x22lookup\x22.','dataset-batch','join','.fromDatasetKey','size','].type\x20is\x20not\x20supported.','\x20is\x20required.','.cardinality\x20is\x20not\x20supported.','toUpperCase','].localKey\x20must\x20match\x20','entries','6759xRckcv','].design.dataset\x20must\x20be\x20an\x20object.','1032428vEMdpN',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','get','.toField','createdDatasets[].code','].localKey','length','.toDatasetKey','.fromField','409866eqlFLs','refTable','test','228619RQhMCs','fieldType','kind','confidence','].design.fields[','NUMBER','relations[','lookup','fromField','isFinite','3199720EFbktG'];a65_0x3747=function(){return _0x1cf6f4;};return a65_0x3747();}(function(_0x5e2268,_0x22795c){const _0x1ffe65=a65_0x1ec7,_0x11d9d3=_0x5e2268();while(!![]){try{const _0xc24ce5=-parseInt(_0x1ffe65(0x1ce))/0x1+parseInt(_0x1ffe65(0x1cb))/0x2+-parseInt(_0x1ffe65(0x187))/0x3+-parseInt(_0x1ffe65(0x1c2))/0x4*(parseInt(_0x1ffe65(0x175))/0x5)+parseInt(_0x1ffe65(0x1af))/0x6*(parseInt(_0x1ffe65(0x1b2))/0x7)+-parseInt(_0x1ffe65(0x183))/0x8*(-parseInt(_0x1ffe65(0x1c0))/0x9)+-parseInt(_0x1ffe65(0x16e))/0xa;if(_0xc24ce5===_0x22795c)break;else _0x11d9d3['push'](_0x11d9d3['shift']());}catch(_0x3463a6){_0x11d9d3['push'](_0x11d9d3['shift']());}}}(a65_0x3747,0x75a4c));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x20eeb3(0x188),a65_0x20eeb3(0x1ac)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x20eeb3(0x1ae),a65_0x20eeb3(0x1d3),a65_0x20eeb3(0x1aa),'BOOLEAN','SELECT',a65_0x20eeb3(0x1a0),'DATE_RANGE',a65_0x20eeb3(0x19b),a65_0x20eeb3(0x194),a65_0x20eeb3(0x18a)]);export function isDatasetBatchDesign(_0x349429){const _0x40a678=a65_0x20eeb3;return isObject(_0x349429)&&_0x349429[_0x40a678(0x1d0)]===_0x40a678(0x1b6);}export function validateDatasetBatchDesign(_0x212c5c){const _0x34fe5a=a65_0x20eeb3;(!isObject(_0x212c5c)||_0x212c5c[_0x34fe5a(0x1d0)]!==_0x34fe5a(0x1b6))&&fail('Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.');_0x212c5c[_0x34fe5a(0x199)]!==0x1&&fail('Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.');const _0x2575e8=objectArray(_0x212c5c[_0x34fe5a(0x191)],_0x34fe5a(0x191),0x1,0x14),_0x353665=objectArray(_0x212c5c[_0x34fe5a(0x192)],_0x34fe5a(0x192),0x0,0xc8),_0x2c80cc=objectArray(_0x212c5c[_0x34fe5a(0x198)],'unresolvedRelations',0x0,0xc8),_0x167fe5=new Set(),_0x647c16=new Map();for(const [_0x1135ed,_0x1c1869]of _0x2575e8[_0x34fe5a(0x1bf)]()){const _0xec276=requiredString(_0x1c1869['localKey'],_0x34fe5a(0x19d)+_0x1135ed+_0x34fe5a(0x1c7));!LOCAL_KEY[_0x34fe5a(0x1cd)](_0xec276)&&fail('datasets['+_0x1135ed+_0x34fe5a(0x1be)+LOCAL_KEY['source']+'.');_0x167fe5[_0x34fe5a(0x184)](_0xec276)&&fail(_0x34fe5a(0x195));_0x167fe5['add'](_0xec276);!isObject(_0x1c1869[_0x34fe5a(0x180)])&&fail(_0x34fe5a(0x19d)+_0x1135ed+'].design\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x1c1869[_0x34fe5a(0x180)],_0x34fe5a(0x19d)+_0x1135ed+'].design');if(!isObject(_0x1c1869[_0x34fe5a(0x180)]['dataset']))fail('datasets['+_0x1135ed+_0x34fe5a(0x1c1));rejectServerDatasetIdentity(_0x1c1869[_0x34fe5a(0x180)]['dataset'],_0x34fe5a(0x19d)+_0x1135ed+'].design.dataset'),requiredString(_0x1c1869['design'][_0x34fe5a(0x17c)]['datasetName'],_0x34fe5a(0x19d)+_0x1135ed+_0x34fe5a(0x17e));_0x34fe5a(0x192)in _0x1c1869['design']&&(!Array['isArray'](_0x1c1869['design']['relations'])||_0x1c1869[_0x34fe5a(0x180)][_0x34fe5a(0x192)]['length']!==0x0)&&fail(_0x34fe5a(0x19d)+_0x1135ed+'].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.');const _0x30686e=objectArray(_0x1c1869[_0x34fe5a(0x180)][_0x34fe5a(0x1ab)],_0x34fe5a(0x19d)+_0x1135ed+'].design.fields',0x1,0xc8),_0x567f0b=new Map();for(const [_0x5ccda3,_0x4de438]of _0x30686e[_0x34fe5a(0x1bf)]()){const _0x58582a=fieldName(_0x4de438);if(!_0x58582a)fail(_0x34fe5a(0x19d)+_0x1135ed+_0x34fe5a(0x1d2)+_0x5ccda3+_0x34fe5a(0x1c3));const _0x341bfd=_0x58582a[_0x34fe5a(0x1a2)]();if(_0x567f0b[_0x34fe5a(0x184)](_0x341bfd))fail(_0x34fe5a(0x1a1)+_0xec276+_0x34fe5a(0x18e));const _0x18ed69=stringValue(_0x4de438[_0x34fe5a(0x181)]??_0x4de438[_0x34fe5a(0x1cf)])[_0x34fe5a(0x1bd)]();if(!SUPPORTED_FIELD_TYPES[_0x34fe5a(0x184)](_0x18ed69))fail(_0x34fe5a(0x19d)+_0x1135ed+_0x34fe5a(0x1d2)+_0x5ccda3+_0x34fe5a(0x1ba));_0x567f0b[_0x34fe5a(0x170)](_0x341bfd,_0x18ed69),[_0x4de438[_0x34fe5a(0x1cc)],_0x4de438[_0x34fe5a(0x1a8)],_0x4de438[_0x34fe5a(0x186)]][_0x34fe5a(0x193)](_0x2c1b48=>stringValue(_0x2c1b48))&&fail(_0x34fe5a(0x19d)+_0x1135ed+'].design.fields['+_0x5ccda3+_0x34fe5a(0x1b0));}_0x647c16[_0x34fe5a(0x170)](_0xec276,_0x567f0b);}const _0x3f29ff=new Set(),_0xac30d1=new Set();for(const [_0xb2bbd2,_0x35ccb2]of _0x353665['entries']()){const _0xbf3ca6=validateRelation(_0x35ccb2,_0xb2bbd2,_0x167fe5,_0x647c16);if(_0x3f29ff[_0x34fe5a(0x184)](_0xbf3ca6))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0x3f29ff[_0x34fe5a(0x19f)](_0xbf3ca6);const _0xf9578e=_0xbf3ca6[_0x34fe5a(0x17b)]('\x00',0x2)[_0x34fe5a(0x1b7)]('\x00');if(_0xac30d1[_0x34fe5a(0x184)](_0xf9578e))fail(_0x34fe5a(0x189));_0xac30d1['add'](_0xf9578e);}for(const [_0x2674ff,_0x49b9d7]of _0x2c80cc['entries']()){requiredString(_0x49b9d7[_0x34fe5a(0x177)],_0x34fe5a(0x172)+_0x2674ff+_0x34fe5a(0x182)),validateConfidence(_0x49b9d7[_0x34fe5a(0x1d1)],_0x34fe5a(0x172)+_0x2674ff+_0x34fe5a(0x173));}return _0x212c5c;}function a65_0x1ec7(_0x20c542,_0x136b92){_0x20c542=_0x20c542-0x16a;const _0x3747b0=a65_0x3747();let _0x1ec7be=_0x3747b0[_0x20c542];return _0x1ec7be;}export function reconcileBatchResult(_0x2bf3b2){const _0x314044=a65_0x20eeb3;if(!isObject(_0x2bf3b2))return null;try{const _0x3ef658=stringArray(_0x2bf3b2[_0x314044(0x1a4)],_0x314044(0x1a4),0x1,0x14),_0xdefbc6=new Set(_0x3ef658);if(_0xdefbc6['size']!==_0x3ef658[_0x314044(0x1c8)]||_0x3ef658[_0x314044(0x193)](_0x434f7b=>!LOCAL_KEY[_0x314044(0x1cd)](_0x434f7b)))return null;const _0x42dfcf=objectArray(_0x2bf3b2[_0x314044(0x17d)],_0x314044(0x17d),0x1,0x14),_0x489115=new Map(),_0xc8676c=new Set();for(const _0x5e32d0 of _0x42dfcf){const _0x55b849=requiredString(_0x5e32d0['localKey'],_0x314044(0x174)),_0x3adf92=requiredString(_0x5e32d0[_0x314044(0x196)]??_0x5e32d0['datasetCode'],_0x314044(0x1c6));if(_0x489115[_0x314044(0x184)](_0x55b849)||_0xc8676c['has'](_0x3adf92))return null;_0x489115[_0x314044(0x170)](_0x55b849,_0x3adf92),_0xc8676c[_0x314044(0x19f)](_0x3adf92);}if(!sameSet(_0xdefbc6,new Set(_0x489115[_0x314044(0x19e)]())))return null;const _0x5c6bfc=objectArray(_0x2bf3b2[_0x314044(0x1a6)],_0x314044(0x1a6),0x0,0xc8),_0x5ea4d8=objectArray(_0x2bf3b2[_0x314044(0x171)],_0x314044(0x171),0x0,0xc8),_0x2b0d70=relationTupleSet(_0x5c6bfc,![],_0x489115),_0x449707=relationTupleSet(_0x5ea4d8,!![],_0x489115);if(!_0x2b0d70||!_0x449707||!sameSet(_0x2b0d70,_0x449707))return null;const _0x8e8725=objectArray(_0x2bf3b2[_0x314044(0x198)],_0x314044(0x198),0x0,0xc8);return{'expectedLocalKeys':_0x3ef658,'expectedRelations':_0x5c6bfc,'createdDatasets':_0x42dfcf,'createdRelations':_0x5ea4d8,'unresolvedRelations':_0x8e8725,...isObject(_0x2bf3b2[_0x314044(0x18f)])?{'metrics':_0x2bf3b2[_0x314044(0x18f)]}:{}};}catch{return null;}}function validateRelation(_0x57cd4c,_0x24c4de,_0x37055e,_0x37cf0e){const _0x6f2a18=a65_0x20eeb3,_0x5aeb85=_0x6f2a18(0x16a)+_0x24c4de+']',_0x1653ea=requiredString(_0x57cd4c[_0x6f2a18(0x18c)],_0x5aeb85+_0x6f2a18(0x1b8)),_0x5252f2=requiredString(_0x57cd4c['toDatasetKey'],_0x5aeb85+_0x6f2a18(0x1c9)),_0x4a1369=requiredString(_0x57cd4c['fromField'],_0x5aeb85+_0x6f2a18(0x1ca))[_0x6f2a18(0x1a2)](),_0x1bc878=requiredString(_0x57cd4c[_0x6f2a18(0x185)],_0x5aeb85+_0x6f2a18(0x1c5))[_0x6f2a18(0x1a2)]();if(!_0x37055e[_0x6f2a18(0x184)](_0x1653ea)||!_0x37055e[_0x6f2a18(0x184)](_0x5252f2))fail(_0x5aeb85+'\x20references\x20an\x20unknown\x20dataset\x20localKey.');const _0x320d8c=_0x37cf0e['get'](_0x1653ea)?.[_0x6f2a18(0x1c4)](_0x4a1369),_0x2b4751=_0x37cf0e[_0x6f2a18(0x1c4)](_0x5252f2)?.['get'](_0x1bc878);if(_0x320d8c===undefined||_0x2b4751===undefined)fail(_0x5aeb85+'\x20references\x20an\x20unknown\x20field.');if(_0x320d8c&&_0x2b4751&&_0x320d8c!==_0x2b4751)fail(_0x5aeb85+'\x20connects\x20incompatible\x20field\x20types.');const _0x99c625=stringValue(_0x57cd4c[_0x6f2a18(0x16f)])||_0x6f2a18(0x16b);if(_0x99c625!==_0x6f2a18(0x16b))fail(_0x5aeb85+_0x6f2a18(0x1b5));const _0x4760ad=stringValue(_0x57cd4c[_0x6f2a18(0x1a9)])||_0x6f2a18(0x188);if(!SUPPORTED_CARDINALITIES[_0x6f2a18(0x184)](_0x4760ad))fail(_0x5aeb85+_0x6f2a18(0x1bc));return requiredString(_0x57cd4c[_0x6f2a18(0x177)],_0x5aeb85+_0x6f2a18(0x1b4)),validateConfidence(_0x57cd4c[_0x6f2a18(0x1d1)],_0x5aeb85+_0x6f2a18(0x1ad)),tuple(_0x1653ea,_0x4a1369,_0x5252f2,_0x1bc878,_0x6f2a18(0x16b),_0x4760ad);}function relationTupleSet(_0x174605,_0x42fb24,_0x12998e){const _0x55d78c=a65_0x20eeb3,_0x504413=new Set();for(const _0x236f17 of _0x174605){const _0x40dd24=stringValue(_0x236f17[_0x55d78c(0x18c)]),_0x328702=stringValue(_0x236f17['toDatasetKey']),_0xf6d089=stringValue(_0x236f17[_0x55d78c(0x16c)])[_0x55d78c(0x1a2)](),_0x2e52b1=stringValue(_0x236f17[_0x55d78c(0x185)])[_0x55d78c(0x1a2)](),_0x20582a=stringValue(_0x236f17[_0x55d78c(0x16f)]),_0xad584b=stringValue(_0x236f17[_0x55d78c(0x1a9)]);if(!_0x40dd24||!_0x328702||!_0xf6d089||!_0x2e52b1||_0x20582a!==_0x55d78c(0x16b)||!SUPPORTED_CARDINALITIES['has'](_0xad584b))return null;if(!_0x12998e[_0x55d78c(0x184)](_0x40dd24)||!_0x12998e[_0x55d78c(0x184)](_0x328702))return null;if(_0x42fb24&&(stringValue(_0x236f17[_0x55d78c(0x1b3)])!==_0x12998e[_0x55d78c(0x1c4)](_0x40dd24)||stringValue(_0x236f17[_0x55d78c(0x19c)])!==_0x12998e[_0x55d78c(0x1c4)](_0x328702)))return null;const _0x101026=tuple(_0x40dd24,_0xf6d089,_0x328702,_0x2e52b1,_0x20582a,_0xad584b);if(_0x504413[_0x55d78c(0x184)](_0x101026))return null;_0x504413[_0x55d78c(0x19f)](_0x101026);}return _0x504413;}function rejectServerDatasetIdentity(_0x40647e,_0x172865){const _0x1abd2d=a65_0x20eeb3;for(const _0x1fb26c of['id',_0x1abd2d(0x1b1),_0x1abd2d(0x18d),'code','datasetCode',_0x1abd2d(0x17f)]){if(_0x40647e[_0x1fb26c]!==undefined&&_0x40647e[_0x1fb26c]!==null&&_0x40647e[_0x1fb26c]!=='')fail(_0x172865+'.'+_0x1fb26c+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function objectArray(_0x155b68,_0x4a0961,_0x26c68e,_0x3c7e09){const _0x4e3bd1=a65_0x20eeb3;return(!Array[_0x4e3bd1(0x17a)](_0x155b68)||_0x155b68[_0x4e3bd1(0x1c8)]<_0x26c68e||_0x155b68[_0x4e3bd1(0x1c8)]>_0x3c7e09||_0x155b68['some'](_0x171f22=>!isObject(_0x171f22)))&&fail(_0x4a0961+'\x20must\x20contain\x20'+_0x26c68e+'..'+_0x3c7e09+_0x4e3bd1(0x190)),_0x155b68;}function stringArray(_0xe3dc34,_0x316f4a,_0x354e59,_0x33da68){const _0x565782=a65_0x20eeb3;return(!Array['isArray'](_0xe3dc34)||_0xe3dc34[_0x565782(0x1c8)]<_0x354e59||_0xe3dc34[_0x565782(0x1c8)]>_0x33da68||_0xe3dc34[_0x565782(0x193)](_0x5b01d6=>typeof _0x5b01d6!==_0x565782(0x1a5)||!_0x5b01d6[_0x565782(0x178)]()))&&fail(_0x316f4a+'\x20must\x20contain\x20'+_0x354e59+'..'+_0x33da68+_0x565782(0x176)),_0xe3dc34;}function requiredString(_0x58984,_0x40c4f7){const _0x24328b=a65_0x20eeb3,_0x13a490=stringValue(_0x58984);if(!_0x13a490)fail(_0x40c4f7+_0x24328b(0x1bb));return _0x13a490;}function stringValue(_0x4016a5){const _0x31f510=a65_0x20eeb3;return typeof _0x4016a5===_0x31f510(0x1a5)?_0x4016a5[_0x31f510(0x178)]():'';}function fieldName(_0x13df97){const _0x89cd58=a65_0x20eeb3;return stringValue(_0x13df97[_0x89cd58(0x196)]??_0x13df97[_0x89cd58(0x179)]??_0x13df97['name']??_0x13df97['fieldName']);}function validateConfidence(_0x177219,_0x44b109){const _0x4e6508=a65_0x20eeb3;_0x177219!==undefined&&_0x177219!==null&&(typeof _0x177219!=='number'||!Number[_0x4e6508(0x16d)](_0x177219)||_0x177219<0x0||_0x177219>0x1)&&fail(_0x44b109+_0x4e6508(0x18b));}function tuple(..._0x42e48c){const _0x464a57=a65_0x20eeb3;return _0x42e48c[_0x464a57(0x1a3)]((_0x507f8b,_0x1916a0)=>_0x1916a0===0x1||_0x1916a0===0x3?_0x507f8b[_0x464a57(0x1a2)]():_0x507f8b)[_0x464a57(0x1b7)]('\x00');}function sameSet(_0x1120e0,_0x17cf49){const _0x376891=a65_0x20eeb3;return _0x1120e0[_0x376891(0x1b9)]===_0x17cf49[_0x376891(0x1b9)]&&[..._0x1120e0][_0x376891(0x19a)](_0x2a40a9=>_0x17cf49['has'](_0x2a40a9));}function isObject(_0x13fa54){const _0x41264a=a65_0x20eeb3;return typeof _0x13fa54===_0x41264a(0x197)&&_0x13fa54!==null&&!Array[_0x41264a(0x17a)](_0x13fa54);}function fail(_0x1c3157){const _0x5f509f=a65_0x20eeb3;throw CliErrors[_0x5f509f(0x1a7)](_0x1c3157);}
|
|
1
|
+
const a65_0x542ef6=a65_0x448c;(function(_0x30fd59,_0x830043){const _0xd7a353=a65_0x448c,_0x2b94af=_0x30fd59();while(!![]){try{const _0x1864a8=-parseInt(_0xd7a353(0xa6))/0x1+parseInt(_0xd7a353(0x81))/0x2+parseInt(_0xd7a353(0x84))/0x3+parseInt(_0xd7a353(0xc8))/0x4+-parseInt(_0xd7a353(0x8d))/0x5+parseInt(_0xd7a353(0xd1))/0x6+-parseInt(_0xd7a353(0xcb))/0x7;if(_0x1864a8===_0x830043)break;else _0x2b94af['push'](_0x2b94af['shift']());}catch(_0x1c8744){_0x2b94af['push'](_0x2b94af['shift']());}}}(a65_0x4b4c,0x762d0));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x542ef6(0xab),a65_0x542ef6(0xad)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x542ef6(0xc0),a65_0x542ef6(0xbd),a65_0x542ef6(0xc7),a65_0x542ef6(0xbe),a65_0x542ef6(0xb1),a65_0x542ef6(0x8a),a65_0x542ef6(0x7a),a65_0x542ef6(0x7f),'ADDRESS','UPLOAD']);export function isDatasetBatchDesign(_0x4c0110){const _0x3ff3be=a65_0x542ef6;return isObject(_0x4c0110)&&_0x4c0110[_0x3ff3be(0x95)]===_0x3ff3be(0xb7);}export function validateDatasetBatchDesign(_0x547e48){const _0x333108=a65_0x542ef6;(!isObject(_0x547e48)||_0x547e48[_0x333108(0x95)]!=='dataset-batch')&&fail('Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.');_0x547e48['schemaVersion']!==0x1&&fail(_0x333108(0xcd));const _0x5d2072=objectArray(_0x547e48[_0x333108(0x97)],_0x333108(0x97),0x1,0x14),_0xa7dd3f=objectArray(_0x547e48[_0x333108(0x7e)],_0x333108(0x7e),0x0,0xc8),_0x498ac6=objectArray(_0x547e48[_0x333108(0x75)],'unresolvedRelations',0x0,0xc8),_0x478c7e=new Set(),_0x56e7b7=new Map();for(const [_0x2635de,_0x1a7d48]of _0x5d2072[_0x333108(0xa2)]()){const _0x10fac4=requiredString(_0x1a7d48[_0x333108(0xc2)],_0x333108(0x94)+_0x2635de+'].localKey');!LOCAL_KEY[_0x333108(0xa4)](_0x10fac4)&&fail(_0x333108(0x94)+_0x2635de+_0x333108(0xd8)+LOCAL_KEY[_0x333108(0xc4)]+'.');_0x478c7e[_0x333108(0x92)](_0x10fac4)&&fail('Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.');_0x478c7e[_0x333108(0x73)](_0x10fac4);!isObject(_0x1a7d48[_0x333108(0x74)])&&fail(_0x333108(0x94)+_0x2635de+_0x333108(0xd7));rejectServerDatasetIdentity(_0x1a7d48['design'],'datasets['+_0x2635de+'].design');if(!isObject(_0x1a7d48[_0x333108(0x74)][_0x333108(0xc6)]))fail(_0x333108(0x94)+_0x2635de+_0x333108(0x8f));rejectServerDatasetIdentity(_0x1a7d48[_0x333108(0x74)]['dataset'],'datasets['+_0x2635de+'].design.dataset'),requiredString(_0x1a7d48[_0x333108(0x74)][_0x333108(0xc6)][_0x333108(0xc1)],_0x333108(0x94)+_0x2635de+_0x333108(0xcc));'relations'in _0x1a7d48[_0x333108(0x74)]&&(!Array[_0x333108(0xa0)](_0x1a7d48[_0x333108(0x74)][_0x333108(0x7e)])||_0x1a7d48[_0x333108(0x74)][_0x333108(0x7e)][_0x333108(0xd0)]!==0x0)&&fail(_0x333108(0x94)+_0x2635de+_0x333108(0x9d));const _0x287484=objectArray(_0x1a7d48[_0x333108(0x74)][_0x333108(0x90)],_0x333108(0x94)+_0x2635de+_0x333108(0x8e),0x1,0xc8),_0x1a2f0a=new Map();for(const [_0x242897,_0x6bd5a5]of _0x287484[_0x333108(0xa2)]()){const _0x45c980=fieldName(_0x6bd5a5);if(!_0x45c980)fail(_0x333108(0x94)+_0x2635de+_0x333108(0xb8)+_0x242897+_0x333108(0x83));const _0x426ca1=_0x45c980[_0x333108(0x7b)]();if(_0x1a2f0a[_0x333108(0x92)](_0x426ca1))fail(_0x333108(0x98)+_0x10fac4+_0x333108(0x9c));const _0xa9f88e=stringValue(_0x6bd5a5['type']??_0x6bd5a5[_0x333108(0x85)])[_0x333108(0xac)]();if(!SUPPORTED_FIELD_TYPES[_0x333108(0x92)](_0xa9f88e))fail(_0x333108(0x94)+_0x2635de+_0x333108(0xb8)+_0x242897+_0x333108(0x80));_0x1a2f0a[_0x333108(0x9e)](_0x426ca1,_0xa9f88e),[_0x6bd5a5[_0x333108(0x88)],_0x6bd5a5[_0x333108(0xb0)],_0x6bd5a5['refTableLabelField']][_0x333108(0xb3)](_0x564fcd=>stringValue(_0x564fcd))&&fail(_0x333108(0x94)+_0x2635de+'].design.fields['+_0x242897+_0x333108(0xbc));}_0x56e7b7[_0x333108(0x9e)](_0x10fac4,_0x1a2f0a);}const _0xea92c4=new Set(),_0x313a10=new Set();for(const [_0x2cdc86,_0x1e64ea]of _0xa7dd3f['entries']()){const _0x4ad804=validateRelation(_0x1e64ea,_0x2cdc86,_0x478c7e,_0x56e7b7);if(_0xea92c4[_0x333108(0x92)](_0x4ad804))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0xea92c4['add'](_0x4ad804);const _0x47c71e=_0x4ad804[_0x333108(0x82)]('\x00',0x2)['join']('\x00');if(_0x313a10['has'](_0x47c71e))fail(_0x333108(0xaf));_0x313a10[_0x333108(0x73)](_0x47c71e);}for(const [_0x5c37d3,_0x4baaf9]of _0x498ac6[_0x333108(0xa2)]()){requiredString(_0x4baaf9[_0x333108(0x77)],'unresolvedRelations['+_0x5c37d3+_0x333108(0xd4)),validateConfidence(_0x4baaf9['confidence'],_0x333108(0x86)+_0x5c37d3+_0x333108(0xb2));}return _0x547e48;}export function reconcileBatchResult(_0x1b698e){const _0x51da97=a65_0x542ef6;if(!isObject(_0x1b698e))return null;try{const _0x242d79=stringArray(_0x1b698e[_0x51da97(0xa3)],_0x51da97(0xa3),0x1,0x14),_0x52559f=new Set(_0x242d79);if(_0x52559f[_0x51da97(0xc3)]!==_0x242d79[_0x51da97(0xd0)]||_0x242d79[_0x51da97(0xb3)](_0x5dc0d1=>!LOCAL_KEY[_0x51da97(0xa4)](_0x5dc0d1)))return null;const _0xaabd9f=objectArray(_0x1b698e[_0x51da97(0xa5)],'createdDatasets',0x1,0x14),_0x2b2411=new Map(),_0x1a8f77=new Set();for(const _0x9e9dfa of _0xaabd9f){const _0x217790=requiredString(_0x9e9dfa[_0x51da97(0xc2)],_0x51da97(0xd6)),_0xa7860f=requiredString(_0x9e9dfa['code']??_0x9e9dfa[_0x51da97(0xbb)],_0x51da97(0xca));if(_0x2b2411[_0x51da97(0x92)](_0x217790)||_0x1a8f77['has'](_0xa7860f))return null;_0x2b2411[_0x51da97(0x9e)](_0x217790,_0xa7860f),_0x1a8f77['add'](_0xa7860f);}if(!sameSet(_0x52559f,new Set(_0x2b2411[_0x51da97(0xbf)]())))return null;const _0x2e4ec8=objectArray(_0x1b698e['expectedRelations'],_0x51da97(0xb9),0x0,0xc8),_0x4c13c0=objectArray(_0x1b698e['createdRelations'],_0x51da97(0xce),0x0,0xc8),_0x33f5a6=relationTupleSet(_0x2e4ec8,![],_0x2b2411),_0xa0d6cb=relationTupleSet(_0x4c13c0,!![],_0x2b2411);if(!_0x33f5a6||!_0xa0d6cb||!sameSet(_0x33f5a6,_0xa0d6cb))return null;const _0x399867=objectArray(_0x1b698e[_0x51da97(0x75)],'unresolvedRelations',0x0,0xc8);return{'expectedLocalKeys':_0x242d79,'expectedRelations':_0x2e4ec8,'createdDatasets':_0xaabd9f,'createdRelations':_0x4c13c0,'unresolvedRelations':_0x399867,...isObject(_0x1b698e[_0x51da97(0x76)])?{'metrics':_0x1b698e[_0x51da97(0x76)]}:{}};}catch{return null;}}function validateRelation(_0x5ebe91,_0x364843,_0x31e556,_0x4a0a26){const _0x58f32b=a65_0x542ef6,_0x81a1e1=_0x58f32b(0xa1)+_0x364843+']',_0x278f67=requiredString(_0x5ebe91[_0x58f32b(0xa7)],_0x81a1e1+'.fromDatasetKey'),_0x2d857a=requiredString(_0x5ebe91[_0x58f32b(0xd2)],_0x81a1e1+'.toDatasetKey'),_0x1eb514=requiredString(_0x5ebe91[_0x58f32b(0x8b)],_0x81a1e1+_0x58f32b(0x9a))[_0x58f32b(0x7b)](),_0x1d6704=requiredString(_0x5ebe91[_0x58f32b(0x87)],_0x81a1e1+_0x58f32b(0xae))[_0x58f32b(0x7b)]();if(!_0x31e556['has'](_0x278f67)||!_0x31e556[_0x58f32b(0x92)](_0x2d857a))fail(_0x81a1e1+_0x58f32b(0x9f));const _0x2be1b5=_0x4a0a26[_0x58f32b(0x9b)](_0x278f67)?.[_0x58f32b(0x9b)](_0x1eb514),_0x4cb9ec=_0x4a0a26[_0x58f32b(0x9b)](_0x2d857a)?.[_0x58f32b(0x9b)](_0x1d6704);if(_0x2be1b5===undefined||_0x4cb9ec===undefined)fail(_0x81a1e1+_0x58f32b(0x96));if(_0x2be1b5&&_0x4cb9ec&&_0x2be1b5!==_0x4cb9ec)fail(_0x81a1e1+_0x58f32b(0x93));const _0x254833=stringValue(_0x5ebe91[_0x58f32b(0xcf)])||_0x58f32b(0xb4);if(_0x254833!==_0x58f32b(0xb4))fail(_0x81a1e1+_0x58f32b(0xba));const _0xdce10d=stringValue(_0x5ebe91['cardinality'])||'MANY_TO_ONE';if(!SUPPORTED_CARDINALITIES[_0x58f32b(0x92)](_0xdce10d))fail(_0x81a1e1+_0x58f32b(0xaa));return requiredString(_0x5ebe91[_0x58f32b(0x77)],_0x81a1e1+'.reason'),validateConfidence(_0x5ebe91['confidence'],_0x81a1e1+_0x58f32b(0x79)),tuple(_0x278f67,_0x1eb514,_0x2d857a,_0x1d6704,_0x58f32b(0xb4),_0xdce10d);}function relationTupleSet(_0x3a3e3f,_0x25115a,_0x5998df){const _0x220714=a65_0x542ef6,_0x4ea3da=new Set();for(const _0x17c422 of _0x3a3e3f){const _0x272259=stringValue(_0x17c422[_0x220714(0xa7)]),_0x304191=stringValue(_0x17c422[_0x220714(0xd2)]),_0x279344=stringValue(_0x17c422['fromField'])[_0x220714(0x7b)](),_0x1024bf=stringValue(_0x17c422['toField'])['toLowerCase'](),_0x56ae06=stringValue(_0x17c422[_0x220714(0xcf)]),_0x2d07e7=stringValue(_0x17c422[_0x220714(0x89)]);if(!_0x272259||!_0x304191||!_0x279344||!_0x1024bf||_0x56ae06!==_0x220714(0xb4)||!SUPPORTED_CARDINALITIES[_0x220714(0x92)](_0x2d07e7))return null;if(!_0x5998df[_0x220714(0x92)](_0x272259)||!_0x5998df[_0x220714(0x92)](_0x304191))return null;if(_0x25115a&&(stringValue(_0x17c422['fromDatasetCode'])!==_0x5998df[_0x220714(0x9b)](_0x272259)||stringValue(_0x17c422[_0x220714(0xd9)])!==_0x5998df[_0x220714(0x9b)](_0x304191)))return null;const _0x3e1c48=tuple(_0x272259,_0x279344,_0x304191,_0x1024bf,_0x56ae06,_0x2d07e7);if(_0x4ea3da[_0x220714(0x92)](_0x3e1c48))return null;_0x4ea3da[_0x220714(0x73)](_0x3e1c48);}return _0x4ea3da;}function a65_0x448c(_0x2d8a6d,_0x2338da){_0x2d8a6d=_0x2d8a6d-0x73;const _0x4b4c79=a65_0x4b4c();let _0x448c12=_0x4b4c79[_0x2d8a6d];return _0x448c12;}function rejectServerDatasetIdentity(_0xa95606,_0x4807c7){const _0x47e87b=a65_0x542ef6;for(const _0x267780 of['id',_0x47e87b(0xa9),'modelId',_0x47e87b(0x8c),'datasetCode','modelCode']){if(_0xa95606[_0x267780]!==undefined&&_0xa95606[_0x267780]!==null&&_0xa95606[_0x267780]!=='')fail(_0x4807c7+'.'+_0x267780+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function objectArray(_0x65a4cb,_0x4498fb,_0x56f1e9,_0x4bbe6c){const _0x32c2d8=a65_0x542ef6;return(!Array['isArray'](_0x65a4cb)||_0x65a4cb[_0x32c2d8(0xd0)]<_0x56f1e9||_0x65a4cb['length']>_0x4bbe6c||_0x65a4cb[_0x32c2d8(0xb3)](_0x40376b=>!isObject(_0x40376b)))&&fail(_0x4498fb+_0x32c2d8(0xd5)+_0x56f1e9+'..'+_0x4bbe6c+_0x32c2d8(0xb6)),_0x65a4cb;}function stringArray(_0x8fb317,_0x5e5f91,_0x4b400e,_0x383722){const _0x3527dd=a65_0x542ef6;return(!Array['isArray'](_0x8fb317)||_0x8fb317['length']<_0x4b400e||_0x8fb317[_0x3527dd(0xd0)]>_0x383722||_0x8fb317[_0x3527dd(0xb3)](_0x29c06b=>typeof _0x29c06b!=='string'||!_0x29c06b['trim']()))&&fail(_0x5e5f91+'\x20must\x20contain\x20'+_0x4b400e+'..'+_0x383722+'\x20non-empty\x20strings.'),_0x8fb317;}function requiredString(_0x3f7b5d,_0x33e9d7){const _0x5069c9=stringValue(_0x3f7b5d);if(!_0x5069c9)fail(_0x33e9d7+'\x20is\x20required.');return _0x5069c9;}function stringValue(_0x20420e){const _0x525525=a65_0x542ef6;return typeof _0x20420e===_0x525525(0xd3)?_0x20420e['trim']():'';}function fieldName(_0x3c1cbb){const _0x8e49de=a65_0x542ef6;return stringValue(_0x3c1cbb[_0x8e49de(0x8c)]??_0x3c1cbb['fieldCode']??_0x3c1cbb[_0x8e49de(0x78)]??_0x3c1cbb[_0x8e49de(0xa8)]);}function a65_0x4b4c(){const _0x1cceb9=['\x20must\x20contain\x20','createdDatasets[].localKey','].design\x20must\x20be\x20an\x20object.','].localKey\x20must\x20match\x20','toDatasetCode','add','design','unresolvedRelations','metrics','reason','name','.confidence','DATE_RANGE','toLowerCase','number','every','relations','USER','].type\x20is\x20not\x20supported.','182164dVZwoA','split',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','2629887mZsrWG','fieldType','unresolvedRelations[','toField','refTable','cardinality','MULTI_SELECT','fromField','code','3232945wYtJJz','].design.fields','].design.dataset\x20must\x20be\x20an\x20object.','fields','object','has','\x20connects\x20incompatible\x20field\x20types.','datasets[','kind','\x20references\x20an\x20unknown\x20field.','datasets','Dataset\x20','map','.fromField','get','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','set','\x20references\x20an\x20unknown\x20dataset\x20localKey.','isArray','relations[','entries','expectedLocalKeys','test','createdDatasets','715530WthRrl','fromDatasetKey','fieldName','datasetId','.cardinality\x20is\x20not\x20supported.','MANY_TO_ONE','toUpperCase','ONE_TO_ONE','.toField','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','refTableField','SELECT','].confidence','some','lookup','isFinite','\x20objects.','dataset-batch','].design.fields[','expectedRelations','.relationType\x20must\x20be\x20\x22lookup\x22.','datasetCode',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','NUMBER','BOOLEAN','keys','TEXT','datasetName','localKey','size','source','\x20must\x20be\x20between\x200\x20and\x201.','dataset','DATETIME','3137572lelpQK','validation','createdDatasets[].code','6017795BTAVae','].design.dataset.datasetName','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','createdRelations','relationType','length','5722488lEQvUu','toDatasetKey','string','].reason'];a65_0x4b4c=function(){return _0x1cceb9;};return a65_0x4b4c();}function validateConfidence(_0xbb0c21,_0x4c5081){const _0x5ec787=a65_0x542ef6;_0xbb0c21!==undefined&&_0xbb0c21!==null&&(typeof _0xbb0c21!==_0x5ec787(0x7c)||!Number[_0x5ec787(0xb5)](_0xbb0c21)||_0xbb0c21<0x0||_0xbb0c21>0x1)&&fail(_0x4c5081+_0x5ec787(0xc5));}function tuple(..._0x555c1e){const _0x480a72=a65_0x542ef6;return _0x555c1e[_0x480a72(0x99)]((_0x58e737,_0x5c9ce5)=>_0x5c9ce5===0x1||_0x5c9ce5===0x3?_0x58e737[_0x480a72(0x7b)]():_0x58e737)['join']('\x00');}function sameSet(_0x8c19b7,_0x1807e2){const _0x8d011f=a65_0x542ef6;return _0x8c19b7[_0x8d011f(0xc3)]===_0x1807e2[_0x8d011f(0xc3)]&&[..._0x8c19b7][_0x8d011f(0x7d)](_0x364b52=>_0x1807e2['has'](_0x364b52));}function isObject(_0x3fbcd8){const _0x4372d0=a65_0x542ef6;return typeof _0x3fbcd8===_0x4372d0(0x91)&&_0x3fbcd8!==null&&!Array[_0x4372d0(0xa0)](_0x3fbcd8);}function fail(_0x29bafd){const _0x30667f=a65_0x542ef6;throw CliErrors[_0x30667f(0xc9)](_0x29bafd);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a66_0x214cbe=a66_0x4531;(function(_0x18d69f,_0x59ada5){const _0x312b64=a66_0x4531,_0x1c575b=_0x18d69f();while(!![]){try{const _0x4856da=parseInt(_0x312b64(0xb8))/0x1+parseInt(_0x312b64(0xe5))/0x2+parseInt(_0x312b64(0xd4))/0x3+parseInt(_0x312b64(0xdb))/0x4+parseInt(_0x312b64(0xd6))/0x5+-parseInt(_0x312b64(0xd3))/0x6*(-parseInt(_0x312b64(0xe8))/0x7)+-parseInt(_0x312b64(0xc5))/0x8;if(_0x4856da===_0x59ada5)break;else _0x1c575b['push'](_0x1c575b['shift']());}catch(_0x3dafab){_0x1c575b['push'](_0x1c575b['shift']());}}}(a66_0x46de,0xec317));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH='/smartapi/dblink/updateTableBusinessGroup',METADATA_BACKEND_PATH=a66_0x214cbe(0xf0),UNGROUPED_BUSINESS_GROUP=a66_0x214cbe(0xd5);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x417417,input:_0x2227d8,dryRun:_0x1f03e1}){const _0xd0b198=a66_0x214cbe;validateInput(_0x2227d8);const _0x2ce275=normalizeBusinessGroupArgument(_0x2227d8[_0xd0b198(0xd2)]),_0x47ceb1=await getDatasetDetail(_0x2227d8[_0xd0b198(0xc4)]),_0x1e6b46=resolveBusinessGroupDataset(_0x47ceb1,_0x2227d8[_0xd0b198(0xc4)]);assertBusinessGroupUpdateSupported(_0x1e6b46,_0x2ce275);const _0x2a15ca=loadCurrentBusinessGroup(_0x47ceb1,_0x1e6b46);assertExpectedBusinessGroup(_0x2a15ca,_0x2227d8[_0xd0b198(0xba)]);const _0x111eb5=buildBackendPlan(_0x417417,_0x1e6b46,_0x2ce275),_0x3be323=_0x2a15ca!==_0x2ce275;let _0x54581a;if(_0x3be323&&!_0x1f03e1){_0x111eb5[_0xd0b198(0xde)]===_0xd0b198(0xe7)?await updateDbTableBusinessGroup(_0x111eb5['payload']):await updateErBusinessGroup(_0x111eb5[_0xd0b198(0xee)]);const _0x359695=await getDatasetDetail(_0x1e6b46[_0xd0b198(0xc4)]),_0x3b3d9f=resolveBusinessGroupDataset(_0x359695,_0x1e6b46[_0xd0b198(0xc4)]),_0x37b386=loadCurrentBusinessGroup(_0x359695,_0x3b3d9f);if(_0x37b386!==_0x2ce275)throw CliErrors['apiError'](_0xd0b198(0xf8),'Expected\x20'+JSON[_0xd0b198(0xf7)](displayBusinessGroup(_0x2ce275))+_0xd0b198(0xea)+JSON['stringify'](displayBusinessGroup(_0x37b386))+'.');_0x54581a={'verified':!![],'status':_0xd0b198(0xc9),'afterReadback':{'businessGroup':displayBusinessGroup(_0x37b386)}};}else!_0x3be323&&(_0x54581a={'verified':!![],'status':_0xd0b198(0xf5),'afterReadback':{'businessGroup':displayBusinessGroup(_0x2a15ca)}});const _0x4bcd22={'operation':_0xd0b198(0xcd),'appCode':_0x417417,'selector':{'code':_0x1e6b46[_0xd0b198(0xc4)]},'dataset':{'id':_0x1e6b46['id'],'code':_0x1e6b46[_0xd0b198(0xc4)],'name':_0x1e6b46[_0xd0b198(0xca)],'sourceType':_0x1e6b46[_0xd0b198(0xd0)]},'before':{'businessGroup':displayBusinessGroup(_0x2a15ca)},'after':{'businessGroup':displayBusinessGroup(_0x2ce275)},'changed':_0x3be323,'dryRun':_0x1f03e1,'submitted':_0x3be323&&!_0x1f03e1,'backend':{'method':_0x111eb5[_0xd0b198(0xfa)],'path':_0x111eb5[_0xd0b198(0xbe)],'payload':_0x111eb5['payload']},..._0x54581a?{'verification':_0x54581a}:{},'warnings':[]};return{'ok':!![],'data':_0x4bcd22,'message':_0x3be323?_0x1f03e1?_0xd0b198(0xcf)+_0x1e6b46[_0xd0b198(0xc4)]:_0xd0b198(0xb7)+_0x1e6b46[_0xd0b198(0xc4)]:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x1e6b46['code']};}export const datasetBusinessGroupUpdate={'service':a66_0x214cbe(0xf1),'command':a66_0x214cbe(0xeb),'description':a66_0x214cbe(0xf4),'risk':a66_0x214cbe(0xbf),'flags':[CODE_FLAG,{'name':a66_0x214cbe(0xec),'type':a66_0x214cbe(0xe2),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':'expect-business-group','type':'string','required':![],'description':a66_0x214cbe(0xc2)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x219d21){validateInput(readBusinessGroupUpdateInput(_0x219d21));},async 'dryRun'(_0xd72e76){const _0x2872ba=a66_0x214cbe,_0x21ead8=await buildDatasetBusinessGroupUpdateResult({'appCode':_0xd72e76[_0x2872ba(0xd9)],'input':readBusinessGroupUpdateInput(_0xd72e76),'dryRun':!![]});return{'method':_0x21ead8[_0x2872ba(0xb9)][_0x2872ba(0xbd)][_0x2872ba(0xfa)],'url':_0x21ead8[_0x2872ba(0xb9)][_0x2872ba(0xbd)]['path'],'body':_0x21ead8[_0x2872ba(0xb9)][_0x2872ba(0xbd)][_0x2872ba(0xee)],'description':_0x21ead8[_0x2872ba(0xfc)],..._0x21ead8[_0x2872ba(0xb9)]};},async 'execute'(_0xe4ed86){return buildDatasetBusinessGroupUpdateResult({'appCode':_0xe4ed86['appCode'],'input':readBusinessGroupUpdateInput(_0xe4ed86),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x2d7d19){const _0x4fb785=a66_0x214cbe,_0xb020f3=_0x2d7d19[_0x4fb785(0xed)]('expect-business-group');return{'code':trim(_0x2d7d19[_0x4fb785(0xed)](_0x4fb785(0xc4))),'businessGroup':_0x2d7d19[_0x4fb785(0xed)](_0x4fb785(0xec)),'expectBusinessGroup':_0xb020f3===undefined||_0xb020f3===''?undefined:_0xb020f3};}function validateInput(_0x1b71e5){const _0x3274f6=a66_0x214cbe;if(!trim(_0x1b71e5[_0x3274f6(0xc4)]))throw CliErrors[_0x3274f6(0xf9)]('--code\x20is\x20required');if(_0x1b71e5[_0x3274f6(0xd2)]===undefined)throw CliErrors[_0x3274f6(0xf9)](_0x3274f6(0xc1));if(!trim(_0x1b71e5[_0x3274f6(0xd2)]))throw CliErrors[_0x3274f6(0xf9)]('--business-group\x20must\x20not\x20be\x20blank');}function assertBusinessGroupUpdateSupported(_0x13778c,_0x46446a){const _0x5089f6=a66_0x214cbe;if(_0x13778c['sourceType']==='DB_TABLE'&&!_0x46446a)throw CliErrors[_0x5089f6(0xf9)](_0x5089f6(0xdc));}function resolveBusinessGroupDataset(_0x4d0a6b,_0x1cc7ad){const _0x4353f3=a66_0x214cbe,_0x56cdee=asPlainObject(_0x4d0a6b['dataset']),_0x144701=asPlainObject(_0x4d0a6b[_0x4353f3(0xd8)]),_0xebce02=resolveSourceType(_0x4d0a6b,_0x56cdee,_0x144701),_0x71eb09=firstString(_0x4d0a6b[_0x4353f3(0xf6)],_0x4d0a6b['code'],_0x56cdee['datasetCode'],_0x1cc7ad)||_0x1cc7ad;return{'id':firstNumber(_0x4d0a6b['modelId'],_0x4d0a6b['id'],_0x56cdee[_0x4353f3(0xbb)])??firstString(_0x4d0a6b[_0x4353f3(0xdd)],_0x4d0a6b['id'],_0x56cdee[_0x4353f3(0xbb)])??null,'code':_0x71eb09,'name':firstString(_0x4d0a6b[_0x4353f3(0xca)],_0x56cdee[_0x4353f3(0xf2)],_0x56cdee[_0x4353f3(0xca)])||null,'sourceType':_0xebce02,'dbTableSelector':_0xebce02===_0x4353f3(0xfb)?{'dbLinkId':firstNumber(_0x144701['dbId']),'tableName':firstString(_0x144701[_0x4353f3(0xc7)])||null}:null};}function resolveSourceType(_0x445acb,_0x429846,_0x2afc31){const _0x2990ab=a66_0x214cbe,_0x12fa25=firstString(_0x445acb[_0x2990ab(0xc8)],_0x445acb[_0x2990ab(0xd0)],_0x429846[_0x2990ab(0xc8)],_0x429846[_0x2990ab(0xd0)])?.[_0x2990ab(0xf3)]()[_0x2990ab(0xcc)]();if(_0x12fa25===_0x2990ab(0xfb)||_0x12fa25==='METADATA')return _0x12fa25;if(Object[_0x2990ab(0xe3)](_0x2afc31)[_0x2990ab(0xe6)]>0x0)return _0x2990ab(0xfb);throw CliErrors[_0x2990ab(0xf9)](_0x2990ab(0xe1));}function loadCurrentBusinessGroup(_0x10fd1c,_0x128ed3){const _0x22d640=a66_0x214cbe,_0x1a6099=readBusinessGroupFromDatasetDetail(_0x10fd1c,_0x128ed3[_0x22d640(0xd0)]);if(_0x1a6099[_0x22d640(0xdf)])return normalizeBusinessGroup(_0x1a6099['value']);return'';}function readBusinessGroupFromDatasetDetail(_0x25ba01,_0x5e7ade){const _0x25fea4=a66_0x214cbe,_0x3982a0=asPlainObject(_0x25ba01[_0x25fea4(0xf1)]),_0x430312=firstPresent(_0x25ba01[_0x25fea4(0xd2)]);if(_0x430312['found'])return _0x430312;const _0x9f256=firstPresent(_0x3982a0[_0x25fea4(0xd2)]);if(_0x9f256['found'])return _0x9f256;if(_0x5e7ade===_0x25fea4(0xfb))return{'found':![]};const _0x40877b=readBusinessGroupFromExtend(_0x25ba01[_0x25fea4(0xc6)]);if(_0x40877b[_0x25fea4(0xdf)])return _0x40877b;return readBusinessGroupFromExtend(_0x3982a0[_0x25fea4(0xc6)]);}function a66_0x46de(){const _0x58ba69=['dbtableConfig','appCode','isFinite','7251048RKildW','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','modelId','kind','found','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','string','keys','POST','3038324pqREYu','length','db-table','3142489DUyCda','prototype',',\x20actual\x20','business-group-update','business-group','str','payload','object','/smartapi/question/er-config/business-group/edit','dataset','datasetName','trim','Update\x20business\x20scenario\x20group','unchanged','modelCode','stringify','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','validation','method','DB_TABLE','message','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','365986ubMEVQ','data','expectBusinessGroup','datasetId','metadata','backend','path','write','dbLinkId','--business-group\x20is\x20required','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','parse','code','39719488Elcaiu','extend','tableName','source','matched','name','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','toUpperCase','update','number','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','sourceType','dbTableSelector','businessGroup','6kZwZDw','2774220ZXsVhV','ungrouped','4304030vDZwoS','call'];a66_0x46de=function(){return _0x58ba69;};return a66_0x46de();}function a66_0x4531(_0x8b76dc,_0x90b356){_0x8b76dc=_0x8b76dc-0xb7;const _0x46dee5=a66_0x46de();let _0x453186=_0x46dee5[_0x8b76dc];return _0x453186;}function readBusinessGroupFromExtend(_0x50ee0b){const _0x5ce3b3=a66_0x214cbe;if(_0x50ee0b===undefined||_0x50ee0b===null||_0x50ee0b==='')return{'found':![]};if(typeof _0x50ee0b===_0x5ce3b3(0xe2))try{const _0x422339=JSON[_0x5ce3b3(0xc3)](_0x50ee0b);return readBusinessGroupFromExtend(_0x422339);}catch{return{'found':![]};}const _0x3b71a8=asPlainObject(_0x50ee0b);if(Object[_0x5ce3b3(0xe9)]['hasOwnProperty'][_0x5ce3b3(0xd7)](_0x3b71a8,'businessGroup'))return{'found':!![],'value':_0x3b71a8[_0x5ce3b3(0xd2)]};return{'found':![]};}function firstPresent(..._0xbaf4a4){for(const _0x50cfe7 of _0xbaf4a4){if(_0x50cfe7!==undefined&&_0x50cfe7!==null)return{'found':!![],'value':_0x50cfe7};}return{'found':![]};}function assertExpectedBusinessGroup(_0xaacf1c,_0x309d6e){const _0x3fdbf9=a66_0x214cbe;if(_0x309d6e===undefined)return;const _0x5ea074=normalizeBusinessGroupArgument(_0x309d6e);if(_0xaacf1c!==_0x5ea074)throw CliErrors[_0x3fdbf9(0xf9)]('Expectation\x20mismatch\x20at\x20businessGroup','Expected\x20'+JSON[_0x3fdbf9(0xf7)](_0x5ea074)+',\x20actual\x20'+JSON[_0x3fdbf9(0xf7)](_0xaacf1c));}function buildBackendPlan(_0x43ef71,_0x1a26ac,_0x2a5c36){const _0x2ed342=a66_0x214cbe;if(_0x1a26ac['sourceType']===_0x2ed342(0xfb)){if(!_0x1a26ac[_0x2ed342(0xd1)]||_0x1a26ac['dbTableSelector'][_0x2ed342(0xc0)]===null||!_0x1a26ac['dbTableSelector'][_0x2ed342(0xc7)])throw CliErrors[_0x2ed342(0xf9)](_0x2ed342(0xcb),_0x2ed342(0xe0));return{'kind':_0x2ed342(0xe7),'method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x1a26ac[_0x2ed342(0xd1)][_0x2ed342(0xc0)],'tableName':_0x1a26ac[_0x2ed342(0xd1)]['tableName'],'businessGroup':_0x2a5c36}};}return{'kind':_0x2ed342(0xbc),'method':_0x2ed342(0xe4),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x43ef71,'datasetCode':_0x1a26ac[_0x2ed342(0xc4)],'businessGroup':_0x2a5c36}};}function normalizeBusinessGroup(_0x54ebbd){const _0x3aa0d5=a66_0x214cbe;if(_0x54ebbd===undefined||_0x54ebbd===null)return'';return String(_0x54ebbd)[_0x3aa0d5(0xf3)]();}function normalizeBusinessGroupArgument(_0x4d4ac4){const _0x1e1dfd=normalizeBusinessGroup(_0x4d4ac4);return _0x1e1dfd===UNGROUPED_BUSINESS_GROUP?'':_0x1e1dfd;}function displayBusinessGroup(_0x126e94){return _0x126e94||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x37d79c){const _0xfcd689=a66_0x214cbe;if(!_0x37d79c||typeof _0x37d79c!==_0xfcd689(0xef)||Array['isArray'](_0x37d79c))return{};return _0x37d79c;}function firstString(..._0x20d70f){const _0x59e0e9=a66_0x214cbe;for(const _0x3822ac of _0x20d70f){if(typeof _0x3822ac==='string'&&_0x3822ac[_0x59e0e9(0xf3)]())return _0x3822ac[_0x59e0e9(0xf3)]();if(typeof _0x3822ac===_0x59e0e9(0xce)&&Number[_0x59e0e9(0xda)](_0x3822ac))return String(_0x3822ac);}return undefined;}function firstNumber(..._0x275bec){const _0x381b66=a66_0x214cbe;for(const _0x10ea61 of _0x275bec){if(typeof _0x10ea61===_0x381b66(0xce)&&Number[_0x381b66(0xda)](_0x10ea61))return _0x10ea61;if(typeof _0x10ea61===_0x381b66(0xe2)&&_0x10ea61['trim']()&&Number[_0x381b66(0xda)](Number(_0x10ea61)))return Number(_0x10ea61);}return null;}function trim(_0x201ffe){const _0x395518=a66_0x214cbe;return String(_0x201ffe||'')[_0x395518(0xf3)]();}
|
|
1
|
+
const a66_0x428d61=a66_0x51d3;(function(_0x3c57a8,_0x436c56){const _0x5c270b=a66_0x51d3,_0xaceb99=_0x3c57a8();while(!![]){try{const _0x1e2b6e=parseInt(_0x5c270b(0x183))/0x1*(parseInt(_0x5c270b(0x18d))/0x2)+parseInt(_0x5c270b(0x15f))/0x3+-parseInt(_0x5c270b(0x190))/0x4+-parseInt(_0x5c270b(0x18c))/0x5*(parseInt(_0x5c270b(0x15a))/0x6)+-parseInt(_0x5c270b(0x187))/0x7+-parseInt(_0x5c270b(0x188))/0x8+-parseInt(_0x5c270b(0x165))/0x9*(parseInt(_0x5c270b(0x197))/0xa);if(_0x1e2b6e===_0x436c56)break;else _0xaceb99['push'](_0xaceb99['shift']());}catch(_0x5ea069){_0xaceb99['push'](_0xaceb99['shift']());}}}(a66_0x1082,0xbadeb));function a66_0x51d3(_0x29b089,_0x4f2044){_0x29b089=_0x29b089-0x155;const _0x108236=a66_0x1082();let _0x51d304=_0x108236[_0x29b089];return _0x51d304;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a66_0x428d61(0x158),METADATA_BACKEND_PATH=a66_0x428d61(0x16e),UNGROUPED_BUSINESS_GROUP=a66_0x428d61(0x199);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x2cd65e,input:_0x324264,dryRun:_0x2dad20}){const _0xc1fc49=a66_0x428d61;validateInput(_0x324264);const _0x1bd307=normalizeBusinessGroupArgument(_0x324264['businessGroup']),_0x293bf9=await getDatasetDetail(_0x324264[_0xc1fc49(0x192)]),_0x4241ed=resolveBusinessGroupDataset(_0x293bf9,_0x324264['code']);assertBusinessGroupUpdateSupported(_0x4241ed,_0x1bd307);const _0x2e83e9=loadCurrentBusinessGroup(_0x293bf9,_0x4241ed);assertExpectedBusinessGroup(_0x2e83e9,_0x324264[_0xc1fc49(0x19b)]);const _0x32b1ae=buildBackendPlan(_0x2cd65e,_0x4241ed,_0x1bd307),_0xebbe0b=_0x2e83e9!==_0x1bd307;let _0x41d66b;if(_0xebbe0b&&!_0x2dad20){_0x32b1ae[_0xc1fc49(0x162)]==='db-table'?await updateDbTableBusinessGroup(_0x32b1ae[_0xc1fc49(0x156)]):await updateErBusinessGroup(_0x32b1ae[_0xc1fc49(0x156)]);const _0x203f65=await getDatasetDetail(_0x4241ed[_0xc1fc49(0x192)]),_0x3328b1=resolveBusinessGroupDataset(_0x203f65,_0x4241ed[_0xc1fc49(0x192)]),_0x33feb7=loadCurrentBusinessGroup(_0x203f65,_0x3328b1);if(_0x33feb7!==_0x1bd307)throw CliErrors['apiError'](_0xc1fc49(0x172),_0xc1fc49(0x160)+JSON[_0xc1fc49(0x170)](displayBusinessGroup(_0x1bd307))+_0xc1fc49(0x173)+JSON[_0xc1fc49(0x170)](displayBusinessGroup(_0x33feb7))+'.');_0x41d66b={'verified':!![],'status':_0xc1fc49(0x17a),'afterReadback':{'businessGroup':displayBusinessGroup(_0x33feb7)}};}else!_0xebbe0b&&(_0x41d66b={'verified':!![],'status':_0xc1fc49(0x17c),'afterReadback':{'businessGroup':displayBusinessGroup(_0x2e83e9)}});const _0x320608={'operation':'update','appCode':_0x2cd65e,'selector':{'code':_0x4241ed[_0xc1fc49(0x192)]},'dataset':{'id':_0x4241ed['id'],'code':_0x4241ed[_0xc1fc49(0x192)],'name':_0x4241ed['name'],'sourceType':_0x4241ed[_0xc1fc49(0x16a)]},'before':{'businessGroup':displayBusinessGroup(_0x2e83e9)},'after':{'businessGroup':displayBusinessGroup(_0x1bd307)},'changed':_0xebbe0b,'dryRun':_0x2dad20,'submitted':_0xebbe0b&&!_0x2dad20,'backend':{'method':_0x32b1ae['method'],'path':_0x32b1ae[_0xc1fc49(0x177)],'payload':_0x32b1ae[_0xc1fc49(0x156)]},..._0x41d66b?{'verification':_0x41d66b}:{},'warnings':[]};return{'ok':!![],'data':_0x320608,'message':_0xebbe0b?_0x2dad20?_0xc1fc49(0x15c)+_0x4241ed['code']:_0xc1fc49(0x181)+_0x4241ed[_0xc1fc49(0x192)]:_0xc1fc49(0x19d)+_0x4241ed[_0xc1fc49(0x192)]};}export const datasetBusinessGroupUpdate={'service':a66_0x428d61(0x16b),'command':a66_0x428d61(0x18f),'description':a66_0x428d61(0x191),'risk':a66_0x428d61(0x176),'flags':[CODE_FLAG,{'name':'business-group','type':'string','required':!![],'description':a66_0x428d61(0x178)},{'name':a66_0x428d61(0x180),'type':'string','required':![],'description':a66_0x428d61(0x161)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x356c5e){validateInput(readBusinessGroupUpdateInput(_0x356c5e));},async 'dryRun'(_0x20c512){const _0xcc431c=a66_0x428d61,_0x2dc984=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x20c512['appCode'],'input':readBusinessGroupUpdateInput(_0x20c512),'dryRun':!![]});return{'method':_0x2dc984[_0xcc431c(0x157)][_0xcc431c(0x19c)]['method'],'url':_0x2dc984['data'][_0xcc431c(0x19c)][_0xcc431c(0x177)],'body':_0x2dc984['data'][_0xcc431c(0x19c)]['payload'],'description':_0x2dc984['message'],..._0x2dc984[_0xcc431c(0x157)]};},async 'execute'(_0x5a2fbb){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x5a2fbb['appCode'],'input':readBusinessGroupUpdateInput(_0x5a2fbb),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x5bccad){const _0x5cdb7b=a66_0x428d61,_0xbe4410=_0x5bccad[_0x5cdb7b(0x17f)](_0x5cdb7b(0x180));return{'code':trim(_0x5bccad[_0x5cdb7b(0x17f)]('code')),'businessGroup':_0x5bccad['str'](_0x5cdb7b(0x186)),'expectBusinessGroup':_0xbe4410===undefined||_0xbe4410===''?undefined:_0xbe4410};}function validateInput(_0x1e2e1b){const _0x2c59a6=a66_0x428d61;if(!trim(_0x1e2e1b[_0x2c59a6(0x192)]))throw CliErrors[_0x2c59a6(0x164)]('--code\x20is\x20required');if(_0x1e2e1b[_0x2c59a6(0x185)]===undefined)throw CliErrors[_0x2c59a6(0x164)](_0x2c59a6(0x195));if(!trim(_0x1e2e1b[_0x2c59a6(0x185)]))throw CliErrors[_0x2c59a6(0x164)](_0x2c59a6(0x184));}function assertBusinessGroupUpdateSupported(_0x3343d,_0x35cb04){const _0x4b6047=a66_0x428d61;if(_0x3343d[_0x4b6047(0x16a)]===_0x4b6047(0x15d)&&!_0x35cb04)throw CliErrors['validation'](_0x4b6047(0x19e));}function resolveBusinessGroupDataset(_0x23414c,_0x53afb1){const _0x1cdc05=a66_0x428d61,_0x45204d=asPlainObject(_0x23414c[_0x1cdc05(0x16b)]),_0xf18043=asPlainObject(_0x23414c['dbtableConfig']),_0x461ddd=resolveSourceType(_0x23414c,_0x45204d,_0xf18043),_0x1457fa=firstString(_0x23414c['modelCode'],_0x23414c[_0x1cdc05(0x192)],_0x45204d['datasetCode'],_0x53afb1)||_0x53afb1;return{'id':firstNumber(_0x23414c[_0x1cdc05(0x18b)],_0x23414c['id'],_0x45204d['datasetId'])??firstString(_0x23414c['modelId'],_0x23414c['id'],_0x45204d[_0x1cdc05(0x159)])??null,'code':_0x1457fa,'name':firstString(_0x23414c['name'],_0x45204d[_0x1cdc05(0x169)],_0x45204d['name'])||null,'sourceType':_0x461ddd,'dbTableSelector':_0x461ddd==='DB_TABLE'?{'dbLinkId':firstNumber(_0xf18043['dbId']),'tableName':firstString(_0xf18043[_0x1cdc05(0x16d)])||null}:null};}function resolveSourceType(_0x5d0be2,_0x88f2b6,_0x21a8ee){const _0xb4f980=a66_0x428d61,_0x346ab7=firstString(_0x5d0be2[_0xb4f980(0x189)],_0x5d0be2[_0xb4f980(0x16a)],_0x88f2b6[_0xb4f980(0x189)],_0x88f2b6['sourceType'])?.[_0xb4f980(0x198)]()[_0xb4f980(0x16f)]();if(_0x346ab7===_0xb4f980(0x15d)||_0x346ab7===_0xb4f980(0x196))return _0x346ab7;if(Object[_0xb4f980(0x18a)](_0x21a8ee)[_0xb4f980(0x166)]>0x0)return'DB_TABLE';throw CliErrors[_0xb4f980(0x164)](_0xb4f980(0x179));}function loadCurrentBusinessGroup(_0x45ae9b,_0x132179){const _0xc5d94b=a66_0x428d61,_0x459a5f=readBusinessGroupFromDatasetDetail(_0x45ae9b,_0x132179[_0xc5d94b(0x16a)]);if(_0x459a5f['found'])return normalizeBusinessGroup(_0x459a5f[_0xc5d94b(0x194)]);return'';}function readBusinessGroupFromDatasetDetail(_0x1ae2e8,_0x32e55c){const _0x1a4c1d=a66_0x428d61,_0x267dd9=asPlainObject(_0x1ae2e8[_0x1a4c1d(0x16b)]),_0x1ddc6f=firstPresent(_0x1ae2e8[_0x1a4c1d(0x185)]);if(_0x1ddc6f[_0x1a4c1d(0x175)])return _0x1ddc6f;const _0x4db6e1=firstPresent(_0x267dd9[_0x1a4c1d(0x185)]);if(_0x4db6e1[_0x1a4c1d(0x175)])return _0x4db6e1;if(_0x32e55c===_0x1a4c1d(0x15d))return{'found':![]};const _0x41c666=readBusinessGroupFromExtend(_0x1ae2e8['extend']);if(_0x41c666[_0x1a4c1d(0x175)])return _0x41c666;return readBusinessGroupFromExtend(_0x267dd9[_0x1a4c1d(0x17e)]);}function readBusinessGroupFromExtend(_0x6f0dd5){const _0x446844=a66_0x428d61;if(_0x6f0dd5===undefined||_0x6f0dd5===null||_0x6f0dd5==='')return{'found':![]};if(typeof _0x6f0dd5===_0x446844(0x167))try{const _0x3944ec=JSON[_0x446844(0x174)](_0x6f0dd5);return readBusinessGroupFromExtend(_0x3944ec);}catch{return{'found':![]};}const _0x5be2b7=asPlainObject(_0x6f0dd5);if(Object[_0x446844(0x17b)]['hasOwnProperty'][_0x446844(0x19a)](_0x5be2b7,_0x446844(0x185)))return{'found':!![],'value':_0x5be2b7[_0x446844(0x185)]};return{'found':![]};}function firstPresent(..._0x2c1895){for(const _0xecf5e5 of _0x2c1895){if(_0xecf5e5!==undefined&&_0xecf5e5!==null)return{'found':!![],'value':_0xecf5e5};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4b1af7,_0x121106){const _0x33b909=a66_0x428d61;if(_0x121106===undefined)return;const _0x2f55ef=normalizeBusinessGroupArgument(_0x121106);if(_0x4b1af7!==_0x2f55ef)throw CliErrors['validation'](_0x33b909(0x171),_0x33b909(0x160)+JSON[_0x33b909(0x170)](_0x2f55ef)+',\x20actual\x20'+JSON[_0x33b909(0x170)](_0x4b1af7));}function buildBackendPlan(_0x5cd6c5,_0x567f17,_0x496ac1){const _0x2e294c=a66_0x428d61;if(_0x567f17[_0x2e294c(0x16a)]===_0x2e294c(0x15d)){if(!_0x567f17['dbTableSelector']||_0x567f17['dbTableSelector'][_0x2e294c(0x18e)]===null||!_0x567f17[_0x2e294c(0x16c)][_0x2e294c(0x16d)])throw CliErrors[_0x2e294c(0x164)](_0x2e294c(0x15e),'Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.');return{'kind':_0x2e294c(0x193),'method':_0x2e294c(0x15b),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x567f17[_0x2e294c(0x16c)]['dbLinkId'],'tableName':_0x567f17['dbTableSelector']['tableName'],'businessGroup':_0x496ac1}};}return{'kind':_0x2e294c(0x17d),'method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x5cd6c5,'datasetCode':_0x567f17['code'],'businessGroup':_0x496ac1}};}function normalizeBusinessGroup(_0xaf542e){if(_0xaf542e===undefined||_0xaf542e===null)return'';return String(_0xaf542e)['trim']();}function normalizeBusinessGroupArgument(_0x85eba6){const _0x5d4e50=normalizeBusinessGroup(_0x85eba6);return _0x5d4e50===UNGROUPED_BUSINESS_GROUP?'':_0x5d4e50;}function displayBusinessGroup(_0x35764c){return _0x35764c||UNGROUPED_BUSINESS_GROUP;}function a66_0x1082(){const _0x4edd25=['DB_TABLE','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','4195731UGXJDM','Expected\x20','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','kind','isArray','validation','9cxmLGD','length','string','object','datasetName','sourceType','dataset','dbTableSelector','tableName','/smartapi/question/er-config/business-group/edit','toUpperCase','stringify','Expectation\x20mismatch\x20at\x20businessGroup','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',',\x20actual\x20','parse','found','write','path','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','matched','prototype','unchanged','metadata','extend','str','expect-business-group','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','isFinite','265gUZCnu','--business-group\x20must\x20not\x20be\x20blank','businessGroup','business-group','1575119UnvhLg','5020240wwqhhG','source','keys','modelId','218505spPYUc','9078EFGPdJ','dbLinkId','business-group-update','274648blBYcO','Update\x20business\x20scenario\x20group','code','db-table','value','--business-group\x20is\x20required','METADATA','4340730teNUSZ','trim','ungrouped','call','expectBusinessGroup','backend','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','number','payload','data','/smartapi/dblink/updateTableBusinessGroup','datasetId','66bHgpnm','POST','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'];a66_0x1082=function(){return _0x4edd25;};return a66_0x1082();}function asPlainObject(_0x2b1168){const _0x2a33c2=a66_0x428d61;if(!_0x2b1168||typeof _0x2b1168!==_0x2a33c2(0x168)||Array[_0x2a33c2(0x163)](_0x2b1168))return{};return _0x2b1168;}function firstString(..._0x76b42){const _0x48e9f5=a66_0x428d61;for(const _0x3cbd81 of _0x76b42){if(typeof _0x3cbd81==='string'&&_0x3cbd81['trim']())return _0x3cbd81[_0x48e9f5(0x198)]();if(typeof _0x3cbd81===_0x48e9f5(0x155)&&Number[_0x48e9f5(0x182)](_0x3cbd81))return String(_0x3cbd81);}return undefined;}function firstNumber(..._0x3a5c01){const _0xb2fff6=a66_0x428d61;for(const _0x4de8d1 of _0x3a5c01){if(typeof _0x4de8d1===_0xb2fff6(0x155)&&Number[_0xb2fff6(0x182)](_0x4de8d1))return _0x4de8d1;if(typeof _0x4de8d1==='string'&&_0x4de8d1[_0xb2fff6(0x198)]()&&Number[_0xb2fff6(0x182)](Number(_0x4de8d1)))return Number(_0x4de8d1);}return null;}function trim(_0x319733){return String(_0x319733||'')['trim']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a67_0x4d8aa4=a67_0x2997;(function(_0x53a207,_0x2978e7){const _0xa311ea=a67_0x2997,_0x10fc2f=_0x53a207();while(!![]){try{const _0x562e55=-parseInt(_0xa311ea(0x9f))/0x1+parseInt(_0xa311ea(0xab))/0x2*(-parseInt(_0xa311ea(0x9a))/0x3)+-parseInt(_0xa311ea(0xa3))/0x4+-parseInt(_0xa311ea(0xa8))/0x5+parseInt(_0xa311ea(0x9d))/0x6+-parseInt(_0xa311ea(0xa5))/0x7*(parseInt(_0xa311ea(0xb1))/0x8)+parseInt(_0xa311ea(0x99))/0x9*(parseInt(_0xa311ea(0x9e))/0xa);if(_0x562e55===_0x2978e7)break;else _0x10fc2f['push'](_0x10fc2f['shift']());}catch(_0x5ba6ea){_0x10fc2f['push'](_0x10fc2f['shift']());}}}(a67_0x571a,0x332bf));function a67_0x2997(_0xf8a076,_0x249115){_0xf8a076=_0xf8a076-0x99;const _0x571a61=a67_0x571a();let _0x29976e=_0x571a61[_0xf8a076];return _0x29976e;}function a67_0x571a(){const _0x38e522=['List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','8Dmusyt','351693SQYbNz','1033302xvIGcG','dbid','num','2158290WpYtDj','230LhVXCx','200214dOZdLt','trim','number','businessGroup','540004cewJzW','groups','411565Yyuzms','read','dataset','1552215RoWrJF','ungrouped','DB_TABLE','2OwXUZy','length','\x20business\x20group(s)\x20for\x20database\x20connection\x20','Found\x20'];a67_0x571a=function(){return _0x38e522;};return a67_0x571a();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a67_0x4d8aa4(0xa7),'command':'business-groups','description':a67_0x4d8aa4(0xaf),'risk':a67_0x4d8aa4(0xa6),'flags':[{'name':a67_0x4d8aa4(0x9b),'type':a67_0x4d8aa4(0xa1),'required':!![],'description':a67_0x4d8aa4(0xb0)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1474f3){const _0x537c87=a67_0x4d8aa4,_0x11a1ae=_0x1474f3[_0x537c87(0x9c)](_0x537c87(0x9b)),_0x12ecbd=await getErBusinessGroupSummary(_0x1474f3['appCode'],_0x11a1ae),_0x22171b=_0x12ecbd[_0x537c87(0xa4)]['map'](_0x149d2d=>({..._0x149d2d,'businessGroup':_0x149d2d[_0x537c87(0xa2)][_0x537c87(0xa0)]()||_0x537c87(0xa9)}));return{'ok':!![],'data':{..._0x12ecbd,'groups':_0x22171b,'scope':_0x537c87(0xaa)},'message':_0x537c87(0xae)+_0x22171b[_0x537c87(0xac)]+_0x537c87(0xad)+_0x11a1ae};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x570250=a68_0x39bc;function a68_0x39bc(_0x616b16,_0x42e3f2){_0x616b16=_0x616b16-0x1a9;const _0x4d51fc=a68_0x4d51();let _0x39bc30=_0x4d51fc[_0x616b16];return _0x39bc30;}(function(_0x1f81dc,_0x3c8bf8){const _0x414a66=a68_0x39bc,_0x10b694=_0x1f81dc();while(!![]){try{const _0x3b68a2=-parseInt(_0x414a66(0x1af))/0x1*(-parseInt(_0x414a66(0x1cb))/0x2)+-parseInt(_0x414a66(0x1cd))/0x3*(-parseInt(_0x414a66(0x1cc))/0x4)+-parseInt(_0x414a66(0x1b6))/0x5*(parseInt(_0x414a66(0x1c8))/0x6)+parseInt(_0x414a66(0x1bc))/0x7+-parseInt(_0x414a66(0x1b9))/0x8*(parseInt(_0x414a66(0x1ad))/0x9)+parseInt(_0x414a66(0x1c9))/0xa*(parseInt(_0x414a66(0x1be))/0xb)+-parseInt(_0x414a66(0x1b1))/0xc;if(_0x3b68a2===_0x3c8bf8)break;else _0x10b694['push'](_0x10b694['shift']());}catch(_0x45b022){_0x10b694['push'](_0x10b694['shift']());}}}(a68_0x4d51,0x89503));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a68_0x570250(0x1c7),'filter':a68_0x570250(0x1c6),'getOne':a68_0x570250(0x1b2)};export const RUNTIME_DATA_ACCESS_SUMMARY=a68_0x570250(0x1ab);function valueToString(_0x1cbbd9){return _0x1cbbd9==null?'':String(_0x1cbbd9)['trim']();}function getDatasetCode(_0x20b6e5){const _0x4b97ca=a68_0x570250;return valueToString(_0x20b6e5[_0x4b97ca(0x1c5)]??_0x20b6e5[_0x4b97ca(0x1d0)]??_0x20b6e5[_0x4b97ca(0x1b0)]?.[_0x4b97ca(0x1c4)]);}function getDatasetName(_0x13facd){const _0x58ad14=a68_0x570250;return valueToString(_0x13facd[_0x58ad14(0x1b4)]??_0x13facd[_0x58ad14(0x1b0)]?.['datasetName'])||_0x58ad14(0x1bd);}function a68_0x4d51(){const _0x35eefa=['5WFUHat','sourceType','source','992tfzngH','dbtableConfig','SQL\x20schema\x20validation','5878257rhCAWr','unknown','22rkPPQF','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','METADATA','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','UNKNOWN','The\x20current\x20dataset\x20\x22','datasetCode','code','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','lovrabet','3724386XTuWdn','4020530fbDPHr','length','102ChilXu','56KedmCA','219189jIeWrh','join','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','modelCode','tableName','toUpperCase','validation','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','object','34677HTJSCN','filter','1995IXthbA','dataset','13290552gMAped','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','name','\x20is\x20'];a68_0x4d51=function(){return _0x35eefa;};return a68_0x4d51();}function getDatasetSource(_0x9bc6d4){const _0x2ae3cd=a68_0x570250;return valueToString(_0x9bc6d4[_0x2ae3cd(0x1b8)]??_0x9bc6d4[_0x2ae3cd(0x1b0)]?.[_0x2ae3cd(0x1b7)])[_0x2ae3cd(0x1a9)]();}function getDbtableConfig(_0x48581d){const _0x2fea63=a68_0x570250,_0xeff01=_0x48581d[_0x2fea63(0x1ba)]??_0x48581d['dbtable'];return _0xeff01&&typeof _0xeff01===_0x2fea63(0x1ac)?_0xeff01:{};}export function isDbTableBackedDataset(_0x545a43){const _0x37ece1=a68_0x570250,_0x3924b9=getDatasetSource(_0x545a43);if(_0x3924b9===_0x37ece1(0x1c0))return![];const _0x748fdf=getDbtableConfig(_0x545a43),_0x4961d4=_0x748fdf['dbId']??_0x748fdf['id'],_0x28bcbc=valueToString(_0x748fdf[_0x37ece1(0x1d1)]??_0x545a43[_0x37ece1(0x1d1)]??_0x545a43[_0x37ece1(0x1b0)]?.['tableName']);return _0x4961d4!==undefined&&_0x4961d4!==null&&_0x28bcbc[_0x37ece1(0x1ca)]>0x0;}export function filterDbTableBackedDatasets(_0x2d3e14){const _0x5d2c7e=a68_0x570250;return _0x2d3e14[_0x5d2c7e(0x1ae)](_0x1ec1f0=>isDbTableBackedDataset(_0x1ec1f0));}export function buildDbTableBackedRequirementMessage(_0x4cf880,_0x2fd3f6=a68_0x570250(0x1bb)){const _0x33a458=a68_0x570250,_0x855462=getDatasetSource(_0x4cf880)||_0x33a458(0x1c2),_0x500cda=getDatasetName(_0x4cf880),_0x9a5786=getDatasetCode(_0x4cf880),_0x57c708=_0x9a5786?'\x20('+_0x9a5786+')':'';return[_0x33a458(0x1c3)+_0x500cda+'\x22'+_0x57c708+_0x33a458(0x1b5)+_0x855462+_0x33a458(0x1c1)+_0x2fd3f6+'.',_0x33a458(0x1bf),_0x33a458(0x1b3),_0x33a458(0x1cf)+RUNTIME_DATA_ACCESS_COMMANDS[_0x33a458(0x1ae)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'.'][_0x33a458(0x1ce)]('\x20');}export function assertDatasetIsDbTableBacked(_0x378889,_0x33d3fc){const _0x3777b9=a68_0x570250;if(!isDbTableBackedDataset(_0x378889))throw CliErrors[_0x3777b9(0x1aa)](buildDbTableBackedRequirementMessage(_0x378889,_0x33d3fc));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a69_0x597bfb=a69_0x3752;function a69_0x3752(_0x56f3c7,_0x26a15a){_0x56f3c7=_0x56f3c7-0x16a;const _0x374fd2=a69_0x374f();let _0x375249=_0x374fd2[_0x56f3c7];return _0x375249;}(function(_0x267a38,_0x45ebd8){const _0x59d5db=a69_0x3752,_0x56b8b1=_0x267a38();while(!![]){try{const _0x657206=-parseInt(_0x59d5db(0x175))/0x1*(parseInt(_0x59d5db(0x170))/0x2)+-parseInt(_0x59d5db(0x174))/0x3+-parseInt(_0x59d5db(0x16e))/0x4+-parseInt(_0x59d5db(0x178))/0x5+-parseInt(_0x59d5db(0x16f))/0x6+-parseInt(_0x59d5db(0x176))/0x7*(-parseInt(_0x59d5db(0x16a))/0x8)+-parseInt(_0x59d5db(0x16c))/0x9*(-parseInt(_0x59d5db(0x16d))/0xa);if(_0x657206===_0x45ebd8)break;else _0x56b8b1['push'](_0x56b8b1['shift']());}catch(_0x51c368){_0x56b8b1['push'](_0x56b8b1['shift']());}}}(a69_0x374f,0xc9e6a));import{createCrossDbRelation}from'../../core/api-client.js';function a69_0x374f(){const _0x116451=['14WqeiJU','create','dataset','write','4315167WZnxbB','85949zLlFkq','308TDEmzK','cross-relation-create','3051230LcdPJO','213008QvUAlB','Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','9vEqyDt','39912230YXDpzv','3330008EnEZOo','5118006wxzKfr'];a69_0x374f=function(){return _0x116451;};return a69_0x374f();}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':a69_0x597bfb(0x172),'command':a69_0x597bfb(0x177),'description':a69_0x597bfb(0x16b),'risk':a69_0x597bfb(0x173),'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 _0x45755b=>validateCrossRelation(_0x45755b,a69_0x597bfb(0x171)),'dryRun':_0x47a8dc=>previewCrossRelation(_0x47a8dc,a69_0x597bfb(0x171)),'execute':_0x205781=>executeCrossRelation(_0x205781,a69_0x597bfb(0x171),createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x525321=a70_0x5a65;function a70_0x5a65(_0x52e9de,_0x1bac58){_0x52e9de=_0x52e9de-0xe4;const _0x2f3c00=a70_0x2f3c();let _0x5a6560=_0x2f3c00[_0x52e9de];return _0x5a6560;}(function(_0x585371,_0x416810){const _0x753d3b=a70_0x5a65,_0x5be838=_0x585371();while(!![]){try{const _0x387eba=-parseInt(_0x753d3b(0xe6))/0x1+-parseInt(_0x753d3b(0xec))/0x2*(parseInt(_0x753d3b(0xe8))/0x3)+-parseInt(_0x753d3b(0xf1))/0x4*(-parseInt(_0x753d3b(0xe5))/0x5)+-parseInt(_0x753d3b(0xf0))/0x6*(parseInt(_0x753d3b(0xf2))/0x7)+parseInt(_0x753d3b(0xee))/0x8*(parseInt(_0x753d3b(0xed))/0x9)+parseInt(_0x753d3b(0xef))/0xa*(-parseInt(_0x753d3b(0xea))/0xb)+parseInt(_0x753d3b(0xe9))/0xc;if(_0x387eba===_0x416810)break;else _0x5be838['push'](_0x5be838['shift']());}catch(_0x1bcdb3){_0x5be838['push'](_0x5be838['shift']());}}}(a70_0x2f3c,0xbca34));function a70_0x2f3c(){const _0x4c0f11=['1034EThbLe','dataset','295706xxsngU','531HojaYW','186952fvNVUM','63670cHJowP','60ngyMMr','501224SBSNHU','366527cfppgW','delete','5XwkPaT','1450666GhEdwQ','Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','9cCgVkL','27418992rFruKy'];a70_0x2f3c=function(){return _0x4c0f11;};return a70_0x2f3c();}import{deleteCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationDelete={'service':a70_0x525321(0xeb),'command':'cross-relation-delete','description':a70_0x525321(0xe7),'risk':'high-risk-write','strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL],'validate':async _0x23b94f=>validateCrossRelation(_0x23b94f,a70_0x525321(0xe4)),'dryRun':_0x6eb693=>previewCrossRelation(_0x6eb693,a70_0x525321(0xe4)),'execute':_0x595509=>executeCrossRelation(_0x595509,a70_0x525321(0xe4),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x406f2e=a71_0xb2ce;(function(_0x42b29a,_0x3f2aaf){const _0x4dc513=a71_0xb2ce,_0x26c5bd=_0x42b29a();while(!![]){try{const _0x2f8b0e=-parseInt(_0x4dc513(0x100))/0x1*(parseInt(_0x4dc513(0x106))/0x2)+parseInt(_0x4dc513(0x101))/0x3+parseInt(_0x4dc513(0x10f))/0x4*(-parseInt(_0x4dc513(0x108))/0x5)+parseInt(_0x4dc513(0x10e))/0x6*(-parseInt(_0x4dc513(0x109))/0x7)+-parseInt(_0x4dc513(0x102))/0x8*(-parseInt(_0x4dc513(0x105))/0x9)+-parseInt(_0x4dc513(0x104))/0xa+-parseInt(_0x4dc513(0x10a))/0xb*(-parseInt(_0x4dc513(0x111))/0xc);if(_0x2f8b0e===_0x3f2aaf)break;else _0x26c5bd['push'](_0x26c5bd['shift']());}catch(_0x1465ec){_0x26c5bd['push'](_0x26c5bd['shift']());}}}(a71_0x49d5,0x43473));import{queryCrossDbRelations}from'../../core/api-client.js';function a71_0x49d5(){const _0x477007=['list','appCode','6DrFQlC','19888Lvyhgh','map','1623276zHxjlF','Cross-database\x20relations:\x20','length','26nHvhxM','926865zmMLix','639896dnTuLQ','\x20relation(s)','5064890NTYFCU','18NlntOZ','34446lGgdbz','List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','10zKDonW','285355KBgcRH','66LJwzdq','read'];a71_0x49d5=function(){return _0x477007;};return a71_0x49d5();}import{APPCODE_FLAG_OPTIONAL,CROSS_RELATION_DBLINK_FLAG,CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG}from'../../commands/common/flags.js';function a71_0xb2ce(_0x399d78,_0x583b89){_0x399d78=_0x399d78-0xfe;const _0x49d54c=a71_0x49d5();let _0xb2cef4=_0x49d54c[_0x399d78];return _0xb2cef4;}import{projectCrossRelation,resolveCrossRelationQuery,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationList={'service':'dataset','command':'cross-relation-list','description':a71_0x406f2e(0x107),'risk':a71_0x406f2e(0x10b),'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 _0x2e7faa=>validateCrossRelation(_0x2e7faa,a71_0x406f2e(0x10c)),async 'execute'(_0x5bd114){const _0xb6180f=a71_0x406f2e,_0x3c9bb6=await resolveCrossRelationQuery(_0x5bd114),_0x14ab7b=await queryCrossDbRelations(_0x3c9bb6);return{'ok':!![],'data':{'appCode':_0x5bd114[_0xb6180f(0x10d)],'selector':_0x3c9bb6,'total':_0x14ab7b['length'],'relations':_0x14ab7b[_0xb6180f(0x110)](projectCrossRelation)},'message':_0xb6180f(0xfe)+_0x14ab7b[_0xb6180f(0xff)]+_0xb6180f(0x103)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a72_0xf05f7=a72_0x34ba;(function(_0x4d8c24,_0x5f34dd){const _0x3383e2=a72_0x34ba,_0x24bdee=_0x4d8c24();while(!![]){try{const _0x1ef1c1=-parseInt(_0x3383e2(0x89))/0x1+parseInt(_0x3383e2(0x9a))/0x2+-parseInt(_0x3383e2(0x70))/0x3*(-parseInt(_0x3383e2(0x76))/0x4)+-parseInt(_0x3383e2(0x65))/0x5*(-parseInt(_0x3383e2(0xbc))/0x6)+-parseInt(_0x3383e2(0xb8))/0x7+parseInt(_0x3383e2(0x69))/0x8+-parseInt(_0x3383e2(0xb9))/0x9;if(_0x1ef1c1===_0x5f34dd)break;else _0x24bdee['push'](_0x24bdee['shift']());}catch(_0x484636){_0x24bdee['push'](_0x24bdee['shift']());}}}(a72_0x2627,0x3d2ba));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 a72_0x34ba(_0x54482d,_0x23c227){_0x54482d=_0x54482d-0x64;const _0x2627fe=a72_0x2627();let _0x34ba22=_0x2627fe[_0x54482d];return _0x34ba22;}function required(_0x4abd26,_0x18456f){const _0x82e0e=a72_0x34ba,_0x3af0f3=_0x4abd26[_0x82e0e(0xa4)](_0x18456f)['trim']();if(!_0x3af0f3)throw CliErrors[_0x82e0e(0x68)](_0x18456f);return _0x3af0f3;}function explicitDblink(_0x179b69){const _0x1d755c=a72_0x34ba,_0xe8a7bf=_0x179b69['flag'](_0x1d755c(0xba));if(_0xe8a7bf===undefined||_0xe8a7bf===null)return undefined;const _0x5b5703=Number(_0xe8a7bf);if(!Number[_0x1d755c(0x93)](_0x5b5703)||_0x5b5703<=0x0)throw CliErrors['validation'](_0x1d755c(0x64));return _0x5b5703;}export function validateCrossRelation(_0x21281e,_0x327531){const _0x2b2113=a72_0x34ba,_0x357801=explicitDblink(_0x21281e);if(_0x327531===_0x2b2113(0xa8)){if(!_0x21281e[_0x2b2113(0xa4)](_0x2b2113(0x82))[_0x2b2113(0x8c)]()&&_0x357801===undefined)throw CliErrors[_0x2b2113(0xac)](_0x2b2113(0x86));return;}required(_0x21281e,_0x2b2113(0x82)),required(_0x21281e,'from-column');if(_0x327531!==_0x2b2113(0x85)){required(_0x21281e,'to-datasetcode'),required(_0x21281e,_0x2b2113(0x97));const _0x2f187c=_0x21281e[_0x2b2113(0xa4)](_0x2b2113(0x71))[_0x2b2113(0x8c)]();if(_0x2f187c&&!CROSS_RELATION_CARDINALITY_FLAG[_0x2b2113(0x74)][_0x2b2113(0xb2)](_0x2f187c))throw CliErrors[_0x2b2113(0xac)](_0x2b2113(0xaa));}}async function resolveEndpoint(_0x1d782c){const _0x4952ce=a72_0x34ba,_0x4e95fa=await getDatasetDetail(_0x1d782c),_0x283a59=_0x4e95fa?.['dataset']??{};if((_0x4e95fa?.[_0x4952ce(0x96)]??_0x283a59['sourceType'])!==_0x4952ce(0x6d))throw CliErrors['validation']('Dataset\x20'+_0x1d782c+_0x4952ce(0x83));const _0x133076=_0x4e95fa[_0x4952ce(0xa6)]??_0x4e95fa[_0x4952ce(0x6a)]??{};let _0x16fda8=_0x4e95fa['extend']??_0x283a59[_0x4952ce(0x67)]??{};if(typeof _0x16fda8===_0x4952ce(0xa0))try{_0x16fda8=_0x16fda8['trim']()?JSON[_0x4952ce(0x72)](_0x16fda8):{};}catch{throw CliErrors['validation'](_0x4952ce(0xb3)+_0x1d782c+'\x20has\x20invalid\x20storage\x20configuration.');}const _0x2896cd=Number(_0x16fda8?.[_0x4952ce(0x84)]?.[_0x4952ce(0x94)]??_0x4e95fa[_0x4952ce(0x84)]?.[_0x4952ce(0x94)]??_0x283a59[_0x4952ce(0x84)]?.[_0x4952ce(0x94)]??_0x133076[_0x4952ce(0x94)]??_0x283a59['dbId']??_0x4e95fa[_0x4952ce(0x94)]),_0xaf5929=String(_0x4e95fa[_0x4952ce(0x95)]??_0x283a59[_0x4952ce(0x95)]??_0x133076[_0x4952ce(0x95)]??'')[_0x4952ce(0x8c)]();if(!Number[_0x4952ce(0x93)](_0x2896cd)||_0x2896cd<=0x0||!_0xaf5929)throw CliErrors[_0x4952ce(0xac)]('Dataset\x20'+_0x1d782c+_0x4952ce(0xb0));return{'datasetCode':_0x1d782c,'dblinkId':_0x2896cd,'table':_0xaf5929};}export async function resolveCrossRelationQuery(_0x376303){const _0x2b8abc=a72_0x34ba,_0x5e5e26=_0x376303[_0x2b8abc(0xa4)]('from-datasetcode')['trim'](),_0x25f229=explicitDblink(_0x376303),_0x1b691d=_0x5e5e26?await resolveEndpoint(_0x5e5e26):undefined;if(_0x1b691d&&_0x25f229!==undefined&&_0x1b691d[_0x2b8abc(0xaf)]!==_0x25f229)throw CliErrors[_0x2b8abc(0xac)](_0x2b8abc(0x79));const _0x44f4c7=_0x1b691d?.[_0x2b8abc(0xaf)]??_0x25f229;if(_0x44f4c7===undefined)throw CliErrors['validation'](_0x2b8abc(0x86));return{'appCode':_0x376303[_0x2b8abc(0x73)],'fromDblinkId':_0x44f4c7,..._0x5e5e26?{'fromDatasetCode':_0x5e5e26}:{},..._0x376303[_0x2b8abc(0xa4)](_0x2b8abc(0x98))['trim']()?{'fromField':_0x376303['str'](_0x2b8abc(0x98))[_0x2b8abc(0x8c)]()}:{}};}export function projectCrossRelation(_0x3810e2){const _0x2af63b=a72_0x34ba;return{'relationId':_0x3810e2[_0x2af63b(0x7b)],'from':{'source':_0x2af63b(0x6d),'datasetCode':_0x3810e2[_0x2af63b(0xbb)],'datasetName':_0x3810e2[_0x2af63b(0x9d)],'dblinkId':_0x3810e2['fromDblinkId'],'table':_0x3810e2['fromTableName'],'field':_0x3810e2['fromField']},'to':{'source':_0x2af63b(0x6d),'datasetCode':_0x3810e2[_0x2af63b(0x8e)],'datasetName':_0x3810e2['toDatasetName'],'dblinkId':_0x3810e2[_0x2af63b(0xa2)],'table':_0x3810e2[_0x2af63b(0xbd)],'field':_0x3810e2[_0x2af63b(0x6f)],'labelField':_0x3810e2[_0x2af63b(0xa3)]},'relation':{'cardinality':_0x3810e2[_0x2af63b(0x71)],'relationType':_0x3810e2[_0x2af63b(0xa7)]}};}function ambiguity(_0x4c4571){const _0x36c9ef=a72_0x34ba,_0x35a063=CliErrors[_0x36c9ef(0xac)](_0x36c9ef(0x80),_0x36c9ef(0x8a));return Object[_0x36c9ef(0x75)](_0x35a063,_0x36c9ef(0xbe),{'value':{'candidates':_0x4c4571['map'](projectCrossRelation)}}),_0x35a063;}const sameName=(_0x414c6f,_0x47c018)=>_0x414c6f['toLowerCase']()===_0x47c018[a72_0xf05f7(0x7d)]();function a72_0x2627(){const _0x18a3a4=['create','some','fromDatasetName','from','matched','string','table','toDblinkId','refTableLabelName','str','POST','dbtableConfig','relationType','list','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','Invalid\x20--cardinality.','multiple\x20cross-database\x20relations\x20matched','validation','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','map','dblinkId','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','to-label-column','includes','Dataset\x20','fromDblinkId','Would\x20','to-datasetcode','before','385805mkRgro','2372697zwUzxK','from-dblink-id','fromDatasetCode','6iPlJvR','toTableName','data','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','1399845zWuvJv','label_inherited','extend','flagMissing','2815568IMDUaZ','dbtable','message','apiError','DB_TABLE','expectedCardinality','toField','204WcePfg','cardinality','parse','appCode','enum','defineProperty','15108JvSAbm','filter','fromField','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','relationId','datasetCode','toLowerCase','query','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','length','from-datasetcode','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','storageProfile','delete','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','fromTableName','update','470253jITZHR','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','unconfirmed','trim','\x20verified.','toDatasetCode','Cross-database\x20relation\x20','catch','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','body','isSafeInteger','dbId','tableName','source','to-column','from-column','expectedLabel','301608tgQPnW'];a72_0x2627=function(){return _0x18a3a4;};return a72_0x2627();}function matchesEndpoint(_0x1c768d,_0x2d8143,_0x1085ec,_0x4dded8,_0x46588b){const _0x3ebf67=a72_0xf05f7;return _0x1c768d[_0x3ebf67(0xb4)]===_0x2d8143[_0x3ebf67(0xaf)]&&sameName(_0x1c768d[_0x3ebf67(0x87)],_0x2d8143['table'])&&sameName(_0x1c768d[_0x3ebf67(0x78)],_0x1085ec)&&_0x1c768d[_0x3ebf67(0xa2)]===_0x4dded8[_0x3ebf67(0xaf)]&&sameName(_0x1c768d[_0x3ebf67(0xbd)],_0x4dded8[_0x3ebf67(0xa1)])&&sameName(_0x1c768d[_0x3ebf67(0x6f)],_0x46588b);}export async function prepareCrossRelation(_0x603d6,_0x33f11b){const _0x39bf35=a72_0xf05f7,_0x522af3=await resolveEndpoint(required(_0x603d6,_0x39bf35(0x82))),_0x30b0e8=explicitDblink(_0x603d6);if(_0x30b0e8!==undefined&&_0x522af3[_0x39bf35(0xaf)]!==_0x30b0e8)throw CliErrors[_0x39bf35(0xac)](_0x39bf35(0x79));const _0x37f273={'appCode':_0x603d6[_0x39bf35(0x73)],'fromDatasetCode':_0x522af3[_0x39bf35(0x7c)],'fromField':required(_0x603d6,_0x39bf35(0x98)),..._0x30b0e8!==undefined?{'fromDblinkId':_0x30b0e8}:{}},_0x18f551={'appCode':_0x603d6[_0x39bf35(0x73)],'fromDblinkId':_0x522af3[_0x39bf35(0xaf)],'fromDatasetCode':_0x522af3[_0x39bf35(0x7c)],'fromField':_0x37f273['fromField']},_0x26d86f=await queryCrossDbRelations(_0x18f551);let _0x1d8e05=null;if(_0x33f11b!==_0x39bf35(0x9b)){if(_0x26d86f[_0x39bf35(0x81)]>0x1)throw ambiguity(_0x26d86f);_0x1d8e05=_0x26d86f[0x0]??null;if(!_0x1d8e05)throw CliErrors['validation'](_0x39bf35(0x91));}if(_0x33f11b===_0x39bf35(0x85))return{'operation':_0x33f11b,'from':_0x522af3,'query':_0x18f551,'body':_0x37f273,'before':_0x1d8e05};const _0x2b57b7=await resolveEndpoint(required(_0x603d6,_0x39bf35(0xb6)));if(_0x522af3[_0x39bf35(0xaf)]===_0x2b57b7[_0x39bf35(0xaf)])throw CliErrors[_0x39bf35(0xac)](_0x39bf35(0x7a));const _0x1fb877=_0x603d6[_0x39bf35(0xa4)](_0x39bf35(0xb1))[_0x39bf35(0x8c)](),_0x442bf4=_0x603d6[_0x39bf35(0xa4)]('cardinality')[_0x39bf35(0x8c)](),_0xdd66bf={..._0x37f273,'toDatasetCode':_0x2b57b7[_0x39bf35(0x7c)],'toField':required(_0x603d6,_0x39bf35(0x97)),..._0x1fb877?{'refTableLabelName':_0x1fb877}:{},..._0x442bf4?{'cardinality':_0x442bf4}:{}};if(_0x26d86f[_0x39bf35(0x9c)](_0xaff92b=>_0xaff92b['relationId']!==_0x1d8e05?.[_0x39bf35(0x7b)]&&matchesEndpoint(_0xaff92b,_0x522af3,_0xdd66bf['fromField'],_0x2b57b7,_0xdd66bf[_0x39bf35(0x6f)])))throw CliErrors[_0x39bf35(0xac)](_0x39bf35(0xa9));return{'operation':_0x33f11b,'from':_0x522af3,'to':_0x2b57b7,'query':_0x18f551,'body':_0xdd66bf,'before':_0x1d8e05,'expectedLabel':_0x1fb877||_0x1d8e05?.[_0x39bf35(0xa3)]||_0xdd66bf[_0x39bf35(0x6f)],'expectedCardinality':_0x442bf4||_0x1d8e05?.[_0x39bf35(0x71)]||null};}function mutationData(_0x548a95,_0x5a4c33,_0x14d7a8){const _0x47db5d=a72_0xf05f7,{operation:_0x50a39c,body:_0x486d48,before:_0x143f4a}=_0x548a95;return{'operation':_0x50a39c,'selector':{'appCode':_0x486d48[_0x47db5d(0x73)],'from':{'datasetCode':_0x486d48[_0x47db5d(0xbb)],'field':_0x486d48[_0x47db5d(0x78)],'dblinkId':_0x548a95[_0x47db5d(0x9e)][_0x47db5d(0xaf)]}},'before':_0x143f4a?projectCrossRelation(_0x143f4a):null,'after':_0x14d7a8,'dryRun':_0x5a4c33,'backend':{'method':_0x47db5d(0xa5),'path':CROSS_DB_RELATION_PATHS[_0x50a39c]},'warnings':_0x50a39c===_0x47db5d(0x88)&&!_0x486d48['refTableLabelName']?[{'code':_0x47db5d(0x66),'message':_0x47db5d(0x7f)}]:[]};}export async function previewCrossRelation(_0x2528e2,_0x533afe){const _0x27a54d=a72_0xf05f7,_0x57c5f1=await prepareCrossRelation(_0x2528e2,_0x533afe),_0x54b1d3=_0x57c5f1['body'],_0x5f486e=_0x533afe===_0x27a54d(0x85)?null:{..._0x57c5f1[_0x27a54d(0xb7)]?{'relationId':_0x57c5f1[_0x27a54d(0xb7)]['relationId']}:{},'from':{'datasetCode':_0x57c5f1['from'][_0x27a54d(0x7c)],'dblinkId':_0x57c5f1[_0x27a54d(0x9e)]['dblinkId'],'table':_0x57c5f1[_0x27a54d(0x9e)][_0x27a54d(0xa1)],'field':_0x54b1d3[_0x27a54d(0x78)]},'to':{'datasetCode':_0x57c5f1['to'][_0x27a54d(0x7c)],'dblinkId':_0x57c5f1['to'][_0x27a54d(0xaf)],'table':_0x57c5f1['to'][_0x27a54d(0xa1)],'field':_0x54b1d3['toField'],'labelField':_0x57c5f1[_0x27a54d(0x99)]},'relation':{'cardinality':_0x57c5f1[_0x27a54d(0x6e)],'relationType':0x2}};return{...mutationData(_0x57c5f1,!![],null),'after':_0x5f486e,'method':'POST','url':CROSS_DB_RELATION_PATHS[_0x533afe],'body':_0x57c5f1[_0x27a54d(0x92)],'description':_0x27a54d(0xb5)+_0x533afe+'\x20a\x20cross-database\x20relation\x20for\x20'+_0x54b1d3[_0x27a54d(0xbb)]+'.'+_0x54b1d3['fromField']};}export async function executeCrossRelation(_0x3869aa,_0x4fcefe,_0x151178){const _0x1805b1=a72_0xf05f7,_0x378e8a=await prepareCrossRelation(_0x3869aa,_0x4fcefe);try{await _0x151178(_0x378e8a[_0x1805b1(0x92)]);}catch(_0x5041f4){if(_0x5041f4 instanceof CliError&&_0x5041f4[_0x1805b1(0x6b)][_0x1805b1(0xb2)](_0x1805b1(0xab))){const _0x3861ba=await queryCrossDbRelations(_0x378e8a[_0x1805b1(0x7e)])[_0x1805b1(0x90)](()=>[]);throw ambiguity(_0x3861ba);}throw _0x5041f4;}let _0x121237=[],_0x2eded9,_0x5b6c4b=![];try{_0x121237=await queryCrossDbRelations(_0x378e8a['query']);if(_0x4fcefe===_0x1805b1(0x85))_0x5b6c4b=!_0x121237[_0x1805b1(0x9c)](_0x77018e=>_0x77018e[_0x1805b1(0x7b)]===_0x378e8a[_0x1805b1(0xb7)][_0x1805b1(0x7b)]);else{const _0x225aae=_0x378e8a[_0x1805b1(0x92)],_0x29aadf=_0x121237[_0x1805b1(0x77)](_0x38b994=>matchesEndpoint(_0x38b994,_0x378e8a[_0x1805b1(0x9e)],_0x225aae[_0x1805b1(0x78)],_0x378e8a['to'],_0x225aae['toField'])&&(_0x4fcefe===_0x1805b1(0x9b)||_0x38b994[_0x1805b1(0x7b)]===_0x378e8a[_0x1805b1(0xb7)][_0x1805b1(0x7b)]));_0x2eded9=_0x29aadf[_0x1805b1(0x81)]===0x1?_0x29aadf[0x0]:undefined,_0x5b6c4b=!!_0x2eded9&&_0x2eded9[_0x1805b1(0xa3)]===_0x378e8a[_0x1805b1(0x99)]&&_0x2eded9['cardinality']===_0x378e8a['expectedCardinality']&&_0x2eded9['relationType']===0x2;}}catch{}const _0xcf8741={...mutationData(_0x378e8a,![],_0x2eded9?projectCrossRelation(_0x2eded9):null),'verification':{'status':_0x5b6c4b?_0x1805b1(0x9f):_0x1805b1(0x8b),'verified':_0x5b6c4b}};if(!_0x5b6c4b){const _0x119d9f=CliErrors[_0x1805b1(0x6c)](_0x1805b1(0x8f)+_0x4fcefe+'\x20write\x20was\x20not\x20verified.',_0x1805b1(0xad));Object[_0x1805b1(0x75)](_0x119d9f,_0x1805b1(0xbe),{'value':{..._0xcf8741,'candidates':_0x121237[_0x1805b1(0xae)](projectCrossRelation)}});throw _0x119d9f;}return{'ok':!![],'data':_0xcf8741,'message':_0x1805b1(0x8f)+_0x4fcefe+_0x1805b1(0x8d)};}
|
|
1
|
+
const a72_0x24270a=a72_0x4aef;(function(_0x257457,_0x417433){const _0x52846d=a72_0x4aef,_0x1ae2a5=_0x257457();while(!![]){try{const _0x5abf65=parseInt(_0x52846d(0x1f7))/0x1*(parseInt(_0x52846d(0x216))/0x2)+-parseInt(_0x52846d(0x1fa))/0x3*(-parseInt(_0x52846d(0x1f0))/0x4)+parseInt(_0x52846d(0x232))/0x5+-parseInt(_0x52846d(0x221))/0x6*(parseInt(_0x52846d(0x1f3))/0x7)+-parseInt(_0x52846d(0x218))/0x8*(-parseInt(_0x52846d(0x1ed))/0x9)+parseInt(_0x52846d(0x1f8))/0xa+-parseInt(_0x52846d(0x234))/0xb;if(_0x5abf65===_0x417433)break;else _0x1ae2a5['push'](_0x1ae2a5['shift']());}catch(_0x378a43){_0x1ae2a5['push'](_0x1ae2a5['shift']());}}}(a72_0x5049,0x9f096));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(_0x28307d,_0xd5ccf8){const _0x130796=a72_0x4aef,_0x36543b=_0x28307d['str'](_0xd5ccf8)[_0x130796(0x21e)]();if(!_0x36543b)throw CliErrors[_0x130796(0x1de)](_0xd5ccf8);return _0x36543b;}function explicitDblink(_0x484da9){const _0x12bdd9=a72_0x4aef,_0x53bd20=_0x484da9['flag']('from-dblink-id');if(_0x53bd20===undefined||_0x53bd20===null)return undefined;const _0x46e7b6=Number(_0x53bd20);if(!Number[_0x12bdd9(0x1e5)](_0x46e7b6)||_0x46e7b6<=0x0)throw CliErrors['validation'](_0x12bdd9(0x22c));return _0x46e7b6;}export function validateCrossRelation(_0x4feb67,_0x1bb472){const _0x956619=a72_0x4aef,_0x1dc70c=explicitDblink(_0x4feb67);if(_0x1bb472===_0x956619(0x1e6)){if(!_0x4feb67['str'](_0x956619(0x222))['trim']()&&_0x1dc70c===undefined)throw CliErrors['validation'](_0x956619(0x1fd));return;}required(_0x4feb67,_0x956619(0x222)),required(_0x4feb67,_0x956619(0x208));if(_0x1bb472!==_0x956619(0x20b)){required(_0x4feb67,'to-datasetcode'),required(_0x4feb67,_0x956619(0x214));const _0x5f0746=_0x4feb67[_0x956619(0x220)]('cardinality')[_0x956619(0x21e)]();if(_0x5f0746&&!CROSS_RELATION_CARDINALITY_FLAG[_0x956619(0x235)]['includes'](_0x5f0746))throw CliErrors[_0x956619(0x1f9)]('Invalid\x20--cardinality.');}}async function resolveEndpoint(_0x29c645){const _0x150dcc=a72_0x4aef,_0xb0cd05=await getDatasetDetail(_0x29c645),_0x2bd37b=_0xb0cd05?.['dataset']??{};if((_0xb0cd05?.[_0x150dcc(0x1e2)]??_0x2bd37b['sourceType'])!=='DB_TABLE')throw CliErrors[_0x150dcc(0x1f9)]('Dataset\x20'+_0x29c645+_0x150dcc(0x202));const _0x4aee0b=_0xb0cd05[_0x150dcc(0x205)]??_0xb0cd05[_0x150dcc(0x211)]??{};let _0x20c794=_0xb0cd05[_0x150dcc(0x20c)]??_0x2bd37b[_0x150dcc(0x20c)]??{};if(typeof _0x20c794===_0x150dcc(0x21c))try{_0x20c794=_0x20c794[_0x150dcc(0x21e)]()?JSON[_0x150dcc(0x22b)](_0x20c794):{};}catch{throw CliErrors['validation'](_0x150dcc(0x226)+_0x29c645+_0x150dcc(0x1ec));}const _0x175362=Number(_0x20c794?.[_0x150dcc(0x1f2)]?.[_0x150dcc(0x1f1)]??_0xb0cd05[_0x150dcc(0x1f2)]?.[_0x150dcc(0x1f1)]??_0x2bd37b[_0x150dcc(0x1f2)]?.[_0x150dcc(0x1f1)]??_0x4aee0b[_0x150dcc(0x1f1)]??_0x2bd37b[_0x150dcc(0x1f1)]??_0xb0cd05[_0x150dcc(0x1f1)]),_0x89590a=String(_0xb0cd05[_0x150dcc(0x20f)]??_0x2bd37b[_0x150dcc(0x20f)]??_0x4aee0b['tableName']??'')[_0x150dcc(0x21e)]();if(!Number[_0x150dcc(0x1e5)](_0x175362)||_0x175362<=0x0||!_0x89590a)throw CliErrors[_0x150dcc(0x1f9)](_0x150dcc(0x226)+_0x29c645+_0x150dcc(0x206));return{'datasetCode':_0x29c645,'dblinkId':_0x175362,'table':_0x89590a};}export async function resolveCrossRelationQuery(_0xe473e9){const _0x58ec6c=a72_0x4aef,_0x41f677=_0xe473e9[_0x58ec6c(0x220)](_0x58ec6c(0x222))[_0x58ec6c(0x21e)](),_0x59bb5e=explicitDblink(_0xe473e9),_0x3be152=_0x41f677?await resolveEndpoint(_0x41f677):undefined;if(_0x3be152&&_0x59bb5e!==undefined&&_0x3be152[_0x58ec6c(0x1f5)]!==_0x59bb5e)throw CliErrors[_0x58ec6c(0x1f9)](_0x58ec6c(0x20d));const _0x555372=_0x3be152?.[_0x58ec6c(0x1f5)]??_0x59bb5e;if(_0x555372===undefined)throw CliErrors['validation'](_0x58ec6c(0x1fd));return{'appCode':_0xe473e9[_0x58ec6c(0x233)],'fromDblinkId':_0x555372,..._0x41f677?{'fromDatasetCode':_0x41f677}:{},..._0xe473e9[_0x58ec6c(0x220)]('from-column')[_0x58ec6c(0x21e)]()?{'fromField':_0xe473e9[_0x58ec6c(0x220)](_0x58ec6c(0x208))[_0x58ec6c(0x21e)]()}:{}};}export function projectCrossRelation(_0x25d4f4){const _0x1d5a13=a72_0x4aef;return{'relationId':_0x25d4f4[_0x1d5a13(0x230)],'from':{'source':_0x1d5a13(0x212),'datasetCode':_0x25d4f4[_0x1d5a13(0x229)],'datasetName':_0x25d4f4[_0x1d5a13(0x1fe)],'dblinkId':_0x25d4f4['fromDblinkId'],'table':_0x25d4f4[_0x1d5a13(0x21d)],'field':_0x25d4f4[_0x1d5a13(0x217)]},'to':{'source':_0x1d5a13(0x212),'datasetCode':_0x25d4f4[_0x1d5a13(0x20e)],'datasetName':_0x25d4f4[_0x1d5a13(0x223)],'dblinkId':_0x25d4f4[_0x1d5a13(0x21a)],'table':_0x25d4f4[_0x1d5a13(0x1fc)],'field':_0x25d4f4[_0x1d5a13(0x1e9)],'labelField':_0x25d4f4[_0x1d5a13(0x201)]},'relation':{'cardinality':_0x25d4f4[_0x1d5a13(0x204)],'relationType':_0x25d4f4[_0x1d5a13(0x1ff)]}};}function ambiguity(_0x5ce933){const _0x39017c=a72_0x4aef,_0x223e1d=CliErrors[_0x39017c(0x1f9)]('Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.',_0x39017c(0x1e0));return Object[_0x39017c(0x1ee)](_0x223e1d,_0x39017c(0x22e),{'value':{'candidates':_0x5ce933[_0x39017c(0x210)](projectCrossRelation)}}),_0x223e1d;}function a72_0x5049(){const _0x497499=['str','114PUQxlt','from-datasetcode','toDatasetName','Would\x20','length','Dataset\x20','toLowerCase','expectedLabel','fromDatasetCode','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','parse','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','data','from','relationId','POST','2026370itUHDN','appCode','25650537AfaOxv','enum','\x20verified.','flagMissing','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','includes','source','\x20write\x20was\x20not\x20verified.','label_inherited','isSafeInteger','list','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','expectedCardinality','toField','before','catch','\x20has\x20invalid\x20storage\x20configuration.','9ZjmOZQ','defineProperty','filter','24SeVgsE','dbId','storageProfile','416318MAPWmA','Cross-database\x20relation\x20','dblinkId','\x20a\x20cross-database\x20relation\x20for\x20','884267PBpiQM','5968420vRjIkC','validation','613641dfGknV','table','toTableName','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','fromDatasetName','relationType','multiple\x20cross-database\x20relations\x20matched','refTableLabelName','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','some','cardinality','dbtableConfig','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','datasetCode','from-column','unconfirmed','to-label-column','delete','extend','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','toDatasetCode','tableName','map','dbtable','DB_TABLE','create','to-column','query','2kvaOtp','fromField','7996976MjzZJP','update','toDblinkId','body','string','fromTableName','trim','apiError'];a72_0x5049=function(){return _0x497499;};return a72_0x5049();}function a72_0x4aef(_0x358b23,_0x360402){_0x358b23=_0x358b23-0x1de;const _0x50499c=a72_0x5049();let _0x4aef57=_0x50499c[_0x358b23];return _0x4aef57;}const sameName=(_0x390321,_0x54b8b0)=>_0x390321[a72_0x24270a(0x227)]()===_0x54b8b0[a72_0x24270a(0x227)]();function matchesEndpoint(_0x307098,_0x500772,_0x152660,_0x147277,_0x1fa4ce){const _0x1711e7=a72_0x24270a;return _0x307098['fromDblinkId']===_0x500772[_0x1711e7(0x1f5)]&&sameName(_0x307098[_0x1711e7(0x21d)],_0x500772['table'])&&sameName(_0x307098[_0x1711e7(0x217)],_0x152660)&&_0x307098[_0x1711e7(0x21a)]===_0x147277[_0x1711e7(0x1f5)]&&sameName(_0x307098['toTableName'],_0x147277[_0x1711e7(0x1fb)])&&sameName(_0x307098[_0x1711e7(0x1e9)],_0x1fa4ce);}export async function prepareCrossRelation(_0x400292,_0x2e7b1e){const _0x151c54=a72_0x24270a,_0xbfc6b0=await resolveEndpoint(required(_0x400292,_0x151c54(0x222))),_0x1fd035=explicitDblink(_0x400292);if(_0x1fd035!==undefined&&_0xbfc6b0[_0x151c54(0x1f5)]!==_0x1fd035)throw CliErrors[_0x151c54(0x1f9)](_0x151c54(0x20d));const _0x895d13={'appCode':_0x400292[_0x151c54(0x233)],'fromDatasetCode':_0xbfc6b0[_0x151c54(0x207)],'fromField':required(_0x400292,_0x151c54(0x208)),..._0x1fd035!==undefined?{'fromDblinkId':_0x1fd035}:{}},_0x28b69a={'appCode':_0x400292[_0x151c54(0x233)],'fromDblinkId':_0xbfc6b0[_0x151c54(0x1f5)],'fromDatasetCode':_0xbfc6b0[_0x151c54(0x207)],'fromField':_0x895d13[_0x151c54(0x217)]},_0x2e840e=await queryCrossDbRelations(_0x28b69a);let _0x301679=null;if(_0x2e7b1e!==_0x151c54(0x213)){if(_0x2e840e[_0x151c54(0x225)]>0x1)throw ambiguity(_0x2e840e);_0x301679=_0x2e840e[0x0]??null;if(!_0x301679)throw CliErrors[_0x151c54(0x1f9)]('Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.');}if(_0x2e7b1e===_0x151c54(0x20b))return{'operation':_0x2e7b1e,'from':_0xbfc6b0,'query':_0x28b69a,'body':_0x895d13,'before':_0x301679};const _0x1ae1fd=await resolveEndpoint(required(_0x400292,'to-datasetcode'));if(_0xbfc6b0[_0x151c54(0x1f5)]===_0x1ae1fd[_0x151c54(0x1f5)])throw CliErrors[_0x151c54(0x1f9)](_0x151c54(0x1df));const _0x5f01f7=_0x400292['str'](_0x151c54(0x20a))[_0x151c54(0x21e)](),_0x129213=_0x400292[_0x151c54(0x220)](_0x151c54(0x204))[_0x151c54(0x21e)](),_0xcd5c85={..._0x895d13,'toDatasetCode':_0x1ae1fd[_0x151c54(0x207)],'toField':required(_0x400292,_0x151c54(0x214)),..._0x5f01f7?{'refTableLabelName':_0x5f01f7}:{},..._0x129213?{'cardinality':_0x129213}:{}};if(_0x2e840e[_0x151c54(0x203)](_0x4b139c=>_0x4b139c[_0x151c54(0x230)]!==_0x301679?.[_0x151c54(0x230)]&&matchesEndpoint(_0x4b139c,_0xbfc6b0,_0xcd5c85[_0x151c54(0x217)],_0x1ae1fd,_0xcd5c85[_0x151c54(0x1e9)])))throw CliErrors[_0x151c54(0x1f9)](_0x151c54(0x22d));return{'operation':_0x2e7b1e,'from':_0xbfc6b0,'to':_0x1ae1fd,'query':_0x28b69a,'body':_0xcd5c85,'before':_0x301679,'expectedLabel':_0x5f01f7||_0x301679?.[_0x151c54(0x201)]||_0xcd5c85[_0x151c54(0x1e9)],'expectedCardinality':_0x129213||_0x301679?.['cardinality']||null};}function mutationData(_0x43ef9a,_0x42d323,_0x319729){const _0x10957c=a72_0x24270a,{operation:_0x2ed4df,body:_0x4c6630,before:_0xf9dcc2}=_0x43ef9a;return{'operation':_0x2ed4df,'selector':{'appCode':_0x4c6630['appCode'],'from':{'datasetCode':_0x4c6630[_0x10957c(0x229)],'field':_0x4c6630[_0x10957c(0x217)],'dblinkId':_0x43ef9a[_0x10957c(0x22f)][_0x10957c(0x1f5)]}},'before':_0xf9dcc2?projectCrossRelation(_0xf9dcc2):null,'after':_0x319729,'dryRun':_0x42d323,'backend':{'method':_0x10957c(0x231),'path':CROSS_DB_RELATION_PATHS[_0x2ed4df]},'warnings':_0x2ed4df===_0x10957c(0x219)&&!_0x4c6630[_0x10957c(0x201)]?[{'code':_0x10957c(0x1e4),'message':_0x10957c(0x22a)}]:[]};}export async function previewCrossRelation(_0xb7c23e,_0x392067){const _0x1e6f11=a72_0x24270a,_0x247af2=await prepareCrossRelation(_0xb7c23e,_0x392067),_0xfbe61f=_0x247af2['body'],_0x267377=_0x392067===_0x1e6f11(0x20b)?null:{..._0x247af2[_0x1e6f11(0x1ea)]?{'relationId':_0x247af2[_0x1e6f11(0x1ea)][_0x1e6f11(0x230)]}:{},'from':{'datasetCode':_0x247af2['from'][_0x1e6f11(0x207)],'dblinkId':_0x247af2['from'][_0x1e6f11(0x1f5)],'table':_0x247af2[_0x1e6f11(0x22f)][_0x1e6f11(0x1fb)],'field':_0xfbe61f[_0x1e6f11(0x217)]},'to':{'datasetCode':_0x247af2['to'][_0x1e6f11(0x207)],'dblinkId':_0x247af2['to'][_0x1e6f11(0x1f5)],'table':_0x247af2['to'][_0x1e6f11(0x1fb)],'field':_0xfbe61f[_0x1e6f11(0x1e9)],'labelField':_0x247af2[_0x1e6f11(0x228)]},'relation':{'cardinality':_0x247af2[_0x1e6f11(0x1e8)],'relationType':0x2}};return{...mutationData(_0x247af2,!![],null),'after':_0x267377,'method':_0x1e6f11(0x231),'url':CROSS_DB_RELATION_PATHS[_0x392067],'body':_0x247af2[_0x1e6f11(0x21b)],'description':_0x1e6f11(0x224)+_0x392067+_0x1e6f11(0x1f6)+_0xfbe61f[_0x1e6f11(0x229)]+'.'+_0xfbe61f['fromField']};}export async function executeCrossRelation(_0x5f5b07,_0x32eeeb,_0x12e756){const _0x3f2f6c=a72_0x24270a,_0x3593df=await prepareCrossRelation(_0x5f5b07,_0x32eeeb);try{await _0x12e756(_0x3593df['body']);}catch(_0x1297db){if(_0x1297db instanceof CliError&&_0x1297db['message'][_0x3f2f6c(0x1e1)](_0x3f2f6c(0x200))){const _0x59315e=await queryCrossDbRelations(_0x3593df[_0x3f2f6c(0x215)])[_0x3f2f6c(0x1eb)](()=>[]);throw ambiguity(_0x59315e);}throw _0x1297db;}let _0x315865=[],_0x42defd,_0x1c3699=![];try{_0x315865=await queryCrossDbRelations(_0x3593df['query']);if(_0x32eeeb===_0x3f2f6c(0x20b))_0x1c3699=!_0x315865[_0x3f2f6c(0x203)](_0x497955=>_0x497955[_0x3f2f6c(0x230)]===_0x3593df[_0x3f2f6c(0x1ea)][_0x3f2f6c(0x230)]);else{const _0x9f55b9=_0x3593df[_0x3f2f6c(0x21b)],_0x535588=_0x315865[_0x3f2f6c(0x1ef)](_0xf1ca17=>matchesEndpoint(_0xf1ca17,_0x3593df[_0x3f2f6c(0x22f)],_0x9f55b9[_0x3f2f6c(0x217)],_0x3593df['to'],_0x9f55b9[_0x3f2f6c(0x1e9)])&&(_0x32eeeb===_0x3f2f6c(0x213)||_0xf1ca17[_0x3f2f6c(0x230)]===_0x3593df[_0x3f2f6c(0x1ea)][_0x3f2f6c(0x230)]));_0x42defd=_0x535588[_0x3f2f6c(0x225)]===0x1?_0x535588[0x0]:undefined,_0x1c3699=!!_0x42defd&&_0x42defd[_0x3f2f6c(0x201)]===_0x3593df[_0x3f2f6c(0x228)]&&_0x42defd[_0x3f2f6c(0x204)]===_0x3593df[_0x3f2f6c(0x1e8)]&&_0x42defd['relationType']===0x2;}}catch{}const _0x5f2afb={...mutationData(_0x3593df,![],_0x42defd?projectCrossRelation(_0x42defd):null),'verification':{'status':_0x1c3699?'matched':_0x3f2f6c(0x209),'verified':_0x1c3699}};if(!_0x1c3699){const _0x35517b=CliErrors[_0x3f2f6c(0x21f)](_0x3f2f6c(0x1f4)+_0x32eeeb+_0x3f2f6c(0x1e3),_0x3f2f6c(0x1e7));Object['defineProperty'](_0x35517b,_0x3f2f6c(0x22e),{'value':{..._0x5f2afb,'candidates':_0x315865[_0x3f2f6c(0x210)](projectCrossRelation)}});throw _0x35517b;}return{'ok':!![],'data':_0x5f2afb,'message':'Cross-database\x20relation\x20'+_0x32eeeb+_0x3f2f6c(0x236)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a73_0x2f8b03=a73_0x418f;(function(_0x20b699,_0x5b6b21){const _0x3a8af6=a73_0x418f,_0x55215e=_0x20b699();while(!![]){try{const _0x7370c4=parseInt(_0x3a8af6(0x1f9))/0x1*(parseInt(_0x3a8af6(0x1f1))/0x2)+parseInt(_0x3a8af6(0x1ef))/0x3*(-parseInt(_0x3a8af6(0x1eb))/0x4)+-parseInt(_0x3a8af6(0x1f8))/0x5*(-parseInt(_0x3a8af6(0x1f3))/0x6)+-parseInt(_0x3a8af6(0x1ee))/0x7*(parseInt(_0x3a8af6(0x1f6))/0x8)+parseInt(_0x3a8af6(0x1f7))/0x9*(-parseInt(_0x3a8af6(0x1f0))/0xa)+-parseInt(_0x3a8af6(0x1f4))/0xb+parseInt(_0x3a8af6(0x1f5))/0xc;if(_0x7370c4===_0x5b6b21)break;else _0x55215e['push'](_0x55215e['shift']());}catch(_0x482fc9){_0x55215e['push'](_0x55215e['shift']());}}}(a73_0x54ca,0x38a59));import{updateCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a73_0x418f(_0xad2fc4,_0x35de96){_0xad2fc4=_0xad2fc4-0x1eb;const _0x54ca3e=a73_0x54ca();let _0x418f38=_0x54ca3e[_0xad2fc4];return _0x418f38;}function a73_0x54ca(){const _0x2d5841=['137016RYJCjA','dataset','Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','615650ZfBeXy','24gIfBbq','30trRhAb','8ZHePks','update','42QcSShI','1050203tiLVRA','3618072ZFlnUK','8hVWQdS','571221WUtToQ','138235TCbDMC','96213Hwttks','write','cross-relation-update'];a73_0x54ca=function(){return _0x2d5841;};return a73_0x54ca();}import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationUpdate={'service':a73_0x2f8b03(0x1ec),'command':a73_0x2f8b03(0x1fb),'description':a73_0x2f8b03(0x1ed),'risk':a73_0x2f8b03(0x1fa),'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 _0x421490=>validateCrossRelation(_0x421490,a73_0x2f8b03(0x1f2)),'dryRun':_0x81b1b=>previewCrossRelation(_0x81b1b,a73_0x2f8b03(0x1f2)),'execute':_0x253882=>executeCrossRelation(_0x253882,a73_0x2f8b03(0x1f2),updateCrossDbRelation)};
|