@lovrabet/rabetbase-cli 2.5.4-beta.2 → 2.5.4-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.d.ts +2 -0
- package/lib/commands/user-account/feishu-bind.js +1 -0
- 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 +2 -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-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 +3 -2
- package/skills/rabetbase/references/rabetbase-user-account.md +20 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0x2f7bfb=a58_0x21c2;(function(_0x4c5929,_0xb286b){const _0xa4f45a=a58_0x21c2,_0x4dcacc=_0x4c5929();while(!![]){try{const _0x14826b=parseInt(_0xa4f45a(0x103))/0x1*(-parseInt(_0xa4f45a(0x113))/0x2)+parseInt(_0xa4f45a(0x110))/0x3*(-parseInt(_0xa4f45a(0x105))/0x4)+parseInt(_0xa4f45a(0x108))/0x5+parseInt(_0xa4f45a(0x10b))/0x6+parseInt(_0xa4f45a(0x10e))/0x7*(-parseInt(_0xa4f45a(0x102))/0x8)+parseInt(_0xa4f45a(0x107))/0x9+-parseInt(_0xa4f45a(0x10d))/0xa*(-parseInt(_0xa4f45a(0x10a))/0xb);if(_0x14826b===_0xb286b)break;else _0x4dcacc['push'](_0x4dcacc['shift']());}catch(_0x5a5701){_0x4dcacc['push'](_0x4dcacc['shift']());}}}(a58_0x3682,0x4f76e));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a58_0x21c2(_0x538344,_0x2207b6){_0x538344=_0x538344-0xfc;const _0x36820d=a58_0x3682();let _0x21c2f3=_0x36820d[_0x538344];return _0x21c2f3;}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x293f30){const _0xde5047=a58_0x21c2,_0x264237=_0x293f30[_0xde5047(0x101)]('key');if(!_0x264237)throw CliErrors[_0xde5047(0xfc)](_0xde5047(0xfd),_0xde5047(0xfe)+CLI_BIN_NAME+_0xde5047(0x112));const _0x2ccea0=readConfig(),_0xf2a8=_0x264237===_0xde5047(0x106)?_0xde5047(0x10f):_0x264237,_0x106050=_0x2ccea0[_0xf2a8];if(_0x106050===undefined)throw CliErrors[_0xde5047(0xfc)](_0xde5047(0x100)+_0x264237);return{'ok':!![],'data':typeof _0x106050===_0xde5047(0x10c)?_0x106050:{[_0xf2a8]:_0x106050},'message':typeof _0x106050===_0xde5047(0x10c)?undefined:String(_0x106050)};}function a58_0x3682(){const _0x387a2e=['get','1916sJvJWj','app','3171150DcJjAh','151545ujfUKl','read','126907KMEUvi','878058TyRius','object','790Kenxcp','2366Kkfcnl','appcode','2109aBbgBS','Get\x20a\x20config\x20value\x20by\x20key','\x20config\x20get\x20--key\x20<key>','772VQOEQn','string','validation','Missing\x20key.','Usage:\x20','key','Key\x20not\x20found:\x20','str','3920lpyUQO','1587lTCEOK'];a58_0x3682=function(){return _0x387a2e;};return a58_0x3682();}export const configGetDefinition={'service':'config','command':a58_0x2f7bfb(0x104),'description':a58_0x2f7bfb(0x111),'risk':a58_0x2f7bfb(0x109),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a58_0x2f7bfb(0xff),'type':a58_0x2f7bfb(0x114),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xeacd92,_0x54b165){const _0x1436ce=a59_0x1441,_0x27d7b1=_0xeacd92();while(!![]){try{const _0x57bbe6=-parseInt(_0x1436ce(0x128))/0x1*(parseInt(_0x1436ce(0x127))/0x2)+-parseInt(_0x1436ce(0x125))/0x3*(-parseInt(_0x1436ce(0x129))/0x4)+-parseInt(_0x1436ce(0x12b))/0x5*(parseInt(_0x1436ce(0x126))/0x6)+-parseInt(_0x1436ce(0x12c))/0x7+-parseInt(_0x1436ce(0x12d))/0x8*(-parseInt(_0x1436ce(0x12a))/0x9)+-parseInt(_0x1436ce(0x12f))/0xa+parseInt(_0x1436ce(0x130))/0xb*(parseInt(_0x1436ce(0x12e))/0xc);if(_0x57bbe6===_0x54b165)break;else _0x27d7b1['push'](_0x27d7b1['shift']());}catch(_0x2db18f){_0x27d7b1['push'](_0x27d7b1['shift']());}}}(a59_0x16a0,0x6905c));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';function a59_0x16a0(){const _0x1dbcef=['7704040AzPfoD','11KSetBP','1587972vwRwTD','14166CSqyet','40KsMQdK','39989PWsHsr','4skSbnr','1186956HdBwrb','1270jkLalh','100177sXkFQt','48pEdZQk','15524796LyqzBw'];a59_0x16a0=function(){return _0x1dbcef;};return a59_0x16a0();}import{configInitDefinition}from'../../commands/config/init.js';function a59_0x1441(_0x49a0c3,_0x2f00a8){_0x49a0c3=_0x49a0c3-0x125;const _0x16a0ea=a59_0x16a0();let _0x144120=_0x16a0ea[_0x49a0c3];return _0x144120;}export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x4b2d4a=a60_0xdf8b;(function(_0x4929cb,_0x40880e){const _0x4fa304=a60_0xdf8b,_0x58ec71=_0x4929cb();while(!![]){try{const _0x112b55=-parseInt(_0x4fa304(0x125))/0x1*(-parseInt(_0x4fa304(0x110))/0x2)+parseInt(_0x4fa304(0xf8))/0x3*(-parseInt(_0x4fa304(0xf6))/0x4)+parseInt(_0x4fa304(0x112))/0x5*(parseInt(_0x4fa304(0x121))/0x6)+parseInt(_0x4fa304(0x10d))/0x7*(parseInt(_0x4fa304(0x102))/0x8)+parseInt(_0x4fa304(0x111))/0x9+-parseInt(_0x4fa304(0x105))/0xa+-parseInt(_0x4fa304(0x107))/0xb;if(_0x112b55===_0x40880e)break;else _0x58ec71['push'](_0x58ec71['shift']());}catch(_0x3047e5){_0x58ec71['push'](_0x58ec71['shift']());}}}(a60_0x4f37,0x5c1c2));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';function a60_0xdf8b(_0x3cb2c0,_0x5b39e9){_0x3cb2c0=_0x3cb2c0-0xf3;const _0x4f37fa=a60_0x4f37();let _0xdf8b4a=_0x4f37fa[_0x3cb2c0];return _0xdf8b4a;}import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a60_0x4b2d4a(0x116),'type':a60_0x4b2d4a(0xf7),'description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES[a60_0x4b2d4a(0x10f)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'domain-config','type':'string','description':a60_0x4b2d4a(0xfe)},{'name':a60_0x4b2d4a(0x11d),'type':'string','description':'Custom\x20User\x20HTTPS\x20origin'},{'name':'api-domain','type':a60_0x4b2d4a(0xf7),'description':a60_0x4b2d4a(0xfd)},{'name':a60_0x4b2d4a(0x10a),'type':'string','description':a60_0x4b2d4a(0x128)},{'name':'skill-domain','type':a60_0x4b2d4a(0xf7),'description':a60_0x4b2d4a(0xf9)},{'name':a60_0x4b2d4a(0x115),'type':'string','description':'Custom\x20knowledge-base\x20HTTPS\x20origin'},{'name':a60_0x4b2d4a(0x119),'type':a60_0x4b2d4a(0xf7),'description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'},{'name':a60_0x4b2d4a(0x10c),'type':'string','description':'Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin'},{'name':a60_0x4b2d4a(0x100),'type':'string','description':a60_0x4b2d4a(0x10e)},{'name':a60_0x4b2d4a(0x11f),'type':a60_0x4b2d4a(0xf7),'description':a60_0x4b2d4a(0x11b)}];function a60_0x4f37(){const _0x4a1776=['certificate-domain','bool','70986QnFQqa','label','nonInteractive','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','1724MYkpSM','localDomain','str','Custom\x20Runtime\x20HTTPS\x20origin','official','global','cancelled','4uHyCUc','string','1067115LiusGP','Custom\x20SkillHub\x20HTTPS\x20origin','Available\x20regions:\x20','manifestDomains','mode','Custom\x20platform\x20API\x20HTTPS\x20origin','Independent-deployment\x20Domain\x20JSON\x20file','validation','local-domain','domains','48OmflcJ','enterprise-v1','assign','555420ufeCGx','Select\x20Lovrabet\x20region','11252054lPBGYh','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','routing','runtime-domain','config','app-domain','569772hBVymA','Custom\x20local\x20callback\x20HTTPS\x20origin','join','794ggeHRr','849717GeiJAZ','230IZSzXl','certificateDomain','length','kb-domain','region','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','init','kb-service-domain','Region\x20\x22','Custom\x20certificate\x20service\x20HTTPS\x20origin','cdn','user-domain','\x22\x20is\x20not\x20currently\x20available.'];a60_0x4f37=function(){return _0x4a1776;};return a60_0x4f37();}async function resolveRegion(_0x2e2109){const _0xb54a17=a60_0x4b2d4a,_0xfa00d=_0x2e2109[_0xb54a17(0x127)]('region');if(_0xfa00d){if(!isEnabledLovrabetRegion(_0xfa00d))throw CliErrors[_0xb54a17(0xff)](_0xb54a17(0x11a)+_0xfa00d+_0xb54a17(0x11e),_0xb54a17(0xfa)+ENABLED_LOVRABET_REGION_VALUES[_0xb54a17(0x10f)](',\x20'));return _0xfa00d;}if(_0x2e2109[_0xb54a17(0x123)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0xb54a17(0x106),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x5c0b27=>({'name':getOfficialRoutingProfile(_0x5c0b27)[_0xb54a17(0x122)]+'\x20('+_0x5c0b27+')','value':_0x5c0b27}))});}catch(_0x19e61f){if(_0x19e61f?.['name']==='ExitPromptError')throw CliErrors[_0xb54a17(0xf5)]();throw _0x19e61f;}}export async function executeConfigInit(_0x58be97){const _0xf51c01=a60_0x4b2d4a,_0x59cf1b=resolveDomainConfigInput(_0x58be97),_0x36b1ca=_0x59cf1b[_0xf51c01(0x101)],_0x2e02d6=Object['keys'](_0x36b1ca)[_0xf51c01(0x114)]>0x0;if(_0x2e02d6&&_0x58be97[_0xf51c01(0x127)](_0xf51c01(0x116)))throw CliErrors[_0xf51c01(0xff)](_0xf51c01(0x108));if(!!_0x36b1ca[_0xf51c01(0x126)]!==!!_0x36b1ca[_0xf51c01(0x113)])throw CliErrors[_0xf51c01(0xff)](_0xf51c01(0x124));const _0x381a1e=_0x58be97[_0xf51c01(0x120)](_0xf51c01(0xf4))?_0xf51c01(0xf4):'project',_0x4b4198=readScopedConfig(_0x381a1e);for(const _0xfdd08d of DOMAIN_CONFIG_FIELDS)delete _0x4b4198[_0xfdd08d];for(const _0x4ed2a6 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x4b4198[_0x4ed2a6];delete _0x4b4198[_0xf51c01(0x109)];let _0x47199a=null;if(_0x2e02d6)delete _0x4b4198[_0xf51c01(0x116)],_0x59cf1b[_0xf51c01(0xfc)]==='enterprise-v1'?_0x4b4198[_0xf51c01(0x109)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x59cf1b[_0xf51c01(0xfb)],'cdn':_0x59cf1b['cdn']}:Object[_0xf51c01(0x104)](_0x4b4198,_0x36b1ca);else{_0x47199a=await resolveRegion(_0x58be97);if(_0x47199a===DEFAULT_LOVRABET_REGION)delete _0x4b4198[_0xf51c01(0x116)];else _0x4b4198[_0xf51c01(0x116)]=_0x47199a;}return writeScopedConfig(_0x4b4198,_0x381a1e),{'ok':!![],'message':_0x2e02d6?'Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20'+Object['keys'](_0x59cf1b['mode']===_0xf51c01(0x103)?_0x59cf1b['manifestDomains']:_0x36b1ca)[_0xf51c01(0x10f)](',\x20')+'.':_0xf51c01(0x117)+_0x47199a+'.','data':{'mode':_0x2e02d6?'independent':_0xf51c01(0xf3),'protocol':_0x59cf1b[_0xf51c01(0xfc)]===_0xf51c01(0x103)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x47199a,'domains':_0x36b1ca,'cdn':_0x59cf1b[_0xf51c01(0xfc)]===_0xf51c01(0x103)?_0x59cf1b[_0xf51c01(0x11c)]:undefined}};}export const configInitDefinition={'service':a60_0x4b2d4a(0x10b),'command':a60_0x4b2d4a(0x118),'description':'Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':'write','confirmationDescription':'Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x3753ac=a61_0x57fe;(function(_0x3fe0d1,_0x4b09f1){const _0x2a790b=a61_0x57fe,_0x31e0e4=_0x3fe0d1();while(!![]){try{const _0x278af1=-parseInt(_0x2a790b(0x180))/0x1+parseInt(_0x2a790b(0x179))/0x2*(-parseInt(_0x2a790b(0x175))/0x3)+parseInt(_0x2a790b(0x182))/0x4*(parseInt(_0x2a790b(0x177))/0x5)+-parseInt(_0x2a790b(0x17f))/0x6+parseInt(_0x2a790b(0x17c))/0x7+-parseInt(_0x2a790b(0x181))/0x8*(parseInt(_0x2a790b(0x17e))/0x9)+parseInt(_0x2a790b(0x17b))/0xa;if(_0x278af1===_0x4b09f1)break;else _0x31e0e4['push'](_0x31e0e4['shift']());}catch(_0x40f8cb){_0x31e0e4['push'](_0x31e0e4['shift']());}}}(a61_0x219f,0xc9411));function a61_0x57fe(_0x34199b,_0x4d4e39){_0x34199b=_0x34199b-0x175;const _0x219f70=a61_0x219f();let _0x57fe24=_0x219f70[_0x34199b];return _0x57fe24;}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a61_0x219f(){const _0x10ddcb=['1602696sqUilM','337368TBKioC','4495772tydfnH','3tXLGCZ','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','5tlrsBJ','List\x20all\x20config\x20values','720584dYeJsk','boolean','24509570IqSktu','2424828okWfBZ','global','81ToGOeH','4526640DdNrPt'];a61_0x219f=function(){return _0x10ddcb;};return a61_0x219f();}async function execute(_0x5af585){const _0x169946=a61_0x57fe,_0x35c0b9=_0x5af585['bool'](_0x169946(0x17d))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x35c0b9};}export const configListDefinition={'service':'config','command':'list','description':a61_0x3753ac(0x178),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a61_0x3753ac(0x17d),'type':a61_0x3753ac(0x17a),'description':a61_0x3753ac(0x176),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a62_0x466a2b=a62_0x4b23;(function(_0xe40f7a,_0x652581){const _0x3fc1c0=a62_0x4b23,_0x1a0ba8=_0xe40f7a();while(!![]){try{const _0x321e7b=parseInt(_0x3fc1c0(0x8a))/0x1*(-parseInt(_0x3fc1c0(0x91))/0x2)+parseInt(_0x3fc1c0(0xa2))/0x3*(parseInt(_0x3fc1c0(0x9e))/0x4)+parseInt(_0x3fc1c0(0x88))/0x5*(-parseInt(_0x3fc1c0(0xae))/0x6)+-parseInt(_0x3fc1c0(0xa5))/0x7+-parseInt(_0x3fc1c0(0x84))/0x8*(parseInt(_0x3fc1c0(0x96))/0x9)+parseInt(_0x3fc1c0(0x89))/0xa+parseInt(_0x3fc1c0(0x82))/0xb;if(_0x321e7b===_0x652581)break;else _0x1a0ba8['push'](_0x1a0ba8['shift']());}catch(_0x1c5762){_0x1a0ba8['push'](_0x1a0ba8['shift']());}}}(a62_0x13bf,0x4d088));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';function a62_0x4b23(_0x576bf4,_0x5b74a5){_0x576bf4=_0x576bf4-0x81;const _0x13bfa9=a62_0x13bf();let _0x4b23bc=_0x13bfa9[_0x576bf4];return _0x4b23bc;}async function execute(_0x4df4f7){const _0x4933b6=a62_0x4b23,_0x21c887=_0x4df4f7[_0x4933b6(0x86)](_0x4933b6(0x83)),_0x393c85=_0x4df4f7[_0x4933b6(0x86)]('value');if(!_0x21c887)throw CliErrors['validation'](_0x4933b6(0x97),_0x4933b6(0xa3)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x393c85===undefined||_0x393c85==='')throw CliErrors[_0x4933b6(0x90)](_0x4933b6(0x99),_0x4933b6(0xa3)+CLI_BIN_NAME+_0x4933b6(0xab));let _0x5ee4d9=_0x21c887,_0x114a5b=_0x393c85;if(_0x393c85['length']>0x1f4)throw CliErrors[_0x4933b6(0x90)](_0x4933b6(0x93));if(_0x21c887==='riskLevel')throw CliErrors[_0x4933b6(0x90)](_0x4933b6(0x85));if(!isTopLevelConfigKey(_0x21c887))throw CliErrors[_0x4933b6(0x90)]('Top-level\x20key\x20\x22'+_0x21c887+_0x4933b6(0x94),_0x4933b6(0xa9)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x21c887]&&!CONFIG_ENUM_VALUES[_0x21c887][_0x4933b6(0x81)](_0x393c85))throw CliErrors[_0x4933b6(0x90)](_0x4933b6(0xa4)+_0x21c887+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x21c887]['join'](',\x20'));if(_0x21c887==='locale'&&!normalizeLocale(_0x393c85))throw CliErrors[_0x4933b6(0x90)](_0x4933b6(0x95),_0x4933b6(0x9b));DOMAIN_CONFIG_FIELDS['includes'](_0x21c887)&&(_0x114a5b=normalizeDomainOrigin(_0x21c887,_0x393c85));const _0x2ab478={'global':_0x4df4f7['bool'](_0x4933b6(0x92))},_0x398bba=resolveWriteScope(_0x2ab478),_0x46de4d=readScopedConfig(_0x398bba);_0x21c887===_0x4933b6(0x9c)&&(_0x5ee4d9='appcode',delete _0x46de4d[_0x4933b6(0x9c)]);_0x21c887===_0x4933b6(0xac)&&(_0x114a5b=normalizeLocale(_0x393c85));if(_0x21c887==='env'){_0x114a5b=normalizeEnv(_0x393c85);if(!isProduction(_0x114a5b)&&!isDaily(_0x114a5b))throw CliErrors[_0x4933b6(0x90)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x21c887===_0x4933b6(0xa0)){const _0xab633c=_0x46de4d['apps']&&typeof _0x46de4d[_0x4933b6(0xad)]===_0x4933b6(0xa7)?Object[_0x4933b6(0xa1)](_0x46de4d['apps']):[];if(_0xab633c[_0x4933b6(0x8c)]>0x0)throw CliErrors[_0x4933b6(0x90)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Use\x20`'+CLI_BIN_NAME+_0x4933b6(0xa8)+_0x114a5b+'`,\x20`'+CLI_BIN_NAME+_0x4933b6(0x8b));const _0x1a220d=buildCanonicalProjectConfig({..._0x46de4d},{'appCodes':[_0x114a5b],'env':typeof _0x46de4d[_0x4933b6(0x8d)]===_0x4933b6(0x8f)?_0x46de4d[_0x4933b6(0x8d)]:undefined});writeScopedConfig(_0x1a220d,_0x398bba);const _0x19aaf7=_0x398bba===_0x4933b6(0x92)?_0x4933b6(0x8e):_0x4933b6(0x9a);return{'ok':!![],'message':'✓\x20'+_0x19aaf7+_0x4933b6(0xaf)+_0x114a5b+_0x4933b6(0xa6)};}_0x46de4d[_0x5ee4d9]=_0x114a5b,writeScopedConfig(_0x46de4d,_0x398bba);const _0x5c7aa9=_0x398bba==='global'?_0x4933b6(0x8e):'Project';return{'ok':!![],'message':'✓\x20'+_0x5c7aa9+'\x20'+_0x5ee4d9+'\x20set\x20to:\x20'+_0x114a5b};}function a62_0x13bf(){const _0x44bdc4=['\x22\x20is\x20not\x20settable.','Invalid\x20locale\x20value.','72AcgXUb','Missing\x20key.','Set\x20a\x20config\x20value','Missing\x20value.','Project','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','app','set','12CDAFlq','boolean','appcode','keys','8979wgSgOi','Usage:\x20','Invalid\x20value\x20for\x20\x22','242375viPltJ','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','object','\x20workspace\x20add\x20<name>\x20--appcode\x20','Settable\x20top-level\x20keys:\x20','config','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','locale','apps','1870746pSoShu','\x20appcode\x20set\x20to:\x20','value','includes','5326673doVqmg','key','412896MeOtbv','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','str','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','5DWFaik','5921870ApehAP','3523yKgkQw','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','length','env','Global','string','validation','6rqRhoy','global','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.'];a62_0x13bf=function(){return _0x44bdc4;};return a62_0x13bf();}export const configSetDefinition={'service':a62_0x466a2b(0xaa),'command':a62_0x466a2b(0x9d),'description':a62_0x466a2b(0x98),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a62_0x466a2b(0x8f),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a62_0x466a2b(0xb0),'type':a62_0x466a2b(0x8f),'description':'Config\x20value','required':!![]},{'name':a62_0x466a2b(0x92),'type':a62_0x466a2b(0x9f),'description':a62_0x466a2b(0x87),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x24be35,_0x88b503){var _0x5acce4=a63_0x2e0f,_0x4ebb7e=_0x24be35();while(!![]){try{var _0x4d6aca=-parseInt(_0x5acce4(0x1b2))/0x1*(parseInt(_0x5acce4(0x1b6))/0x2)+parseInt(_0x5acce4(0x1b8))/0x3*(parseInt(_0x5acce4(0x1c0))/0x4)+parseInt(_0x5acce4(0x1b3))/0x5+-parseInt(_0x5acce4(0x1c2))/0x6+-parseInt(_0x5acce4(0x1bb))/0x7*(-parseInt(_0x5acce4(0x1bc))/0x8)+-parseInt(_0x5acce4(0x1bf))/0x9*(parseInt(_0x5acce4(0x1bd))/0xa)+-parseInt(_0x5acce4(0x1b5))/0xb*(-parseInt(_0x5acce4(0x1be))/0xc);if(_0x4d6aca===_0x88b503)break;else _0x4ebb7e['push'](_0x4ebb7e['shift']());}catch(_0x35a885){_0x4ebb7e['push'](_0x4ebb7e['shift']());}}}(a63_0x31fc,0x937c2));import{CLI_BIN_NAME}from'../../constant/cli.js';function a63_0x31fc(){var _0x4aee71=['Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','769938dfhRxI','project','global','2189600VlRgKa','24ldXLnD','12064970DGkxfs','124380CiIhwh','9FMuwTE','12uavKlo','validation','4187124pKLfoY','139819AroWDT','605475cBvviI','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','869oFjwKe','2EBGaOu'];a63_0x31fc=function(){return _0x4aee71;};return a63_0x31fc();}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};function a63_0x2e0f(_0x3eabed,_0x271f13){_0x3eabed=_0x3eabed-0x1b2;var _0x31fce6=a63_0x31fc();var _0x2e0fc0=_0x31fce6[_0x3eabed];return _0x2e0fc0;}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x27c173){var _0x4aae18=a63_0x2e0f;if(_0x27c173[_0x4aae18(0x1ba)])return _0x4aae18(0x1ba);if(!isInProject())throw CliErrors[_0x4aae18(0x1c1)](_0x4aae18(0x1b7),_0x4aae18(0x1b4)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0x4aae18(0x1b9);}export function readScopedConfig(_0x48128f){return readConfigFile(resolveWriteConfigPath(_0x48128f));}export function writeScopedConfig(_0x45453a,_0x28c6fa){writeConfigFile(resolveWriteConfigPath(_0x28c6fa),_0x45453a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a64_0x19993e=a64_0x56c6;(function(_0x4fc368,_0x2fd97c){const _0xd91250=a64_0x56c6,_0x2538e0=_0x4fc368();while(!![]){try{const _0x39f4a2=-parseInt(_0xd91250(0xc0))/0x1*(-parseInt(_0xd91250(0x9c))/0x2)+parseInt(_0xd91250(0xef))/0x3*(parseInt(_0xd91250(0xc1))/0x4)+parseInt(_0xd91250(0xa1))/0x5+parseInt(_0xd91250(0xbe))/0x6+-parseInt(_0xd91250(0xa5))/0x7*(parseInt(_0xd91250(0x97))/0x8)+parseInt(_0xd91250(0xf4))/0x9+-parseInt(_0xd91250(0xa9))/0xa;if(_0x39f4a2===_0x2fd97c)break;else _0x2538e0['push'](_0x2538e0['shift']());}catch(_0x205566){_0x2538e0['push'](_0x2538e0['shift']());}}}(a64_0xcace,0x9ab22));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set([a64_0x19993e(0xf3),a64_0x19993e(0xd1)]),SUPPORTED_FIELD_TYPES=new Set(['TEXT','NUMBER','DATETIME','BOOLEAN','SELECT',a64_0x19993e(0x98),a64_0x19993e(0xfb),'USER',a64_0x19993e(0x9d),'UPLOAD']);export function isDatasetBatchDesign(_0x4da6ff){return isObject(_0x4da6ff)&&_0x4da6ff['kind']==='dataset-batch';}export function validateDatasetBatchDesign(_0x49983c){const _0x374dea=a64_0x19993e;(!isObject(_0x49983c)||_0x49983c[_0x374dea(0xae)]!==_0x374dea(0xde))&&fail(_0x374dea(0xd8));_0x49983c[_0x374dea(0xb3)]!==0x1&&fail(_0x374dea(0xf8));const _0x5f1746=objectArray(_0x49983c[_0x374dea(0xf7)],_0x374dea(0xf7),0x1,0x14),_0x56a1fb=objectArray(_0x49983c[_0x374dea(0xce)],_0x374dea(0xce),0x0,0xc8),_0x164ff0=objectArray(_0x49983c[_0x374dea(0xb2)],_0x374dea(0xb2),0x0,0xc8),_0x430776=new Set(),_0x23cc62=new Map();for(const [_0x3aa568,_0x793b38]of _0x5f1746[_0x374dea(0xb9)]()){const _0xea3b4e=requiredString(_0x793b38[_0x374dea(0xdb)],_0x374dea(0xc9)+_0x3aa568+_0x374dea(0xdc));!LOCAL_KEY[_0x374dea(0xd5)](_0xea3b4e)&&fail(_0x374dea(0xc9)+_0x3aa568+'].localKey\x20must\x20match\x20'+LOCAL_KEY[_0x374dea(0xac)]+'.');_0x430776[_0x374dea(0xc8)](_0xea3b4e)&&fail(_0x374dea(0xba));_0x430776[_0x374dea(0xe6)](_0xea3b4e);!isObject(_0x793b38[_0x374dea(0xb8)])&&fail(_0x374dea(0xc9)+_0x3aa568+_0x374dea(0xb6));rejectServerDatasetIdentity(_0x793b38[_0x374dea(0xb8)],_0x374dea(0xc9)+_0x3aa568+'].design');if(!isObject(_0x793b38[_0x374dea(0xb8)][_0x374dea(0xcc)]))fail('datasets['+_0x3aa568+_0x374dea(0xaf));rejectServerDatasetIdentity(_0x793b38[_0x374dea(0xb8)][_0x374dea(0xcc)],'datasets['+_0x3aa568+_0x374dea(0xed)),requiredString(_0x793b38[_0x374dea(0xb8)][_0x374dea(0xcc)][_0x374dea(0xe0)],_0x374dea(0xc9)+_0x3aa568+'].design.dataset.datasetName');_0x374dea(0xce)in _0x793b38[_0x374dea(0xb8)]&&(!Array[_0x374dea(0xaa)](_0x793b38[_0x374dea(0xb8)][_0x374dea(0xce)])||_0x793b38[_0x374dea(0xb8)][_0x374dea(0xce)][_0x374dea(0xe4)]!==0x0)&&fail(_0x374dea(0xc9)+_0x3aa568+'].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.');const _0x143115=objectArray(_0x793b38[_0x374dea(0xb8)]['fields'],'datasets['+_0x3aa568+_0x374dea(0xc6),0x1,0xc8),_0xbaece0=new Map();for(const [_0x13fe5e,_0x5c9323]of _0x143115['entries']()){const _0x46a763=fieldName(_0x5c9323);if(!_0x46a763)fail('datasets['+_0x3aa568+_0x374dea(0xd7)+_0x13fe5e+_0x374dea(0xb0));const _0x254c98=_0x46a763['toLowerCase']();if(_0xbaece0[_0x374dea(0xc8)](_0x254c98))fail(_0x374dea(0xd4)+_0xea3b4e+_0x374dea(0xea));const _0x29de66=stringValue(_0x5c9323[_0x374dea(0xf5)]??_0x5c9323[_0x374dea(0xf1)])[_0x374dea(0xa8)]();if(!SUPPORTED_FIELD_TYPES['has'](_0x29de66))fail(_0x374dea(0xc9)+_0x3aa568+'].design.fields['+_0x13fe5e+_0x374dea(0xf0));_0xbaece0[_0x374dea(0xc2)](_0x254c98,_0x29de66),[_0x5c9323['refTable'],_0x5c9323[_0x374dea(0xe7)],_0x5c9323[_0x374dea(0x9e)]]['some'](_0x344cb0=>stringValue(_0x344cb0))&&fail(_0x374dea(0xc9)+_0x3aa568+_0x374dea(0xd7)+_0x13fe5e+_0x374dea(0xca));}_0x23cc62['set'](_0xea3b4e,_0xbaece0);}const _0x512a4c=new Set(),_0x4168d2=new Set();for(const [_0x59404f,_0x28b0cc]of _0x56a1fb[_0x374dea(0xb9)]()){const _0x35bd3f=validateRelation(_0x28b0cc,_0x59404f,_0x430776,_0x23cc62);if(_0x512a4c[_0x374dea(0xc8)](_0x35bd3f))fail('Dataset\x20batch\x20relations\x20must\x20be\x20unique.');_0x512a4c[_0x374dea(0xe6)](_0x35bd3f);const _0x3d9fa6=_0x35bd3f[_0x374dea(0xc5)]('\x00',0x2)[_0x374dea(0xe2)]('\x00');if(_0x4168d2[_0x374dea(0xc8)](_0x3d9fa6))fail(_0x374dea(0xee));_0x4168d2[_0x374dea(0xe6)](_0x3d9fa6);}for(const [_0x490598,_0x352725]of _0x164ff0[_0x374dea(0xb9)]()){requiredString(_0x352725[_0x374dea(0xa4)],_0x374dea(0x99)+_0x490598+_0x374dea(0xd6)),validateConfidence(_0x352725[_0x374dea(0xbc)],_0x374dea(0x99)+_0x490598+_0x374dea(0xad));}return _0x49983c;}export function reconcileBatchResult(_0x5aacd6){const _0x2417f2=a64_0x19993e;if(!isObject(_0x5aacd6))return null;try{const _0x414c04=stringArray(_0x5aacd6[_0x2417f2(0xa7)],_0x2417f2(0xa7),0x1,0x14),_0x2ffdc3=new Set(_0x414c04);if(_0x2ffdc3[_0x2417f2(0xab)]!==_0x414c04['length']||_0x414c04[_0x2417f2(0xbf)](_0x17aa83=>!LOCAL_KEY['test'](_0x17aa83)))return null;const _0x3add7c=objectArray(_0x5aacd6[_0x2417f2(0xfa)],_0x2417f2(0xfa),0x1,0x14),_0x5ad95d=new Map(),_0x5824b6=new Set();for(const _0x29d880 of _0x3add7c){const _0x577651=requiredString(_0x29d880[_0x2417f2(0xdb)],_0x2417f2(0xdf)),_0x201859=requiredString(_0x29d880[_0x2417f2(0xb7)]??_0x29d880['datasetCode'],_0x2417f2(0x9b));if(_0x5ad95d[_0x2417f2(0xc8)](_0x577651)||_0x5824b6[_0x2417f2(0xc8)](_0x201859))return null;_0x5ad95d[_0x2417f2(0xc2)](_0x577651,_0x201859),_0x5824b6['add'](_0x201859);}if(!sameSet(_0x2ffdc3,new Set(_0x5ad95d['keys']())))return null;const _0x11812=objectArray(_0x5aacd6['expectedRelations'],'expectedRelations',0x0,0xc8),_0xcdd516=objectArray(_0x5aacd6['createdRelations'],_0x2417f2(0xc3),0x0,0xc8),_0x52acb5=relationTupleSet(_0x11812,![],_0x5ad95d),_0x2c5bf7=relationTupleSet(_0xcdd516,!![],_0x5ad95d);if(!_0x52acb5||!_0x2c5bf7||!sameSet(_0x52acb5,_0x2c5bf7))return null;const _0x84e240=objectArray(_0x5aacd6['unresolvedRelations'],_0x2417f2(0xb2),0x0,0xc8);return{'expectedLocalKeys':_0x414c04,'expectedRelations':_0x11812,'createdDatasets':_0x3add7c,'createdRelations':_0xcdd516,'unresolvedRelations':_0x84e240,...isObject(_0x5aacd6[_0x2417f2(0xe3)])?{'metrics':_0x5aacd6[_0x2417f2(0xe3)]}:{}};}catch{return null;}}function validateRelation(_0x232d83,_0x2e311b,_0x839bb5,_0x396100){const _0x19625f=a64_0x19993e,_0x48bde3=_0x19625f(0xc7)+_0x2e311b+']',_0x4f2087=requiredString(_0x232d83[_0x19625f(0xbd)],_0x48bde3+'.fromDatasetKey'),_0x1094c0=requiredString(_0x232d83[_0x19625f(0x95)],_0x48bde3+_0x19625f(0xcd)),_0xdafca5=requiredString(_0x232d83[_0x19625f(0xb4)],_0x48bde3+_0x19625f(0xec))[_0x19625f(0xb5)](),_0x268a17=requiredString(_0x232d83[_0x19625f(0xd3)],_0x48bde3+'.toField')['toLowerCase']();if(!_0x839bb5[_0x19625f(0xc8)](_0x4f2087)||!_0x839bb5[_0x19625f(0xc8)](_0x1094c0))fail(_0x48bde3+_0x19625f(0xbb));const _0x525e8e=_0x396100[_0x19625f(0x92)](_0x4f2087)?.[_0x19625f(0x92)](_0xdafca5),_0x13ded9=_0x396100[_0x19625f(0x92)](_0x1094c0)?.['get'](_0x268a17);if(_0x525e8e===undefined||_0x13ded9===undefined)fail(_0x48bde3+_0x19625f(0xa6));if(_0x525e8e&&_0x13ded9&&_0x525e8e!==_0x13ded9)fail(_0x48bde3+_0x19625f(0xe1));const _0x24deb0=stringValue(_0x232d83[_0x19625f(0xcf)])||_0x19625f(0x93);if(_0x24deb0!=='lookup')fail(_0x48bde3+'.relationType\x20must\x20be\x20\x22lookup\x22.');const _0xcad885=stringValue(_0x232d83['cardinality'])||_0x19625f(0xf3);if(!SUPPORTED_CARDINALITIES[_0x19625f(0xc8)](_0xcad885))fail(_0x48bde3+_0x19625f(0xd9));return requiredString(_0x232d83[_0x19625f(0xa4)],_0x48bde3+_0x19625f(0x9a)),validateConfidence(_0x232d83[_0x19625f(0xbc)],_0x48bde3+_0x19625f(0xda)),tuple(_0x4f2087,_0xdafca5,_0x1094c0,_0x268a17,_0x19625f(0x93),_0xcad885);}function relationTupleSet(_0x512713,_0x36b535,_0x3cc475){const _0x1721b9=a64_0x19993e,_0x452dea=new Set();for(const _0x2f70d0 of _0x512713){const _0x31d05f=stringValue(_0x2f70d0[_0x1721b9(0xbd)]),_0x23b092=stringValue(_0x2f70d0[_0x1721b9(0x95)]),_0x3fb406=stringValue(_0x2f70d0['fromField'])[_0x1721b9(0xb5)](),_0x257ff6=stringValue(_0x2f70d0['toField'])[_0x1721b9(0xb5)](),_0x49947f=stringValue(_0x2f70d0[_0x1721b9(0xcf)]),_0x1617f7=stringValue(_0x2f70d0[_0x1721b9(0xb1)]);if(!_0x31d05f||!_0x23b092||!_0x3fb406||!_0x257ff6||_0x49947f!==_0x1721b9(0x93)||!SUPPORTED_CARDINALITIES[_0x1721b9(0xc8)](_0x1617f7))return null;if(!_0x3cc475[_0x1721b9(0xc8)](_0x31d05f)||!_0x3cc475[_0x1721b9(0xc8)](_0x23b092))return null;if(_0x36b535&&(stringValue(_0x2f70d0[_0x1721b9(0xdd)])!==_0x3cc475[_0x1721b9(0x92)](_0x31d05f)||stringValue(_0x2f70d0[_0x1721b9(0xa0)])!==_0x3cc475[_0x1721b9(0x92)](_0x23b092)))return null;const _0x3377d0=tuple(_0x31d05f,_0x3fb406,_0x23b092,_0x257ff6,_0x49947f,_0x1617f7);if(_0x452dea[_0x1721b9(0xc8)](_0x3377d0))return null;_0x452dea[_0x1721b9(0xe6)](_0x3377d0);}return _0x452dea;}function a64_0x56c6(_0x137222,_0x431834){_0x137222=_0x137222-0x92;const _0xcace0a=a64_0xcace();let _0x56c68f=_0xcace0a[_0x137222];return _0x56c68f;}function rejectServerDatasetIdentity(_0xbe00c8,_0x474d64){const _0x9ca1d=a64_0x19993e;for(const _0x484102 of['id','datasetId',_0x9ca1d(0xd2),_0x9ca1d(0xb7),_0x9ca1d(0xa2),_0x9ca1d(0x9f)]){if(_0xbe00c8[_0x484102]!==undefined&&_0xbe00c8[_0x484102]!==null&&_0xbe00c8[_0x484102]!=='')fail(_0x474d64+'.'+_0x484102+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function objectArray(_0x33666c,_0x504848,_0xa2e493,_0x353170){const _0x4366ac=a64_0x19993e;return(!Array[_0x4366ac(0xaa)](_0x33666c)||_0x33666c[_0x4366ac(0xe4)]<_0xa2e493||_0x33666c['length']>_0x353170||_0x33666c[_0x4366ac(0xbf)](_0x4a19c4=>!isObject(_0x4a19c4)))&&fail(_0x504848+_0x4366ac(0xe5)+_0xa2e493+'..'+_0x353170+_0x4366ac(0xe9)),_0x33666c;}function stringArray(_0x2cbe6f,_0x4ed12d,_0x9eb6d2,_0x37769f){const _0x4351f7=a64_0x19993e;return(!Array[_0x4351f7(0xaa)](_0x2cbe6f)||_0x2cbe6f['length']<_0x9eb6d2||_0x2cbe6f[_0x4351f7(0xe4)]>_0x37769f||_0x2cbe6f[_0x4351f7(0xbf)](_0x4b2aac=>typeof _0x4b2aac!==_0x4351f7(0xeb)||!_0x4b2aac[_0x4351f7(0x96)]()))&&fail(_0x4ed12d+'\x20must\x20contain\x20'+_0x9eb6d2+'..'+_0x37769f+'\x20non-empty\x20strings.'),_0x2cbe6f;}function requiredString(_0x4bd463,_0x11c98a){const _0x11d500=a64_0x19993e,_0x47317b=stringValue(_0x4bd463);if(!_0x47317b)fail(_0x11c98a+_0x11d500(0xf9));return _0x47317b;}function stringValue(_0x1c30ed){const _0x1bbc68=a64_0x19993e;return typeof _0x1c30ed==='string'?_0x1c30ed[_0x1bbc68(0x96)]():'';}function fieldName(_0x2c3a1b){const _0x420f7e=a64_0x19993e;return stringValue(_0x2c3a1b[_0x420f7e(0xb7)]??_0x2c3a1b[_0x420f7e(0xc4)]??_0x2c3a1b[_0x420f7e(0xe8)]??_0x2c3a1b['fieldName']);}function validateConfidence(_0x583e4a,_0x1e407c){const _0x382684=a64_0x19993e;_0x583e4a!==undefined&&_0x583e4a!==null&&(typeof _0x583e4a!==_0x382684(0xcb)||!Number[_0x382684(0xf2)](_0x583e4a)||_0x583e4a<0x0||_0x583e4a>0x1)&&fail(_0x1e407c+_0x382684(0x94));}function tuple(..._0x17ccdb){const _0x1a36e7=a64_0x19993e;return _0x17ccdb[_0x1a36e7(0xd0)]((_0x39ba8d,_0x5d9720)=>_0x5d9720===0x1||_0x5d9720===0x3?_0x39ba8d['toLowerCase']():_0x39ba8d)[_0x1a36e7(0xe2)]('\x00');}function sameSet(_0x166334,_0xf78f6c){const _0xdaad78=a64_0x19993e;return _0x166334[_0xdaad78(0xab)]===_0xf78f6c[_0xdaad78(0xab)]&&[..._0x166334][_0xdaad78(0xf6)](_0x16bf5b=>_0xf78f6c['has'](_0x16bf5b));}function a64_0xcace(){const _0xea5c3d=['modelId','toField','Dataset\x20','test','].reason','].design.fields[','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','.cardinality\x20is\x20not\x20supported.','.confidence','localKey','].localKey','fromDatasetCode','dataset-batch','createdDatasets[].localKey','datasetName','\x20connects\x20incompatible\x20field\x20types.','join','metrics','length','\x20must\x20contain\x20','add','refTableField','name','\x20objects.','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','string','.fromField','].design.dataset','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','6aWngCb','].type\x20is\x20not\x20supported.','fieldType','isFinite','MANY_TO_ONE','1004967VvdIPD','type','every','datasets','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','\x20is\x20required.','createdDatasets','DATE_RANGE','get','lookup','\x20must\x20be\x20between\x200\x20and\x201.','toDatasetKey','trim','383224vZfeJZ','MULTI_SELECT','unresolvedRelations[','.reason','createdDatasets[].code','2WzfDKG','ADDRESS','refTableLabelField','modelCode','toDatasetCode','4773755SxGFzE','datasetCode','object','reason','7yvnqxW','\x20references\x20an\x20unknown\x20field.','expectedLocalKeys','toUpperCase','17032390ndilZi','isArray','size','source','].confidence','kind','].design.dataset\x20must\x20be\x20an\x20object.',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','cardinality','unresolvedRelations','schemaVersion','fromField','toLowerCase','].design\x20must\x20be\x20an\x20object.','code','design','entries','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','\x20references\x20an\x20unknown\x20dataset\x20localKey.','confidence','fromDatasetKey','3027000JUUEAk','some','122828wAQESJ','1382068iNeypC','set','createdRelations','fieldCode','split','].design.fields','relations[','has','datasets[',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','number','dataset','.toDatasetKey','relations','relationType','map','ONE_TO_ONE'];a64_0xcace=function(){return _0xea5c3d;};return a64_0xcace();}function isObject(_0x2f8253){const _0xe8b749=a64_0x19993e;return typeof _0x2f8253===_0xe8b749(0xa3)&&_0x2f8253!==null&&!Array[_0xe8b749(0xaa)](_0x2f8253);}function fail(_0x85d633){throw CliErrors['validation'](_0x85d633);}
|
|
1
|
+
const a64_0xa1ed64=a64_0x2821;(function(_0x31b2cc,_0x527b0b){const _0x136c0a=a64_0x2821,_0x23a8e3=_0x31b2cc();while(!![]){try{const _0x47e566=parseInt(_0x136c0a(0xad))/0x1+-parseInt(_0x136c0a(0x99))/0x2+parseInt(_0x136c0a(0x94))/0x3*(-parseInt(_0x136c0a(0xb2))/0x4)+parseInt(_0x136c0a(0xb4))/0x5*(parseInt(_0x136c0a(0x7c))/0x6)+-parseInt(_0x136c0a(0x82))/0x7+parseInt(_0x136c0a(0xba))/0x8+parseInt(_0x136c0a(0x80))/0x9;if(_0x47e566===_0x527b0b)break;else _0x23a8e3['push'](_0x23a8e3['shift']());}catch(_0x1888f1){_0x23a8e3['push'](_0x23a8e3['shift']());}}}(a64_0x24e5,0xa4edc));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set(['MANY_TO_ONE',a64_0xa1ed64(0xaa)]),SUPPORTED_FIELD_TYPES=new Set([a64_0xa1ed64(0xa9),a64_0xa1ed64(0xcb),a64_0xa1ed64(0xd3),'BOOLEAN',a64_0xa1ed64(0xd0),'MULTI_SELECT','DATE_RANGE','USER','ADDRESS',a64_0xa1ed64(0xcf)]);export function isDatasetBatchDesign(_0x4e9b51){const _0x245222=a64_0xa1ed64;return isObject(_0x4e9b51)&&_0x4e9b51['kind']===_0x245222(0xb3);}export function validateDatasetBatchDesign(_0xe5e9c0){const _0x33ed80=a64_0xa1ed64;(!isObject(_0xe5e9c0)||_0xe5e9c0[_0x33ed80(0x9e)]!==_0x33ed80(0xb3))&&fail(_0x33ed80(0x79));_0xe5e9c0['schemaVersion']!==0x1&&fail(_0x33ed80(0xc1));const _0x5ee68d=objectArray(_0xe5e9c0['datasets'],_0x33ed80(0x74),0x1,0x14),_0x10b6ff=objectArray(_0xe5e9c0[_0x33ed80(0x98)],_0x33ed80(0x98),0x0,0xc8),_0x46fa22=objectArray(_0xe5e9c0[_0x33ed80(0x9c)],'unresolvedRelations',0x0,0xc8),_0xc90793=new Set(),_0x5d793c=new Map();for(const [_0x25f940,_0x7df0e3]of _0x5ee68d[_0x33ed80(0x8f)]()){const _0x13c9ee=requiredString(_0x7df0e3['localKey'],_0x33ed80(0x75)+_0x25f940+_0x33ed80(0x9d));!LOCAL_KEY[_0x33ed80(0xa2)](_0x13c9ee)&&fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xd7)+LOCAL_KEY[_0x33ed80(0x8d)]+'.');_0xc90793[_0x33ed80(0x89)](_0x13c9ee)&&fail(_0x33ed80(0xbd));_0xc90793[_0x33ed80(0xbc)](_0x13c9ee);!isObject(_0x7df0e3[_0x33ed80(0xa4)])&&fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0x91));rejectServerDatasetIdentity(_0x7df0e3[_0x33ed80(0xa4)],_0x33ed80(0x75)+_0x25f940+_0x33ed80(0x87));if(!isObject(_0x7df0e3[_0x33ed80(0xa4)][_0x33ed80(0xd1)]))fail(_0x33ed80(0x75)+_0x25f940+'].design.dataset\x20must\x20be\x20an\x20object.');rejectServerDatasetIdentity(_0x7df0e3[_0x33ed80(0xa4)][_0x33ed80(0xd1)],_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xc2)),requiredString(_0x7df0e3['design'][_0x33ed80(0xd1)][_0x33ed80(0xcc)],_0x33ed80(0x75)+_0x25f940+'].design.dataset.datasetName');_0x33ed80(0x98)in _0x7df0e3[_0x33ed80(0xa4)]&&(!Array[_0x33ed80(0xa0)](_0x7df0e3['design'][_0x33ed80(0x98)])||_0x7df0e3[_0x33ed80(0xa4)][_0x33ed80(0x98)][_0x33ed80(0xa8)]!==0x0)&&fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xca));const _0x408464=objectArray(_0x7df0e3[_0x33ed80(0xa4)]['fields'],'datasets['+_0x25f940+_0x33ed80(0xd9),0x1,0xc8),_0x1a128b=new Map();for(const [_0x547752,_0x4f51f6]of _0x408464['entries']()){const _0x1f03ed=fieldName(_0x4f51f6);if(!_0x1f03ed)fail('datasets['+_0x25f940+_0x33ed80(0xc5)+_0x547752+_0x33ed80(0x76));const _0x2cde7a=_0x1f03ed['toLowerCase']();if(_0x1a128b[_0x33ed80(0x89)](_0x2cde7a))fail(_0x33ed80(0xc9)+_0x13c9ee+_0x33ed80(0xa6));const _0x45ba2e=stringValue(_0x4f51f6['type']??_0x4f51f6[_0x33ed80(0xb5)])[_0x33ed80(0x8b)]();if(!SUPPORTED_FIELD_TYPES[_0x33ed80(0x89)](_0x45ba2e))fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xc5)+_0x547752+_0x33ed80(0xd2));_0x1a128b[_0x33ed80(0x72)](_0x2cde7a,_0x45ba2e),[_0x4f51f6[_0x33ed80(0x9f)],_0x4f51f6[_0x33ed80(0x7d)],_0x4f51f6[_0x33ed80(0x8a)]][_0x33ed80(0xb0)](_0x5e576b=>stringValue(_0x5e576b))&&fail(_0x33ed80(0x75)+_0x25f940+_0x33ed80(0xc5)+_0x547752+']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.');}_0x5d793c[_0x33ed80(0x72)](_0x13c9ee,_0x1a128b);}const _0x4e1979=new Set(),_0x400457=new Set();for(const [_0x302b65,_0x344022]of _0x10b6ff[_0x33ed80(0x8f)]()){const _0xe43b4b=validateRelation(_0x344022,_0x302b65,_0xc90793,_0x5d793c);if(_0x4e1979['has'](_0xe43b4b))fail(_0x33ed80(0xa5));_0x4e1979[_0x33ed80(0xbc)](_0xe43b4b);const _0x3ca6d2=_0xe43b4b['split']('\x00',0x2)['join']('\x00');if(_0x400457[_0x33ed80(0x89)](_0x3ca6d2))fail(_0x33ed80(0xa3));_0x400457[_0x33ed80(0xbc)](_0x3ca6d2);}for(const [_0x5a04bc,_0x5c0a16]of _0x46fa22[_0x33ed80(0x8f)]()){requiredString(_0x5c0a16[_0x33ed80(0x81)],_0x33ed80(0xda)+_0x5a04bc+'].reason'),validateConfidence(_0x5c0a16[_0x33ed80(0x96)],'unresolvedRelations['+_0x5a04bc+_0x33ed80(0xc4));}return _0xe5e9c0;}export function reconcileBatchResult(_0x406fbe){const _0x4fc1f9=a64_0xa1ed64;if(!isObject(_0x406fbe))return null;try{const _0x350275=stringArray(_0x406fbe[_0x4fc1f9(0x84)],_0x4fc1f9(0x84),0x1,0x14),_0x352eec=new Set(_0x350275);if(_0x352eec[_0x4fc1f9(0x85)]!==_0x350275[_0x4fc1f9(0xa8)]||_0x350275[_0x4fc1f9(0xb0)](_0xf9d589=>!LOCAL_KEY[_0x4fc1f9(0xa2)](_0xf9d589)))return null;const _0xc6633c=objectArray(_0x406fbe[_0x4fc1f9(0xc0)],'createdDatasets',0x1,0x14),_0x37729c=new Map(),_0x461218=new Set();for(const _0x35478d of _0xc6633c){const _0x4b6646=requiredString(_0x35478d[_0x4fc1f9(0xa7)],_0x4fc1f9(0x97)),_0x2e9434=requiredString(_0x35478d[_0x4fc1f9(0xb6)]??_0x35478d[_0x4fc1f9(0xa1)],'createdDatasets[].code');if(_0x37729c['has'](_0x4b6646)||_0x461218[_0x4fc1f9(0x89)](_0x2e9434))return null;_0x37729c[_0x4fc1f9(0x72)](_0x4b6646,_0x2e9434),_0x461218['add'](_0x2e9434);}if(!sameSet(_0x352eec,new Set(_0x37729c[_0x4fc1f9(0xc3)]())))return null;const _0x57512f=objectArray(_0x406fbe[_0x4fc1f9(0xb1)],_0x4fc1f9(0xb1),0x0,0xc8),_0x24f6bf=objectArray(_0x406fbe['createdRelations'],'createdRelations',0x0,0xc8),_0x25b3fc=relationTupleSet(_0x57512f,![],_0x37729c),_0x204509=relationTupleSet(_0x24f6bf,!![],_0x37729c);if(!_0x25b3fc||!_0x204509||!sameSet(_0x25b3fc,_0x204509))return null;const _0x3caf75=objectArray(_0x406fbe[_0x4fc1f9(0x9c)],'unresolvedRelations',0x0,0xc8);return{'expectedLocalKeys':_0x350275,'expectedRelations':_0x57512f,'createdDatasets':_0xc6633c,'createdRelations':_0x24f6bf,'unresolvedRelations':_0x3caf75,...isObject(_0x406fbe[_0x4fc1f9(0xc8)])?{'metrics':_0x406fbe[_0x4fc1f9(0xc8)]}:{}};}catch{return null;}}function validateRelation(_0x2edf08,_0x54020a,_0x1de1b1,_0x58f28a){const _0x596567=a64_0xa1ed64,_0x21ee78=_0x596567(0x78)+_0x54020a+']',_0x35cb68=requiredString(_0x2edf08[_0x596567(0xae)],_0x21ee78+'.fromDatasetKey'),_0x55d687=requiredString(_0x2edf08[_0x596567(0x8c)],_0x21ee78+'.toDatasetKey'),_0x58c8d2=requiredString(_0x2edf08['fromField'],_0x21ee78+_0x596567(0x90))[_0x596567(0x9b)](),_0x49eb33=requiredString(_0x2edf08['toField'],_0x21ee78+_0x596567(0xce))[_0x596567(0x9b)]();if(!_0x1de1b1[_0x596567(0x89)](_0x35cb68)||!_0x1de1b1['has'](_0x55d687))fail(_0x21ee78+'\x20references\x20an\x20unknown\x20dataset\x20localKey.');const _0x5e1ae1=_0x58f28a['get'](_0x35cb68)?.[_0x596567(0xd5)](_0x58c8d2),_0x39e233=_0x58f28a[_0x596567(0xd5)](_0x55d687)?.[_0x596567(0xd5)](_0x49eb33);if(_0x5e1ae1===undefined||_0x39e233===undefined)fail(_0x21ee78+_0x596567(0x95));if(_0x5e1ae1&&_0x39e233&&_0x5e1ae1!==_0x39e233)fail(_0x21ee78+_0x596567(0xc7));const _0x2bc30c=stringValue(_0x2edf08[_0x596567(0x8e)])||'lookup';if(_0x2bc30c!==_0x596567(0xc6))fail(_0x21ee78+_0x596567(0x83));const _0x248c53=stringValue(_0x2edf08[_0x596567(0xb9)])||'MANY_TO_ONE';if(!SUPPORTED_CARDINALITIES[_0x596567(0x89)](_0x248c53))fail(_0x21ee78+'.cardinality\x20is\x20not\x20supported.');return requiredString(_0x2edf08[_0x596567(0x81)],_0x21ee78+_0x596567(0x92)),validateConfidence(_0x2edf08[_0x596567(0x96)],_0x21ee78+_0x596567(0x86)),tuple(_0x35cb68,_0x58c8d2,_0x55d687,_0x49eb33,_0x596567(0xc6),_0x248c53);}function relationTupleSet(_0x20f2ec,_0x2919f4,_0x182192){const _0x5389e6=a64_0xa1ed64,_0x4a7a41=new Set();for(const _0x21ddf0 of _0x20f2ec){const _0x166df6=stringValue(_0x21ddf0['fromDatasetKey']),_0xc44d80=stringValue(_0x21ddf0[_0x5389e6(0x8c)]),_0x152fb8=stringValue(_0x21ddf0[_0x5389e6(0x7f)])[_0x5389e6(0x9b)](),_0x5e2b08=stringValue(_0x21ddf0[_0x5389e6(0xcd)])[_0x5389e6(0x9b)](),_0x39cad1=stringValue(_0x21ddf0['relationType']),_0x5ab79c=stringValue(_0x21ddf0[_0x5389e6(0xb9)]);if(!_0x166df6||!_0xc44d80||!_0x152fb8||!_0x5e2b08||_0x39cad1!==_0x5389e6(0xc6)||!SUPPORTED_CARDINALITIES[_0x5389e6(0x89)](_0x5ab79c))return null;if(!_0x182192['has'](_0x166df6)||!_0x182192[_0x5389e6(0x89)](_0xc44d80))return null;if(_0x2919f4&&(stringValue(_0x21ddf0[_0x5389e6(0xd6)])!==_0x182192[_0x5389e6(0xd5)](_0x166df6)||stringValue(_0x21ddf0[_0x5389e6(0xbf)])!==_0x182192[_0x5389e6(0xd5)](_0xc44d80)))return null;const _0x580481=tuple(_0x166df6,_0x152fb8,_0xc44d80,_0x5e2b08,_0x39cad1,_0x5ab79c);if(_0x4a7a41[_0x5389e6(0x89)](_0x580481))return null;_0x4a7a41[_0x5389e6(0xbc)](_0x580481);}return _0x4a7a41;}function rejectServerDatasetIdentity(_0x3d2a22,_0xc6de){const _0x1795d=a64_0xa1ed64;for(const _0x509ed6 of['id',_0x1795d(0xb8),_0x1795d(0xaf),_0x1795d(0xb6),_0x1795d(0xa1),_0x1795d(0xd8)]){if(_0x3d2a22[_0x509ed6]!==undefined&&_0x3d2a22[_0x509ed6]!==null&&_0x3d2a22[_0x509ed6]!=='')fail(_0xc6de+'.'+_0x509ed6+'\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.');}}function objectArray(_0x1eeb9e,_0x1ebe97,_0x409296,_0x42ae37){const _0x56edca=a64_0xa1ed64;return(!Array['isArray'](_0x1eeb9e)||_0x1eeb9e[_0x56edca(0xa8)]<_0x409296||_0x1eeb9e['length']>_0x42ae37||_0x1eeb9e['some'](_0x3388d7=>!isObject(_0x3388d7)))&&fail(_0x1ebe97+'\x20must\x20contain\x20'+_0x409296+'..'+_0x42ae37+_0x56edca(0x93)),_0x1eeb9e;}function stringArray(_0x3bf14b,_0x2fc5be,_0x7b9313,_0x236807){const _0x5cbd95=a64_0xa1ed64;return(!Array[_0x5cbd95(0xa0)](_0x3bf14b)||_0x3bf14b[_0x5cbd95(0xa8)]<_0x7b9313||_0x3bf14b[_0x5cbd95(0xa8)]>_0x236807||_0x3bf14b[_0x5cbd95(0xb0)](_0x58a77f=>typeof _0x58a77f!==_0x5cbd95(0x73)||!_0x58a77f['trim']()))&&fail(_0x2fc5be+_0x5cbd95(0xb7)+_0x7b9313+'..'+_0x236807+_0x5cbd95(0x77)),_0x3bf14b;}function requiredString(_0x52516c,_0x58bc83){const _0x328077=a64_0xa1ed64,_0x3beba8=stringValue(_0x52516c);if(!_0x3beba8)fail(_0x58bc83+_0x328077(0x7a));return _0x3beba8;}function stringValue(_0x153b60){const _0x4547fd=a64_0xa1ed64;return typeof _0x153b60===_0x4547fd(0x73)?_0x153b60['trim']():'';}function fieldName(_0x54dd60){const _0x154574=a64_0xa1ed64;return stringValue(_0x54dd60[_0x154574(0xb6)]??_0x54dd60[_0x154574(0x7b)]??_0x54dd60[_0x154574(0xac)]??_0x54dd60[_0x154574(0x88)]);}function validateConfidence(_0x3500e6,_0x9361e8){const _0x50d551=a64_0xa1ed64;_0x3500e6!==undefined&&_0x3500e6!==null&&(typeof _0x3500e6!=='number'||!Number['isFinite'](_0x3500e6)||_0x3500e6<0x0||_0x3500e6>0x1)&&fail(_0x9361e8+_0x50d551(0xd4));}function tuple(..._0x2c1994){const _0x5c7286=a64_0xa1ed64;return _0x2c1994[_0x5c7286(0x9a)]((_0x3757e1,_0x17b78a)=>_0x17b78a===0x1||_0x17b78a===0x3?_0x3757e1[_0x5c7286(0x9b)]():_0x3757e1)[_0x5c7286(0x7e)]('\x00');}function a64_0x2821(_0x1a9e5c,_0x1db459){_0x1a9e5c=_0x1a9e5c-0x72;const _0x24e581=a64_0x24e5();let _0x282116=_0x24e581[_0x1a9e5c];return _0x282116;}function sameSet(_0x562500,_0x1bd426){const _0x346536=a64_0xa1ed64;return _0x562500[_0x346536(0x85)]===_0x1bd426[_0x346536(0x85)]&&[..._0x562500][_0x346536(0xbb)](_0x5dea6f=>_0x1bd426[_0x346536(0x89)](_0x5dea6f));}function isObject(_0x83fb7c){const _0x3ebd0e=a64_0xa1ed64;return typeof _0x83fb7c===_0x3ebd0e(0xbe)&&_0x83fb7c!==null&&!Array[_0x3ebd0e(0xa0)](_0x83fb7c);}function fail(_0x500677){const _0x2fce81=a64_0xa1ed64;throw CliErrors[_0x2fce81(0xab)](_0x500677);}function a64_0x24e5(){const _0x55598d=['name','206543KaFXkR','fromDatasetKey','modelId','some','expectedRelations','4DIOQRP','dataset-batch','3357240tMBfbj','fieldType','code','\x20must\x20contain\x20','datasetId','cardinality','483200bzHLxL','every','add','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','object','toDatasetCode','createdDatasets','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','].design.dataset','keys','].confidence','].design.fields[','lookup','\x20connects\x20incompatible\x20field\x20types.','metrics','Dataset\x20','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','NUMBER','datasetName','toField','.toField','UPLOAD','SELECT','dataset','].type\x20is\x20not\x20supported.','DATETIME','\x20must\x20be\x20between\x200\x20and\x201.','get','fromDatasetCode','].localKey\x20must\x20match\x20','modelCode','].design.fields','unresolvedRelations[','set','string','datasets','datasets[',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','\x20non-empty\x20strings.','relations[','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','\x20is\x20required.','fieldCode','12RXnMiE','refTableField','join','fromField','9721512qyCBuG','reason','5859994ZcXvbW','.relationType\x20must\x20be\x20\x22lookup\x22.','expectedLocalKeys','size','.confidence','].design','fieldName','has','refTableLabelField','toUpperCase','toDatasetKey','source','relationType','entries','.fromField','].design\x20must\x20be\x20an\x20object.','.reason','\x20objects.','2218164NmifWD','\x20references\x20an\x20unknown\x20field.','confidence','createdDatasets[].localKey','relations','875858OjWRHP','map','toLowerCase','unresolvedRelations','].localKey','kind','refTable','isArray','datasetCode','test','Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.','design','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','localKey','length','TEXT','ONE_TO_ONE','validation'];a64_0x24e5=function(){return _0x55598d;};return a64_0x24e5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x5c2180=a65_0xfb21;(function(_0x517412,_0x42105a){const _0x38a0a8=a65_0xfb21,_0x4002ab=_0x517412();while(!![]){try{const _0x1894b7=parseInt(_0x38a0a8(0x14c))/0x1*(-parseInt(_0x38a0a8(0x146))/0x2)+-parseInt(_0x38a0a8(0x169))/0x3+-parseInt(_0x38a0a8(0x15c))/0x4+parseInt(_0x38a0a8(0x157))/0x5*(-parseInt(_0x38a0a8(0x147))/0x6)+parseInt(_0x38a0a8(0x14d))/0x7*(parseInt(_0x38a0a8(0x178))/0x8)+parseInt(_0x38a0a8(0x144))/0x9+parseInt(_0x38a0a8(0x15d))/0xa*(parseInt(_0x38a0a8(0x153))/0xb);if(_0x1894b7===_0x42105a)break;else _0x4002ab['push'](_0x4002ab['shift']());}catch(_0x53e45b){_0x4002ab['push'](_0x4002ab['shift']());}}}(a65_0x44cf,0xee1e1));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH='/smartapi/dblink/updateTableBusinessGroup',METADATA_BACKEND_PATH=a65_0x5c2180(0x17a),UNGROUPED_BUSINESS_GROUP=a65_0x5c2180(0x158);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x19c653,input:_0x277874,dryRun:_0x2ee78b}){const _0x227aad=a65_0x5c2180;validateInput(_0x277874);const _0x1395f6=normalizeBusinessGroupArgument(_0x277874[_0x227aad(0x163)]),_0x42fca3=await getDatasetDetail(_0x277874[_0x227aad(0x13d)]),_0x2ee05b=resolveBusinessGroupDataset(_0x42fca3,_0x277874['code']);assertBusinessGroupUpdateSupported(_0x2ee05b,_0x1395f6);const _0x37f9c1=loadCurrentBusinessGroup(_0x42fca3,_0x2ee05b);assertExpectedBusinessGroup(_0x37f9c1,_0x277874[_0x227aad(0x14f)]);const _0x280ed9=buildBackendPlan(_0x19c653,_0x2ee05b,_0x1395f6),_0x1402bf=_0x37f9c1!==_0x1395f6;let _0x4d2e8b;if(_0x1402bf&&!_0x2ee78b){_0x280ed9['kind']===_0x227aad(0x176)?await updateDbTableBusinessGroup(_0x280ed9[_0x227aad(0x15a)]):await updateErBusinessGroup(_0x280ed9[_0x227aad(0x15a)]);const _0x86e17d=await getDatasetDetail(_0x2ee05b[_0x227aad(0x13d)]),_0x1b7d5b=resolveBusinessGroupDataset(_0x86e17d,_0x2ee05b[_0x227aad(0x13d)]),_0x35aacc=loadCurrentBusinessGroup(_0x86e17d,_0x1b7d5b);if(_0x35aacc!==_0x1395f6)throw CliErrors[_0x227aad(0x171)](_0x227aad(0x140),'Expected\x20'+JSON['stringify'](displayBusinessGroup(_0x1395f6))+',\x20actual\x20'+JSON['stringify'](displayBusinessGroup(_0x35aacc))+'.');_0x4d2e8b={'verified':!![],'status':_0x227aad(0x145),'afterReadback':{'businessGroup':displayBusinessGroup(_0x35aacc)}};}else!_0x1402bf&&(_0x4d2e8b={'verified':!![],'status':_0x227aad(0x14b),'afterReadback':{'businessGroup':displayBusinessGroup(_0x37f9c1)}});const _0x1b3e9d={'operation':_0x227aad(0x150),'appCode':_0x19c653,'selector':{'code':_0x2ee05b[_0x227aad(0x13d)]},'dataset':{'id':_0x2ee05b['id'],'code':_0x2ee05b['code'],'name':_0x2ee05b['name'],'sourceType':_0x2ee05b[_0x227aad(0x131)]},'before':{'businessGroup':displayBusinessGroup(_0x37f9c1)},'after':{'businessGroup':displayBusinessGroup(_0x1395f6)},'changed':_0x1402bf,'dryRun':_0x2ee78b,'submitted':_0x1402bf&&!_0x2ee78b,'backend':{'method':_0x280ed9[_0x227aad(0x16e)],'path':_0x280ed9[_0x227aad(0x152)],'payload':_0x280ed9[_0x227aad(0x15a)]},..._0x4d2e8b?{'verification':_0x4d2e8b}:{},'warnings':[]};return{'ok':!![],'data':_0x1b3e9d,'message':_0x1402bf?_0x2ee78b?_0x227aad(0x160)+_0x2ee05b[_0x227aad(0x13d)]:_0x227aad(0x141)+_0x2ee05b[_0x227aad(0x13d)]:_0x227aad(0x155)+_0x2ee05b[_0x227aad(0x13d)]};}export const datasetBusinessGroupUpdate={'service':a65_0x5c2180(0x15b),'command':a65_0x5c2180(0x16a),'description':'Update\x20business\x20scenario\x20group','risk':a65_0x5c2180(0x14e),'flags':[CODE_FLAG,{'name':a65_0x5c2180(0x135),'type':a65_0x5c2180(0x16d),'required':!![],'description':a65_0x5c2180(0x15e)},{'name':a65_0x5c2180(0x148),'type':a65_0x5c2180(0x16d),'required':![],'description':a65_0x5c2180(0x177)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x113a9a){validateInput(readBusinessGroupUpdateInput(_0x113a9a));},async 'dryRun'(_0x242170){const _0x579273=a65_0x5c2180,_0x363c04=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x242170[_0x579273(0x14a)],'input':readBusinessGroupUpdateInput(_0x242170),'dryRun':!![]});return{'method':_0x363c04[_0x579273(0x13e)]['backend'][_0x579273(0x16e)],'url':_0x363c04[_0x579273(0x13e)][_0x579273(0x13b)][_0x579273(0x152)],'body':_0x363c04[_0x579273(0x13e)][_0x579273(0x13b)][_0x579273(0x15a)],'description':_0x363c04[_0x579273(0x16c)],..._0x363c04[_0x579273(0x13e)]};},async 'execute'(_0x42694b){const _0x4aa0f7=a65_0x5c2180;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x42694b[_0x4aa0f7(0x14a)],'input':readBusinessGroupUpdateInput(_0x42694b),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x118e73){const _0x5b5145=a65_0x5c2180,_0x173e72=_0x118e73['str']('expect-business-group');return{'code':trim(_0x118e73[_0x5b5145(0x134)](_0x5b5145(0x13d))),'businessGroup':_0x118e73[_0x5b5145(0x134)](_0x5b5145(0x135)),'expectBusinessGroup':_0x173e72===undefined||_0x173e72===''?undefined:_0x173e72};}function validateInput(_0x28cd5a){const _0x3764e2=a65_0x5c2180;if(!trim(_0x28cd5a[_0x3764e2(0x13d)]))throw CliErrors['validation']('--code\x20is\x20required');if(_0x28cd5a[_0x3764e2(0x163)]===undefined)throw CliErrors[_0x3764e2(0x13a)]('--business-group\x20is\x20required');if(!trim(_0x28cd5a[_0x3764e2(0x163)]))throw CliErrors['validation'](_0x3764e2(0x172));}function assertBusinessGroupUpdateSupported(_0x3e0f10,_0x260090){const _0x4a3e39=a65_0x5c2180;if(_0x3e0f10[_0x4a3e39(0x131)]==='DB_TABLE'&&!_0x260090)throw CliErrors[_0x4a3e39(0x13a)](_0x4a3e39(0x16b));}function resolveBusinessGroupDataset(_0x51c3bc,_0x583629){const _0x11d793=a65_0x5c2180,_0x22167e=asPlainObject(_0x51c3bc['dataset']),_0x4e4ebc=asPlainObject(_0x51c3bc[_0x11d793(0x170)]),_0x28459e=resolveSourceType(_0x51c3bc,_0x22167e,_0x4e4ebc),_0x9ac6c3=firstString(_0x51c3bc[_0x11d793(0x179)],_0x51c3bc['code'],_0x22167e[_0x11d793(0x151)],_0x583629)||_0x583629;return{'id':firstNumber(_0x51c3bc['modelId'],_0x51c3bc['id'],_0x22167e['datasetId'])??firstString(_0x51c3bc['modelId'],_0x51c3bc['id'],_0x22167e[_0x11d793(0x139)])??null,'code':_0x9ac6c3,'name':firstString(_0x51c3bc[_0x11d793(0x164)],_0x22167e[_0x11d793(0x137)],_0x22167e[_0x11d793(0x164)])||null,'sourceType':_0x28459e,'dbTableSelector':_0x28459e===_0x11d793(0x132)?{'dbLinkId':firstNumber(_0x4e4ebc[_0x11d793(0x165)]),'tableName':firstString(_0x4e4ebc[_0x11d793(0x143)])||null}:null};}function resolveSourceType(_0x650fad,_0x91574a,_0x194ca9){const _0x293739=a65_0x5c2180,_0x5deb9b=firstString(_0x650fad[_0x293739(0x13c)],_0x650fad[_0x293739(0x131)],_0x91574a[_0x293739(0x13c)],_0x91574a[_0x293739(0x131)])?.[_0x293739(0x142)]()['toUpperCase']();if(_0x5deb9b===_0x293739(0x132)||_0x5deb9b===_0x293739(0x175))return _0x5deb9b;if(Object[_0x293739(0x136)](_0x194ca9)[_0x293739(0x15f)]>0x0)return _0x293739(0x132);throw CliErrors['validation'](_0x293739(0x167));}function loadCurrentBusinessGroup(_0x2f670f,_0x50c853){const _0x262107=a65_0x5c2180,_0x193329=readBusinessGroupFromDatasetDetail(_0x2f670f,_0x50c853[_0x262107(0x131)]);if(_0x193329['found'])return normalizeBusinessGroup(_0x193329[_0x262107(0x159)]);return'';}function readBusinessGroupFromDatasetDetail(_0x34b69e,_0x13cd31){const _0xf9561e=a65_0x5c2180,_0x2f7f39=asPlainObject(_0x34b69e[_0xf9561e(0x15b)]),_0x1db27e=firstPresent(_0x34b69e[_0xf9561e(0x163)]);if(_0x1db27e[_0xf9561e(0x161)])return _0x1db27e;const _0x32a9cc=firstPresent(_0x2f7f39[_0xf9561e(0x163)]);if(_0x32a9cc[_0xf9561e(0x161)])return _0x32a9cc;if(_0x13cd31===_0xf9561e(0x132))return{'found':![]};const _0x20194f=readBusinessGroupFromExtend(_0x34b69e['extend']);if(_0x20194f[_0xf9561e(0x161)])return _0x20194f;return readBusinessGroupFromExtend(_0x2f7f39[_0xf9561e(0x168)]);}function a65_0x44cf(){const _0x48d8a2=['Expectation\x20mismatch\x20at\x20businessGroup','METADATA','db-table','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','8xxFVyN','modelCode','/smartapi/question/er-config/business-group/edit','sourceType','DB_TABLE','call','str','business-group','keys','datasetName',',\x20actual\x20','datasetId','validation','backend','source','code','data','isFinite','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','trim','tableName','4120524ZXcuYJ','matched','1635766PLGWxF','3162kpFocc','expect-business-group','dbTableSelector','appCode','unchanged','1hSpbqn','2888809kZnIkV','write','expectBusinessGroup','update','datasetCode','path','43606915KpbEbY','POST','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','stringify','565wnhyYq','ungrouped','value','payload','dataset','7733108QbLity','10wPZtwp','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','length','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','found','parse','businessGroup','name','dbId','dbLinkId','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','extend','3146244XfTjaC','business-group-update','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','message','string','method','number','dbtableConfig','apiError','--business-group\x20must\x20not\x20be\x20blank','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.'];a65_0x44cf=function(){return _0x48d8a2;};return a65_0x44cf();}function readBusinessGroupFromExtend(_0x58a361){const _0x3945e5=a65_0x5c2180;if(_0x58a361===undefined||_0x58a361===null||_0x58a361==='')return{'found':![]};if(typeof _0x58a361==='string')try{const _0xf08ad4=JSON[_0x3945e5(0x162)](_0x58a361);return readBusinessGroupFromExtend(_0xf08ad4);}catch{return{'found':![]};}const _0x4d168f=asPlainObject(_0x58a361);if(Object['prototype']['hasOwnProperty'][_0x3945e5(0x133)](_0x4d168f,_0x3945e5(0x163)))return{'found':!![],'value':_0x4d168f[_0x3945e5(0x163)]};return{'found':![]};}function firstPresent(..._0x49229b){for(const _0x37e8eb of _0x49229b){if(_0x37e8eb!==undefined&&_0x37e8eb!==null)return{'found':!![],'value':_0x37e8eb};}return{'found':![]};}function assertExpectedBusinessGroup(_0x559d9a,_0x2783e6){const _0x5865ab=a65_0x5c2180;if(_0x2783e6===undefined)return;const _0x10c0bd=normalizeBusinessGroupArgument(_0x2783e6);if(_0x559d9a!==_0x10c0bd)throw CliErrors[_0x5865ab(0x13a)](_0x5865ab(0x174),'Expected\x20'+JSON[_0x5865ab(0x156)](_0x10c0bd)+_0x5865ab(0x138)+JSON[_0x5865ab(0x156)](_0x559d9a));}function buildBackendPlan(_0x1da1fa,_0x55a243,_0xaa44b2){const _0x5949b4=a65_0x5c2180;if(_0x55a243[_0x5949b4(0x131)]===_0x5949b4(0x132)){if(!_0x55a243['dbTableSelector']||_0x55a243[_0x5949b4(0x149)]['dbLinkId']===null||!_0x55a243[_0x5949b4(0x149)][_0x5949b4(0x143)])throw CliErrors[_0x5949b4(0x13a)](_0x5949b4(0x173),'Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.');return{'kind':_0x5949b4(0x176),'method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x55a243[_0x5949b4(0x149)][_0x5949b4(0x166)],'tableName':_0x55a243[_0x5949b4(0x149)][_0x5949b4(0x143)],'businessGroup':_0xaa44b2}};}return{'kind':'metadata','method':_0x5949b4(0x154),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x1da1fa,'datasetCode':_0x55a243['code'],'businessGroup':_0xaa44b2}};}function normalizeBusinessGroup(_0xcf0037){const _0x1778e9=a65_0x5c2180;if(_0xcf0037===undefined||_0xcf0037===null)return'';return String(_0xcf0037)[_0x1778e9(0x142)]();}function normalizeBusinessGroupArgument(_0x268fff){const _0x3e52c4=normalizeBusinessGroup(_0x268fff);return _0x3e52c4===UNGROUPED_BUSINESS_GROUP?'':_0x3e52c4;}function displayBusinessGroup(_0x1397a3){return _0x1397a3||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0xa678af){if(!_0xa678af||typeof _0xa678af!=='object'||Array['isArray'](_0xa678af))return{};return _0xa678af;}function firstString(..._0x4fe56a){const _0x156a6a=a65_0x5c2180;for(const _0x5ea1ba of _0x4fe56a){if(typeof _0x5ea1ba==='string'&&_0x5ea1ba[_0x156a6a(0x142)]())return _0x5ea1ba[_0x156a6a(0x142)]();if(typeof _0x5ea1ba===_0x156a6a(0x16f)&&Number['isFinite'](_0x5ea1ba))return String(_0x5ea1ba);}return undefined;}function a65_0xfb21(_0x479680,_0x4ece5f){_0x479680=_0x479680-0x131;const _0x44cf42=a65_0x44cf();let _0xfb21e3=_0x44cf42[_0x479680];return _0xfb21e3;}function firstNumber(..._0x1d2332){const _0x3d51d2=a65_0x5c2180;for(const _0xb08c39 of _0x1d2332){if(typeof _0xb08c39==='number'&&Number['isFinite'](_0xb08c39))return _0xb08c39;if(typeof _0xb08c39===_0x3d51d2(0x16d)&&_0xb08c39[_0x3d51d2(0x142)]()&&Number[_0x3d51d2(0x13f)](Number(_0xb08c39)))return Number(_0xb08c39);}return null;}function trim(_0x175c86){const _0x10c4ba=a65_0x5c2180;return String(_0x175c86||'')[_0x10c4ba(0x142)]();}
|
|
1
|
+
const a65_0x3015e4=a65_0x2b46;(function(_0xc56e29,_0x484b5f){const _0x13830b=a65_0x2b46,_0x397c76=_0xc56e29();while(!![]){try{const _0x305afe=-parseInt(_0x13830b(0xd6))/0x1+parseInt(_0x13830b(0x11a))/0x2*(-parseInt(_0x13830b(0x108))/0x3)+-parseInt(_0x13830b(0x11b))/0x4*(-parseInt(_0x13830b(0xda))/0x5)+-parseInt(_0x13830b(0xf2))/0x6*(parseInt(_0x13830b(0xec))/0x7)+-parseInt(_0x13830b(0x104))/0x8+-parseInt(_0x13830b(0xea))/0x9+-parseInt(_0x13830b(0x10c))/0xa*(-parseInt(_0x13830b(0x116))/0xb);if(_0x305afe===_0x484b5f)break;else _0x397c76['push'](_0x397c76['shift']());}catch(_0x539277){_0x397c76['push'](_0x397c76['shift']());}}}(a65_0x4e65,0x69ca5));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH='/smartapi/dblink/updateTableBusinessGroup',METADATA_BACKEND_PATH=a65_0x3015e4(0x119),UNGROUPED_BUSINESS_GROUP=a65_0x3015e4(0x10f);function a65_0x2b46(_0x4cb75b,_0x24699d){_0x4cb75b=_0x4cb75b-0xcf;const _0x4e6558=a65_0x4e65();let _0x2b4631=_0x4e6558[_0x4cb75b];return _0x2b4631;}export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x46d425,input:_0x52788f,dryRun:_0x3c8d65}){const _0x65bd61=a65_0x3015e4;validateInput(_0x52788f);const _0x276174=normalizeBusinessGroupArgument(_0x52788f[_0x65bd61(0xe3)]),_0x2cb119=await getDatasetDetail(_0x52788f[_0x65bd61(0x110)]),_0x370169=resolveBusinessGroupDataset(_0x2cb119,_0x52788f[_0x65bd61(0x110)]);assertBusinessGroupUpdateSupported(_0x370169,_0x276174);const _0x68f523=loadCurrentBusinessGroup(_0x2cb119,_0x370169);assertExpectedBusinessGroup(_0x68f523,_0x52788f[_0x65bd61(0xd7)]);const _0x463754=buildBackendPlan(_0x46d425,_0x370169,_0x276174),_0x53ee2f=_0x68f523!==_0x276174;let _0x26ff93;if(_0x53ee2f&&!_0x3c8d65){_0x463754[_0x65bd61(0x10b)]===_0x65bd61(0x112)?await updateDbTableBusinessGroup(_0x463754['payload']):await updateErBusinessGroup(_0x463754[_0x65bd61(0xd4)]);const _0x4605d5=await getDatasetDetail(_0x370169[_0x65bd61(0x110)]),_0x324367=resolveBusinessGroupDataset(_0x4605d5,_0x370169[_0x65bd61(0x110)]),_0x27f12d=loadCurrentBusinessGroup(_0x4605d5,_0x324367);if(_0x27f12d!==_0x276174)throw CliErrors[_0x65bd61(0x109)](_0x65bd61(0xf8),_0x65bd61(0xe9)+JSON['stringify'](displayBusinessGroup(_0x276174))+_0x65bd61(0xee)+JSON[_0x65bd61(0xff)](displayBusinessGroup(_0x27f12d))+'.');_0x26ff93={'verified':!![],'status':_0x65bd61(0xcf),'afterReadback':{'businessGroup':displayBusinessGroup(_0x27f12d)}};}else!_0x53ee2f&&(_0x26ff93={'verified':!![],'status':_0x65bd61(0xd5),'afterReadback':{'businessGroup':displayBusinessGroup(_0x68f523)}});const _0x39b567={'operation':'update','appCode':_0x46d425,'selector':{'code':_0x370169[_0x65bd61(0x110)]},'dataset':{'id':_0x370169['id'],'code':_0x370169[_0x65bd61(0x110)],'name':_0x370169[_0x65bd61(0xfb)],'sourceType':_0x370169[_0x65bd61(0x117)]},'before':{'businessGroup':displayBusinessGroup(_0x68f523)},'after':{'businessGroup':displayBusinessGroup(_0x276174)},'changed':_0x53ee2f,'dryRun':_0x3c8d65,'submitted':_0x53ee2f&&!_0x3c8d65,'backend':{'method':_0x463754[_0x65bd61(0x10e)],'path':_0x463754[_0x65bd61(0xe0)],'payload':_0x463754[_0x65bd61(0xd4)]},..._0x26ff93?{'verification':_0x26ff93}:{},'warnings':[]};return{'ok':!![],'data':_0x39b567,'message':_0x53ee2f?_0x3c8d65?_0x65bd61(0xfe)+_0x370169[_0x65bd61(0x110)]:_0x65bd61(0x101)+_0x370169[_0x65bd61(0x110)]:_0x65bd61(0xdb)+_0x370169[_0x65bd61(0x110)]};}export const datasetBusinessGroupUpdate={'service':a65_0x3015e4(0xe5),'command':'business-group-update','description':a65_0x3015e4(0xe4),'risk':a65_0x3015e4(0x115),'flags':[CODE_FLAG,{'name':a65_0x3015e4(0x10a),'type':a65_0x3015e4(0xe8),'required':!![],'description':a65_0x3015e4(0x102)},{'name':a65_0x3015e4(0xe1),'type':a65_0x3015e4(0xe8),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x303ef9){validateInput(readBusinessGroupUpdateInput(_0x303ef9));},async 'dryRun'(_0x4b38f6){const _0x55fe0c=a65_0x3015e4,_0xac549f=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x4b38f6['appCode'],'input':readBusinessGroupUpdateInput(_0x4b38f6),'dryRun':!![]});return{'method':_0xac549f[_0x55fe0c(0xf5)][_0x55fe0c(0x11c)]['method'],'url':_0xac549f[_0x55fe0c(0xf5)][_0x55fe0c(0x11c)][_0x55fe0c(0xe0)],'body':_0xac549f[_0x55fe0c(0xf5)][_0x55fe0c(0x11c)]['payload'],'description':_0xac549f['message'],..._0xac549f[_0x55fe0c(0xf5)]};},async 'execute'(_0x25a3ce){const _0x427e54=a65_0x3015e4;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x25a3ce[_0x427e54(0xd3)],'input':readBusinessGroupUpdateInput(_0x25a3ce),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x4721f3){const _0x2b39b0=a65_0x3015e4,_0x3510fa=_0x4721f3[_0x2b39b0(0xde)](_0x2b39b0(0xe1));return{'code':trim(_0x4721f3[_0x2b39b0(0xde)](_0x2b39b0(0x110))),'businessGroup':_0x4721f3[_0x2b39b0(0xde)](_0x2b39b0(0x10a)),'expectBusinessGroup':_0x3510fa===undefined||_0x3510fa===''?undefined:_0x3510fa};}function validateInput(_0x135ae7){const _0x330f23=a65_0x3015e4;if(!trim(_0x135ae7[_0x330f23(0x110)]))throw CliErrors['validation'](_0x330f23(0xf6));if(_0x135ae7[_0x330f23(0xe3)]===undefined)throw CliErrors[_0x330f23(0x100)](_0x330f23(0xfd));if(!trim(_0x135ae7[_0x330f23(0xe3)]))throw CliErrors[_0x330f23(0x100)](_0x330f23(0xdf));}function assertBusinessGroupUpdateSupported(_0x1ac653,_0x283359){const _0x534c52=a65_0x3015e4;if(_0x1ac653[_0x534c52(0x117)]===_0x534c52(0xe6)&&!_0x283359)throw CliErrors['validation'](_0x534c52(0xd1));}function resolveBusinessGroupDataset(_0x5a80b6,_0x16c6b5){const _0x42eaf4=a65_0x3015e4,_0x2b36f0=asPlainObject(_0x5a80b6[_0x42eaf4(0xe5)]),_0x516315=asPlainObject(_0x5a80b6[_0x42eaf4(0x105)]),_0x462b12=resolveSourceType(_0x5a80b6,_0x2b36f0,_0x516315),_0x452f85=firstString(_0x5a80b6[_0x42eaf4(0x103)],_0x5a80b6['code'],_0x2b36f0[_0x42eaf4(0xdc)],_0x16c6b5)||_0x16c6b5;return{'id':firstNumber(_0x5a80b6['modelId'],_0x5a80b6['id'],_0x2b36f0[_0x42eaf4(0x111)])??firstString(_0x5a80b6[_0x42eaf4(0xf7)],_0x5a80b6['id'],_0x2b36f0[_0x42eaf4(0x111)])??null,'code':_0x452f85,'name':firstString(_0x5a80b6[_0x42eaf4(0xfb)],_0x2b36f0[_0x42eaf4(0x106)],_0x2b36f0['name'])||null,'sourceType':_0x462b12,'dbTableSelector':_0x462b12==='DB_TABLE'?{'dbLinkId':firstNumber(_0x516315[_0x42eaf4(0xe7)]),'tableName':firstString(_0x516315['tableName'])||null}:null};}function resolveSourceType(_0x38435e,_0x126506,_0x28132f){const _0x407a9b=a65_0x3015e4,_0x2c3bde=firstString(_0x38435e[_0x407a9b(0xf4)],_0x38435e[_0x407a9b(0x117)],_0x126506[_0x407a9b(0xf4)],_0x126506[_0x407a9b(0x117)])?.[_0x407a9b(0xd0)]()[_0x407a9b(0xf3)]();if(_0x2c3bde===_0x407a9b(0xe6)||_0x2c3bde===_0x407a9b(0x10d))return _0x2c3bde;if(Object['keys'](_0x28132f)['length']>0x0)return'DB_TABLE';throw CliErrors[_0x407a9b(0x100)](_0x407a9b(0xfc));}function loadCurrentBusinessGroup(_0x247982,_0x52bd97){const _0x5c87c3=a65_0x3015e4,_0x4b05b6=readBusinessGroupFromDatasetDetail(_0x247982,_0x52bd97[_0x5c87c3(0x117)]);if(_0x4b05b6[_0x5c87c3(0xf9)])return normalizeBusinessGroup(_0x4b05b6[_0x5c87c3(0x114)]);return'';}function readBusinessGroupFromDatasetDetail(_0x43094e,_0x328306){const _0x265c25=a65_0x3015e4,_0x22d7c5=asPlainObject(_0x43094e[_0x265c25(0xe5)]),_0x11e550=firstPresent(_0x43094e[_0x265c25(0xe3)]);if(_0x11e550[_0x265c25(0xf9)])return _0x11e550;const _0x5f09b5=firstPresent(_0x22d7c5[_0x265c25(0xe3)]);if(_0x5f09b5[_0x265c25(0xf9)])return _0x5f09b5;if(_0x328306===_0x265c25(0xe6))return{'found':![]};const _0x4ecf33=readBusinessGroupFromExtend(_0x43094e[_0x265c25(0xeb)]);if(_0x4ecf33[_0x265c25(0xf9)])return _0x4ecf33;return readBusinessGroupFromExtend(_0x22d7c5[_0x265c25(0xeb)]);}function readBusinessGroupFromExtend(_0x1163cd){const _0x27d893=a65_0x3015e4;if(_0x1163cd===undefined||_0x1163cd===null||_0x1163cd==='')return{'found':![]};if(typeof _0x1163cd===_0x27d893(0xe8))try{const _0x7b4807=JSON[_0x27d893(0xdd)](_0x1163cd);return readBusinessGroupFromExtend(_0x7b4807);}catch{return{'found':![]};}const _0x5b5e8d=asPlainObject(_0x1163cd);if(Object[_0x27d893(0xfa)][_0x27d893(0x107)][_0x27d893(0xed)](_0x5b5e8d,_0x27d893(0xe3)))return{'found':!![],'value':_0x5b5e8d[_0x27d893(0xe3)]};return{'found':![]};}function firstPresent(..._0x333b44){for(const _0x19ae28 of _0x333b44){if(_0x19ae28!==undefined&&_0x19ae28!==null)return{'found':!![],'value':_0x19ae28};}return{'found':![]};}function a65_0x4e65(){const _0x37777f=['db-table','dbTableSelector','value','write','16432559UkMYxn','sourceType','object','/smartapi/question/er-config/business-group/edit','2ojvaMo','28lnMDvT','backend','matched','trim','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','POST','appCode','payload','unchanged','727556ssvzLF','expectBusinessGroup','number','tableName','11965vxaEkD','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','datasetCode','parse','str','--business-group\x20must\x20not\x20be\x20blank','path','expect-business-group','isFinite','businessGroup','Update\x20business\x20scenario\x20group','dataset','DB_TABLE','dbId','string','Expected\x20','1251819CeKXau','extend','3295978CukNcF','call',',\x20actual\x20','dbLinkId','isArray','Expectation\x20mismatch\x20at\x20businessGroup','6VElytr','toUpperCase','source','data','--code\x20is\x20required','modelId','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','found','prototype','name','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','--business-group\x20is\x20required','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','stringify','validation','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','modelCode','3780952EaKpOR','dbtableConfig','datasetName','hasOwnProperty','2283156SyHIhz','apiError','business-group','kind','20jQdBQB','METADATA','method','ungrouped','code','datasetId'];a65_0x4e65=function(){return _0x37777f;};return a65_0x4e65();}function assertExpectedBusinessGroup(_0x237501,_0x1749e1){const _0x505bb8=a65_0x3015e4;if(_0x1749e1===undefined)return;const _0xb8e24f=normalizeBusinessGroupArgument(_0x1749e1);if(_0x237501!==_0xb8e24f)throw CliErrors[_0x505bb8(0x100)](_0x505bb8(0xf1),_0x505bb8(0xe9)+JSON[_0x505bb8(0xff)](_0xb8e24f)+_0x505bb8(0xee)+JSON['stringify'](_0x237501));}function buildBackendPlan(_0x310afd,_0x4c4769,_0x496106){const _0x2a8b16=a65_0x3015e4;if(_0x4c4769[_0x2a8b16(0x117)]==='DB_TABLE'){if(!_0x4c4769[_0x2a8b16(0x113)]||_0x4c4769[_0x2a8b16(0x113)][_0x2a8b16(0xef)]===null||!_0x4c4769[_0x2a8b16(0x113)]['tableName'])throw CliErrors[_0x2a8b16(0x100)]('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.');return{'kind':_0x2a8b16(0x112),'method':_0x2a8b16(0xd2),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x4c4769['dbTableSelector'][_0x2a8b16(0xef)],'tableName':_0x4c4769[_0x2a8b16(0x113)][_0x2a8b16(0xd9)],'businessGroup':_0x496106}};}return{'kind':'metadata','method':_0x2a8b16(0xd2),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x310afd,'datasetCode':_0x4c4769[_0x2a8b16(0x110)],'businessGroup':_0x496106}};}function normalizeBusinessGroup(_0x3f37e0){const _0xe7ef6c=a65_0x3015e4;if(_0x3f37e0===undefined||_0x3f37e0===null)return'';return String(_0x3f37e0)[_0xe7ef6c(0xd0)]();}function normalizeBusinessGroupArgument(_0x2e7abb){const _0x2784d8=normalizeBusinessGroup(_0x2e7abb);return _0x2784d8===UNGROUPED_BUSINESS_GROUP?'':_0x2784d8;}function displayBusinessGroup(_0xedf53a){return _0xedf53a||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x3b35c5){const _0x23c597=a65_0x3015e4;if(!_0x3b35c5||typeof _0x3b35c5!==_0x23c597(0x118)||Array[_0x23c597(0xf0)](_0x3b35c5))return{};return _0x3b35c5;}function firstString(..._0x377053){const _0x4f6901=a65_0x3015e4;for(const _0x4bfade of _0x377053){if(typeof _0x4bfade==='string'&&_0x4bfade[_0x4f6901(0xd0)]())return _0x4bfade[_0x4f6901(0xd0)]();if(typeof _0x4bfade==='number'&&Number[_0x4f6901(0xe2)](_0x4bfade))return String(_0x4bfade);}return undefined;}function firstNumber(..._0x1e84b5){const _0x47da02=a65_0x3015e4;for(const _0x39e1ea of _0x1e84b5){if(typeof _0x39e1ea===_0x47da02(0xd8)&&Number[_0x47da02(0xe2)](_0x39e1ea))return _0x39e1ea;if(typeof _0x39e1ea==='string'&&_0x39e1ea[_0x47da02(0xd0)]()&&Number[_0x47da02(0xe2)](Number(_0x39e1ea)))return Number(_0x39e1ea);}return null;}function trim(_0xbccfc){return String(_0xbccfc||'')['trim']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x566d67=a66_0x4958;function a66_0x4958(_0x45e4b9,_0x2aff0a){_0x45e4b9=_0x45e4b9-0xa9;const _0x4ff3f6=a66_0x4ff3();let _0x495855=_0x4ff3f6[_0x45e4b9];return _0x495855;}(function(_0x2d66f3,_0x55593c){const _0x2a569c=a66_0x4958,_0x6ad722=_0x2d66f3();while(!![]){try{const _0x34c00d=parseInt(_0x2a569c(0xb8))/0x1*(parseInt(_0x2a569c(0xb5))/0x2)+parseInt(_0x2a569c(0xb6))/0x3+parseInt(_0x2a569c(0xb3))/0x4+-parseInt(_0x2a569c(0xba))/0x5+-parseInt(_0x2a569c(0xac))/0x6*(-parseInt(_0x2a569c(0xb7))/0x7)+parseInt(_0x2a569c(0xb0))/0x8*(parseInt(_0x2a569c(0xbb))/0x9)+-parseInt(_0x2a569c(0xae))/0xa;if(_0x34c00d===_0x55593c)break;else _0x6ad722['push'](_0x6ad722['shift']());}catch(_0x18023d){_0x6ad722['push'](_0x6ad722['shift']());}}}(a66_0x4ff3,0xb5bd6));function a66_0x4ff3(){const _0x4536e2=['345792lUEUIl','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','34511300ypoNlG','read','40232dsjdCI','map','length','1546232QiCHtr','dbid','2555194COojtp','3719334nwhQRP','77PwWmkh','1CPJkio','groups','2319080pnQVPQ','2007ZwBnqT','num','business-groups','appCode','\x20business\x20group(s)\x20for\x20database\x20connection\x20','DB_TABLE','trim','ungrouped','number','Found\x20'];a66_0x4ff3=function(){return _0x4536e2;};return a66_0x4ff3();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':'dataset','command':a66_0x566d67(0xbd),'description':a66_0x566d67(0xad),'risk':a66_0x566d67(0xaf),'flags':[{'name':a66_0x566d67(0xb4),'type':a66_0x566d67(0xaa),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x33fd22){const _0x3fbc29=a66_0x566d67,_0x1d4e91=_0x33fd22[_0x3fbc29(0xbc)](_0x3fbc29(0xb4)),_0x242102=await getErBusinessGroupSummary(_0x33fd22[_0x3fbc29(0xbe)],_0x1d4e91),_0x41f9a9=_0x242102[_0x3fbc29(0xb9)][_0x3fbc29(0xb1)](_0x4efdf8=>({..._0x4efdf8,'businessGroup':_0x4efdf8['businessGroup'][_0x3fbc29(0xc1)]()||_0x3fbc29(0xa9)}));return{'ok':!![],'data':{..._0x242102,'groups':_0x41f9a9,'scope':_0x3fbc29(0xc0)},'message':_0x3fbc29(0xab)+_0x41f9a9[_0x3fbc29(0xb2)]+_0x3fbc29(0xbf)+_0x1d4e91};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a67_0x50a2(){const _0x4d3c8e=['datasetCode','2535225bUVfcz','dataset','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','tableName','33827xzleJb','50oKXjzt','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','trim','object','4869276EZzMWz','getOne','\x20is\x20','UNKNOWN','sourceType','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','validation','830258ToWQeE','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','7360590WJwbIH','20dYPYgy','modelCode','unknown','dbId','SQL\x20schema\x20validation','3980337tLDWgT','176NMBcln','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','source','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','4ZeENxX','toUpperCase','METADATA','code','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','filter','dbtable','53685aIzyIF'];a67_0x50a2=function(){return _0x4d3c8e;};return a67_0x50a2();}const a67_0x283628=a67_0x4448;(function(_0x5aac09,_0x289e10){const _0x58c993=a67_0x4448,_0x5b08a1=_0x5aac09();while(!![]){try{const _0x451f08=-parseInt(_0x58c993(0x11d))/0x1*(parseInt(_0x58c993(0x12c))/0x2)+parseInt(_0x58c993(0x131))/0x3*(parseInt(_0x58c993(0x110))/0x4)+parseInt(_0x58c993(0x12b))/0x5+-parseInt(_0x58c993(0x122))/0x6+-parseInt(_0x58c993(0x119))/0x7+-parseInt(_0x58c993(0x132))/0x8*(parseInt(_0x58c993(0x117))/0x9)+parseInt(_0x58c993(0x11e))/0xa*(-parseInt(_0x58c993(0x129))/0xb);if(_0x451f08===_0x289e10)break;else _0x5b08a1['push'](_0x5b08a1['shift']());}catch(_0x53ccad){_0x5b08a1['push'](_0x5b08a1['shift']());}}}(a67_0x50a2,0xbe02e));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a67_0x283628(0x133),'getOne':a67_0x283628(0x127)};export const RUNTIME_DATA_ACCESS_SUMMARY=a67_0x283628(0x12a);function valueToString(_0x26a94c){const _0x326a40=a67_0x283628;return _0x26a94c==null?'':String(_0x26a94c)[_0x326a40(0x120)]();}function getDatasetCode(_0x598574){const _0x3c8f36=a67_0x283628;return valueToString(_0x598574[_0x3c8f36(0x113)]??_0x598574[_0x3c8f36(0x12d)]??_0x598574[_0x3c8f36(0x11a)]?.[_0x3c8f36(0x118)]);}function getDatasetName(_0x17d3ca){const _0x47cc99=a67_0x283628;return valueToString(_0x17d3ca['name']??_0x17d3ca[_0x47cc99(0x11a)]?.['datasetName'])||_0x47cc99(0x12e);}function getDatasetSource(_0x1ec649){const _0x44bac9=a67_0x283628;return valueToString(_0x1ec649[_0x44bac9(0x134)]??_0x1ec649[_0x44bac9(0x11a)]?.[_0x44bac9(0x126)])[_0x44bac9(0x111)]();}function getDbtableConfig(_0x5c24e6){const _0x1ad9c5=a67_0x283628,_0x5d35d7=_0x5c24e6['dbtableConfig']??_0x5c24e6[_0x1ad9c5(0x116)];return _0x5d35d7&&typeof _0x5d35d7===_0x1ad9c5(0x121)?_0x5d35d7:{};}export function isDbTableBackedDataset(_0x3878f1){const _0x371c5f=a67_0x283628,_0xb62f20=getDatasetSource(_0x3878f1);if(_0xb62f20===_0x371c5f(0x112))return![];const _0x3ea369=getDbtableConfig(_0x3878f1),_0x571725=_0x3ea369[_0x371c5f(0x12f)]??_0x3ea369['id'],_0x45aabb=valueToString(_0x3ea369[_0x371c5f(0x11c)]??_0x3878f1[_0x371c5f(0x11c)]??_0x3878f1[_0x371c5f(0x11a)]?.[_0x371c5f(0x11c)]);return _0x571725!==undefined&&_0x571725!==null&&_0x45aabb['length']>0x0;}export function filterDbTableBackedDatasets(_0x592b6d){return _0x592b6d['filter'](_0x3085c1=>isDbTableBackedDataset(_0x3085c1));}function a67_0x4448(_0x54314a,_0x4e7f03){_0x54314a=_0x54314a-0x10f;const _0x50a2c2=a67_0x50a2();let _0x444825=_0x50a2c2[_0x54314a];return _0x444825;}export function buildDbTableBackedRequirementMessage(_0x2bc647,_0x49eee4=a67_0x283628(0x130)){const _0x5765d1=a67_0x283628,_0x563d03=getDatasetSource(_0x2bc647)||_0x5765d1(0x125),_0x1a92dd=getDatasetName(_0x2bc647),_0x41e0c6=getDatasetCode(_0x2bc647),_0x442a4c=_0x41e0c6?'\x20('+_0x41e0c6+')':'';return['The\x20current\x20dataset\x20\x22'+_0x1a92dd+'\x22'+_0x442a4c+_0x5765d1(0x124)+_0x563d03+_0x5765d1(0x11b)+_0x49eee4+'.',_0x5765d1(0x114),_0x5765d1(0x10f),_0x5765d1(0x11f)+RUNTIME_DATA_ACCESS_COMMANDS[_0x5765d1(0x115)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x5765d1(0x123)]+'.']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x533368,_0x26ee4e){const _0x284323=a67_0x283628;if(!isDbTableBackedDataset(_0x533368))throw CliErrors[_0x284323(0x128)](buildDbTableBackedRequirementMessage(_0x533368,_0x26ee4e));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x3943f9=a68_0x4910;(function(_0xbeb2ed,_0x22661a){const _0xa79f89=a68_0x4910,_0x2cd161=_0xbeb2ed();while(!![]){try{const _0x186b7f=-parseInt(_0xa79f89(0x13e))/0x1*(-parseInt(_0xa79f89(0x13f))/0x2)+-parseInt(_0xa79f89(0x14b))/0x3*(parseInt(_0xa79f89(0x140))/0x4)+-parseInt(_0xa79f89(0x14a))/0x5+-parseInt(_0xa79f89(0x143))/0x6*(parseInt(_0xa79f89(0x142))/0x7)+-parseInt(_0xa79f89(0x144))/0x8+parseInt(_0xa79f89(0x149))/0x9+parseInt(_0xa79f89(0x148))/0xa;if(_0x186b7f===_0x22661a)break;else _0x2cd161['push'](_0x2cd161['shift']());}catch(_0x3d38cf){_0x2cd161['push'](_0x2cd161['shift']());}}}(a68_0x55c8,0xf2d1b));function a68_0x4910(_0xf2537e,_0x3f8d5a){_0xf2537e=_0xf2537e-0x13e;const _0x55c86f=a68_0x55c8();let _0x49101a=_0x55c86f[_0xf2537e];return _0x49101a;}function a68_0x55c8(){const _0x3255fc=['create','72699tjIYmB','10glOxeT','652pewGBT','dataset','7nbrJmb','1206798GBmjqQ','8796592RGvFYu','cross-relation-create','Create\x20a\x20logical\x20relation\x20between\x20DB_TABLE\x20datasets\x20in\x20different\x20database\x20connections','write','21426020vcGgvP','15268446IwjgyY','2314770xOcCxM','26583vtfNhC'];a68_0x55c8=function(){return _0x3255fc;};return a68_0x55c8();}import{createCrossDbRelation}from'../../core/api-client.js';import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationCreate={'service':a68_0x3943f9(0x141),'command':a68_0x3943f9(0x145),'description':a68_0x3943f9(0x146),'risk':a68_0x3943f9(0x147),'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 _0x3756f4=>validateCrossRelation(_0x3756f4,a68_0x3943f9(0x14c)),'dryRun':_0x251454=>previewCrossRelation(_0x251454,a68_0x3943f9(0x14c)),'execute':_0x4def41=>executeCrossRelation(_0x4def41,a68_0x3943f9(0x14c),createCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x51ccc7=a69_0x1530;(function(_0x2bc2c1,_0x212bea){const _0x33b992=a69_0x1530,_0x3b015a=_0x2bc2c1();while(!![]){try{const _0x3c674d=-parseInt(_0x33b992(0x159))/0x1*(-parseInt(_0x33b992(0x15e))/0x2)+parseInt(_0x33b992(0x162))/0x3*(-parseInt(_0x33b992(0x156))/0x4)+-parseInt(_0x33b992(0x153))/0x5*(-parseInt(_0x33b992(0x154))/0x6)+-parseInt(_0x33b992(0x15b))/0x7*(parseInt(_0x33b992(0x15c))/0x8)+parseInt(_0x33b992(0x15a))/0x9*(-parseInt(_0x33b992(0x152))/0xa)+parseInt(_0x33b992(0x15d))/0xb+parseInt(_0x33b992(0x158))/0xc*(-parseInt(_0x33b992(0x157))/0xd);if(_0x3c674d===_0x212bea)break;else _0x3b015a['push'](_0x3b015a['shift']());}catch(_0x33964e){_0x3b015a['push'](_0x3b015a['shift']());}}}(a69_0x4ebc,0x4c46a));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';function a69_0x1530(_0xf5b593,_0x70353d){_0xf5b593=_0xf5b593-0x152;const _0x4ebc47=a69_0x4ebc();let _0x15301e=_0x4ebc47[_0xf5b593];return _0x15301e;}function a69_0x4ebc(){const _0x37e759=['10UeFoKd','2810865CESOHa','6hXoRCg','Delete\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','1006708BSYNIE','32773VtDcmv','372PyGwYZ','17rTgWjM','1004175FhzWKg','7eBBbTH','2616128alRYKa','2846910FHkrWl','30572kIFacC','cross-relation-delete','dataset','delete','3rTUYeS'];a69_0x4ebc=function(){return _0x37e759;};return a69_0x4ebc();}import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationDelete={'service':a69_0x51ccc7(0x160),'command':a69_0x51ccc7(0x15f),'description':a69_0x51ccc7(0x155),'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 _0x318bd3=>validateCrossRelation(_0x318bd3,a69_0x51ccc7(0x161)),'dryRun':_0x12d83d=>previewCrossRelation(_0x12d83d,'delete'),'execute':_0x158b47=>executeCrossRelation(_0x158b47,a69_0x51ccc7(0x161),deleteCrossDbRelation)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x1a72ff=a70_0x3811;function a70_0x42e8(){const _0x4bd452=['length','1042326MCrtLv','8070699ytpPhW','1103626LoGWjb','list','3525528AwLIsg','\x20relation(s)','map','3977769nAXYWU','Cross-database\x20relations:\x20','200YmIdND','6zfYesD','1422229hNhNmC','List\x20outgoing\x20cross-database\x20relations\x20by\x20source\x20dataset\x20or\x20database\x20connection','1597835owTEaq'];a70_0x42e8=function(){return _0x4bd452;};return a70_0x42e8();}(function(_0x31c543,_0x18b2c7){const _0x153210=a70_0x3811,_0x46f071=_0x31c543();while(!![]){try{const _0x49523d=-parseInt(_0x153210(0x144))/0x1+parseInt(_0x153210(0x14a))/0x2+-parseInt(_0x153210(0x14f))/0x3+parseInt(_0x153210(0x14c))/0x4+-parseInt(_0x153210(0x146))/0x5*(-parseInt(_0x153210(0x143))/0x6)+-parseInt(_0x153210(0x149))/0x7+-parseInt(_0x153210(0x142))/0x8*(-parseInt(_0x153210(0x148))/0x9);if(_0x49523d===_0x18b2c7)break;else _0x46f071['push'](_0x46f071['shift']());}catch(_0x7c2f04){_0x46f071['push'](_0x46f071['shift']());}}}(a70_0x42e8,0xb65fb));function a70_0x3811(_0x53155b,_0x228856){_0x53155b=_0x53155b-0x141;const _0x42e823=a70_0x42e8();let _0x381138=_0x42e823[_0x53155b];return _0x381138;}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':'dataset','command':'cross-relation-list','description':a70_0x1a72ff(0x145),'risk':'read','strictFlags':!![],'requiresCookieAuth':!![],'structuredErrors':!![],'flags':[{...CROSS_RELATION_FROM_DATASET_FLAG,'required':![]},CROSS_RELATION_DBLINK_FLAG,{...CROSS_RELATION_FROM_COLUMN_FLAG,'required':![]},APPCODE_FLAG_OPTIONAL],'validate':async _0x2c0f63=>validateCrossRelation(_0x2c0f63,a70_0x1a72ff(0x14b)),async 'execute'(_0x2740da){const _0x5038dd=a70_0x1a72ff,_0x34f03d=await resolveCrossRelationQuery(_0x2740da),_0x1ddef2=await queryCrossDbRelations(_0x34f03d);return{'ok':!![],'data':{'appCode':_0x2740da['appCode'],'selector':_0x34f03d,'total':_0x1ddef2[_0x5038dd(0x147)],'relations':_0x1ddef2[_0x5038dd(0x14e)](projectCrossRelation)},'message':_0x5038dd(0x141)+_0x1ddef2[_0x5038dd(0x147)]+_0x5038dd(0x14d)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a71_0x51c616=a71_0x4c69;(function(_0x457385,_0x347b9e){const _0x21d1c8=a71_0x4c69,_0x3f1c4f=_0x457385();while(!![]){try{const _0x4eea85=-parseInt(_0x21d1c8(0x175))/0x1*(-parseInt(_0x21d1c8(0x189))/0x2)+parseInt(_0x21d1c8(0x187))/0x3+-parseInt(_0x21d1c8(0x16c))/0x4+parseInt(_0x21d1c8(0x18b))/0x5*(-parseInt(_0x21d1c8(0x16a))/0x6)+-parseInt(_0x21d1c8(0x183))/0x7*(-parseInt(_0x21d1c8(0x13f))/0x8)+-parseInt(_0x21d1c8(0x14d))/0x9+parseInt(_0x21d1c8(0x132))/0xa;if(_0x4eea85===_0x347b9e)break;else _0x3f1c4f['push'](_0x3f1c4f['shift']());}catch(_0x2cee99){_0x3f1c4f['push'](_0x3f1c4f['shift']());}}}(a71_0xa410,0xcfcef));import{getDatasetDetail,queryCrossDbRelations}from'../../core/api-client.js';import{CROSS_DB_RELATION_PATHS}from'../../core/cross-db-relation.js';import{CliError,CliErrors}from'../../errors.js';import{CROSS_RELATION_CARDINALITY_FLAG}from'../../commands/common/flags.js';function required(_0x147948,_0x4a6182){const _0x1ed7eb=a71_0x4c69,_0x298fae=_0x147948[_0x1ed7eb(0x160)](_0x4a6182)[_0x1ed7eb(0x173)]();if(!_0x298fae)throw CliErrors[_0x1ed7eb(0x177)](_0x4a6182);return _0x298fae;}function a71_0x4c69(_0x3abde8,_0x3b1b3b){_0x3abde8=_0x3abde8-0x130;const _0xa41099=a71_0xa410();let _0x4c6952=_0xa41099[_0x3abde8];return _0x4c6952;}function explicitDblink(_0x43bad7){const _0xeed2bf=a71_0x4c69,_0x39164e=_0x43bad7[_0xeed2bf(0x186)]('from-dblink-id');if(_0x39164e===undefined||_0x39164e===null)return undefined;const _0x43ef15=Number(_0x39164e);if(!Number['isSafeInteger'](_0x43ef15)||_0x43ef15<=0x0)throw CliErrors[_0xeed2bf(0x17d)](_0xeed2bf(0x165));return _0x43ef15;}export function validateCrossRelation(_0x4598df,_0x2cc546){const _0x440c81=a71_0x4c69,_0x575874=explicitDblink(_0x4598df);if(_0x2cc546===_0x440c81(0x137)){if(!_0x4598df['str']('from-datasetcode')[_0x440c81(0x173)]()&&_0x575874===undefined)throw CliErrors[_0x440c81(0x17d)](_0x440c81(0x142));return;}required(_0x4598df,'from-datasetcode'),required(_0x4598df,_0x440c81(0x163));if(_0x2cc546!==_0x440c81(0x14a)){required(_0x4598df,_0x440c81(0x161)),required(_0x4598df,'to-column');const _0x16a0aa=_0x4598df[_0x440c81(0x160)](_0x440c81(0x167))[_0x440c81(0x173)]();if(_0x16a0aa&&!CROSS_RELATION_CARDINALITY_FLAG[_0x440c81(0x169)][_0x440c81(0x155)](_0x16a0aa))throw CliErrors[_0x440c81(0x17d)](_0x440c81(0x140));}}async function resolveEndpoint(_0x3dc4ae){const _0x4999d3=a71_0x4c69,_0x86834d=await getDatasetDetail(_0x3dc4ae),_0x5811bd=_0x86834d?.[_0x4999d3(0x184)]??{};if((_0x86834d?.[_0x4999d3(0x131)]??_0x5811bd[_0x4999d3(0x145)])!=='DB_TABLE')throw CliErrors[_0x4999d3(0x17d)](_0x4999d3(0x176)+_0x3dc4ae+_0x4999d3(0x162));const _0x25002c=_0x86834d[_0x4999d3(0x157)]??_0x86834d[_0x4999d3(0x134)]??{};let _0xf2b5a1=_0x86834d[_0x4999d3(0x16d)]??_0x5811bd[_0x4999d3(0x16d)]??{};if(typeof _0xf2b5a1===_0x4999d3(0x172))try{_0xf2b5a1=_0xf2b5a1[_0x4999d3(0x173)]()?JSON[_0x4999d3(0x152)](_0xf2b5a1):{};}catch{throw CliErrors[_0x4999d3(0x17d)](_0x4999d3(0x176)+_0x3dc4ae+_0x4999d3(0x146));}const _0x26215c=Number(_0xf2b5a1?.[_0x4999d3(0x15d)]?.[_0x4999d3(0x154)]??_0x86834d[_0x4999d3(0x15d)]?.[_0x4999d3(0x154)]??_0x5811bd[_0x4999d3(0x15d)]?.['dbId']??_0x25002c['dbId']??_0x5811bd['dbId']??_0x86834d['dbId']),_0x469e9f=String(_0x86834d[_0x4999d3(0x14c)]??_0x5811bd[_0x4999d3(0x14c)]??_0x25002c[_0x4999d3(0x14c)]??'')[_0x4999d3(0x173)]();if(!Number[_0x4999d3(0x135)](_0x26215c)||_0x26215c<=0x0||!_0x469e9f)throw CliErrors[_0x4999d3(0x17d)](_0x4999d3(0x176)+_0x3dc4ae+_0x4999d3(0x171));return{'datasetCode':_0x3dc4ae,'dblinkId':_0x26215c,'table':_0x469e9f};}export async function resolveCrossRelationQuery(_0x1cbc6d){const _0x1e520b=a71_0x4c69,_0x343cc3=_0x1cbc6d['str'](_0x1e520b(0x147))[_0x1e520b(0x173)](),_0xe623c2=explicitDblink(_0x1cbc6d),_0x1c4ebb=_0x343cc3?await resolveEndpoint(_0x343cc3):undefined;if(_0x1c4ebb&&_0xe623c2!==undefined&&_0x1c4ebb[_0x1e520b(0x141)]!==_0xe623c2)throw CliErrors['validation'](_0x1e520b(0x15c));const _0x3518c1=_0x1c4ebb?.[_0x1e520b(0x141)]??_0xe623c2;if(_0x3518c1===undefined)throw CliErrors[_0x1e520b(0x17d)](_0x1e520b(0x142));return{'appCode':_0x1cbc6d[_0x1e520b(0x181)],'fromDblinkId':_0x3518c1,..._0x343cc3?{'fromDatasetCode':_0x343cc3}:{},..._0x1cbc6d[_0x1e520b(0x160)]('from-column')[_0x1e520b(0x173)]()?{'fromField':_0x1cbc6d[_0x1e520b(0x160)]('from-column')[_0x1e520b(0x173)]()}:{}};}export function projectCrossRelation(_0x260dbb){const _0x517278=a71_0x4c69;return{'relationId':_0x260dbb[_0x517278(0x159)],'from':{'source':_0x517278(0x179),'datasetCode':_0x260dbb['fromDatasetCode'],'datasetName':_0x260dbb['fromDatasetName'],'dblinkId':_0x260dbb['fromDblinkId'],'table':_0x260dbb[_0x517278(0x151)],'field':_0x260dbb[_0x517278(0x144)]},'to':{'source':'DB_TABLE','datasetCode':_0x260dbb[_0x517278(0x130)],'datasetName':_0x260dbb[_0x517278(0x16f)],'dblinkId':_0x260dbb[_0x517278(0x13d)],'table':_0x260dbb[_0x517278(0x182)],'field':_0x260dbb['toField'],'labelField':_0x260dbb[_0x517278(0x185)]},'relation':{'cardinality':_0x260dbb[_0x517278(0x167)],'relationType':_0x260dbb['relationType']}};}function ambiguity(_0x2682d2){const _0x501001=a71_0x4c69,_0x5c0f17=CliErrors['validation']('Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.',_0x501001(0x13b));return Object[_0x501001(0x16b)](_0x5c0f17,_0x501001(0x15b),{'value':{'candidates':_0x2682d2[_0x501001(0x16e)](projectCrossRelation)}}),_0x5c0f17;}const sameName=(_0x2cfbce,_0x4ea86a)=>_0x2cfbce[a71_0x51c616(0x15a)]()===_0x4ea86a[a71_0x51c616(0x15a)]();function matchesEndpoint(_0xa96c22,_0xb11e56,_0x443146,_0x5d34f7,_0x475926){const _0x1ef794=a71_0x51c616;return _0xa96c22[_0x1ef794(0x138)]===_0xb11e56[_0x1ef794(0x141)]&&sameName(_0xa96c22['fromTableName'],_0xb11e56[_0x1ef794(0x17b)])&&sameName(_0xa96c22[_0x1ef794(0x144)],_0x443146)&&_0xa96c22[_0x1ef794(0x13d)]===_0x5d34f7[_0x1ef794(0x141)]&&sameName(_0xa96c22[_0x1ef794(0x182)],_0x5d34f7[_0x1ef794(0x17b)])&&sameName(_0xa96c22[_0x1ef794(0x17e)],_0x475926);}export async function prepareCrossRelation(_0x1de0d2,_0x2d6189){const _0x2a044c=a71_0x51c616,_0x47aeab=await resolveEndpoint(required(_0x1de0d2,'from-datasetcode')),_0x19f696=explicitDblink(_0x1de0d2);if(_0x19f696!==undefined&&_0x47aeab[_0x2a044c(0x141)]!==_0x19f696)throw CliErrors[_0x2a044c(0x17d)](_0x2a044c(0x15c));const _0xa53191={'appCode':_0x1de0d2[_0x2a044c(0x181)],'fromDatasetCode':_0x47aeab[_0x2a044c(0x13a)],'fromField':required(_0x1de0d2,_0x2a044c(0x163)),..._0x19f696!==undefined?{'fromDblinkId':_0x19f696}:{}},_0x3b1cd3={'appCode':_0x1de0d2[_0x2a044c(0x181)],'fromDblinkId':_0x47aeab[_0x2a044c(0x141)],'fromDatasetCode':_0x47aeab[_0x2a044c(0x13a)],'fromField':_0xa53191[_0x2a044c(0x144)]},_0x135d4c=await queryCrossDbRelations(_0x3b1cd3);let _0x2c3548=null;if(_0x2d6189!=='create'){if(_0x135d4c[_0x2a044c(0x15f)]>0x1)throw ambiguity(_0x135d4c);_0x2c3548=_0x135d4c[0x0]??null;if(!_0x2c3548)throw CliErrors[_0x2a044c(0x17d)](_0x2a044c(0x178));}if(_0x2d6189===_0x2a044c(0x14a))return{'operation':_0x2d6189,'from':_0x47aeab,'query':_0x3b1cd3,'body':_0xa53191,'before':_0x2c3548};const _0x3b2f12=await resolveEndpoint(required(_0x1de0d2,'to-datasetcode'));if(_0x47aeab['dblinkId']===_0x3b2f12[_0x2a044c(0x141)])throw CliErrors['validation'](_0x2a044c(0x188));const _0x58b171=_0x1de0d2['str'](_0x2a044c(0x143))['trim'](),_0x2173a9=_0x1de0d2[_0x2a044c(0x160)]('cardinality')[_0x2a044c(0x173)](),_0x49ffda={..._0xa53191,'toDatasetCode':_0x3b2f12[_0x2a044c(0x13a)],'toField':required(_0x1de0d2,_0x2a044c(0x156)),..._0x58b171?{'refTableLabelName':_0x58b171}:{},..._0x2173a9?{'cardinality':_0x2173a9}:{}};if(_0x135d4c[_0x2a044c(0x158)](_0xef2c3a=>_0xef2c3a[_0x2a044c(0x159)]!==_0x2c3548?.['relationId']&&matchesEndpoint(_0xef2c3a,_0x47aeab,_0x49ffda[_0x2a044c(0x144)],_0x3b2f12,_0x49ffda['toField'])))throw CliErrors[_0x2a044c(0x17d)]('Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.');return{'operation':_0x2d6189,'from':_0x47aeab,'to':_0x3b2f12,'query':_0x3b1cd3,'body':_0x49ffda,'before':_0x2c3548,'expectedLabel':_0x58b171||_0x2c3548?.[_0x2a044c(0x185)]||_0x49ffda[_0x2a044c(0x17e)],'expectedCardinality':_0x2173a9||_0x2c3548?.[_0x2a044c(0x167)]||null};}function mutationData(_0x17a107,_0x59918b,_0xb3088e){const _0x5a3fa8=a71_0x51c616,{operation:_0x2b5109,body:_0x396b13,before:_0x16de82}=_0x17a107;return{'operation':_0x2b5109,'selector':{'appCode':_0x396b13[_0x5a3fa8(0x181)],'from':{'datasetCode':_0x396b13['fromDatasetCode'],'field':_0x396b13[_0x5a3fa8(0x144)],'dblinkId':_0x17a107[_0x5a3fa8(0x18d)][_0x5a3fa8(0x141)]}},'before':_0x16de82?projectCrossRelation(_0x16de82):null,'after':_0xb3088e,'dryRun':_0x59918b,'backend':{'method':_0x5a3fa8(0x149),'path':CROSS_DB_RELATION_PATHS[_0x2b5109]},'warnings':_0x2b5109===_0x5a3fa8(0x17f)&&!_0x396b13['refTableLabelName']?[{'code':_0x5a3fa8(0x13c),'message':_0x5a3fa8(0x133)}]:[]};}export async function previewCrossRelation(_0x1f8482,_0x5d64cf){const _0x32acb7=a71_0x51c616,_0x7b39ed=await prepareCrossRelation(_0x1f8482,_0x5d64cf),_0x448d96=_0x7b39ed[_0x32acb7(0x18a)],_0x39fdea=_0x5d64cf===_0x32acb7(0x14a)?null:{..._0x7b39ed[_0x32acb7(0x164)]?{'relationId':_0x7b39ed['before'][_0x32acb7(0x159)]}:{},'from':{'datasetCode':_0x7b39ed[_0x32acb7(0x18d)]['datasetCode'],'dblinkId':_0x7b39ed[_0x32acb7(0x18d)][_0x32acb7(0x141)],'table':_0x7b39ed[_0x32acb7(0x18d)][_0x32acb7(0x17b)],'field':_0x448d96[_0x32acb7(0x144)]},'to':{'datasetCode':_0x7b39ed['to']['datasetCode'],'dblinkId':_0x7b39ed['to']['dblinkId'],'table':_0x7b39ed['to']['table'],'field':_0x448d96['toField'],'labelField':_0x7b39ed['expectedLabel']},'relation':{'cardinality':_0x7b39ed[_0x32acb7(0x174)],'relationType':0x2}};return{...mutationData(_0x7b39ed,!![],null),'after':_0x39fdea,'method':'POST','url':CROSS_DB_RELATION_PATHS[_0x5d64cf],'body':_0x7b39ed['body'],'description':_0x32acb7(0x168)+_0x5d64cf+_0x32acb7(0x17a)+_0x448d96[_0x32acb7(0x18c)]+'.'+_0x448d96[_0x32acb7(0x144)]};}export async function executeCrossRelation(_0x494580,_0x3f1ba1,_0x4adb68){const _0xfbd9ad=a71_0x51c616,_0x59d0e7=await prepareCrossRelation(_0x494580,_0x3f1ba1);try{await _0x4adb68(_0x59d0e7[_0xfbd9ad(0x18a)]);}catch(_0x4b332a){if(_0x4b332a instanceof CliError&&_0x4b332a[_0xfbd9ad(0x139)]['includes'](_0xfbd9ad(0x170))){const _0x3c15b8=await queryCrossDbRelations(_0x59d0e7[_0xfbd9ad(0x13e)])['catch'](()=>[]);throw ambiguity(_0x3c15b8);}throw _0x4b332a;}let _0x15520d=[],_0x41af17,_0x4e3f6f=![];try{_0x15520d=await queryCrossDbRelations(_0x59d0e7[_0xfbd9ad(0x13e)]);if(_0x3f1ba1===_0xfbd9ad(0x14a))_0x4e3f6f=!_0x15520d[_0xfbd9ad(0x158)](_0x2214cf=>_0x2214cf[_0xfbd9ad(0x159)]===_0x59d0e7[_0xfbd9ad(0x164)]['relationId']);else{const _0x21e28f=_0x59d0e7[_0xfbd9ad(0x18a)],_0x59ab1f=_0x15520d[_0xfbd9ad(0x180)](_0x2cba58=>matchesEndpoint(_0x2cba58,_0x59d0e7[_0xfbd9ad(0x18d)],_0x21e28f['fromField'],_0x59d0e7['to'],_0x21e28f[_0xfbd9ad(0x17e)])&&(_0x3f1ba1===_0xfbd9ad(0x15e)||_0x2cba58[_0xfbd9ad(0x159)]===_0x59d0e7['before']['relationId']));_0x41af17=_0x59ab1f[_0xfbd9ad(0x15f)]===0x1?_0x59ab1f[0x0]:undefined,_0x4e3f6f=!!_0x41af17&&_0x41af17[_0xfbd9ad(0x185)]===_0x59d0e7[_0xfbd9ad(0x14e)]&&_0x41af17['cardinality']===_0x59d0e7[_0xfbd9ad(0x174)]&&_0x41af17[_0xfbd9ad(0x148)]===0x2;}}catch{}const _0x5edc00={...mutationData(_0x59d0e7,![],_0x41af17?projectCrossRelation(_0x41af17):null),'verification':{'status':_0x4e3f6f?_0xfbd9ad(0x17c):_0xfbd9ad(0x150),'verified':_0x4e3f6f}};if(!_0x4e3f6f){const _0x19f5fd=CliErrors[_0xfbd9ad(0x14f)](_0xfbd9ad(0x153)+_0x3f1ba1+_0xfbd9ad(0x14b),_0xfbd9ad(0x136));Object[_0xfbd9ad(0x16b)](_0x19f5fd,_0xfbd9ad(0x15b),{'value':{..._0x5edc00,'candidates':_0x15520d[_0xfbd9ad(0x16e)](projectCrossRelation)}});throw _0x19f5fd;}return{'ok':!![],'data':_0x5edc00,'message':'Cross-database\x20relation\x20'+_0x3f1ba1+_0xfbd9ad(0x166)};}function a71_0xa410(){const _0x12bd27=['7296138QtOPjT','expectedLabel','apiError','unconfirmed','fromTableName','parse','Cross-database\x20relation\x20','dbId','includes','to-column','dbtableConfig','some','relationId','toLowerCase','data','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','storageProfile','create','length','str','to-datasetcode','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','from-column','before','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20verified.','cardinality','Would\x20','enum','7162026goLeJr','defineProperty','5621980wjRhEH','extend','map','toDatasetName','multiple\x20cross-database\x20relations\x20matched','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','string','trim','expectedCardinality','16593FPOKkl','Dataset\x20','flagMissing','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','DB_TABLE','\x20a\x20cross-database\x20relation\x20for\x20','table','matched','validation','toField','update','filter','appCode','toTableName','161fVJXWo','dataset','refTableLabelName','flag','1416015zZbwTf','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','38gXtgMe','body','5NBUHTX','fromDatasetCode','from','toDatasetCode','source','18229800gBfEXw','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','dbtable','isSafeInteger','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','list','fromDblinkId','message','datasetCode','Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.','label_inherited','toDblinkId','query','574184rVWCpp','Invalid\x20--cardinality.','dblinkId','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','to-label-column','fromField','sourceType','\x20has\x20invalid\x20storage\x20configuration.','from-datasetcode','relationType','POST','delete','\x20write\x20was\x20not\x20verified.','tableName'];a71_0xa410=function(){return _0x12bd27;};return a71_0xa410();}
|
|
1
|
+
function a71_0x5d49(_0x53200c,_0x3fa375){_0x53200c=_0x53200c-0xa7;const _0x3886a1=a71_0x3886();let _0x5d4955=_0x3886a1[_0x53200c];return _0x5d4955;}const a71_0x11fe7b=a71_0x5d49;(function(_0x586ebe,_0x3b63b8){const _0x18ace9=a71_0x5d49,_0x5b011d=_0x586ebe();while(!![]){try{const _0x540f96=parseInt(_0x18ace9(0xd7))/0x1*(parseInt(_0x18ace9(0xab))/0x2)+-parseInt(_0x18ace9(0xe0))/0x3*(parseInt(_0x18ace9(0xdd))/0x4)+parseInt(_0x18ace9(0xf3))/0x5+parseInt(_0x18ace9(0xaf))/0x6*(-parseInt(_0x18ace9(0xe9))/0x7)+-parseInt(_0x18ace9(0xb6))/0x8*(parseInt(_0x18ace9(0xb1))/0x9)+-parseInt(_0x18ace9(0xe4))/0xa*(parseInt(_0x18ace9(0xcb))/0xb)+parseInt(_0x18ace9(0xdc))/0xc;if(_0x540f96===_0x3b63b8)break;else _0x5b011d['push'](_0x5b011d['shift']());}catch(_0x50bd78){_0x5b011d['push'](_0x5b011d['shift']());}}}(a71_0x3886,0x7d2a2));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(_0x484020,_0x4ae762){const _0x396068=a71_0x5d49,_0x29d667=_0x484020['str'](_0x4ae762)['trim']();if(!_0x29d667)throw CliErrors[_0x396068(0xcf)](_0x4ae762);return _0x29d667;}function explicitDblink(_0x484152){const _0x53375d=a71_0x5d49,_0x3e5b5a=_0x484152['flag'](_0x53375d(0xed));if(_0x3e5b5a===undefined||_0x3e5b5a===null)return undefined;const _0x3f69ab=Number(_0x3e5b5a);if(!Number['isSafeInteger'](_0x3f69ab)||_0x3f69ab<=0x0)throw CliErrors[_0x53375d(0xd9)](_0x53375d(0xcc));return _0x3f69ab;}export function validateCrossRelation(_0x1b6e5c,_0x32e056){const _0x243946=a71_0x5d49,_0xff5ae2=explicitDblink(_0x1b6e5c);if(_0x32e056===_0x243946(0xf8)){if(!_0x1b6e5c[_0x243946(0xd5)]('from-datasetcode')[_0x243946(0xa9)]()&&_0xff5ae2===undefined)throw CliErrors['validation'](_0x243946(0xee));return;}required(_0x1b6e5c,_0x243946(0xba)),required(_0x1b6e5c,_0x243946(0xc7));if(_0x32e056!==_0x243946(0xb0)){required(_0x1b6e5c,'to-datasetcode'),required(_0x1b6e5c,_0x243946(0xfc));const _0x18f00a=_0x1b6e5c[_0x243946(0xd5)]('cardinality')[_0x243946(0xa9)]();if(_0x18f00a&&!CROSS_RELATION_CARDINALITY_FLAG['enum'][_0x243946(0xae)](_0x18f00a))throw CliErrors[_0x243946(0xd9)](_0x243946(0xbd));}}async function resolveEndpoint(_0x4ba511){const _0x39055e=a71_0x5d49,_0x24332e=await getDatasetDetail(_0x4ba511),_0x217208=_0x24332e?.[_0x39055e(0xf9)]??{};if((_0x24332e?.[_0x39055e(0xb4)]??_0x217208['sourceType'])!=='DB_TABLE')throw CliErrors[_0x39055e(0xd9)](_0x39055e(0xdf)+_0x4ba511+_0x39055e(0xf1));const _0x2a2e60=_0x24332e['dbtableConfig']??_0x24332e[_0x39055e(0xbf)]??{};let _0xc0f1f9=_0x24332e[_0x39055e(0xf0)]??_0x217208[_0x39055e(0xf0)]??{};if(typeof _0xc0f1f9===_0x39055e(0xc4))try{_0xc0f1f9=_0xc0f1f9[_0x39055e(0xa9)]()?JSON['parse'](_0xc0f1f9):{};}catch{throw CliErrors['validation'](_0x39055e(0xdf)+_0x4ba511+_0x39055e(0xad));}const _0x431a43=Number(_0xc0f1f9?.[_0x39055e(0xc2)]?.['dbId']??_0x24332e[_0x39055e(0xc2)]?.[_0x39055e(0xa8)]??_0x217208[_0x39055e(0xc2)]?.[_0x39055e(0xa8)]??_0x2a2e60[_0x39055e(0xa8)]??_0x217208[_0x39055e(0xa8)]??_0x24332e[_0x39055e(0xa8)]),_0x40528c=String(_0x24332e['tableName']??_0x217208[_0x39055e(0xfd)]??_0x2a2e60['tableName']??'')[_0x39055e(0xa9)]();if(!Number[_0x39055e(0xe6)](_0x431a43)||_0x431a43<=0x0||!_0x40528c)throw CliErrors[_0x39055e(0xd9)](_0x39055e(0xdf)+_0x4ba511+_0x39055e(0xc8));return{'datasetCode':_0x4ba511,'dblinkId':_0x431a43,'table':_0x40528c};}export async function resolveCrossRelationQuery(_0x4bd3d5){const _0x528774=a71_0x5d49,_0x12816d=_0x4bd3d5[_0x528774(0xd5)](_0x528774(0xba))[_0x528774(0xa9)](),_0x2a7f4f=explicitDblink(_0x4bd3d5),_0x55fd4a=_0x12816d?await resolveEndpoint(_0x12816d):undefined;if(_0x55fd4a&&_0x2a7f4f!==undefined&&_0x55fd4a[_0x528774(0xfa)]!==_0x2a7f4f)throw CliErrors[_0x528774(0xd9)]('--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.');const _0x173393=_0x55fd4a?.['dblinkId']??_0x2a7f4f;if(_0x173393===undefined)throw CliErrors[_0x528774(0xd9)]('Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.');return{'appCode':_0x4bd3d5[_0x528774(0xb5)],'fromDblinkId':_0x173393,..._0x12816d?{'fromDatasetCode':_0x12816d}:{},..._0x4bd3d5[_0x528774(0xd5)](_0x528774(0xc7))['trim']()?{'fromField':_0x4bd3d5[_0x528774(0xd5)](_0x528774(0xc7))[_0x528774(0xa9)]()}:{}};}export function projectCrossRelation(_0x1af32d){const _0x35bbb9=a71_0x5d49;return{'relationId':_0x1af32d[_0x35bbb9(0xf5)],'from':{'source':_0x35bbb9(0xb3),'datasetCode':_0x1af32d[_0x35bbb9(0xce)],'datasetName':_0x1af32d[_0x35bbb9(0xc6)],'dblinkId':_0x1af32d[_0x35bbb9(0xd1)],'table':_0x1af32d[_0x35bbb9(0xc3)],'field':_0x1af32d[_0x35bbb9(0xcd)]},'to':{'source':'DB_TABLE','datasetCode':_0x1af32d['toDatasetCode'],'datasetName':_0x1af32d[_0x35bbb9(0xda)],'dblinkId':_0x1af32d[_0x35bbb9(0xd8)],'table':_0x1af32d[_0x35bbb9(0xb7)],'field':_0x1af32d[_0x35bbb9(0xbc)],'labelField':_0x1af32d[_0x35bbb9(0xd0)]},'relation':{'cardinality':_0x1af32d[_0x35bbb9(0xb9)],'relationType':_0x1af32d[_0x35bbb9(0xd6)]}};}function ambiguity(_0x41c3f1){const _0x43edb9=a71_0x5d49,_0x31bbe8=CliErrors['validation'](_0x43edb9(0xfb),'Run\x20dataset\x20cross-relation-list\x20to\x20inspect\x20the\x20candidates.\x20This\x20command\x20accepts\x20only\x20a\x20source\x20dataset\x20and\x20field.');return Object[_0x43edb9(0xc9)](_0x31bbe8,_0x43edb9(0xd4),{'value':{'candidates':_0x41c3f1['map'](projectCrossRelation)}}),_0x31bbe8;}const sameName=(_0x1303c0,_0x36f28c)=>_0x1303c0[a71_0x11fe7b(0xa7)]()===_0x36f28c['toLowerCase']();function matchesEndpoint(_0x18d3b7,_0x19729b,_0x1573ec,_0x11e39e,_0x496fa2){const _0x47e95e=a71_0x11fe7b;return _0x18d3b7[_0x47e95e(0xd1)]===_0x19729b[_0x47e95e(0xfa)]&&sameName(_0x18d3b7[_0x47e95e(0xc3)],_0x19729b[_0x47e95e(0xc0)])&&sameName(_0x18d3b7['fromField'],_0x1573ec)&&_0x18d3b7[_0x47e95e(0xd8)]===_0x11e39e[_0x47e95e(0xfa)]&&sameName(_0x18d3b7[_0x47e95e(0xb7)],_0x11e39e['table'])&&sameName(_0x18d3b7[_0x47e95e(0xbc)],_0x496fa2);}export async function prepareCrossRelation(_0x44b8dd,_0x5bfb1c){const _0x15bee2=a71_0x11fe7b,_0x5b0fae=await resolveEndpoint(required(_0x44b8dd,_0x15bee2(0xba))),_0x141eb4=explicitDblink(_0x44b8dd);if(_0x141eb4!==undefined&&_0x5b0fae[_0x15bee2(0xfa)]!==_0x141eb4)throw CliErrors[_0x15bee2(0xd9)](_0x15bee2(0xac));const _0x26d4f9={'appCode':_0x44b8dd[_0x15bee2(0xb5)],'fromDatasetCode':_0x5b0fae[_0x15bee2(0xc5)],'fromField':required(_0x44b8dd,_0x15bee2(0xc7)),..._0x141eb4!==undefined?{'fromDblinkId':_0x141eb4}:{}},_0x34eba7={'appCode':_0x44b8dd[_0x15bee2(0xb5)],'fromDblinkId':_0x5b0fae['dblinkId'],'fromDatasetCode':_0x5b0fae[_0x15bee2(0xc5)],'fromField':_0x26d4f9[_0x15bee2(0xcd)]},_0x51aadf=await queryCrossDbRelations(_0x34eba7);let _0x4d5576=null;if(_0x5bfb1c!==_0x15bee2(0xea)){if(_0x51aadf[_0x15bee2(0xd2)]>0x1)throw ambiguity(_0x51aadf);_0x4d5576=_0x51aadf[0x0]??null;if(!_0x4d5576)throw CliErrors[_0x15bee2(0xd9)](_0x15bee2(0xe3));}if(_0x5bfb1c==='delete')return{'operation':_0x5bfb1c,'from':_0x5b0fae,'query':_0x34eba7,'body':_0x26d4f9,'before':_0x4d5576};const _0x37396b=await resolveEndpoint(required(_0x44b8dd,'to-datasetcode'));if(_0x5b0fae[_0x15bee2(0xfa)]===_0x37396b[_0x15bee2(0xfa)])throw CliErrors[_0x15bee2(0xd9)](_0x15bee2(0xd3));const _0x431456=_0x44b8dd['str'](_0x15bee2(0xe5))[_0x15bee2(0xa9)](),_0x57c531=_0x44b8dd['str']('cardinality')[_0x15bee2(0xa9)](),_0x6d0bba={..._0x26d4f9,'toDatasetCode':_0x37396b[_0x15bee2(0xc5)],'toField':required(_0x44b8dd,_0x15bee2(0xfc)),..._0x431456?{'refTableLabelName':_0x431456}:{},..._0x57c531?{'cardinality':_0x57c531}:{}};if(_0x51aadf[_0x15bee2(0xdb)](_0xff4aa8=>_0xff4aa8[_0x15bee2(0xf5)]!==_0x4d5576?.['relationId']&&matchesEndpoint(_0xff4aa8,_0x5b0fae,_0x6d0bba[_0x15bee2(0xcd)],_0x37396b,_0x6d0bba[_0x15bee2(0xbc)])))throw CliErrors[_0x15bee2(0xd9)](_0x15bee2(0xaa));return{'operation':_0x5bfb1c,'from':_0x5b0fae,'to':_0x37396b,'query':_0x34eba7,'body':_0x6d0bba,'before':_0x4d5576,'expectedLabel':_0x431456||_0x4d5576?.['refTableLabelName']||_0x6d0bba[_0x15bee2(0xbc)],'expectedCardinality':_0x57c531||_0x4d5576?.[_0x15bee2(0xb9)]||null};}function mutationData(_0x563865,_0x18cd2c,_0x35b83){const _0x4e2e74=a71_0x11fe7b,{operation:_0x31be11,body:_0x1eec53,before:_0x112beb}=_0x563865;return{'operation':_0x31be11,'selector':{'appCode':_0x1eec53['appCode'],'from':{'datasetCode':_0x1eec53[_0x4e2e74(0xce)],'field':_0x1eec53['fromField'],'dblinkId':_0x563865['from'][_0x4e2e74(0xfa)]}},'before':_0x112beb?projectCrossRelation(_0x112beb):null,'after':_0x35b83,'dryRun':_0x18cd2c,'backend':{'method':_0x4e2e74(0xe8),'path':CROSS_DB_RELATION_PATHS[_0x31be11]},'warnings':_0x31be11==='update'&&!_0x1eec53['refTableLabelName']?[{'code':'label_inherited','message':_0x4e2e74(0xeb)}]:[]};}function a71_0x3886(){const _0x46a859=['2263026ALxkxb','delete','697743TLKsyU','query','DB_TABLE','source','appCode','40nJPDLW','toTableName','expectedCardinality','cardinality','from-datasetcode','matched','toField','Invalid\x20--cardinality.','filter','dbtable','table','expectedLabel','storageProfile','fromTableName','string','datasetCode','fromDatasetName','from-column','\x20is\x20missing\x20its\x20database\x20connection\x20or\x20physical\x20table\x20name.','defineProperty','multiple\x20cross-database\x20relations\x20matched','245443fbsInr','--from-dblink-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','fromField','fromDatasetCode','flagMissing','refTableLabelName','fromDblinkId','length','Cross-database\x20relations\x20require\x20different\x20source\x20and\x20target\x20database\x20connections.','data','str','relationType','154034nnMRRk','toDblinkId','validation','toDatasetName','some','17573808KfMeYc','3882108qQvgTo','apiError','Dataset\x20','3QwNLUo','before','body','Cross-database\x20relation\x20not\x20found\x20for\x20this\x20source\x20dataset\x20and\x20field.','130LGlqWT','to-label-column','isSafeInteger','Would\x20','POST','7taNIDs','create','The\x20target\x20display\x20field\x20is\x20inherited.\x20When\x20changing\x20the\x20target\x20dataset,\x20provide\x20--to-label-column\x20explicitly.','catch','from-dblink-id','Provide\x20--from-datasetcode\x20or\x20--from-dblink-id.','\x20write\x20was\x20not\x20verified.','extend','\x20must\x20be\x20a\x20DB_TABLE\x20dataset.','message','4597790KBcexk','\x20a\x20cross-database\x20relation\x20for\x20','relationId','from','unconfirmed','list','dataset','dblinkId','Multiple\x20cross-database\x20relations\x20match\x20this\x20source\x20field;\x20update/delete\x20cannot\x20select\x20one\x20target.','to-column','tableName','map','The\x20write\x20was\x20accepted,\x20but\x20current\x20state\x20could\x20not\x20be\x20confirmed.\x20Run\x20dataset\x20cross-relation-list\x20before\x20attempting\x20another\x20write.','toLowerCase','dbId','trim','Cross-database\x20relation\x20already\x20exists\x20for\x20these\x20source\x20and\x20target\x20endpoints.','2bothSo','--from-dblink-id\x20does\x20not\x20match\x20the\x20source\x20dataset\x20connection.','\x20has\x20invalid\x20storage\x20configuration.','includes'];a71_0x3886=function(){return _0x46a859;};return a71_0x3886();}export async function previewCrossRelation(_0x5ce629,_0x3803f8){const _0x55dadb=a71_0x11fe7b,_0x335169=await prepareCrossRelation(_0x5ce629,_0x3803f8),_0x3b6635=_0x335169[_0x55dadb(0xe2)],_0xb96408=_0x3803f8===_0x55dadb(0xb0)?null:{..._0x335169['before']?{'relationId':_0x335169['before'][_0x55dadb(0xf5)]}:{},'from':{'datasetCode':_0x335169[_0x55dadb(0xf6)][_0x55dadb(0xc5)],'dblinkId':_0x335169[_0x55dadb(0xf6)]['dblinkId'],'table':_0x335169[_0x55dadb(0xf6)][_0x55dadb(0xc0)],'field':_0x3b6635[_0x55dadb(0xcd)]},'to':{'datasetCode':_0x335169['to']['datasetCode'],'dblinkId':_0x335169['to'][_0x55dadb(0xfa)],'table':_0x335169['to'][_0x55dadb(0xc0)],'field':_0x3b6635[_0x55dadb(0xbc)],'labelField':_0x335169[_0x55dadb(0xc1)]},'relation':{'cardinality':_0x335169[_0x55dadb(0xb8)],'relationType':0x2}};return{...mutationData(_0x335169,!![],null),'after':_0xb96408,'method':'POST','url':CROSS_DB_RELATION_PATHS[_0x3803f8],'body':_0x335169[_0x55dadb(0xe2)],'description':_0x55dadb(0xe7)+_0x3803f8+_0x55dadb(0xf4)+_0x3b6635[_0x55dadb(0xce)]+'.'+_0x3b6635['fromField']};}export async function executeCrossRelation(_0x171a52,_0x4f764f,_0xe89347){const _0x14dae4=a71_0x11fe7b,_0x7d558b=await prepareCrossRelation(_0x171a52,_0x4f764f);try{await _0xe89347(_0x7d558b[_0x14dae4(0xe2)]);}catch(_0x3b41c1){if(_0x3b41c1 instanceof CliError&&_0x3b41c1[_0x14dae4(0xf2)][_0x14dae4(0xae)](_0x14dae4(0xca))){const _0x2db47b=await queryCrossDbRelations(_0x7d558b[_0x14dae4(0xb2)])[_0x14dae4(0xec)](()=>[]);throw ambiguity(_0x2db47b);}throw _0x3b41c1;}let _0xb901a3=[],_0x19fe78,_0x255260=![];try{_0xb901a3=await queryCrossDbRelations(_0x7d558b[_0x14dae4(0xb2)]);if(_0x4f764f===_0x14dae4(0xb0))_0x255260=!_0xb901a3[_0x14dae4(0xdb)](_0x1d89da=>_0x1d89da[_0x14dae4(0xf5)]===_0x7d558b[_0x14dae4(0xe1)][_0x14dae4(0xf5)]);else{const _0x388302=_0x7d558b[_0x14dae4(0xe2)],_0x354707=_0xb901a3[_0x14dae4(0xbe)](_0x24bfca=>matchesEndpoint(_0x24bfca,_0x7d558b['from'],_0x388302['fromField'],_0x7d558b['to'],_0x388302['toField'])&&(_0x4f764f==='create'||_0x24bfca[_0x14dae4(0xf5)]===_0x7d558b['before']['relationId']));_0x19fe78=_0x354707[_0x14dae4(0xd2)]===0x1?_0x354707[0x0]:undefined,_0x255260=!!_0x19fe78&&_0x19fe78[_0x14dae4(0xd0)]===_0x7d558b['expectedLabel']&&_0x19fe78[_0x14dae4(0xb9)]===_0x7d558b[_0x14dae4(0xb8)]&&_0x19fe78[_0x14dae4(0xd6)]===0x2;}}catch{}const _0x2ac470={...mutationData(_0x7d558b,![],_0x19fe78?projectCrossRelation(_0x19fe78):null),'verification':{'status':_0x255260?_0x14dae4(0xbb):_0x14dae4(0xf7),'verified':_0x255260}};if(!_0x255260){const _0x3e717b=CliErrors[_0x14dae4(0xde)]('Cross-database\x20relation\x20'+_0x4f764f+_0x14dae4(0xef),_0x14dae4(0xff));Object['defineProperty'](_0x3e717b,_0x14dae4(0xd4),{'value':{..._0x2ac470,'candidates':_0xb901a3[_0x14dae4(0xfe)](projectCrossRelation)}});throw _0x3e717b;}return{'ok':!![],'data':_0x2ac470,'message':'Cross-database\x20relation\x20'+_0x4f764f+'\x20verified.'};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x3246ba=a72_0x2287;(function(_0x38602b,_0x1a2b4f){const _0x29f904=a72_0x2287,_0x259e61=_0x38602b();while(!![]){try{const _0x66e577=-parseInt(_0x29f904(0x108))/0x1+-parseInt(_0x29f904(0x103))/0x2*(-parseInt(_0x29f904(0x106))/0x3)+parseInt(_0x29f904(0x104))/0x4+parseInt(_0x29f904(0x109))/0x5*(parseInt(_0x29f904(0x102))/0x6)+-parseInt(_0x29f904(0xff))/0x7*(parseInt(_0x29f904(0x10a))/0x8)+parseInt(_0x29f904(0xfe))/0x9+parseInt(_0x29f904(0x101))/0xa*(-parseInt(_0x29f904(0x105))/0xb);if(_0x66e577===_0x1a2b4f)break;else _0x259e61['push'](_0x259e61['shift']());}catch(_0x2d1ae3){_0x259e61['push'](_0x259e61['shift']());}}}(a72_0x4071,0xe45d5));function a72_0x2287(_0x1861b0,_0xf5ed77){_0x1861b0=_0x1861b0-0xfd;const _0x407181=a72_0x4071();let _0x2287ed=_0x407181[_0x1861b0];return _0x2287ed;}import{updateCrossDbRelation}from'../../core/api-client.js';function a72_0x4071(){const _0x2c2712=['write','496733uHhuha','10870vzcoXo','6553488GduNpm','dataset','12373452YAnKHs','7dTlXQs','update','190ZtDKJi','3906URaMiV','5222wHWLjp','4859032OoyWNl','1486848uBlqej','936wbKXBL'];a72_0x4071=function(){return _0x2c2712;};return a72_0x4071();}import{CROSS_RELATION_FROM_DATASET_FLAG,CROSS_RELATION_FROM_COLUMN_FLAG,CROSS_RELATION_TO_DATASET_FLAG,CROSS_RELATION_TO_COLUMN_FLAG,CROSS_RELATION_LABEL_FLAG,CROSS_RELATION_CARDINALITY_FLAG,CROSS_RELATION_DBLINK_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{executeCrossRelation,previewCrossRelation,validateCrossRelation}from'../../commands/dataset/cross-relation-shared.js';export const datasetCrossRelationUpdate={'service':a72_0x3246ba(0xfd),'command':'cross-relation-update','description':'Update\x20the\x20target\x20or\x20properties\x20of\x20the\x20single\x20cross-database\x20relation\x20matching\x20a\x20source\x20dataset\x20and\x20field','risk':a72_0x3246ba(0x107),'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 _0x3a9c75=>validateCrossRelation(_0x3a9c75,'update'),'dryRun':_0x45cc3c=>previewCrossRelation(_0x45cc3c,a72_0x3246ba(0x100)),'execute':_0x162095=>executeCrossRelation(_0x162095,a72_0x3246ba(0x100),updateCrossDbRelation)};
|