@lovrabet/rabetbase-cli 2.5.1-beta.4 → 2.5.1-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -1
- 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.d.ts +0 -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/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.d.ts +2 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.d.ts +2 -0
- 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/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/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.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/template.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.d.ts +1 -0
- 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.d.ts +2 -0
- package/lib/commands/project/domain-routing-sync.js +1 -0
- 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.d.ts +2 -0
- package/lib/commands/rule/get.js +1 -0
- package/lib/commands/rule/index.d.ts +2 -0
- package/lib/commands/rule/index.js +1 -0
- package/lib/commands/rule/list.d.ts +2 -0
- package/lib/commands/rule/list.js +1 -0
- package/lib/commands/rule/set.d.ts +2 -0
- package/lib/commands/rule/set.js +1 -0
- package/lib/commands/rule/shared.d.ts +43 -0
- package/lib/commands/rule/shared.js +1 -0
- 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/deployment-sync.js +1 -1
- package/lib/config/domain-config.d.ts +37 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.d.ts +27 -0
- package/lib/config/project-domain-routing.js +1 -0
- package/lib/config/schema.d.ts +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +10 -4
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.d.ts +4 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +43 -49
- 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.d.ts +2 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +21 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.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/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/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.d.ts +83 -0
- package/lib/generated/official-routing.js +1 -0
- package/lib/generated/routing-contract.d.ts +9 -0
- package/lib/generated/routing-contract.js +1 -0
- 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/types/index.d.ts +0 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
- package/skills/rabetbase/SKILL.md +15 -12
- package/skills/rabetbase/guides/sdk-client-generation.md +10 -8
- package/skills/rabetbase/references/rabetbase-api-pull.md +16 -11
- package/skills/rabetbase/references/rabetbase-config.md +3 -3
- package/skills/rabetbase/references/rabetbase-database-template.md +36 -0
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -0
- package/skills/rabetbase/references/rabetbase-init.md +32 -8
- package/skills/rabetbase/references/rabetbase-project-create.md +33 -8
- package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +28 -0
- package/skills/rabetbase/references/rabetbase-rule.md +64 -0
- package/skills/rabetbase.manifest.json +6 -3
- package/lib/config/project-routing.d.ts +0 -30
- package/lib/config/project-routing.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x2f7364=a46_0xc0bf;(function(_0xe4f041,_0x42d286){const _0x44b915=a46_0xc0bf,_0x513e8b=_0xe4f041();while(!![]){try{const _0x502f0a=-parseInt(_0x44b915(0xb0))/0x1+parseInt(_0x44b915(0xb1))/0x2*(parseInt(_0x44b915(0xb2))/0x3)+-parseInt(_0x44b915(0xab))/0x4*(-parseInt(_0x44b915(0xa9))/0x5)+-parseInt(_0x44b915(0xa6))/0x6+-parseInt(_0x44b915(0xaa))/0x7*(-parseInt(_0x44b915(0x9d))/0x8)+-parseInt(_0x44b915(0x97))/0x9*(parseInt(_0x44b915(0xad))/0xa)+parseInt(_0x44b915(0xaf))/0xb;if(_0x502f0a===_0x42d286)break;else _0x513e8b['push'](_0x513e8b['shift']());}catch(_0x3c0fc0){_0x513e8b['push'](_0x513e8b['shift']());}}}(a46_0x530a,0x904df));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x2f7364(0x9e),a46_0x2f7364(0xa2)]),NON_TERMINAL_STATUSES=new Set(['PENDING',a46_0x2f7364(0x92)]);function a46_0xc0bf(_0x218bf9,_0x32b2ad){_0x218bf9=_0x218bf9-0x92;const _0x530a34=a46_0x530a();let _0xc0bf68=_0x530a34[_0x218bf9];return _0xc0bf68;}export function normalizeAsyncTask(_0x5160fc){const _0x47e040=a46_0x2f7364,_0x2ada0e=typeof _0x5160fc?.['taskId']===_0x47e040(0x95)?_0x5160fc[_0x47e040(0xa0)][_0x47e040(0xa1)]():'';if(!_0x2ada0e)throw CliErrors[_0x47e040(0xa7)](_0x47e040(0x9b));const _0x140cb9=typeof _0x5160fc[_0x47e040(0x98)]===_0x47e040(0x95)?_0x5160fc[_0x47e040(0x98)][_0x47e040(0xa1)]()[_0x47e040(0xac)]():'';if(!_0x140cb9)throw CliErrors[_0x47e040(0xa7)](_0x47e040(0xa5)+_0x2ada0e+_0x47e040(0x9c));return{'taskId':_0x2ada0e,'status':_0x140cb9,'errorMessage':typeof _0x5160fc[_0x47e040(0x94)]===_0x47e040(0x95)&&_0x5160fc[_0x47e040(0x94)][_0x47e040(0xa1)]()?_0x5160fc[_0x47e040(0x94)]['trim']():null,'isTerminal':TERMINAL_STATUSES[_0x47e040(0x9a)](_0x140cb9),'knownStatus':TERMINAL_STATUSES[_0x47e040(0x9a)](_0x140cb9)||NON_TERMINAL_STATUSES[_0x47e040(0x9a)](_0x140cb9)};}export function buildAsyncTaskStatusCommand(_0x3b268f,_0x4eedce){const _0x1a2790=a46_0x2f7364;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x3b268f)+_0x1a2790(0xae)+quoteShellArg(_0x4eedce)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x40fe0e){const _0x943e7a=a46_0x2f7364;switch(_0x40fe0e['status']){case _0x943e7a(0x9f):return _0x943e7a(0x93)+_0x40fe0e[_0x943e7a(0xa0)]+_0x943e7a(0xa3);case _0x943e7a(0x92):return _0x943e7a(0x93)+_0x40fe0e[_0x943e7a(0xa0)]+'\x20is\x20processing.';case'SUCCESS':return _0x943e7a(0x93)+_0x40fe0e[_0x943e7a(0xa0)]+'\x20completed\x20successfully.';case _0x943e7a(0xa2):return _0x40fe0e[_0x943e7a(0x94)]?_0x943e7a(0x93)+_0x40fe0e['taskId']+_0x943e7a(0x96)+_0x40fe0e[_0x943e7a(0x94)]:'Task\x20'+_0x40fe0e[_0x943e7a(0xa0)]+_0x943e7a(0xa8);default:return _0x943e7a(0x93)+_0x40fe0e['taskId']+_0x943e7a(0x99)+_0x40fe0e[_0x943e7a(0x98)]+'.';}}function quoteShellArg(_0x7ccc9b){const _0x15294d=a46_0x2f7364;return'\x27'+_0x7ccc9b['replace'](/'/g,_0x15294d(0xa4))+'\x27';}function a46_0x530a(){const _0x25f6d4=['\x20failed.','510wBhVDe','7ruThpo','3092QAGGgv','toUpperCase','40DScqUE','\x20--appcode\x20','25879832bDNsgq','1030138TYEWEm','2EjJjsT','1673913CIllGj','PROCESSING','Task\x20','errorMessage','string','\x20failed:\x20','2142648eoVuQX','status','\x20returned\x20unknown\x20status\x20','has','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x20response\x20did\x20not\x20contain\x20a\x20status.','4052952CqSCSE','SUCCESS','PENDING','taskId','trim','FAILED','\x20is\x20pending.','\x27\x5c\x27\x27','Async\x20task\x20','5535906gLHKLq','apiError'];a46_0x530a=function(){return _0x25f6d4;};return a46_0x530a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a47_0x1e7d(_0x1e6c51,_0x21df69){_0x1e6c51=_0x1e6c51-0x1a0;var _0x156c75=a47_0x156c();var _0x1e7d97=_0x156c75[_0x1e6c51];return _0x1e7d97;}(function(_0x1200d9,_0x21a696){var _0x56276c=a47_0x1e7d,_0x12cfcb=_0x1200d9();while(!![]){try{var _0x43d564=-parseInt(_0x56276c(0x1a8))/0x1+-parseInt(_0x56276c(0x1a1))/0x2*(parseInt(_0x56276c(0x1a9))/0x3)+parseInt(_0x56276c(0x1a4))/0x4*(parseInt(_0x56276c(0x1a2))/0x5)+-parseInt(_0x56276c(0x1a0))/0x6*(parseInt(_0x56276c(0x1a3))/0x7)+-parseInt(_0x56276c(0x1a7))/0x8+-parseInt(_0x56276c(0x1a5))/0x9*(-parseInt(_0x56276c(0x1ab))/0xa)+parseInt(_0x56276c(0x1aa))/0xb;if(_0x43d564===_0x21a696)break;else _0x12cfcb['push'](_0x12cfcb['shift']());}catch(_0x575dff){_0x12cfcb['push'](_0x12cfcb['shift']());}}}(a47_0x156c,0x99250));export function asDryRunResult(_0x158e0a,_0x3efe22){var _0x27a65a=a47_0x1e7d;return Object[_0x27a65a(0x1a6)](_0x158e0a,{'method':{'value':_0x3efe22['method'],'enumerable':![]},'url':{'value':_0x3efe22[_0x27a65a(0x1ac)],'enumerable':![]},..._0x3efe22['description']?{'description':{'value':_0x3efe22['description'],'enumerable':![]}}:{}});}function a47_0x156c(){var _0x87969=['15Crzrdj','7TYwnhC','817812BIkoNN','3656817eaFpXm','defineProperties','8650208agIMPz','1004723TQLTeI','389811bewZYp','26154612WtRYwB','20DBTuMV','url','4983144uOLSFP','4pudPXH'];a47_0x156c=function(){return _0x87969;};return a47_0x156c();}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* 确保 pattern / description / required 等元数据保持一致。
|
|
6
6
|
*/
|
|
7
7
|
import type { FlagDef } from "../../framework/types.js";
|
|
8
|
+
/** Write configuration to the user-level config instead of the current project. */
|
|
9
|
+
export declare const GLOBAL_SCOPE_FLAG: FlagDef;
|
|
8
10
|
export declare const DATASET_CODE_PATTERN: NonNullable<FlagDef["pattern"]>;
|
|
9
11
|
/** Dataset --code:32 位十六进制 UUID,用于 dataset / data 等命令 */
|
|
10
12
|
export declare const CODE_FLAG: FlagDef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0x6c2ed1=a48_0x4003;(function(_0xcf8e92,_0x569b9c){const _0x3e2ce6=a48_0x4003,_0x5ee392=_0xcf8e92();while(!![]){try{const _0x46c031=parseInt(_0x3e2ce6(0x182))/0x1+-parseInt(_0x3e2ce6(0x181))/0x2+-parseInt(_0x3e2ce6(0x19a))/0x3*(parseInt(_0x3e2ce6(0x191))/0x4)+parseInt(_0x3e2ce6(0x183))/0x5+-parseInt(_0x3e2ce6(0x189))/0x6*(parseInt(_0x3e2ce6(0x198))/0x7)+-parseInt(_0x3e2ce6(0x196))/0x8+parseInt(_0x3e2ce6(0x18d))/0x9;if(_0x46c031===_0x569b9c)break;else _0x5ee392['push'](_0x5ee392['shift']());}catch(_0x202d01){_0x5ee392['push'](_0x5ee392['shift']());}}}(a48_0x478d,0x91500));export const GLOBAL_SCOPE_FLAG={'name':a48_0x6c2ed1(0x197),'type':a48_0x6c2ed1(0x185),'default':![],'description':a48_0x6c2ed1(0x18a)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x6c2ed1(0x199)};export const CODE_FLAG={'name':'code','type':a48_0x6c2ed1(0x195),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x6c2ed1(0x18c),'description':a48_0x6c2ed1(0x18f)};export const SQLCODE_FLAG={'name':a48_0x6c2ed1(0x193),'type':a48_0x6c2ed1(0x195),'required':!![],'description':a48_0x6c2ed1(0x18b),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x6c2ed1(0x18e)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a48_0x6c2ed1(0x195),'required':![],'description':a48_0x6c2ed1(0x186)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x6c2ed1(0x19b)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x6c2ed1(0x192),'required':!![],'description':a48_0x6c2ed1(0x184)};function a48_0x478d(){const _0x1dc3f6=['6762056wJGTNR','global','71057RJxmlo','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','3MsuAJC','App\x20code\x20(e.g.\x20app-xxxxx)','2058232kZsLss','579344jzAvsn','3554995raqgWN','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','boolean','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','dbtype','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','18aMGQVS','Write\x20to\x20the\x20global\x20configuration','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','datasetcode','12446784RWnXps','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','skip-connection-test','693172ujZBZi','number','sqlcode','Database\x20product\x20type','string'];a48_0x478d=function(){return _0x1dc3f6;};return a48_0x478d();}function a48_0x4003(_0x44c891,_0x5576d5){_0x44c891=_0x44c891-0x181;const _0x478da6=a48_0x478d();let _0x400349=_0x478da6[_0x44c891];return _0x400349;}export const DB_TYPE_FLAG={'name':a48_0x6c2ed1(0x187),'type':'string','required':!![],'description':a48_0x6c2ed1(0x194),'enum':['MYSQL','POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0x6c2ed1(0x190),'type':a48_0x6c2ed1(0x185),'description':a48_0x6c2ed1(0x188)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfc3cbb,_0x547cc7){const _0x205f4f=a49_0x4311,_0x4a7c69=_0xfc3cbb();while(!![]){try{const _0x464eef=-parseInt(_0x205f4f(0x73))/0x1+-parseInt(_0x205f4f(0x72))/0x2+parseInt(_0x205f4f(0x6d))/0x3+-parseInt(_0x205f4f(0x65))/0x4*(-parseInt(_0x205f4f(0x6b))/0x5)+parseInt(_0x205f4f(0x66))/0x6+parseInt(_0x205f4f(0x6c))/0x7*(-parseInt(_0x205f4f(0x6e))/0x8)+-parseInt(_0x205f4f(0x6a))/0x9*(-parseInt(_0x205f4f(0x74))/0xa);if(_0x464eef===_0x547cc7)break;else _0x4a7c69['push'](_0x4a7c69['shift']());}catch(_0x2b1a02){_0x4a7c69['push'](_0x4a7c69['shift']());}}}(a49_0x52c0,0x6554f));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a49_0x52c0(){const _0x45c515=['validation','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','1569918FRcDRW','59722fkyeVI','2390tzhfRe','toFixed','1215356aKdlMC','4042044OsZaER','File\x20is\x20not\x20a\x20regular\x20file:\x20','\x20MB','isFile','16317oefqIa','10SQTdOL','106715RiiOyi','739041sregHn','368WudlBR','trim'];a49_0x52c0=function(){return _0x45c515;};return a49_0x52c0();}const BYTES_PER_MB=0x400*0x400;function a49_0x4311(_0x37bcd9,_0x182297){_0x37bcd9=_0x37bcd9-0x64;const _0x52c068=a49_0x52c0();let _0x4311ad=_0x52c068[_0x37bcd9];return _0x4311ad;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x24b9bc){const _0x48d863=a49_0x4311;if(_0x24b9bc>=BYTES_PER_MB){const _0x49e67d=Math['ceil'](_0x24b9bc/BYTES_PER_MB*0x64)/0x64;return _0x49e67d[_0x48d863(0x64)](0x2)+_0x48d863(0x68);}return _0x24b9bc+'\x20B';}export function requireDevelopmentUploadFile(_0x177cf7,_0x296af8){const _0x481b85=a49_0x4311,_0x24c65d=_0x177cf7[_0x481b85(0x6f)]();if(!_0x24c65d)throw CliErrors[_0x481b85(0x70)](_0x296af8+'\x20path\x20is\x20required.');if(!existsSync(_0x24c65d))throw CliErrors[_0x481b85(0x70)]('File\x20not\x20found:\x20'+_0x24c65d);const _0x238ee5=statSync(_0x24c65d);if(!_0x238ee5[_0x481b85(0x69)]())throw CliErrors['validation'](_0x481b85(0x67)+_0x24c65d);if(_0x238ee5['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x481b85(0x70)](_0x481b85(0x71)+_0x24c65d+'\x20('+formatBytes(_0x238ee5['size'])+')');return{'path':_0x24c65d,'size':_0x238ee5['size']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x92495b,_0x4c06ef){const _0x38c4b4=a50_0x3a6c,_0x265253=_0x92495b();while(!![]){try{const _0x46e021=-parseInt(_0x38c4b4(0x135))/0x1*(-parseInt(_0x38c4b4(0x13b))/0x2)+-parseInt(_0x38c4b4(0x134))/0x3*(-parseInt(_0x38c4b4(0x136))/0x4)+parseInt(_0x38c4b4(0x130))/0x5+parseInt(_0x38c4b4(0x131))/0x6*(parseInt(_0x38c4b4(0x138))/0x7)+parseInt(_0x38c4b4(0x13a))/0x8*(-parseInt(_0x38c4b4(0x132))/0x9)+parseInt(_0x38c4b4(0x13c))/0xa*(parseInt(_0x38c4b4(0x139))/0xb)+-parseInt(_0x38c4b4(0x133))/0xc*(parseInt(_0x38c4b4(0x13d))/0xd);if(_0x46e021===_0x4c06ef)break;else _0x265253['push'](_0x265253['shift']());}catch(_0x150f87){_0x265253['push'](_0x265253['shift']());}}}(a50_0x2289,0x804bb));function a50_0x3a6c(_0x48354f,_0x509169){_0x48354f=_0x48354f-0x130;const _0x22892c=a50_0x2289();let _0x3a6c98=_0x22892c[_0x48354f];return _0x3a6c98;}export function validateAppcode(_0x441572){const _0x5cc491=a50_0x3a6c,_0x42b86d=_0x441572['trim']();if(!_0x42b86d)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x42b86d[_0x5cc491(0x13e)]>0x64)return{'valid':![],'message':_0x5cc491(0x137)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x42b86d))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a50_0x2289(){const _0xf86713=['1951810eHBbyt','198eHxhKo','728181tpNvZS','21720xEiXcO','903SxksvE','1538Nlgjjg','12460IIlrlm','App\x20Code\x20cannot\x20exceed\x20100\x20characters','31129LlhKCr','203302TmnbLE','8zWPhVu','290sBXpmY','50JVieZH','8502PBCaiA','length'];a50_0x2289=function(){return _0xf86713;};return a50_0x2289();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a51_0xc10e(){const _0x805235=['Missing\x20key\x20argument.','validation','4745140NeiKPN','trim','2133836WZTaCQ','\x20config\x20delete\x20<key>\x20[--global]','Usage:\x20','5QeBhKf','147789JRoKoL','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','64dbENdw','config','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','\x20deleted','bool','global','14ADqQYa','Project','routing','2644062SBeTex','14974Lsqafx','delete','Global','key','13062BNqIvj','hasOwnProperty','has','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','riskLevel','\x22\x20is\x20not\x20deletable.','3ZNVqiq','1279410fJXZlq'];a51_0xc10e=function(){return _0x805235;};return a51_0xc10e();}const a51_0x44ffde=a51_0x5118;(function(_0x2718bc,_0x37aa35){const _0x32d938=a51_0x5118,_0x4ab6c2=_0x2718bc();while(!![]){try{const _0x5275c3=parseInt(_0x32d938(0x160))/0x1*(-parseInt(_0x32d938(0x144))/0x2)+-parseInt(_0x32d938(0x14e))/0x3*(parseInt(_0x32d938(0x154))/0x4)+-parseInt(_0x32d938(0x157))/0x5*(-parseInt(_0x32d938(0x143))/0x6)+parseInt(_0x32d938(0x148))/0x7+parseInt(_0x32d938(0x15a))/0x8*(parseInt(_0x32d938(0x158))/0x9)+parseInt(_0x32d938(0x152))/0xa+-parseInt(_0x32d938(0x14f))/0xb;if(_0x5275c3===_0x37aa35)break;else _0x4ab6c2['push'](_0x4ab6c2['shift']());}catch(_0x47ac3a){_0x4ab6c2['push'](_0x4ab6c2['shift']());}}}(a51_0xc10e,0x47bce));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set(['inherit']),EXTRA_DELETABLE_KEYS=new Set(['defaultApp',a51_0x44ffde(0x142)]);function a51_0x5118(_0x1a5abb,_0x4bd819){_0x1a5abb=_0x1a5abb-0x141;const _0xc10ebd=a51_0xc10e();let _0x51185d=_0xc10ebd[_0x1a5abb];return _0x51185d;}async function execute(_0x3b912c){const _0x7d7999=a51_0x44ffde,_0x5525de=_0x3b912c['args'][0x0]?.[_0x7d7999(0x153)]();if(!_0x5525de)throw CliErrors['validation'](_0x7d7999(0x150),_0x7d7999(0x156)+CLI_BIN_NAME+_0x7d7999(0x155));if(_0x5525de===_0x7d7999(0x14c))throw CliErrors[_0x7d7999(0x151)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x5525de)&&!EXTRA_DELETABLE_KEYS[_0x7d7999(0x14a)](_0x5525de)&&!LEGACY_DELETABLE_KEYS['has'](_0x5525de))throw CliErrors[_0x7d7999(0x151)]('Top-level\x20key\x20\x22'+_0x5525de+_0x7d7999(0x14d),'Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.');const _0x34313b=resolveWriteScope({'global':_0x3b912c[_0x7d7999(0x15e)](_0x7d7999(0x15f))}),_0x1fa675=readScopedConfig(_0x34313b),_0x25922c=Object['prototype'][_0x7d7999(0x149)]['call'](_0x1fa675,_0x5525de);_0x25922c&&(delete _0x1fa675[_0x5525de],writeScopedConfig(_0x1fa675,_0x34313b));const _0x2526e7=_0x34313b===_0x7d7999(0x15f)?_0x7d7999(0x146):_0x7d7999(0x141);return{'ok':!![],'message':_0x25922c?'✓\x20'+_0x2526e7+'\x20'+_0x5525de+_0x7d7999(0x15d):'✓\x20'+_0x2526e7+'\x20'+_0x5525de+'\x20already\x20absent','data':{'key':_0x5525de,'scope':_0x34313b,'changed':_0x25922c}};}export const configDeleteDefinition={'service':a51_0x44ffde(0x15b),'command':a51_0x44ffde(0x145),'description':a51_0x44ffde(0x159),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a51_0x44ffde(0x147),'description':a51_0x44ffde(0x14b),'required':!![]}],'flags':[{'name':a51_0x44ffde(0x15f),'type':'boolean','description':a51_0x44ffde(0x15c),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x2ec528=a52_0x3b25;(function(_0x2c2f61,_0x2cb3af){const _0x524545=a52_0x3b25,_0x144c7c=_0x2c2f61();while(!![]){try{const _0xa1971f=-parseInt(_0x524545(0x156))/0x1+parseInt(_0x524545(0x159))/0x2+parseInt(_0x524545(0x150))/0x3*(parseInt(_0x524545(0x15c))/0x4)+parseInt(_0x524545(0x14f))/0x5+parseInt(_0x524545(0x154))/0x6+-parseInt(_0x524545(0x15b))/0x7*(parseInt(_0x524545(0x158))/0x8)+parseInt(_0x524545(0x14b))/0x9;if(_0xa1971f===_0x2cb3af)break;else _0x144c7c['push'](_0x144c7c['shift']());}catch(_0x359243){_0x144c7c['push'](_0x144c7c['shift']());}}}(a52_0x444e,0x1ad81));function a52_0x3b25(_0x287f16,_0x2d5555){_0x287f16=_0x287f16-0x148;const _0x444eec=a52_0x444e();let _0x3b257e=_0x444eec[_0x287f16];return _0x3b257e;}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a52_0x444e(){const _0x1b2428=['920760vwbaJj','Get\x20a\x20config\x20value\x20by\x20key','155699IEsZQm','object','57552FXqFgC','13490pcSWOi','appcode','168CcNeHA','8UsFxXF','config','string','\x20config\x20get\x20--key\x20<key>','1361520MhYPhK','validation','Key\x20not\x20found:\x20','Missing\x20key.','482765DuDeGo','45405vkBnhX','key','get','read'];a52_0x444e=function(){return _0x1b2428;};return a52_0x444e();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x37fa7e){const _0x39cf50=a52_0x3b25,_0x269903=_0x37fa7e['str'](_0x39cf50(0x151));if(!_0x269903)throw CliErrors[_0x39cf50(0x14c)](_0x39cf50(0x14e),'Usage:\x20'+CLI_BIN_NAME+_0x39cf50(0x14a));const _0x8bd3f7=readConfig(),_0x4fe746=_0x269903==='app'?_0x39cf50(0x15a):_0x269903,_0xaca286=_0x8bd3f7[_0x4fe746];if(_0xaca286===undefined)throw CliErrors[_0x39cf50(0x14c)](_0x39cf50(0x14d)+_0x269903);return{'ok':!![],'data':typeof _0xaca286===_0x39cf50(0x157)?_0xaca286:{[_0x4fe746]:_0xaca286},'message':typeof _0xaca286==='object'?undefined:String(_0xaca286)};}export const configGetDefinition={'service':a52_0x2ec528(0x148),'command':a52_0x2ec528(0x152),'description':a52_0x2ec528(0x155),'risk':a52_0x2ec528(0x153),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x2ec528(0x151),'type':a52_0x2ec528(0x149),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc8d54d,_0x2eda89){const _0x2dcdf2=a53_0x35d1,_0x210ff2=_0xc8d54d();while(!![]){try{const _0x5076a6=-parseInt(_0x2dcdf2(0x1f0))/0x1*(-parseInt(_0x2dcdf2(0x1f7))/0x2)+parseInt(_0x2dcdf2(0x1f5))/0x3+parseInt(_0x2dcdf2(0x1f2))/0x4*(-parseInt(_0x2dcdf2(0x1f4))/0x5)+parseInt(_0x2dcdf2(0x1ef))/0x6*(parseInt(_0x2dcdf2(0x1ee))/0x7)+parseInt(_0x2dcdf2(0x1f6))/0x8*(-parseInt(_0x2dcdf2(0x1f1))/0x9)+parseInt(_0x2dcdf2(0x1f8))/0xa+-parseInt(_0x2dcdf2(0x1f3))/0xb;if(_0x5076a6===_0x2eda89)break;else _0x210ff2['push'](_0x210ff2['shift']());}catch(_0x1bddb6){_0x210ff2['push'](_0x210ff2['shift']());}}}(a53_0x1163,0xb08e7));function a53_0x35d1(_0x2eda77,_0x20f466){_0x2eda77=_0x2eda77-0x1ee;const _0x116316=a53_0x1163();let _0x35d17b=_0x116316[_0x2eda77];return _0x35d17b;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];function a53_0x1163(){const _0x596a0e=['1054781zmMKnU','18TkVftS','7179wpYEcH','637803uTIFsm','316sGYKzA','12068375ZtGjay','10460xDPKwN','2701377iJMLHf','32BbPXHQ','62vhSGaC','6939790nnIHtc'];a53_0x1163=function(){return _0x596a0e;};return a53_0x1163();}
|
|
@@ -5,8 +5,10 @@ export declare function executeConfigInit(ctx: RuntimeContext): Promise<{
|
|
|
5
5
|
message: string;
|
|
6
6
|
data: {
|
|
7
7
|
mode: string;
|
|
8
|
+
protocol: "lovrabet-routing/v1" | undefined;
|
|
8
9
|
region: "global" | "id" | "cn" | null;
|
|
9
10
|
domains: Partial<Record<"apiDomain" | "userDomain" | "runtimeDomain" | "skillDomain" | "kbDomain" | "appDomain" | "localDomain" | "certificateDomain", string>>;
|
|
11
|
+
cdn: import("../../config/domain-config.js").EnterpriseRoutingCdn | undefined;
|
|
10
12
|
};
|
|
11
13
|
}>;
|
|
12
14
|
export declare const configInitDefinition: CommandDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x429e85=a54_0xa42b;(function(_0x32f930,_0x544d2a){const _0x436b92=a54_0xa42b,_0x389c5c=_0x32f930();while(!![]){try{const _0x425af4=-parseInt(_0x436b92(0xcb))/0x1*(-parseInt(_0x436b92(0xa7))/0x2)+-parseInt(_0x436b92(0xbd))/0x3+parseInt(_0x436b92(0xc4))/0x4*(parseInt(_0x436b92(0xad))/0x5)+parseInt(_0x436b92(0xb3))/0x6+-parseInt(_0x436b92(0x9e))/0x7*(parseInt(_0x436b92(0x9d))/0x8)+parseInt(_0x436b92(0xce))/0x9*(parseInt(_0x436b92(0xa5))/0xa)+parseInt(_0x436b92(0xa1))/0xb*(-parseInt(_0x436b92(0xcc))/0xc);if(_0x425af4===_0x544d2a)break;else _0x389c5c['push'](_0x389c5c['shift']());}catch(_0x43a40d){_0x389c5c['push'](_0x389c5c['shift']());}}}(a54_0x43da,0xaa5c5));import{select}from'@inquirer/prompts';function a54_0x43da(){const _0x16b3ca=['domain-config','cancelled','Custom\x20Runtime\x20HTTPS\x20origin','project','label','3161576ygTygM','7iIVHVm','Official\x20Lovrabet\x20region:\x20','Custom\x20local\x20callback\x20HTTPS\x20origin','2101rKEeUH','localDomain','validation','Available\x20regions:\x20','220iHwSAo','keys','2iIOdVg','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','Custom\x20platform\x20API\x20HTTPS\x20origin','manifestDomains','user-domain','certificateDomain','110sSlvPd','app-domain','write','Custom\x20SkillHub\x20HTTPS\x20origin','api-domain','init','5121750kwhCQI','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','Custom\x20knowledge-base\x20HTTPS\x20origin','region','\x22\x20is\x20not\x20currently\x20available.','name','skill-domain','Custom\x20certificate\x20service\x20HTTPS\x20origin','string','runtime-domain','3901221uhCFMv','Select\x20Lovrabet\x20region','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','kb-domain','certificate-domain','domains','str','18052lyowYg','local-domain','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','enterprise-v1','join','mode','cdn','1269689vttNMf','58860JSLGBB','nonInteractive','453132ABgImU','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','global','routing'];a54_0x43da=function(){return _0x16b3ca;};return a54_0x43da();}import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';function a54_0xa42b(_0x42247a,_0x2f80c0){_0x42247a=_0x42247a-0x9a;const _0x43da6=a54_0x43da();let _0xa42b32=_0x43da6[_0x42247a];return _0xa42b32;}export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':'region','type':'string','description':a54_0x429e85(0x9f)+ENABLED_LOVRABET_REGION_VALUES[a54_0x429e85(0xc8)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a54_0x429e85(0xd2),'type':'string','description':'Independent-deployment\x20Domain\x20JSON\x20file'},{'name':a54_0x429e85(0xab),'type':'string','description':'Custom\x20User\x20HTTPS\x20origin'},{'name':a54_0x429e85(0xb1),'type':a54_0x429e85(0xbb),'description':a54_0x429e85(0xa9)},{'name':a54_0x429e85(0xbc),'type':a54_0x429e85(0xbb),'description':a54_0x429e85(0x9a)},{'name':a54_0x429e85(0xb9),'type':a54_0x429e85(0xbb),'description':a54_0x429e85(0xb0)},{'name':a54_0x429e85(0xc0),'type':'string','description':a54_0x429e85(0xb5)},{'name':a54_0x429e85(0xae),'type':'string','description':a54_0x429e85(0xb4)},{'name':a54_0x429e85(0xc5),'type':'string','description':a54_0x429e85(0xa0)},{'name':a54_0x429e85(0xc1),'type':a54_0x429e85(0xbb),'description':a54_0x429e85(0xba)}];async function resolveRegion(_0x373f2d){const _0x4a48af=a54_0x429e85,_0x4271bd=_0x373f2d[_0x4a48af(0xc3)](_0x4a48af(0xb6));if(_0x4271bd){if(!isEnabledLovrabetRegion(_0x4271bd))throw CliErrors[_0x4a48af(0xa3)]('Region\x20\x22'+_0x4271bd+_0x4a48af(0xb7),_0x4a48af(0xa4)+ENABLED_LOVRABET_REGION_VALUES[_0x4a48af(0xc8)](',\x20'));return _0x4271bd;}if(_0x373f2d[_0x4a48af(0xcd)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x4a48af(0xbe),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x164dde=>({'name':getOfficialRoutingProfile(_0x164dde)[_0x4a48af(0x9c)]+'\x20('+_0x164dde+')','value':_0x164dde}))});}catch(_0x3296f8){if(_0x3296f8?.[_0x4a48af(0xb8)]==='ExitPromptError')throw CliErrors[_0x4a48af(0xd3)]();throw _0x3296f8;}}export async function executeConfigInit(_0x1489c7){const _0x4385e4=a54_0x429e85,_0x6ba374=resolveDomainConfigInput(_0x1489c7),_0x1658d9=_0x6ba374[_0x4385e4(0xc2)],_0x1acd78=Object[_0x4385e4(0xa6)](_0x1658d9)['length']>0x0;if(_0x1acd78&&_0x1489c7[_0x4385e4(0xc3)](_0x4385e4(0xb6)))throw CliErrors[_0x4385e4(0xa3)]('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');if(!!_0x1658d9[_0x4385e4(0xa2)]!==!!_0x1658d9[_0x4385e4(0xac)])throw CliErrors[_0x4385e4(0xa3)](_0x4385e4(0xc6));const _0xa29d4e=_0x1489c7['bool']('global')?_0x4385e4(0xd0):_0x4385e4(0x9b),_0x1df431=readScopedConfig(_0xa29d4e);for(const _0x52d04e of DOMAIN_CONFIG_FIELDS)delete _0x1df431[_0x52d04e];for(const _0x4eb285 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x1df431[_0x4eb285];delete _0x1df431['routing'];let _0x522170=null;if(_0x1acd78)delete _0x1df431[_0x4385e4(0xb6)],_0x6ba374[_0x4385e4(0xc9)]===_0x4385e4(0xc7)?_0x1df431[_0x4385e4(0xd1)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x6ba374[_0x4385e4(0xaa)],'cdn':_0x6ba374[_0x4385e4(0xca)]}:Object['assign'](_0x1df431,_0x1658d9);else{_0x522170=await resolveRegion(_0x1489c7);if(_0x522170===DEFAULT_LOVRABET_REGION)delete _0x1df431[_0x4385e4(0xb6)];else _0x1df431[_0x4385e4(0xb6)]=_0x522170;}return writeScopedConfig(_0x1df431,_0xa29d4e),{'ok':!![],'message':_0x1acd78?_0x4385e4(0xcf)+Object['keys'](_0x6ba374[_0x4385e4(0xc9)]===_0x4385e4(0xc7)?_0x6ba374[_0x4385e4(0xaa)]:_0x1658d9)[_0x4385e4(0xc8)](',\x20')+'.':_0x4385e4(0xa8)+_0x522170+'.','data':{'mode':_0x1acd78?'independent':'official','protocol':_0x6ba374[_0x4385e4(0xc9)]==='enterprise-v1'?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x522170,'domains':_0x1658d9,'cdn':_0x6ba374[_0x4385e4(0xc9)]===_0x4385e4(0xc7)?_0x6ba374[_0x4385e4(0xca)]:undefined}};}export const configInitDefinition={'service':'config','command':a54_0x429e85(0xb2),'description':'Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':a54_0x429e85(0xaf),'confirmationDescription':a54_0x429e85(0xbf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x2c86ae=a55_0x391c;(function(_0x21394e,_0x4b14fb){const _0x4925cc=a55_0x391c,_0x59d2b2=_0x21394e();while(!![]){try{const _0x5d5364=-parseInt(_0x4925cc(0x7d))/0x1*(-parseInt(_0x4925cc(0x76))/0x2)+-parseInt(_0x4925cc(0x75))/0x3+parseInt(_0x4925cc(0x79))/0x4+-parseInt(_0x4925cc(0x81))/0x5*(-parseInt(_0x4925cc(0x7c))/0x6)+parseInt(_0x4925cc(0x74))/0x7*(parseInt(_0x4925cc(0x78))/0x8)+parseInt(_0x4925cc(0x7b))/0x9+parseInt(_0x4925cc(0x77))/0xa*(-parseInt(_0x4925cc(0x7e))/0xb);if(_0x5d5364===_0x4b14fb)break;else _0x59d2b2['push'](_0x59d2b2['shift']());}catch(_0x55179e){_0x59d2b2['push'](_0x59d2b2['shift']());}}}(a55_0x4946,0x9db05));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a55_0x391c(_0x5100a8,_0x37e074){_0x5100a8=_0x5100a8-0x74;const _0x4946ea=a55_0x4946();let _0x391cf5=_0x4946ea[_0x5100a8];return _0x391cf5;}async function execute(_0x5c9c97){const _0x20bf8e=a55_0x391c,_0x1e9a9b=_0x5c9c97['bool']('global')?readScopedConfig(_0x20bf8e(0x80)):readConfig();return{'ok':!![],'data':_0x1e9a9b};}function a55_0x4946(){const _0x50c0e1=['1616DNrnXn','4270120LfpUUk','boolean','6286446GwKNdj','30KxASFf','1mQqfTc','11QxWjAZ','config','global','1115900nchkSQ','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','15029yjAHwz','65217ONyLxx','702686frjVuJ','29993290iGbHFc'];a55_0x4946=function(){return _0x50c0e1;};return a55_0x4946();}export const configListDefinition={'service':a55_0x2c86ae(0x7f),'command':'list','description':'List\x20all\x20config\x20values','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x2c86ae(0x80),'type':a55_0x2c86ae(0x7a),'description':a55_0x2c86ae(0x82),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x1d912f=a56_0x2080;(function(_0x5528b5,_0x2ca4e4){const _0x561d6c=a56_0x2080,_0x19bb1f=_0x5528b5();while(!![]){try{const _0x51a246=-parseInt(_0x561d6c(0xf3))/0x1*(parseInt(_0x561d6c(0xeb))/0x2)+-parseInt(_0x561d6c(0x10d))/0x3+-parseInt(_0x561d6c(0xee))/0x4+parseInt(_0x561d6c(0xfb))/0x5*(parseInt(_0x561d6c(0x101))/0x6)+parseInt(_0x561d6c(0x103))/0x7*(parseInt(_0x561d6c(0xea))/0x8)+-parseInt(_0x561d6c(0x100))/0x9+parseInt(_0x561d6c(0xe4))/0xa;if(_0x51a246===_0x2ca4e4)break;else _0x19bb1f['push'](_0x19bb1f['shift']());}catch(_0x340b72){_0x19bb1f['push'](_0x19bb1f['shift']());}}}(a56_0x3d00,0x7a108));function a56_0x2080(_0xc393ff,_0x21443b){_0xc393ff=_0xc393ff-0xe0;const _0x3d00ad=a56_0x3d00();let _0x2080d3=_0x3d00ad[_0xc393ff];return _0x2080d3;}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';function a56_0x3d00(){const _0x27b71b=['Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','\x20appcode\x20set\x20to:\x20','Missing\x20value.','apps','17455yGBDZI','appcode','\x20workspace\x20add\x20<name>\x20--appcode\x20','\x22.\x20Allowed:\x20','env','3967866suYNDe','474OycUmY','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','1902089JFGFeY','Missing\x20key.','locale','Invalid\x20locale\x20value.','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','global','set','Top-level\x20key\x20\x22','Usage:\x20','key','189531HdFtGS','\x22\x20is\x20not\x20settable.','keys','Settable\x20top-level\x20keys:\x20','Set\x20a\x20config\x20value','7783690XIHvmI','write','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','string','app','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','16VIXwud','70294sPEyJd','Config\x20value','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','546696GBQzPn','Global','length','value','join','13aewJjH','validation','riskLevel','Project'];a56_0x3d00=function(){return _0x27b71b;};return a56_0x3d00();}async function execute(_0x26b0f4){const _0x1694fa=a56_0x2080,_0x3f1972=_0x26b0f4['str'](_0x1694fa(0x10c)),_0x3e2807=_0x26b0f4['str'](_0x1694fa(0xf1));if(!_0x3f1972)throw CliErrors['validation'](_0x1694fa(0x104),_0x1694fa(0x10b)+CLI_BIN_NAME+_0x1694fa(0x102));if(_0x3e2807===undefined||_0x3e2807==='')throw CliErrors[_0x1694fa(0xf4)](_0x1694fa(0xf9),'Usage:\x20'+CLI_BIN_NAME+_0x1694fa(0x102));let _0x23a0b4=_0x3f1972,_0x132008=_0x3e2807;if(_0x3e2807['length']>0x1f4)throw CliErrors[_0x1694fa(0xf4)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(_0x3f1972===_0x1694fa(0xf5))throw CliErrors['validation'](_0x1694fa(0x107));if(!isTopLevelConfigKey(_0x3f1972))throw CliErrors['validation'](_0x1694fa(0x10a)+_0x3f1972+_0x1694fa(0xe0),_0x1694fa(0xe2)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x3f1972]&&!CONFIG_ENUM_VALUES[_0x3f1972]['includes'](_0x3e2807))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x3f1972+_0x1694fa(0xfe)+CONFIG_ENUM_VALUES[_0x3f1972][_0x1694fa(0xf2)](',\x20'));if(_0x3f1972===_0x1694fa(0x105)&&!normalizeLocale(_0x3e2807))throw CliErrors[_0x1694fa(0xf4)](_0x1694fa(0x106),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');DOMAIN_CONFIG_FIELDS['includes'](_0x3f1972)&&(_0x132008=normalizeDomainOrigin(_0x3f1972,_0x3e2807));const _0x4f6fc8={'global':_0x26b0f4['bool'](_0x1694fa(0x108))},_0x4478a2=resolveWriteScope(_0x4f6fc8),_0x52322e=readScopedConfig(_0x4478a2);_0x3f1972===_0x1694fa(0xe8)&&(_0x23a0b4=_0x1694fa(0xfc),delete _0x52322e[_0x1694fa(0xe8)]);_0x3f1972===_0x1694fa(0x105)&&(_0x132008=normalizeLocale(_0x3e2807));if(_0x3f1972===_0x1694fa(0xff)){_0x132008=normalizeEnv(_0x3e2807);if(!isProduction(_0x132008)&&!isDaily(_0x132008))throw CliErrors[_0x1694fa(0xf4)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x1694fa(0xf7));}if(_0x3f1972===_0x1694fa(0xfc)){const _0x19d189=_0x52322e[_0x1694fa(0xfa)]&&typeof _0x52322e[_0x1694fa(0xfa)]==='object'?Object[_0x1694fa(0xe1)](_0x52322e[_0x1694fa(0xfa)]):[];if(_0x19d189[_0x1694fa(0xf0)]>0x0)throw CliErrors[_0x1694fa(0xf4)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Use\x20`'+CLI_BIN_NAME+_0x1694fa(0xfd)+_0x132008+'`,\x20`'+CLI_BIN_NAME+_0x1694fa(0xe9));const _0x56f829=buildCanonicalProjectConfig({..._0x52322e},{'appCodes':[_0x132008],'env':typeof _0x52322e['env']===_0x1694fa(0xe7)?_0x52322e[_0x1694fa(0xff)]:undefined});writeScopedConfig(_0x56f829,_0x4478a2);const _0x4c6133=_0x4478a2===_0x1694fa(0x108)?_0x1694fa(0xef):'Project';return{'ok':!![],'message':'✓\x20'+_0x4c6133+_0x1694fa(0xf8)+_0x132008+_0x1694fa(0xe6)};}_0x52322e[_0x23a0b4]=_0x132008,writeScopedConfig(_0x52322e,_0x4478a2);const _0x4b9d12=_0x4478a2===_0x1694fa(0x108)?'Global':_0x1694fa(0xf6);return{'ok':!![],'message':'✓\x20'+_0x4b9d12+'\x20'+_0x23a0b4+'\x20set\x20to:\x20'+_0x132008};}export const configSetDefinition={'service':'config','command':a56_0x1d912f(0x109),'description':a56_0x1d912f(0xe3),'risk':a56_0x1d912f(0xe5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a56_0x1d912f(0x10c),'type':a56_0x1d912f(0xe7),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a56_0x1d912f(0xe7),'description':a56_0x1d912f(0xec),'required':!![]},{'name':a56_0x1d912f(0x108),'type':'boolean','description':a56_0x1d912f(0xed),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a57_0x29aa(_0x500907,_0x42cb53){_0x500907=_0x500907-0x80;var _0x738025=a57_0x7380();var _0x29aa69=_0x738025[_0x500907];return _0x29aa69;}(function(_0x335d25,_0xa701f9){var _0x634ff9=a57_0x29aa,_0x1ba57d=_0x335d25();while(!![]){try{var _0x3d1072=-parseInt(_0x634ff9(0x86))/0x1*(-parseInt(_0x634ff9(0x8d))/0x2)+-parseInt(_0x634ff9(0x8c))/0x3+parseInt(_0x634ff9(0x85))/0x4*(-parseInt(_0x634ff9(0x89))/0x5)+parseInt(_0x634ff9(0x82))/0x6*(-parseInt(_0x634ff9(0x84))/0x7)+-parseInt(_0x634ff9(0x8e))/0x8*(-parseInt(_0x634ff9(0x8a))/0x9)+-parseInt(_0x634ff9(0x88))/0xa*(parseInt(_0x634ff9(0x83))/0xb)+parseInt(_0x634ff9(0x8b))/0xc;if(_0x3d1072===_0xa701f9)break;else _0x1ba57d['push'](_0x1ba57d['shift']());}catch(_0x3ec831){_0x1ba57d['push'](_0x1ba57d['shift']());}}}(a57_0x7380,0xae8f2));import{CLI_BIN_NAME}from'../../constant/cli.js';function a57_0x7380(){var _0xcdfdc7=['4YlqPgJ','2064srhkjm','global','validation','174AekzUZ','7314307mTIwYq','145439YrqqmQ','2856616glHZdk','404242OvSsRf','project','10ohUtIL','10uBThlC','15723oExAqQ','27039468rxdHfN','305181TRqjtM'];a57_0x7380=function(){return _0xcdfdc7;};return a57_0x7380();}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(_0x47de3e){var _0x13a8c1=a57_0x29aa;if(_0x47de3e[_0x13a8c1(0x80)])return'global';if(!isInProject())throw CliErrors[_0x13a8c1(0x81)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0x13a8c1(0x87);}export function readScopedConfig(_0x55a1ff){return readConfigFile(resolveWriteConfigPath(_0x55a1ff));}export function writeScopedConfig(_0x44935d,_0xbf2777){writeConfigFile(resolveWriteConfigPath(_0xbf2777),_0x44935d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a58_0x2eb086=a58_0x31ed;(function(_0x4b0c19,_0x4e5d0f){const _0x48e5d=a58_0x31ed,_0x356180=_0x4b0c19();while(!![]){try{const _0x8a2b69=-parseInt(_0x48e5d(0x126))/0x1+-parseInt(_0x48e5d(0x128))/0x2*(-parseInt(_0x48e5d(0x138))/0x3)+parseInt(_0x48e5d(0x12b))/0x4+-parseInt(_0x48e5d(0x11f))/0x5+-parseInt(_0x48e5d(0x13b))/0x6+-parseInt(_0x48e5d(0x107))/0x7+parseInt(_0x48e5d(0x103))/0x8;if(_0x8a2b69===_0x4e5d0f)break;else _0x356180['push'](_0x356180['shift']());}catch(_0x25ad09){_0x356180['push'](_0x356180['shift']());}}}(a58_0x57d7,0xbd1ac));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_0x2eb086(0x12a),METADATA_BACKEND_PATH=a58_0x2eb086(0x141),UNGROUPED_BUSINESS_GROUP=a58_0x2eb086(0x127);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x430fc6,input:_0x384223,dryRun:_0xeac25}){const _0x3de637=a58_0x2eb086;validateInput(_0x384223);const _0x188f99=normalizeBusinessGroupArgument(_0x384223[_0x3de637(0x11c)]),_0xcd2eee=await getDatasetDetail(_0x384223[_0x3de637(0x142)]),_0x13d60=resolveBusinessGroupDataset(_0xcd2eee,_0x384223['code']);assertBusinessGroupUpdateSupported(_0x13d60,_0x188f99);const _0x34ab94=loadCurrentBusinessGroup(_0xcd2eee,_0x13d60);assertExpectedBusinessGroup(_0x34ab94,_0x384223[_0x3de637(0x10f)]);const _0x21c275=buildBackendPlan(_0x430fc6,_0x13d60,_0x188f99),_0x2898d0=_0x34ab94!==_0x188f99;let _0x37dcfb;if(_0x2898d0&&!_0xeac25){_0x21c275['kind']==='db-table'?await updateDbTableBusinessGroup(_0x21c275[_0x3de637(0x129)]):await updateErBusinessGroup(_0x21c275['payload']);const _0x2a3ce8=await getDatasetDetail(_0x13d60['code']),_0x36cf21=resolveBusinessGroupDataset(_0x2a3ce8,_0x13d60[_0x3de637(0x142)]),_0x32f366=loadCurrentBusinessGroup(_0x2a3ce8,_0x36cf21);if(_0x32f366!==_0x188f99)throw CliErrors[_0x3de637(0x139)](_0x3de637(0x13e),'Expected\x20'+JSON['stringify'](displayBusinessGroup(_0x188f99))+_0x3de637(0x13a)+JSON[_0x3de637(0x104)](displayBusinessGroup(_0x32f366))+'.');_0x37dcfb={'verified':!![],'status':_0x3de637(0x140),'afterReadback':{'businessGroup':displayBusinessGroup(_0x32f366)}};}else!_0x2898d0&&(_0x37dcfb={'verified':!![],'status':_0x3de637(0x133),'afterReadback':{'businessGroup':displayBusinessGroup(_0x34ab94)}});const _0x5b1dd1={'operation':_0x3de637(0x115),'appCode':_0x430fc6,'selector':{'code':_0x13d60[_0x3de637(0x142)]},'dataset':{'id':_0x13d60['id'],'code':_0x13d60[_0x3de637(0x142)],'name':_0x13d60[_0x3de637(0x11b)],'sourceType':_0x13d60[_0x3de637(0xff)]},'before':{'businessGroup':displayBusinessGroup(_0x34ab94)},'after':{'businessGroup':displayBusinessGroup(_0x188f99)},'changed':_0x2898d0,'dryRun':_0xeac25,'submitted':_0x2898d0&&!_0xeac25,'backend':{'method':_0x21c275['method'],'path':_0x21c275['path'],'payload':_0x21c275[_0x3de637(0x129)]},..._0x37dcfb?{'verification':_0x37dcfb}:{},'warnings':[]};return{'ok':!![],'data':_0x5b1dd1,'message':_0x2898d0?_0xeac25?_0x3de637(0x118)+_0x13d60[_0x3de637(0x142)]:_0x3de637(0x137)+_0x13d60[_0x3de637(0x142)]:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x13d60[_0x3de637(0x142)]};}export const datasetBusinessGroupUpdate={'service':a58_0x2eb086(0x132),'command':a58_0x2eb086(0x13c),'description':a58_0x2eb086(0x10c),'risk':a58_0x2eb086(0x114),'flags':[CODE_FLAG,{'name':a58_0x2eb086(0x13d),'type':a58_0x2eb086(0x11e),'required':!![],'description':a58_0x2eb086(0x12d)},{'name':a58_0x2eb086(0x12f),'type':a58_0x2eb086(0x11e),'required':![],'description':a58_0x2eb086(0x105)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x11a816){validateInput(readBusinessGroupUpdateInput(_0x11a816));},async 'dryRun'(_0x456ff8){const _0x39de06=a58_0x2eb086,_0x47f975=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x456ff8[_0x39de06(0x10d)],'input':readBusinessGroupUpdateInput(_0x456ff8),'dryRun':!![]});return{'method':_0x47f975[_0x39de06(0x135)][_0x39de06(0x136)]['method'],'url':_0x47f975[_0x39de06(0x135)]['backend']['path'],'body':_0x47f975[_0x39de06(0x135)][_0x39de06(0x136)][_0x39de06(0x129)],'description':_0x47f975[_0x39de06(0x10e)],..._0x47f975[_0x39de06(0x135)]};},async 'execute'(_0x1586cf){const _0x46716f=a58_0x2eb086;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1586cf[_0x46716f(0x10d)],'input':readBusinessGroupUpdateInput(_0x1586cf),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x587e2e){const _0x438aa3=a58_0x2eb086,_0x4e3a8c=_0x587e2e[_0x438aa3(0x101)](_0x438aa3(0x12f));return{'code':trim(_0x587e2e[_0x438aa3(0x101)](_0x438aa3(0x142))),'businessGroup':_0x587e2e[_0x438aa3(0x101)](_0x438aa3(0x13d)),'expectBusinessGroup':_0x4e3a8c===undefined||_0x4e3a8c===''?undefined:_0x4e3a8c};}function validateInput(_0x5333ee){const _0x34d154=a58_0x2eb086;if(!trim(_0x5333ee[_0x34d154(0x142)]))throw CliErrors['validation'](_0x34d154(0x125));if(_0x5333ee[_0x34d154(0x11c)]===undefined)throw CliErrors[_0x34d154(0x120)](_0x34d154(0x131));if(!trim(_0x5333ee[_0x34d154(0x11c)]))throw CliErrors[_0x34d154(0x120)]('--business-group\x20must\x20not\x20be\x20blank');}function a58_0x57d7(){const _0x5a4d05=['dbTableSelector','dbLinkId','datasetId','Expectation\x20mismatch\x20at\x20businessGroup','sourceType','dbtableConfig','str','datasetCode','4261104PKLaGs','stringify','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','dbId','6227970wXNEPQ','call','prototype','modelCode','extend','Update\x20business\x20scenario\x20group','appCode','message','expectBusinessGroup','toUpperCase','source','Expected\x20','DB_TABLE','write','update','parse','tableName','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','db-table','name','businessGroup','trim','string','3590645odTTqx','validation','hasOwnProperty','isFinite','isArray','METADATA','--code\x20is\x20required','520860KgxzOc','ungrouped','2136938qHSQIh','payload','/smartapi/dblink/updateTableBusinessGroup','6079888PNQwNq','datasetName','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','number','expect-business-group','found','--business-group\x20is\x20required','dataset','unchanged','POST','data','backend','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','3nsMeuR','apiError',',\x20actual\x20','1306848FRPhTb','business-group-update','business-group','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','length','matched','/smartapi/question/er-config/business-group/edit','code'];a58_0x57d7=function(){return _0x5a4d05;};return a58_0x57d7();}function assertBusinessGroupUpdateSupported(_0x1815d3,_0x7171b4){const _0x486d63=a58_0x2eb086;if(_0x1815d3[_0x486d63(0xff)]===_0x486d63(0x113)&&!_0x7171b4)throw CliErrors[_0x486d63(0x120)]('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function resolveBusinessGroupDataset(_0x7a5481,_0x5075af){const _0x26b1b5=a58_0x2eb086,_0x3af2da=asPlainObject(_0x7a5481[_0x26b1b5(0x132)]),_0x4e3cb5=asPlainObject(_0x7a5481[_0x26b1b5(0x100)]),_0x57c512=resolveSourceType(_0x7a5481,_0x3af2da,_0x4e3cb5),_0x3f4c50=firstString(_0x7a5481[_0x26b1b5(0x10a)],_0x7a5481[_0x26b1b5(0x142)],_0x3af2da[_0x26b1b5(0x102)],_0x5075af)||_0x5075af;return{'id':firstNumber(_0x7a5481['modelId'],_0x7a5481['id'],_0x3af2da[_0x26b1b5(0x145)])??firstString(_0x7a5481['modelId'],_0x7a5481['id'],_0x3af2da[_0x26b1b5(0x145)])??null,'code':_0x3f4c50,'name':firstString(_0x7a5481[_0x26b1b5(0x11b)],_0x3af2da[_0x26b1b5(0x12c)],_0x3af2da[_0x26b1b5(0x11b)])||null,'sourceType':_0x57c512,'dbTableSelector':_0x57c512===_0x26b1b5(0x113)?{'dbLinkId':firstNumber(_0x4e3cb5[_0x26b1b5(0x106)]),'tableName':firstString(_0x4e3cb5['tableName'])||null}:null};}function resolveSourceType(_0x3c5b54,_0x5cb20e,_0x403211){const _0x4fda5e=a58_0x2eb086,_0x1df1e0=firstString(_0x3c5b54[_0x4fda5e(0x111)],_0x3c5b54[_0x4fda5e(0xff)],_0x5cb20e[_0x4fda5e(0x111)],_0x5cb20e['sourceType'])?.[_0x4fda5e(0x11d)]()[_0x4fda5e(0x110)]();if(_0x1df1e0===_0x4fda5e(0x113)||_0x1df1e0===_0x4fda5e(0x124))return _0x1df1e0;if(Object['keys'](_0x403211)[_0x4fda5e(0x13f)]>0x0)return'DB_TABLE';throw CliErrors['validation']('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x5d7dba,_0x1765c8){const _0x46ab0a=a58_0x2eb086,_0x21785e=readBusinessGroupFromDatasetDetail(_0x5d7dba,_0x1765c8[_0x46ab0a(0xff)]);if(_0x21785e[_0x46ab0a(0x130)])return normalizeBusinessGroup(_0x21785e['value']);return'';}function readBusinessGroupFromDatasetDetail(_0xaec4b,_0x141076){const _0x3f962e=a58_0x2eb086,_0x1315bd=asPlainObject(_0xaec4b[_0x3f962e(0x132)]),_0x4453c0=firstPresent(_0xaec4b[_0x3f962e(0x11c)]);if(_0x4453c0['found'])return _0x4453c0;const _0x430b23=firstPresent(_0x1315bd['businessGroup']);if(_0x430b23['found'])return _0x430b23;if(_0x141076===_0x3f962e(0x113))return{'found':![]};const _0x137af4=readBusinessGroupFromExtend(_0xaec4b['extend']);if(_0x137af4[_0x3f962e(0x130)])return _0x137af4;return readBusinessGroupFromExtend(_0x1315bd[_0x3f962e(0x10b)]);}function readBusinessGroupFromExtend(_0x33d015){const _0x2bd914=a58_0x2eb086;if(_0x33d015===undefined||_0x33d015===null||_0x33d015==='')return{'found':![]};if(typeof _0x33d015===_0x2bd914(0x11e))try{const _0x4a418f=JSON[_0x2bd914(0x116)](_0x33d015);return readBusinessGroupFromExtend(_0x4a418f);}catch{return{'found':![]};}const _0x28f18e=asPlainObject(_0x33d015);if(Object[_0x2bd914(0x109)][_0x2bd914(0x121)][_0x2bd914(0x108)](_0x28f18e,'businessGroup'))return{'found':!![],'value':_0x28f18e['businessGroup']};return{'found':![]};}function firstPresent(..._0x261426){for(const _0x5eccfb of _0x261426){if(_0x5eccfb!==undefined&&_0x5eccfb!==null)return{'found':!![],'value':_0x5eccfb};}return{'found':![]};}function assertExpectedBusinessGroup(_0x54ed23,_0x8b46ba){const _0xf7b3fc=a58_0x2eb086;if(_0x8b46ba===undefined)return;const _0x4c840e=normalizeBusinessGroupArgument(_0x8b46ba);if(_0x54ed23!==_0x4c840e)throw CliErrors[_0xf7b3fc(0x120)](_0xf7b3fc(0xfe),_0xf7b3fc(0x112)+JSON[_0xf7b3fc(0x104)](_0x4c840e)+_0xf7b3fc(0x13a)+JSON[_0xf7b3fc(0x104)](_0x54ed23));}function buildBackendPlan(_0xd44350,_0x3c30d1,_0x40bc97){const _0x514064=a58_0x2eb086;if(_0x3c30d1[_0x514064(0xff)]==='DB_TABLE'){if(!_0x3c30d1[_0x514064(0x143)]||_0x3c30d1[_0x514064(0x143)]['dbLinkId']===null||!_0x3c30d1[_0x514064(0x143)][_0x514064(0x117)])throw CliErrors[_0x514064(0x120)]('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.',_0x514064(0x119));return{'kind':_0x514064(0x11a),'method':_0x514064(0x134),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x3c30d1[_0x514064(0x143)][_0x514064(0x144)],'tableName':_0x3c30d1[_0x514064(0x143)]['tableName'],'businessGroup':_0x40bc97}};}return{'kind':'metadata','method':_0x514064(0x134),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0xd44350,'datasetCode':_0x3c30d1[_0x514064(0x142)],'businessGroup':_0x40bc97}};}function a58_0x31ed(_0x691bb1,_0x353d3a){_0x691bb1=_0x691bb1-0xfe;const _0x57d7d2=a58_0x57d7();let _0x31edb1=_0x57d7d2[_0x691bb1];return _0x31edb1;}function normalizeBusinessGroup(_0x19a5f7){if(_0x19a5f7===undefined||_0x19a5f7===null)return'';return String(_0x19a5f7)['trim']();}function normalizeBusinessGroupArgument(_0x5b2a0e){const _0x48ec22=normalizeBusinessGroup(_0x5b2a0e);return _0x48ec22===UNGROUPED_BUSINESS_GROUP?'':_0x48ec22;}function displayBusinessGroup(_0x5427b7){return _0x5427b7||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x40bb92){const _0x4ae787=a58_0x2eb086;if(!_0x40bb92||typeof _0x40bb92!=='object'||Array[_0x4ae787(0x123)](_0x40bb92))return{};return _0x40bb92;}function firstString(..._0x3ac27a){const _0x2f2d75=a58_0x2eb086;for(const _0x4b032b of _0x3ac27a){if(typeof _0x4b032b===_0x2f2d75(0x11e)&&_0x4b032b[_0x2f2d75(0x11d)]())return _0x4b032b['trim']();if(typeof _0x4b032b==='number'&&Number[_0x2f2d75(0x122)](_0x4b032b))return String(_0x4b032b);}return undefined;}function firstNumber(..._0xe26a9d){const _0x325de4=a58_0x2eb086;for(const _0xee2ef2 of _0xe26a9d){if(typeof _0xee2ef2===_0x325de4(0x12e)&&Number[_0x325de4(0x122)](_0xee2ef2))return _0xee2ef2;if(typeof _0xee2ef2===_0x325de4(0x11e)&&_0xee2ef2[_0x325de4(0x11d)]()&&Number[_0x325de4(0x122)](Number(_0xee2ef2)))return Number(_0xee2ef2);}return null;}function trim(_0x38e126){const _0x35e025=a58_0x2eb086;return String(_0x38e126||'')[_0x35e025(0x11d)]();}
|
|
1
|
+
const a58_0x58a6db=a58_0x5e4d;(function(_0x43ff49,_0x3f851c){const _0x3f70da=a58_0x5e4d,_0x2f697c=_0x43ff49();while(!![]){try{const _0x1e6e01=parseInt(_0x3f70da(0x1ce))/0x1+-parseInt(_0x3f70da(0x1ac))/0x2*(parseInt(_0x3f70da(0x1d9))/0x3)+-parseInt(_0x3f70da(0x199))/0x4+-parseInt(_0x3f70da(0x1b7))/0x5*(-parseInt(_0x3f70da(0x1b6))/0x6)+-parseInt(_0x3f70da(0x1a5))/0x7+-parseInt(_0x3f70da(0x1b8))/0x8+parseInt(_0x3f70da(0x1c2))/0x9*(parseInt(_0x3f70da(0x1cf))/0xa);if(_0x1e6e01===_0x3f851c)break;else _0x2f697c['push'](_0x2f697c['shift']());}catch(_0x35ffd5){_0x2f697c['push'](_0x2f697c['shift']());}}}(a58_0x383f,0x1ba40));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a58_0x383f(){const _0x4acc0a=['path','4072WEjVeN','55070QjblMK','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','validation','stringify','hasOwnProperty','Update\x20business\x20scenario\x20group','modelId','DB_TABLE','dbTableSelector','datasetId','6kPGHZK','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','string','business-group-update','unchanged','found','extend','expect-business-group','trim','toUpperCase','str','89176TbhJII','apiError','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','sourceType','tableName','expectBusinessGroup','datasetCode','POST','business-group','--code\x20is\x20required','source','375676RyEQct','data',',\x20actual\x20','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','dbtableConfig','update','Expected\x20','19438JRozqw','length','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','value','code','dbId','metadata','kind','dbLinkId','db-table','102NVaPeQ','17455ZCWVGO','336328DoFgxX','name','ungrouped','message','businessGroup','METADATA','/smartapi/question/er-config/business-group/edit','appCode','backend','datasetName','306IaGpeB','number','method','isFinite','parse','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','payload','modelCode','--business-group\x20must\x20not\x20be\x20blank','/smartapi/dblink/updateTableBusinessGroup','Expectation\x20mismatch\x20at\x20businessGroup'];a58_0x383f=function(){return _0x4acc0a;};return a58_0x383f();}const DB_TABLE_BACKEND_PATH=a58_0x58a6db(0x1cb),METADATA_BACKEND_PATH=a58_0x58a6db(0x1be),UNGROUPED_BUSINESS_GROUP=a58_0x58a6db(0x1ba);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x5e0e55,input:_0x1fbc6a,dryRun:_0x5d85cc}){const _0x4ac873=a58_0x58a6db;validateInput(_0x1fbc6a);const _0x2654ab=normalizeBusinessGroupArgument(_0x1fbc6a[_0x4ac873(0x1bc)]),_0x51d5f0=await getDatasetDetail(_0x1fbc6a['code']),_0x366dc7=resolveBusinessGroupDataset(_0x51d5f0,_0x1fbc6a[_0x4ac873(0x1b0)]);assertBusinessGroupUpdateSupported(_0x366dc7,_0x2654ab);const _0x75ad22=loadCurrentBusinessGroup(_0x51d5f0,_0x366dc7);assertExpectedBusinessGroup(_0x75ad22,_0x1fbc6a[_0x4ac873(0x19f)]);const _0xcd00c2=buildBackendPlan(_0x5e0e55,_0x366dc7,_0x2654ab),_0x3a329c=_0x75ad22!==_0x2654ab;let _0x30bddb;if(_0x3a329c&&!_0x5d85cc){_0xcd00c2[_0x4ac873(0x1b3)]===_0x4ac873(0x1b5)?await updateDbTableBusinessGroup(_0xcd00c2[_0x4ac873(0x1c8)]):await updateErBusinessGroup(_0xcd00c2[_0x4ac873(0x1c8)]);const _0x31c2c1=await getDatasetDetail(_0x366dc7[_0x4ac873(0x1b0)]),_0x183149=resolveBusinessGroupDataset(_0x31c2c1,_0x366dc7[_0x4ac873(0x1b0)]),_0x650b56=loadCurrentBusinessGroup(_0x31c2c1,_0x183149);if(_0x650b56!==_0x2654ab)throw CliErrors[_0x4ac873(0x19a)](_0x4ac873(0x1d0),_0x4ac873(0x1ab)+JSON[_0x4ac873(0x1d2)](displayBusinessGroup(_0x2654ab))+_0x4ac873(0x1a7)+JSON[_0x4ac873(0x1d2)](displayBusinessGroup(_0x650b56))+'.');_0x30bddb={'verified':!![],'status':'matched','afterReadback':{'businessGroup':displayBusinessGroup(_0x650b56)}};}else!_0x3a329c&&(_0x30bddb={'verified':!![],'status':_0x4ac873(0x1dd),'afterReadback':{'businessGroup':displayBusinessGroup(_0x75ad22)}});const _0xdbedaa={'operation':_0x4ac873(0x1aa),'appCode':_0x5e0e55,'selector':{'code':_0x366dc7[_0x4ac873(0x1b0)]},'dataset':{'id':_0x366dc7['id'],'code':_0x366dc7[_0x4ac873(0x1b0)],'name':_0x366dc7[_0x4ac873(0x1b9)],'sourceType':_0x366dc7[_0x4ac873(0x19d)]},'before':{'businessGroup':displayBusinessGroup(_0x75ad22)},'after':{'businessGroup':displayBusinessGroup(_0x2654ab)},'changed':_0x3a329c,'dryRun':_0x5d85cc,'submitted':_0x3a329c&&!_0x5d85cc,'backend':{'method':_0xcd00c2[_0x4ac873(0x1c4)],'path':_0xcd00c2['path'],'payload':_0xcd00c2[_0x4ac873(0x1c8)]},..._0x30bddb?{'verification':_0x30bddb}:{},'warnings':[]};return{'ok':!![],'data':_0xdbedaa,'message':_0x3a329c?_0x5d85cc?_0x4ac873(0x19b)+_0x366dc7['code']:_0x4ac873(0x1a8)+_0x366dc7[_0x4ac873(0x1b0)]:_0x4ac873(0x1da)+_0x366dc7[_0x4ac873(0x1b0)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a58_0x58a6db(0x1dc),'description':a58_0x58a6db(0x1d4),'risk':'write','flags':[CODE_FLAG,{'name':a58_0x58a6db(0x1a2),'type':a58_0x58a6db(0x1db),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':a58_0x58a6db(0x1e0),'type':a58_0x58a6db(0x1db),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1b0aa2){validateInput(readBusinessGroupUpdateInput(_0x1b0aa2));},async 'dryRun'(_0x263f5c){const _0x547cbe=a58_0x58a6db,_0x4f407e=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x263f5c[_0x547cbe(0x1bf)],'input':readBusinessGroupUpdateInput(_0x263f5c),'dryRun':!![]});return{'method':_0x4f407e[_0x547cbe(0x1a6)][_0x547cbe(0x1c0)][_0x547cbe(0x1c4)],'url':_0x4f407e['data'][_0x547cbe(0x1c0)][_0x547cbe(0x1cd)],'body':_0x4f407e[_0x547cbe(0x1a6)]['backend'][_0x547cbe(0x1c8)],'description':_0x4f407e[_0x547cbe(0x1bb)],..._0x4f407e[_0x547cbe(0x1a6)]};},async 'execute'(_0x39d7da){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x39d7da['appCode'],'input':readBusinessGroupUpdateInput(_0x39d7da),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x47b620){const _0x16234e=a58_0x58a6db,_0x5b0259=_0x47b620[_0x16234e(0x198)](_0x16234e(0x1e0));return{'code':trim(_0x47b620['str'](_0x16234e(0x1b0))),'businessGroup':_0x47b620['str'](_0x16234e(0x1a2)),'expectBusinessGroup':_0x5b0259===undefined||_0x5b0259===''?undefined:_0x5b0259};}function a58_0x5e4d(_0xf676f,_0x2e293a){_0xf676f=_0xf676f-0x196;const _0x383fea=a58_0x383f();let _0x5e4d90=_0x383fea[_0xf676f];return _0x5e4d90;}function validateInput(_0x26382c){const _0x5db4b1=a58_0x58a6db;if(!trim(_0x26382c[_0x5db4b1(0x1b0)]))throw CliErrors[_0x5db4b1(0x1d1)](_0x5db4b1(0x1a3));if(_0x26382c[_0x5db4b1(0x1bc)]===undefined)throw CliErrors[_0x5db4b1(0x1d1)]('--business-group\x20is\x20required');if(!trim(_0x26382c[_0x5db4b1(0x1bc)]))throw CliErrors[_0x5db4b1(0x1d1)](_0x5db4b1(0x1ca));}function assertBusinessGroupUpdateSupported(_0x2bb5ca,_0x2ead06){const _0x2179a7=a58_0x58a6db;if(_0x2bb5ca[_0x2179a7(0x19d)]==='DB_TABLE'&&!_0x2ead06)throw CliErrors[_0x2179a7(0x1d1)]('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function resolveBusinessGroupDataset(_0x165bb8,_0xc2dd80){const _0x7374c8=a58_0x58a6db,_0x4b84b7=asPlainObject(_0x165bb8['dataset']),_0x1c368b=asPlainObject(_0x165bb8[_0x7374c8(0x1a9)]),_0x20677a=resolveSourceType(_0x165bb8,_0x4b84b7,_0x1c368b),_0x472479=firstString(_0x165bb8[_0x7374c8(0x1c9)],_0x165bb8[_0x7374c8(0x1b0)],_0x4b84b7[_0x7374c8(0x1a0)],_0xc2dd80)||_0xc2dd80;return{'id':firstNumber(_0x165bb8[_0x7374c8(0x1d5)],_0x165bb8['id'],_0x4b84b7['datasetId'])??firstString(_0x165bb8['modelId'],_0x165bb8['id'],_0x4b84b7[_0x7374c8(0x1d8)])??null,'code':_0x472479,'name':firstString(_0x165bb8[_0x7374c8(0x1b9)],_0x4b84b7[_0x7374c8(0x1c1)],_0x4b84b7['name'])||null,'sourceType':_0x20677a,'dbTableSelector':_0x20677a===_0x7374c8(0x1d6)?{'dbLinkId':firstNumber(_0x1c368b[_0x7374c8(0x1b1)]),'tableName':firstString(_0x1c368b[_0x7374c8(0x19e)])||null}:null};}function resolveSourceType(_0x39a6e3,_0xd510d9,_0x19a9c3){const _0x1b3500=a58_0x58a6db,_0xf788c7=firstString(_0x39a6e3[_0x1b3500(0x1a4)],_0x39a6e3[_0x1b3500(0x19d)],_0xd510d9[_0x1b3500(0x1a4)],_0xd510d9['sourceType'])?.['trim']()[_0x1b3500(0x197)]();if(_0xf788c7==='DB_TABLE'||_0xf788c7===_0x1b3500(0x1bd))return _0xf788c7;if(Object['keys'](_0x19a9c3)[_0x1b3500(0x1ad)]>0x0)return _0x1b3500(0x1d6);throw CliErrors[_0x1b3500(0x1d1)](_0x1b3500(0x1ae));}function loadCurrentBusinessGroup(_0x16bef9,_0x96a9ae){const _0x238c2b=a58_0x58a6db,_0x89028e=readBusinessGroupFromDatasetDetail(_0x16bef9,_0x96a9ae['sourceType']);if(_0x89028e[_0x238c2b(0x1de)])return normalizeBusinessGroup(_0x89028e[_0x238c2b(0x1af)]);return'';}function readBusinessGroupFromDatasetDetail(_0x41cc85,_0x5de9ac){const _0xa05807=a58_0x58a6db,_0x253f77=asPlainObject(_0x41cc85['dataset']),_0x31c62f=firstPresent(_0x41cc85[_0xa05807(0x1bc)]);if(_0x31c62f[_0xa05807(0x1de)])return _0x31c62f;const _0x1b7d67=firstPresent(_0x253f77[_0xa05807(0x1bc)]);if(_0x1b7d67['found'])return _0x1b7d67;if(_0x5de9ac==='DB_TABLE')return{'found':![]};const _0x2d9541=readBusinessGroupFromExtend(_0x41cc85[_0xa05807(0x1df)]);if(_0x2d9541[_0xa05807(0x1de)])return _0x2d9541;return readBusinessGroupFromExtend(_0x253f77[_0xa05807(0x1df)]);}function readBusinessGroupFromExtend(_0x166cd3){const _0x504ef6=a58_0x58a6db;if(_0x166cd3===undefined||_0x166cd3===null||_0x166cd3==='')return{'found':![]};if(typeof _0x166cd3===_0x504ef6(0x1db))try{const _0x5cda34=JSON[_0x504ef6(0x1c6)](_0x166cd3);return readBusinessGroupFromExtend(_0x5cda34);}catch{return{'found':![]};}const _0x2cfc4d=asPlainObject(_0x166cd3);if(Object['prototype'][_0x504ef6(0x1d3)]['call'](_0x2cfc4d,_0x504ef6(0x1bc)))return{'found':!![],'value':_0x2cfc4d[_0x504ef6(0x1bc)]};return{'found':![]};}function firstPresent(..._0x1dd68f){for(const _0x2865c5 of _0x1dd68f){if(_0x2865c5!==undefined&&_0x2865c5!==null)return{'found':!![],'value':_0x2865c5};}return{'found':![]};}function assertExpectedBusinessGroup(_0x55ca85,_0x986891){const _0x56ff25=a58_0x58a6db;if(_0x986891===undefined)return;const _0x2fb3a6=normalizeBusinessGroupArgument(_0x986891);if(_0x55ca85!==_0x2fb3a6)throw CliErrors[_0x56ff25(0x1d1)](_0x56ff25(0x1cc),_0x56ff25(0x1ab)+JSON[_0x56ff25(0x1d2)](_0x2fb3a6)+',\x20actual\x20'+JSON[_0x56ff25(0x1d2)](_0x55ca85));}function buildBackendPlan(_0x1ebf2a,_0x1de6df,_0x2e72f7){const _0x131de2=a58_0x58a6db;if(_0x1de6df['sourceType']===_0x131de2(0x1d6)){if(!_0x1de6df['dbTableSelector']||_0x1de6df['dbTableSelector']['dbLinkId']===null||!_0x1de6df[_0x131de2(0x1d7)]['tableName'])throw CliErrors[_0x131de2(0x1d1)](_0x131de2(0x1c7),_0x131de2(0x19c));return{'kind':_0x131de2(0x1b5),'method':_0x131de2(0x1a1),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x1de6df[_0x131de2(0x1d7)][_0x131de2(0x1b4)],'tableName':_0x1de6df[_0x131de2(0x1d7)][_0x131de2(0x19e)],'businessGroup':_0x2e72f7}};}return{'kind':_0x131de2(0x1b2),'method':_0x131de2(0x1a1),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x1ebf2a,'datasetCode':_0x1de6df[_0x131de2(0x1b0)],'businessGroup':_0x2e72f7}};}function normalizeBusinessGroup(_0x345282){const _0x604552=a58_0x58a6db;if(_0x345282===undefined||_0x345282===null)return'';return String(_0x345282)[_0x604552(0x196)]();}function normalizeBusinessGroupArgument(_0xd2d18a){const _0x4cbb62=normalizeBusinessGroup(_0xd2d18a);return _0x4cbb62===UNGROUPED_BUSINESS_GROUP?'':_0x4cbb62;}function displayBusinessGroup(_0x546d57){return _0x546d57||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x4fb9a3){if(!_0x4fb9a3||typeof _0x4fb9a3!=='object'||Array['isArray'](_0x4fb9a3))return{};return _0x4fb9a3;}function firstString(..._0x30e4ab){const _0x2f8dfe=a58_0x58a6db;for(const _0x13d94c of _0x30e4ab){if(typeof _0x13d94c===_0x2f8dfe(0x1db)&&_0x13d94c[_0x2f8dfe(0x196)]())return _0x13d94c['trim']();if(typeof _0x13d94c===_0x2f8dfe(0x1c3)&&Number['isFinite'](_0x13d94c))return String(_0x13d94c);}return undefined;}function firstNumber(..._0x360a02){const _0x1b28a3=a58_0x58a6db;for(const _0x5c8fa2 of _0x360a02){if(typeof _0x5c8fa2===_0x1b28a3(0x1c3)&&Number[_0x1b28a3(0x1c5)](_0x5c8fa2))return _0x5c8fa2;if(typeof _0x5c8fa2==='string'&&_0x5c8fa2[_0x1b28a3(0x196)]()&&Number['isFinite'](Number(_0x5c8fa2)))return Number(_0x5c8fa2);}return null;}function trim(_0x5aa60c){return String(_0x5aa60c||'')['trim']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a59_0x3d63(){const _0x29abaa=['Found\x20','businessGroup','351714bUHBPG','num','717828OOlCRw','\x20business\x20group(s)\x20for\x20database\x20connection\x20','914893CriZEu','1153107kIiZZO','43380OJFYPv','groups','140163XmuvfW','10BScqJG','246955yhfrmf','map','4nAZjDN','read','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','dbid','appCode','dataset','8baWTkv','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','trim'];a59_0x3d63=function(){return _0x29abaa;};return a59_0x3d63();}function a59_0x1436(_0x3fec93,_0x294f82){_0x3fec93=_0x3fec93-0x74;const _0x3d6314=a59_0x3d63();let _0x14361c=_0x3d6314[_0x3fec93];return _0x14361c;}const a59_0x36f21a=a59_0x1436;(function(_0x1036a9,_0x4ffa9e){const _0x1595ee=a59_0x1436,_0x4c41c3=_0x1036a9();while(!![]){try{const _0x1563e0=parseInt(_0x1595ee(0x83))/0x1+parseInt(_0x1595ee(0x7b))/0x2+-parseInt(_0x1595ee(0x81))/0x3+-parseInt(_0x1595ee(0x87))/0x4*(parseInt(_0x1595ee(0x85))/0x5)+-parseInt(_0x1595ee(0x7d))/0x6+-parseInt(_0x1595ee(0x7f))/0x7*(parseInt(_0x1595ee(0x76))/0x8)+-parseInt(_0x1595ee(0x80))/0x9*(-parseInt(_0x1595ee(0x84))/0xa);if(_0x1563e0===_0x4ffa9e)break;else _0x4c41c3['push'](_0x4c41c3['shift']());}catch(_0x1d1e8d){_0x4c41c3['push'](_0x4c41c3['shift']());}}}(a59_0x3d63,0x1fba3));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a59_0x36f21a(0x75),'command':'business-groups','description':a59_0x36f21a(0x89),'risk':a59_0x36f21a(0x88),'flags':[{'name':a59_0x36f21a(0x8a),'type':'number','required':!![],'description':a59_0x36f21a(0x77)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3d7161){const _0x3d9517=a59_0x36f21a,_0x2439ab=_0x3d7161[_0x3d9517(0x7c)](_0x3d9517(0x8a)),_0x48ec38=await getErBusinessGroupSummary(_0x3d7161[_0x3d9517(0x74)],_0x2439ab),_0x103250=_0x48ec38[_0x3d9517(0x82)][_0x3d9517(0x86)](_0x133b8b=>({..._0x133b8b,'businessGroup':_0x133b8b[_0x3d9517(0x7a)][_0x3d9517(0x78)]()||'ungrouped'}));return{'ok':!![],'data':{..._0x48ec38,'groups':_0x103250,'scope':'DB_TABLE'},'message':_0x3d9517(0x79)+_0x103250['length']+_0x3d9517(0x7e)+_0x2439ab};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x2f37a4=a60_0x1b14;(function(_0x54754d,_0x1fb5d2){const _0x2dc814=a60_0x1b14,_0x13258f=_0x54754d();while(!![]){try{const _0x245381=parseInt(_0x2dc814(0x1ad))/0x1+-parseInt(_0x2dc814(0x1ab))/0x2+-parseInt(_0x2dc814(0x1b6))/0x3+-parseInt(_0x2dc814(0x1bf))/0x4+parseInt(_0x2dc814(0x1c7))/0x5+parseInt(_0x2dc814(0x1c8))/0x6*(parseInt(_0x2dc814(0x1ac))/0x7)+parseInt(_0x2dc814(0x1bd))/0x8*(parseInt(_0x2dc814(0x1b0))/0x9);if(_0x245381===_0x1fb5d2)break;else _0x13258f['push'](_0x13258f['shift']());}catch(_0x2c3278){_0x13258f['push'](_0x13258f['shift']());}}}(a60_0x3f94,0x86e04));import{CliErrors}from'../../errors.js';function a60_0x3f94(){const _0x442e0c=['Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','unknown','725787cQRMdv','code','getOne','The\x20current\x20dataset\x20\x22','dbtableConfig','length','1511148YsOvko','tableName','dbId','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','datasetName','SQL\x20schema\x20validation','source','16LgRopr','object','1714460OcHDzE','name','filter','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','\x20is\x20','METADATA','validation','join','946095IVDAoa','6gfNNMd','dbtable','modelCode','sourceType','UNKNOWN','datasetCode','toUpperCase','dataset','9718TrwcCz','4007871bnZtim','566584aHPNOE'];a60_0x3f94=function(){return _0x442e0c;};return a60_0x3f94();}export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x369d2e){return _0x369d2e==null?'':String(_0x369d2e)['trim']();}function getDatasetCode(_0x581601){const _0x6119ea=a60_0x1b14;return valueToString(_0x581601[_0x6119ea(0x1b1)]??_0x581601[_0x6119ea(0x1ca)]??_0x581601[_0x6119ea(0x1aa)]?.[_0x6119ea(0x1cd)]);}function a60_0x1b14(_0x12d386,_0x42e9ab){_0x12d386=_0x12d386-0x1aa;const _0x3f94da=a60_0x3f94();let _0x1b143f=_0x3f94da[_0x12d386];return _0x1b143f;}function getDatasetName(_0x4bbeb9){const _0x1fcf0a=a60_0x1b14;return valueToString(_0x4bbeb9[_0x1fcf0a(0x1c0)]??_0x4bbeb9[_0x1fcf0a(0x1aa)]?.[_0x1fcf0a(0x1ba)])||_0x1fcf0a(0x1af);}function getDatasetSource(_0x52c055){const _0x28e4db=a60_0x1b14;return valueToString(_0x52c055[_0x28e4db(0x1bc)]??_0x52c055[_0x28e4db(0x1aa)]?.[_0x28e4db(0x1cb)])[_0x28e4db(0x1ce)]();}function getDbtableConfig(_0x5a6674){const _0x178647=a60_0x1b14,_0x45cd0a=_0x5a6674[_0x178647(0x1b4)]??_0x5a6674[_0x178647(0x1c9)];return _0x45cd0a&&typeof _0x45cd0a===_0x178647(0x1be)?_0x45cd0a:{};}export function isDbTableBackedDataset(_0x5d744b){const _0x98a7fb=a60_0x1b14,_0x32984b=getDatasetSource(_0x5d744b);if(_0x32984b===_0x98a7fb(0x1c4))return![];const _0x499f1b=getDbtableConfig(_0x5d744b),_0x18327d=_0x499f1b[_0x98a7fb(0x1b8)]??_0x499f1b['id'],_0x531c8a=valueToString(_0x499f1b[_0x98a7fb(0x1b7)]??_0x5d744b[_0x98a7fb(0x1b7)]??_0x5d744b[_0x98a7fb(0x1aa)]?.['tableName']);return _0x18327d!==undefined&&_0x18327d!==null&&_0x531c8a[_0x98a7fb(0x1b5)]>0x0;}export function filterDbTableBackedDatasets(_0x5bb7c2){const _0x34b9e9=a60_0x1b14;return _0x5bb7c2[_0x34b9e9(0x1c1)](_0x507651=>isDbTableBackedDataset(_0x507651));}export function buildDbTableBackedRequirementMessage(_0x370514,_0x30e9ae=a60_0x2f37a4(0x1bb)){const _0x534cd8=a60_0x2f37a4,_0x36edbb=getDatasetSource(_0x370514)||_0x534cd8(0x1cc),_0x2605e3=getDatasetName(_0x370514),_0x468cee=getDatasetCode(_0x370514),_0x37fd52=_0x468cee?'\x20('+_0x468cee+')':'';return[_0x534cd8(0x1b3)+_0x2605e3+'\x22'+_0x37fd52+_0x534cd8(0x1c3)+_0x36edbb+_0x534cd8(0x1b9)+_0x30e9ae+'.',_0x534cd8(0x1ae),'Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.',_0x534cd8(0x1c2)+RUNTIME_DATA_ACCESS_COMMANDS[_0x534cd8(0x1c1)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x534cd8(0x1b2)]+'.'][_0x534cd8(0x1c6)]('\x20');}export function assertDatasetIsDbTableBacked(_0xf5031e,_0x260c48){const _0x497838=a60_0x2f37a4;if(!isDbTableBackedDataset(_0xf5031e))throw CliErrors[_0x497838(0x1c5)](buildDbTableBackedRequirementMessage(_0xf5031e,_0x260c48));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x121cb3=a61_0xd569;(function(_0x1352ad,_0xa3cac5){const _0x26092a=a61_0xd569,_0x5a8245=_0x1352ad();while(!![]){try{const _0x15d949=parseInt(_0x26092a(0x1b3))/0x1*(-parseInt(_0x26092a(0x1d2))/0x2)+parseInt(_0x26092a(0x1d0))/0x3*(-parseInt(_0x26092a(0x1df))/0x4)+-parseInt(_0x26092a(0x1bb))/0x5+-parseInt(_0x26092a(0x1b7))/0x6+-parseInt(_0x26092a(0x1af))/0x7+-parseInt(_0x26092a(0x1ab))/0x8*(parseInt(_0x26092a(0x1c2))/0x9)+parseInt(_0x26092a(0x1cc))/0xa;if(_0x15d949===_0xa3cac5)break;else _0x5a8245['push'](_0x5a8245['shift']());}catch(_0x58f20a){_0x5a8245['push'](_0x5a8245['shift']());}}}(a61_0x3e9e,0x22a75));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a61_0xd569(_0x1cd64a,_0x213b4a){_0x1cd64a=_0x1cd64a-0x1a9;const _0x3e9e3e=a61_0x3e9e();let _0xd56924=_0x3e9e3e[_0x1cd64a];return _0xd56924;}const DATASET_ID_FLAG={'name':'id','type':a61_0x121cb3(0x1c1),'description':'Dataset\x20id'},DBID_FLAG={'name':a61_0x121cb3(0x1e1),'type':'number','description':a61_0x121cb3(0x1dc)},CONFIRM_FLAG={'name':a61_0x121cb3(0x1cd),'type':a61_0x121cb3(0x1d9),'description':a61_0x121cb3(0x1b8)},CASCADE_FLAG={'name':a61_0x121cb3(0x1cb),'type':a61_0x121cb3(0x1d9),'description':a61_0x121cb3(0x1ce)},EXPECTED_COUNT_FLAG={'name':a61_0x121cb3(0x1be),'type':a61_0x121cb3(0x1c1),'description':a61_0x121cb3(0x1d1)};export const datasetDelete={'service':'dataset','command':a61_0x121cb3(0x1c4),'description':a61_0x121cb3(0x1c3),'risk':a61_0x121cb3(0x1e6),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x22abc9){const _0x3138f0=a61_0x121cb3,_0x2cace5=_0x22abc9['num']('id'),_0x22cef9=_0x22abc9[_0x3138f0(0x1c7)]('code'),_0x116adb=_0x22abc9[_0x3138f0(0x1d4)]('dbid'),_0x35da41=[_0x2cace5>0x0,Boolean(_0x22cef9),_0x116adb>0x0][_0x3138f0(0x1e7)](Boolean);if(_0x35da41['length']===0x0)throw CliErrors['validation'](_0x3138f0(0x1ac));if(_0x35da41[_0x3138f0(0x1aa)]>0x1)throw CliErrors[_0x3138f0(0x1cf)](_0x3138f0(0x1d5));},async 'dryRun'(_0x1c9075){const _0xc84bfc=a61_0x121cb3,_0x108e9e=await resolveTargets(_0x1c9075),_0xd8d08=_0x1c9075[_0xc84bfc(0x1b1)](_0xc84bfc(0x1cb));return{'method':_0xc84bfc(0x1c8),'url':_0xc84bfc(0x1e2)+(_0xd8d08?'true':_0xc84bfc(0x1d8)),'body':{'count':_0x108e9e[_0xc84bfc(0x1aa)],'cascade':_0xd8d08,'datasets':_0x108e9e},'description':_0xd8d08?_0xc84bfc(0x1b0)+_0x108e9e[_0xc84bfc(0x1aa)]+'\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.':'Would\x20safely\x20delete\x20'+_0x108e9e['length']+'\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.'};},async 'execute'(_0x343887){const _0x517b3b=a61_0x121cb3;if(!_0x343887[_0x517b3b(0x1b1)]('confirm'))throw CliErrors['validation'](_0x517b3b(0x1db),_0x517b3b(0x1d7));const _0x2b25ce=await resolveTargets(_0x343887),_0x32a0e2=_0x343887[_0x517b3b(0x1b1)](_0x517b3b(0x1cb)),_0x263733=[],_0x989dba=[];for(const _0xa454b6 of _0x2b25ce){try{await deleteDataset(_0xa454b6['id'],_0x32a0e2),_0x263733['push'](_0xa454b6);}catch(_0x20a357){_0x989dba[_0x517b3b(0x1e9)]({..._0xa454b6,'error':_0x20a357 instanceof Error?_0x20a357[_0x517b3b(0x1da)]:String(_0x20a357)});}}if(_0x989dba[_0x517b3b(0x1aa)]>0x0){const _0x2ed8fb=buildPageRestoreCommands(_0x343887[_0x517b3b(0x1d3)],_0x32a0e2?_0x263733:[]);return{'ok':![],'data':{'requested':_0x2b25ce[_0x517b3b(0x1aa)],'cascade':_0x32a0e2,'deletedCount':_0x263733[_0x517b3b(0x1aa)],'failedCount':_0x989dba[_0x517b3b(0x1aa)],'deleted':_0x263733,'failed':_0x989dba,'pageRestoreCommands':_0x2ed8fb},'message':_0x517b3b(0x1c0)+_0x263733['length']+'/'+_0x2b25ce[_0x517b3b(0x1aa)]+_0x517b3b(0x1b5)+_0x989dba[_0x517b3b(0x1aa)]+_0x517b3b(0x1c6)};}return{'ok':!![],'data':{'requested':_0x2b25ce[_0x517b3b(0x1aa)],'cascade':_0x32a0e2,'deletedCount':_0x263733[_0x517b3b(0x1aa)],'deleted':_0x263733,'pageRestoreCommands':buildPageRestoreCommands(_0x343887[_0x517b3b(0x1d3)],_0x32a0e2?_0x263733:[])},'message':'Deleted\x20'+_0x263733[_0x517b3b(0x1aa)]+_0x517b3b(0x1b2)};}};async function resolveTargets(_0xbd8ae9){const _0x4a9953=a61_0x121cb3,_0x3938e4=_0xbd8ae9[_0x4a9953(0x1d4)]('id'),_0x47d0a9=_0xbd8ae9['str'](_0x4a9953(0x1c9)),_0x598032=_0xbd8ae9[_0x4a9953(0x1d4)](_0x4a9953(0x1e1));let _0x30028b;_0x47d0a9?(_0x30028b=await listDatasets(_0xbd8ae9[_0x4a9953(0x1d3)],{'code':_0x47d0a9}),_0x30028b=_0x30028b[_0x4a9953(0x1e7)](_0x13a97d=>_0x13a97d[_0x4a9953(0x1c9)]===_0x47d0a9)):(_0x30028b=await listDatasets(_0xbd8ae9['appCode']),_0x3938e4>0x0&&(_0x30028b=_0x30028b['filter'](_0x545d5c=>_0x545d5c['id']===_0x3938e4)),_0x598032>0x0&&(_0x30028b=_0x30028b[_0x4a9953(0x1e7)](_0x5a46e1=>_0x5a46e1['dbtableConfig']?.[_0x4a9953(0x1bd)]===_0x598032)));const _0x245ac2=[];for(const _0x1bd5b2 of _0x30028b){const _0x128cd6=await getDatasetDetail(_0x1bd5b2['code']),_0x3e61cf=Array[_0x4a9953(0x1ae)](_0x128cd6[_0x4a9953(0x1ad)])?_0x128cd6[_0x4a9953(0x1ad)][_0x4a9953(0x1e7)](_0x41fdb4=>_0x41fdb4!=null&&typeof _0x41fdb4===_0x4a9953(0x1c5)&&_0x41fdb4[_0x4a9953(0x1e3)]!==!![]):[];_0x245ac2[_0x4a9953(0x1e9)](normalizeTarget(_0x1bd5b2,_0x3e61cf));}if(_0x245ac2[_0x4a9953(0x1aa)]===0x0){const _0x44e65f=_0x47d0a9||(_0x3938e4>0x0?_0x4a9953(0x1eb)+_0x3938e4:'dbid='+_0x598032);throw CliErrors[_0x4a9953(0x1cf)](_0x4a9953(0x1b4)+_0x44e65f+'.');}const _0xdd7d28=_0xbd8ae9[_0x4a9953(0x1d4)](_0x4a9953(0x1be));if(_0xdd7d28>0x0&&_0x245ac2[_0x4a9953(0x1aa)]!==_0xdd7d28)throw CliErrors[_0x4a9953(0x1cf)](_0x4a9953(0x1b9)+_0x245ac2[_0x4a9953(0x1aa)]+_0x4a9953(0x1e4)+_0xdd7d28+'.');return _0x245ac2;}function normalizeTarget(_0x2cb523,_0x396b95){const _0x31538a=a61_0x121cb3,_0x382e4d=_0x2cb523[_0x31538a(0x1ca)]??{},_0x4c4a25=_0x396b95[_0x31538a(0x1a9)](_0x157a07=>{const _0xce6925=_0x31538a;if(_0x157a07==null||typeof _0x157a07!=='object')return null;const _0x56577f=_0x157a07,_0x23f1ca=Number(_0x56577f['id']);if(!Number[_0xce6925(0x1ba)](_0x23f1ca)||_0x23f1ca<=0x0)return null;const _0x36cd97=_0x56577f[_0xce6925(0x1d6)]??_0x56577f[_0xce6925(0x1e0)];return{'id':_0x23f1ca,..._0x36cd97?{'name':String(_0x36cd97)}:{},..._0x56577f[_0xce6925(0x1e5)]?{'type':String(_0x56577f['type'])}:{}};})[_0x31538a(0x1e7)](_0x3388cd=>_0x3388cd!==null);return{'id':_0x2cb523['id'],'code':_0x2cb523[_0x31538a(0x1c9)],'name':_0x2cb523[_0x31538a(0x1e0)],'description':_0x2cb523['description'],'source':_0x2cb523[_0x31538a(0x1dd)],'dbId':_0x382e4d[_0x31538a(0x1bd)],'dbName':_0x382e4d[_0x31538a(0x1de)],'tableName':_0x382e4d[_0x31538a(0x1bc)],'relatedPageCount':_0x4c4a25['length'],'relatedPages':_0x4c4a25};}function buildPageRestoreCommands(_0x3855f8,_0x3a485a){const _0xa0c284=a61_0x121cb3,_0xcfe3d3=new Set();for(const _0x214da6 of _0x3a485a){for(const _0x57b883 of _0x214da6[_0xa0c284(0x1bf)])_0xcfe3d3[_0xa0c284(0x1e8)](_0x57b883['id']);}return[..._0xcfe3d3][_0xa0c284(0x1a9)](_0x5af960=>_0xa0c284(0x1ea)+_0x5af960+_0xa0c284(0x1b6)+_0x3855f8);}function a61_0x3e9e(){const _0x24b064=['number','1080594kbdkrk','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','delete','object','\x20failed','str','POST','code','dbtableConfig','cascade','7512270OsDAnL','confirm','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','validation','6SoEdCE','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','2fkjgOy','appCode','num','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','title','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','false','boolean','message','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','source','dbName','225404YdOEvH','name','dbid','/smartapi/dataset/delete?cascade=','deleted','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','type','high-risk-write','filter','add','push','rabetbase\x20page\x20restore\x20--id\x20','id=','map','length','8FDwxeL','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','relatedPageInfoList','isArray','197869yvkJIb','Would\x20delete\x20','bool','\x20dataset(s)','262277QzTYRE','No\x20undeleted\x20dataset\x20found\x20for\x20','\x20dataset(s);\x20','\x20--appcode\x20','307164xorggp','Required\x20to\x20execute\x20dataset\x20deletion','Matched\x20','isInteger','173900cFWJxu','tableName','dbId','expected-count','relatedPages','Deleted\x20'];a61_0x3e9e=function(){return _0x24b064;};return a61_0x3e9e();}
|