@lovrabet/rabetbase-cli 2.5.5 → 2.5.6-beta.1
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/cross-db-analysis-shared.d.ts +40 -0
- package/lib/commands/db/cross-db-analysis-shared.js +1 -0
- package/lib/commands/db/cross-db-analyze-latest.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-latest.js +1 -0
- package/lib/commands/db/cross-db-analyze-start.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-start.js +1 -0
- package/lib/commands/db/cross-db-analyze-status.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-status.js +1 -0
- 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.d.ts +7 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.d.ts +17 -0
- package/lib/core/cross-db-analysis.js +1 -0
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +6 -4
- package/skills/rabetbase/guides/database-connection-workflow.md +12 -3
- package/skills/rabetbase/guides/independent-deployment.md +10 -2
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-cross-analyze.md +78 -0
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x42ae41=a59_0x30e4;(function(_0x274622,_0x58f6a6){const _0x4f3731=a59_0x30e4,_0x3e2118=_0x274622();while(!![]){try{const _0x12f3a4=-parseInt(_0x4f3731(0x99))/0x1*(parseInt(_0x4f3731(0xa6))/0x2)+-parseInt(_0x4f3731(0x9b))/0x3*(-parseInt(_0x4f3731(0xa1))/0x4)+-parseInt(_0x4f3731(0xa2))/0x5+-parseInt(_0x4f3731(0xa9))/0x6+-parseInt(_0x4f3731(0xa8))/0x7+-parseInt(_0x4f3731(0xa7))/0x8*(-parseInt(_0x4f3731(0x9d))/0x9)+parseInt(_0x4f3731(0xa0))/0xa;if(_0x12f3a4===_0x58f6a6)break;else _0x3e2118['push'](_0x3e2118['shift']());}catch(_0xb2908){_0x3e2118['push'](_0x3e2118['shift']());}}}(a59_0x4e14,0xe01da));function a59_0x4e14(){const _0x5b4f81=['Missing\x20key.','12279plZase','config','6wfMcPu','Get\x20a\x20config\x20value\x20by\x20key','95166PQQFJq','string','object','27909270ytNEAc','1523728rnexDr','6242450EJXEOi','Key\x20not\x20found:\x20','validation','\x20config\x20get\x20--key\x20<key>','150frezpg','1384shHZci','6740615fbkUGE','7990530meXinP','appcode','key','app','get','Usage:\x20'];a59_0x4e14=function(){return _0x5b4f81;};return a59_0x4e14();}function a59_0x30e4(_0x5e4bbe,_0x3112a8){_0x5e4bbe=_0x5e4bbe-0x99;const _0x4e14c9=a59_0x4e14();let _0x30e498=_0x4e14c9[_0x5e4bbe];return _0x30e498;}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x2c1f55){const _0x13561c=a59_0x30e4,_0x28aa8a=_0x2c1f55['str'](_0x13561c(0xab));if(!_0x28aa8a)throw CliErrors[_0x13561c(0xa4)](_0x13561c(0xaf),_0x13561c(0xae)+CLI_BIN_NAME+_0x13561c(0xa5));const _0x1d6497=readConfig(),_0x3283b3=_0x28aa8a===_0x13561c(0xac)?_0x13561c(0xaa):_0x28aa8a,_0x598b45=_0x1d6497[_0x3283b3];if(_0x598b45===undefined)throw CliErrors[_0x13561c(0xa4)](_0x13561c(0xa3)+_0x28aa8a);return{'ok':!![],'data':typeof _0x598b45===_0x13561c(0x9f)?_0x598b45:{[_0x3283b3]:_0x598b45},'message':typeof _0x598b45===_0x13561c(0x9f)?undefined:String(_0x598b45)};}export const configGetDefinition={'service':a59_0x42ae41(0x9a),'command':a59_0x42ae41(0xad),'description':a59_0x42ae41(0x9c),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a59_0x42ae41(0xab),'type':a59_0x42ae41(0x9e),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x496fd6,_0x452761){const _0x5c1e4c=a60_0x1a4f,_0x28df6b=_0x496fd6();while(!![]){try{const _0x13454d=-parseInt(_0x5c1e4c(0x88))/0x1*(parseInt(_0x5c1e4c(0x8a))/0x2)+parseInt(_0x5c1e4c(0x84))/0x3+-parseInt(_0x5c1e4c(0x82))/0x4+-parseInt(_0x5c1e4c(0x87))/0x5+-parseInt(_0x5c1e4c(0x83))/0x6*(parseInt(_0x5c1e4c(0x85))/0x7)+parseInt(_0x5c1e4c(0x89))/0x8+parseInt(_0x5c1e4c(0x81))/0x9*(parseInt(_0x5c1e4c(0x86))/0xa);if(_0x13454d===_0x452761)break;else _0x28df6b['push'](_0x28df6b['shift']());}catch(_0x38f48d){_0x28df6b['push'](_0x28df6b['shift']());}}}(a60_0x3702,0x45e88));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a60_0x1a4f(_0x38998a,_0x623a12){_0x38998a=_0x38998a-0x81;const _0x37029=a60_0x3702();let _0x1a4faa=_0x37029[_0x38998a];return _0x1a4faa;}import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];function a60_0x3702(){const _0x4fa07e=['370hNnSBu','2673170jCiSCi','12755TOLSmC','2853264ETGMnb','28pHZsqJ','257121SJeYzM','1262752LRRJjE','140136sFZkJd','124983GCmCTD','42mHGCeG'];a60_0x3702=function(){return _0x4fa07e;};return a60_0x3702();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x361081=a61_0xa2d2;(function(_0x504d7f,_0x18a043){const _0x40bbfe=a61_0xa2d2,_0x2107b0=_0x504d7f();while(!![]){try{const _0x4925eb=-parseInt(_0x40bbfe(0xdb))/0x1*(parseInt(_0x40bbfe(0xca))/0x2)+-parseInt(_0x40bbfe(0xe9))/0x3+-parseInt(_0x40bbfe(0xcc))/0x4*(-parseInt(_0x40bbfe(0xe2))/0x5)+parseInt(_0x40bbfe(0xd3))/0x6+parseInt(_0x40bbfe(0xf6))/0x7+parseInt(_0x40bbfe(0xee))/0x8+parseInt(_0x40bbfe(0x104))/0x9*(parseInt(_0x40bbfe(0xdc))/0xa);if(_0x4925eb===_0x18a043)break;else _0x2107b0['push'](_0x2107b0['shift']());}catch(_0x46fcca){_0x2107b0['push'](_0x2107b0['shift']());}}}(a61_0x5015,0xe5e1e));import{select}from'@inquirer/prompts';function a61_0x5015(){const _0x28cc6c=['Rabetbase\x20connection\x20configured\x20for\x20region:\x20','str','2698LsWWEW','cdn','4EdCOtx','validation','Available\x20regions:\x20','user-domain','Custom\x20SkillHub\x20HTTPS\x20origin','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','Custom\x20KB\x20Service\x20HTTPS\x20origin','3297132RhycTw','string','certificateDomain','global','join','routing','local-domain','Custom\x20local\x20callback\x20HTTPS\x20origin','1165yRsuLR','64970xpARhY','name','project','official','config','api-domain','453995UpgwsT','skill-domain','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','Custom\x20Runtime\x20HTTPS\x20origin','label','Custom\x20knowledge-base\x20HTTPS\x20origin','Custom\x20User\x20HTTPS\x20origin','2010954CuTFdd','kb-service-domain','kb-domain','Official\x20Lovrabet\x20region:\x20','Region\x20\x22','4501312ZfPhtB','Custom\x20certificate\x20service\x20HTTPS\x20origin','Select\x20Lovrabet\x20region','ExitPromptError','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','init','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','region','4722333NihWzh','write','domain-config','Custom\x20platform\x20API\x20HTTPS\x20origin','Independent-deployment\x20Domain\x20JSON\x20file','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','app-domain','length','enterprise-v1','manifestDomains','\x22\x20is\x20not\x20currently\x20available.','runtime-domain','mode','keys','1809pTfyUp'];a61_0x5015=function(){return _0x28cc6c;};return a61_0x5015();}import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a61_0x361081(0xf5),'type':a61_0x361081(0xd4),'description':a61_0x361081(0xec)+ENABLED_LOVRABET_REGION_VALUES[a61_0x361081(0xd7)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a61_0x361081(0xf8),'type':'string','description':a61_0x361081(0xfa)},{'name':a61_0x361081(0xcf),'type':'string','description':a61_0x361081(0xe8)},{'name':a61_0x361081(0xe1),'type':a61_0x361081(0xd4),'description':a61_0x361081(0xf9)},{'name':a61_0x361081(0x101),'type':'string','description':a61_0x361081(0xe5)},{'name':a61_0x361081(0xe3),'type':'string','description':a61_0x361081(0xd0)},{'name':a61_0x361081(0xeb),'type':'string','description':a61_0x361081(0xe7)},{'name':a61_0x361081(0xea),'type':a61_0x361081(0xd4),'description':a61_0x361081(0xd2)},{'name':a61_0x361081(0xfc),'type':'string','description':a61_0x361081(0xfb)},{'name':a61_0x361081(0xd9),'type':a61_0x361081(0xd4),'description':a61_0x361081(0xda)},{'name':'certificate-domain','type':'string','description':a61_0x361081(0xef)}];async function resolveRegion(_0x3f3eb4){const _0x11c147=a61_0x361081,_0x41759d=_0x3f3eb4[_0x11c147(0xc9)](_0x11c147(0xf5));if(_0x41759d){if(!isEnabledLovrabetRegion(_0x41759d))throw CliErrors['validation'](_0x11c147(0xed)+_0x41759d+_0x11c147(0x100),_0x11c147(0xce)+ENABLED_LOVRABET_REGION_VALUES[_0x11c147(0xd7)](',\x20'));return _0x41759d;}if(_0x3f3eb4['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x11c147(0xf0),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x1f0d64=>({'name':getOfficialRoutingProfile(_0x1f0d64)[_0x11c147(0xe6)]+'\x20('+_0x1f0d64+')','value':_0x1f0d64}))});}catch(_0x1658ac){if(_0x1658ac?.[_0x11c147(0xdd)]===_0x11c147(0xf1))throw CliErrors['cancelled']();throw _0x1658ac;}}function a61_0xa2d2(_0x356925,_0x5de540){_0x356925=_0x356925-0xc9;const _0x50158d=a61_0x5015();let _0xa2d266=_0x50158d[_0x356925];return _0xa2d266;}export async function executeConfigInit(_0x486839){const _0x594f73=a61_0x361081,_0x30c8cb=resolveDomainConfigInput(_0x486839),_0x39b317=_0x30c8cb['domains'],_0x5e49c5=Object[_0x594f73(0x103)](_0x39b317)[_0x594f73(0xfd)]>0x0;if(_0x5e49c5&&_0x486839[_0x594f73(0xc9)](_0x594f73(0xf5)))throw CliErrors[_0x594f73(0xcd)](_0x594f73(0xf2));if(!!_0x39b317['localDomain']!==!!_0x39b317[_0x594f73(0xd5)])throw CliErrors[_0x594f73(0xcd)]('Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.');const _0x4afd79=_0x486839['bool'](_0x594f73(0xd6))?'global':_0x594f73(0xde),_0x2218c2=readScopedConfig(_0x4afd79);for(const _0x37fb77 of DOMAIN_CONFIG_FIELDS)delete _0x2218c2[_0x37fb77];for(const _0x258e9c of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x2218c2[_0x258e9c];delete _0x2218c2[_0x594f73(0xd8)];let _0x2bda18=null;if(_0x5e49c5)delete _0x2218c2['region'],_0x30c8cb[_0x594f73(0x102)]===_0x594f73(0xfe)?_0x2218c2[_0x594f73(0xd8)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x30c8cb[_0x594f73(0xff)],'cdn':_0x30c8cb[_0x594f73(0xcb)]}:Object['assign'](_0x2218c2,_0x39b317);else{_0x2bda18=await resolveRegion(_0x486839);if(_0x2bda18===DEFAULT_LOVRABET_REGION)delete _0x2218c2['region'];else _0x2218c2['region']=_0x2bda18;}return writeScopedConfig(_0x2218c2,_0x4afd79),{'ok':!![],'message':_0x5e49c5?_0x594f73(0xf4)+Object['keys'](_0x30c8cb[_0x594f73(0x102)]===_0x594f73(0xfe)?_0x30c8cb[_0x594f73(0xff)]:_0x39b317)[_0x594f73(0xd7)](',\x20')+'.':_0x594f73(0x105)+_0x2bda18+'.','data':{'mode':_0x5e49c5?'independent':_0x594f73(0xdf),'protocol':_0x30c8cb[_0x594f73(0x102)]===_0x594f73(0xfe)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x2bda18,'domains':_0x39b317,'cdn':_0x30c8cb[_0x594f73(0x102)]===_0x594f73(0xfe)?_0x30c8cb[_0x594f73(0xcb)]:undefined}};}export const configInitDefinition={'service':a61_0x361081(0xe0),'command':a61_0x361081(0xf3),'description':a61_0x361081(0xd1),'risk':a61_0x361081(0xf7),'confirmationDescription':a61_0x361081(0xe4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x27e29b=a62_0x1130;(function(_0x42b72e,_0x3e9f8a){const _0x3d6bcf=a62_0x1130,_0x106836=_0x42b72e();while(!![]){try{const _0x3aada8=parseInt(_0x3d6bcf(0x1ac))/0x1*(parseInt(_0x3d6bcf(0x1a0))/0x2)+parseInt(_0x3d6bcf(0x1ab))/0x3*(-parseInt(_0x3d6bcf(0x1a2))/0x4)+parseInt(_0x3d6bcf(0x1ad))/0x5*(-parseInt(_0x3d6bcf(0x1a3))/0x6)+parseInt(_0x3d6bcf(0x1ae))/0x7*(-parseInt(_0x3d6bcf(0x1a5))/0x8)+parseInt(_0x3d6bcf(0x1a4))/0x9*(parseInt(_0x3d6bcf(0x1af))/0xa)+-parseInt(_0x3d6bcf(0x1a7))/0xb+parseInt(_0x3d6bcf(0x1aa))/0xc;if(_0x3aada8===_0x3e9f8a)break;else _0x106836['push'](_0x106836['shift']());}catch(_0x32dd7d){_0x106836['push'](_0x106836['shift']());}}}(a62_0x4930,0x6e17d));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a62_0x1130(_0x13103d,_0x5e39ae){_0x13103d=_0x13103d-0x1a0;const _0x4930e5=a62_0x4930();let _0x11302f=_0x4930e5[_0x13103d];return _0x11302f;}async function execute(_0x5ef129){const _0xb0e2cd=a62_0x1130,_0x58075d=_0x5ef129['bool'](_0xb0e2cd(0x1a9))?readScopedConfig(_0xb0e2cd(0x1a9)):readConfig();return{'ok':!![],'data':_0x58075d};}function a62_0x4930(){const _0x21c985=['1569220oqSsof','List\x20all\x20config\x20values','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','282068TAHNap','config','78872nMqICN','23646sWMicu','36OZlJcD','8XonQmS','list','1120372fYnaBO','boolean','global','6827364TYcDco','30BldCRg','6EgwBpu','995luCtGt','3560249eGjvrL'];a62_0x4930=function(){return _0x21c985;};return a62_0x4930();}export const configListDefinition={'service':a62_0x27e29b(0x1a1),'command':a62_0x27e29b(0x1a6),'description':a62_0x27e29b(0x1b0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a62_0x27e29b(0x1a9),'type':a62_0x27e29b(0x1a8),'description':a62_0x27e29b(0x1b1),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x31eaa2=a63_0x437e;(function(_0x5192b5,_0x442d0b){const _0x16891d=a63_0x437e,_0x325656=_0x5192b5();while(!![]){try{const _0x46ecf2=parseInt(_0x16891d(0x86))/0x1+-parseInt(_0x16891d(0x9f))/0x2+-parseInt(_0x16891d(0xa3))/0x3*(parseInt(_0x16891d(0x7b))/0x4)+-parseInt(_0x16891d(0x9d))/0x5*(-parseInt(_0x16891d(0x96))/0x6)+-parseInt(_0x16891d(0x8f))/0x7+parseInt(_0x16891d(0xa1))/0x8+parseInt(_0x16891d(0x90))/0x9;if(_0x46ecf2===_0x442d0b)break;else _0x325656['push'](_0x325656['shift']());}catch(_0x541127){_0x325656['push'](_0x325656['shift']());}}}(a63_0x3883,0xe23a2));function a63_0x437e(_0x219fa2,_0x401464){_0x219fa2=_0x219fa2-0x7a;const _0x3883b4=a63_0x3883();let _0x437e78=_0x3883b4[_0x219fa2];return _0x437e78;}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x551f6b){const _0x40121b=a63_0x437e,_0x21419d=_0x551f6b[_0x40121b(0x8a)](_0x40121b(0x7a)),_0x2fba1d=_0x551f6b[_0x40121b(0x8a)](_0x40121b(0x81));if(!_0x21419d)throw CliErrors['validation'](_0x40121b(0xa9),'Usage:\x20'+CLI_BIN_NAME+_0x40121b(0x7e));if(_0x2fba1d===undefined||_0x2fba1d==='')throw CliErrors[_0x40121b(0x87)](_0x40121b(0x95),_0x40121b(0x8b)+CLI_BIN_NAME+_0x40121b(0x7e));let _0x527f88=_0x21419d,_0xc0e23b=_0x2fba1d;if(_0x2fba1d[_0x40121b(0x8c)]>0x1f4)throw CliErrors[_0x40121b(0x87)](_0x40121b(0x93));if(_0x21419d==='riskLevel')throw CliErrors[_0x40121b(0x87)](_0x40121b(0xa6));if(!isTopLevelConfigKey(_0x21419d))throw CliErrors[_0x40121b(0x87)]('Top-level\x20key\x20\x22'+_0x21419d+_0x40121b(0x9b),_0x40121b(0x9e)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x21419d]&&!CONFIG_ENUM_VALUES[_0x21419d][_0x40121b(0x97)](_0x2fba1d))throw CliErrors[_0x40121b(0x87)](_0x40121b(0x80)+_0x21419d+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x21419d][_0x40121b(0xa2)](',\x20'));if(_0x21419d===_0x40121b(0x89)&&!normalizeLocale(_0x2fba1d))throw CliErrors[_0x40121b(0x87)](_0x40121b(0x8d),_0x40121b(0x83));DOMAIN_CONFIG_FIELDS[_0x40121b(0x97)](_0x21419d)&&(_0xc0e23b=normalizeDomainOrigin(_0x21419d,_0x2fba1d));const _0x231afc={'global':_0x551f6b[_0x40121b(0x9a)]('global')},_0x1c60fc=resolveWriteScope(_0x231afc),_0x50258f=readScopedConfig(_0x1c60fc);_0x21419d===_0x40121b(0x98)&&(_0x527f88=_0x40121b(0x9c),delete _0x50258f['app']);_0x21419d==='locale'&&(_0xc0e23b=normalizeLocale(_0x2fba1d));if(_0x21419d===_0x40121b(0x84)){_0xc0e23b=normalizeEnv(_0x2fba1d);if(!isProduction(_0xc0e23b)&&!isDaily(_0xc0e23b))throw CliErrors[_0x40121b(0x87)](_0x40121b(0xa8),_0x40121b(0x8e));}if(_0x21419d===_0x40121b(0x9c)){const _0x2031cc=_0x50258f['apps']&&typeof _0x50258f[_0x40121b(0x99)]===_0x40121b(0x92)?Object[_0x40121b(0xaa)](_0x50258f[_0x40121b(0x99)]):[];if(_0x2031cc[_0x40121b(0x8c)]>0x0)throw CliErrors[_0x40121b(0x87)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x40121b(0x7c)+CLI_BIN_NAME+_0x40121b(0x94)+_0xc0e23b+_0x40121b(0xa5)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x3dfab3=buildCanonicalProjectConfig({..._0x50258f},{'appCodes':[_0xc0e23b],'env':typeof _0x50258f[_0x40121b(0x84)]==='string'?_0x50258f[_0x40121b(0x84)]:undefined});writeScopedConfig(_0x3dfab3,_0x1c60fc);const _0x90e12f=_0x1c60fc===_0x40121b(0xa4)?_0x40121b(0xa7):_0x40121b(0xab);return{'ok':!![],'message':'✓\x20'+_0x90e12f+_0x40121b(0x7f)+_0xc0e23b+'\x20(stored\x20as\x20a\x20single\x20app\x20profile)'};}_0x50258f[_0x527f88]=_0xc0e23b,writeScopedConfig(_0x50258f,_0x1c60fc);const _0x1a4c27=_0x1c60fc===_0x40121b(0xa4)?_0x40121b(0xa7):_0x40121b(0xab);return{'ok':!![],'message':'✓\x20'+_0x1a4c27+'\x20'+_0x527f88+_0x40121b(0x82)+_0xc0e23b};}export const configSetDefinition={'service':'config','command':a63_0x31eaa2(0xa0),'description':'Set\x20a\x20config\x20value','risk':a63_0x31eaa2(0x7d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a63_0x31eaa2(0x7a),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a63_0x31eaa2(0x81),'type':a63_0x31eaa2(0x88),'description':a63_0x31eaa2(0x85),'required':!![]},{'name':'global','type':'boolean','description':a63_0x31eaa2(0x91),'default':![]}],'execute':execute};function a63_0x3883(){const _0x19df9d=['global','`,\x20`','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Global','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Missing\x20key.','keys','Project','key','1084712zIWJKn','Use\x20`','write','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x20appcode\x20set\x20to:\x20','Invalid\x20value\x20for\x20\x22','value','\x20set\x20to:\x20','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','env','Config\x20value','1384892JtnTjR','validation','string','locale','str','Usage:\x20','length','Invalid\x20locale\x20value.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','5095167jrWPFZ','23323878UadKjV','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','object','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','\x20workspace\x20add\x20<name>\x20--appcode\x20','Missing\x20value.','222zVXnow','includes','app','apps','bool','\x22\x20is\x20not\x20settable.','appcode','72730oWPWyA','Settable\x20top-level\x20keys:\x20','3526610SlEQMu','set','4241952botNNV','join','18YqZlJh'];a63_0x3883=function(){return _0x19df9d;};return a63_0x3883();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59d44b,_0xd8257c){var _0x2e9250=a64_0x127f,_0xfc025f=_0x59d44b();while(!![]){try{var _0x721ec9=-parseInt(_0x2e9250(0xdb))/0x1+parseInt(_0x2e9250(0xe0))/0x2*(-parseInt(_0x2e9250(0xdc))/0x3)+-parseInt(_0x2e9250(0xe1))/0x4*(-parseInt(_0x2e9250(0xdf))/0x5)+-parseInt(_0x2e9250(0xd4))/0x6+parseInt(_0x2e9250(0xd5))/0x7*(-parseInt(_0x2e9250(0xd9))/0x8)+-parseInt(_0x2e9250(0xda))/0x9+parseInt(_0x2e9250(0xd3))/0xa;if(_0x721ec9===_0xd8257c)break;else _0xfc025f['push'](_0xfc025f['shift']());}catch(_0x5c91c9){_0xfc025f['push'](_0xfc025f['shift']());}}}(a64_0x54c3,0xad65d));function a64_0x127f(_0x3e47a4,_0x255241){_0x3e47a4=_0x3e47a4-0xd3;var _0x54c3f3=a64_0x54c3();var _0x127f36=_0x54c3f3[_0x3e47a4];return _0x127f36;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x51d0ba){var _0x84f894=a64_0x127f;if(_0x51d0ba[_0x84f894(0xdd)])return _0x84f894(0xdd);if(!isInProject())throw CliErrors['validation'](_0x84f894(0xd8),_0x84f894(0xd7)+CLI_BIN_NAME+_0x84f894(0xd6));return _0x84f894(0xde);}function a64_0x54c3(){var _0x5d55ec=['862088ytphxm','20EKPIYs','41303810aHpOdt','4030722gGxMKk','6643xRwztZ','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','3872blYrzv','6819723xkjbGZ','1100395PlcFZw','3TyCzdZ','global','project','145CyOWlg'];a64_0x54c3=function(){return _0x5d55ec;};return a64_0x54c3();}export function readScopedConfig(_0x2c4173){return readConfigFile(resolveWriteConfigPath(_0x2c4173));}export function writeScopedConfig(_0x381c31,_0x3f639c){writeConfigFile(resolveWriteConfigPath(_0x3f639c),_0x381c31);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x36bf80=a65_0x8010;(function(_0xa6836,_0x113aa9){const _0x5856b8=a65_0x8010,_0x2eefdb=_0xa6836();while(!![]){try{const _0xb4ad12=parseInt(_0x5856b8(0x18c))/0x1*(-parseInt(_0x5856b8(0x19b))/0x2)+-parseInt(_0x5856b8(0x1cd))/0x3*(parseInt(_0x5856b8(0x1d2))/0x4)+-parseInt(_0x5856b8(0x186))/0x5*(parseInt(_0x5856b8(0x194))/0x6)+parseInt(_0x5856b8(0x165))/0x7+parseInt(_0x5856b8(0x1d5))/0x8*(-parseInt(_0x5856b8(0x1ab))/0x9)+-parseInt(_0x5856b8(0x191))/0xa+parseInt(_0x5856b8(0x1ce))/0xb*(parseInt(_0x5856b8(0x1c3))/0xc);if(_0xb4ad12===_0x113aa9)break;else _0x2eefdb['push'](_0x2eefdb['shift']());}catch(_0x12a8af){_0x2eefdb['push'](_0x2eefdb['shift']());}}}(a65_0x54a2,0xb2fec));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x36bf80(0x174),a65_0x36bf80(0x16b)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x36bf80(0x1d1),a65_0x36bf80(0x1bd),a65_0x36bf80(0x16d),a65_0x36bf80(0x1d4),a65_0x36bf80(0x196),a65_0x36bf80(0x185),a65_0x36bf80(0x17b),a65_0x36bf80(0x172),a65_0x36bf80(0x18a),a65_0x36bf80(0x197)]);export function isDatasetBatchDesign(_0x1d3c40){const _0x866caf=a65_0x36bf80;return isObject(_0x1d3c40)&&_0x1d3c40[_0x866caf(0x1b0)]===_0x866caf(0x1a7);}export function validateDatasetBatchDesign(_0x3d65cb){const _0x365800=a65_0x36bf80;(!isObject(_0x3d65cb)||_0x3d65cb['kind']!=='dataset-batch')&&fail('Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.');_0x3d65cb['schemaVersion']!==0x1&&fail('Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.');const _0x254b2b=objectArray(_0x3d65cb[_0x365800(0x17e)],_0x365800(0x17e),0x1,0x14),_0xf31f43=objectArray(_0x3d65cb[_0x365800(0x18e)],_0x365800(0x18e),0x0,0xc8),_0x18ab99=objectArray(_0x3d65cb[_0x365800(0x1b9)],_0x365800(0x1b9),0x0,0xc8),_0x3bfc55=new Set(),_0xd3c19d=new Map();for(const [_0x46cef3,_0x64cde3]of _0x254b2b[_0x365800(0x1c4)]()){const _0x4ae704=requiredString(_0x64cde3[_0x365800(0x167)],_0x365800(0x1bf)+_0x46cef3+_0x365800(0x190));!LOCAL_KEY[_0x365800(0x1c0)](_0x4ae704)&&fail(_0x365800(0x1bf)+_0x46cef3+_0x365800(0x18d)+LOCAL_KEY['source']+'.');_0x3bfc55['has'](_0x4ae704)&&fail(_0x365800(0x1ad));_0x3bfc55[_0x365800(0x16f)](_0x4ae704);!isObject(_0x64cde3[_0x365800(0x1a3)])&&fail(_0x365800(0x1bf)+_0x46cef3+'].design\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x64cde3[_0x365800(0x1a3)],'datasets['+_0x46cef3+_0x365800(0x1b7));if(!isObject(_0x64cde3[_0x365800(0x1a3)][_0x365800(0x176)]))fail(_0x365800(0x1bf)+_0x46cef3+_0x365800(0x177));rejectServerDatasetIdentity(_0x64cde3[_0x365800(0x1a3)][_0x365800(0x176)],_0x365800(0x1bf)+_0x46cef3+_0x365800(0x195)),requiredString(_0x64cde3[_0x365800(0x1a3)][_0x365800(0x176)][_0x365800(0x179)],'datasets['+_0x46cef3+'].design.dataset.datasetName');_0x365800(0x18e)in _0x64cde3[_0x365800(0x1a3)]&&(!Array[_0x365800(0x1c2)](_0x64cde3[_0x365800(0x1a3)][_0x365800(0x18e)])||_0x64cde3['design'][_0x365800(0x18e)][_0x365800(0x1c8)]!==0x0)&&fail('datasets['+_0x46cef3+'].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.');const _0xe5297a=objectArray(_0x64cde3[_0x365800(0x1a3)][_0x365800(0x19e)],_0x365800(0x1bf)+_0x46cef3+_0x365800(0x1a2),0x1,0xc8),_0xb6c55d=new Map();for(const [_0x5b2311,_0x4d3a92]of _0xe5297a[_0x365800(0x1c4)]()){const _0x32408d=fieldName(_0x4d3a92);if(!_0x32408d)fail(_0x365800(0x1bf)+_0x46cef3+'].design.fields['+_0x5b2311+']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.');const _0x48d701=_0x32408d[_0x365800(0x16a)]();if(_0xb6c55d[_0x365800(0x1d0)](_0x48d701))fail(_0x365800(0x188)+_0x4ae704+_0x365800(0x1c9));const _0x21a252=stringValue(_0x4d3a92[_0x365800(0x170)]??_0x4d3a92[_0x365800(0x1d6)])[_0x365800(0x193)]();if(!SUPPORTED_FIELD_TYPES['has'](_0x21a252))fail(_0x365800(0x1bf)+_0x46cef3+_0x365800(0x1ca)+_0x5b2311+_0x365800(0x1ba));_0xb6c55d[_0x365800(0x198)](_0x48d701,_0x21a252),[_0x4d3a92[_0x365800(0x17a)],_0x4d3a92[_0x365800(0x19c)],_0x4d3a92['refTableLabelField']]['some'](_0x550550=>stringValue(_0x550550))&&fail('datasets['+_0x46cef3+_0x365800(0x1ca)+_0x5b2311+_0x365800(0x1b4));}_0xd3c19d[_0x365800(0x198)](_0x4ae704,_0xb6c55d);}const _0x21f21f=new Set(),_0xe6e523=new Set();for(const [_0x217ad7,_0x5a1d27]of _0xf31f43[_0x365800(0x1c4)]()){const _0x5b1a30=validateRelation(_0x5a1d27,_0x217ad7,_0x3bfc55,_0xd3c19d);if(_0x21f21f[_0x365800(0x1d0)](_0x5b1a30))fail(_0x365800(0x183));_0x21f21f['add'](_0x5b1a30);const _0x311497=_0x5b1a30[_0x365800(0x1b8)]('\x00',0x2)['join']('\x00');if(_0xe6e523[_0x365800(0x1d0)](_0x311497))fail(_0x365800(0x1d3));_0xe6e523['add'](_0x311497);}for(const [_0x27db3f,_0x868221]of _0x18ab99['entries']()){requiredString(_0x868221[_0x365800(0x1aa)],'unresolvedRelations['+_0x27db3f+_0x365800(0x18f)),validateConfidence(_0x868221[_0x365800(0x16e)],_0x365800(0x175)+_0x27db3f+_0x365800(0x1a4));}return _0x3d65cb;}export function reconcileBatchResult(_0x586783){const _0x4b1b54=a65_0x36bf80;if(!isObject(_0x586783))return null;try{const _0x487c29=stringArray(_0x586783['expectedLocalKeys'],_0x4b1b54(0x163),0x1,0x14),_0x1da093=new Set(_0x487c29);if(_0x1da093['size']!==_0x487c29[_0x4b1b54(0x1c8)]||_0x487c29[_0x4b1b54(0x18b)](_0x2298bf=>!LOCAL_KEY[_0x4b1b54(0x1c0)](_0x2298bf)))return null;const _0x1b9304=objectArray(_0x586783[_0x4b1b54(0x1bb)],_0x4b1b54(0x1bb),0x1,0x14),_0x4498f1=new Map(),_0xe5f922=new Set();for(const _0x504ba8 of _0x1b9304){const _0x579aab=requiredString(_0x504ba8[_0x4b1b54(0x167)],'createdDatasets[].localKey'),_0x6c83bb=requiredString(_0x504ba8[_0x4b1b54(0x1b6)]??_0x504ba8[_0x4b1b54(0x161)],_0x4b1b54(0x1c5));if(_0x4498f1[_0x4b1b54(0x1d0)](_0x579aab)||_0xe5f922[_0x4b1b54(0x1d0)](_0x6c83bb))return null;_0x4498f1[_0x4b1b54(0x198)](_0x579aab,_0x6c83bb),_0xe5f922[_0x4b1b54(0x16f)](_0x6c83bb);}if(!sameSet(_0x1da093,new Set(_0x4498f1[_0x4b1b54(0x1a9)]())))return null;const _0x33dccd=objectArray(_0x586783[_0x4b1b54(0x187)],'expectedRelations',0x0,0xc8),_0x561c5e=objectArray(_0x586783[_0x4b1b54(0x178)],_0x4b1b54(0x178),0x0,0xc8),_0x5dec80=relationTupleSet(_0x33dccd,![],_0x4498f1),_0x113f1c=relationTupleSet(_0x561c5e,!![],_0x4498f1);if(!_0x5dec80||!_0x113f1c||!sameSet(_0x5dec80,_0x113f1c))return null;const _0x36c317=objectArray(_0x586783[_0x4b1b54(0x1b9)],'unresolvedRelations',0x0,0xc8);return{'expectedLocalKeys':_0x487c29,'expectedRelations':_0x33dccd,'createdDatasets':_0x1b9304,'createdRelations':_0x561c5e,'unresolvedRelations':_0x36c317,...isObject(_0x586783['metrics'])?{'metrics':_0x586783[_0x4b1b54(0x173)]}:{}};}catch{return null;}}function validateRelation(_0x51c3a4,_0x29e6c0,_0x171ad1,_0x5b9783){const _0x43bd07=a65_0x36bf80,_0x439460=_0x43bd07(0x17c)+_0x29e6c0+']',_0x20d41e=requiredString(_0x51c3a4[_0x43bd07(0x171)],_0x439460+_0x43bd07(0x1cc)),_0x2d5f91=requiredString(_0x51c3a4[_0x43bd07(0x1a6)],_0x439460+_0x43bd07(0x1ae)),_0xb89aa5=requiredString(_0x51c3a4[_0x43bd07(0x169)],_0x439460+_0x43bd07(0x1a1))[_0x43bd07(0x16a)](),_0xd53c77=requiredString(_0x51c3a4[_0x43bd07(0x19a)],_0x439460+_0x43bd07(0x1cb))[_0x43bd07(0x16a)]();if(!_0x171ad1[_0x43bd07(0x1d0)](_0x20d41e)||!_0x171ad1[_0x43bd07(0x1d0)](_0x2d5f91))fail(_0x439460+_0x43bd07(0x182));const _0xa7a157=_0x5b9783[_0x43bd07(0x180)](_0x20d41e)?.[_0x43bd07(0x180)](_0xb89aa5),_0x4bbe42=_0x5b9783['get'](_0x2d5f91)?.[_0x43bd07(0x180)](_0xd53c77);if(_0xa7a157===undefined||_0x4bbe42===undefined)fail(_0x439460+_0x43bd07(0x1af));if(_0xa7a157&&_0x4bbe42&&_0xa7a157!==_0x4bbe42)fail(_0x439460+_0x43bd07(0x192));const _0x290a9e=stringValue(_0x51c3a4[_0x43bd07(0x1a8)])||_0x43bd07(0x19f);if(_0x290a9e!==_0x43bd07(0x19f))fail(_0x439460+'.relationType\x20must\x20be\x20\x22lookup\x22.');const _0x708584=stringValue(_0x51c3a4[_0x43bd07(0x1cf)])||_0x43bd07(0x174);if(!SUPPORTED_CARDINALITIES[_0x43bd07(0x1d0)](_0x708584))fail(_0x439460+_0x43bd07(0x1ac));return requiredString(_0x51c3a4[_0x43bd07(0x1aa)],_0x439460+_0x43bd07(0x184)),validateConfidence(_0x51c3a4[_0x43bd07(0x16e)],_0x439460+_0x43bd07(0x1be)),tuple(_0x20d41e,_0xb89aa5,_0x2d5f91,_0xd53c77,_0x43bd07(0x19f),_0x708584);}function a65_0x54a2(){const _0x32cb04=['.confidence','datasets[','test','fieldName','isArray','384LqiNUv','entries','createdDatasets[].code','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','number','length','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','].design.fields[','.toField','.fromDatasetKey','21jxnkRH','1352153Ruiwvz','cardinality','has','TEXT','622988ffDNcX','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','BOOLEAN','16bFEPBG','fieldType','datasetCode','string','expectedLocalKeys','\x20must\x20be\x20between\x200\x20and\x201.','6107318uCzhQE','name','localKey','every','fromField','toLowerCase','ONE_TO_ONE','modelId','DATETIME','confidence','add','type','fromDatasetKey','USER','metrics','MANY_TO_ONE','unresolvedRelations[','dataset','].design.dataset\x20must\x20be\x20an\x20object.','createdRelations','datasetName','refTable','DATE_RANGE','relations[','toDatasetCode','datasets','trim','get','\x20non-empty\x20strings.','\x20references\x20an\x20unknown\x20dataset\x20localKey.','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','.reason','MULTI_SELECT','145XqLgFd','expectedRelations','Dataset\x20','join','ADDRESS','some','1072712IOtnMR','].localKey\x20must\x20match\x20','relations','].reason','].localKey','6330880CcuScH','\x20connects\x20incompatible\x20field\x20types.','toUpperCase','213474OQQMVN','].design.dataset','SELECT','UPLOAD','set','modelCode','toField','2IAXvTi','refTableField','validation','fields','lookup','\x20is\x20required.','.fromField','].design.fields','design','].confidence','map','toDatasetKey','dataset-batch','relationType','keys','reason','1102617mJtcGi','.cardinality\x20is\x20not\x20supported.','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','.toDatasetKey','\x20references\x20an\x20unknown\x20field.','kind','\x20must\x20contain\x20','size','fromDatasetCode',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','object','code','].design','split','unresolvedRelations','].type\x20is\x20not\x20supported.','createdDatasets','datasetId','NUMBER'];a65_0x54a2=function(){return _0x32cb04;};return a65_0x54a2();}function relationTupleSet(_0x2a133d,_0x2b9774,_0x109561){const _0x18f30d=a65_0x36bf80,_0x42c25f=new Set();for(const _0x54612a of _0x2a133d){const _0x1ce1e6=stringValue(_0x54612a[_0x18f30d(0x171)]),_0x2754ef=stringValue(_0x54612a[_0x18f30d(0x1a6)]),_0x3ec686=stringValue(_0x54612a[_0x18f30d(0x169)])[_0x18f30d(0x16a)](),_0x1f3314=stringValue(_0x54612a[_0x18f30d(0x19a)])['toLowerCase'](),_0x584f93=stringValue(_0x54612a[_0x18f30d(0x1a8)]),_0x122315=stringValue(_0x54612a['cardinality']);if(!_0x1ce1e6||!_0x2754ef||!_0x3ec686||!_0x1f3314||_0x584f93!==_0x18f30d(0x19f)||!SUPPORTED_CARDINALITIES[_0x18f30d(0x1d0)](_0x122315))return null;if(!_0x109561['has'](_0x1ce1e6)||!_0x109561['has'](_0x2754ef))return null;if(_0x2b9774&&(stringValue(_0x54612a[_0x18f30d(0x1b3)])!==_0x109561[_0x18f30d(0x180)](_0x1ce1e6)||stringValue(_0x54612a[_0x18f30d(0x17d)])!==_0x109561[_0x18f30d(0x180)](_0x2754ef)))return null;const _0x1bdeff=tuple(_0x1ce1e6,_0x3ec686,_0x2754ef,_0x1f3314,_0x584f93,_0x122315);if(_0x42c25f[_0x18f30d(0x1d0)](_0x1bdeff))return null;_0x42c25f['add'](_0x1bdeff);}return _0x42c25f;}function rejectServerDatasetIdentity(_0x394c4e,_0x30d5a8){const _0x4b0409=a65_0x36bf80;for(const _0x113f96 of['id',_0x4b0409(0x1bc),_0x4b0409(0x16c),_0x4b0409(0x1b6),'datasetCode',_0x4b0409(0x199)]){if(_0x394c4e[_0x113f96]!==undefined&&_0x394c4e[_0x113f96]!==null&&_0x394c4e[_0x113f96]!=='')fail(_0x30d5a8+'.'+_0x113f96+_0x4b0409(0x1c6));}}function objectArray(_0xacab99,_0x471246,_0x341a11,_0x2ec114){const _0x121f0f=a65_0x36bf80;return(!Array['isArray'](_0xacab99)||_0xacab99[_0x121f0f(0x1c8)]<_0x341a11||_0xacab99[_0x121f0f(0x1c8)]>_0x2ec114||_0xacab99['some'](_0x1ab5f3=>!isObject(_0x1ab5f3)))&&fail(_0x471246+_0x121f0f(0x1b1)+_0x341a11+'..'+_0x2ec114+'\x20objects.'),_0xacab99;}function stringArray(_0x327e61,_0x514cd1,_0x23ea93,_0x5a62a7){const _0x4f913c=a65_0x36bf80;return(!Array[_0x4f913c(0x1c2)](_0x327e61)||_0x327e61['length']<_0x23ea93||_0x327e61[_0x4f913c(0x1c8)]>_0x5a62a7||_0x327e61[_0x4f913c(0x18b)](_0x46eca8=>typeof _0x46eca8!==_0x4f913c(0x162)||!_0x46eca8[_0x4f913c(0x17f)]()))&&fail(_0x514cd1+_0x4f913c(0x1b1)+_0x23ea93+'..'+_0x5a62a7+_0x4f913c(0x181)),_0x327e61;}function requiredString(_0x426bf2,_0x1e8f38){const _0x231081=a65_0x36bf80,_0x318e7e=stringValue(_0x426bf2);if(!_0x318e7e)fail(_0x1e8f38+_0x231081(0x1a0));return _0x318e7e;}function stringValue(_0x3b8ad1){const _0x4e0068=a65_0x36bf80;return typeof _0x3b8ad1===_0x4e0068(0x162)?_0x3b8ad1['trim']():'';}function fieldName(_0x18df92){const _0x1376c1=a65_0x36bf80;return stringValue(_0x18df92['code']??_0x18df92['fieldCode']??_0x18df92[_0x1376c1(0x166)]??_0x18df92[_0x1376c1(0x1c1)]);}function validateConfidence(_0x297226,_0x56d6e7){const _0xd08fe9=a65_0x36bf80;_0x297226!==undefined&&_0x297226!==null&&(typeof _0x297226!==_0xd08fe9(0x1c7)||!Number['isFinite'](_0x297226)||_0x297226<0x0||_0x297226>0x1)&&fail(_0x56d6e7+_0xd08fe9(0x164));}function tuple(..._0x46884f){const _0x4635ef=a65_0x36bf80;return _0x46884f[_0x4635ef(0x1a5)]((_0x2c6053,_0x2328eb)=>_0x2328eb===0x1||_0x2328eb===0x3?_0x2c6053['toLowerCase']():_0x2c6053)[_0x4635ef(0x189)]('\x00');}function a65_0x8010(_0x2fe6c3,_0x2378a4){_0x2fe6c3=_0x2fe6c3-0x161;const _0x54a2e2=a65_0x54a2();let _0x8010a=_0x54a2e2[_0x2fe6c3];return _0x8010a;}function sameSet(_0x864f87,_0x1373ad){const _0x33c6ca=a65_0x36bf80;return _0x864f87['size']===_0x1373ad[_0x33c6ca(0x1b2)]&&[..._0x864f87][_0x33c6ca(0x168)](_0x4b627d=>_0x1373ad[_0x33c6ca(0x1d0)](_0x4b627d));}function isObject(_0x40e223){const _0x41c812=a65_0x36bf80;return typeof _0x40e223===_0x41c812(0x1b5)&&_0x40e223!==null&&!Array[_0x41c812(0x1c2)](_0x40e223);}function fail(_0x1b0cd6){const _0x23392a=a65_0x36bf80;throw CliErrors[_0x23392a(0x19d)](_0x1b0cd6);}
|
|
1
|
+
const a65_0x389805=a65_0x8a8e;(function(_0x428d34,_0x34259b){const _0x5cd8d1=a65_0x8a8e,_0x1268a3=_0x428d34();while(!![]){try{const _0x436ab8=-parseInt(_0x5cd8d1(0x11a))/0x1*(-parseInt(_0x5cd8d1(0xfd))/0x2)+-parseInt(_0x5cd8d1(0xf4))/0x3*(-parseInt(_0x5cd8d1(0xcf))/0x4)+-parseInt(_0x5cd8d1(0xe7))/0x5*(parseInt(_0x5cd8d1(0x12a))/0x6)+parseInt(_0x5cd8d1(0x136))/0x7+parseInt(_0x5cd8d1(0x133))/0x8*(parseInt(_0x5cd8d1(0xf5))/0x9)+-parseInt(_0x5cd8d1(0x122))/0xa+parseInt(_0x5cd8d1(0x10a))/0xb*(-parseInt(_0x5cd8d1(0x12e))/0xc);if(_0x436ab8===_0x34259b)break;else _0x1268a3['push'](_0x1268a3['shift']());}catch(_0x596c8a){_0x1268a3['push'](_0x1268a3['shift']());}}}(a65_0xd2e7,0xbbbfe));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a65_0x389805(0xfc),a65_0x389805(0x132)]),SUPPORTED_FIELD_TYPES=new Set([a65_0x389805(0xdb),'NUMBER','DATETIME',a65_0x389805(0x101),a65_0x389805(0x100),'MULTI_SELECT',a65_0x389805(0x135),a65_0x389805(0xed),a65_0x389805(0xec),a65_0x389805(0x10c)]);export function isDatasetBatchDesign(_0x96eb34){const _0x58915e=a65_0x389805;return isObject(_0x96eb34)&&_0x96eb34['kind']===_0x58915e(0x121);}export function validateDatasetBatchDesign(_0x3afa4f){const _0x5fbaa1=a65_0x389805;(!isObject(_0x3afa4f)||_0x3afa4f['kind']!=='dataset-batch')&&fail(_0x5fbaa1(0xd7));_0x3afa4f[_0x5fbaa1(0x124)]!==0x1&&fail('Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.');const _0xdb0b18=objectArray(_0x3afa4f[_0x5fbaa1(0xd9)],'datasets',0x1,0x14),_0x46255a=objectArray(_0x3afa4f['relations'],'relations',0x0,0xc8),_0xdaec06=objectArray(_0x3afa4f[_0x5fbaa1(0xe2)],'unresolvedRelations',0x0,0xc8),_0x553739=new Set(),_0x251512=new Map();for(const [_0x4878c5,_0x385d69]of _0xdb0b18[_0x5fbaa1(0x116)]()){const _0x27e393=requiredString(_0x385d69['localKey'],_0x5fbaa1(0x118)+_0x4878c5+'].localKey');!LOCAL_KEY['test'](_0x27e393)&&fail(_0x5fbaa1(0x118)+_0x4878c5+_0x5fbaa1(0x119)+LOCAL_KEY[_0x5fbaa1(0x12b)]+'.');_0x553739[_0x5fbaa1(0x106)](_0x27e393)&&fail(_0x5fbaa1(0xd2));_0x553739['add'](_0x27e393);!isObject(_0x385d69[_0x5fbaa1(0xde)])&&fail(_0x5fbaa1(0x118)+_0x4878c5+'].design\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x385d69[_0x5fbaa1(0xde)],'datasets['+_0x4878c5+_0x5fbaa1(0x10d));if(!isObject(_0x385d69[_0x5fbaa1(0xde)][_0x5fbaa1(0x10f)]))fail(_0x5fbaa1(0x118)+_0x4878c5+_0x5fbaa1(0xdf));rejectServerDatasetIdentity(_0x385d69[_0x5fbaa1(0xde)]['dataset'],_0x5fbaa1(0x118)+_0x4878c5+_0x5fbaa1(0x117)),requiredString(_0x385d69[_0x5fbaa1(0xde)][_0x5fbaa1(0x10f)][_0x5fbaa1(0xe6)],_0x5fbaa1(0x118)+_0x4878c5+_0x5fbaa1(0x120));_0x5fbaa1(0x12f)in _0x385d69[_0x5fbaa1(0xde)]&&(!Array[_0x5fbaa1(0x115)](_0x385d69[_0x5fbaa1(0xde)]['relations'])||_0x385d69[_0x5fbaa1(0xde)][_0x5fbaa1(0x12f)][_0x5fbaa1(0x12c)]!==0x0)&&fail(_0x5fbaa1(0x118)+_0x4878c5+_0x5fbaa1(0xe8));const _0x2a9105=objectArray(_0x385d69[_0x5fbaa1(0xde)]['fields'],'datasets['+_0x4878c5+_0x5fbaa1(0xee),0x1,0xc8),_0x18712b=new Map();for(const [_0xc0cfdc,_0x582bf4]of _0x2a9105['entries']()){const _0x40504e=fieldName(_0x582bf4);if(!_0x40504e)fail(_0x5fbaa1(0x118)+_0x4878c5+_0x5fbaa1(0x127)+_0xc0cfdc+_0x5fbaa1(0xea));const _0xbb91aa=_0x40504e[_0x5fbaa1(0x108)]();if(_0x18712b['has'](_0xbb91aa))fail(_0x5fbaa1(0xf6)+_0x27e393+'\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.');const _0x35d0b2=stringValue(_0x582bf4['type']??_0x582bf4[_0x5fbaa1(0xda)])[_0x5fbaa1(0xfe)]();if(!SUPPORTED_FIELD_TYPES[_0x5fbaa1(0x106)](_0x35d0b2))fail(_0x5fbaa1(0x118)+_0x4878c5+_0x5fbaa1(0x127)+_0xc0cfdc+_0x5fbaa1(0xd0));_0x18712b[_0x5fbaa1(0x113)](_0xbb91aa,_0x35d0b2),[_0x582bf4[_0x5fbaa1(0xd6)],_0x582bf4[_0x5fbaa1(0x130)],_0x582bf4['refTableLabelField']][_0x5fbaa1(0xe1)](_0x233494=>stringValue(_0x233494))&&fail(_0x5fbaa1(0x118)+_0x4878c5+_0x5fbaa1(0x127)+_0xc0cfdc+_0x5fbaa1(0x105));}_0x251512[_0x5fbaa1(0x113)](_0x27e393,_0x18712b);}const _0xccd7d6=new Set(),_0x21ae36=new Set();for(const [_0x135934,_0x22cc62]of _0x46255a[_0x5fbaa1(0x116)]()){const _0x18af23=validateRelation(_0x22cc62,_0x135934,_0x553739,_0x251512);if(_0xccd7d6[_0x5fbaa1(0x106)](_0x18af23))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0xccd7d6['add'](_0x18af23);const _0x14ee59=_0x18af23[_0x5fbaa1(0x139)]('\x00',0x2)[_0x5fbaa1(0x138)]('\x00');if(_0x21ae36[_0x5fbaa1(0x106)](_0x14ee59))fail(_0x5fbaa1(0xfb));_0x21ae36[_0x5fbaa1(0x125)](_0x14ee59);}for(const [_0x48749a,_0x412215]of _0xdaec06['entries']()){requiredString(_0x412215[_0x5fbaa1(0x107)],_0x5fbaa1(0x11f)+_0x48749a+_0x5fbaa1(0x114)),validateConfidence(_0x412215[_0x5fbaa1(0x104)],'unresolvedRelations['+_0x48749a+_0x5fbaa1(0x12d));}return _0x3afa4f;}export function reconcileBatchResult(_0x3aab2e){const _0x3be56d=a65_0x389805;if(!isObject(_0x3aab2e))return null;try{const _0xb7b4cd=stringArray(_0x3aab2e['expectedLocalKeys'],'expectedLocalKeys',0x1,0x14),_0x1307be=new Set(_0xb7b4cd);if(_0x1307be['size']!==_0xb7b4cd[_0x3be56d(0x12c)]||_0xb7b4cd[_0x3be56d(0xe1)](_0x31abfc=>!LOCAL_KEY[_0x3be56d(0xe5)](_0x31abfc)))return null;const _0x4d8e88=objectArray(_0x3aab2e[_0x3be56d(0xf8)],_0x3be56d(0xf8),0x1,0x14),_0x28a97e=new Map(),_0x488705=new Set();for(const _0x71538d of _0x4d8e88){const _0x11f986=requiredString(_0x71538d[_0x3be56d(0x10b)],_0x3be56d(0xd1)),_0x56dac3=requiredString(_0x71538d[_0x3be56d(0xe4)]??_0x71538d[_0x3be56d(0x129)],'createdDatasets[].code');if(_0x28a97e[_0x3be56d(0x106)](_0x11f986)||_0x488705['has'](_0x56dac3))return null;_0x28a97e[_0x3be56d(0x113)](_0x11f986,_0x56dac3),_0x488705[_0x3be56d(0x125)](_0x56dac3);}if(!sameSet(_0x1307be,new Set(_0x28a97e[_0x3be56d(0xf0)]())))return null;const _0x2d7b0d=objectArray(_0x3aab2e['expectedRelations'],_0x3be56d(0x11d),0x0,0xc8),_0x5943c9=objectArray(_0x3aab2e['createdRelations'],_0x3be56d(0x109),0x0,0xc8),_0x283a40=relationTupleSet(_0x2d7b0d,![],_0x28a97e),_0x21036d=relationTupleSet(_0x5943c9,!![],_0x28a97e);if(!_0x283a40||!_0x21036d||!sameSet(_0x283a40,_0x21036d))return null;const _0x54f934=objectArray(_0x3aab2e['unresolvedRelations'],'unresolvedRelations',0x0,0xc8);return{'expectedLocalKeys':_0xb7b4cd,'expectedRelations':_0x2d7b0d,'createdDatasets':_0x4d8e88,'createdRelations':_0x5943c9,'unresolvedRelations':_0x54f934,...isObject(_0x3aab2e[_0x3be56d(0x131)])?{'metrics':_0x3aab2e[_0x3be56d(0x131)]}:{}};}catch{return null;}}function validateRelation(_0x2e45ed,_0x1c7378,_0x39bfa4,_0x48a10a){const _0x1e5855=a65_0x389805,_0x3744c5=_0x1e5855(0x102)+_0x1c7378+']',_0x1de780=requiredString(_0x2e45ed[_0x1e5855(0x11b)],_0x3744c5+_0x1e5855(0x11e)),_0x3efab7=requiredString(_0x2e45ed[_0x1e5855(0xd5)],_0x3744c5+_0x1e5855(0xef)),_0x4d6575=requiredString(_0x2e45ed[_0x1e5855(0xff)],_0x3744c5+_0x1e5855(0xe9))[_0x1e5855(0x108)](),_0x30669c=requiredString(_0x2e45ed[_0x1e5855(0xdc)],_0x3744c5+_0x1e5855(0xdd))[_0x1e5855(0x108)]();if(!_0x39bfa4[_0x1e5855(0x106)](_0x1de780)||!_0x39bfa4['has'](_0x3efab7))fail(_0x3744c5+_0x1e5855(0xe3));const _0x2dc4f3=_0x48a10a[_0x1e5855(0x137)](_0x1de780)?.[_0x1e5855(0x137)](_0x4d6575),_0x342512=_0x48a10a[_0x1e5855(0x137)](_0x3efab7)?.[_0x1e5855(0x137)](_0x30669c);if(_0x2dc4f3===undefined||_0x342512===undefined)fail(_0x3744c5+_0x1e5855(0xd8));if(_0x2dc4f3&&_0x342512&&_0x2dc4f3!==_0x342512)fail(_0x3744c5+_0x1e5855(0x123));const _0x1d99fe=stringValue(_0x2e45ed[_0x1e5855(0x11c)])||_0x1e5855(0xf9);if(_0x1d99fe!==_0x1e5855(0xf9))fail(_0x3744c5+'.relationType\x20must\x20be\x20\x22lookup\x22.');const _0x22948c=stringValue(_0x2e45ed['cardinality'])||_0x1e5855(0xfc);if(!SUPPORTED_CARDINALITIES['has'](_0x22948c))fail(_0x3744c5+_0x1e5855(0xeb));return requiredString(_0x2e45ed[_0x1e5855(0x107)],_0x3744c5+_0x1e5855(0x126)),validateConfidence(_0x2e45ed[_0x1e5855(0x104)],_0x3744c5+_0x1e5855(0xfa)),tuple(_0x1de780,_0x4d6575,_0x3efab7,_0x30669c,_0x1e5855(0xf9),_0x22948c);}function relationTupleSet(_0xbb8411,_0xf02ed1,_0x155639){const _0x5333f0=a65_0x389805,_0x799ba0=new Set();for(const _0x4a57f4 of _0xbb8411){const _0x20451a=stringValue(_0x4a57f4[_0x5333f0(0x11b)]),_0x2be59a=stringValue(_0x4a57f4[_0x5333f0(0xd5)]),_0x9886e1=stringValue(_0x4a57f4['fromField'])[_0x5333f0(0x108)](),_0x5beb5d=stringValue(_0x4a57f4[_0x5333f0(0xdc)])['toLowerCase'](),_0x5708b0=stringValue(_0x4a57f4['relationType']),_0x5badc7=stringValue(_0x4a57f4[_0x5333f0(0xf2)]);if(!_0x20451a||!_0x2be59a||!_0x9886e1||!_0x5beb5d||_0x5708b0!==_0x5333f0(0xf9)||!SUPPORTED_CARDINALITIES[_0x5333f0(0x106)](_0x5badc7))return null;if(!_0x155639[_0x5333f0(0x106)](_0x20451a)||!_0x155639['has'](_0x2be59a))return null;if(_0xf02ed1&&(stringValue(_0x4a57f4[_0x5333f0(0xd3)])!==_0x155639['get'](_0x20451a)||stringValue(_0x4a57f4[_0x5333f0(0x128)])!==_0x155639['get'](_0x2be59a)))return null;const _0x1b9b21=tuple(_0x20451a,_0x9886e1,_0x2be59a,_0x5beb5d,_0x5708b0,_0x5badc7);if(_0x799ba0['has'](_0x1b9b21))return null;_0x799ba0['add'](_0x1b9b21);}return _0x799ba0;}function rejectServerDatasetIdentity(_0x28e2d2,_0x296457){const _0x57b228=a65_0x389805;for(const _0x545f23 of['id','datasetId','modelId','code',_0x57b228(0x129),'modelCode']){if(_0x28e2d2[_0x545f23]!==undefined&&_0x28e2d2[_0x545f23]!==null&&_0x28e2d2[_0x545f23]!=='')fail(_0x296457+'.'+_0x545f23+_0x57b228(0x10e));}}function objectArray(_0x4958b0,_0x593f69,_0x436a71,_0x27424c){const _0x150be6=a65_0x389805;return(!Array[_0x150be6(0x115)](_0x4958b0)||_0x4958b0[_0x150be6(0x12c)]<_0x436a71||_0x4958b0[_0x150be6(0x12c)]>_0x27424c||_0x4958b0[_0x150be6(0xe1)](_0x495c2b=>!isObject(_0x495c2b)))&&fail(_0x593f69+'\x20must\x20contain\x20'+_0x436a71+'..'+_0x27424c+_0x150be6(0xf7)),_0x4958b0;}function stringArray(_0xbea53f,_0x531bcb,_0x4efbe4,_0x20ccfc){const _0x512d1e=a65_0x389805;return(!Array[_0x512d1e(0x115)](_0xbea53f)||_0xbea53f['length']<_0x4efbe4||_0xbea53f[_0x512d1e(0x12c)]>_0x20ccfc||_0xbea53f['some'](_0x7076ce=>typeof _0x7076ce!==_0x512d1e(0x111)||!_0x7076ce['trim']()))&&fail(_0x531bcb+_0x512d1e(0xd4)+_0x4efbe4+'..'+_0x20ccfc+'\x20non-empty\x20strings.'),_0xbea53f;}function requiredString(_0x15d9ad,_0x3209de){const _0x454000=stringValue(_0x15d9ad);if(!_0x454000)fail(_0x3209de+'\x20is\x20required.');return _0x454000;}function a65_0x8a8e(_0x281d9f,_0x2951a7){_0x281d9f=_0x281d9f-0xcf;const _0xd2e7da=a65_0xd2e7();let _0x8a8e5=_0xd2e7da[_0x281d9f];return _0x8a8e5;}function stringValue(_0x16da9b){const _0x26bfda=a65_0x389805;return typeof _0x16da9b===_0x26bfda(0x111)?_0x16da9b['trim']():'';}function fieldName(_0x4ea1c5){const _0x2fb9d8=a65_0x389805;return stringValue(_0x4ea1c5[_0x2fb9d8(0xe4)]??_0x4ea1c5['fieldCode']??_0x4ea1c5[_0x2fb9d8(0x112)]??_0x4ea1c5[_0x2fb9d8(0xe0)]);}function validateConfidence(_0x1a3bf4,_0x2addc7){const _0x5a790e=a65_0x389805;_0x1a3bf4!==undefined&&_0x1a3bf4!==null&&(typeof _0x1a3bf4!=='number'||!Number[_0x5a790e(0xf3)](_0x1a3bf4)||_0x1a3bf4<0x0||_0x1a3bf4>0x1)&&fail(_0x2addc7+_0x5a790e(0x110));}function a65_0xd2e7(){const _0x4becb6=['.toField','design','].design.dataset\x20must\x20be\x20an\x20object.','fieldName','some','unresolvedRelations','\x20references\x20an\x20unknown\x20dataset\x20localKey.','code','test','datasetName','6085sVgYLt','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','.fromField',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','.cardinality\x20is\x20not\x20supported.','ADDRESS','USER','].design.fields','.toDatasetKey','keys','size','cardinality','isFinite','124701KAlrbA','43992IyUVOg','Dataset\x20','\x20objects.','createdDatasets','lookup','.confidence','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','MANY_TO_ONE','3104WTrTuP','toUpperCase','fromField','SELECT','BOOLEAN','relations[','every','confidence',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','has','reason','toLowerCase','createdRelations','44AdMZaD','localKey','UPLOAD','].design','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','dataset','\x20must\x20be\x20between\x200\x20and\x201.','string','name','set','].reason','isArray','entries','].design.dataset','datasets[','].localKey\x20must\x20match\x20','895Dpewxh','fromDatasetKey','relationType','expectedRelations','.fromDatasetKey','unresolvedRelations[','].design.dataset.datasetName','dataset-batch','7298290KgnfLW','\x20connects\x20incompatible\x20field\x20types.','schemaVersion','add','.reason','].design.fields[','toDatasetCode','datasetCode','5052ECWtVQ','source','length','].confidence','4068276arbZpi','relations','refTableField','metrics','ONE_TO_ONE','1856VxfPlv','validation','DATE_RANGE','185199kawGrf','get','join','split','128xeAXob','].type\x20is\x20not\x20supported.','createdDatasets[].localKey','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','fromDatasetCode','\x20must\x20contain\x20','toDatasetKey','refTable','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','\x20references\x20an\x20unknown\x20field.','datasets','fieldType','TEXT','toField'];a65_0xd2e7=function(){return _0x4becb6;};return a65_0xd2e7();}function tuple(..._0x22adab){const _0x15aaeb=a65_0x389805;return _0x22adab['map']((_0x593174,_0x1dd462)=>_0x1dd462===0x1||_0x1dd462===0x3?_0x593174[_0x15aaeb(0x108)]():_0x593174)[_0x15aaeb(0x138)]('\x00');}function sameSet(_0xcb16f4,_0x4f1d7f){const _0x3014b4=a65_0x389805;return _0xcb16f4[_0x3014b4(0xf1)]===_0x4f1d7f[_0x3014b4(0xf1)]&&[..._0xcb16f4][_0x3014b4(0x103)](_0x3f6938=>_0x4f1d7f[_0x3014b4(0x106)](_0x3f6938));}function isObject(_0xcfdfba){const _0x2ebe1b=a65_0x389805;return typeof _0xcfdfba==='object'&&_0xcfdfba!==null&&!Array[_0x2ebe1b(0x115)](_0xcfdfba);}function fail(_0x49f328){const _0x3025e7=a65_0x389805;throw CliErrors[_0x3025e7(0x134)](_0x49f328);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a66_0x24e1a2=a66_0x20db;(function(_0x3bf16e,_0x2e81f4){const _0x4fbb29=a66_0x20db,_0xe38b1a=_0x3bf16e();while(!![]){try{const _0x2fb2e1=-parseInt(_0x4fbb29(0x137))/0x1+parseInt(_0x4fbb29(0x13d))/0x2*(parseInt(_0x4fbb29(0x108))/0x3)+parseInt(_0x4fbb29(0x106))/0x4+-parseInt(_0x4fbb29(0x126))/0x5*(-parseInt(_0x4fbb29(0x12b))/0x6)+parseInt(_0x4fbb29(0x146))/0x7*(-parseInt(_0x4fbb29(0x125))/0x8)+-parseInt(_0x4fbb29(0x147))/0x9*(-parseInt(_0x4fbb29(0x133))/0xa)+-parseInt(_0x4fbb29(0x12c))/0xb;if(_0x2fb2e1===_0x2e81f4)break;else _0xe38b1a['push'](_0xe38b1a['shift']());}catch(_0x23fc68){_0xe38b1a['push'](_0xe38b1a['shift']());}}}(a66_0x1cc5,0xb11bf));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_0x24e1a2(0x13c),METADATA_BACKEND_PATH=a66_0x24e1a2(0x10f),UNGROUPED_BUSINESS_GROUP=a66_0x24e1a2(0x11c);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x21fe5a,input:_0x5ae442,dryRun:_0x11660a}){const _0x266934=a66_0x24e1a2;validateInput(_0x5ae442);const _0x29ad76=normalizeBusinessGroupArgument(_0x5ae442['businessGroup']),_0x4ad0b5=await getDatasetDetail(_0x5ae442['code']),_0x21390e=resolveBusinessGroupDataset(_0x4ad0b5,_0x5ae442[_0x266934(0x135)]);assertBusinessGroupUpdateSupported(_0x21390e,_0x29ad76);const _0x7527ef=loadCurrentBusinessGroup(_0x4ad0b5,_0x21390e);assertExpectedBusinessGroup(_0x7527ef,_0x5ae442[_0x266934(0x123)]);const _0x197255=buildBackendPlan(_0x21fe5a,_0x21390e,_0x29ad76),_0x9ec31e=_0x7527ef!==_0x29ad76;let _0x5a774b;if(_0x9ec31e&&!_0x11660a){_0x197255['kind']===_0x266934(0x143)?await updateDbTableBusinessGroup(_0x197255[_0x266934(0x10d)]):await updateErBusinessGroup(_0x197255['payload']);const _0x32086d=await getDatasetDetail(_0x21390e[_0x266934(0x135)]),_0x3381c0=resolveBusinessGroupDataset(_0x32086d,_0x21390e[_0x266934(0x135)]),_0xb317cf=loadCurrentBusinessGroup(_0x32086d,_0x3381c0);if(_0xb317cf!==_0x29ad76)throw CliErrors[_0x266934(0x12a)](_0x266934(0x107),_0x266934(0x102)+JSON[_0x266934(0x112)](displayBusinessGroup(_0x29ad76))+',\x20actual\x20'+JSON[_0x266934(0x112)](displayBusinessGroup(_0xb317cf))+'.');_0x5a774b={'verified':!![],'status':_0x266934(0x14a),'afterReadback':{'businessGroup':displayBusinessGroup(_0xb317cf)}};}else!_0x9ec31e&&(_0x5a774b={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x7527ef)}});const _0x2654da={'operation':'update','appCode':_0x21fe5a,'selector':{'code':_0x21390e[_0x266934(0x135)]},'dataset':{'id':_0x21390e['id'],'code':_0x21390e[_0x266934(0x135)],'name':_0x21390e[_0x266934(0x11d)],'sourceType':_0x21390e[_0x266934(0x11e)]},'before':{'businessGroup':displayBusinessGroup(_0x7527ef)},'after':{'businessGroup':displayBusinessGroup(_0x29ad76)},'changed':_0x9ec31e,'dryRun':_0x11660a,'submitted':_0x9ec31e&&!_0x11660a,'backend':{'method':_0x197255['method'],'path':_0x197255[_0x266934(0x117)],'payload':_0x197255[_0x266934(0x10d)]},..._0x5a774b?{'verification':_0x5a774b}:{},'warnings':[]};return{'ok':!![],'data':_0x2654da,'message':_0x9ec31e?_0x11660a?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x21390e['code']:_0x266934(0x113)+_0x21390e[_0x266934(0x135)]:_0x266934(0x11f)+_0x21390e[_0x266934(0x135)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a66_0x24e1a2(0x10e),'description':a66_0x24e1a2(0x145),'risk':a66_0x24e1a2(0x104),'flags':[CODE_FLAG,{'name':'business-group','type':a66_0x24e1a2(0x142),'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':a66_0x24e1a2(0x142),'required':![],'description':a66_0x24e1a2(0x10b)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54c115){validateInput(readBusinessGroupUpdateInput(_0x54c115));},async 'dryRun'(_0x191f76){const _0x5c0858=a66_0x24e1a2,_0x5dab9f=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x191f76[_0x5c0858(0x10c)],'input':readBusinessGroupUpdateInput(_0x191f76),'dryRun':!![]});return{'method':_0x5dab9f['data']['backend'][_0x5c0858(0x105)],'url':_0x5dab9f[_0x5c0858(0x139)]['backend']['path'],'body':_0x5dab9f[_0x5c0858(0x139)][_0x5c0858(0x10a)]['payload'],'description':_0x5dab9f['message'],..._0x5dab9f[_0x5c0858(0x139)]};},async 'execute'(_0x15c70a){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x15c70a['appCode'],'input':readBusinessGroupUpdateInput(_0x15c70a),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x4a32be){const _0x7d5fa7=a66_0x24e1a2,_0x23ac9d=_0x4a32be['str'](_0x7d5fa7(0x116));return{'code':trim(_0x4a32be[_0x7d5fa7(0x13b)](_0x7d5fa7(0x135))),'businessGroup':_0x4a32be['str'](_0x7d5fa7(0x109)),'expectBusinessGroup':_0x23ac9d===undefined||_0x23ac9d===''?undefined:_0x23ac9d};}function validateInput(_0x2f60d6){const _0x174815=a66_0x24e1a2;if(!trim(_0x2f60d6[_0x174815(0x135)]))throw CliErrors[_0x174815(0x134)]('--code\x20is\x20required');if(_0x2f60d6[_0x174815(0x144)]===undefined)throw CliErrors[_0x174815(0x134)](_0x174815(0x12d));if(!trim(_0x2f60d6[_0x174815(0x144)]))throw CliErrors[_0x174815(0x134)](_0x174815(0x124));}function assertBusinessGroupUpdateSupported(_0x9e3728,_0x54b245){const _0x331514=a66_0x24e1a2;if(_0x9e3728[_0x331514(0x11e)]===_0x331514(0x12f)&&!_0x54b245)throw CliErrors[_0x331514(0x134)](_0x331514(0x140));}function resolveBusinessGroupDataset(_0x2879f6,_0xfbe45){const _0x2ef589=a66_0x24e1a2,_0x42b80f=asPlainObject(_0x2879f6[_0x2ef589(0x127)]),_0x19d310=asPlainObject(_0x2879f6[_0x2ef589(0x103)]),_0x10555f=resolveSourceType(_0x2879f6,_0x42b80f,_0x19d310),_0x4b8f60=firstString(_0x2879f6[_0x2ef589(0x118)],_0x2879f6[_0x2ef589(0x135)],_0x42b80f[_0x2ef589(0x136)],_0xfbe45)||_0xfbe45;return{'id':firstNumber(_0x2879f6['modelId'],_0x2879f6['id'],_0x42b80f[_0x2ef589(0x131)])??firstString(_0x2879f6['modelId'],_0x2879f6['id'],_0x42b80f[_0x2ef589(0x131)])??null,'code':_0x4b8f60,'name':firstString(_0x2879f6[_0x2ef589(0x11d)],_0x42b80f['datasetName'],_0x42b80f[_0x2ef589(0x11d)])||null,'sourceType':_0x10555f,'dbTableSelector':_0x10555f===_0x2ef589(0x12f)?{'dbLinkId':firstNumber(_0x19d310['dbId']),'tableName':firstString(_0x19d310[_0x2ef589(0x13a)])||null}:null};}function resolveSourceType(_0xc8d88a,_0x51faa2,_0x30bca8){const _0x43c9b4=a66_0x24e1a2,_0xfeaafe=firstString(_0xc8d88a[_0x43c9b4(0x12e)],_0xc8d88a['sourceType'],_0x51faa2[_0x43c9b4(0x12e)],_0x51faa2['sourceType'])?.[_0x43c9b4(0x138)]()[_0x43c9b4(0x110)]();if(_0xfeaafe==='DB_TABLE'||_0xfeaafe===_0x43c9b4(0x128))return _0xfeaafe;if(Object['keys'](_0x30bca8)[_0x43c9b4(0x130)]>0x0)return _0x43c9b4(0x12f);throw CliErrors['validation'](_0x43c9b4(0x148));}function loadCurrentBusinessGroup(_0x346e61,_0x5041a5){const _0x2ac126=a66_0x24e1a2,_0x5e6c68=readBusinessGroupFromDatasetDetail(_0x346e61,_0x5041a5[_0x2ac126(0x11e)]);if(_0x5e6c68[_0x2ac126(0x13f)])return normalizeBusinessGroup(_0x5e6c68[_0x2ac126(0x11b)]);return'';}function readBusinessGroupFromDatasetDetail(_0x5d7433,_0x23b1ef){const _0x47cebd=a66_0x24e1a2,_0x411e9d=asPlainObject(_0x5d7433[_0x47cebd(0x127)]),_0x8c488d=firstPresent(_0x5d7433[_0x47cebd(0x144)]);if(_0x8c488d[_0x47cebd(0x13f)])return _0x8c488d;const _0x2d7e20=firstPresent(_0x411e9d['businessGroup']);if(_0x2d7e20[_0x47cebd(0x13f)])return _0x2d7e20;if(_0x23b1ef==='DB_TABLE')return{'found':![]};const _0x4dd3c7=readBusinessGroupFromExtend(_0x5d7433[_0x47cebd(0x132)]);if(_0x4dd3c7['found'])return _0x4dd3c7;return readBusinessGroupFromExtend(_0x411e9d[_0x47cebd(0x132)]);}function readBusinessGroupFromExtend(_0x2e72af){const _0x5c1b1b=a66_0x24e1a2;if(_0x2e72af===undefined||_0x2e72af===null||_0x2e72af==='')return{'found':![]};if(typeof _0x2e72af===_0x5c1b1b(0x142))try{const _0x5bd36b=JSON['parse'](_0x2e72af);return readBusinessGroupFromExtend(_0x5bd36b);}catch{return{'found':![]};}const _0x3a4bea=asPlainObject(_0x2e72af);if(Object['prototype'][_0x5c1b1b(0x149)][_0x5c1b1b(0x114)](_0x3a4bea,_0x5c1b1b(0x144)))return{'found':!![],'value':_0x3a4bea[_0x5c1b1b(0x144)]};return{'found':![]};}function firstPresent(..._0x5c33ea){for(const _0x258866 of _0x5c33ea){if(_0x258866!==undefined&&_0x258866!==null)return{'found':!![],'value':_0x258866};}return{'found':![]};}function assertExpectedBusinessGroup(_0x10c8b1,_0x223006){const _0x12bcc0=a66_0x24e1a2;if(_0x223006===undefined)return;const _0x2411bb=normalizeBusinessGroupArgument(_0x223006);if(_0x10c8b1!==_0x2411bb)throw CliErrors[_0x12bcc0(0x134)](_0x12bcc0(0x13e),_0x12bcc0(0x102)+JSON['stringify'](_0x2411bb)+_0x12bcc0(0x11a)+JSON[_0x12bcc0(0x112)](_0x10c8b1));}function a66_0x1cc5(){const _0x48b1e1=['dbtableConfig','write','method','2436400Jhcstr','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','9Feiuci','business-group','backend','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','appCode','payload','business-group-update','/smartapi/question/er-config/business-group/edit','toUpperCase','metadata','stringify','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','call','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','expect-business-group','path','modelCode','POST',',\x20actual\x20','value','ungrouped','name','sourceType','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','number','object','dbLinkId','expectBusinessGroup','--business-group\x20must\x20not\x20be\x20blank','32BUGXkM','1499185NbCyjt','dataset','METADATA','dbTableSelector','apiError','6oqDqVb','6872976tvFbxx','--business-group\x20is\x20required','source','DB_TABLE','length','datasetId','extend','87220MldPpV','validation','code','datasetCode','1189898qzwFLU','trim','data','tableName','str','/smartapi/dblink/updateTableBusinessGroup','636892AOwOSv','Expectation\x20mismatch\x20at\x20businessGroup','found','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','isFinite','string','db-table','businessGroup','Update\x20business\x20scenario\x20group','1305164yzaMdJ','1467OnQsSb','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','hasOwnProperty','matched','isArray','Expected\x20'];a66_0x1cc5=function(){return _0x48b1e1;};return a66_0x1cc5();}function buildBackendPlan(_0x1ae48b,_0x376b48,_0x3db769){const _0x6000d4=a66_0x24e1a2;if(_0x376b48[_0x6000d4(0x11e)]===_0x6000d4(0x12f)){if(!_0x376b48[_0x6000d4(0x129)]||_0x376b48[_0x6000d4(0x129)][_0x6000d4(0x122)]===null||!_0x376b48[_0x6000d4(0x129)][_0x6000d4(0x13a)])throw CliErrors[_0x6000d4(0x134)]('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.',_0x6000d4(0x115));return{'kind':_0x6000d4(0x143),'method':_0x6000d4(0x119),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x376b48[_0x6000d4(0x129)][_0x6000d4(0x122)],'tableName':_0x376b48[_0x6000d4(0x129)]['tableName'],'businessGroup':_0x3db769}};}return{'kind':_0x6000d4(0x111),'method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x1ae48b,'datasetCode':_0x376b48[_0x6000d4(0x135)],'businessGroup':_0x3db769}};}function normalizeBusinessGroup(_0x5ede07){const _0x5a4c77=a66_0x24e1a2;if(_0x5ede07===undefined||_0x5ede07===null)return'';return String(_0x5ede07)[_0x5a4c77(0x138)]();}function normalizeBusinessGroupArgument(_0x345629){const _0x468731=normalizeBusinessGroup(_0x345629);return _0x468731===UNGROUPED_BUSINESS_GROUP?'':_0x468731;}function displayBusinessGroup(_0x4be715){return _0x4be715||UNGROUPED_BUSINESS_GROUP;}function a66_0x20db(_0x2bb2fd,_0x476bda){_0x2bb2fd=_0x2bb2fd-0x102;const _0x1cc556=a66_0x1cc5();let _0x20dbf2=_0x1cc556[_0x2bb2fd];return _0x20dbf2;}function asPlainObject(_0x2cb67d){const _0x11f373=a66_0x24e1a2;if(!_0x2cb67d||typeof _0x2cb67d!==_0x11f373(0x121)||Array[_0x11f373(0x14b)](_0x2cb67d))return{};return _0x2cb67d;}function firstString(..._0x930255){const _0x2a6b94=a66_0x24e1a2;for(const _0x32fb84 of _0x930255){if(typeof _0x32fb84===_0x2a6b94(0x142)&&_0x32fb84[_0x2a6b94(0x138)]())return _0x32fb84[_0x2a6b94(0x138)]();if(typeof _0x32fb84===_0x2a6b94(0x120)&&Number[_0x2a6b94(0x141)](_0x32fb84))return String(_0x32fb84);}return undefined;}function firstNumber(..._0x4a8d9a){const _0x2adc71=a66_0x24e1a2;for(const _0x51ce68 of _0x4a8d9a){if(typeof _0x51ce68===_0x2adc71(0x120)&&Number['isFinite'](_0x51ce68))return _0x51ce68;if(typeof _0x51ce68===_0x2adc71(0x142)&&_0x51ce68[_0x2adc71(0x138)]()&&Number[_0x2adc71(0x141)](Number(_0x51ce68)))return Number(_0x51ce68);}return null;}function trim(_0x3080b9){const _0x32175b=a66_0x24e1a2;return String(_0x3080b9||'')[_0x32175b(0x138)]();}
|
|
1
|
+
const a66_0x218987=a66_0x4dd6;(function(_0x2a565f,_0x556972){const _0x1efa1b=a66_0x4dd6,_0x39e680=_0x2a565f();while(!![]){try{const _0x45a0ab=parseInt(_0x1efa1b(0xa3))/0x1+-parseInt(_0x1efa1b(0x6c))/0x2+-parseInt(_0x1efa1b(0x74))/0x3+-parseInt(_0x1efa1b(0x70))/0x4+parseInt(_0x1efa1b(0x75))/0x5*(-parseInt(_0x1efa1b(0x9d))/0x6)+-parseInt(_0x1efa1b(0x86))/0x7*(-parseInt(_0x1efa1b(0x9a))/0x8)+-parseInt(_0x1efa1b(0x8b))/0x9*(-parseInt(_0x1efa1b(0x99))/0xa);if(_0x45a0ab===_0x556972)break;else _0x39e680['push'](_0x39e680['shift']());}catch(_0x53ad67){_0x39e680['push'](_0x39e680['shift']());}}}(a66_0x1d08,0x6ac04));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_0x218987(0xaf),METADATA_BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP='ungrouped';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x45660d,input:_0x28e2a7,dryRun:_0x566011}){const _0x40e7e0=a66_0x218987;validateInput(_0x28e2a7);const _0x5b4b60=normalizeBusinessGroupArgument(_0x28e2a7[_0x40e7e0(0xb0)]),_0x3dd96e=await getDatasetDetail(_0x28e2a7[_0x40e7e0(0x82)]),_0x2572c6=resolveBusinessGroupDataset(_0x3dd96e,_0x28e2a7[_0x40e7e0(0x82)]);assertBusinessGroupUpdateSupported(_0x2572c6,_0x5b4b60);const _0x1ecea4=loadCurrentBusinessGroup(_0x3dd96e,_0x2572c6);assertExpectedBusinessGroup(_0x1ecea4,_0x28e2a7[_0x40e7e0(0x78)]);const _0x10584f=buildBackendPlan(_0x45660d,_0x2572c6,_0x5b4b60),_0xa46316=_0x1ecea4!==_0x5b4b60;let _0x24ed23;if(_0xa46316&&!_0x566011){_0x10584f[_0x40e7e0(0xa2)]===_0x40e7e0(0x76)?await updateDbTableBusinessGroup(_0x10584f['payload']):await updateErBusinessGroup(_0x10584f['payload']);const _0xc87aa3=await getDatasetDetail(_0x2572c6['code']),_0x33ee9b=resolveBusinessGroupDataset(_0xc87aa3,_0x2572c6[_0x40e7e0(0x82)]),_0x12b3ce=loadCurrentBusinessGroup(_0xc87aa3,_0x33ee9b);if(_0x12b3ce!==_0x5b4b60)throw CliErrors[_0x40e7e0(0x8c)](_0x40e7e0(0x88),_0x40e7e0(0x92)+JSON['stringify'](displayBusinessGroup(_0x5b4b60))+_0x40e7e0(0xa1)+JSON[_0x40e7e0(0x71)](displayBusinessGroup(_0x12b3ce))+'.');_0x24ed23={'verified':!![],'status':_0x40e7e0(0xa8),'afterReadback':{'businessGroup':displayBusinessGroup(_0x12b3ce)}};}else!_0xa46316&&(_0x24ed23={'verified':!![],'status':_0x40e7e0(0x94),'afterReadback':{'businessGroup':displayBusinessGroup(_0x1ecea4)}});const _0x540138={'operation':'update','appCode':_0x45660d,'selector':{'code':_0x2572c6['code']},'dataset':{'id':_0x2572c6['id'],'code':_0x2572c6[_0x40e7e0(0x82)],'name':_0x2572c6[_0x40e7e0(0xa4)],'sourceType':_0x2572c6[_0x40e7e0(0x7d)]},'before':{'businessGroup':displayBusinessGroup(_0x1ecea4)},'after':{'businessGroup':displayBusinessGroup(_0x5b4b60)},'changed':_0xa46316,'dryRun':_0x566011,'submitted':_0xa46316&&!_0x566011,'backend':{'method':_0x10584f[_0x40e7e0(0xad)],'path':_0x10584f[_0x40e7e0(0xae)],'payload':_0x10584f[_0x40e7e0(0x9c)]},..._0x24ed23?{'verification':_0x24ed23}:{},'warnings':[]};return{'ok':!![],'data':_0x540138,'message':_0xa46316?_0x566011?_0x40e7e0(0x7b)+_0x2572c6[_0x40e7e0(0x82)]:_0x40e7e0(0x9e)+_0x2572c6['code']:_0x40e7e0(0xa0)+_0x2572c6[_0x40e7e0(0x82)]};}export const datasetBusinessGroupUpdate={'service':a66_0x218987(0x79),'command':'business-group-update','description':a66_0x218987(0x97),'risk':a66_0x218987(0x6b),'flags':[CODE_FLAG,{'name':a66_0x218987(0x89),'type':a66_0x218987(0x90),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':a66_0x218987(0x7f),'type':a66_0x218987(0x90),'required':![],'description':a66_0x218987(0xa6)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1e84a3){validateInput(readBusinessGroupUpdateInput(_0x1e84a3));},async 'dryRun'(_0x2198a8){const _0x3a05e9=a66_0x218987,_0x2e89b4=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x2198a8[_0x3a05e9(0x87)],'input':readBusinessGroupUpdateInput(_0x2198a8),'dryRun':!![]});return{'method':_0x2e89b4['data']['backend']['method'],'url':_0x2e89b4[_0x3a05e9(0x9b)]['backend'][_0x3a05e9(0xae)],'body':_0x2e89b4[_0x3a05e9(0x9b)][_0x3a05e9(0xa7)][_0x3a05e9(0x9c)],'description':_0x2e89b4['message'],..._0x2e89b4['data']};},async 'execute'(_0x25c649){const _0x2163af=a66_0x218987;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x25c649[_0x2163af(0x87)],'input':readBusinessGroupUpdateInput(_0x25c649),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x246a4f){const _0x5564ed=a66_0x218987,_0x4e9986=_0x246a4f[_0x5564ed(0x6e)](_0x5564ed(0x7f));return{'code':trim(_0x246a4f[_0x5564ed(0x6e)](_0x5564ed(0x82))),'businessGroup':_0x246a4f[_0x5564ed(0x6e)]('business-group'),'expectBusinessGroup':_0x4e9986===undefined||_0x4e9986===''?undefined:_0x4e9986};}function a66_0x1d08(){const _0x1c12ec=['--business-group\x20is\x20required','modelCode','isArray','write','916726rVSGpd','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','str','Expectation\x20mismatch\x20at\x20businessGroup','262364dWcQvu','stringify','parse','source','2472666JKxwNj','1981565WuTjCF','db-table','prototype','expectBusinessGroup','dataset','validation','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','tableName','sourceType','--business-group\x20must\x20not\x20be\x20blank','expect-business-group','isFinite','toUpperCase','code','hasOwnProperty','dbTableSelector','modelId','938RsQaNY','appCode','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','business-group','datasetCode','537984hBHcdw','apiError','trim','number','datasetId','string','DB_TABLE','Expected\x20','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','unchanged','object','dbLinkId','Update\x20business\x20scenario\x20group','keys','290WvAogx','21592WNsPkc','data','payload','6JeFJyj','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','--code\x20is\x20required','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20',',\x20actual\x20','kind','86571texXdE','name','length','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','backend','matched','dbId','POST','extend','found','method','path','/smartapi/dblink/updateTableBusinessGroup','businessGroup'];a66_0x1d08=function(){return _0x1c12ec;};return a66_0x1d08();}function validateInput(_0x5ac04b){const _0x4198cd=a66_0x218987;if(!trim(_0x5ac04b[_0x4198cd(0x82)]))throw CliErrors['validation'](_0x4198cd(0x9f));if(_0x5ac04b[_0x4198cd(0xb0)]===undefined)throw CliErrors[_0x4198cd(0x7a)](_0x4198cd(0xb1));if(!trim(_0x5ac04b[_0x4198cd(0xb0)]))throw CliErrors[_0x4198cd(0x7a)](_0x4198cd(0x7e));}function assertBusinessGroupUpdateSupported(_0x201e54,_0x3fcb7d){const _0x2530e8=a66_0x218987;if(_0x201e54[_0x2530e8(0x7d)]===_0x2530e8(0x91)&&!_0x3fcb7d)throw CliErrors[_0x2530e8(0x7a)]('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function resolveBusinessGroupDataset(_0x91750d,_0x352527){const _0x2592f4=a66_0x218987,_0x187d0c=asPlainObject(_0x91750d[_0x2592f4(0x79)]),_0x281355=asPlainObject(_0x91750d['dbtableConfig']),_0x502772=resolveSourceType(_0x91750d,_0x187d0c,_0x281355),_0x4ac3ed=firstString(_0x91750d[_0x2592f4(0x69)],_0x91750d[_0x2592f4(0x82)],_0x187d0c[_0x2592f4(0x8a)],_0x352527)||_0x352527;return{'id':firstNumber(_0x91750d['modelId'],_0x91750d['id'],_0x187d0c[_0x2592f4(0x8f)])??firstString(_0x91750d[_0x2592f4(0x85)],_0x91750d['id'],_0x187d0c[_0x2592f4(0x8f)])??null,'code':_0x4ac3ed,'name':firstString(_0x91750d[_0x2592f4(0xa4)],_0x187d0c['datasetName'],_0x187d0c['name'])||null,'sourceType':_0x502772,'dbTableSelector':_0x502772==='DB_TABLE'?{'dbLinkId':firstNumber(_0x281355[_0x2592f4(0xa9)]),'tableName':firstString(_0x281355['tableName'])||null}:null};}function resolveSourceType(_0x114369,_0x118a90,_0x3cb384){const _0x383011=a66_0x218987,_0x491eff=firstString(_0x114369[_0x383011(0x73)],_0x114369[_0x383011(0x7d)],_0x118a90['source'],_0x118a90[_0x383011(0x7d)])?.['trim']()[_0x383011(0x81)]();if(_0x491eff==='DB_TABLE'||_0x491eff==='METADATA')return _0x491eff;if(Object[_0x383011(0x98)](_0x3cb384)[_0x383011(0xa5)]>0x0)return _0x383011(0x91);throw CliErrors[_0x383011(0x7a)](_0x383011(0x93));}function loadCurrentBusinessGroup(_0x25fa57,_0x31425e){const _0x74c2c9=a66_0x218987,_0x428155=readBusinessGroupFromDatasetDetail(_0x25fa57,_0x31425e[_0x74c2c9(0x7d)]);if(_0x428155[_0x74c2c9(0xac)])return normalizeBusinessGroup(_0x428155['value']);return'';}function readBusinessGroupFromDatasetDetail(_0x2d9f23,_0xc1a05){const _0x355951=a66_0x218987,_0x1a5d85=asPlainObject(_0x2d9f23[_0x355951(0x79)]),_0x52e38e=firstPresent(_0x2d9f23[_0x355951(0xb0)]);if(_0x52e38e[_0x355951(0xac)])return _0x52e38e;const _0x12d820=firstPresent(_0x1a5d85[_0x355951(0xb0)]);if(_0x12d820[_0x355951(0xac)])return _0x12d820;if(_0xc1a05===_0x355951(0x91))return{'found':![]};const _0x5df37d=readBusinessGroupFromExtend(_0x2d9f23[_0x355951(0xab)]);if(_0x5df37d[_0x355951(0xac)])return _0x5df37d;return readBusinessGroupFromExtend(_0x1a5d85[_0x355951(0xab)]);}function readBusinessGroupFromExtend(_0x515416){const _0x290557=a66_0x218987;if(_0x515416===undefined||_0x515416===null||_0x515416==='')return{'found':![]};if(typeof _0x515416===_0x290557(0x90))try{const _0x3d4024=JSON[_0x290557(0x72)](_0x515416);return readBusinessGroupFromExtend(_0x3d4024);}catch{return{'found':![]};}const _0x149d3e=asPlainObject(_0x515416);if(Object[_0x290557(0x77)][_0x290557(0x83)]['call'](_0x149d3e,_0x290557(0xb0)))return{'found':!![],'value':_0x149d3e[_0x290557(0xb0)]};return{'found':![]};}function firstPresent(..._0x5652d3){for(const _0x53b82e of _0x5652d3){if(_0x53b82e!==undefined&&_0x53b82e!==null)return{'found':!![],'value':_0x53b82e};}return{'found':![]};}function assertExpectedBusinessGroup(_0x5da128,_0xffe170){const _0x14ea7b=a66_0x218987;if(_0xffe170===undefined)return;const _0xabbcd8=normalizeBusinessGroupArgument(_0xffe170);if(_0x5da128!==_0xabbcd8)throw CliErrors[_0x14ea7b(0x7a)](_0x14ea7b(0x6f),_0x14ea7b(0x92)+JSON['stringify'](_0xabbcd8)+_0x14ea7b(0xa1)+JSON[_0x14ea7b(0x71)](_0x5da128));}function buildBackendPlan(_0x2065f0,_0x21d613,_0x5d50c0){const _0x2278e1=a66_0x218987;if(_0x21d613[_0x2278e1(0x7d)]==='DB_TABLE'){if(!_0x21d613[_0x2278e1(0x84)]||_0x21d613[_0x2278e1(0x84)][_0x2278e1(0x96)]===null||!_0x21d613[_0x2278e1(0x84)][_0x2278e1(0x7c)])throw CliErrors['validation'](_0x2278e1(0x6d),'Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.');return{'kind':'db-table','method':_0x2278e1(0xaa),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x21d613['dbTableSelector'][_0x2278e1(0x96)],'tableName':_0x21d613['dbTableSelector'][_0x2278e1(0x7c)],'businessGroup':_0x5d50c0}};}return{'kind':'metadata','method':_0x2278e1(0xaa),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x2065f0,'datasetCode':_0x21d613[_0x2278e1(0x82)],'businessGroup':_0x5d50c0}};}function a66_0x4dd6(_0x3b1d54,_0x4a68b5){_0x3b1d54=_0x3b1d54-0x69;const _0x1d0890=a66_0x1d08();let _0x4dd6f3=_0x1d0890[_0x3b1d54];return _0x4dd6f3;}function normalizeBusinessGroup(_0x12b815){const _0x5bd2c1=a66_0x218987;if(_0x12b815===undefined||_0x12b815===null)return'';return String(_0x12b815)[_0x5bd2c1(0x8d)]();}function normalizeBusinessGroupArgument(_0x519870){const _0x451184=normalizeBusinessGroup(_0x519870);return _0x451184===UNGROUPED_BUSINESS_GROUP?'':_0x451184;}function displayBusinessGroup(_0xc9bf3a){return _0xc9bf3a||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x3e7313){const _0x24563=a66_0x218987;if(!_0x3e7313||typeof _0x3e7313!==_0x24563(0x95)||Array[_0x24563(0x6a)](_0x3e7313))return{};return _0x3e7313;}function firstString(..._0x4961d9){const _0x1aafe7=a66_0x218987;for(const _0x12cc29 of _0x4961d9){if(typeof _0x12cc29===_0x1aafe7(0x90)&&_0x12cc29['trim']())return _0x12cc29[_0x1aafe7(0x8d)]();if(typeof _0x12cc29===_0x1aafe7(0x8e)&&Number[_0x1aafe7(0x80)](_0x12cc29))return String(_0x12cc29);}return undefined;}function firstNumber(..._0x31f750){const _0x5973eb=a66_0x218987;for(const _0x1acdd0 of _0x31f750){if(typeof _0x1acdd0==='number'&&Number[_0x5973eb(0x80)](_0x1acdd0))return _0x1acdd0;if(typeof _0x1acdd0==='string'&&_0x1acdd0[_0x5973eb(0x8d)]()&&Number[_0x5973eb(0x80)](Number(_0x1acdd0)))return Number(_0x1acdd0);}return null;}function trim(_0x2082dc){const _0x4f24fe=a66_0x218987;return String(_0x2082dc||'')[_0x4f24fe(0x8d)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a67_0x1cc64e=a67_0x1bb5;(function(_0x43f016,_0x579bda){const _0x5a22bf=a67_0x1bb5,_0x1a2bd2=_0x43f016();while(!![]){try{const _0x45fed9=-parseInt(_0x5a22bf(0x9a))/0x1+parseInt(_0x5a22bf(0x9c))/0x2*(-parseInt(_0x5a22bf(0xa5))/0x3)+-parseInt(_0x5a22bf(0x96))/0x4+-parseInt(_0x5a22bf(0x8e))/0x5+-parseInt(_0x5a22bf(0x9d))/0x6+-parseInt(_0x5a22bf(0xa6))/0x7*(parseInt(_0x5a22bf(0x97))/0x8)+parseInt(_0x5a22bf(0x91))/0x9*(parseInt(_0x5a22bf(0xa2))/0xa);if(_0x45fed9===_0x579bda)break;else _0x1a2bd2['push'](_0x1a2bd2['shift']());}catch(_0x3e55c4){_0x1a2bd2['push'](_0x1a2bd2['shift']());}}}(a67_0x5d3a,0x7f6e7));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a67_0x1bb5(_0x5db682,_0x1030bb){_0x5db682=_0x5db682-0x8e;const _0x5d3af5=a67_0x5d3a();let _0x1bb5e8=_0x5d3af5[_0x5db682];return _0x1bb5e8;}export const datasetBusinessGroups={'service':a67_0x1cc64e(0xa1),'command':'business-groups','description':a67_0x1cc64e(0xa0),'risk':a67_0x1cc64e(0x99),'flags':[{'name':a67_0x1cc64e(0x95),'type':a67_0x1cc64e(0x98),'required':!![],'description':a67_0x1cc64e(0xa3)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x45c900){const _0x4eaca0=a67_0x1cc64e,_0x41cdf6=_0x45c900[_0x4eaca0(0xa4)](_0x4eaca0(0x95)),_0x5636b3=await getErBusinessGroupSummary(_0x45c900['appCode'],_0x41cdf6),_0x3f3ea9=_0x5636b3[_0x4eaca0(0x9e)][_0x4eaca0(0x9b)](_0x38934c=>({..._0x38934c,'businessGroup':_0x38934c[_0x4eaca0(0x92)]['trim']()||_0x4eaca0(0x9f)}));return{'ok':!![],'data':{..._0x5636b3,'groups':_0x3f3ea9,'scope':_0x4eaca0(0x90)},'message':_0x4eaca0(0x94)+_0x3f3ea9[_0x4eaca0(0x8f)]+_0x4eaca0(0x93)+_0x41cdf6};}};function a67_0x5d3a(){const _0x2af381=['1046433BulRPc','7sYVAIB','5097525NJhfSw','length','DB_TABLE','999fCMHMx','businessGroup','\x20business\x20group(s)\x20for\x20database\x20connection\x20','Found\x20','dbid','3047784IDBRmJ','4290952fDxjaK','number','read','170085aBbYgD','map','2enfVBZ','5770668ggibAh','groups','ungrouped','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','dataset','389230Apjkyq','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','num'];a67_0x5d3a=function(){return _0x2af381;};return a67_0x5d3a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x7d7d96=a68_0x3591;(function(_0x16322a,_0xc4e936){const _0x1c620e=a68_0x3591,_0x1c8717=_0x16322a();while(!![]){try{const _0x25d52f=parseInt(_0x1c620e(0x19b))/0x1+parseInt(_0x1c620e(0x18c))/0x2*(-parseInt(_0x1c620e(0x192))/0x3)+-parseInt(_0x1c620e(0x1a3))/0x4+-parseInt(_0x1c620e(0x198))/0x5+parseInt(_0x1c620e(0x194))/0x6*(-parseInt(_0x1c620e(0x18b))/0x7)+parseInt(_0x1c620e(0x1a5))/0x8*(parseInt(_0x1c620e(0x1a4))/0x9)+parseInt(_0x1c620e(0x195))/0xa*(parseInt(_0x1c620e(0x18f))/0xb);if(_0x25d52f===_0xc4e936)break;else _0x1c8717['push'](_0x1c8717['shift']());}catch(_0x3504aa){_0x1c8717['push'](_0x1c8717['shift']());}}}(a68_0x5e62,0x810c9));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a68_0x7d7d96(0x188),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY=a68_0x7d7d96(0x1a7);function valueToString(_0x5afcff){const _0x246dbf=a68_0x7d7d96;return _0x5afcff==null?'':String(_0x5afcff)[_0x246dbf(0x19d)]();}function getDatasetCode(_0xd4a62c){const _0x7b95e4=a68_0x7d7d96;return valueToString(_0xd4a62c['code']??_0xd4a62c[_0x7b95e4(0x19c)]??_0xd4a62c[_0x7b95e4(0x185)]?.[_0x7b95e4(0x189)]);}function getDatasetName(_0x1b1356){const _0x1ecafe=a68_0x7d7d96;return valueToString(_0x1b1356[_0x1ecafe(0x191)]??_0x1b1356['dataset']?.[_0x1ecafe(0x190)])||'unknown';}function getDatasetSource(_0x310d8e){const _0x3c5d80=a68_0x7d7d96;return valueToString(_0x310d8e['source']??_0x310d8e[_0x3c5d80(0x185)]?.[_0x3c5d80(0x18d)])['toUpperCase']();}function a68_0x5e62(){const _0x201e45=['UNKNOWN','lovrabet','datasetCode','getOne','7YIRquj','2NwuMqY','sourceType','dbId','33tgmgEx','datasetName','name','1235565vqAkXA','object','5740998wUvEie','9176970XVlAOY','\x20is\x20','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','4678265ChhkzH','dbtableConfig','validation','57688CMKfWS','modelCode','trim','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','dbtable','filter','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','join','30848UGXeHI','999BZZpIU','2152YbjZXR','METADATA','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','dataset','tableName'];a68_0x5e62=function(){return _0x201e45;};return a68_0x5e62();}function getDbtableConfig(_0x59bf79){const _0x367185=a68_0x7d7d96,_0x2105a3=_0x59bf79[_0x367185(0x199)]??_0x59bf79[_0x367185(0x19f)];return _0x2105a3&&typeof _0x2105a3===_0x367185(0x193)?_0x2105a3:{};}export function isDbTableBackedDataset(_0xe3d686){const _0x78d557=a68_0x7d7d96,_0x548f1e=getDatasetSource(_0xe3d686);if(_0x548f1e===_0x78d557(0x1a6))return![];const _0xe8bbf4=getDbtableConfig(_0xe3d686),_0x229548=_0xe8bbf4[_0x78d557(0x18e)]??_0xe8bbf4['id'],_0x8b50e9=valueToString(_0xe8bbf4[_0x78d557(0x186)]??_0xe3d686[_0x78d557(0x186)]??_0xe3d686[_0x78d557(0x185)]?.[_0x78d557(0x186)]);return _0x229548!==undefined&&_0x229548!==null&&_0x8b50e9['length']>0x0;}export function filterDbTableBackedDatasets(_0x42767a){const _0x1455d9=a68_0x7d7d96;return _0x42767a[_0x1455d9(0x1a0)](_0x2c1bd5=>isDbTableBackedDataset(_0x2c1bd5));}function a68_0x3591(_0x348903,_0x5a6d2b){_0x348903=_0x348903-0x185;const _0x5e628e=a68_0x5e62();let _0x359197=_0x5e628e[_0x348903];return _0x359197;}export function buildDbTableBackedRequirementMessage(_0x573dbb,_0xeee940='SQL\x20schema\x20validation'){const _0x315e9b=a68_0x7d7d96,_0x2d5d26=getDatasetSource(_0x573dbb)||_0x315e9b(0x187),_0x340797=getDatasetName(_0x573dbb),_0x796bca=getDatasetCode(_0x573dbb),_0x1b480f=_0x796bca?'\x20('+_0x796bca+')':'';return['The\x20current\x20dataset\x20\x22'+_0x340797+'\x22'+_0x1b480f+_0x315e9b(0x196)+_0x2d5d26+_0x315e9b(0x1a1)+_0xeee940+'.',_0x315e9b(0x19e),'Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.',_0x315e9b(0x197)+RUNTIME_DATA_ACCESS_COMMANDS[_0x315e9b(0x1a0)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x315e9b(0x18a)]+'.'][_0x315e9b(0x1a2)]('\x20');}export function assertDatasetIsDbTableBacked(_0x2f5f56,_0x5b9555){const _0x2e88f0=a68_0x7d7d96;if(!isDbTableBackedDataset(_0x2f5f56))throw CliErrors[_0x2e88f0(0x19a)](buildDbTableBackedRequirementMessage(_0x2f5f56,_0x5b9555));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x28a945=a69_0x57d3;(function(_0x1039fd,_0xbac46b){const _0xcb5b2e=a69_0x57d3,_0x511686=_0x1039fd();while(!![]){try{const _0x35888c=parseInt(_0xcb5b2e(0x1af))/0x1*(parseInt(_0xcb5b2e(0x1b0))/0x2)+-parseInt(_0xcb5b2e(0x1b3))/0x3+parseInt(_0xcb5b2e(0x1ab))/0x4+-parseInt(_0xcb5b2e(0x1b1))/0x5*(-parseInt(_0xcb5b2e(0x1ae))/0x6)+parseInt(_0xcb5b2e(0x1b2))/0x7+parseInt(_0xcb5b2e(0x1ad))/0x8*(parseInt(_0xcb5b2e(0x1a9))/0x9)+-parseInt(_0xcb5b2e(0x1a8))/0xa;if(_0x35888c===_0xbac46b)break;else _0x511686['push'](_0x511686['shift']());}catch(_0x3d0a4f){_0x511686['push'](_0x511686['shift']());}}}(a69_0x4851,0x90522));import{createCrossDbRelation}from'../../core/api-client.js';function a69_0x57d3(_0x3d07fb,_0x56f27e){_0x3d07fb=_0x3d07fb-0x1a8;const _0x4851ea=a69_0x4851();let _0x57d375=_0x4851ea[_0x3d07fb];return _0x57d375;}function a69_0x4851(){const _0x24fc4f=['create','2508428puBnxv','write','52912axucrw','49806BbVIyn','60161WAUaRQ','8aimGhT','575uLtNHY','1253602IaQcgW','1795143qOGidK','cross-relation-create','12220010DbmlOW','558hPiwgP'];a69_0x4851=function(){return _0x24fc4f;};return a69_0x4851();}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':'dataset','command':a69_0x28a945(0x1b4),'description':'Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','risk':a69_0x28a945(0x1ac),'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 _0x4cf8f5=>validateCrossRelation(_0x4cf8f5,'create'),'dryRun':_0x238ddd=>previewCrossRelation(_0x238ddd,a69_0x28a945(0x1aa)),'execute':_0x57d12c=>executeCrossRelation(_0x57d12c,'create',createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0xbdf3b4=a70_0x11ec;function a70_0x11ec(_0x1c97bf,_0x220b3a){_0x1c97bf=_0x1c97bf-0x1f4;const _0x376db0=a70_0x376d();let _0x11ecd0=_0x376db0[_0x1c97bf];return _0x11ecd0;}(function(_0x22bc12,_0x88b734){const _0x4866ed=a70_0x11ec,_0x2f9d4c=_0x22bc12();while(!![]){try{const _0x50da7a=-parseInt(_0x4866ed(0x200))/0x1*(parseInt(_0x4866ed(0x1f4))/0x2)+-parseInt(_0x4866ed(0x1f9))/0x3*(-parseInt(_0x4866ed(0x1fb))/0x4)+parseInt(_0x4866ed(0x201))/0x5*(-parseInt(_0x4866ed(0x1fd))/0x6)+-parseInt(_0x4866ed(0x1fa))/0x7*(parseInt(_0x4866ed(0x202))/0x8)+-parseInt(_0x4866ed(0x1ff))/0x9+parseInt(_0x4866ed(0x1f6))/0xa+-parseInt(_0x4866ed(0x1f7))/0xb*(-parseInt(_0x4866ed(0x1fc))/0xc);if(_0x50da7a===_0x88b734)break;else _0x2f9d4c['push'](_0x2f9d4c['shift']());}catch(_0x2fac2b){_0x2f9d4c['push'](_0x2f9d4c['shift']());}}}(a70_0x376d,0xcf5b5));import{deleteCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';function a70_0x376d(){const _0x4079d2=['cross-relation-delete','14573700qYzSkq','34133DKjobh','Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','3WPqcml','14ILKppW','182876pUeBEg','5712VGBxQN','912zGCrPn','delete','2999349WfeFmI','1PcLXre','5035sQHLWX','263328OJdYKR','3157254ivvPor'];a70_0x376d=function(){return _0x4079d2;};return a70_0x376d();}export const datasetCrossRelationDelete={'service':'dataset','command':a70_0xbdf3b4(0x1f5),'description':a70_0xbdf3b4(0x1f8),'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 _0x12e4f5=>validateCrossRelation(_0x12e4f5,'delete'),'dryRun':_0x1070db=>previewCrossRelation(_0x1070db,'delete'),'execute':_0x4e81a8=>executeCrossRelation(_0x4e81a8,a70_0xbdf3b4(0x1fe),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a71_0xff5e(){const _0x992dc1=['Cross-database\x20relations:\x20','191190NFIhoy','593784zFhKbb','325885jimuKJ','75282WdjPqT','8BVOgqY','List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','list','1601019jvlCId','read','map','cross-relation-list','143ghfqrT','1637BnJJeO','30XUXHdg','462951UUfWCX','dataset','length','appCode','466hKSeJk'];a71_0xff5e=function(){return _0x992dc1;};return a71_0xff5e();}const a71_0x4b395a=a71_0x2b41;(function(_0x296141,_0x3412ab){const _0x1cb4d3=a71_0x2b41,_0x28b323=_0x296141();while(!![]){try{const _0x54640f=parseInt(_0x1cb4d3(0x176))/0x1*(parseInt(_0x1cb4d3(0x17c))/0x2)+-parseInt(_0x1cb4d3(0x16d))/0x3+parseInt(_0x1cb4d3(0x16b))/0x4+parseInt(_0x1cb4d3(0x16c))/0x5*(-parseInt(_0x1cb4d3(0x177))/0x6)+parseInt(_0x1cb4d3(0x171))/0x7+-parseInt(_0x1cb4d3(0x16e))/0x8*(-parseInt(_0x1cb4d3(0x178))/0x9)+-parseInt(_0x1cb4d3(0x16a))/0xa*(parseInt(_0x1cb4d3(0x175))/0xb);if(_0x54640f===_0x3412ab)break;else _0x28b323['push'](_0x28b323['shift']());}catch(_0x154d68){_0x28b323['push'](_0x28b323['shift']());}}}(a71_0xff5e,0x33641));function a71_0x2b41(_0x2744ac,_0x1d78a3){_0x2744ac=_0x2744ac-0x169;const _0xff5ef1=a71_0xff5e();let _0x2b419c=_0xff5ef1[_0x2744ac];return _0x2b419c;}import{queryCrossDbRelations}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CROSS_RELATION_DBLINK_FLAG,CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG}from'../../commands/common/flags.js';import{projectCrossRelation,resolveCrossRelationQuery,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationList={'service':a71_0x4b395a(0x179),'command':a71_0x4b395a(0x174),'description':a71_0x4b395a(0x16f),'risk':a71_0x4b395a(0x172),'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 _0x395d90=>validateCrossRelation(_0x395d90,a71_0x4b395a(0x170)),async 'execute'(_0x1150ff){const _0x15d64a=a71_0x4b395a,_0x2d17a9=await resolveCrossRelationQuery(_0x1150ff),_0x1cdd2b=await queryCrossDbRelations(_0x2d17a9);return{'ok':!![],'data':{'appCode':_0x1150ff[_0x15d64a(0x17b)],'selector':_0x2d17a9,'total':_0x1cdd2b[_0x15d64a(0x17a)],'relations':_0x1cdd2b[_0x15d64a(0x173)](projectCrossRelation)},'message':_0x15d64a(0x169)+_0x1cdd2b[_0x15d64a(0x17a)]+'\x20relation(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a72_0x40c5aa=a72_0x5118;(function(_0x5252a5,_0x2643c0){const _0x18ea9b=a72_0x5118,_0x5649cc=_0x5252a5();while(!![]){try{const _0x46a760=-parseInt(_0x18ea9b(0x16e))/0x1*(-parseInt(_0x18ea9b(0x17f))/0x2)+-parseInt(_0x18ea9b(0x180))/0x3*(parseInt(_0x18ea9b(0x159))/0x4)+-parseInt(_0x18ea9b(0x19f))/0x5+parseInt(_0x18ea9b(0x168))/0x6*(-parseInt(_0x18ea9b(0x192))/0x7)+-parseInt(_0x18ea9b(0x17a))/0x8+parseInt(_0x18ea9b(0x15b))/0x9*(parseInt(_0x18ea9b(0x178))/0xa)+parseInt(_0x18ea9b(0x1a1))/0xb;if(_0x46a760===_0x2643c0)break;else _0x5649cc['push'](_0x5649cc['shift']());}catch(_0x5e5efa){_0x5649cc['push'](_0x5649cc['shift']());}}}(a72_0x3676,0xc4b08));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(_0xbf2ff5,_0x3726e9){const _0x1a5cb9=a72_0x5118,_0xbb3b5b=_0xbf2ff5[_0x1a5cb9(0x15d)](_0x3726e9)[_0x1a5cb9(0x1a2)]();if(!_0xbb3b5b)throw CliErrors[_0x1a5cb9(0x158)](_0x3726e9);return _0xbb3b5b;}function explicitDblink(_0x370f33){const _0x24ff6a=a72_0x5118,_0x1a965d=_0x370f33['flag'](_0x24ff6a(0x197));if(_0x1a965d===undefined||_0x1a965d===null)return undefined;const _0x4eb89d=Number(_0x1a965d);if(!Number[_0x24ff6a(0x198)](_0x4eb89d)||_0x4eb89d<=0x0)throw CliErrors[_0x24ff6a(0x170)](_0x24ff6a(0x164));return _0x4eb89d;}export function validateCrossRelation(_0x15029b,_0x440bc4){const _0x1bb325=a72_0x5118,_0x5586d1=explicitDblink(_0x15029b);if(_0x440bc4===_0x1bb325(0x16b)){if(!_0x15029b[_0x1bb325(0x15d)](_0x1bb325(0x1a4))[_0x1bb325(0x1a2)]()&&_0x5586d1===undefined)throw CliErrors[_0x1bb325(0x170)]('Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.');return;}required(_0x15029b,_0x1bb325(0x1a4)),required(_0x15029b,'from-column');if(_0x440bc4!==_0x1bb325(0x196)){required(_0x15029b,_0x1bb325(0x183)),required(_0x15029b,_0x1bb325(0x160));const _0x16da5f=_0x15029b[_0x1bb325(0x15d)](_0x1bb325(0x182))[_0x1bb325(0x1a2)]();if(_0x16da5f&&!CROSS_RELATION_CARDINALITY_FLAG['enum'][_0x1bb325(0x16a)](_0x16da5f))throw CliErrors[_0x1bb325(0x170)](_0x1bb325(0x17b));}}async function resolveEndpoint(_0x56ef48){const _0x159389=a72_0x5118,_0x55bacf=await getDatasetDetail(_0x56ef48),_0x117cb5=_0x55bacf?.[_0x159389(0x18a)]??{};if((_0x55bacf?.['source']??_0x117cb5['sourceType'])!=='DB_TABLE')throw CliErrors[_0x159389(0x170)](_0x159389(0x17e)+_0x56ef48+'\x20must\x20be\x20a\x20DB_TABLE\x20dataset.');const _0x3caa24=_0x55bacf['dbtableConfig']??_0x55bacf[_0x159389(0x19b)]??{};let _0x2d4beb=_0x55bacf[_0x159389(0x18c)]??_0x117cb5[_0x159389(0x18c)]??{};if(typeof _0x2d4beb===_0x159389(0x167))try{_0x2d4beb=_0x2d4beb[_0x159389(0x1a2)]()?JSON[_0x159389(0x15a)](_0x2d4beb):{};}catch{throw CliErrors[_0x159389(0x170)](_0x159389(0x17e)+_0x56ef48+_0x159389(0x1a3));}const _0x1135aa=Number(_0x2d4beb?.[_0x159389(0x173)]?.[_0x159389(0x17d)]??_0x55bacf[_0x159389(0x173)]?.[_0x159389(0x17d)]??_0x117cb5[_0x159389(0x173)]?.[_0x159389(0x17d)]??_0x3caa24[_0x159389(0x17d)]??_0x117cb5[_0x159389(0x17d)]??_0x55bacf[_0x159389(0x17d)]),_0x4dd439=String(_0x55bacf[_0x159389(0x19c)]??_0x117cb5['tableName']??_0x3caa24[_0x159389(0x19c)]??'')['trim']();if(!Number[_0x159389(0x198)](_0x1135aa)||_0x1135aa<=0x0||!_0x4dd439)throw CliErrors['validation'](_0x159389(0x17e)+_0x56ef48+_0x159389(0x176));return{'datasetCode':_0x56ef48,'dblinkId':_0x1135aa,'table':_0x4dd439};}export async function resolveCrossRelationQuery(_0x4c8e05){const _0x52c7f6=a72_0x5118,_0x54b196=_0x4c8e05[_0x52c7f6(0x15d)](_0x52c7f6(0x1a4))[_0x52c7f6(0x1a2)](),_0x57c6c0=explicitDblink(_0x4c8e05),_0x554440=_0x54b196?await resolveEndpoint(_0x54b196):undefined;if(_0x554440&&_0x57c6c0!==undefined&&_0x554440[_0x52c7f6(0x19e)]!==_0x57c6c0)throw CliErrors[_0x52c7f6(0x170)](_0x52c7f6(0x162));const _0x1ede78=_0x554440?.[_0x52c7f6(0x19e)]??_0x57c6c0;if(_0x1ede78===undefined)throw CliErrors[_0x52c7f6(0x170)](_0x52c7f6(0x1a6));return{'appCode':_0x4c8e05[_0x52c7f6(0x191)],'fromDblinkId':_0x1ede78,..._0x54b196?{'fromDatasetCode':_0x54b196}:{},..._0x4c8e05['str'](_0x52c7f6(0x172))[_0x52c7f6(0x1a2)]()?{'fromField':_0x4c8e05[_0x52c7f6(0x15d)](_0x52c7f6(0x172))['trim']()}:{}};}export function projectCrossRelation(_0x2c383e){const _0x1d330c=a72_0x5118;return{'relationId':_0x2c383e[_0x1d330c(0x184)],'from':{'source':_0x1d330c(0x1a5),'datasetCode':_0x2c383e[_0x1d330c(0x18b)],'datasetName':_0x2c383e[_0x1d330c(0x18f)],'dblinkId':_0x2c383e['fromDblinkId'],'table':_0x2c383e[_0x1d330c(0x19a)],'field':_0x2c383e[_0x1d330c(0x187)]},'to':{'source':'DB_TABLE','datasetCode':_0x2c383e['toDatasetCode'],'datasetName':_0x2c383e[_0x1d330c(0x157)],'dblinkId':_0x2c383e['toDblinkId'],'table':_0x2c383e[_0x1d330c(0x195)],'field':_0x2c383e[_0x1d330c(0x177)],'labelField':_0x2c383e[_0x1d330c(0x199)]},'relation':{'cardinality':_0x2c383e[_0x1d330c(0x182)],'relationType':_0x2c383e[_0x1d330c(0x161)]}};}function a72_0x3676(){const _0x1c21b4=['filter','fromField','from','expectedLabel','dataset','fromDatasetCode','extend','query','length','fromDatasetName','expectedCardinality','appCode','3241fTLHJv','toLowerCase','table','toTableName','delete','from-dblink-id','isSafeInteger','refTableLabelName','fromTableName','dbtable','tableName','some','dblinkId','7839110vZyEce','before','47689565AFUDtr','trim','\x20has\x20invalid\x20storage\x20configuration.','from-datasetcode','DB_TABLE','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','map','toDblinkId','\x20write\x20was\x20not\x20verified.','toDatasetName','flagMissing','52rJgkiv','parse','612LLEzHu','label_inherited','str','\x20a\x20cross-database\x20relation\x20for\x20','data','to-column','relationType','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','apiError','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','matched','datasetCode','string','4938ogaxSj','message','includes','list','create','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','42KQtAFM','body','validation','fromDblinkId','from-column','storageProfile','catch','Would\x20','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','toField','37510GxUmQY','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','3087752RxXTIS','Invalid\x20--cardinality.','POST','dbId','Dataset\x20','4934EcqOdj','358527IuEvIM','to-label-column','cardinality','to-datasetcode','relationId','\x20verified.'];a72_0x3676=function(){return _0x1c21b4;};return a72_0x3676();}function ambiguity(_0x3f1373){const _0x3840c1=a72_0x5118,_0x543686=CliErrors[_0x3840c1(0x170)](_0x3840c1(0x1a7),'Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.');return Object['defineProperty'](_0x543686,'data',{'value':{'candidates':_0x3f1373[_0x3840c1(0x1a8)](projectCrossRelation)}}),_0x543686;}const sameName=(_0x338495,_0x569f0b)=>_0x338495['toLowerCase']()===_0x569f0b[a72_0x40c5aa(0x193)]();function matchesEndpoint(_0x49a656,_0x41e238,_0x49bfac,_0x2a129e,_0x39b5a0){const _0x4cfd03=a72_0x40c5aa;return _0x49a656[_0x4cfd03(0x171)]===_0x41e238['dblinkId']&&sameName(_0x49a656[_0x4cfd03(0x19a)],_0x41e238['table'])&&sameName(_0x49a656[_0x4cfd03(0x187)],_0x49bfac)&&_0x49a656[_0x4cfd03(0x1a9)]===_0x2a129e[_0x4cfd03(0x19e)]&&sameName(_0x49a656[_0x4cfd03(0x195)],_0x2a129e['table'])&&sameName(_0x49a656[_0x4cfd03(0x177)],_0x39b5a0);}export async function prepareCrossRelation(_0x44b6cc,_0x3c946e){const _0x14017d=a72_0x40c5aa,_0xeba864=await resolveEndpoint(required(_0x44b6cc,_0x14017d(0x1a4))),_0x1b69fe=explicitDblink(_0x44b6cc);if(_0x1b69fe!==undefined&&_0xeba864['dblinkId']!==_0x1b69fe)throw CliErrors[_0x14017d(0x170)](_0x14017d(0x162));const _0x42f812={'appCode':_0x44b6cc[_0x14017d(0x191)],'fromDatasetCode':_0xeba864[_0x14017d(0x166)],'fromField':required(_0x44b6cc,'from-column'),..._0x1b69fe!==undefined?{'fromDblinkId':_0x1b69fe}:{}},_0x5b80fc={'appCode':_0x44b6cc[_0x14017d(0x191)],'fromDblinkId':_0xeba864[_0x14017d(0x19e)],'fromDatasetCode':_0xeba864[_0x14017d(0x166)],'fromField':_0x42f812[_0x14017d(0x187)]},_0x9f44a6=await queryCrossDbRelations(_0x5b80fc);let _0x18fbdf=null;if(_0x3c946e!=='create'){if(_0x9f44a6[_0x14017d(0x18e)]>0x1)throw ambiguity(_0x9f44a6);_0x18fbdf=_0x9f44a6[0x0]??null;if(!_0x18fbdf)throw CliErrors[_0x14017d(0x170)](_0x14017d(0x179));}if(_0x3c946e==='delete')return{'operation':_0x3c946e,'from':_0xeba864,'query':_0x5b80fc,'body':_0x42f812,'before':_0x18fbdf};const _0x3fbc56=await resolveEndpoint(required(_0x44b6cc,'to-datasetcode'));if(_0xeba864['dblinkId']===_0x3fbc56[_0x14017d(0x19e)])throw CliErrors['validation']('Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.');const _0x471971=_0x44b6cc[_0x14017d(0x15d)](_0x14017d(0x181))[_0x14017d(0x1a2)](),_0x3af065=_0x44b6cc[_0x14017d(0x15d)](_0x14017d(0x182))[_0x14017d(0x1a2)](),_0x1570ed={..._0x42f812,'toDatasetCode':_0x3fbc56[_0x14017d(0x166)],'toField':required(_0x44b6cc,_0x14017d(0x160)),..._0x471971?{'refTableLabelName':_0x471971}:{},..._0x3af065?{'cardinality':_0x3af065}:{}};if(_0x9f44a6[_0x14017d(0x19d)](_0x14efdf=>_0x14efdf[_0x14017d(0x184)]!==_0x18fbdf?.['relationId']&&matchesEndpoint(_0x14efdf,_0xeba864,_0x1570ed[_0x14017d(0x187)],_0x3fbc56,_0x1570ed[_0x14017d(0x177)])))throw CliErrors[_0x14017d(0x170)]('Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.');return{'operation':_0x3c946e,'from':_0xeba864,'to':_0x3fbc56,'query':_0x5b80fc,'body':_0x1570ed,'before':_0x18fbdf,'expectedLabel':_0x471971||_0x18fbdf?.[_0x14017d(0x199)]||_0x1570ed['toField'],'expectedCardinality':_0x3af065||_0x18fbdf?.[_0x14017d(0x182)]||null};}function mutationData(_0x16759a,_0x47c82f,_0x1361df){const _0x51999d=a72_0x40c5aa,{operation:_0x302d8a,body:_0x2d722c,before:_0x3df674}=_0x16759a;return{'operation':_0x302d8a,'selector':{'appCode':_0x2d722c[_0x51999d(0x191)],'from':{'datasetCode':_0x2d722c[_0x51999d(0x18b)],'field':_0x2d722c[_0x51999d(0x187)],'dblinkId':_0x16759a['from'][_0x51999d(0x19e)]}},'before':_0x3df674?projectCrossRelation(_0x3df674):null,'after':_0x1361df,'dryRun':_0x47c82f,'backend':{'method':_0x51999d(0x17c),'path':CROSS_DB_RELATION_PATHS[_0x302d8a]},'warnings':_0x302d8a==='update'&&!_0x2d722c[_0x51999d(0x199)]?[{'code':_0x51999d(0x15c),'message':'The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.'}]:[]};}export async function previewCrossRelation(_0x269ddd,_0x5c74f5){const _0x6f7917=a72_0x40c5aa,_0xf96b0e=await prepareCrossRelation(_0x269ddd,_0x5c74f5),_0x4736fa=_0xf96b0e[_0x6f7917(0x16f)],_0x4719b0=_0x5c74f5===_0x6f7917(0x196)?null:{..._0xf96b0e[_0x6f7917(0x1a0)]?{'relationId':_0xf96b0e[_0x6f7917(0x1a0)][_0x6f7917(0x184)]}:{},'from':{'datasetCode':_0xf96b0e['from'][_0x6f7917(0x166)],'dblinkId':_0xf96b0e[_0x6f7917(0x188)]['dblinkId'],'table':_0xf96b0e[_0x6f7917(0x188)][_0x6f7917(0x194)],'field':_0x4736fa[_0x6f7917(0x187)]},'to':{'datasetCode':_0xf96b0e['to'][_0x6f7917(0x166)],'dblinkId':_0xf96b0e['to']['dblinkId'],'table':_0xf96b0e['to'][_0x6f7917(0x194)],'field':_0x4736fa[_0x6f7917(0x177)],'labelField':_0xf96b0e[_0x6f7917(0x189)]},'relation':{'cardinality':_0xf96b0e[_0x6f7917(0x190)],'relationType':0x2}};return{...mutationData(_0xf96b0e,!![],null),'after':_0x4719b0,'method':_0x6f7917(0x17c),'url':CROSS_DB_RELATION_PATHS[_0x5c74f5],'body':_0xf96b0e[_0x6f7917(0x16f)],'description':_0x6f7917(0x175)+_0x5c74f5+_0x6f7917(0x15e)+_0x4736fa[_0x6f7917(0x18b)]+'.'+_0x4736fa[_0x6f7917(0x187)]};}function a72_0x5118(_0x164e39,_0x6fb824){_0x164e39=_0x164e39-0x157;const _0x367611=a72_0x3676();let _0x51188a=_0x367611[_0x164e39];return _0x51188a;}export async function executeCrossRelation(_0xc476cd,_0x5b7ac9,_0x4c43bc){const _0x1a5ec6=a72_0x40c5aa,_0xebcd74=await prepareCrossRelation(_0xc476cd,_0x5b7ac9);try{await _0x4c43bc(_0xebcd74['body']);}catch(_0x437441){if(_0x437441 instanceof CliError&&_0x437441[_0x1a5ec6(0x169)][_0x1a5ec6(0x16a)]('multiple\x20cross-database\x20relations\x20matched')){const _0x5a4586=await queryCrossDbRelations(_0xebcd74[_0x1a5ec6(0x18d)])[_0x1a5ec6(0x174)](()=>[]);throw ambiguity(_0x5a4586);}throw _0x437441;}let _0x15c269=[],_0x15194e,_0x4eb1de=![];try{_0x15c269=await queryCrossDbRelations(_0xebcd74[_0x1a5ec6(0x18d)]);if(_0x5b7ac9===_0x1a5ec6(0x196))_0x4eb1de=!_0x15c269[_0x1a5ec6(0x19d)](_0x5d8df6=>_0x5d8df6[_0x1a5ec6(0x184)]===_0xebcd74[_0x1a5ec6(0x1a0)][_0x1a5ec6(0x184)]);else{const _0x43306b=_0xebcd74[_0x1a5ec6(0x16f)],_0x47ead8=_0x15c269[_0x1a5ec6(0x186)](_0x5cf292=>matchesEndpoint(_0x5cf292,_0xebcd74[_0x1a5ec6(0x188)],_0x43306b[_0x1a5ec6(0x187)],_0xebcd74['to'],_0x43306b['toField'])&&(_0x5b7ac9===_0x1a5ec6(0x16c)||_0x5cf292[_0x1a5ec6(0x184)]===_0xebcd74[_0x1a5ec6(0x1a0)][_0x1a5ec6(0x184)]));_0x15194e=_0x47ead8[_0x1a5ec6(0x18e)]===0x1?_0x47ead8[0x0]:undefined,_0x4eb1de=!!_0x15194e&&_0x15194e[_0x1a5ec6(0x199)]===_0xebcd74[_0x1a5ec6(0x189)]&&_0x15194e[_0x1a5ec6(0x182)]===_0xebcd74[_0x1a5ec6(0x190)]&&_0x15194e['relationType']===0x2;}}catch{}const _0x4637ff={...mutationData(_0xebcd74,![],_0x15194e?projectCrossRelation(_0x15194e):null),'verification':{'status':_0x4eb1de?_0x1a5ec6(0x165):'unconfirmed','verified':_0x4eb1de}};if(!_0x4eb1de){const _0x271d38=CliErrors[_0x1a5ec6(0x163)]('Cross-database\x20relation\x20'+_0x5b7ac9+_0x1a5ec6(0x1aa),_0x1a5ec6(0x16d));Object['defineProperty'](_0x271d38,_0x1a5ec6(0x15f),{'value':{..._0x4637ff,'candidates':_0x15c269[_0x1a5ec6(0x1a8)](projectCrossRelation)}});throw _0x271d38;}return{'ok':!![],'data':_0x4637ff,'message':'Cross-database\x20relation\x20'+_0x5b7ac9+_0x1a5ec6(0x185)};}
|
|
1
|
+
const a72_0x282a17=a72_0x432a;(function(_0x542247,_0x3c3643){const _0x2abdb7=a72_0x432a,_0x6f6b60=_0x542247();while(!![]){try{const _0xece212=-parseInt(_0x2abdb7(0xcb))/0x1*(parseInt(_0x2abdb7(0xa1))/0x2)+-parseInt(_0x2abdb7(0x9c))/0x3+parseInt(_0x2abdb7(0xa7))/0x4*(-parseInt(_0x2abdb7(0x81))/0x5)+-parseInt(_0x2abdb7(0xbf))/0x6*(-parseInt(_0x2abdb7(0x73))/0x7)+-parseInt(_0x2abdb7(0xb7))/0x8+-parseInt(_0x2abdb7(0x7a))/0x9*(-parseInt(_0x2abdb7(0x83))/0xa)+parseInt(_0x2abdb7(0xb0))/0xb;if(_0xece212===_0x3c3643)break;else _0x6f6b60['push'](_0x6f6b60['shift']());}catch(_0x3fdc48){_0x6f6b60['push'](_0x6f6b60['shift']());}}}(a72_0x422f,0xc96b4));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';function a72_0x432a(_0x25c85c,_0x4ebce6){_0x25c85c=_0x25c85c-0x72;const _0x422fb0=a72_0x422f();let _0x432a82=_0x422fb0[_0x25c85c];return _0x432a82;}import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0x218031,_0x3d1b19){const _0xfe9ade=a72_0x432a,_0x55683a=_0x218031[_0xfe9ade(0xba)](_0x3d1b19)['trim']();if(!_0x55683a)throw CliErrors[_0xfe9ade(0xca)](_0x3d1b19);return _0x55683a;}function explicitDblink(_0x1f667b){const _0x19c26b=a72_0x432a,_0x94baa0=_0x1f667b['flag'](_0x19c26b(0x7b));if(_0x94baa0===undefined||_0x94baa0===null)return undefined;const _0x22098d=Number(_0x94baa0);if(!Number[_0x19c26b(0x8b)](_0x22098d)||_0x22098d<=0x0)throw CliErrors['validation'](_0x19c26b(0xae));return _0x22098d;}export function validateCrossRelation(_0x32ce86,_0x34b80b){const _0x426a21=a72_0x432a,_0x5a8c6b=explicitDblink(_0x32ce86);if(_0x34b80b===_0x426a21(0x99)){if(!_0x32ce86['str'](_0x426a21(0x75))[_0x426a21(0xa4)]()&&_0x5a8c6b===undefined)throw CliErrors['validation'](_0x426a21(0x9b));return;}required(_0x32ce86,_0x426a21(0x75)),required(_0x32ce86,'from-column');if(_0x34b80b!==_0x426a21(0x94)){required(_0x32ce86,_0x426a21(0xc3)),required(_0x32ce86,_0x426a21(0xbe));const _0x14fd6e=_0x32ce86[_0x426a21(0xba)](_0x426a21(0x72))[_0x426a21(0xa4)]();if(_0x14fd6e&&!CROSS_RELATION_CARDINALITY_FLAG[_0x426a21(0xb4)][_0x426a21(0xc0)](_0x14fd6e))throw CliErrors[_0x426a21(0x9e)](_0x426a21(0x78));}}async function resolveEndpoint(_0xea2d63){const _0x5b19ac=a72_0x432a,_0x5cda98=await getDatasetDetail(_0xea2d63),_0x4d4cb2=_0x5cda98?.[_0x5b19ac(0xaf)]??{};if((_0x5cda98?.['source']??_0x4d4cb2[_0x5b19ac(0xbb)])!=='DB_TABLE')throw CliErrors[_0x5b19ac(0x9e)](_0x5b19ac(0x92)+_0xea2d63+_0x5b19ac(0x77));const _0x4d5614=_0x5cda98['dbtableConfig']??_0x5cda98[_0x5b19ac(0xab)]??{};let _0x2c890c=_0x5cda98[_0x5b19ac(0x9d)]??_0x4d4cb2[_0x5b19ac(0x9d)]??{};if(typeof _0x2c890c===_0x5b19ac(0xb6))try{_0x2c890c=_0x2c890c[_0x5b19ac(0xa4)]()?JSON[_0x5b19ac(0x9a)](_0x2c890c):{};}catch{throw CliErrors[_0x5b19ac(0x9e)](_0x5b19ac(0x92)+_0xea2d63+_0x5b19ac(0xb8));}const _0x2ebcc5=Number(_0x2c890c?.['storageProfile']?.[_0x5b19ac(0xaa)]??_0x5cda98[_0x5b19ac(0xa6)]?.[_0x5b19ac(0xaa)]??_0x4d4cb2['storageProfile']?.['dbId']??_0x4d5614[_0x5b19ac(0xaa)]??_0x4d4cb2[_0x5b19ac(0xaa)]??_0x5cda98['dbId']),_0x235a98=String(_0x5cda98[_0x5b19ac(0x8c)]??_0x4d4cb2['tableName']??_0x4d5614[_0x5b19ac(0x8c)]??'')[_0x5b19ac(0xa4)]();if(!Number[_0x5b19ac(0x8b)](_0x2ebcc5)||_0x2ebcc5<=0x0||!_0x235a98)throw CliErrors[_0x5b19ac(0x9e)](_0x5b19ac(0x92)+_0xea2d63+_0x5b19ac(0x97));return{'datasetCode':_0xea2d63,'dblinkId':_0x2ebcc5,'table':_0x235a98};}export async function resolveCrossRelationQuery(_0x20c807){const _0x49120b=a72_0x432a,_0x2c7681=_0x20c807[_0x49120b(0xba)](_0x49120b(0x75))[_0x49120b(0xa4)](),_0x325433=explicitDblink(_0x20c807),_0x18f346=_0x2c7681?await resolveEndpoint(_0x2c7681):undefined;if(_0x18f346&&_0x325433!==undefined&&_0x18f346[_0x49120b(0x82)]!==_0x325433)throw CliErrors['validation'](_0x49120b(0xa0));const _0x393369=_0x18f346?.[_0x49120b(0x82)]??_0x325433;if(_0x393369===undefined)throw CliErrors['validation'](_0x49120b(0x9b));return{'appCode':_0x20c807[_0x49120b(0x89)],'fromDblinkId':_0x393369,..._0x2c7681?{'fromDatasetCode':_0x2c7681}:{},..._0x20c807['str'](_0x49120b(0x79))[_0x49120b(0xa4)]()?{'fromField':_0x20c807[_0x49120b(0xba)](_0x49120b(0x79))[_0x49120b(0xa4)]()}:{}};}export function projectCrossRelation(_0x1e34ca){const _0x290e64=a72_0x432a;return{'relationId':_0x1e34ca['relationId'],'from':{'source':'DB_TABLE','datasetCode':_0x1e34ca[_0x290e64(0x90)],'datasetName':_0x1e34ca[_0x290e64(0xc1)],'dblinkId':_0x1e34ca[_0x290e64(0xb9)],'table':_0x1e34ca[_0x290e64(0xc4)],'field':_0x1e34ca['fromField']},'to':{'source':'DB_TABLE','datasetCode':_0x1e34ca['toDatasetCode'],'datasetName':_0x1e34ca[_0x290e64(0x7e)],'dblinkId':_0x1e34ca['toDblinkId'],'table':_0x1e34ca['toTableName'],'field':_0x1e34ca['toField'],'labelField':_0x1e34ca[_0x290e64(0xa9)]},'relation':{'cardinality':_0x1e34ca['cardinality'],'relationType':_0x1e34ca[_0x290e64(0x8f)]}};}function ambiguity(_0x3e2a6a){const _0x5e5ab9=a72_0x432a,_0x1307bc=CliErrors[_0x5e5ab9(0x9e)](_0x5e5ab9(0x80),'Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.');return Object[_0x5e5ab9(0xa5)](_0x1307bc,_0x5e5ab9(0xb2),{'value':{'candidates':_0x3e2a6a[_0x5e5ab9(0xc8)](projectCrossRelation)}}),_0x1307bc;}const sameName=(_0x42d294,_0x390113)=>_0x42d294[a72_0x282a17(0xa8)]()===_0x390113['toLowerCase']();function matchesEndpoint(_0x72f899,_0x31b128,_0x192017,_0x10f7cf,_0x5d60af){const _0x280f25=a72_0x282a17;return _0x72f899[_0x280f25(0xb9)]===_0x31b128[_0x280f25(0x82)]&&sameName(_0x72f899[_0x280f25(0xc4)],_0x31b128[_0x280f25(0xac)])&&sameName(_0x72f899[_0x280f25(0x7d)],_0x192017)&&_0x72f899[_0x280f25(0xc5)]===_0x10f7cf[_0x280f25(0x82)]&&sameName(_0x72f899[_0x280f25(0x85)],_0x10f7cf[_0x280f25(0xac)])&&sameName(_0x72f899[_0x280f25(0x7c)],_0x5d60af);}export async function prepareCrossRelation(_0x2bb67c,_0x62062b){const _0x54c455=a72_0x282a17,_0x5d0383=await resolveEndpoint(required(_0x2bb67c,_0x54c455(0x75))),_0xf0c385=explicitDblink(_0x2bb67c);if(_0xf0c385!==undefined&&_0x5d0383[_0x54c455(0x82)]!==_0xf0c385)throw CliErrors[_0x54c455(0x9e)](_0x54c455(0xa0));const _0x1ad521={'appCode':_0x2bb67c[_0x54c455(0x89)],'fromDatasetCode':_0x5d0383['datasetCode'],'fromField':required(_0x2bb67c,_0x54c455(0x79)),..._0xf0c385!==undefined?{'fromDblinkId':_0xf0c385}:{}},_0x146586={'appCode':_0x2bb67c[_0x54c455(0x89)],'fromDblinkId':_0x5d0383[_0x54c455(0x82)],'fromDatasetCode':_0x5d0383[_0x54c455(0x8a)],'fromField':_0x1ad521[_0x54c455(0x7d)]},_0x514041=await queryCrossDbRelations(_0x146586);let _0x3efb27=null;if(_0x62062b!==_0x54c455(0x95)){if(_0x514041[_0x54c455(0x84)]>0x1)throw ambiguity(_0x514041);_0x3efb27=_0x514041[0x0]??null;if(!_0x3efb27)throw CliErrors[_0x54c455(0x9e)](_0x54c455(0xc7));}if(_0x62062b==='delete')return{'operation':_0x62062b,'from':_0x5d0383,'query':_0x146586,'body':_0x1ad521,'before':_0x3efb27};const _0x2bba93=await resolveEndpoint(required(_0x2bb67c,_0x54c455(0xc3)));if(_0x5d0383[_0x54c455(0x82)]===_0x2bba93[_0x54c455(0x82)])throw CliErrors[_0x54c455(0x9e)](_0x54c455(0xad));const _0x3309a3=_0x2bb67c[_0x54c455(0xba)](_0x54c455(0x74))[_0x54c455(0xa4)](),_0x2cc8fc=_0x2bb67c[_0x54c455(0xba)]('cardinality')['trim'](),_0x5aa03e={..._0x1ad521,'toDatasetCode':_0x2bba93['datasetCode'],'toField':required(_0x2bb67c,_0x54c455(0xbe)),..._0x3309a3?{'refTableLabelName':_0x3309a3}:{},..._0x2cc8fc?{'cardinality':_0x2cc8fc}:{}};if(_0x514041[_0x54c455(0xbc)](_0x3dc471=>_0x3dc471[_0x54c455(0xc2)]!==_0x3efb27?.['relationId']&&matchesEndpoint(_0x3dc471,_0x5d0383,_0x5aa03e[_0x54c455(0x7d)],_0x2bba93,_0x5aa03e[_0x54c455(0x7c)])))throw CliErrors[_0x54c455(0x9e)](_0x54c455(0xb1));return{'operation':_0x62062b,'from':_0x5d0383,'to':_0x2bba93,'query':_0x146586,'body':_0x5aa03e,'before':_0x3efb27,'expectedLabel':_0x3309a3||_0x3efb27?.[_0x54c455(0xa9)]||_0x5aa03e[_0x54c455(0x7c)],'expectedCardinality':_0x2cc8fc||_0x3efb27?.[_0x54c455(0x72)]||null};}function mutationData(_0x14dbe1,_0x165247,_0x492e08){const _0x733706=a72_0x282a17,{operation:_0x364c40,body:_0x3e7d58,before:_0x2a835a}=_0x14dbe1;return{'operation':_0x364c40,'selector':{'appCode':_0x3e7d58['appCode'],'from':{'datasetCode':_0x3e7d58['fromDatasetCode'],'field':_0x3e7d58[_0x733706(0x7d)],'dblinkId':_0x14dbe1['from'][_0x733706(0x82)]}},'before':_0x2a835a?projectCrossRelation(_0x2a835a):null,'after':_0x492e08,'dryRun':_0x165247,'backend':{'method':_0x733706(0x9f),'path':CROSS_DB_RELATION_PATHS[_0x364c40]},'warnings':_0x364c40===_0x733706(0xc6)&&!_0x3e7d58['refTableLabelName']?[{'code':_0x733706(0x96),'message':_0x733706(0x91)}]:[]};}export async function previewCrossRelation(_0x1b0653,_0x1d5774){const _0x51a320=a72_0x282a17,_0x4b3b20=await prepareCrossRelation(_0x1b0653,_0x1d5774),_0x5f594c=_0x4b3b20[_0x51a320(0x93)],_0x153087=_0x1d5774==='delete'?null:{..._0x4b3b20[_0x51a320(0xa3)]?{'relationId':_0x4b3b20[_0x51a320(0xa3)]['relationId']}:{},'from':{'datasetCode':_0x4b3b20['from'][_0x51a320(0x8a)],'dblinkId':_0x4b3b20[_0x51a320(0x8e)][_0x51a320(0x82)],'table':_0x4b3b20[_0x51a320(0x8e)][_0x51a320(0xac)],'field':_0x5f594c[_0x51a320(0x7d)]},'to':{'datasetCode':_0x4b3b20['to'][_0x51a320(0x8a)],'dblinkId':_0x4b3b20['to'][_0x51a320(0x82)],'table':_0x4b3b20['to'][_0x51a320(0xac)],'field':_0x5f594c['toField'],'labelField':_0x4b3b20['expectedLabel']},'relation':{'cardinality':_0x4b3b20[_0x51a320(0x87)],'relationType':0x2}};return{...mutationData(_0x4b3b20,!![],null),'after':_0x153087,'method':_0x51a320(0x9f),'url':CROSS_DB_RELATION_PATHS[_0x1d5774],'body':_0x4b3b20[_0x51a320(0x93)],'description':'Would\x20'+_0x1d5774+_0x51a320(0x86)+_0x5f594c[_0x51a320(0x90)]+'.'+_0x5f594c['fromField']};}function a72_0x422f(){const _0x28d13a=['Dataset\x20','body','delete','create','label_inherited','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','query','list','parse','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','3931674SlwjEk','extend','validation','POST','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','140038COkiqt','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','before','trim','defineProperty','storageProfile','849716hLJTzP','toLowerCase','refTableLabelName','dbId','dbtable','table','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','dataset','24439371YvZCwW','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','data','\x20write\x20was\x20not\x20verified.','enum','catch','string','11193160tbopln','\x20has\x20invalid\x20storage\x20configuration.','fromDblinkId','str','sourceType','some','\x20verified.','to-column','3411816WzWRgv','includes','fromDatasetName','relationId','to-datasetcode','fromTableName','toDblinkId','update','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','map','Cross-database\x20relation\x20','flagMissing','1hQxEDq','cardinality','14rtbkLd','to-label-column','from-datasetcode','message','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','Invalid\x20--cardinality.','from-column','45GfnHdw','from-dblink-id','toField','fromField','toDatasetName','unconfirmed','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','5QzuonD','dblinkId','916260gKbThS','length','toTableName','\x20a\x20cross-database\x20relation\x20for\x20','expectedCardinality','filter','appCode','datasetCode','isSafeInteger','tableName','multiple\x20cross-database\x20relations\x20matched','from','relationType','fromDatasetCode','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.'];a72_0x422f=function(){return _0x28d13a;};return a72_0x422f();}export async function executeCrossRelation(_0x2071a8,_0x40a39e,_0x297493){const _0x5d5d73=a72_0x282a17,_0x27eade=await prepareCrossRelation(_0x2071a8,_0x40a39e);try{await _0x297493(_0x27eade[_0x5d5d73(0x93)]);}catch(_0x34b045){if(_0x34b045 instanceof CliError&&_0x34b045[_0x5d5d73(0x76)][_0x5d5d73(0xc0)](_0x5d5d73(0x8d))){const _0x5b6a09=await queryCrossDbRelations(_0x27eade[_0x5d5d73(0x98)])[_0x5d5d73(0xb5)](()=>[]);throw ambiguity(_0x5b6a09);}throw _0x34b045;}let _0x1d324b=[],_0xdf5d32,_0xfacd9e=![];try{_0x1d324b=await queryCrossDbRelations(_0x27eade[_0x5d5d73(0x98)]);if(_0x40a39e===_0x5d5d73(0x94))_0xfacd9e=!_0x1d324b[_0x5d5d73(0xbc)](_0x34285b=>_0x34285b[_0x5d5d73(0xc2)]===_0x27eade[_0x5d5d73(0xa3)]['relationId']);else{const _0x40f035=_0x27eade[_0x5d5d73(0x93)],_0x379cb3=_0x1d324b[_0x5d5d73(0x88)](_0x1aa453=>matchesEndpoint(_0x1aa453,_0x27eade[_0x5d5d73(0x8e)],_0x40f035['fromField'],_0x27eade['to'],_0x40f035[_0x5d5d73(0x7c)])&&(_0x40a39e==='create'||_0x1aa453[_0x5d5d73(0xc2)]===_0x27eade[_0x5d5d73(0xa3)][_0x5d5d73(0xc2)]));_0xdf5d32=_0x379cb3[_0x5d5d73(0x84)]===0x1?_0x379cb3[0x0]:undefined,_0xfacd9e=!!_0xdf5d32&&_0xdf5d32[_0x5d5d73(0xa9)]===_0x27eade['expectedLabel']&&_0xdf5d32[_0x5d5d73(0x72)]===_0x27eade[_0x5d5d73(0x87)]&&_0xdf5d32[_0x5d5d73(0x8f)]===0x2;}}catch{}const _0x45a96c={...mutationData(_0x27eade,![],_0xdf5d32?projectCrossRelation(_0xdf5d32):null),'verification':{'status':_0xfacd9e?'matched':_0x5d5d73(0x7f),'verified':_0xfacd9e}};if(!_0xfacd9e){const _0x2d92b3=CliErrors['apiError']('Cross-database\x20relation\x20'+_0x40a39e+_0x5d5d73(0xb3),_0x5d5d73(0xa2));Object[_0x5d5d73(0xa5)](_0x2d92b3,_0x5d5d73(0xb2),{'value':{..._0x45a96c,'candidates':_0x1d324b[_0x5d5d73(0xc8)](projectCrossRelation)}});throw _0x2d92b3;}return{'ok':!![],'data':_0x45a96c,'message':_0x5d5d73(0xc9)+_0x40a39e+_0x5d5d73(0xbd)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a73_0x4e37(){const _0x3e3a5f=['273lTLfGO','1cthSdW','7586667DuMOcK','1306679QIBZAR','60778wwPqRQ','5355425sBlMye','308GgvEJm','update','140BHmgSj','cross-relation-update','46352emLkKj','1883840WGqMcH','57072YzSLOq'];a73_0x4e37=function(){return _0x3e3a5f;};return a73_0x4e37();}const a73_0x5c0316=a73_0x2a89;(function(_0x213a31,_0xca9f7b){const _0x572fff=a73_0x2a89,_0x269d52=_0x213a31();while(!![]){try{const _0x3b6690=parseInt(_0x572fff(0x190))/0x1*(-parseInt(_0x572fff(0x193))/0x2)+parseInt(_0x572fff(0x18f))/0x3*(parseInt(_0x572fff(0x199))/0x4)+parseInt(_0x572fff(0x194))/0x5+-parseInt(_0x572fff(0x19b))/0x6*(parseInt(_0x572fff(0x195))/0x7)+-parseInt(_0x572fff(0x19a))/0x8+parseInt(_0x572fff(0x191))/0x9+-parseInt(_0x572fff(0x197))/0xa*(parseInt(_0x572fff(0x192))/0xb);if(_0x3b6690===_0xca9f7b)break;else _0x269d52['push'](_0x269d52['shift']());}catch(_0x9fe6c2){_0x269d52['push'](_0x269d52['shift']());}}}(a73_0x4e37,0x97a39));import{updateCrossDbRelation}from'../../core/api-client.js';function a73_0x2a89(_0x245227,_0x27b57a){_0x245227=_0x245227-0x18f;const _0x4e372c=a73_0x4e37();let _0x2a89b8=_0x4e372c[_0x245227];return _0x2a89b8;}import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationUpdate={'service':'dataset','command':a73_0x5c0316(0x198),'description':'Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','risk':'write','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 _0x6c8f3f=>validateCrossRelation(_0x6c8f3f,a73_0x5c0316(0x196)),'dryRun':_0x57f85b=>previewCrossRelation(_0x57f85b,a73_0x5c0316(0x196)),'execute':_0x130341=>executeCrossRelation(_0x130341,a73_0x5c0316(0x196),updateCrossDbRelation)};
|