@lovrabet/rabetbase-cli 2.5.3-beta.1 → 2.5.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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/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.d.ts +7 -0
- package/lib/commands/bff/logs.js +1 -0
- 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.d.ts +21 -0
- package/lib/commands/dataset/batch-design.js +1 -0
- 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/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.d.ts +2 -0
- package/lib/commands/flow/create.js +1 -0
- package/lib/commands/flow/detail.d.ts +2 -0
- package/lib/commands/flow/detail.js +1 -0
- package/lib/commands/flow/index.d.ts +3 -0
- package/lib/commands/flow/index.js +1 -0
- package/lib/commands/flow/list.d.ts +2 -0
- package/lib/commands/flow/list.js +1 -0
- package/lib/commands/flow/publish.d.ts +2 -0
- package/lib/commands/flow/publish.js +1 -0
- package/lib/commands/flow/runtime-resources-shared.d.ts +40 -0
- package/lib/commands/flow/runtime-resources-shared.js +1 -0
- package/lib/commands/flow/runtime-role-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-list.js +1 -0
- package/lib/commands/flow/runtime-role-user-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-user-list.js +1 -0
- package/lib/commands/flow/runtime-user-search.d.ts +2 -0
- package/lib/commands/flow/runtime-user-search.js +1 -0
- package/lib/commands/flow/shared.d.ts +41 -0
- package/lib/commands/flow/shared.js +1 -0
- package/lib/commands/flow/update.d.ts +2 -0
- package/lib/commands/flow/update.js +1 -0
- package/lib/commands/flow/validate.d.ts +3 -0
- package/lib/commands/flow/validate.js +1 -0
- 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/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +170 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.d.ts +55 -0
- package/lib/core/bff/hook-directory.js +1 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +15 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +628 -0
- package/lib/core/flow-config.js +1 -0
- 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 +22 -4
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +137 -0
- package/skills/rabetbase/guides/backend-function.md +19 -9
- package/skills/rabetbase/guides/bff-creation-workflow.md +10 -1
- package/skills/rabetbase/guides/conflict-detection.md +2 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +1 -0
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
- package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
- package/skills/rabetbase/references/rabetbase-bff-pull.md +7 -3
- package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -2
- package/skills/rabetbase/references/rabetbase-flow-commands.md +86 -0
- package/skills/rabetbase/references/rabetbase-flow-resources.md +83 -0
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +25 -0
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +103 -11
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +17 -0
- package/skills/rabetbase.manifest.json +9 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a47_0x437b4=a47_0x597b;function a47_0x597b(_0x1bdf1f,_0xe9936d){_0x1bdf1f=_0x1bdf1f-0x1d1;const _0x49e266=a47_0x49e2();let _0x597b11=_0x49e266[_0x1bdf1f];return _0x597b11;}function a47_0x49e2(){const _0x5292d8=['errorMessage','26101746RxxbIZ','status','10sHYkyX','8536212suZGzU','apiError','2780073ykSjcN','159FFgidJ','toUpperCase','trim','PENDING','3656996FaRGBu','\x20is\x20processing.','\x20response\x20did\x20not\x20contain\x20a\x20status.','string','FAILED','10388079BHeAPU','has','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x20task\x20status\x20--task-id\x20','10294tkXXME','Async\x20task\x20','\x27\x5c\x27\x27','PROCESSING','5PZqmyV','\x20--appcode\x20','Task\x20','\x20failed.','taskId','\x20--format\x20compress','324863JzPCUO','56jZKjth'];a47_0x49e2=function(){return _0x5292d8;};return a47_0x49e2();}(function(_0x284f97,_0x2965aa){const _0x4d3938=a47_0x597b,_0x15384e=_0x284f97();while(!![]){try{const _0x52d62d=parseInt(_0x4d3938(0x1db))/0x1*(parseInt(_0x4d3938(0x1e8))/0x2)+-parseInt(_0x4d3938(0x1da))/0x3+-parseInt(_0x4d3938(0x1df))/0x4*(-parseInt(_0x4d3938(0x1ec))/0x5)+-parseInt(_0x4d3938(0x1d8))/0x6+-parseInt(_0x4d3938(0x1d2))/0x7*(-parseInt(_0x4d3938(0x1d3))/0x8)+parseInt(_0x4d3938(0x1e4))/0x9*(-parseInt(_0x4d3938(0x1d7))/0xa)+parseInt(_0x4d3938(0x1d5))/0xb;if(_0x52d62d===_0x2965aa)break;else _0x15384e['push'](_0x15384e['shift']());}catch(_0x2a4030){_0x15384e['push'](_0x15384e['shift']());}}}(a47_0x49e2,0xe241b));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a47_0x437b4(0x1e3)]),NON_TERMINAL_STATUSES=new Set([a47_0x437b4(0x1de),a47_0x437b4(0x1eb)]);export function normalizeAsyncTask(_0x74e0ec){const _0x402106=a47_0x437b4,_0x2811eb=typeof _0x74e0ec?.['taskId']===_0x402106(0x1e2)?_0x74e0ec['taskId'][_0x402106(0x1dd)]():'';if(!_0x2811eb)throw CliErrors[_0x402106(0x1d9)](_0x402106(0x1e6));const _0x10a26c=typeof _0x74e0ec['status']===_0x402106(0x1e2)?_0x74e0ec[_0x402106(0x1d6)][_0x402106(0x1dd)]()[_0x402106(0x1dc)]():'';if(!_0x10a26c)throw CliErrors['apiError'](_0x402106(0x1e9)+_0x2811eb+_0x402106(0x1e1));return{'taskId':_0x2811eb,'status':_0x10a26c,'errorMessage':typeof _0x74e0ec[_0x402106(0x1d4)]===_0x402106(0x1e2)&&_0x74e0ec[_0x402106(0x1d4)][_0x402106(0x1dd)]()?_0x74e0ec['errorMessage']['trim']():null,'isTerminal':TERMINAL_STATUSES['has'](_0x10a26c),'knownStatus':TERMINAL_STATUSES[_0x402106(0x1e5)](_0x10a26c)||NON_TERMINAL_STATUSES['has'](_0x10a26c)};}export function buildAsyncTaskStatusCommand(_0x1c8352,_0x3bae2a){const _0x5d32c5=a47_0x437b4;return CLI_BIN_NAME+_0x5d32c5(0x1e7)+quoteShellArg(_0x1c8352)+_0x5d32c5(0x1ed)+quoteShellArg(_0x3bae2a)+_0x5d32c5(0x1d1);}export function asyncTaskMessage(_0x521798){const _0x2d5746=a47_0x437b4;switch(_0x521798[_0x2d5746(0x1d6)]){case _0x2d5746(0x1de):return _0x2d5746(0x1ee)+_0x521798['taskId']+'\x20is\x20pending.';case _0x2d5746(0x1eb):return _0x2d5746(0x1ee)+_0x521798['taskId']+_0x2d5746(0x1e0);case'SUCCESS':return _0x2d5746(0x1ee)+_0x521798['taskId']+'\x20completed\x20successfully.';case _0x2d5746(0x1e3):return _0x521798[_0x2d5746(0x1d4)]?_0x2d5746(0x1ee)+_0x521798[_0x2d5746(0x1f0)]+'\x20failed:\x20'+_0x521798[_0x2d5746(0x1d4)]:_0x2d5746(0x1ee)+_0x521798['taskId']+_0x2d5746(0x1ef);default:return _0x2d5746(0x1ee)+_0x521798[_0x2d5746(0x1f0)]+'\x20returned\x20unknown\x20status\x20'+_0x521798['status']+'.';}}function quoteShellArg(_0xc12a55){const _0x3c6030=a47_0x437b4;return'\x27'+_0xc12a55['replace'](/'/g,_0x3c6030(0x1ea))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x258b(_0x2b1d72,_0x4011d0){_0x2b1d72=_0x2b1d72-0x13e;var _0x5d1677=a48_0x5d16();var _0x258b1a=_0x5d1677[_0x2b1d72];return _0x258b1a;}function a48_0x5d16(){var _0x4e0b31=['5WJWWCF','url','23408EjURLs','408GlDsUQ','method','301setXjY','18FpBxjw','3253560QyENid','141212ctXOZT','1119172toSExk','6bqlWzi','description','21714qCSQbS','1667176qUBUiU','266725sWSJXm'];a48_0x5d16=function(){return _0x4e0b31;};return a48_0x5d16();}(function(_0x1212fe,_0x6e0e17){var _0x44c489=a48_0x258b,_0x13fb0d=_0x1212fe();while(!![]){try{var _0x3dbe91=parseInt(_0x44c489(0x141))/0x1+-parseInt(_0x44c489(0x14a))/0x2*(parseInt(_0x44c489(0x14c))/0x3)+-parseInt(_0x44c489(0x14b))/0x4*(-parseInt(_0x44c489(0x142))/0x5)+parseInt(_0x44c489(0x13f))/0x6*(-parseInt(_0x44c489(0x147))/0x7)+parseInt(_0x44c489(0x140))/0x8*(-parseInt(_0x44c489(0x148))/0x9)+parseInt(_0x44c489(0x149))/0xa+-parseInt(_0x44c489(0x144))/0xb*(-parseInt(_0x44c489(0x145))/0xc);if(_0x3dbe91===_0x6e0e17)break;else _0x13fb0d['push'](_0x13fb0d['shift']());}catch(_0x28f402){_0x13fb0d['push'](_0x13fb0d['shift']());}}}(a48_0x5d16,0x384cb));export function asDryRunResult(_0x288acf,_0x5893ce){var _0x554138=a48_0x258b;return Object['defineProperties'](_0x288acf,{'method':{'value':_0x5893ce[_0x554138(0x146)],'enumerable':![]},'url':{'value':_0x5893ce[_0x554138(0x143)],'enumerable':![]},..._0x5893ce[_0x554138(0x13e)]?{'description':{'value':_0x5893ce[_0x554138(0x13e)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x22ff71=a49_0x2ceb;(function(_0x2dcbc8,_0x4053ad){const _0x3eb7eb=a49_0x2ceb,_0x42ebde=_0x2dcbc8();while(!![]){try{const _0x48099a=parseInt(_0x3eb7eb(0x107))/0x1*(-parseInt(_0x3eb7eb(0x10c))/0x2)+parseInt(_0x3eb7eb(0xff))/0x3+-parseInt(_0x3eb7eb(0xf8))/0x4+-parseInt(_0x3eb7eb(0xf2))/0x5*(parseInt(_0x3eb7eb(0x10b))/0x6)+parseInt(_0x3eb7eb(0xf6))/0x7+-parseInt(_0x3eb7eb(0xfa))/0x8*(parseInt(_0x3eb7eb(0x103))/0x9)+parseInt(_0x3eb7eb(0x109))/0xa*(parseInt(_0x3eb7eb(0xf9))/0xb);if(_0x48099a===_0x4053ad)break;else _0x42ebde['push'](_0x42ebde['shift']());}catch(_0x3ccf7f){_0x42ebde['push'](_0x42ebde['shift']());}}}(a49_0x461e,0xb35a7));export const GLOBAL_SCOPE_FLAG={'name':a49_0x22ff71(0x102),'type':a49_0x22ff71(0xf4),'default':![],'description':a49_0x22ff71(0xf7)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a49_0x22ff71(0xfc)};export const CODE_FLAG={'name':a49_0x22ff71(0x104),'type':'string','required':!![],'description':a49_0x22ff71(0xf5),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a49_0x22ff71(0x10a),'description':a49_0x22ff71(0xf5)};function a49_0x2ceb(_0x1547b2,_0x2267be){_0x1547b2=_0x1547b2-0xf2;const _0x461eb6=a49_0x461e();let _0x2ceb5d=_0x461eb6[_0x1547b2];return _0x2ceb5d;}export const SQLCODE_FLAG={'name':a49_0x22ff71(0xfb),'type':a49_0x22ff71(0x106),'required':!![],'description':a49_0x22ff71(0xfd),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};function a49_0x461e(){const _0x2a2867=['code','App\x20code\x20(e.g.\x20app-xxxxx)','string','1zOpDSW','MYSQL','10SmVYig','datasetcode','13740agPoum','1522012BesJgv','940jclHSA','skip-connection-test','boolean','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','3873961jncKOJ','Write\x20to\x20the\x20global\x20configuration','959224YfMUfZ','15089382yzawEc','8EUfHLb','sqlcode','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Database\x20product\x20type','1520601vuGgNp','dbtype','appcode','global','2394801ceRavY'];a49_0x461e=function(){return _0x2a2867;};return a49_0x461e();}export const APPCODE_FLAG_OPTIONAL={'name':a49_0x22ff71(0x101),'type':a49_0x22ff71(0x106),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a49_0x22ff71(0x105)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a49_0x22ff71(0x100),'type':a49_0x22ff71(0x106),'required':!![],'description':a49_0x22ff71(0xfe),'enum':[a49_0x22ff71(0x108),'POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':a49_0x22ff71(0xf3),'type':a49_0x22ff71(0xf4),'description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48de9c,_0x729f5f){const _0x43c042=a50_0x1b39,_0x2a5171=_0x48de9c();while(!![]){try{const _0x14434f=parseInt(_0x43c042(0x1c9))/0x1*(parseInt(_0x43c042(0x1ba))/0x2)+parseInt(_0x43c042(0x1ca))/0x3+parseInt(_0x43c042(0x1cb))/0x4*(-parseInt(_0x43c042(0x1c8))/0x5)+-parseInt(_0x43c042(0x1b9))/0x6*(parseInt(_0x43c042(0x1c0))/0x7)+-parseInt(_0x43c042(0x1bd))/0x8+-parseInt(_0x43c042(0x1c2))/0x9*(parseInt(_0x43c042(0x1c1))/0xa)+parseInt(_0x43c042(0x1c3))/0xb;if(_0x14434f===_0x729f5f)break;else _0x2a5171['push'](_0x2a5171['shift']());}catch(_0x14372b){_0x2a5171['push'](_0x2a5171['shift']());}}}(a50_0x1694,0x2101e));import{existsSync,statSync}from'node:fs';function a50_0x1b39(_0xc6cae3,_0x4ff8f8){_0xc6cae3=_0xc6cae3-0x1b8;const _0x169493=a50_0x1694();let _0x1b39b2=_0x169493[_0xc6cae3];return _0x1b39b2;}import{CliErrors}from'../../errors.js';function a50_0x1694(){const _0x1a94fe=['2JHgExp','ceil','size','862264RaGlTX','\x20MB','File\x20is\x20not\x20a\x20regular\x20file:\x20','94381PzySoa','10GMxNaO','455859XsDkjs','1033857LsIEYw','\x20path\x20is\x20required.','toFixed','isFile','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','20rJaYpH','108884zhdIsI','656268cdGglw','114512zRBpGD','trim','validation','6QcTqJj'];a50_0x1694=function(){return _0x1a94fe;};return a50_0x1694();}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x13bcc9){const _0x511c2c=a50_0x1b39;if(_0x13bcc9>=BYTES_PER_MB){const _0x5a2176=Math[_0x511c2c(0x1bb)](_0x13bcc9/BYTES_PER_MB*0x64)/0x64;return _0x5a2176[_0x511c2c(0x1c5)](0x2)+_0x511c2c(0x1be);}return _0x13bcc9+'\x20B';}export function requireDevelopmentUploadFile(_0x382ec8,_0x3e4096){const _0x59c36d=a50_0x1b39,_0x5a1b49=_0x382ec8[_0x59c36d(0x1cc)]();if(!_0x5a1b49)throw CliErrors[_0x59c36d(0x1b8)](_0x3e4096+_0x59c36d(0x1c4));if(!existsSync(_0x5a1b49))throw CliErrors[_0x59c36d(0x1b8)]('File\x20not\x20found:\x20'+_0x5a1b49);const _0x14c749=statSync(_0x5a1b49);if(!_0x14c749[_0x59c36d(0x1c6)]())throw CliErrors[_0x59c36d(0x1b8)](_0x59c36d(0x1bf)+_0x5a1b49);if(_0x14c749[_0x59c36d(0x1bc)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x59c36d(0x1b8)](_0x59c36d(0x1c7)+_0x5a1b49+'\x20('+formatBytes(_0x14c749['size'])+')');return{'path':_0x5a1b49,'size':_0x14c749['size']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a51_0x302c(_0x1197cf,_0x12f4e8){_0x1197cf=_0x1197cf-0x1d3;const _0x3abdae=a51_0x3abd();let _0x302c9c=_0x3abdae[_0x1197cf];return _0x302c9c;}function a51_0x3abd(){const _0x3a8331=['15188qKIzzA','9468bOrxlB','655510IPStsR','App\x20Code\x20cannot\x20be\x20empty','length','test','14058NJiLro','4279870RKffNy','2JOPXht','trim','5823884cthWPz','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','1917435cyrzlO','4928cYyZyY','7744ReVSRW'];a51_0x3abd=function(){return _0x3a8331;};return a51_0x3abd();}(function(_0x439912,_0x374527){const _0x1faf8e=a51_0x302c,_0x23f0a2=_0x439912();while(!![]){try{const _0x4abf6d=parseInt(_0x1faf8e(0x1e0))/0x1*(parseInt(_0x1faf8e(0x1d8))/0x2)+-parseInt(_0x1faf8e(0x1d5))/0x3+-parseInt(_0x1faf8e(0x1d3))/0x4+-parseInt(_0x1faf8e(0x1da))/0x5+parseInt(_0x1faf8e(0x1d9))/0x6*(parseInt(_0x1faf8e(0x1d6))/0x7)+-parseInt(_0x1faf8e(0x1d7))/0x8*(-parseInt(_0x1faf8e(0x1de))/0x9)+parseInt(_0x1faf8e(0x1df))/0xa;if(_0x4abf6d===_0x374527)break;else _0x23f0a2['push'](_0x23f0a2['shift']());}catch(_0x3191c3){_0x23f0a2['push'](_0x23f0a2['shift']());}}}(a51_0x3abd,0xcd0cd));export function validateAppcode(_0x2bb04f){const _0x5b9d85=a51_0x302c,_0x43f92d=_0x2bb04f[_0x5b9d85(0x1e1)]();if(!_0x43f92d)return{'valid':![],'message':_0x5b9d85(0x1db)};if(_0x43f92d[_0x5b9d85(0x1dc)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x5b9d85(0x1dd)](_0x43f92d))return{'valid':![],'message':_0x5b9d85(0x1d4)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a52_0x1c2ed6=a52_0x883f;function a52_0x4d03(){const _0x466843=['validation','230RXiJvx','hasOwnProperty','\x20config\x20delete\x20<key>\x20[--global]','1876LIDUTe','trim','inherit','\x22\x20is\x20not\x20deletable.','has','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','Usage:\x20','config','3NSqdLF','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','101408sZfidh','defaultApp','boolean','riskLevel','Project','global','delete','Top-level\x20key\x20\x22','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','25472vHkSmy','routing','key','1531728hVKHMw','105393YcTpOD','\x20already\x20absent','write','982714YggGFZ','call','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','3836214FZQuPm','33094230dazZNT'];a52_0x4d03=function(){return _0x466843;};return a52_0x4d03();}(function(_0x325379,_0x59ec97){const _0x5f3fe8=a52_0x883f,_0x21e849=_0x325379();while(!![]){try{const _0x42d3bb=-parseInt(_0x5f3fe8(0x1f1))/0x1+parseInt(_0x5f3fe8(0x1f4))/0x2*(parseInt(_0x5f3fe8(0x205))/0x3)+-parseInt(_0x5f3fe8(0x207))/0x4*(parseInt(_0x5f3fe8(0x1fa))/0x5)+-parseInt(_0x5f3fe8(0x1f7))/0x6+parseInt(_0x5f3fe8(0x1fd))/0x7*(-parseInt(_0x5f3fe8(0x1ed))/0x8)+-parseInt(_0x5f3fe8(0x1f0))/0x9+parseInt(_0x5f3fe8(0x1f8))/0xa;if(_0x42d3bb===_0x59ec97)break;else _0x21e849['push'](_0x21e849['shift']());}catch(_0x10740c){_0x21e849['push'](_0x21e849['shift']());}}}(a52_0x4d03,0xd3812));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a52_0x1c2ed6(0x1ff)]),EXTRA_DELETABLE_KEYS=new Set([a52_0x1c2ed6(0x1e5),a52_0x1c2ed6(0x1ee)]);async function execute(_0x360e04){const _0x59939d=a52_0x1c2ed6,_0xe5d288=_0x360e04['args'][0x0]?.[_0x59939d(0x1fe)]();if(!_0xe5d288)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x59939d(0x203)+CLI_BIN_NAME+_0x59939d(0x1fc));if(_0xe5d288===_0x59939d(0x1e7))throw CliErrors[_0x59939d(0x1f9)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0xe5d288)&&!EXTRA_DELETABLE_KEYS[_0x59939d(0x201)](_0xe5d288)&&!LEGACY_DELETABLE_KEYS[_0x59939d(0x201)](_0xe5d288))throw CliErrors[_0x59939d(0x1f9)](_0x59939d(0x1eb)+_0xe5d288+_0x59939d(0x200),_0x59939d(0x206));const _0x24939c=resolveWriteScope({'global':_0x360e04['bool'](_0x59939d(0x1e9))}),_0x413316=readScopedConfig(_0x24939c),_0x545c4a=Object['prototype'][_0x59939d(0x1fb)][_0x59939d(0x1f5)](_0x413316,_0xe5d288);_0x545c4a&&(delete _0x413316[_0xe5d288],writeScopedConfig(_0x413316,_0x24939c));const _0x5e15c4=_0x24939c==='global'?'Global':_0x59939d(0x1e8);return{'ok':!![],'message':_0x545c4a?'✓\x20'+_0x5e15c4+'\x20'+_0xe5d288+'\x20deleted':'✓\x20'+_0x5e15c4+'\x20'+_0xe5d288+_0x59939d(0x1f2),'data':{'key':_0xe5d288,'scope':_0x24939c,'changed':_0x545c4a}};}function a52_0x883f(_0x39e6ee,_0x566738){_0x39e6ee=_0x39e6ee-0x1e5;const _0x4d0314=a52_0x4d03();let _0x883f89=_0x4d0314[_0x39e6ee];return _0x883f89;}export const configDeleteDefinition={'service':a52_0x1c2ed6(0x204),'command':a52_0x1c2ed6(0x1ea),'description':a52_0x1c2ed6(0x202),'risk':a52_0x1c2ed6(0x1f3),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a52_0x1c2ed6(0x1ef),'description':a52_0x1c2ed6(0x1ec),'required':!![]}],'flags':[{'name':a52_0x1c2ed6(0x1e9),'type':a52_0x1c2ed6(0x1e6),'description':a52_0x1c2ed6(0x1f6),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a53_0x479d(_0x3d5629,_0x3a36b8){_0x3d5629=_0x3d5629-0xfa;const _0x47448b=a53_0x4744();let _0x479dd8=_0x47448b[_0x3d5629];return _0x479dd8;}const a53_0x5108e1=a53_0x479d;(function(_0x203fd0,_0x6055ce){const _0x33f68c=a53_0x479d,_0x2aad11=_0x203fd0();while(!![]){try{const _0x31b108=parseInt(_0x33f68c(0xfd))/0x1*(-parseInt(_0x33f68c(0xfa))/0x2)+parseInt(_0x33f68c(0x108))/0x3+parseInt(_0x33f68c(0x10f))/0x4+-parseInt(_0x33f68c(0x10b))/0x5+-parseInt(_0x33f68c(0x109))/0x6*(parseInt(_0x33f68c(0xfe))/0x7)+parseInt(_0x33f68c(0x106))/0x8+parseInt(_0x33f68c(0x101))/0x9*(parseInt(_0x33f68c(0xfb))/0xa);if(_0x31b108===_0x6055ce)break;else _0x2aad11['push'](_0x2aad11['shift']());}catch(_0x4a6a0a){_0x2aad11['push'](_0x2aad11['shift']());}}}(a53_0x4744,0x27cc3));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x5a854c){const _0x5869e3=a53_0x479d,_0x181f26=_0x5a854c[_0x5869e3(0x10c)](_0x5869e3(0xff));if(!_0x181f26)throw CliErrors[_0x5869e3(0x102)](_0x5869e3(0x104),'Usage:\x20'+CLI_BIN_NAME+_0x5869e3(0xfc));const _0x244209=readConfig(),_0x55268e=_0x181f26===_0x5869e3(0x103)?_0x5869e3(0x10a):_0x181f26,_0x23d25e=_0x244209[_0x55268e];if(_0x23d25e===undefined)throw CliErrors[_0x5869e3(0x102)](_0x5869e3(0x110)+_0x181f26);return{'ok':!![],'data':typeof _0x23d25e===_0x5869e3(0x107)?_0x23d25e:{[_0x55268e]:_0x23d25e},'message':typeof _0x23d25e===_0x5869e3(0x107)?undefined:String(_0x23d25e)};}function a53_0x4744(){const _0x12e197=['key','get','35442eoZauB','validation','app','Missing\x20key.','Get\x20a\x20config\x20value\x20by\x20key','308272RuKdtI','object','670395ZmjlWz','402ClNjGl','appcode','1046435eacPtL','str','read','config','641892WUMuOH','Key\x20not\x20found:\x20','7454hNiJXB','590OXOSYY','\x20config\x20get\x20--key\x20<key>','17WkQVoF','22897JUhzol'];a53_0x4744=function(){return _0x12e197;};return a53_0x4744();}export const configGetDefinition={'service':a53_0x5108e1(0x10e),'command':a53_0x5108e1(0x100),'description':a53_0x5108e1(0x105),'risk':a53_0x5108e1(0x10d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x5108e1(0xff),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ae8e1,_0x322010){const _0x382a16=a54_0x1fba,_0x334a6d=_0x1ae8e1();while(!![]){try{const _0x3419c7=parseInt(_0x382a16(0x15e))/0x1*(-parseInt(_0x382a16(0x161))/0x2)+-parseInt(_0x382a16(0x15a))/0x3*(parseInt(_0x382a16(0x15d))/0x4)+parseInt(_0x382a16(0x159))/0x5+-parseInt(_0x382a16(0x158))/0x6*(parseInt(_0x382a16(0x15c))/0x7)+parseInt(_0x382a16(0x162))/0x8+parseInt(_0x382a16(0x160))/0x9*(-parseInt(_0x382a16(0x163))/0xa)+-parseInt(_0x382a16(0x15b))/0xb*(-parseInt(_0x382a16(0x15f))/0xc);if(_0x3419c7===_0x322010)break;else _0x334a6d['push'](_0x334a6d['shift']());}catch(_0x39bb24){_0x334a6d['push'](_0x334a6d['shift']());}}}(a54_0x3bbb,0x970c5));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a54_0x1fba(_0x27b968,_0x553e2c){_0x27b968=_0x27b968-0x158;const _0x3bbb1b=a54_0x3bbb();let _0x1fbae5=_0x3bbb1b[_0x27b968];return _0x1fbae5;}function a54_0x3bbb(){const _0x9795a9=['149858dmOBWr','4711248vczfOf','10SwXNvM','4812GsYKcG','1824565UpAYLc','4722CVyKGl','19275586FDZCQi','1176HEhnUk','548aUvbHT','13lNLbkK','12ZNTESR','6867009XmiOlL'];a54_0x3bbb=function(){return _0x9795a9;};return a54_0x3bbb();}import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x5a8a2d=a55_0x49d2;(function(_0x36b98e,_0x74b274){const _0x1d84f0=a55_0x49d2,_0x2d4eff=_0x36b98e();while(!![]){try{const _0x1c6e1f=-parseInt(_0x1d84f0(0xa0))/0x1*(-parseInt(_0x1d84f0(0x7e))/0x2)+-parseInt(_0x1d84f0(0x77))/0x3+parseInt(_0x1d84f0(0xa1))/0x4*(parseInt(_0x1d84f0(0x7d))/0x5)+parseInt(_0x1d84f0(0x75))/0x6+-parseInt(_0x1d84f0(0x84))/0x7*(-parseInt(_0x1d84f0(0x8d))/0x8)+-parseInt(_0x1d84f0(0x8f))/0x9+parseInt(_0x1d84f0(0x7c))/0xa;if(_0x1c6e1f===_0x74b274)break;else _0x2d4eff['push'](_0x2d4eff['shift']());}catch(_0xd9587f){_0x2d4eff['push'](_0x2d4eff['shift']());}}}(a55_0xd742,0xe85cf));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a55_0x49d2(_0x52a044,_0x40df8c){_0x52a044=_0x52a044-0x71;const _0xd7424f=a55_0xd742();let _0x49d216=_0xd7424f[_0x52a044];return _0x49d216;}function a55_0xd742(){const _0x55a842=['bool','global','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','certificateDomain','keys','ExitPromptError','region','official','skill-domain','Custom\x20knowledge-base\x20HTTPS\x20origin','92823emMswU','6831892AERzTx','api-domain','str','Independent-deployment\x20Domain\x20JSON\x20file','enterprise-v1','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','label','cdn','validation','Custom\x20Runtime\x20HTTPS\x20origin','Region\x20\x22','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','Select\x20Lovrabet\x20region','local-domain','Official\x20Lovrabet\x20region:\x20','mode','Custom\x20certificate\x20service\x20HTTPS\x20origin','3539436vWJPom','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','4787085OqdCcc','join','user-domain','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','name','13403570zsVcGb','5xjdOxo','12veEIgm','cancelled','assign','Custom\x20local\x20callback\x20HTTPS\x20origin','project','string','490xudsfc','nonInteractive','Custom\x20SkillHub\x20HTTPS\x20origin','kb-domain','Available\x20regions:\x20','length','certificate-domain','map','init','13480fKjolC','domain-config','15891030VwMDLp','Custom\x20User\x20HTTPS\x20origin','write','independent','routing'];a55_0xd742=function(){return _0x55a842;};return a55_0xd742();}import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a55_0x5a8a2d(0x9c),'type':'string','description':a55_0x5a8a2d(0x72)+ENABLED_LOVRABET_REGION_VALUES[a55_0x5a8a2d(0x78)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a55_0x5a8a2d(0x8e),'type':a55_0x5a8a2d(0x83),'description':a55_0x5a8a2d(0xa4)},{'name':a55_0x5a8a2d(0x79),'type':'string','description':a55_0x5a8a2d(0x90)},{'name':a55_0x5a8a2d(0xa2),'type':a55_0x5a8a2d(0x83),'description':'Custom\x20platform\x20API\x20HTTPS\x20origin'},{'name':'runtime-domain','type':'string','description':a55_0x5a8a2d(0xaa)},{'name':a55_0x5a8a2d(0x9e),'type':a55_0x5a8a2d(0x83),'description':a55_0x5a8a2d(0x86)},{'name':a55_0x5a8a2d(0x87),'type':a55_0x5a8a2d(0x83),'description':a55_0x5a8a2d(0x9f)},{'name':'app-domain','type':a55_0x5a8a2d(0x83),'description':a55_0x5a8a2d(0x96)},{'name':a55_0x5a8a2d(0x71),'type':a55_0x5a8a2d(0x83),'description':a55_0x5a8a2d(0x81)},{'name':a55_0x5a8a2d(0x8a),'type':a55_0x5a8a2d(0x83),'description':a55_0x5a8a2d(0x74)}];async function resolveRegion(_0x350467){const _0x526e24=a55_0x5a8a2d,_0x4412e8=_0x350467[_0x526e24(0xa3)](_0x526e24(0x9c));if(_0x4412e8){if(!isEnabledLovrabetRegion(_0x4412e8))throw CliErrors[_0x526e24(0xa9)](_0x526e24(0xab)+_0x4412e8+'\x22\x20is\x20not\x20currently\x20available.',_0x526e24(0x88)+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'));return _0x4412e8;}if(_0x350467[_0x526e24(0x85)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x526e24(0xad),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x526e24(0x8b)](_0x4f259f=>({'name':getOfficialRoutingProfile(_0x4f259f)[_0x526e24(0xa7)]+'\x20('+_0x4f259f+')','value':_0x4f259f}))});}catch(_0x904ab7){if(_0x904ab7?.[_0x526e24(0x7b)]===_0x526e24(0x9b))throw CliErrors[_0x526e24(0x7f)]();throw _0x904ab7;}}export async function executeConfigInit(_0x5406e6){const _0x288a80=a55_0x5a8a2d,_0x28b250=resolveDomainConfigInput(_0x5406e6),_0x1efd08=_0x28b250['domains'],_0x589e8b=Object[_0x288a80(0x9a)](_0x1efd08)[_0x288a80(0x89)]>0x0;if(_0x589e8b&&_0x5406e6[_0x288a80(0xa3)](_0x288a80(0x9c)))throw CliErrors['validation'](_0x288a80(0x97));if(!!_0x1efd08['localDomain']!==!!_0x1efd08[_0x288a80(0x99)])throw CliErrors['validation'](_0x288a80(0x7a));const _0xb8f55b=_0x5406e6[_0x288a80(0x94)](_0x288a80(0x95))?_0x288a80(0x95):_0x288a80(0x82),_0xe83ebd=readScopedConfig(_0xb8f55b);for(const _0x187ca0 of DOMAIN_CONFIG_FIELDS)delete _0xe83ebd[_0x187ca0];for(const _0x1bbd55 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0xe83ebd[_0x1bbd55];delete _0xe83ebd[_0x288a80(0x93)];let _0x4210ee=null;if(_0x589e8b)delete _0xe83ebd[_0x288a80(0x9c)],_0x28b250[_0x288a80(0x73)]==='enterprise-v1'?_0xe83ebd[_0x288a80(0x93)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x28b250['manifestDomains'],'cdn':_0x28b250[_0x288a80(0xa8)]}:Object[_0x288a80(0x80)](_0xe83ebd,_0x1efd08);else{_0x4210ee=await resolveRegion(_0x5406e6);if(_0x4210ee===DEFAULT_LOVRABET_REGION)delete _0xe83ebd['region'];else _0xe83ebd[_0x288a80(0x9c)]=_0x4210ee;}return writeScopedConfig(_0xe83ebd,_0xb8f55b),{'ok':!![],'message':_0x589e8b?_0x288a80(0x98)+Object[_0x288a80(0x9a)](_0x28b250['mode']==='enterprise-v1'?_0x28b250['manifestDomains']:_0x1efd08)[_0x288a80(0x78)](',\x20')+'.':_0x288a80(0xac)+_0x4210ee+'.','data':{'mode':_0x589e8b?_0x288a80(0x92):_0x288a80(0x9d),'protocol':_0x28b250[_0x288a80(0x73)]===_0x288a80(0xa5)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x4210ee,'domains':_0x1efd08,'cdn':_0x28b250[_0x288a80(0x73)]===_0x288a80(0xa5)?_0x28b250[_0x288a80(0xa8)]:undefined}};}export const configInitDefinition={'service':'config','command':a55_0x5a8a2d(0x8c),'description':a55_0x5a8a2d(0x76),'risk':a55_0x5a8a2d(0x91),'confirmationDescription':a55_0x5a8a2d(0xa6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a56_0x433a93=a56_0x28ef;(function(_0x545690,_0x2fb1e3){const _0x259099=a56_0x28ef,_0x510d5e=_0x545690();while(!![]){try{const _0x1a11d3=parseInt(_0x259099(0x1b7))/0x1*(parseInt(_0x259099(0x1b3))/0x2)+-parseInt(_0x259099(0x1b4))/0x3*(-parseInt(_0x259099(0x1bc))/0x4)+parseInt(_0x259099(0x1bd))/0x5+-parseInt(_0x259099(0x1ac))/0x6*(-parseInt(_0x259099(0x1ab))/0x7)+parseInt(_0x259099(0x1b0))/0x8*(-parseInt(_0x259099(0x1bb))/0x9)+-parseInt(_0x259099(0x1b6))/0xa*(parseInt(_0x259099(0x1b9))/0xb)+-parseInt(_0x259099(0x1ba))/0xc*(parseInt(_0x259099(0x1ad))/0xd);if(_0x1a11d3===_0x2fb1e3)break;else _0x510d5e['push'](_0x510d5e['shift']());}catch(_0x7911b3){_0x510d5e['push'](_0x510d5e['shift']());}}}(a56_0x434b,0xb9e7d));function a56_0x434b(){const _0x1a77ea=['134vxSRxL','2181whZvYZ','List\x20all\x20config\x20values','10RzVDCL','22367znoLWa','read','9028085jMcEnd','2977368xfWeiz','27qoklzu','4276AmyXDJ','6098660NsFiIp','config','5178453CBbkBU','6mntDnE','117hiZKYF','boolean','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','1120088oqyImJ','global','list'];a56_0x434b=function(){return _0x1a77ea;};return a56_0x434b();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x20b169){const _0x40972c=a56_0x28ef,_0x4d313d=_0x20b169['bool'](_0x40972c(0x1b1))?readScopedConfig(_0x40972c(0x1b1)):readConfig();return{'ok':!![],'data':_0x4d313d};}function a56_0x28ef(_0x3db370,_0x165aaa){_0x3db370=_0x3db370-0x1ab;const _0x434b62=a56_0x434b();let _0x28ef1c=_0x434b62[_0x3db370];return _0x28ef1c;}export const configListDefinition={'service':a56_0x433a93(0x1be),'command':a56_0x433a93(0x1b2),'description':a56_0x433a93(0x1b5),'risk':a56_0x433a93(0x1b8),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a56_0x433a93(0x1b1),'type':a56_0x433a93(0x1ae),'description':a56_0x433a93(0x1af),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a57_0x2309(_0x3810ec,_0x46e264){_0x3810ec=_0x3810ec-0xe3;const _0x44c90e=a57_0x44c9();let _0x230957=_0x44c90e[_0x3810ec];return _0x230957;}const a57_0x25c639=a57_0x2309;(function(_0x9bc460,_0x51ed64){const _0x1be69b=a57_0x2309,_0x4a9284=_0x9bc460();while(!![]){try{const _0x502f69=-parseInt(_0x1be69b(0x113))/0x1+parseInt(_0x1be69b(0x117))/0x2*(parseInt(_0x1be69b(0xfb))/0x3)+parseInt(_0x1be69b(0xf8))/0x4+-parseInt(_0x1be69b(0x10c))/0x5+-parseInt(_0x1be69b(0xea))/0x6+parseInt(_0x1be69b(0x115))/0x7*(parseInt(_0x1be69b(0xed))/0x8)+parseInt(_0x1be69b(0xe5))/0x9*(parseInt(_0x1be69b(0x105))/0xa);if(_0x502f69===_0x51ed64)break;else _0x4a9284['push'](_0x4a9284['shift']());}catch(_0x2115b2){_0x4a9284['push'](_0x4a9284['shift']());}}}(a57_0x44c9,0x406bd));import{CliErrors}from'../../errors.js';function a57_0x44c9(){const _0x9e9fa7=['Global','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','1860424hekmNE','Missing\x20value.','\x20set\x20to:\x20','174aGPaej','\x20workspace\x20add\x20<name>\x20--appcode\x20','write','Config\x20value','keys','global','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Top-level\x20key\x20\x22','value','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','680CJzJXw','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','app','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','Invalid\x20locale\x20value.','`,\x20`','apps','1986615EebPuW','Usage:\x20','validation','Project','set','appcode','string','381485KwBrsp','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','2828jvkysV','length','5842DGWXPI','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','locale','26019rDNZXU','boolean','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','includes','bool','1586082CgUsQt','join','\x22.\x20Allowed:\x20','9424LTUUiA','env','str','key','Set\x20a\x20config\x20value','\x20appcode\x20set\x20to:\x20','Invalid\x20value\x20for\x20\x22','riskLevel','Settable\x20top-level\x20keys:\x20'];a57_0x44c9=function(){return _0x9e9fa7;};return a57_0x44c9();}import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x453f6e){const _0x5d2c30=a57_0x2309,_0x5795c2=_0x453f6e[_0x5d2c30(0xef)](_0x5d2c30(0xf0)),_0x1e6387=_0x453f6e[_0x5d2c30(0xef)](_0x5d2c30(0x103));if(!_0x5795c2)throw CliErrors['validation']('Missing\x20key.',_0x5d2c30(0x10d)+CLI_BIN_NAME+_0x5d2c30(0x106));if(_0x1e6387===undefined||_0x1e6387==='')throw CliErrors[_0x5d2c30(0x10e)](_0x5d2c30(0xf9),_0x5d2c30(0x10d)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');let _0x54cf56=_0x5795c2,_0x4f5a28=_0x1e6387;if(_0x1e6387[_0x5d2c30(0x116)]>0x1f4)throw CliErrors[_0x5d2c30(0x10e)](_0x5d2c30(0x114));if(_0x5795c2===_0x5d2c30(0xf4))throw CliErrors['validation'](_0x5d2c30(0xe3));if(!isTopLevelConfigKey(_0x5795c2))throw CliErrors[_0x5d2c30(0x10e)](_0x5d2c30(0x102)+_0x5795c2+'\x22\x20is\x20not\x20settable.',_0x5d2c30(0xf5)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x5795c2]&&!CONFIG_ENUM_VALUES[_0x5795c2][_0x5d2c30(0xe8)](_0x1e6387))throw CliErrors['validation'](_0x5d2c30(0xf3)+_0x5795c2+_0x5d2c30(0xec)+CONFIG_ENUM_VALUES[_0x5795c2][_0x5d2c30(0xeb)](',\x20'));if(_0x5795c2==='locale'&&!normalizeLocale(_0x1e6387))throw CliErrors[_0x5d2c30(0x10e)](_0x5d2c30(0x109),_0x5d2c30(0xe7));DOMAIN_CONFIG_FIELDS[_0x5d2c30(0xe8)](_0x5795c2)&&(_0x4f5a28=normalizeDomainOrigin(_0x5795c2,_0x1e6387));const _0x41ebfa={'global':_0x453f6e[_0x5d2c30(0xe9)]('global')},_0x37ee4a=resolveWriteScope(_0x41ebfa),_0x59b25a=readScopedConfig(_0x37ee4a);_0x5795c2===_0x5d2c30(0x107)&&(_0x54cf56=_0x5d2c30(0x111),delete _0x59b25a[_0x5d2c30(0x107)]);_0x5795c2===_0x5d2c30(0xe4)&&(_0x4f5a28=normalizeLocale(_0x1e6387));if(_0x5795c2==='env'){_0x4f5a28=normalizeEnv(_0x1e6387);if(!isProduction(_0x4f5a28)&&!isDaily(_0x4f5a28))throw CliErrors[_0x5d2c30(0x10e)](_0x5d2c30(0x104),_0x5d2c30(0xf7));}if(_0x5795c2===_0x5d2c30(0x111)){const _0x891d0d=_0x59b25a[_0x5d2c30(0x10b)]&&typeof _0x59b25a[_0x5d2c30(0x10b)]==='object'?Object[_0x5d2c30(0xff)](_0x59b25a[_0x5d2c30(0x10b)]):[];if(_0x891d0d[_0x5d2c30(0x116)]>0x0)throw CliErrors[_0x5d2c30(0x10e)](_0x5d2c30(0x101),'Use\x20`'+CLI_BIN_NAME+_0x5d2c30(0xfc)+_0x4f5a28+_0x5d2c30(0x10a)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x2626ff=buildCanonicalProjectConfig({..._0x59b25a},{'appCodes':[_0x4f5a28],'env':typeof _0x59b25a['env']==='string'?_0x59b25a[_0x5d2c30(0xee)]:undefined});writeScopedConfig(_0x2626ff,_0x37ee4a);const _0x2f3417=_0x37ee4a===_0x5d2c30(0x100)?_0x5d2c30(0xf6):_0x5d2c30(0x10f);return{'ok':!![],'message':'✓\x20'+_0x2f3417+_0x5d2c30(0xf2)+_0x4f5a28+_0x5d2c30(0x108)};}_0x59b25a[_0x54cf56]=_0x4f5a28,writeScopedConfig(_0x59b25a,_0x37ee4a);const _0x485d1c=_0x37ee4a==='global'?_0x5d2c30(0xf6):_0x5d2c30(0x10f);return{'ok':!![],'message':'✓\x20'+_0x485d1c+'\x20'+_0x54cf56+_0x5d2c30(0xfa)+_0x4f5a28};}export const configSetDefinition={'service':'config','command':a57_0x25c639(0x110),'description':a57_0x25c639(0xf1),'risk':a57_0x25c639(0xfd),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a57_0x25c639(0xf0),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a57_0x25c639(0x103),'type':a57_0x25c639(0x112),'description':a57_0x25c639(0xfe),'required':!![]},{'name':a57_0x25c639(0x100),'type':a57_0x25c639(0xe6),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a58_0x4726(){var _0x43fa91=['1762902MABBIo','project','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','global','4AcgaKN','1828656YyLcoV','12437226DRrXVl','1419279ndDcYX','21BRChmu','849618zSJAOd','493205RnevdS','1460156WIaYNM'];a58_0x4726=function(){return _0x43fa91;};return a58_0x4726();}(function(_0x140eac,_0x2e3383){var _0x157823=a58_0x3b8e,_0x428d90=_0x140eac();while(!![]){try{var _0x1b8194=parseInt(_0x157823(0xb8))/0x1+parseInt(_0x157823(0xba))/0x2+-parseInt(_0x157823(0xb6))/0x3+parseInt(_0x157823(0xbf))/0x4*(parseInt(_0x157823(0xb9))/0x5)+-parseInt(_0x157823(0xbb))/0x6*(-parseInt(_0x157823(0xb7))/0x7)+-parseInt(_0x157823(0xb4))/0x8+-parseInt(_0x157823(0xb5))/0x9;if(_0x1b8194===_0x2e3383)break;else _0x428d90['push'](_0x428d90['shift']());}catch(_0x256388){_0x428d90['push'](_0x428d90['shift']());}}}(a58_0x4726,0x74427));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x46e4e7){var _0x56582c=a58_0x3b8e;if(_0x46e4e7[_0x56582c(0xbe)])return _0x56582c(0xbe);if(!isInProject())throw CliErrors['validation']('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x56582c(0xbd)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0x56582c(0xbc);}export function readScopedConfig(_0x51b4c9){return readConfigFile(resolveWriteConfigPath(_0x51b4c9));}function a58_0x3b8e(_0x5e8fc4,_0xca4216){_0x5e8fc4=_0x5e8fc4-0xb4;var _0x47264d=a58_0x4726();var _0x3b8e15=_0x47264d[_0x5e8fc4];return _0x3b8e15;}export function writeScopedConfig(_0x4df64d,_0x2d2a49){writeConfigFile(resolveWriteConfigPath(_0x2d2a49),_0x4df64d);}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface DatasetBatchDesign extends Record<string, unknown> {
|
|
2
|
+
kind: "dataset-batch";
|
|
3
|
+
schemaVersion: 1;
|
|
4
|
+
datasets: Array<{
|
|
5
|
+
localKey: string;
|
|
6
|
+
design: Record<string, unknown>;
|
|
7
|
+
}>;
|
|
8
|
+
relations: Record<string, unknown>[];
|
|
9
|
+
unresolvedRelations: Record<string, unknown>[];
|
|
10
|
+
}
|
|
11
|
+
export interface ReconciledBatchResult {
|
|
12
|
+
expectedLocalKeys: string[];
|
|
13
|
+
expectedRelations: Record<string, unknown>[];
|
|
14
|
+
createdDatasets: Record<string, unknown>[];
|
|
15
|
+
createdRelations: Record<string, unknown>[];
|
|
16
|
+
unresolvedRelations: Record<string, unknown>[];
|
|
17
|
+
metrics?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export declare function isDatasetBatchDesign(value: unknown): value is DatasetBatchDesign;
|
|
20
|
+
export declare function validateDatasetBatchDesign(value: unknown): DatasetBatchDesign;
|
|
21
|
+
export declare function reconcileBatchResult(value: unknown): ReconciledBatchResult | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a59_0x347296=a59_0x92c2;(function(_0x22a737,_0x5c306c){const _0x3c3fc3=a59_0x92c2,_0x488382=_0x22a737();while(!![]){try{const _0x368cdf=-parseInt(_0x3c3fc3(0x1a1))/0x1*(-parseInt(_0x3c3fc3(0x15b))/0x2)+-parseInt(_0x3c3fc3(0x1b8))/0x3*(-parseInt(_0x3c3fc3(0x1b1))/0x4)+-parseInt(_0x3c3fc3(0x152))/0x5*(-parseInt(_0x3c3fc3(0x1a5))/0x6)+-parseInt(_0x3c3fc3(0x1be))/0x7+-parseInt(_0x3c3fc3(0x175))/0x8*(parseInt(_0x3c3fc3(0x196))/0x9)+-parseInt(_0x3c3fc3(0x153))/0xa*(parseInt(_0x3c3fc3(0x1b7))/0xb)+parseInt(_0x3c3fc3(0x1a4))/0xc*(parseInt(_0x3c3fc3(0x19e))/0xd);if(_0x368cdf===_0x5c306c)break;else _0x488382['push'](_0x488382['shift']());}catch(_0x465fb4){_0x488382['push'](_0x488382['shift']());}}}(a59_0x51fd,0xcb6a5));import{CliErrors}from'../../errors.js';const LOCAL_KEY=/^[a-z][a-z0-9_]{0,63}$/,SUPPORTED_CARDINALITIES=new Set(['MANY_TO_ONE',a59_0x347296(0x164)]),SUPPORTED_FIELD_TYPES=new Set([a59_0x347296(0x187),a59_0x347296(0x15e),'DATETIME',a59_0x347296(0x174),a59_0x347296(0x185),a59_0x347296(0x1c0),'DATE_RANGE',a59_0x347296(0x14f),a59_0x347296(0x19b),'UPLOAD']);function a59_0x51fd(){const _0xf9de33=['reason','51556wlDUGx','datasetName','Dataset\x20','modelCode','number','unresolvedRelations[','473Bpodee','15kJNEZD','length','createdRelations','datasetId','datasets','.fromField','2106230BYmETD','createdDatasets[].code','MULTI_SELECT','isFinite','].type\x20is\x20not\x20supported.','].design\x20must\x20be\x20an\x20object.','USER','add','fieldName','6255715VQBsLl','48070QCwKVu','Dataset\x20batch\x20relations\x20must\x20be\x20unique.','].localKey\x20must\x20match\x20','every','get','lookup','dataset','.toField','55278Fgcjmv','fromDatasetKey','source','NUMBER','datasets[','localKey','\x20must\x20be\x20between\x200\x20and\x201.','confidence',']\x20must\x20have\x20a\x20non-empty\x20name\x20or\x20code.','ONE_TO_ONE','].design','dataset-batch','.fromDatasetKey','].design.dataset\x20must\x20be\x20an\x20object.','map','\x20is\x20required.','].design.relations\x20must\x20be\x20an\x20empty\x20array;\x20use\x20top-level\x20relations.','].design.fields','expectedLocalKeys','object','size','createdDatasets[].localKey','toUpperCase','Dataset\x20batch\x20schemaVersion\x20must\x20be\x201.','fields','BOOLEAN','23672yxPGtM','relationType','set','].design.dataset','Dataset\x20batch\x20localKey\x20values\x20must\x20be\x20unique.','keys',']\x20must\x20not\x20contain\x20embedded\x20relation\x20references.','\x20field\x20names\x20must\x20be\x20unique\x20ignoring\x20case.','test','fieldCode','toDatasetKey','metrics','datasetCode','toField','.cardinality\x20is\x20not\x20supported.','Batch\x20--design-file\x20must\x20have\x20kind\x20\x22dataset-batch\x22.','SELECT','refTableLabelField','TEXT','split','kind','isArray','unresolvedRelations','string','\x20must\x20contain\x20','modelId','fromField','some','.reason','\x20connects\x20incompatible\x20field\x20types.','join','fromDatasetCode','.toDatasetKey','1683OVssjG','].reason','\x20references\x20an\x20unknown\x20field.','fieldType','design','ADDRESS','has','].design.fields[','2849834UQIIVN','entries','refTable','13VYXKsa','].localKey','].design.dataset.datasetName','12iyickb','6QLvKEm','toDatasetCode','refTableField','relations','trim','createdDatasets','toLowerCase','schemaVersion','\x20must\x20not\x20be\x20supplied\x20by\x20the\x20client.','code','cardinality'];a59_0x51fd=function(){return _0xf9de33;};return a59_0x51fd();}export function isDatasetBatchDesign(_0x4fddb4){const _0xde141f=a59_0x347296;return isObject(_0x4fddb4)&&_0x4fddb4[_0xde141f(0x189)]===_0xde141f(0x166);}export function validateDatasetBatchDesign(_0x289666){const _0x4162b9=a59_0x347296;(!isObject(_0x289666)||_0x289666[_0x4162b9(0x189)]!==_0x4162b9(0x166))&&fail(_0x4162b9(0x184));_0x289666[_0x4162b9(0x1ac)]!==0x1&&fail(_0x4162b9(0x172));const _0x7bc811=objectArray(_0x289666[_0x4162b9(0x1bc)],_0x4162b9(0x1bc),0x1,0x14),_0x54d4cd=objectArray(_0x289666[_0x4162b9(0x1a8)],_0x4162b9(0x1a8),0x0,0xc8),_0x5794a4=objectArray(_0x289666['unresolvedRelations'],_0x4162b9(0x18b),0x0,0xc8),_0x4e9209=new Set(),_0x151083=new Map();for(const [_0x564aea,_0x4d46d5]of _0x7bc811[_0x4162b9(0x19f)]()){const _0x210b3c=requiredString(_0x4d46d5[_0x4162b9(0x160)],_0x4162b9(0x15f)+_0x564aea+_0x4162b9(0x1a2));!LOCAL_KEY[_0x4162b9(0x17d)](_0x210b3c)&&fail(_0x4162b9(0x15f)+_0x564aea+_0x4162b9(0x155)+LOCAL_KEY[_0x4162b9(0x15d)]+'.');_0x4e9209['has'](_0x210b3c)&&fail(_0x4162b9(0x179));_0x4e9209[_0x4162b9(0x150)](_0x210b3c);!isObject(_0x4d46d5['design'])&&fail('datasets['+_0x564aea+_0x4162b9(0x14e));rejectServerDatasetIdentity(_0x4d46d5['design'],_0x4162b9(0x15f)+_0x564aea+_0x4162b9(0x165));if(!isObject(_0x4d46d5[_0x4162b9(0x19a)][_0x4162b9(0x159)]))fail(_0x4162b9(0x15f)+_0x564aea+_0x4162b9(0x168));rejectServerDatasetIdentity(_0x4d46d5[_0x4162b9(0x19a)]['dataset'],'datasets['+_0x564aea+_0x4162b9(0x178)),requiredString(_0x4d46d5[_0x4162b9(0x19a)][_0x4162b9(0x159)][_0x4162b9(0x1b2)],'datasets['+_0x564aea+_0x4162b9(0x1a3));'relations'in _0x4d46d5[_0x4162b9(0x19a)]&&(!Array[_0x4162b9(0x18a)](_0x4d46d5[_0x4162b9(0x19a)]['relations'])||_0x4d46d5[_0x4162b9(0x19a)][_0x4162b9(0x1a8)][_0x4162b9(0x1b9)]!==0x0)&&fail(_0x4162b9(0x15f)+_0x564aea+_0x4162b9(0x16b));const _0x1b5dbf=objectArray(_0x4d46d5[_0x4162b9(0x19a)][_0x4162b9(0x173)],'datasets['+_0x564aea+_0x4162b9(0x16c),0x1,0xc8),_0x1cda4e=new Map();for(const [_0x105529,_0x571678]of _0x1b5dbf[_0x4162b9(0x19f)]()){const _0xb678a0=fieldName(_0x571678);if(!_0xb678a0)fail(_0x4162b9(0x15f)+_0x564aea+'].design.fields['+_0x105529+_0x4162b9(0x163));const _0x330e8c=_0xb678a0[_0x4162b9(0x1ab)]();if(_0x1cda4e[_0x4162b9(0x19c)](_0x330e8c))fail(_0x4162b9(0x1b3)+_0x210b3c+_0x4162b9(0x17c));const _0x421d1d=stringValue(_0x571678['type']??_0x571678[_0x4162b9(0x199)])[_0x4162b9(0x171)]();if(!SUPPORTED_FIELD_TYPES[_0x4162b9(0x19c)](_0x421d1d))fail(_0x4162b9(0x15f)+_0x564aea+_0x4162b9(0x19d)+_0x105529+_0x4162b9(0x14d));_0x1cda4e[_0x4162b9(0x177)](_0x330e8c,_0x421d1d),[_0x571678[_0x4162b9(0x1a0)],_0x571678[_0x4162b9(0x1a7)],_0x571678[_0x4162b9(0x186)]][_0x4162b9(0x190)](_0x598c50=>stringValue(_0x598c50))&&fail('datasets['+_0x564aea+_0x4162b9(0x19d)+_0x105529+_0x4162b9(0x17b));}_0x151083[_0x4162b9(0x177)](_0x210b3c,_0x1cda4e);}const _0x33e852=new Set(),_0x29ef86=new Set();for(const [_0x36fc4e,_0x4c9da0]of _0x54d4cd[_0x4162b9(0x19f)]()){const _0x2a7122=validateRelation(_0x4c9da0,_0x36fc4e,_0x4e9209,_0x151083);if(_0x33e852[_0x4162b9(0x19c)](_0x2a7122))fail(_0x4162b9(0x154));_0x33e852[_0x4162b9(0x150)](_0x2a7122);const _0x558e0e=_0x2a7122[_0x4162b9(0x188)]('\x00',0x2)['join']('\x00');if(_0x29ef86[_0x4162b9(0x19c)](_0x558e0e))fail('Each\x20source\x20field\x20may\x20target\x20at\x20most\x20one\x20relation.');_0x29ef86[_0x4162b9(0x150)](_0x558e0e);}for(const [_0x529f7d,_0x211669]of _0x5794a4[_0x4162b9(0x19f)]()){requiredString(_0x211669['reason'],'unresolvedRelations['+_0x529f7d+_0x4162b9(0x197)),validateConfidence(_0x211669[_0x4162b9(0x162)],_0x4162b9(0x1b6)+_0x529f7d+'].confidence');}return _0x289666;}export function reconcileBatchResult(_0x589cf8){const _0x347c08=a59_0x347296;if(!isObject(_0x589cf8))return null;try{const _0x28b514=stringArray(_0x589cf8[_0x347c08(0x16d)],_0x347c08(0x16d),0x1,0x14),_0x5b4efb=new Set(_0x28b514);if(_0x5b4efb[_0x347c08(0x16f)]!==_0x28b514[_0x347c08(0x1b9)]||_0x28b514[_0x347c08(0x190)](_0x11b62a=>!LOCAL_KEY[_0x347c08(0x17d)](_0x11b62a)))return null;const _0x26051c=objectArray(_0x589cf8[_0x347c08(0x1aa)],_0x347c08(0x1aa),0x1,0x14),_0x2d4d99=new Map(),_0x5e76f0=new Set();for(const _0x3dc168 of _0x26051c){const _0x58ba91=requiredString(_0x3dc168['localKey'],_0x347c08(0x170)),_0x354b0c=requiredString(_0x3dc168[_0x347c08(0x1ae)]??_0x3dc168[_0x347c08(0x181)],_0x347c08(0x1bf));if(_0x2d4d99[_0x347c08(0x19c)](_0x58ba91)||_0x5e76f0['has'](_0x354b0c))return null;_0x2d4d99[_0x347c08(0x177)](_0x58ba91,_0x354b0c),_0x5e76f0[_0x347c08(0x150)](_0x354b0c);}if(!sameSet(_0x5b4efb,new Set(_0x2d4d99[_0x347c08(0x17a)]())))return null;const _0x1b30e9=objectArray(_0x589cf8['expectedRelations'],'expectedRelations',0x0,0xc8),_0x3eee3a=objectArray(_0x589cf8[_0x347c08(0x1ba)],_0x347c08(0x1ba),0x0,0xc8),_0x317eda=relationTupleSet(_0x1b30e9,![],_0x2d4d99),_0x5bd263=relationTupleSet(_0x3eee3a,!![],_0x2d4d99);if(!_0x317eda||!_0x5bd263||!sameSet(_0x317eda,_0x5bd263))return null;const _0x205633=objectArray(_0x589cf8[_0x347c08(0x18b)],_0x347c08(0x18b),0x0,0xc8);return{'expectedLocalKeys':_0x28b514,'expectedRelations':_0x1b30e9,'createdDatasets':_0x26051c,'createdRelations':_0x3eee3a,'unresolvedRelations':_0x205633,...isObject(_0x589cf8[_0x347c08(0x180)])?{'metrics':_0x589cf8[_0x347c08(0x180)]}:{}};}catch{return null;}}function validateRelation(_0x1288a5,_0x5096ac,_0x4b7341,_0x4a1ac0){const _0xfd02d3=a59_0x347296,_0x459e2e='relations['+_0x5096ac+']',_0x3619c0=requiredString(_0x1288a5[_0xfd02d3(0x15c)],_0x459e2e+_0xfd02d3(0x167)),_0x296474=requiredString(_0x1288a5[_0xfd02d3(0x17f)],_0x459e2e+_0xfd02d3(0x195)),_0x2ad533=requiredString(_0x1288a5[_0xfd02d3(0x18f)],_0x459e2e+_0xfd02d3(0x1bd))['toLowerCase'](),_0x5a7bcf=requiredString(_0x1288a5[_0xfd02d3(0x182)],_0x459e2e+_0xfd02d3(0x15a))['toLowerCase']();if(!_0x4b7341[_0xfd02d3(0x19c)](_0x3619c0)||!_0x4b7341[_0xfd02d3(0x19c)](_0x296474))fail(_0x459e2e+'\x20references\x20an\x20unknown\x20dataset\x20localKey.');const _0x572bbb=_0x4a1ac0[_0xfd02d3(0x157)](_0x3619c0)?.[_0xfd02d3(0x157)](_0x2ad533),_0x2e9767=_0x4a1ac0[_0xfd02d3(0x157)](_0x296474)?.[_0xfd02d3(0x157)](_0x5a7bcf);if(_0x572bbb===undefined||_0x2e9767===undefined)fail(_0x459e2e+_0xfd02d3(0x198));if(_0x572bbb&&_0x2e9767&&_0x572bbb!==_0x2e9767)fail(_0x459e2e+_0xfd02d3(0x192));const _0x3e784b=stringValue(_0x1288a5[_0xfd02d3(0x176)])||_0xfd02d3(0x158);if(_0x3e784b!==_0xfd02d3(0x158))fail(_0x459e2e+'.relationType\x20must\x20be\x20\x22lookup\x22.');const _0x5642c5=stringValue(_0x1288a5['cardinality'])||'MANY_TO_ONE';if(!SUPPORTED_CARDINALITIES['has'](_0x5642c5))fail(_0x459e2e+_0xfd02d3(0x183));return requiredString(_0x1288a5[_0xfd02d3(0x1b0)],_0x459e2e+_0xfd02d3(0x191)),validateConfidence(_0x1288a5[_0xfd02d3(0x162)],_0x459e2e+'.confidence'),tuple(_0x3619c0,_0x2ad533,_0x296474,_0x5a7bcf,_0xfd02d3(0x158),_0x5642c5);}function relationTupleSet(_0x2ad9a3,_0x18ce3b,_0xe1b240){const _0x253887=a59_0x347296,_0x62b73d=new Set();for(const _0x57048d of _0x2ad9a3){const _0x68da3b=stringValue(_0x57048d[_0x253887(0x15c)]),_0x2ad604=stringValue(_0x57048d['toDatasetKey']),_0xd41b35=stringValue(_0x57048d[_0x253887(0x18f)])[_0x253887(0x1ab)](),_0x384ae1=stringValue(_0x57048d['toField'])[_0x253887(0x1ab)](),_0x5dccda=stringValue(_0x57048d['relationType']),_0x3305df=stringValue(_0x57048d[_0x253887(0x1af)]);if(!_0x68da3b||!_0x2ad604||!_0xd41b35||!_0x384ae1||_0x5dccda!==_0x253887(0x158)||!SUPPORTED_CARDINALITIES[_0x253887(0x19c)](_0x3305df))return null;if(!_0xe1b240[_0x253887(0x19c)](_0x68da3b)||!_0xe1b240[_0x253887(0x19c)](_0x2ad604))return null;if(_0x18ce3b&&(stringValue(_0x57048d[_0x253887(0x194)])!==_0xe1b240[_0x253887(0x157)](_0x68da3b)||stringValue(_0x57048d[_0x253887(0x1a6)])!==_0xe1b240['get'](_0x2ad604)))return null;const _0x2eff43=tuple(_0x68da3b,_0xd41b35,_0x2ad604,_0x384ae1,_0x5dccda,_0x3305df);if(_0x62b73d[_0x253887(0x19c)](_0x2eff43))return null;_0x62b73d[_0x253887(0x150)](_0x2eff43);}return _0x62b73d;}function rejectServerDatasetIdentity(_0xef4ddc,_0x2e11dd){const _0x3fb92e=a59_0x347296;for(const _0x2f64c9 of['id',_0x3fb92e(0x1bb),_0x3fb92e(0x18e),'code','datasetCode',_0x3fb92e(0x1b4)]){if(_0xef4ddc[_0x2f64c9]!==undefined&&_0xef4ddc[_0x2f64c9]!==null&&_0xef4ddc[_0x2f64c9]!=='')fail(_0x2e11dd+'.'+_0x2f64c9+_0x3fb92e(0x1ad));}}function objectArray(_0xaf318b,_0x9efa80,_0x471b34,_0x40b177){const _0x3a32c6=a59_0x347296;return(!Array[_0x3a32c6(0x18a)](_0xaf318b)||_0xaf318b[_0x3a32c6(0x1b9)]<_0x471b34||_0xaf318b[_0x3a32c6(0x1b9)]>_0x40b177||_0xaf318b[_0x3a32c6(0x190)](_0x59b5ca=>!isObject(_0x59b5ca)))&&fail(_0x9efa80+_0x3a32c6(0x18d)+_0x471b34+'..'+_0x40b177+'\x20objects.'),_0xaf318b;}function stringArray(_0x9a1a90,_0x2b8675,_0xa856ec,_0x52d94d){const _0x1d276a=a59_0x347296;return(!Array[_0x1d276a(0x18a)](_0x9a1a90)||_0x9a1a90[_0x1d276a(0x1b9)]<_0xa856ec||_0x9a1a90[_0x1d276a(0x1b9)]>_0x52d94d||_0x9a1a90[_0x1d276a(0x190)](_0xc3456d=>typeof _0xc3456d!==_0x1d276a(0x18c)||!_0xc3456d[_0x1d276a(0x1a9)]()))&&fail(_0x2b8675+_0x1d276a(0x18d)+_0xa856ec+'..'+_0x52d94d+'\x20non-empty\x20strings.'),_0x9a1a90;}function requiredString(_0x495495,_0x549b87){const _0x135a51=a59_0x347296,_0x59726d=stringValue(_0x495495);if(!_0x59726d)fail(_0x549b87+_0x135a51(0x16a));return _0x59726d;}function stringValue(_0x2fa7d4){const _0x5f0f8d=a59_0x347296;return typeof _0x2fa7d4===_0x5f0f8d(0x18c)?_0x2fa7d4['trim']():'';}function fieldName(_0x2884a9){const _0xa767d=a59_0x347296;return stringValue(_0x2884a9[_0xa767d(0x1ae)]??_0x2884a9[_0xa767d(0x17e)]??_0x2884a9['name']??_0x2884a9[_0xa767d(0x151)]);}function validateConfidence(_0x51235a,_0x49bb71){const _0xa61311=a59_0x347296;_0x51235a!==undefined&&_0x51235a!==null&&(typeof _0x51235a!==_0xa61311(0x1b5)||!Number[_0xa61311(0x14c)](_0x51235a)||_0x51235a<0x0||_0x51235a>0x1)&&fail(_0x49bb71+_0xa61311(0x161));}function a59_0x92c2(_0x5b6b33,_0x35185d){_0x5b6b33=_0x5b6b33-0x14c;const _0x51fd62=a59_0x51fd();let _0x92c2e3=_0x51fd62[_0x5b6b33];return _0x92c2e3;}function tuple(..._0x1c0b92){const _0x536a01=a59_0x347296;return _0x1c0b92[_0x536a01(0x169)]((_0x21ac43,_0x50b8b4)=>_0x50b8b4===0x1||_0x50b8b4===0x3?_0x21ac43['toLowerCase']():_0x21ac43)[_0x536a01(0x193)]('\x00');}function sameSet(_0x17f73b,_0x31514c){const _0x36d31d=a59_0x347296;return _0x17f73b[_0x36d31d(0x16f)]===_0x31514c['size']&&[..._0x17f73b][_0x36d31d(0x156)](_0x1e229e=>_0x31514c[_0x36d31d(0x19c)](_0x1e229e));}function isObject(_0x416560){const _0x5f2096=a59_0x347296;return typeof _0x416560===_0x5f2096(0x16e)&&_0x416560!==null&&!Array['isArray'](_0x416560);}function fail(_0x438093){throw CliErrors['validation'](_0x438093);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a58_0x47f237=a58_0x3f63;(function(_0x354a8f,_0x20fa14){const _0x46e5fa=a58_0x3f63,_0x59d17c=_0x354a8f();while(!![]){try{const _0x4a782f=-parseInt(_0x46e5fa(0x191))/0x1+parseInt(_0x46e5fa(0x1ba))/0x2+parseInt(_0x46e5fa(0x1a8))/0x3*(-parseInt(_0x46e5fa(0x1ad))/0x4)+parseInt(_0x46e5fa(0x184))/0x5*(-parseInt(_0x46e5fa(0x195))/0x6)+-parseInt(_0x46e5fa(0x182))/0x7+parseInt(_0x46e5fa(0x1b2))/0x8+parseInt(_0x46e5fa(0x193))/0x9;if(_0x4a782f===_0x20fa14)break;else _0x59d17c['push'](_0x59d17c['shift']());}catch(_0x5e7e4d){_0x59d17c['push'](_0x59d17c['shift']());}}}(a58_0x3d8b,0x70a73));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=a58_0x47f237(0x1b4),METADATA_BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP=a58_0x47f237(0x19d);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x12a6de,input:_0x3b6e74,dryRun:_0x24d420}){const _0x3dd3ea=a58_0x47f237;validateInput(_0x3b6e74);const _0x5dffa9=normalizeBusinessGroupArgument(_0x3b6e74[_0x3dd3ea(0x1c4)]),_0x3c141b=await getDatasetDetail(_0x3b6e74[_0x3dd3ea(0x1ac)]),_0x3832d9=resolveBusinessGroupDataset(_0x3c141b,_0x3b6e74[_0x3dd3ea(0x1ac)]);assertBusinessGroupUpdateSupported(_0x3832d9,_0x5dffa9);const _0x114f5b=loadCurrentBusinessGroup(_0x3c141b,_0x3832d9);assertExpectedBusinessGroup(_0x114f5b,_0x3b6e74[_0x3dd3ea(0x17e)]);const _0x45c29c=buildBackendPlan(_0x12a6de,_0x3832d9,_0x5dffa9),_0x2fef8f=_0x114f5b!==_0x5dffa9;let _0x5a3ebb;if(_0x2fef8f&&!_0x24d420){_0x45c29c[_0x3dd3ea(0x189)]===_0x3dd3ea(0x1bf)?await updateDbTableBusinessGroup(_0x45c29c[_0x3dd3ea(0x1a6)]):await updateErBusinessGroup(_0x45c29c[_0x3dd3ea(0x1a6)]);const _0x46dd18=await getDatasetDetail(_0x3832d9[_0x3dd3ea(0x1ac)]),_0x46541a=resolveBusinessGroupDataset(_0x46dd18,_0x3832d9[_0x3dd3ea(0x1ac)]),_0x1ee0b5=loadCurrentBusinessGroup(_0x46dd18,_0x46541a);if(_0x1ee0b5!==_0x5dffa9)throw CliErrors['apiError'](_0x3dd3ea(0x1ab),_0x3dd3ea(0x1b9)+JSON[_0x3dd3ea(0x180)](displayBusinessGroup(_0x5dffa9))+_0x3dd3ea(0x1b7)+JSON[_0x3dd3ea(0x180)](displayBusinessGroup(_0x1ee0b5))+'.');_0x5a3ebb={'verified':!![],'status':_0x3dd3ea(0x1a5),'afterReadback':{'businessGroup':displayBusinessGroup(_0x1ee0b5)}};}else!_0x2fef8f&&(_0x5a3ebb={'verified':!![],'status':_0x3dd3ea(0x1c8),'afterReadback':{'businessGroup':displayBusinessGroup(_0x114f5b)}});const _0x334642={'operation':_0x3dd3ea(0x1bb),'appCode':_0x12a6de,'selector':{'code':_0x3832d9[_0x3dd3ea(0x1ac)]},'dataset':{'id':_0x3832d9['id'],'code':_0x3832d9[_0x3dd3ea(0x1ac)],'name':_0x3832d9[_0x3dd3ea(0x1a7)],'sourceType':_0x3832d9['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x114f5b)},'after':{'businessGroup':displayBusinessGroup(_0x5dffa9)},'changed':_0x2fef8f,'dryRun':_0x24d420,'submitted':_0x2fef8f&&!_0x24d420,'backend':{'method':_0x45c29c[_0x3dd3ea(0x1be)],'path':_0x45c29c[_0x3dd3ea(0x19a)],'payload':_0x45c29c[_0x3dd3ea(0x1a6)]},..._0x5a3ebb?{'verification':_0x5a3ebb}:{},'warnings':[]};return{'ok':!![],'data':_0x334642,'message':_0x2fef8f?_0x24d420?_0x3dd3ea(0x187)+_0x3832d9[_0x3dd3ea(0x1ac)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x3832d9[_0x3dd3ea(0x1ac)]:_0x3dd3ea(0x181)+_0x3832d9[_0x3dd3ea(0x1ac)]};}export const datasetBusinessGroupUpdate={'service':a58_0x47f237(0x199),'command':a58_0x47f237(0x1c1),'description':a58_0x47f237(0x198),'risk':'write','flags':[CODE_FLAG,{'name':'business-group','type':a58_0x47f237(0x188),'required':!![],'description':a58_0x47f237(0x1c0)},{'name':a58_0x47f237(0x18d),'type':a58_0x47f237(0x188),'required':![],'description':a58_0x47f237(0x18f)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xd53149){validateInput(readBusinessGroupUpdateInput(_0xd53149));},async 'dryRun'(_0x6f1761){const _0x290126=a58_0x47f237,_0x15ea79=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x6f1761[_0x290126(0x186)],'input':readBusinessGroupUpdateInput(_0x6f1761),'dryRun':!![]});return{'method':_0x15ea79[_0x290126(0x1af)][_0x290126(0x19b)]['method'],'url':_0x15ea79['data'][_0x290126(0x19b)][_0x290126(0x19a)],'body':_0x15ea79[_0x290126(0x1af)][_0x290126(0x19b)][_0x290126(0x1a6)],'description':_0x15ea79['message'],..._0x15ea79['data']};},async 'execute'(_0x5e1bfe){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x5e1bfe['appCode'],'input':readBusinessGroupUpdateInput(_0x5e1bfe),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x58bb0e){const _0x213c93=a58_0x47f237,_0x7d3766=_0x58bb0e[_0x213c93(0x17f)]('expect-business-group');return{'code':trim(_0x58bb0e[_0x213c93(0x17f)](_0x213c93(0x1ac))),'businessGroup':_0x58bb0e[_0x213c93(0x17f)](_0x213c93(0x1c3)),'expectBusinessGroup':_0x7d3766===undefined||_0x7d3766===''?undefined:_0x7d3766};}function validateInput(_0x69fa1f){const _0x530f2c=a58_0x47f237;if(!trim(_0x69fa1f['code']))throw CliErrors[_0x530f2c(0x19f)](_0x530f2c(0x1a0));if(_0x69fa1f[_0x530f2c(0x1c4)]===undefined)throw CliErrors[_0x530f2c(0x19f)](_0x530f2c(0x18a));if(!trim(_0x69fa1f[_0x530f2c(0x1c4)]))throw CliErrors['validation'](_0x530f2c(0x1b6));}function assertBusinessGroupUpdateSupported(_0x231992,_0x9a0a04){const _0x3518d0=a58_0x47f237;if(_0x231992[_0x3518d0(0x1ae)]===_0x3518d0(0x1bc)&&!_0x9a0a04)throw CliErrors[_0x3518d0(0x19f)](_0x3518d0(0x1a1));}function resolveBusinessGroupDataset(_0x342d95,_0x59a86b){const _0x2f0f82=a58_0x47f237,_0x475ae7=asPlainObject(_0x342d95[_0x2f0f82(0x199)]),_0x38e938=asPlainObject(_0x342d95[_0x2f0f82(0x1a9)]),_0x4a66bf=resolveSourceType(_0x342d95,_0x475ae7,_0x38e938),_0x2a3a8b=firstString(_0x342d95[_0x2f0f82(0x192)],_0x342d95[_0x2f0f82(0x1ac)],_0x475ae7[_0x2f0f82(0x1a4)],_0x59a86b)||_0x59a86b;return{'id':firstNumber(_0x342d95['modelId'],_0x342d95['id'],_0x475ae7[_0x2f0f82(0x1a3)])??firstString(_0x342d95[_0x2f0f82(0x197)],_0x342d95['id'],_0x475ae7[_0x2f0f82(0x1a3)])??null,'code':_0x2a3a8b,'name':firstString(_0x342d95[_0x2f0f82(0x1a7)],_0x475ae7['datasetName'],_0x475ae7['name'])||null,'sourceType':_0x4a66bf,'dbTableSelector':_0x4a66bf===_0x2f0f82(0x1bc)?{'dbLinkId':firstNumber(_0x38e938['dbId']),'tableName':firstString(_0x38e938[_0x2f0f82(0x1c5)])||null}:null};}function resolveSourceType(_0x404b4e,_0x6cf56a,_0x3981e9){const _0x350afb=a58_0x47f237,_0x3d19b1=firstString(_0x404b4e[_0x350afb(0x1bd)],_0x404b4e[_0x350afb(0x1ae)],_0x6cf56a[_0x350afb(0x1bd)],_0x6cf56a['sourceType'])?.[_0x350afb(0x1c7)]()[_0x350afb(0x183)]();if(_0x3d19b1===_0x350afb(0x1bc)||_0x3d19b1===_0x350afb(0x19c))return _0x3d19b1;if(Object['keys'](_0x3981e9)[_0x350afb(0x18e)]>0x0)return _0x350afb(0x1bc);throw CliErrors[_0x350afb(0x19f)](_0x350afb(0x18b));}function loadCurrentBusinessGroup(_0x308eda,_0x3612c7){const _0x1092ce=a58_0x47f237,_0x2527d7=readBusinessGroupFromDatasetDetail(_0x308eda,_0x3612c7[_0x1092ce(0x1ae)]);if(_0x2527d7[_0x1092ce(0x1c6)])return normalizeBusinessGroup(_0x2527d7['value']);return'';}function readBusinessGroupFromDatasetDetail(_0x252c1a,_0x36b35c){const _0x554a0f=a58_0x47f237,_0x1f8cb7=asPlainObject(_0x252c1a[_0x554a0f(0x199)]),_0x36b162=firstPresent(_0x252c1a[_0x554a0f(0x1c4)]);if(_0x36b162[_0x554a0f(0x1c6)])return _0x36b162;const _0xa1c2e=firstPresent(_0x1f8cb7[_0x554a0f(0x1c4)]);if(_0xa1c2e[_0x554a0f(0x1c6)])return _0xa1c2e;if(_0x36b35c===_0x554a0f(0x1bc))return{'found':![]};const _0x2e1f51=readBusinessGroupFromExtend(_0x252c1a[_0x554a0f(0x1b8)]);if(_0x2e1f51[_0x554a0f(0x1c6)])return _0x2e1f51;return readBusinessGroupFromExtend(_0x1f8cb7[_0x554a0f(0x1b8)]);}function a58_0x3f63(_0x2cb5f4,_0x463ca1){_0x2cb5f4=_0x2cb5f4-0x17e;const _0x3d8b24=a58_0x3d8b();let _0x3f6394=_0x3d8b24[_0x2cb5f4];return _0x3f6394;}function readBusinessGroupFromExtend(_0x1ff11e){const _0x3f457e=a58_0x47f237;if(_0x1ff11e===undefined||_0x1ff11e===null||_0x1ff11e==='')return{'found':![]};if(typeof _0x1ff11e===_0x3f457e(0x188))try{const _0x664610=JSON[_0x3f457e(0x196)](_0x1ff11e);return readBusinessGroupFromExtend(_0x664610);}catch{return{'found':![]};}const _0x1fe0f3=asPlainObject(_0x1ff11e);if(Object[_0x3f457e(0x190)]['hasOwnProperty']['call'](_0x1fe0f3,_0x3f457e(0x1c4)))return{'found':!![],'value':_0x1fe0f3[_0x3f457e(0x1c4)]};return{'found':![]};}function a58_0x3d8b(){const _0xacd354=['data','POST','isArray','496384SNanMm','number','/smartapi/dblink/updateTableBusinessGroup','metadata','--business-group\x20must\x20not\x20be\x20blank',',\x20actual\x20','extend','Expected\x20','691694rxRBBO','update','DB_TABLE','source','method','db-table','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','business-group-update','dbLinkId','business-group','businessGroup','tableName','found','trim','unchanged','expectBusinessGroup','str','stringify','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','872928QYzXla','toUpperCase','250610qeJZbF','dbTableSelector','appCode','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','string','kind','--business-group\x20is\x20required','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','isFinite','expect-business-group','length','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','prototype','95450AEMBZq','modelCode','8940582VGzpXY','object','42Dwndhc','parse','modelId','Update\x20business\x20scenario\x20group','dataset','path','backend','METADATA','ungrouped','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','validation','--code\x20is\x20required','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','datasetId','datasetCode','matched','payload','name','3QAQOJd','dbtableConfig','Expectation\x20mismatch\x20at\x20businessGroup','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','code','1475432rVlTkJ','sourceType'];a58_0x3d8b=function(){return _0xacd354;};return a58_0x3d8b();}function firstPresent(..._0x305567){for(const _0x277a09 of _0x305567){if(_0x277a09!==undefined&&_0x277a09!==null)return{'found':!![],'value':_0x277a09};}return{'found':![]};}function assertExpectedBusinessGroup(_0x49e712,_0x55fc69){const _0x273599=a58_0x47f237;if(_0x55fc69===undefined)return;const _0x58f2c2=normalizeBusinessGroupArgument(_0x55fc69);if(_0x49e712!==_0x58f2c2)throw CliErrors['validation'](_0x273599(0x1aa),_0x273599(0x1b9)+JSON[_0x273599(0x180)](_0x58f2c2)+_0x273599(0x1b7)+JSON[_0x273599(0x180)](_0x49e712));}function buildBackendPlan(_0x4da668,_0x5853fe,_0x2e4b8d){const _0x18bfc0=a58_0x47f237;if(_0x5853fe['sourceType']==='DB_TABLE'){if(!_0x5853fe[_0x18bfc0(0x185)]||_0x5853fe[_0x18bfc0(0x185)][_0x18bfc0(0x1c2)]===null||!_0x5853fe[_0x18bfc0(0x185)][_0x18bfc0(0x1c5)])throw CliErrors[_0x18bfc0(0x19f)](_0x18bfc0(0x1a2),_0x18bfc0(0x19e));return{'kind':_0x18bfc0(0x1bf),'method':_0x18bfc0(0x1b0),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x5853fe[_0x18bfc0(0x185)]['dbLinkId'],'tableName':_0x5853fe['dbTableSelector'][_0x18bfc0(0x1c5)],'businessGroup':_0x2e4b8d}};}return{'kind':_0x18bfc0(0x1b5),'method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x4da668,'datasetCode':_0x5853fe[_0x18bfc0(0x1ac)],'businessGroup':_0x2e4b8d}};}function normalizeBusinessGroup(_0x5eac4c){const _0x5aea50=a58_0x47f237;if(_0x5eac4c===undefined||_0x5eac4c===null)return'';return String(_0x5eac4c)[_0x5aea50(0x1c7)]();}function normalizeBusinessGroupArgument(_0x1cfe68){const _0x2a9fc4=normalizeBusinessGroup(_0x1cfe68);return _0x2a9fc4===UNGROUPED_BUSINESS_GROUP?'':_0x2a9fc4;}function displayBusinessGroup(_0xd61f4){return _0xd61f4||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x11450a){const _0x3bb09e=a58_0x47f237;if(!_0x11450a||typeof _0x11450a!==_0x3bb09e(0x194)||Array[_0x3bb09e(0x1b1)](_0x11450a))return{};return _0x11450a;}function firstString(..._0x1ac682){const _0xa62aa8=a58_0x47f237;for(const _0x2f6ccf of _0x1ac682){if(typeof _0x2f6ccf==='string'&&_0x2f6ccf[_0xa62aa8(0x1c7)]())return _0x2f6ccf['trim']();if(typeof _0x2f6ccf===_0xa62aa8(0x1b3)&&Number[_0xa62aa8(0x18c)](_0x2f6ccf))return String(_0x2f6ccf);}return undefined;}function firstNumber(..._0x19ab21){const _0x1e1ddb=a58_0x47f237;for(const _0x4c81f5 of _0x19ab21){if(typeof _0x4c81f5===_0x1e1ddb(0x1b3)&&Number['isFinite'](_0x4c81f5))return _0x4c81f5;if(typeof _0x4c81f5===_0x1e1ddb(0x188)&&_0x4c81f5[_0x1e1ddb(0x1c7)]()&&Number['isFinite'](Number(_0x4c81f5)))return Number(_0x4c81f5);}return null;}function trim(_0x4667f4){const _0x4558ee=a58_0x47f237;return String(_0x4667f4||'')[_0x4558ee(0x1c7)]();}
|
|
1
|
+
function a60_0x553f(_0x5ee713,_0x2ab308){_0x5ee713=_0x5ee713-0x14b;const _0x9ee975=a60_0x9ee9();let _0x553f53=_0x9ee975[_0x5ee713];return _0x553f53;}const a60_0x1ade5b=a60_0x553f;(function(_0x96ea96,_0x22af91){const _0x2b2571=a60_0x553f,_0x75cf8d=_0x96ea96();while(!![]){try{const _0x317be3=parseInt(_0x2b2571(0x18c))/0x1+-parseInt(_0x2b2571(0x15e))/0x2+parseInt(_0x2b2571(0x155))/0x3+parseInt(_0x2b2571(0x14c))/0x4+parseInt(_0x2b2571(0x17b))/0x5+-parseInt(_0x2b2571(0x184))/0x6+-parseInt(_0x2b2571(0x157))/0x7;if(_0x317be3===_0x22af91)break;else _0x75cf8d['push'](_0x75cf8d['shift']());}catch(_0x4860f1){_0x75cf8d['push'](_0x75cf8d['shift']());}}}(a60_0x9ee9,0x5b39e));function a60_0x9ee9(){const _0xe3cd08=['3388553JOqdeH','string','Update\x20business\x20scenario\x20group','unchanged','extend','dbTableSelector','Expectation\x20mismatch\x20at\x20businessGroup','700420pGNnaP','--business-group\x20must\x20not\x20be\x20blank','isArray','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','code','stringify','matched','method','DB_TABLE','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','apiError','POST','trim','validation',',\x20actual\x20','db-table','parse','business-group','value','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','dbId','appCode','/smartapi/dblink/updateTableBusinessGroup','keys','Expected\x20','found','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','write','dbLinkId','2431335gEHhgw','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','data','toUpperCase','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','payload','businessGroup','isFinite','backend','1666872nOEPzu','str','modelId','expectBusinessGroup','call','modelCode','dataset','METADATA','26430eaZFwF','datasetCode','datasetId','tableName','path','kind','name','/smartapi/question/er-config/business-group/edit','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','1073612QjFZnj','object','expect-business-group','hasOwnProperty','--business-group\x20is\x20required','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','ungrouped','number','2113989QqEuBG','sourceType'];a60_0x9ee9=function(){return _0xe3cd08;};return a60_0x9ee9();}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=a60_0x1ade5b(0x174),METADATA_BACKEND_PATH=a60_0x1ade5b(0x193),UNGROUPED_BUSINESS_GROUP=a60_0x1ade5b(0x153);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0xf46148,input:_0x3780c9,dryRun:_0x3f3a8a}){const _0x461839=a60_0x1ade5b;validateInput(_0x3780c9);const _0x1874d7=normalizeBusinessGroupArgument(_0x3780c9['businessGroup']),_0x215829=await getDatasetDetail(_0x3780c9[_0x461839(0x162)]),_0x2afed2=resolveBusinessGroupDataset(_0x215829,_0x3780c9[_0x461839(0x162)]);assertBusinessGroupUpdateSupported(_0x2afed2,_0x1874d7);const _0x116cc8=loadCurrentBusinessGroup(_0x215829,_0x2afed2);assertExpectedBusinessGroup(_0x116cc8,_0x3780c9[_0x461839(0x187)]);const _0x4cdf6b=buildBackendPlan(_0xf46148,_0x2afed2,_0x1874d7),_0x5764c9=_0x116cc8!==_0x1874d7;let _0x136a3d;if(_0x5764c9&&!_0x3f3a8a){_0x4cdf6b[_0x461839(0x191)]===_0x461839(0x16d)?await updateDbTableBusinessGroup(_0x4cdf6b[_0x461839(0x180)]):await updateErBusinessGroup(_0x4cdf6b[_0x461839(0x180)]);const _0x24913d=await getDatasetDetail(_0x2afed2[_0x461839(0x162)]),_0x3ea5ac=resolveBusinessGroupDataset(_0x24913d,_0x2afed2[_0x461839(0x162)]),_0x55f809=loadCurrentBusinessGroup(_0x24913d,_0x3ea5ac);if(_0x55f809!==_0x1874d7)throw CliErrors[_0x461839(0x168)](_0x461839(0x151),_0x461839(0x176)+JSON[_0x461839(0x163)](displayBusinessGroup(_0x1874d7))+',\x20actual\x20'+JSON[_0x461839(0x163)](displayBusinessGroup(_0x55f809))+'.');_0x136a3d={'verified':!![],'status':_0x461839(0x164),'afterReadback':{'businessGroup':displayBusinessGroup(_0x55f809)}};}else!_0x5764c9&&(_0x136a3d={'verified':!![],'status':_0x461839(0x15a),'afterReadback':{'businessGroup':displayBusinessGroup(_0x116cc8)}});const _0x3b7b9b={'operation':'update','appCode':_0xf46148,'selector':{'code':_0x2afed2[_0x461839(0x162)]},'dataset':{'id':_0x2afed2['id'],'code':_0x2afed2['code'],'name':_0x2afed2[_0x461839(0x192)],'sourceType':_0x2afed2[_0x461839(0x156)]},'before':{'businessGroup':displayBusinessGroup(_0x116cc8)},'after':{'businessGroup':displayBusinessGroup(_0x1874d7)},'changed':_0x5764c9,'dryRun':_0x3f3a8a,'submitted':_0x5764c9&&!_0x3f3a8a,'backend':{'method':_0x4cdf6b[_0x461839(0x165)],'path':_0x4cdf6b[_0x461839(0x190)],'payload':_0x4cdf6b['payload']},..._0x136a3d?{'verification':_0x136a3d}:{},'warnings':[]};return{'ok':!![],'data':_0x3b7b9b,'message':_0x5764c9?_0x3f3a8a?_0x461839(0x14b)+_0x2afed2[_0x461839(0x162)]:_0x461839(0x171)+_0x2afed2[_0x461839(0x162)]:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x2afed2[_0x461839(0x162)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':'business-group-update','description':a60_0x1ade5b(0x159),'risk':a60_0x1ade5b(0x179),'flags':[CODE_FLAG,{'name':a60_0x1ade5b(0x16f),'type':a60_0x1ade5b(0x158),'required':!![],'description':a60_0x1ade5b(0x17f)},{'name':a60_0x1ade5b(0x14e),'type':a60_0x1ade5b(0x158),'required':![],'description':a60_0x1ade5b(0x17c)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x30caa6){validateInput(readBusinessGroupUpdateInput(_0x30caa6));},async 'dryRun'(_0xbc8461){const _0x3ea14f=a60_0x1ade5b,_0x2768b6=await buildDatasetBusinessGroupUpdateResult({'appCode':_0xbc8461[_0x3ea14f(0x173)],'input':readBusinessGroupUpdateInput(_0xbc8461),'dryRun':!![]});return{'method':_0x2768b6[_0x3ea14f(0x17d)]['backend'][_0x3ea14f(0x165)],'url':_0x2768b6[_0x3ea14f(0x17d)][_0x3ea14f(0x183)][_0x3ea14f(0x190)],'body':_0x2768b6[_0x3ea14f(0x17d)]['backend'][_0x3ea14f(0x180)],'description':_0x2768b6['message'],..._0x2768b6[_0x3ea14f(0x17d)]};},async 'execute'(_0x359ffe){const _0x14cc6e=a60_0x1ade5b;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x359ffe[_0x14cc6e(0x173)],'input':readBusinessGroupUpdateInput(_0x359ffe),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x154407){const _0xbc9c58=a60_0x1ade5b,_0x4c8175=_0x154407[_0xbc9c58(0x185)](_0xbc9c58(0x14e));return{'code':trim(_0x154407[_0xbc9c58(0x185)](_0xbc9c58(0x162))),'businessGroup':_0x154407[_0xbc9c58(0x185)](_0xbc9c58(0x16f)),'expectBusinessGroup':_0x4c8175===undefined||_0x4c8175===''?undefined:_0x4c8175};}function validateInput(_0x23d45e){const _0x1bb827=a60_0x1ade5b;if(!trim(_0x23d45e[_0x1bb827(0x162)]))throw CliErrors[_0x1bb827(0x16b)]('--code\x20is\x20required');if(_0x23d45e['businessGroup']===undefined)throw CliErrors['validation'](_0x1bb827(0x150));if(!trim(_0x23d45e['businessGroup']))throw CliErrors['validation'](_0x1bb827(0x15f));}function assertBusinessGroupUpdateSupported(_0x3bf33a,_0xd05321){const _0x2bb63f=a60_0x1ade5b;if(_0x3bf33a[_0x2bb63f(0x156)]===_0x2bb63f(0x166)&&!_0xd05321)throw CliErrors[_0x2bb63f(0x16b)](_0x2bb63f(0x161));}function resolveBusinessGroupDataset(_0x546443,_0x573926){const _0x1bd88a=a60_0x1ade5b,_0x5e397c=asPlainObject(_0x546443[_0x1bd88a(0x18a)]),_0x1ab15d=asPlainObject(_0x546443['dbtableConfig']),_0x27d4d1=resolveSourceType(_0x546443,_0x5e397c,_0x1ab15d),_0x2b1514=firstString(_0x546443[_0x1bd88a(0x189)],_0x546443['code'],_0x5e397c[_0x1bd88a(0x18d)],_0x573926)||_0x573926;return{'id':firstNumber(_0x546443[_0x1bd88a(0x186)],_0x546443['id'],_0x5e397c['datasetId'])??firstString(_0x546443[_0x1bd88a(0x186)],_0x546443['id'],_0x5e397c[_0x1bd88a(0x18e)])??null,'code':_0x2b1514,'name':firstString(_0x546443[_0x1bd88a(0x192)],_0x5e397c['datasetName'],_0x5e397c[_0x1bd88a(0x192)])||null,'sourceType':_0x27d4d1,'dbTableSelector':_0x27d4d1===_0x1bd88a(0x166)?{'dbLinkId':firstNumber(_0x1ab15d[_0x1bd88a(0x172)]),'tableName':firstString(_0x1ab15d['tableName'])||null}:null};}function resolveSourceType(_0x25815e,_0x3262dd,_0x235a65){const _0x6f3896=a60_0x1ade5b,_0xecdb47=firstString(_0x25815e['source'],_0x25815e['sourceType'],_0x3262dd['source'],_0x3262dd[_0x6f3896(0x156)])?.[_0x6f3896(0x16a)]()[_0x6f3896(0x17e)]();if(_0xecdb47===_0x6f3896(0x166)||_0xecdb47===_0x6f3896(0x18b))return _0xecdb47;if(Object[_0x6f3896(0x175)](_0x235a65)['length']>0x0)return _0x6f3896(0x166);throw CliErrors[_0x6f3896(0x16b)](_0x6f3896(0x152));}function loadCurrentBusinessGroup(_0x2949ad,_0xda1e6e){const _0x25dd39=a60_0x1ade5b,_0x2fe8a1=readBusinessGroupFromDatasetDetail(_0x2949ad,_0xda1e6e[_0x25dd39(0x156)]);if(_0x2fe8a1[_0x25dd39(0x177)])return normalizeBusinessGroup(_0x2fe8a1[_0x25dd39(0x170)]);return'';}function readBusinessGroupFromDatasetDetail(_0x4d0852,_0x17df43){const _0x4cd085=a60_0x1ade5b,_0x4be748=asPlainObject(_0x4d0852[_0x4cd085(0x18a)]),_0x374963=firstPresent(_0x4d0852['businessGroup']);if(_0x374963['found'])return _0x374963;const _0x2cd2cd=firstPresent(_0x4be748[_0x4cd085(0x181)]);if(_0x2cd2cd[_0x4cd085(0x177)])return _0x2cd2cd;if(_0x17df43===_0x4cd085(0x166))return{'found':![]};const _0x2ca5a5=readBusinessGroupFromExtend(_0x4d0852[_0x4cd085(0x15b)]);if(_0x2ca5a5[_0x4cd085(0x177)])return _0x2ca5a5;return readBusinessGroupFromExtend(_0x4be748['extend']);}function readBusinessGroupFromExtend(_0x36f732){const _0x5dd2ab=a60_0x1ade5b;if(_0x36f732===undefined||_0x36f732===null||_0x36f732==='')return{'found':![]};if(typeof _0x36f732==='string')try{const _0x382a75=JSON[_0x5dd2ab(0x16e)](_0x36f732);return readBusinessGroupFromExtend(_0x382a75);}catch{return{'found':![]};}const _0x13cc3c=asPlainObject(_0x36f732);if(Object['prototype'][_0x5dd2ab(0x14f)][_0x5dd2ab(0x188)](_0x13cc3c,'businessGroup'))return{'found':!![],'value':_0x13cc3c[_0x5dd2ab(0x181)]};return{'found':![]};}function firstPresent(..._0xf800b0){for(const _0x204771 of _0xf800b0){if(_0x204771!==undefined&&_0x204771!==null)return{'found':!![],'value':_0x204771};}return{'found':![]};}function assertExpectedBusinessGroup(_0x319a2a,_0x48f5fb){const _0x52f1f3=a60_0x1ade5b;if(_0x48f5fb===undefined)return;const _0x41998c=normalizeBusinessGroupArgument(_0x48f5fb);if(_0x319a2a!==_0x41998c)throw CliErrors[_0x52f1f3(0x16b)](_0x52f1f3(0x15d),'Expected\x20'+JSON[_0x52f1f3(0x163)](_0x41998c)+_0x52f1f3(0x16c)+JSON['stringify'](_0x319a2a));}function buildBackendPlan(_0x49c1e7,_0x5e7cff,_0x4258c5){const _0x2c6b45=a60_0x1ade5b;if(_0x5e7cff[_0x2c6b45(0x156)]===_0x2c6b45(0x166)){if(!_0x5e7cff['dbTableSelector']||_0x5e7cff[_0x2c6b45(0x15c)][_0x2c6b45(0x17a)]===null||!_0x5e7cff[_0x2c6b45(0x15c)][_0x2c6b45(0x18f)])throw CliErrors['validation'](_0x2c6b45(0x167),_0x2c6b45(0x178));return{'kind':_0x2c6b45(0x16d),'method':_0x2c6b45(0x169),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x5e7cff['dbTableSelector'][_0x2c6b45(0x17a)],'tableName':_0x5e7cff['dbTableSelector']['tableName'],'businessGroup':_0x4258c5}};}return{'kind':'metadata','method':_0x2c6b45(0x169),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x49c1e7,'datasetCode':_0x5e7cff[_0x2c6b45(0x162)],'businessGroup':_0x4258c5}};}function normalizeBusinessGroup(_0x45cf0c){const _0xe3648e=a60_0x1ade5b;if(_0x45cf0c===undefined||_0x45cf0c===null)return'';return String(_0x45cf0c)[_0xe3648e(0x16a)]();}function normalizeBusinessGroupArgument(_0x5579c0){const _0x53bb0c=normalizeBusinessGroup(_0x5579c0);return _0x53bb0c===UNGROUPED_BUSINESS_GROUP?'':_0x53bb0c;}function displayBusinessGroup(_0x4636d4){return _0x4636d4||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x2a817b){const _0x581330=a60_0x1ade5b;if(!_0x2a817b||typeof _0x2a817b!==_0x581330(0x14d)||Array[_0x581330(0x160)](_0x2a817b))return{};return _0x2a817b;}function firstString(..._0x4e9ef8){const _0x5c776b=a60_0x1ade5b;for(const _0x4d8609 of _0x4e9ef8){if(typeof _0x4d8609===_0x5c776b(0x158)&&_0x4d8609[_0x5c776b(0x16a)]())return _0x4d8609[_0x5c776b(0x16a)]();if(typeof _0x4d8609===_0x5c776b(0x154)&&Number['isFinite'](_0x4d8609))return String(_0x4d8609);}return undefined;}function firstNumber(..._0xa38bf0){const _0x2cd885=a60_0x1ade5b;for(const _0x546dd9 of _0xa38bf0){if(typeof _0x546dd9===_0x2cd885(0x154)&&Number[_0x2cd885(0x182)](_0x546dd9))return _0x546dd9;if(typeof _0x546dd9===_0x2cd885(0x158)&&_0x546dd9['trim']()&&Number[_0x2cd885(0x182)](Number(_0x546dd9)))return Number(_0x546dd9);}return null;}function trim(_0x22a4c8){const _0x538022=a60_0x1ade5b;return String(_0x22a4c8||'')[_0x538022(0x16a)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a61_0x2ca371=a61_0xeef3;function a61_0x553c(){const _0x4b1243=['List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','3021872IsHSvi','3498971PnNJIH','businessGroup','ungrouped','dataset','map','1036583tzCnik','number','length','business-groups','Found\x20','num','\x20business\x20group(s)\x20for\x20database\x20connection\x20','3753yXvRLZ','4jaScGv','97770wkkkwd','1260440fWimlX','3097047NDRisH','dbid','trim','6548365OGHdLq','6UQxyox','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'];a61_0x553c=function(){return _0x4b1243;};return a61_0x553c();}(function(_0x2d936f,_0x365e66){const _0x5eb937=a61_0xeef3,_0xd47b6b=_0x2d936f();while(!![]){try{const _0xed07e=-parseInt(_0x5eb937(0x7e))/0x1+-parseInt(_0x5eb937(0x90))/0x2+-parseInt(_0x5eb937(0x89))/0x3*(-parseInt(_0x5eb937(0x86))/0x4)+-parseInt(_0x5eb937(0x8c))/0x5+-parseInt(_0x5eb937(0x8d))/0x6*(parseInt(_0x5eb937(0x91))/0x7)+parseInt(_0x5eb937(0x88))/0x8+parseInt(_0x5eb937(0x85))/0x9*(parseInt(_0x5eb937(0x87))/0xa);if(_0xed07e===_0x365e66)break;else _0xd47b6b['push'](_0xd47b6b['shift']());}catch(_0x5400c8){_0xd47b6b['push'](_0xd47b6b['shift']());}}}(a61_0x553c,0xde22c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a61_0xeef3(_0x2a8c8f,_0x370dea){_0x2a8c8f=_0x2a8c8f-0x7a;const _0x553cca=a61_0x553c();let _0xeef3a9=_0x553cca[_0x2a8c8f];return _0xeef3a9;}import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a61_0x2ca371(0x7c),'command':a61_0x2ca371(0x81),'description':a61_0x2ca371(0x8f),'risk':'read','flags':[{'name':a61_0x2ca371(0x8a),'type':a61_0x2ca371(0x7f),'required':!![],'description':a61_0x2ca371(0x8e)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x223dec){const _0x4eac3d=a61_0x2ca371,_0xc0b6e1=_0x223dec[_0x4eac3d(0x83)](_0x4eac3d(0x8a)),_0xcbaf7=await getErBusinessGroupSummary(_0x223dec['appCode'],_0xc0b6e1),_0x55cab2=_0xcbaf7['groups'][_0x4eac3d(0x7d)](_0x37cf47=>({..._0x37cf47,'businessGroup':_0x37cf47[_0x4eac3d(0x7a)][_0x4eac3d(0x8b)]()||_0x4eac3d(0x7b)}));return{'ok':!![],'data':{..._0xcbaf7,'groups':_0x55cab2,'scope':'DB_TABLE'},'message':_0x4eac3d(0x82)+_0x55cab2[_0x4eac3d(0x80)]+_0x4eac3d(0x84)+_0xc0b6e1};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x1eea92=a62_0x139f;(function(_0x1a26b5,_0x56cdff){const _0x4f2e1f=a62_0x139f,_0x40299f=_0x1a26b5();while(!![]){try{const _0x43c808=-parseInt(_0x4f2e1f(0x16b))/0x1*(parseInt(_0x4f2e1f(0x166))/0x2)+-parseInt(_0x4f2e1f(0x149))/0x3+parseInt(_0x4f2e1f(0x16c))/0x4+-parseInt(_0x4f2e1f(0x14c))/0x5*(-parseInt(_0x4f2e1f(0x155))/0x6)+parseInt(_0x4f2e1f(0x168))/0x7*(-parseInt(_0x4f2e1f(0x162))/0x8)+-parseInt(_0x4f2e1f(0x158))/0x9+parseInt(_0x4f2e1f(0x153))/0xa;if(_0x43c808===_0x56cdff)break;else _0x40299f['push'](_0x40299f['shift']());}catch(_0x1f5c1f){_0x40299f['push'](_0x40299f['shift']());}}}(a62_0x4427,0x76a71));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a62_0x1eea92(0x151),'filter':a62_0x1eea92(0x169),'getOne':a62_0x1eea92(0x15e)};function a62_0x139f(_0x4fcb6a,_0x298440){_0x4fcb6a=_0x4fcb6a-0x149;const _0x4427bb=a62_0x4427();let _0x139f1c=_0x4427bb[_0x4fcb6a];return _0x139f1c;}export const RUNTIME_DATA_ACCESS_SUMMARY=a62_0x1eea92(0x14f);function valueToString(_0x5de5e3){const _0x4dab0e=a62_0x1eea92;return _0x5de5e3==null?'':String(_0x5de5e3)[_0x4dab0e(0x152)]();}function a62_0x4427(){const _0x11f465=['Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','validation','lovrabet','trim','21274540cdPmRR','The\x20current\x20dataset\x20\x22','5620692wOEOOu','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','1559241apRCdl','tableName','unknown','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','source','datasetName','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','modelCode','SQL\x20schema\x20validation','object','408GgtTIa','getOne','toUpperCase','dbId','114hpQcrn','code','118594DrbnVx','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','name','13544kmBMra','660908RZLViK','\x20is\x20','2802489FJuAgS','filter','dataset','5NPPOKz','UNKNOWN','dbtable'];a62_0x4427=function(){return _0x11f465;};return a62_0x4427();}function getDatasetCode(_0x3880c4){const _0x5b3963=a62_0x1eea92;return valueToString(_0x3880c4[_0x5b3963(0x167)]??_0x3880c4[_0x5b3963(0x15f)]??_0x3880c4[_0x5b3963(0x14b)]?.['datasetCode']);}function getDatasetName(_0x5ac4a2){const _0x5875e9=a62_0x1eea92;return valueToString(_0x5ac4a2[_0x5875e9(0x16a)]??_0x5ac4a2[_0x5875e9(0x14b)]?.[_0x5875e9(0x15d)])||_0x5875e9(0x15a);}function getDatasetSource(_0x49a4b4){const _0x254244=a62_0x1eea92;return valueToString(_0x49a4b4[_0x254244(0x15c)]??_0x49a4b4[_0x254244(0x14b)]?.['sourceType'])[_0x254244(0x164)]();}function getDbtableConfig(_0x2d80dd){const _0x30b0db=a62_0x1eea92,_0x2935fb=_0x2d80dd['dbtableConfig']??_0x2d80dd[_0x30b0db(0x14e)];return _0x2935fb&&typeof _0x2935fb===_0x30b0db(0x161)?_0x2935fb:{};}export function isDbTableBackedDataset(_0x4ae20a){const _0x5020aa=a62_0x1eea92,_0x178548=getDatasetSource(_0x4ae20a);if(_0x178548==='METADATA')return![];const _0x4143cd=getDbtableConfig(_0x4ae20a),_0xe0d530=_0x4143cd[_0x5020aa(0x165)]??_0x4143cd['id'],_0x981abe=valueToString(_0x4143cd[_0x5020aa(0x159)]??_0x4ae20a[_0x5020aa(0x159)]??_0x4ae20a[_0x5020aa(0x14b)]?.[_0x5020aa(0x159)]);return _0xe0d530!==undefined&&_0xe0d530!==null&&_0x981abe['length']>0x0;}export function filterDbTableBackedDatasets(_0xdc0d0f){const _0x599c1f=a62_0x1eea92;return _0xdc0d0f[_0x599c1f(0x14a)](_0x4e27ca=>isDbTableBackedDataset(_0x4e27ca));}export function buildDbTableBackedRequirementMessage(_0x3d632d,_0x5a75ac=a62_0x1eea92(0x160)){const _0x26e119=a62_0x1eea92,_0x3e7fd7=getDatasetSource(_0x3d632d)||_0x26e119(0x14d),_0x1c0a3e=getDatasetName(_0x3d632d),_0x2fffc7=getDatasetCode(_0x3d632d),_0xa3226d=_0x2fffc7?'\x20('+_0x2fffc7+')':'';return[_0x26e119(0x154)+_0x1c0a3e+'\x22'+_0xa3226d+_0x26e119(0x16d)+_0x3e7fd7+_0x26e119(0x156)+_0x5a75ac+'.','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.',_0x26e119(0x15b),_0x26e119(0x157)+RUNTIME_DATA_ACCESS_COMMANDS[_0x26e119(0x14a)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x26e119(0x163)]+'.']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x454cd3,_0x3b3c85){const _0x400f45=a62_0x1eea92;if(!isDbTableBackedDataset(_0x454cd3))throw CliErrors[_0x400f45(0x150)](buildDbTableBackedRequirementMessage(_0x454cd3,_0x3b3c85));}
|