@lovrabet/rabetbase-cli 2.5.2-beta.1 → 2.5.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -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.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.d.ts +1 -0
- 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.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/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-all.d.ts +2 -0
- package/lib/commands/deployment/sync-all.js +1 -0
- package/lib/commands/deployment/sync-jobs.d.ts +2 -0
- package/lib/commands/deployment/sync-jobs.js +1 -0
- package/lib/commands/deployment/sync-status.d.ts +2 -0
- package/lib/commands/deployment/sync-status.js +1 -0
- 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/instant-api-policy/current.d.ts +2 -0
- package/lib/commands/instant-api-policy/current.js +1 -0
- package/lib/commands/instant-api-policy/index.d.ts +2 -0
- package/lib/commands/instant-api-policy/index.js +1 -0
- package/lib/commands/instant-api-policy/init.d.ts +2 -0
- package/lib/commands/instant-api-policy/init.js +1 -0
- package/lib/commands/instant-api-policy/publish.d.ts +2 -0
- package/lib/commands/instant-api-policy/publish.js +1 -0
- package/lib/commands/instant-api-policy/pull.d.ts +2 -0
- package/lib/commands/instant-api-policy/pull.js +1 -0
- package/lib/commands/instant-api-policy/revision.d.ts +2 -0
- package/lib/commands/instant-api-policy/revision.js +1 -0
- package/lib/commands/instant-api-policy/revisions.d.ts +2 -0
- package/lib/commands/instant-api-policy/revisions.js +1 -0
- package/lib/commands/instant-api-policy/rollback.d.ts +2 -0
- package/lib/commands/instant-api-policy/rollback.js +1 -0
- package/lib/commands/instant-api-policy/shared.d.ts +82 -0
- package/lib/commands/instant-api-policy/shared.js +1 -0
- package/lib/commands/instant-api-policy/validate.d.ts +2 -0
- package/lib/commands/instant-api-policy/validate.js +1 -0
- 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.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.d.ts +3 -7
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +114 -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/instant-api-policy/config.d.ts +23 -0
- package/lib/core/instant-api-policy/config.js +1 -0
- 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/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.d.ts +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +1 -3
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +12 -6
- package/skills/rabetbase/references/rabetbase-app-members-list.md +2 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync.md +41 -5
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +92 -0
- package/skills/rabetbase.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x594037=a46_0x5782;(function(_0x83ca65,_0x45c4b0){const _0x142685=a46_0x5782,_0x49b0e5=_0x83ca65();while(!![]){try{const _0x5c0787=-parseInt(_0x142685(0x19b))/0x1+parseInt(_0x142685(0x18a))/0x2*(parseInt(_0x142685(0x186))/0x3)+parseInt(_0x142685(0x18c))/0x4+parseInt(_0x142685(0x191))/0x5+-parseInt(_0x142685(0x198))/0x6+-parseInt(_0x142685(0x18b))/0x7*(parseInt(_0x142685(0x1a0))/0x8)+parseInt(_0x142685(0x199))/0x9*(parseInt(_0x142685(0x1a1))/0xa);if(_0x5c0787===_0x45c4b0)break;else _0x49b0e5['push'](_0x49b0e5['shift']());}catch(_0x4b6c7d){_0x49b0e5['push'](_0x49b0e5['shift']());}}}(a46_0x5a2d,0x471be));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x594037(0x188),a46_0x594037(0x196)]),NON_TERMINAL_STATUSES=new Set(['PENDING','PROCESSING']);function a46_0x5a2d(){const _0xcbe4cd=['47070uYFelA','18SfTgCc','errorMessage','296545aByksw','trim','\x27\x5c\x27\x27','string','\x20--appcode\x20','4395896ZrseXk','1715950vdacMc','186402OMLcYk','\x20is\x20processing.','SUCCESS','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','8dTXDtD','7tQYGqa','642684tlzFsA','Async\x20task\x20','has','status','Task\x20','1963710acfPvT','toUpperCase','\x20failed:\x20','apiError','taskId','FAILED','\x20response\x20did\x20not\x20contain\x20a\x20status.'];a46_0x5a2d=function(){return _0xcbe4cd;};return a46_0x5a2d();}export function normalizeAsyncTask(_0x16fc5b){const _0x40acf9=a46_0x594037,_0x41899c=typeof _0x16fc5b?.[_0x40acf9(0x195)]==='string'?_0x16fc5b[_0x40acf9(0x195)]['trim']():'';if(!_0x41899c)throw CliErrors[_0x40acf9(0x194)](_0x40acf9(0x189));const _0x417460=typeof _0x16fc5b[_0x40acf9(0x18f)]===_0x40acf9(0x19e)?_0x16fc5b['status']['trim']()[_0x40acf9(0x192)]():'';if(!_0x417460)throw CliErrors[_0x40acf9(0x194)](_0x40acf9(0x18d)+_0x41899c+_0x40acf9(0x197));return{'taskId':_0x41899c,'status':_0x417460,'errorMessage':typeof _0x16fc5b[_0x40acf9(0x19a)]===_0x40acf9(0x19e)&&_0x16fc5b[_0x40acf9(0x19a)][_0x40acf9(0x19c)]()?_0x16fc5b[_0x40acf9(0x19a)][_0x40acf9(0x19c)]():null,'isTerminal':TERMINAL_STATUSES[_0x40acf9(0x18e)](_0x417460),'knownStatus':TERMINAL_STATUSES[_0x40acf9(0x18e)](_0x417460)||NON_TERMINAL_STATUSES['has'](_0x417460)};}export function buildAsyncTaskStatusCommand(_0x158585,_0x24f740){const _0x330c51=a46_0x594037;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x158585)+_0x330c51(0x19f)+quoteShellArg(_0x24f740)+'\x20--format\x20compress';}function a46_0x5782(_0x212ee1,_0x2d63b5){_0x212ee1=_0x212ee1-0x186;const _0x5a2d1d=a46_0x5a2d();let _0x5782cb=_0x5a2d1d[_0x212ee1];return _0x5782cb;}export function asyncTaskMessage(_0x3efbdc){const _0x510aaa=a46_0x594037;switch(_0x3efbdc[_0x510aaa(0x18f)]){case'PENDING':return'Task\x20'+_0x3efbdc[_0x510aaa(0x195)]+'\x20is\x20pending.';case'PROCESSING':return _0x510aaa(0x190)+_0x3efbdc[_0x510aaa(0x195)]+_0x510aaa(0x187);case _0x510aaa(0x188):return _0x510aaa(0x190)+_0x3efbdc['taskId']+'\x20completed\x20successfully.';case'FAILED':return _0x3efbdc[_0x510aaa(0x19a)]?_0x510aaa(0x190)+_0x3efbdc[_0x510aaa(0x195)]+_0x510aaa(0x193)+_0x3efbdc['errorMessage']:_0x510aaa(0x190)+_0x3efbdc[_0x510aaa(0x195)]+'\x20failed.';default:return _0x510aaa(0x190)+_0x3efbdc[_0x510aaa(0x195)]+'\x20returned\x20unknown\x20status\x20'+_0x3efbdc[_0x510aaa(0x18f)]+'.';}}function quoteShellArg(_0x5792be){const _0x1cb834=a46_0x594037;return'\x27'+_0x5792be['replace'](/'/g,_0x1cb834(0x19d))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a47_0x3e69(){var _0x263f26=['1655572viTvNO','241495cyOnBD','767723FaVcYX','defineProperties','8pMXccb','3340280KhsGfN','687993SdeFXH','27EzPWvY','description','method','887211pyYzYE','5642469HWfcKm','90uBiJKG','156oMpMFc','8DxLlSi'];a47_0x3e69=function(){return _0x263f26;};return a47_0x3e69();}(function(_0x273a55,_0xe32160){var _0x2ea278=a47_0x4182,_0x3bbb12=_0x273a55();while(!![]){try{var _0x41d304=parseInt(_0x2ea278(0x1ce))/0x1+parseInt(_0x2ea278(0x1d3))/0x2+parseInt(_0x2ea278(0x1d9))/0x3*(parseInt(_0x2ea278(0x1d7))/0x4)+parseInt(_0x2ea278(0x1d4))/0x5*(-parseInt(_0x2ea278(0x1d0))/0x6)+-parseInt(_0x2ea278(0x1cf))/0x7*(parseInt(_0x2ea278(0x1d2))/0x8)+parseInt(_0x2ea278(0x1cb))/0x9*(-parseInt(_0x2ea278(0x1d8))/0xa)+-parseInt(_0x2ea278(0x1d5))/0xb*(-parseInt(_0x2ea278(0x1d1))/0xc);if(_0x41d304===_0xe32160)break;else _0x3bbb12['push'](_0x3bbb12['shift']());}catch(_0x24374c){_0x3bbb12['push'](_0x3bbb12['shift']());}}}(a47_0x3e69,0x85dec));function a47_0x4182(_0x4f6aaf,_0x586168){_0x4f6aaf=_0x4f6aaf-0x1cb;var _0x3e6930=a47_0x3e69();var _0x418261=_0x3e6930[_0x4f6aaf];return _0x418261;}export function asDryRunResult(_0x26d17d,_0x4fc98f){var _0x4a190a=a47_0x4182;return Object[_0x4a190a(0x1d6)](_0x26d17d,{'method':{'value':_0x4fc98f[_0x4a190a(0x1cd)],'enumerable':![]},'url':{'value':_0x4fc98f['url'],'enumerable':![]},..._0x4fc98f[_0x4a190a(0x1cc)]?{'description':{'value':_0x4fc98f[_0x4a190a(0x1cc)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0x117b33=a48_0x52d8;(function(_0xd8b1b9,_0x2445bb){const _0x1af68e=a48_0x52d8,_0x590db8=_0xd8b1b9();while(!![]){try{const _0x215d83=parseInt(_0x1af68e(0x11b))/0x1+parseInt(_0x1af68e(0x10f))/0x2+parseInt(_0x1af68e(0x114))/0x3*(-parseInt(_0x1af68e(0x108))/0x4)+-parseInt(_0x1af68e(0x11e))/0x5+-parseInt(_0x1af68e(0x10a))/0x6*(-parseInt(_0x1af68e(0x10c))/0x7)+parseInt(_0x1af68e(0x10d))/0x8+-parseInt(_0x1af68e(0x111))/0x9*(-parseInt(_0x1af68e(0x109))/0xa);if(_0x215d83===_0x2445bb)break;else _0x590db8['push'](_0x590db8['shift']());}catch(_0x22201e){_0x590db8['push'](_0x590db8['shift']());}}}(a48_0x4b66,0xb64e7));export const GLOBAL_SCOPE_FLAG={'name':a48_0x117b33(0x115),'type':a48_0x117b33(0x112),'default':![],'description':a48_0x117b33(0x11c)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x117b33(0x11a)};export const CODE_FLAG={'name':a48_0x117b33(0x125),'type':'string','required':!![],'description':a48_0x117b33(0x119),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x117b33(0x10e),'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'};function a48_0x4b66(){const _0x165ac1=['6980EaOcBG','996igCLZN','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','7616vFXjpW','11579264kdhBlA','datasetcode','1241766qFxwXw','string','909arTnQo','boolean','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','3RKHMiK','global','dbtype','skip-connection-test','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','844279hrqOaO','Write\x20to\x20the\x20global\x20configuration','POSTGRESQL','6989880LuRYzv','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','App\x20code\x20(e.g.\x20app-xxxxx)','appcode','MYSQL','Database\x20product\x20type','code','4075892svBTNU'];a48_0x4b66=function(){return _0x165ac1;};return a48_0x4b66();}function a48_0x52d8(_0x47836c,_0x22c007){_0x47836c=_0x47836c-0x108;const _0x4b66d4=a48_0x4b66();let _0x52d831=_0x4b66d4[_0x47836c];return _0x52d831;}export const SQLCODE_FLAG={'name':'sqlcode','type':a48_0x117b33(0x110),'required':!![],'description':a48_0x117b33(0x113),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x117b33(0x10b)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x117b33(0x122),'type':a48_0x117b33(0x110),'required':![],'description':a48_0x117b33(0x120)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x117b33(0x121)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a48_0x117b33(0x118)};export const DB_TYPE_FLAG={'name':a48_0x117b33(0x116),'type':a48_0x117b33(0x110),'required':!![],'description':a48_0x117b33(0x124),'enum':[a48_0x117b33(0x123),a48_0x117b33(0x11d)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0x117b33(0x117),'type':'boolean','description':a48_0x117b33(0x11f)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x565409,_0x42f656){const _0xd035cf=a49_0x1b18,_0x4e6cff=_0x565409();while(!![]){try{const _0x3845ae=-parseInt(_0xd035cf(0x11e))/0x1+-parseInt(_0xd035cf(0x11c))/0x2+-parseInt(_0xd035cf(0x126))/0x3+parseInt(_0xd035cf(0x117))/0x4+parseInt(_0xd035cf(0x11f))/0x5+-parseInt(_0xd035cf(0x125))/0x6*(parseInt(_0xd035cf(0x11d))/0x7)+parseInt(_0xd035cf(0x123))/0x8;if(_0x3845ae===_0x42f656)break;else _0x4e6cff['push'](_0x4e6cff['shift']());}catch(_0x1152ef){_0x4e6cff['push'](_0x4e6cff['shift']());}}}(a49_0x1ca1,0x203c3));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a49_0x1b18(_0x2132d1,_0x598f7b){_0x2132d1=_0x2132d1-0x117;const _0x1ca15b=a49_0x1ca1();let _0x1b1816=_0x1ca15b[_0x2132d1];return _0x1b1816;}function a49_0x1ca1(){const _0x5c7e5f=['14rwmEQB','80149nLWuSM','541500LEgfVx','trim','toFixed','ceil','1565272uImoms','size','666klVSAB','699336jUcZTv','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','792392WnpOkP','validation','File\x20is\x20not\x20a\x20regular\x20file:\x20','File\x20not\x20found:\x20','\x20MB','113078MNPpeh'];a49_0x1ca1=function(){return _0x5c7e5f;};return a49_0x1ca1();}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x27db9e){const _0x5a261d=a49_0x1b18;if(_0x27db9e>=BYTES_PER_MB){const _0x1a0156=Math[_0x5a261d(0x122)](_0x27db9e/BYTES_PER_MB*0x64)/0x64;return _0x1a0156[_0x5a261d(0x121)](0x2)+_0x5a261d(0x11b);}return _0x27db9e+'\x20B';}export function requireDevelopmentUploadFile(_0x445364,_0x3ec384){const _0x521613=a49_0x1b18,_0x46666=_0x445364[_0x521613(0x120)]();if(!_0x46666)throw CliErrors[_0x521613(0x118)](_0x3ec384+'\x20path\x20is\x20required.');if(!existsSync(_0x46666))throw CliErrors[_0x521613(0x118)](_0x521613(0x11a)+_0x46666);const _0x50655b=statSync(_0x46666);if(!_0x50655b['isFile']())throw CliErrors['validation'](_0x521613(0x119)+_0x46666);if(_0x50655b[_0x521613(0x124)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x521613(0x118)](_0x521613(0x127)+_0x46666+'\x20('+formatBytes(_0x50655b['size'])+')');return{'path':_0x46666,'size':_0x50655b[_0x521613(0x124)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a50_0x31c4(){const _0x1dd5e8=['1048212RunZhq','81wUGnDw','563910RXDtBp','10yqPSpP','4Ezrdgu','1436916KKIjlB','19499RHEZCo','trim','App\x20Code\x20cannot\x20exceed\x20100\x20characters','3wbwzzs','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','323860VzmxVA','test','143ydAtpb','length','3721448aweqeE','2140089QMOdKH','App\x20Code\x20cannot\x20be\x20empty'];a50_0x31c4=function(){return _0x1dd5e8;};return a50_0x31c4();}(function(_0x217dfd,_0x19fd65){const _0x2037b1=a50_0xcd0a,_0x408b97=_0x217dfd();while(!![]){try{const _0x4d0618=parseInt(_0x2037b1(0x176))/0x1*(-parseInt(_0x2037b1(0x174))/0x2)+-parseInt(_0x2037b1(0x167))/0x3*(parseInt(_0x2037b1(0x169))/0x4)+-parseInt(_0x2037b1(0x173))/0x5*(parseInt(_0x2037b1(0x175))/0x6)+-parseInt(_0x2037b1(0x16e))/0x7+-parseInt(_0x2037b1(0x16d))/0x8+parseInt(_0x2037b1(0x171))/0x9*(parseInt(_0x2037b1(0x172))/0xa)+-parseInt(_0x2037b1(0x16b))/0xb*(-parseInt(_0x2037b1(0x170))/0xc);if(_0x4d0618===_0x19fd65)break;else _0x408b97['push'](_0x408b97['shift']());}catch(_0xde6462){_0x408b97['push'](_0x408b97['shift']());}}}(a50_0x31c4,0x42b57));function a50_0xcd0a(_0x25b903,_0x472ec2){_0x25b903=_0x25b903-0x166;const _0x31c4e2=a50_0x31c4();let _0xcd0a04=_0x31c4e2[_0x25b903];return _0xcd0a04;}export function validateAppcode(_0x34f8ea){const _0x285b5f=a50_0xcd0a,_0x498f7d=_0x34f8ea[_0x285b5f(0x177)]();if(!_0x498f7d)return{'valid':![],'message':_0x285b5f(0x16f)};if(_0x498f7d[_0x285b5f(0x16c)]>0x64)return{'valid':![],'message':_0x285b5f(0x166)};if(!/^[A-Za-z0-9_-]+$/[_0x285b5f(0x16a)](_0x498f7d))return{'valid':![],'message':_0x285b5f(0x168)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a51_0x34aee8=a51_0x4f42;(function(_0x27b3f6,_0x3ba55f){const _0x33fb47=a51_0x4f42,_0x1dc93a=_0x27b3f6();while(!![]){try{const _0x35dc25=-parseInt(_0x33fb47(0x12d))/0x1+-parseInt(_0x33fb47(0x130))/0x2+-parseInt(_0x33fb47(0x139))/0x3*(-parseInt(_0x33fb47(0x132))/0x4)+parseInt(_0x33fb47(0x129))/0x5*(parseInt(_0x33fb47(0x127))/0x6)+-parseInt(_0x33fb47(0x121))/0x7+parseInt(_0x33fb47(0x137))/0x8+parseInt(_0x33fb47(0x138))/0x9*(-parseInt(_0x33fb47(0x13c))/0xa);if(_0x35dc25===_0x3ba55f)break;else _0x1dc93a['push'](_0x1dc93a['shift']());}catch(_0x6bdbbd){_0x1dc93a['push'](_0x1dc93a['shift']());}}}(a51_0x50e7,0x4b75b));import{CliErrors}from'../../errors.js';function a51_0x4f42(_0x4d22cb,_0x350c17){_0x4d22cb=_0x4d22cb-0x120;const _0x50e7ac=a51_0x50e7();let _0x4f4221=_0x50e7ac[_0x4d22cb];return _0x4f4221;}import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a51_0x34aee8(0x133)]),EXTRA_DELETABLE_KEYS=new Set([a51_0x34aee8(0x134),a51_0x34aee8(0x13e)]);async function execute(_0xce014e){const _0x3d75f0=a51_0x34aee8,_0x211e70=_0xce014e[_0x3d75f0(0x13b)][0x0]?.['trim']();if(!_0x211e70)throw CliErrors['validation'](_0x3d75f0(0x13d),_0x3d75f0(0x12c)+CLI_BIN_NAME+_0x3d75f0(0x135));if(_0x211e70===_0x3d75f0(0x12e))throw CliErrors['validation'](_0x3d75f0(0x123));if(!isTopLevelConfigKey(_0x211e70)&&!EXTRA_DELETABLE_KEYS['has'](_0x211e70)&&!LEGACY_DELETABLE_KEYS[_0x3d75f0(0x131)](_0x211e70))throw CliErrors[_0x3d75f0(0x13a)](_0x3d75f0(0x141)+_0x211e70+'\x22\x20is\x20not\x20deletable.',_0x3d75f0(0x13f));const _0x358532=resolveWriteScope({'global':_0xce014e[_0x3d75f0(0x142)](_0x3d75f0(0x136))}),_0x530cce=readScopedConfig(_0x358532),_0x42d5c0=Object[_0x3d75f0(0x12f)][_0x3d75f0(0x128)]['call'](_0x530cce,_0x211e70);_0x42d5c0&&(delete _0x530cce[_0x211e70],writeScopedConfig(_0x530cce,_0x358532));const _0x352acb=_0x358532===_0x3d75f0(0x136)?'Global':_0x3d75f0(0x124);return{'ok':!![],'message':_0x42d5c0?'✓\x20'+_0x352acb+'\x20'+_0x211e70+_0x3d75f0(0x140):'✓\x20'+_0x352acb+'\x20'+_0x211e70+_0x3d75f0(0x12b),'data':{'key':_0x211e70,'scope':_0x358532,'changed':_0x42d5c0}};}function a51_0x50e7(){const _0x1ea82e=['routing','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','\x20deleted','Top-level\x20key\x20\x22','bool','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','2320983VyjQym','key','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Project','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','boolean','6srISfI','hasOwnProperty','1373510ZqVyBx','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','\x20already\x20absent','Usage:\x20','46724IYCQoZ','riskLevel','prototype','513568AzkLRT','has','68AvjTjr','inherit','defaultApp','\x20config\x20delete\x20<key>\x20[--global]','global','3405296gxQLmy','230931GveJqT','56607YvOqYs','validation','args','30luggRf','Missing\x20key\x20argument.'];a51_0x50e7=function(){return _0x1ea82e;};return a51_0x50e7();}export const configDeleteDefinition={'service':'config','command':'delete','description':a51_0x34aee8(0x125),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a51_0x34aee8(0x122),'description':a51_0x34aee8(0x120),'required':!![]}],'flags':[{'name':a51_0x34aee8(0x136),'type':a51_0x34aee8(0x126),'description':a51_0x34aee8(0x12a),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a52_0x2a125a=a52_0x5bba;(function(_0x499c4d,_0x4a1e63){const _0x5ce345=a52_0x5bba,_0x58144a=_0x499c4d();while(!![]){try{const _0x19caa3=parseInt(_0x5ce345(0x11e))/0x1*(-parseInt(_0x5ce345(0x10f))/0x2)+parseInt(_0x5ce345(0x113))/0x3*(parseInt(_0x5ce345(0x119))/0x4)+-parseInt(_0x5ce345(0x10e))/0x5+parseInt(_0x5ce345(0x116))/0x6+-parseInt(_0x5ce345(0x10d))/0x7+-parseInt(_0x5ce345(0x115))/0x8+-parseInt(_0x5ce345(0x11a))/0x9*(-parseInt(_0x5ce345(0x111))/0xa);if(_0x19caa3===_0x4a1e63)break;else _0x58144a['push'](_0x58144a['shift']());}catch(_0x5b5217){_0x58144a['push'](_0x58144a['shift']());}}}(a52_0x485a,0xae091));import{CliErrors}from'../../errors.js';function a52_0x485a(){const _0x4ac82d=['Missing\x20key.','15soaXsA','config','4771744sokJiu','4267110EivClT','app','key','900228fQOGPg','85149nuUbOr','Get\x20a\x20config\x20value\x20by\x20key','Usage:\x20','Key\x20not\x20found:\x20','12maJGwH','get','read','\x20config\x20get\x20--key\x20<key>','appcode','1030561hHpMzm','6856540BxyQiu','235286BtTzYU','validation','2540RTktHW'];a52_0x485a=function(){return _0x4ac82d;};return a52_0x485a();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a52_0x5bba(_0x4e1527,_0x3501fd){_0x4e1527=_0x4e1527-0x109;const _0x485ab2=a52_0x485a();let _0x5bba17=_0x485ab2[_0x4e1527];return _0x5bba17;}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x214793){const _0x1aee82=a52_0x5bba,_0x25b8ba=_0x214793['str']('key');if(!_0x25b8ba)throw CliErrors[_0x1aee82(0x110)](_0x1aee82(0x112),_0x1aee82(0x11c)+CLI_BIN_NAME+_0x1aee82(0x10b));const _0x55f66c=readConfig(),_0x1cedb8=_0x25b8ba===_0x1aee82(0x117)?_0x1aee82(0x10c):_0x25b8ba,_0xfa0f3d=_0x55f66c[_0x1cedb8];if(_0xfa0f3d===undefined)throw CliErrors['validation'](_0x1aee82(0x11d)+_0x25b8ba);return{'ok':!![],'data':typeof _0xfa0f3d==='object'?_0xfa0f3d:{[_0x1cedb8]:_0xfa0f3d},'message':typeof _0xfa0f3d==='object'?undefined:String(_0xfa0f3d)};}export const configGetDefinition={'service':a52_0x2a125a(0x114),'command':a52_0x2a125a(0x109),'description':a52_0x2a125a(0x11b),'risk':a52_0x2a125a(0x10a),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x2a125a(0x118),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x297982,_0x243176){const _0x494e1b=a53_0x488f,_0x3053ea=_0x297982();while(!![]){try{const _0x93b3dc=-parseInt(_0x494e1b(0xb8))/0x1*(-parseInt(_0x494e1b(0xb0))/0x2)+-parseInt(_0x494e1b(0xb4))/0x3+parseInt(_0x494e1b(0xaf))/0x4+-parseInt(_0x494e1b(0xb1))/0x5+-parseInt(_0x494e1b(0xb6))/0x6*(parseInt(_0x494e1b(0xb5))/0x7)+parseInt(_0x494e1b(0xb7))/0x8*(parseInt(_0x494e1b(0xb3))/0x9)+parseInt(_0x494e1b(0xb2))/0xa;if(_0x93b3dc===_0x243176)break;else _0x3053ea['push'](_0x3053ea['shift']());}catch(_0x238ba3){_0x3053ea['push'](_0x3053ea['shift']());}}}(a53_0x2cfe,0xd8d33));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';function a53_0x2cfe(){const _0x1679d0=['1064208ryuhio','1168052hQnWtb','5832875JDXILJ','22773450hJmokL','9qCgMLv','2221512xmzzcf','3718848fsPWdQ','12jlPlHb','5842392rQhxSz','1Dugghm'];a53_0x2cfe=function(){return _0x1679d0;};return a53_0x2cfe();}function a53_0x488f(_0x4decf8,_0x273522){_0x4decf8=_0x4decf8-0xaf;const _0x2cfe93=a53_0x2cfe();let _0x488f91=_0x2cfe93[_0x4decf8];return _0x488f91;}import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x7f1c50=a54_0x4853;(function(_0x568ac1,_0x849a0d){const _0x5154ad=a54_0x4853,_0x166623=_0x568ac1();while(!![]){try{const _0x7425c2=-parseInt(_0x5154ad(0x10b))/0x1*(-parseInt(_0x5154ad(0xf5))/0x2)+-parseInt(_0x5154ad(0x106))/0x3*(parseInt(_0x5154ad(0xe8))/0x4)+parseInt(_0x5154ad(0xf3))/0x5+parseInt(_0x5154ad(0xf9))/0x6*(parseInt(_0x5154ad(0xe5))/0x7)+-parseInt(_0x5154ad(0x102))/0x8*(parseInt(_0x5154ad(0x100))/0x9)+-parseInt(_0x5154ad(0xe0))/0xa*(-parseInt(_0x5154ad(0xe9))/0xb)+parseInt(_0x5154ad(0x10c))/0xc*(-parseInt(_0x5154ad(0x111))/0xd);if(_0x7425c2===_0x849a0d)break;else _0x166623['push'](_0x166623['shift']());}catch(_0x33dfc0){_0x166623['push'](_0x166623['shift']());}}}(a54_0x1d80,0xca199));import{select}from'@inquirer/prompts';function a54_0x1d80(){const _0x2d726c=['mode','keys','204EIQwuR','kb-domain','map','nonInteractive','Custom\x20local\x20callback\x20HTTPS\x20origin','Custom\x20certificate\x20service\x20HTTPS\x20origin','cancelled','18dsRXzp','local-domain','4255456quSZMv','join','validation','Custom\x20platform\x20API\x20HTTPS\x20origin','504AxImWz','skill-domain','enterprise-v1','Region\x20\x22','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','30xBIszc','12QlwhOr','assign','ExitPromptError','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','label','10695646VYOxet','certificateDomain','global','str','config','project','app-domain','bool','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','write','1380MfjJGT','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','Custom\x20User\x20HTTPS\x20origin','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','Custom\x20knowledge-base\x20HTTPS\x20origin','279293qJEYwy','domains','region','64DcFwuz','5269StrmlJ','Custom\x20Runtime\x20HTTPS\x20origin','user-domain','string','cdn','\x22\x20is\x20not\x20currently\x20available.','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','runtime-domain','Available\x20regions:\x20','init','1767985AkocYV','length','62722GicWRw','routing'];a54_0x1d80=function(){return _0x2d726c;};return a54_0x1d80();}function a54_0x4853(_0x5a6466,_0x3eaa72){_0x5a6466=_0x5a6466-0xdb;const _0x1d8074=a54_0x1d80();let _0x4853cb=_0x1d8074[_0x5a6466];return _0x4853cb;}import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a54_0x7f1c50(0xe7),'type':a54_0x7f1c50(0xec),'description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES[a54_0x7f1c50(0x103)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'domain-config','type':a54_0x7f1c50(0xec),'description':'Independent-deployment\x20Domain\x20JSON\x20file'},{'name':a54_0x7f1c50(0xeb),'type':a54_0x7f1c50(0xec),'description':a54_0x7f1c50(0xe2)},{'name':'api-domain','type':'string','description':a54_0x7f1c50(0x105)},{'name':a54_0x7f1c50(0xf0),'type':a54_0x7f1c50(0xec),'description':a54_0x7f1c50(0xea)},{'name':a54_0x7f1c50(0x107),'type':a54_0x7f1c50(0xec),'description':'Custom\x20SkillHub\x20HTTPS\x20origin'},{'name':a54_0x7f1c50(0xfa),'type':'string','description':a54_0x7f1c50(0xe4)},{'name':a54_0x7f1c50(0xdc),'type':a54_0x7f1c50(0xec),'description':a54_0x7f1c50(0x10a)},{'name':a54_0x7f1c50(0x101),'type':a54_0x7f1c50(0xec),'description':a54_0x7f1c50(0xfd)},{'name':'certificate-domain','type':a54_0x7f1c50(0xec),'description':a54_0x7f1c50(0xfe)}];async function resolveRegion(_0x2164f3){const _0x4a28aa=a54_0x7f1c50,_0x520afc=_0x2164f3['str'](_0x4a28aa(0xe7));if(_0x520afc){if(!isEnabledLovrabetRegion(_0x520afc))throw CliErrors[_0x4a28aa(0x104)](_0x4a28aa(0x109)+_0x520afc+_0x4a28aa(0xee),_0x4a28aa(0xf1)+ENABLED_LOVRABET_REGION_VALUES[_0x4a28aa(0x103)](',\x20'));return _0x520afc;}if(_0x2164f3[_0x4a28aa(0xfc)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x4a28aa(0xfb)](_0x40b18e=>({'name':getOfficialRoutingProfile(_0x40b18e)[_0x4a28aa(0x110)]+'\x20('+_0x40b18e+')','value':_0x40b18e}))});}catch(_0x43db9c){if(_0x43db9c?.['name']===_0x4a28aa(0x10e))throw CliErrors[_0x4a28aa(0xff)]();throw _0x43db9c;}}export async function executeConfigInit(_0x5c2b19){const _0x55b326=a54_0x7f1c50,_0x86d652=resolveDomainConfigInput(_0x5c2b19),_0x384e92=_0x86d652[_0x55b326(0xe6)],_0x1152d8=Object[_0x55b326(0xf8)](_0x384e92)[_0x55b326(0xf4)]>0x0;if(_0x1152d8&&_0x5c2b19[_0x55b326(0x114)](_0x55b326(0xe7)))throw CliErrors[_0x55b326(0x104)](_0x55b326(0xde));if(!!_0x384e92['localDomain']!==!!_0x384e92[_0x55b326(0x112)])throw CliErrors[_0x55b326(0x104)]('Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.');const _0x37861b=_0x5c2b19[_0x55b326(0xdd)](_0x55b326(0x113))?_0x55b326(0x113):_0x55b326(0xdb),_0x50ce29=readScopedConfig(_0x37861b);for(const _0xa8e62 of DOMAIN_CONFIG_FIELDS)delete _0x50ce29[_0xa8e62];for(const _0x133b39 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x50ce29[_0x133b39];delete _0x50ce29[_0x55b326(0xf6)];let _0x2ef501=null;if(_0x1152d8)delete _0x50ce29[_0x55b326(0xe7)],_0x86d652['mode']===_0x55b326(0x108)?_0x50ce29[_0x55b326(0xf6)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x86d652['manifestDomains'],'cdn':_0x86d652[_0x55b326(0xed)]}:Object[_0x55b326(0x10d)](_0x50ce29,_0x384e92);else{_0x2ef501=await resolveRegion(_0x5c2b19);if(_0x2ef501===DEFAULT_LOVRABET_REGION)delete _0x50ce29[_0x55b326(0xe7)];else _0x50ce29[_0x55b326(0xe7)]=_0x2ef501;}return writeScopedConfig(_0x50ce29,_0x37861b),{'ok':!![],'message':_0x1152d8?_0x55b326(0x10f)+Object[_0x55b326(0xf8)](_0x86d652[_0x55b326(0xf7)]===_0x55b326(0x108)?_0x86d652['manifestDomains']:_0x384e92)[_0x55b326(0x103)](',\x20')+'.':_0x55b326(0xe1)+_0x2ef501+'.','data':{'mode':_0x1152d8?'independent':'official','protocol':_0x86d652[_0x55b326(0xf7)]===_0x55b326(0x108)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x2ef501,'domains':_0x384e92,'cdn':_0x86d652['mode']===_0x55b326(0x108)?_0x86d652[_0x55b326(0xed)]:undefined}};}export const configInitDefinition={'service':a54_0x7f1c50(0x115),'command':a54_0x7f1c50(0xf2),'description':a54_0x7f1c50(0xe3),'risk':a54_0x7f1c50(0xdf),'confirmationDescription':a54_0x7f1c50(0xef),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a55_0x313c8f=a55_0xb7b2;function a55_0x91c2(){const _0x15f7c4=['99bqyxnA','444996yfUBIx','40386CwBxzr','3MGusZr','115490uAyRvO','global','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','659304tEZMyn','6008101zNJLQf','bool','read','65YbBgjT','boolean','238446EkBHFP','list','21fHYKHr','331036hougKC'];a55_0x91c2=function(){return _0x15f7c4;};return a55_0x91c2();}function a55_0xb7b2(_0x455ecf,_0xbcb2d2){_0x455ecf=_0x455ecf-0xe1;const _0x91c23e=a55_0x91c2();let _0xb7b2c5=_0x91c23e[_0x455ecf];return _0xb7b2c5;}(function(_0x2ca4a7,_0x18ec2d){const _0x32b6cd=a55_0xb7b2,_0x362b0f=_0x2ca4a7();while(!![]){try{const _0x4c0573=-parseInt(_0x32b6cd(0xf0))/0x1+-parseInt(_0x32b6cd(0xe4))/0x2+parseInt(_0x32b6cd(0xe6))/0x3*(parseInt(_0x32b6cd(0xe2))/0x4)+-parseInt(_0x32b6cd(0xee))/0x5*(-parseInt(_0x32b6cd(0xe5))/0x6)+-parseInt(_0x32b6cd(0xe1))/0x7*(parseInt(_0x32b6cd(0xea))/0x8)+parseInt(_0x32b6cd(0xe3))/0x9*(parseInt(_0x32b6cd(0xe7))/0xa)+parseInt(_0x32b6cd(0xeb))/0xb;if(_0x4c0573===_0x18ec2d)break;else _0x362b0f['push'](_0x362b0f['shift']());}catch(_0x485b46){_0x362b0f['push'](_0x362b0f['shift']());}}}(a55_0x91c2,0x2108d));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x1e1ddd){const _0x1aa230=a55_0xb7b2,_0x597ed9=_0x1e1ddd[_0x1aa230(0xec)]('global')?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x597ed9};}export const configListDefinition={'service':'config','command':a55_0x313c8f(0xf1),'description':'List\x20all\x20config\x20values','risk':a55_0x313c8f(0xed),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x313c8f(0xe8),'type':a55_0x313c8f(0xef),'description':a55_0x313c8f(0xe9),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x5ba604=a56_0x3560;(function(_0x5e5da4,_0x4a75ef){const _0x2ea3e1=a56_0x3560,_0x14a3a0=_0x5e5da4();while(!![]){try{const _0x3eca68=parseInt(_0x2ea3e1(0x1ea))/0x1+parseInt(_0x2ea3e1(0x1fc))/0x2*(-parseInt(_0x2ea3e1(0x213))/0x3)+parseInt(_0x2ea3e1(0x214))/0x4+-parseInt(_0x2ea3e1(0x1f0))/0x5+parseInt(_0x2ea3e1(0x208))/0x6*(parseInt(_0x2ea3e1(0x20f))/0x7)+parseInt(_0x2ea3e1(0x211))/0x8*(-parseInt(_0x2ea3e1(0x1eb))/0x9)+parseInt(_0x2ea3e1(0x1f7))/0xa;if(_0x3eca68===_0x4a75ef)break;else _0x14a3a0['push'](_0x14a3a0['shift']());}catch(_0x2d8bb9){_0x14a3a0['push'](_0x14a3a0['shift']());}}}(a56_0x1f71,0xbe51c));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a56_0x3560(_0x1358b6,_0x2e98ef){_0x1358b6=_0x1358b6-0x1e0;const _0x1f7103=a56_0x1f71();let _0x356086=_0x1f7103[_0x1358b6];return _0x356086;}import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a56_0x1f71(){const _0x45d5fb=['locale','34rdUeMT','key','bool','Use\x20`','object','Settable\x20top-level\x20keys:\x20','Top-level\x20key\x20\x22','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','\x22\x20is\x20not\x20settable.','validation','string','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','350886rrNSjG','Project','Set\x20a\x20config\x20value','keys','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','join','\x20appcode\x20set\x20to:\x20','70btvwzb','`,\x20`','29832QBXykK','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','117753tSdqLa','3969976pBjBvT','set','env','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','riskLevel','appcode','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','length','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','\x22.\x20Allowed:\x20','Usage:\x20','write','value','1284950LeFpQb','1467MTYKmg','Config\x20value','Invalid\x20value\x20for\x20\x22','global','str','5290955ZsOynR','app','boolean','Invalid\x20locale\x20value.','\x20set\x20to:\x20','config','includes','2505790xXAAdh','apps','Missing\x20value.','Global'];a56_0x1f71=function(){return _0x45d5fb;};return a56_0x1f71();}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x5ac411){const _0x391162=a56_0x3560,_0x52bfa9=_0x5ac411[_0x391162(0x1ef)](_0x391162(0x1fd)),_0x3ebe75=_0x5ac411[_0x391162(0x1ef)](_0x391162(0x1e9));if(!_0x52bfa9)throw CliErrors[_0x391162(0x205)]('Missing\x20key.',_0x391162(0x1e7)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x3ebe75===undefined||_0x3ebe75==='')throw CliErrors[_0x391162(0x205)](_0x391162(0x1f9),'Usage:\x20'+CLI_BIN_NAME+_0x391162(0x1e0));let _0x3dbac2=_0x52bfa9,_0x299d0b=_0x3ebe75;if(_0x3ebe75[_0x391162(0x1e4)]>0x1f4)throw CliErrors[_0x391162(0x205)](_0x391162(0x1e5));if(_0x52bfa9===_0x391162(0x1e1))throw CliErrors[_0x391162(0x205)](_0x391162(0x1e3));if(!isTopLevelConfigKey(_0x52bfa9))throw CliErrors[_0x391162(0x205)](_0x391162(0x202)+_0x52bfa9+_0x391162(0x204),_0x391162(0x201)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x52bfa9]&&!CONFIG_ENUM_VALUES[_0x52bfa9][_0x391162(0x1f6)](_0x3ebe75))throw CliErrors['validation'](_0x391162(0x1ed)+_0x52bfa9+_0x391162(0x1e6)+CONFIG_ENUM_VALUES[_0x52bfa9][_0x391162(0x20d)](',\x20'));if(_0x52bfa9===_0x391162(0x1fb)&&!normalizeLocale(_0x3ebe75))throw CliErrors[_0x391162(0x205)](_0x391162(0x1f3),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');DOMAIN_CONFIG_FIELDS[_0x391162(0x1f6)](_0x52bfa9)&&(_0x299d0b=normalizeDomainOrigin(_0x52bfa9,_0x3ebe75));const _0x464eb7={'global':_0x5ac411[_0x391162(0x1fe)](_0x391162(0x1ee))},_0x43986a=resolveWriteScope(_0x464eb7),_0x39081f=readScopedConfig(_0x43986a);_0x52bfa9===_0x391162(0x1f1)&&(_0x3dbac2=_0x391162(0x1e2),delete _0x39081f[_0x391162(0x1f1)]);_0x52bfa9===_0x391162(0x1fb)&&(_0x299d0b=normalizeLocale(_0x3ebe75));if(_0x52bfa9===_0x391162(0x216)){_0x299d0b=normalizeEnv(_0x3ebe75);if(!isProduction(_0x299d0b)&&!isDaily(_0x299d0b))throw CliErrors[_0x391162(0x205)](_0x391162(0x212),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x52bfa9===_0x391162(0x1e2)){const _0x318d6b=_0x39081f[_0x391162(0x1f8)]&&typeof _0x39081f[_0x391162(0x1f8)]===_0x391162(0x200)?Object[_0x391162(0x20b)](_0x39081f[_0x391162(0x1f8)]):[];if(_0x318d6b[_0x391162(0x1e4)]>0x0)throw CliErrors['validation'](_0x391162(0x203),_0x391162(0x1ff)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20'+_0x299d0b+_0x391162(0x210)+CLI_BIN_NAME+_0x391162(0x207));const _0xfecf70=buildCanonicalProjectConfig({..._0x39081f},{'appCodes':[_0x299d0b],'env':typeof _0x39081f[_0x391162(0x216)]===_0x391162(0x206)?_0x39081f[_0x391162(0x216)]:undefined});writeScopedConfig(_0xfecf70,_0x43986a);const _0x1d4ba5=_0x43986a===_0x391162(0x1ee)?_0x391162(0x1fa):'Project';return{'ok':!![],'message':'✓\x20'+_0x1d4ba5+_0x391162(0x20e)+_0x299d0b+'\x20(stored\x20as\x20a\x20single\x20app\x20profile)'};}_0x39081f[_0x3dbac2]=_0x299d0b,writeScopedConfig(_0x39081f,_0x43986a);const _0x5b815c=_0x43986a===_0x391162(0x1ee)?'Global':_0x391162(0x209);return{'ok':!![],'message':'✓\x20'+_0x5b815c+'\x20'+_0x3dbac2+_0x391162(0x1f4)+_0x299d0b};}export const configSetDefinition={'service':a56_0x5ba604(0x1f5),'command':a56_0x5ba604(0x215),'description':a56_0x5ba604(0x20a),'risk':a56_0x5ba604(0x1e8),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a56_0x5ba604(0x206),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a56_0x5ba604(0x1e9),'type':a56_0x5ba604(0x206),'description':a56_0x5ba604(0x1ec),'required':!![]},{'name':'global','type':a56_0x5ba604(0x1f2),'description':a56_0x5ba604(0x20c),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x115c91,_0x1b5282){var _0x3923e2=a57_0x18d2,_0xda1e51=_0x115c91();while(!![]){try{var _0x5dedbe=parseInt(_0x3923e2(0x187))/0x1+parseInt(_0x3923e2(0x191))/0x2*(parseInt(_0x3923e2(0x186))/0x3)+-parseInt(_0x3923e2(0x18a))/0x4+-parseInt(_0x3923e2(0x18d))/0x5+-parseInt(_0x3923e2(0x189))/0x6+-parseInt(_0x3923e2(0x18e))/0x7+parseInt(_0x3923e2(0x192))/0x8;if(_0x5dedbe===_0x1b5282)break;else _0xda1e51['push'](_0xda1e51['shift']());}catch(_0x4a4334){_0xda1e51['push'](_0xda1e51['shift']());}}}(a57_0x399d,0x2d0b6));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a57_0x399d(){var _0x5249d5=['323427oAdcmP','325387unoIXW','project','944910pxgciC','1056652GqeXWG','global','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','1642910eOujLq','1852655aEVSYx','validation','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','4OXGqTr','5267136rzaWpr','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).'];a57_0x399d=function(){return _0x5249d5;};return a57_0x399d();}function a57_0x18d2(_0x37f3e8,_0x25e93a){_0x37f3e8=_0x37f3e8-0x186;var _0x399d79=a57_0x399d();var _0x18d2ad=_0x399d79[_0x37f3e8];return _0x18d2ad;}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(_0x2cc01e){var _0x5b9c22=a57_0x18d2;if(_0x2cc01e[_0x5b9c22(0x18b)])return _0x5b9c22(0x18b);if(!isInProject())throw CliErrors[_0x5b9c22(0x18f)](_0x5b9c22(0x193),_0x5b9c22(0x18c)+CLI_BIN_NAME+_0x5b9c22(0x190));return _0x5b9c22(0x188);}export function readScopedConfig(_0x13917f){return readConfigFile(resolveWriteConfigPath(_0x13917f));}export function writeScopedConfig(_0x81e2b5,_0x2f660f){writeConfigFile(resolveWriteConfigPath(_0x2f660f),_0x81e2b5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a58_0x454318=a58_0x589b;(function(_0x326a34,_0x316d12){const _0x141693=a58_0x589b,_0x4749d7=_0x326a34();while(!![]){try{const _0x1a2feb=parseInt(_0x141693(0x11c))/0x1+-parseInt(_0x141693(0xe0))/0x2*(-parseInt(_0x141693(0x105))/0x3)+parseInt(_0x141693(0x10f))/0x4*(parseInt(_0x141693(0xe7))/0x5)+parseInt(_0x141693(0xf4))/0x6*(parseInt(_0x141693(0xfa))/0x7)+-parseInt(_0x141693(0x112))/0x8+parseInt(_0x141693(0xff))/0x9*(parseInt(_0x141693(0xdd))/0xa)+parseInt(_0x141693(0xfc))/0xb*(-parseInt(_0x141693(0xe3))/0xc);if(_0x1a2feb===_0x316d12)break;else _0x4749d7['push'](_0x4749d7['shift']());}catch(_0x2fe4ea){_0x4749d7['push'](_0x4749d7['shift']());}}}(a58_0x45ab,0x1a011));function a58_0x589b(_0x38fdec,_0x4b4a4a){_0x38fdec=_0x38fdec-0xd2;const _0x45abaf=a58_0x45ab();let _0x589bb2=_0x45abaf[_0x38fdec];return _0x589bb2;}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_0x45ab(){const _0x226051=['datasetId','db-table','data','33MRaXJD','object','METADATA','code','stringify','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','metadata','modelCode','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','dbTableSelector','151284oJbMkD','toUpperCase','name','1676536SphjkQ',',\x20actual\x20','Expected\x20','--business-group\x20is\x20required','--business-group\x20must\x20not\x20be\x20blank','businessGroup','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','Update\x20business\x20scenario\x20group','method','appCode','61997OZDhTC','string','ungrouped','value','matched','hasOwnProperty','expect-business-group','extend','source','business-group-update','datasetName','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','sourceType','986570VFDVtJ','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','--code\x20is\x20required','20062Dokbgx','tableName','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','32376OhZkGh','dataset','path','backend','10adocGx','POST','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','call','dbLinkId','str','modelId','DB_TABLE','payload','business-group','isFinite','validation','expectBusinessGroup','26394ulNvCY','/smartapi/dblink/updateTableBusinessGroup','found','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','Expectation\x20mismatch\x20at\x20businessGroup','keys','63jrkwAt','dbtableConfig','286hRFCXA','apiError','trim','9CLfVZF','isArray','dbId'];a58_0x45ab=function(){return _0x226051;};return a58_0x45ab();}const DB_TABLE_BACKEND_PATH=a58_0x454318(0xf5),METADATA_BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP=a58_0x454318(0xd2);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x53db66,input:_0x10a262,dryRun:_0x20e307}){const _0x1103e=a58_0x454318;validateInput(_0x10a262);const _0x14d38e=normalizeBusinessGroupArgument(_0x10a262[_0x1103e(0x117)]),_0x4db2f8=await getDatasetDetail(_0x10a262[_0x1103e(0x108)]),_0x56333b=resolveBusinessGroupDataset(_0x4db2f8,_0x10a262[_0x1103e(0x108)]);assertBusinessGroupUpdateSupported(_0x56333b,_0x14d38e);const _0x2df10d=loadCurrentBusinessGroup(_0x4db2f8,_0x56333b);assertExpectedBusinessGroup(_0x2df10d,_0x10a262[_0x1103e(0xf3)]);const _0x1164d0=buildBackendPlan(_0x53db66,_0x56333b,_0x14d38e),_0x4d813a=_0x2df10d!==_0x14d38e;let _0x5b1faa;if(_0x4d813a&&!_0x20e307){_0x1164d0['kind']==='db-table'?await updateDbTableBusinessGroup(_0x1164d0[_0x1103e(0xef)]):await updateErBusinessGroup(_0x1164d0[_0x1103e(0xef)]);const _0x11fe51=await getDatasetDetail(_0x56333b['code']),_0x4b520b=resolveBusinessGroupDataset(_0x11fe51,_0x56333b[_0x1103e(0x108)]),_0x3d7732=loadCurrentBusinessGroup(_0x11fe51,_0x4b520b);if(_0x3d7732!==_0x14d38e)throw CliErrors[_0x1103e(0xfd)](_0x1103e(0xe2),_0x1103e(0x114)+JSON['stringify'](displayBusinessGroup(_0x14d38e))+_0x1103e(0x113)+JSON[_0x1103e(0x109)](displayBusinessGroup(_0x3d7732))+'.');_0x5b1faa={'verified':!![],'status':_0x1103e(0xd4),'afterReadback':{'businessGroup':displayBusinessGroup(_0x3d7732)}};}else!_0x4d813a&&(_0x5b1faa={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x2df10d)}});const _0x177a1d={'operation':'update','appCode':_0x53db66,'selector':{'code':_0x56333b[_0x1103e(0x108)]},'dataset':{'id':_0x56333b['id'],'code':_0x56333b[_0x1103e(0x108)],'name':_0x56333b[_0x1103e(0x111)],'sourceType':_0x56333b['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x2df10d)},'after':{'businessGroup':displayBusinessGroup(_0x14d38e)},'changed':_0x4d813a,'dryRun':_0x20e307,'submitted':_0x4d813a&&!_0x20e307,'backend':{'method':_0x1164d0[_0x1103e(0x11a)],'path':_0x1164d0[_0x1103e(0xe5)],'payload':_0x1164d0[_0x1103e(0xef)]},..._0x5b1faa?{'verification':_0x5b1faa}:{},'warnings':[]};return{'ok':!![],'data':_0x177a1d,'message':_0x4d813a?_0x20e307?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x56333b['code']:_0x1103e(0xe9)+_0x56333b['code']:_0x1103e(0xf7)+_0x56333b[_0x1103e(0x108)]};}export const datasetBusinessGroupUpdate={'service':a58_0x454318(0xe4),'command':a58_0x454318(0xd9),'description':a58_0x454318(0x119),'risk':'write','flags':[CODE_FLAG,{'name':a58_0x454318(0xf0),'type':'string','required':!![],'description':a58_0x454318(0x118)},{'name':a58_0x454318(0xd6),'type':a58_0x454318(0x11d),'required':![],'description':a58_0x454318(0x10a)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1077a2){validateInput(readBusinessGroupUpdateInput(_0x1077a2));},async 'dryRun'(_0x3a4ef2){const _0x99336d=a58_0x454318,_0x260171=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x3a4ef2[_0x99336d(0x11b)],'input':readBusinessGroupUpdateInput(_0x3a4ef2),'dryRun':!![]});return{'method':_0x260171[_0x99336d(0x104)][_0x99336d(0xe6)][_0x99336d(0x11a)],'url':_0x260171[_0x99336d(0x104)][_0x99336d(0xe6)][_0x99336d(0xe5)],'body':_0x260171[_0x99336d(0x104)]['backend'][_0x99336d(0xef)],'description':_0x260171['message'],..._0x260171[_0x99336d(0x104)]};},async 'execute'(_0x3c51b2){const _0x4a7e3c=a58_0x454318;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x3c51b2[_0x4a7e3c(0x11b)],'input':readBusinessGroupUpdateInput(_0x3c51b2),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x5e6dff){const _0x559b6c=a58_0x454318,_0x3e3e74=_0x5e6dff['str']('expect-business-group');return{'code':trim(_0x5e6dff[_0x559b6c(0xec)](_0x559b6c(0x108))),'businessGroup':_0x5e6dff[_0x559b6c(0xec)]('business-group'),'expectBusinessGroup':_0x3e3e74===undefined||_0x3e3e74===''?undefined:_0x3e3e74};}function validateInput(_0x3c2d51){const _0x4311e2=a58_0x454318;if(!trim(_0x3c2d51[_0x4311e2(0x108)]))throw CliErrors['validation'](_0x4311e2(0xdf));if(_0x3c2d51[_0x4311e2(0x117)]===undefined)throw CliErrors[_0x4311e2(0xf2)](_0x4311e2(0x115));if(!trim(_0x3c2d51[_0x4311e2(0x117)]))throw CliErrors[_0x4311e2(0xf2)](_0x4311e2(0x116));}function assertBusinessGroupUpdateSupported(_0xecea41,_0x55748c){const _0x3ef271=a58_0x454318;if(_0xecea41[_0x3ef271(0xdc)]===_0x3ef271(0xee)&&!_0x55748c)throw CliErrors[_0x3ef271(0xf2)]('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function resolveBusinessGroupDataset(_0x441d9e,_0x3d5a98){const _0x21d2e7=a58_0x454318,_0x57f51e=asPlainObject(_0x441d9e['dataset']),_0x33f174=asPlainObject(_0x441d9e[_0x21d2e7(0xfb)]),_0x4de38b=resolveSourceType(_0x441d9e,_0x57f51e,_0x33f174),_0x2aacf1=firstString(_0x441d9e[_0x21d2e7(0x10c)],_0x441d9e[_0x21d2e7(0x108)],_0x57f51e['datasetCode'],_0x3d5a98)||_0x3d5a98;return{'id':firstNumber(_0x441d9e[_0x21d2e7(0xed)],_0x441d9e['id'],_0x57f51e[_0x21d2e7(0x102)])??firstString(_0x441d9e[_0x21d2e7(0xed)],_0x441d9e['id'],_0x57f51e[_0x21d2e7(0x102)])??null,'code':_0x2aacf1,'name':firstString(_0x441d9e[_0x21d2e7(0x111)],_0x57f51e[_0x21d2e7(0xda)],_0x57f51e[_0x21d2e7(0x111)])||null,'sourceType':_0x4de38b,'dbTableSelector':_0x4de38b===_0x21d2e7(0xee)?{'dbLinkId':firstNumber(_0x33f174[_0x21d2e7(0x101)]),'tableName':firstString(_0x33f174[_0x21d2e7(0xe1)])||null}:null};}function resolveSourceType(_0x35b0c0,_0x2fc670,_0x67439f){const _0xde0c52=a58_0x454318,_0x4cc520=firstString(_0x35b0c0[_0xde0c52(0xd8)],_0x35b0c0[_0xde0c52(0xdc)],_0x2fc670[_0xde0c52(0xd8)],_0x2fc670['sourceType'])?.[_0xde0c52(0xfe)]()[_0xde0c52(0x110)]();if(_0x4cc520==='DB_TABLE'||_0x4cc520===_0xde0c52(0x107))return _0x4cc520;if(Object[_0xde0c52(0xf9)](_0x67439f)['length']>0x0)return _0xde0c52(0xee);throw CliErrors[_0xde0c52(0xf2)](_0xde0c52(0xdb));}function loadCurrentBusinessGroup(_0x498b3a,_0x4b4b72){const _0x594e3d=a58_0x454318,_0x43fab8=readBusinessGroupFromDatasetDetail(_0x498b3a,_0x4b4b72[_0x594e3d(0xdc)]);if(_0x43fab8[_0x594e3d(0xf6)])return normalizeBusinessGroup(_0x43fab8[_0x594e3d(0xd3)]);return'';}function readBusinessGroupFromDatasetDetail(_0x5b0b4e,_0x211f7f){const _0x32a098=a58_0x454318,_0x3eca52=asPlainObject(_0x5b0b4e[_0x32a098(0xe4)]),_0x21cba9=firstPresent(_0x5b0b4e['businessGroup']);if(_0x21cba9[_0x32a098(0xf6)])return _0x21cba9;const _0xa30f6b=firstPresent(_0x3eca52['businessGroup']);if(_0xa30f6b[_0x32a098(0xf6)])return _0xa30f6b;if(_0x211f7f===_0x32a098(0xee))return{'found':![]};const _0x4ab41d=readBusinessGroupFromExtend(_0x5b0b4e[_0x32a098(0xd7)]);if(_0x4ab41d[_0x32a098(0xf6)])return _0x4ab41d;return readBusinessGroupFromExtend(_0x3eca52[_0x32a098(0xd7)]);}function readBusinessGroupFromExtend(_0x1c3ecf){const _0x239651=a58_0x454318;if(_0x1c3ecf===undefined||_0x1c3ecf===null||_0x1c3ecf==='')return{'found':![]};if(typeof _0x1c3ecf===_0x239651(0x11d))try{const _0x233c1f=JSON['parse'](_0x1c3ecf);return readBusinessGroupFromExtend(_0x233c1f);}catch{return{'found':![]};}const _0x1ea734=asPlainObject(_0x1c3ecf);if(Object['prototype'][_0x239651(0xd5)][_0x239651(0xea)](_0x1ea734,_0x239651(0x117)))return{'found':!![],'value':_0x1ea734[_0x239651(0x117)]};return{'found':![]};}function firstPresent(..._0x120f1f){for(const _0x55047b of _0x120f1f){if(_0x55047b!==undefined&&_0x55047b!==null)return{'found':!![],'value':_0x55047b};}return{'found':![]};}function assertExpectedBusinessGroup(_0x46a487,_0x1a827f){const _0x1628ec=a58_0x454318;if(_0x1a827f===undefined)return;const _0x35bc24=normalizeBusinessGroupArgument(_0x1a827f);if(_0x46a487!==_0x35bc24)throw CliErrors[_0x1628ec(0xf2)](_0x1628ec(0xf8),_0x1628ec(0x114)+JSON['stringify'](_0x35bc24)+_0x1628ec(0x113)+JSON['stringify'](_0x46a487));}function buildBackendPlan(_0x2dd9ec,_0x19ad90,_0x16d946){const _0x400037=a58_0x454318;if(_0x19ad90[_0x400037(0xdc)]==='DB_TABLE'){if(!_0x19ad90[_0x400037(0x10e)]||_0x19ad90[_0x400037(0x10e)][_0x400037(0xeb)]===null||!_0x19ad90['dbTableSelector'][_0x400037(0xe1)])throw CliErrors[_0x400037(0xf2)](_0x400037(0x10d),_0x400037(0xde));return{'kind':_0x400037(0x103),'method':_0x400037(0xe8),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x19ad90[_0x400037(0x10e)]['dbLinkId'],'tableName':_0x19ad90['dbTableSelector'][_0x400037(0xe1)],'businessGroup':_0x16d946}};}return{'kind':_0x400037(0x10b),'method':_0x400037(0xe8),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x2dd9ec,'datasetCode':_0x19ad90[_0x400037(0x108)],'businessGroup':_0x16d946}};}function normalizeBusinessGroup(_0x506601){if(_0x506601===undefined||_0x506601===null)return'';return String(_0x506601)['trim']();}function normalizeBusinessGroupArgument(_0x2fa683){const _0x325e97=normalizeBusinessGroup(_0x2fa683);return _0x325e97===UNGROUPED_BUSINESS_GROUP?'':_0x325e97;}function displayBusinessGroup(_0x19ed3b){return _0x19ed3b||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x5b6296){const _0x1e8e1b=a58_0x454318;if(!_0x5b6296||typeof _0x5b6296!==_0x1e8e1b(0x106)||Array[_0x1e8e1b(0x100)](_0x5b6296))return{};return _0x5b6296;}function firstString(..._0x74b6f7){const _0x2e8f18=a58_0x454318;for(const _0x29ac3b of _0x74b6f7){if(typeof _0x29ac3b===_0x2e8f18(0x11d)&&_0x29ac3b[_0x2e8f18(0xfe)]())return _0x29ac3b[_0x2e8f18(0xfe)]();if(typeof _0x29ac3b==='number'&&Number[_0x2e8f18(0xf1)](_0x29ac3b))return String(_0x29ac3b);}return undefined;}function firstNumber(..._0x10b73b){const _0x39b7f8=a58_0x454318;for(const _0x2d67a4 of _0x10b73b){if(typeof _0x2d67a4==='number'&&Number[_0x39b7f8(0xf1)](_0x2d67a4))return _0x2d67a4;if(typeof _0x2d67a4===_0x39b7f8(0x11d)&&_0x2d67a4[_0x39b7f8(0xfe)]()&&Number['isFinite'](Number(_0x2d67a4)))return Number(_0x2d67a4);}return null;}function trim(_0xb1d027){const _0x42c19f=a58_0x454318;return String(_0xb1d027||'')[_0x42c19f(0xfe)]();}
|
|
1
|
+
const a58_0x1aeca2=a58_0x405d;(function(_0x19fe7f,_0x1bebdb){const _0x290639=a58_0x405d,_0x4b9f9d=_0x19fe7f();while(!![]){try{const _0x2702fa=parseInt(_0x290639(0x146))/0x1+-parseInt(_0x290639(0x17b))/0x2+-parseInt(_0x290639(0x15e))/0x3+parseInt(_0x290639(0x17c))/0x4+-parseInt(_0x290639(0x158))/0x5+parseInt(_0x290639(0x157))/0x6+-parseInt(_0x290639(0x151))/0x7;if(_0x2702fa===_0x1bebdb)break;else _0x4b9f9d['push'](_0x4b9f9d['shift']());}catch(_0xee5870){_0x4b9f9d['push'](_0x4b9f9d['shift']());}}}(a58_0x243d,0xa740b));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_0x243d(){const _0x42d2d1=['method','datasetName','length','Expectation\x20mismatch\x20at\x20businessGroup','apiError','name','update','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','tableName','expect-business-group','source','matched','prototype','373694TBHvkW','4397272YTLSKL','datasetCode','keys','data','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','dbtableConfig','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','--business-group\x20must\x20not\x20be\x20blank','backend','modelId','METADATA','sourceType','db-table','code','message','Expected\x20','write','value','path','businessGroup','646878ieYqFO','dbLinkId','business-group-update',',\x20actual\x20','appCode','dbId','expectBusinessGroup','ungrouped','POST','kind','business-group','4982194xWdBjH','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','dbTableSelector','--code\x20is\x20required','trim','extend','5760954tWRRnM','2057880RQejSR','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','/smartapi/question/er-config/business-group/edit','string','DB_TABLE','validation','2133369ciVaMP','isFinite','payload','object','stringify','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','parse','found','str','Update\x20business\x20scenario\x20group','modelCode','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','dataset','toUpperCase','datasetId'];a58_0x243d=function(){return _0x42d2d1;};return a58_0x243d();}const DB_TABLE_BACKEND_PATH='/smartapi/dblink/updateTableBusinessGroup',METADATA_BACKEND_PATH=a58_0x1aeca2(0x15a),UNGROUPED_BUSINESS_GROUP=a58_0x1aeca2(0x14d);function a58_0x405d(_0xd2d47a,_0x33249e){_0xd2d47a=_0xd2d47a-0x13c;const _0x243d7f=a58_0x243d();let _0x405da9=_0x243d7f[_0xd2d47a];return _0x405da9;}export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x225a2d,input:_0x3f6e52,dryRun:_0x19f825}){const _0x2e84f6=a58_0x1aeca2;validateInput(_0x3f6e52);const _0x2fb426=normalizeBusinessGroupArgument(_0x3f6e52[_0x2e84f6(0x145)]),_0x3ac5a7=await getDatasetDetail(_0x3f6e52[_0x2e84f6(0x13f)]),_0x17d469=resolveBusinessGroupDataset(_0x3ac5a7,_0x3f6e52['code']);assertBusinessGroupUpdateSupported(_0x17d469,_0x2fb426);const _0x475016=loadCurrentBusinessGroup(_0x3ac5a7,_0x17d469);assertExpectedBusinessGroup(_0x475016,_0x3f6e52[_0x2e84f6(0x14c)]);const _0x2ca3e6=buildBackendPlan(_0x225a2d,_0x17d469,_0x2fb426),_0x4867b4=_0x475016!==_0x2fb426;let _0xfea397;if(_0x4867b4&&!_0x19f825){_0x2ca3e6[_0x2e84f6(0x14f)]===_0x2e84f6(0x13e)?await updateDbTableBusinessGroup(_0x2ca3e6[_0x2e84f6(0x160)]):await updateErBusinessGroup(_0x2ca3e6[_0x2e84f6(0x160)]);const _0x1230d3=await getDatasetDetail(_0x17d469[_0x2e84f6(0x13f)]),_0x1a8227=resolveBusinessGroupDataset(_0x1230d3,_0x17d469[_0x2e84f6(0x13f)]),_0x38665c=loadCurrentBusinessGroup(_0x1230d3,_0x1a8227);if(_0x38665c!==_0x2fb426)throw CliErrors[_0x2e84f6(0x171)](_0x2e84f6(0x163),'Expected\x20'+JSON[_0x2e84f6(0x162)](displayBusinessGroup(_0x2fb426))+_0x2e84f6(0x149)+JSON[_0x2e84f6(0x162)](displayBusinessGroup(_0x38665c))+'.');_0xfea397={'verified':!![],'status':_0x2e84f6(0x179),'afterReadback':{'businessGroup':displayBusinessGroup(_0x38665c)}};}else!_0x4867b4&&(_0xfea397={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x475016)}});const _0x3cdbfb={'operation':_0x2e84f6(0x173),'appCode':_0x225a2d,'selector':{'code':_0x17d469[_0x2e84f6(0x13f)]},'dataset':{'id':_0x17d469['id'],'code':_0x17d469[_0x2e84f6(0x13f)],'name':_0x17d469['name'],'sourceType':_0x17d469[_0x2e84f6(0x13d)]},'before':{'businessGroup':displayBusinessGroup(_0x475016)},'after':{'businessGroup':displayBusinessGroup(_0x2fb426)},'changed':_0x4867b4,'dryRun':_0x19f825,'submitted':_0x4867b4&&!_0x19f825,'backend':{'method':_0x2ca3e6['method'],'path':_0x2ca3e6[_0x2e84f6(0x144)],'payload':_0x2ca3e6[_0x2e84f6(0x160)]},..._0xfea397?{'verification':_0xfea397}:{},'warnings':[]};return{'ok':!![],'data':_0x3cdbfb,'message':_0x4867b4?_0x19f825?_0x2e84f6(0x174)+_0x17d469[_0x2e84f6(0x13f)]:_0x2e84f6(0x152)+_0x17d469['code']:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x17d469[_0x2e84f6(0x13f)]};}export const datasetBusinessGroupUpdate={'service':a58_0x1aeca2(0x16a),'command':a58_0x1aeca2(0x148),'description':a58_0x1aeca2(0x167),'risk':a58_0x1aeca2(0x142),'flags':[CODE_FLAG,{'name':a58_0x1aeca2(0x150),'type':a58_0x1aeca2(0x15b),'required':!![],'description':a58_0x1aeca2(0x175)},{'name':a58_0x1aeca2(0x177),'type':a58_0x1aeca2(0x15b),'required':![],'description':a58_0x1aeca2(0x180)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x394398){validateInput(readBusinessGroupUpdateInput(_0x394398));},async 'dryRun'(_0x56caee){const _0x4b1dab=a58_0x1aeca2,_0x4f44c7=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x56caee[_0x4b1dab(0x14a)],'input':readBusinessGroupUpdateInput(_0x56caee),'dryRun':!![]});return{'method':_0x4f44c7[_0x4b1dab(0x17f)][_0x4b1dab(0x185)][_0x4b1dab(0x16d)],'url':_0x4f44c7['data'][_0x4b1dab(0x185)]['path'],'body':_0x4f44c7['data'][_0x4b1dab(0x185)]['payload'],'description':_0x4f44c7[_0x4b1dab(0x140)],..._0x4f44c7[_0x4b1dab(0x17f)]};},async 'execute'(_0x1da9ee){const _0x3d0e06=a58_0x1aeca2;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1da9ee[_0x3d0e06(0x14a)],'input':readBusinessGroupUpdateInput(_0x1da9ee),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x3b2890){const _0x4533=a58_0x1aeca2,_0x227f78=_0x3b2890[_0x4533(0x166)](_0x4533(0x177));return{'code':trim(_0x3b2890[_0x4533(0x166)](_0x4533(0x13f))),'businessGroup':_0x3b2890['str'](_0x4533(0x150)),'expectBusinessGroup':_0x227f78===undefined||_0x227f78===''?undefined:_0x227f78};}function validateInput(_0x528b0f){const _0xb371a1=a58_0x1aeca2;if(!trim(_0x528b0f[_0xb371a1(0x13f)]))throw CliErrors[_0xb371a1(0x15d)](_0xb371a1(0x154));if(_0x528b0f[_0xb371a1(0x145)]===undefined)throw CliErrors[_0xb371a1(0x15d)]('--business-group\x20is\x20required');if(!trim(_0x528b0f[_0xb371a1(0x145)]))throw CliErrors[_0xb371a1(0x15d)](_0xb371a1(0x184));}function assertBusinessGroupUpdateSupported(_0x5e6c79,_0x367b07){const _0x130879=a58_0x1aeca2;if(_0x5e6c79[_0x130879(0x13d)]===_0x130879(0x15c)&&!_0x367b07)throw CliErrors[_0x130879(0x15d)](_0x130879(0x183));}function resolveBusinessGroupDataset(_0x12b6e8,_0x5eb6a2){const _0x32bacf=a58_0x1aeca2,_0x1a3416=asPlainObject(_0x12b6e8[_0x32bacf(0x16a)]),_0x3888be=asPlainObject(_0x12b6e8[_0x32bacf(0x181)]),_0x14b40f=resolveSourceType(_0x12b6e8,_0x1a3416,_0x3888be),_0xd44d55=firstString(_0x12b6e8[_0x32bacf(0x168)],_0x12b6e8[_0x32bacf(0x13f)],_0x1a3416[_0x32bacf(0x17d)],_0x5eb6a2)||_0x5eb6a2;return{'id':firstNumber(_0x12b6e8['modelId'],_0x12b6e8['id'],_0x1a3416['datasetId'])??firstString(_0x12b6e8[_0x32bacf(0x186)],_0x12b6e8['id'],_0x1a3416[_0x32bacf(0x16c)])??null,'code':_0xd44d55,'name':firstString(_0x12b6e8[_0x32bacf(0x172)],_0x1a3416[_0x32bacf(0x16e)],_0x1a3416[_0x32bacf(0x172)])||null,'sourceType':_0x14b40f,'dbTableSelector':_0x14b40f==='DB_TABLE'?{'dbLinkId':firstNumber(_0x3888be[_0x32bacf(0x14b)]),'tableName':firstString(_0x3888be['tableName'])||null}:null};}function resolveSourceType(_0x2741df,_0x4c69cc,_0x559a03){const _0xeb85ec=a58_0x1aeca2,_0x48e24a=firstString(_0x2741df[_0xeb85ec(0x178)],_0x2741df['sourceType'],_0x4c69cc[_0xeb85ec(0x178)],_0x4c69cc[_0xeb85ec(0x13d)])?.['trim']()[_0xeb85ec(0x16b)]();if(_0x48e24a===_0xeb85ec(0x15c)||_0x48e24a===_0xeb85ec(0x13c))return _0x48e24a;if(Object[_0xeb85ec(0x17e)](_0x559a03)[_0xeb85ec(0x16f)]>0x0)return _0xeb85ec(0x15c);throw CliErrors['validation'](_0xeb85ec(0x159));}function loadCurrentBusinessGroup(_0xb457eb,_0x184910){const _0x307019=a58_0x1aeca2,_0x5a9bd9=readBusinessGroupFromDatasetDetail(_0xb457eb,_0x184910['sourceType']);if(_0x5a9bd9[_0x307019(0x165)])return normalizeBusinessGroup(_0x5a9bd9[_0x307019(0x143)]);return'';}function readBusinessGroupFromDatasetDetail(_0x3bf210,_0x236bf8){const _0x40e9fe=a58_0x1aeca2,_0x4aa55f=asPlainObject(_0x3bf210[_0x40e9fe(0x16a)]),_0x3602e6=firstPresent(_0x3bf210[_0x40e9fe(0x145)]);if(_0x3602e6[_0x40e9fe(0x165)])return _0x3602e6;const _0x4c7218=firstPresent(_0x4aa55f[_0x40e9fe(0x145)]);if(_0x4c7218[_0x40e9fe(0x165)])return _0x4c7218;if(_0x236bf8===_0x40e9fe(0x15c))return{'found':![]};const _0x429d45=readBusinessGroupFromExtend(_0x3bf210[_0x40e9fe(0x156)]);if(_0x429d45['found'])return _0x429d45;return readBusinessGroupFromExtend(_0x4aa55f[_0x40e9fe(0x156)]);}function readBusinessGroupFromExtend(_0x551b84){const _0xdb6b4c=a58_0x1aeca2;if(_0x551b84===undefined||_0x551b84===null||_0x551b84==='')return{'found':![]};if(typeof _0x551b84==='string')try{const _0xb0f3f6=JSON[_0xdb6b4c(0x164)](_0x551b84);return readBusinessGroupFromExtend(_0xb0f3f6);}catch{return{'found':![]};}const _0x586b30=asPlainObject(_0x551b84);if(Object[_0xdb6b4c(0x17a)]['hasOwnProperty']['call'](_0x586b30,_0xdb6b4c(0x145)))return{'found':!![],'value':_0x586b30[_0xdb6b4c(0x145)]};return{'found':![]};}function firstPresent(..._0x156bbc){for(const _0x4a9ddf of _0x156bbc){if(_0x4a9ddf!==undefined&&_0x4a9ddf!==null)return{'found':!![],'value':_0x4a9ddf};}return{'found':![]};}function assertExpectedBusinessGroup(_0x531d66,_0x45ffc9){const _0x6e708b=a58_0x1aeca2;if(_0x45ffc9===undefined)return;const _0x40ab62=normalizeBusinessGroupArgument(_0x45ffc9);if(_0x531d66!==_0x40ab62)throw CliErrors[_0x6e708b(0x15d)](_0x6e708b(0x170),_0x6e708b(0x141)+JSON['stringify'](_0x40ab62)+_0x6e708b(0x149)+JSON[_0x6e708b(0x162)](_0x531d66));}function buildBackendPlan(_0x2daa31,_0x99b8ac,_0x12b87a){const _0x2d4e4b=a58_0x1aeca2;if(_0x99b8ac[_0x2d4e4b(0x13d)]===_0x2d4e4b(0x15c)){if(!_0x99b8ac[_0x2d4e4b(0x153)]||_0x99b8ac['dbTableSelector']['dbLinkId']===null||!_0x99b8ac[_0x2d4e4b(0x153)]['tableName'])throw CliErrors[_0x2d4e4b(0x15d)](_0x2d4e4b(0x169),_0x2d4e4b(0x182));return{'kind':_0x2d4e4b(0x13e),'method':_0x2d4e4b(0x14e),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x99b8ac[_0x2d4e4b(0x153)][_0x2d4e4b(0x147)],'tableName':_0x99b8ac[_0x2d4e4b(0x153)][_0x2d4e4b(0x176)],'businessGroup':_0x12b87a}};}return{'kind':'metadata','method':_0x2d4e4b(0x14e),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x2daa31,'datasetCode':_0x99b8ac['code'],'businessGroup':_0x12b87a}};}function normalizeBusinessGroup(_0x262460){const _0x517d8a=a58_0x1aeca2;if(_0x262460===undefined||_0x262460===null)return'';return String(_0x262460)[_0x517d8a(0x155)]();}function normalizeBusinessGroupArgument(_0x10e5f7){const _0x41f86b=normalizeBusinessGroup(_0x10e5f7);return _0x41f86b===UNGROUPED_BUSINESS_GROUP?'':_0x41f86b;}function displayBusinessGroup(_0x8cd28b){return _0x8cd28b||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x529eca){const _0x2eb34d=a58_0x1aeca2;if(!_0x529eca||typeof _0x529eca!==_0x2eb34d(0x161)||Array['isArray'](_0x529eca))return{};return _0x529eca;}function firstString(..._0x34876a){const _0x4c8bcf=a58_0x1aeca2;for(const _0x43d72a of _0x34876a){if(typeof _0x43d72a===_0x4c8bcf(0x15b)&&_0x43d72a[_0x4c8bcf(0x155)]())return _0x43d72a[_0x4c8bcf(0x155)]();if(typeof _0x43d72a==='number'&&Number[_0x4c8bcf(0x15f)](_0x43d72a))return String(_0x43d72a);}return undefined;}function firstNumber(..._0x3d17fb){const _0x58a819=a58_0x1aeca2;for(const _0x2fb17f of _0x3d17fb){if(typeof _0x2fb17f==='number'&&Number[_0x58a819(0x15f)](_0x2fb17f))return _0x2fb17f;if(typeof _0x2fb17f===_0x58a819(0x15b)&&_0x2fb17f['trim']()&&Number['isFinite'](Number(_0x2fb17f)))return Number(_0x2fb17f);}return null;}function trim(_0x21dcfb){const _0x4edab8=a58_0x1aeca2;return String(_0x21dcfb||'')[_0x4edab8(0x155)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x4e2977=a59_0x1fdd;(function(_0x342255,_0x6663c4){const _0xa51633=a59_0x1fdd,_0x5c3465=_0x342255();while(!![]){try{const _0x1a677b=parseInt(_0xa51633(0x1cf))/0x1+parseInt(_0xa51633(0x1cb))/0x2+-parseInt(_0xa51633(0x1ca))/0x3+parseInt(_0xa51633(0x1c6))/0x4+parseInt(_0xa51633(0x1d1))/0x5*(-parseInt(_0xa51633(0x1cc))/0x6)+-parseInt(_0xa51633(0x1bc))/0x7*(-parseInt(_0xa51633(0x1bf))/0x8)+-parseInt(_0xa51633(0x1c1))/0x9*(parseInt(_0xa51633(0x1cd))/0xa);if(_0x1a677b===_0x6663c4)break;else _0x5c3465['push'](_0x5c3465['shift']());}catch(_0xeb68fb){_0x5c3465['push'](_0x5c3465['shift']());}}}(a59_0x4eb1,0xacc63));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a59_0x1fdd(_0x55a18d,_0x2ae495){_0x55a18d=_0x55a18d-0x1b9;const _0x4eb1fd=a59_0x4eb1();let _0x1fdd9b=_0x4eb1fd[_0x55a18d];return _0x1fdd9b;}import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a59_0x4e2977(0x1c4),'command':a59_0x4e2977(0x1c5),'description':a59_0x4e2977(0x1c8),'risk':'read','flags':[{'name':a59_0x4e2977(0x1ba),'type':a59_0x4e2977(0x1c3),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x173d62){const _0x2cf2f5=a59_0x4e2977,_0x4820f4=_0x173d62[_0x2cf2f5(0x1d0)](_0x2cf2f5(0x1ba)),_0x356d00=await getErBusinessGroupSummary(_0x173d62[_0x2cf2f5(0x1ce)],_0x4820f4),_0x32af21=_0x356d00[_0x2cf2f5(0x1c0)][_0x2cf2f5(0x1be)](_0x2f8886=>({..._0x2f8886,'businessGroup':_0x2f8886[_0x2cf2f5(0x1bb)][_0x2cf2f5(0x1c7)]()||_0x2cf2f5(0x1c2)}));return{'ok':!![],'data':{..._0x356d00,'groups':_0x32af21,'scope':_0x2cf2f5(0x1b9)},'message':_0x2cf2f5(0x1d2)+_0x32af21[_0x2cf2f5(0x1bd)]+_0x2cf2f5(0x1c9)+_0x4820f4};}};function a59_0x4eb1(){const _0x21752c=['1110622jMGJMH','738QcuYNY','1567100rWGZQV','appCode','491958juUULk','num','20250tAGgtG','Found\x20','DB_TABLE','dbid','businessGroup','7347382reyZdH','length','map','8xDaGLo','groups','72tqPRwn','ungrouped','number','dataset','business-groups','3356324EBeCwc','trim','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','\x20business\x20group(s)\x20for\x20database\x20connection\x20','1429389ZmTyKU'];a59_0x4eb1=function(){return _0x21752c;};return a59_0x4eb1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x44d2cf=a60_0x57d8;(function(_0x345b23,_0x3b5cee){const _0x5bc89a=a60_0x57d8,_0x4d0e74=_0x345b23();while(!![]){try{const _0x24d41d=-parseInt(_0x5bc89a(0x122))/0x1+parseInt(_0x5bc89a(0x125))/0x2*(-parseInt(_0x5bc89a(0x115))/0x3)+-parseInt(_0x5bc89a(0x126))/0x4+-parseInt(_0x5bc89a(0x120))/0x5+-parseInt(_0x5bc89a(0x127))/0x6+parseInt(_0x5bc89a(0x110))/0x7+parseInt(_0x5bc89a(0x11f))/0x8;if(_0x24d41d===_0x3b5cee)break;else _0x4d0e74['push'](_0x4d0e74['shift']());}catch(_0x5ec742){_0x4d0e74['push'](_0x4d0e74['shift']());}}}(a60_0x3a45,0x56170));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x44d2cf(0x11b),'filter':a60_0x44d2cf(0x129),'getOne':a60_0x44d2cf(0x11e)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x44d2cf(0x12b);function valueToString(_0xaa7ff3){const _0x331fe8=a60_0x44d2cf;return _0xaa7ff3==null?'':String(_0xaa7ff3)[_0x331fe8(0x118)]();}function getDatasetCode(_0x557fcf){const _0x4b1f53=a60_0x44d2cf;return valueToString(_0x557fcf[_0x4b1f53(0x10e)]??_0x557fcf[_0x4b1f53(0x124)]??_0x557fcf[_0x4b1f53(0x113)]?.[_0x4b1f53(0x12d)]);}function getDatasetName(_0x3c0be3){const _0x43f187=a60_0x44d2cf;return valueToString(_0x3c0be3[_0x43f187(0x11a)]??_0x3c0be3[_0x43f187(0x113)]?.[_0x43f187(0x123)])||'unknown';}function a60_0x57d8(_0x2a7009,_0x2cd458){_0x2a7009=_0x2a7009-0x10c;const _0x3a4524=a60_0x3a45();let _0x57d8db=_0x3a4524[_0x2a7009];return _0x57d8db;}function getDatasetSource(_0x1edadc){const _0x3a0466=a60_0x44d2cf;return valueToString(_0x1edadc['source']??_0x1edadc[_0x3a0466(0x113)]?.[_0x3a0466(0x11d)])[_0x3a0466(0x10d)]();}function getDbtableConfig(_0x2db984){const _0x5cae01=a60_0x44d2cf,_0x5d1a7b=_0x2db984[_0x5cae01(0x12a)]??_0x2db984[_0x5cae01(0x10f)];return _0x5d1a7b&&typeof _0x5d1a7b==='object'?_0x5d1a7b:{};}export function isDbTableBackedDataset(_0x59e863){const _0x3f75bf=a60_0x44d2cf,_0x2f6a31=getDatasetSource(_0x59e863);if(_0x2f6a31===_0x3f75bf(0x116))return![];const _0x26bf6f=getDbtableConfig(_0x59e863),_0x23f3e8=_0x26bf6f[_0x3f75bf(0x11c)]??_0x26bf6f['id'],_0xe3d6bd=valueToString(_0x26bf6f[_0x3f75bf(0x112)]??_0x59e863[_0x3f75bf(0x112)]??_0x59e863[_0x3f75bf(0x113)]?.[_0x3f75bf(0x112)]);return _0x23f3e8!==undefined&&_0x23f3e8!==null&&_0xe3d6bd[_0x3f75bf(0x111)]>0x0;}export function filterDbTableBackedDatasets(_0x327f95){const _0x309c8a=a60_0x44d2cf;return _0x327f95[_0x309c8a(0x128)](_0x2a245=>isDbTableBackedDataset(_0x2a245));}function a60_0x3a45(){const _0x2fe0da=['validation','toUpperCase','code','dbtable','6706AIJlRq','length','tableName','dataset','UNKNOWN','9wZCHXw','METADATA','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','trim','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','name','lovrabet','dbId','sourceType','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','19538272NcFbdQ','1921035gPRqpc','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','361943faHUSE','datasetName','modelCode','351784hyMamE','2144824zCmrYz','1683516uxQwSE','filter','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','dbtableConfig','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','The\x20current\x20dataset\x20\x22','datasetCode','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.'];a60_0x3a45=function(){return _0x2fe0da;};return a60_0x3a45();}export function buildDbTableBackedRequirementMessage(_0x371a7e,_0x36323b='SQL\x20schema\x20validation'){const _0x247467=a60_0x44d2cf,_0x3d8751=getDatasetSource(_0x371a7e)||_0x247467(0x114),_0x462767=getDatasetName(_0x371a7e),_0x5ed5f6=getDatasetCode(_0x371a7e),_0x1ab7c7=_0x5ed5f6?'\x20('+_0x5ed5f6+')':'';return[_0x247467(0x12c)+_0x462767+'\x22'+_0x1ab7c7+'\x20is\x20'+_0x3d8751+_0x247467(0x117)+_0x36323b+'.',_0x247467(0x119),_0x247467(0x12e),_0x247467(0x121)+RUNTIME_DATA_ACCESS_COMMANDS[_0x247467(0x128)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'.']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x2fbe5b,_0x28c415){const _0x184ba1=a60_0x44d2cf;if(!isDbTableBackedDataset(_0x2fbe5b))throw CliErrors[_0x184ba1(0x10c)](buildDbTableBackedRequirementMessage(_0x2fbe5b,_0x28c415));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x31042d=a61_0x6d56;(function(_0x24a5cc,_0x6bcfe4){const _0x594379=a61_0x6d56,_0x55763c=_0x24a5cc();while(!![]){try{const _0x50ca4b=parseInt(_0x594379(0x21e))/0x1+-parseInt(_0x594379(0x22b))/0x2*(-parseInt(_0x594379(0x207))/0x3)+parseInt(_0x594379(0x1f7))/0x4+-parseInt(_0x594379(0x223))/0x5+-parseInt(_0x594379(0x22e))/0x6+-parseInt(_0x594379(0x232))/0x7*(-parseInt(_0x594379(0x1fb))/0x8)+parseInt(_0x594379(0x204))/0x9*(-parseInt(_0x594379(0x1f2))/0xa);if(_0x50ca4b===_0x6bcfe4)break;else _0x55763c['push'](_0x55763c['shift']());}catch(_0x4626a4){_0x55763c['push'](_0x55763c['shift']());}}}(a61_0x5a4d,0xdf39c));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';function a61_0x6d56(_0x56dabb,_0x1c55d8){_0x56dabb=_0x56dabb-0x1f2;const _0x5a4d97=a61_0x5a4d();let _0x6d56eb=_0x5a4d97[_0x56dabb];return _0x6d56eb;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a61_0x5a4d(){const _0x170889=['str','Matched\x20','map','type','1594005sZHYTm','/smartapi/dataset/delete?cascade=','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','length','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','6222575UZaunt','cascade','\x20dataset(s);\x20','true','No\x20undeleted\x20dataset\x20found\x20for\x20','filter','Dataset\x20id','source','3064462xPctFd','push','confirm','4023918hRNuRh','Would\x20delete\x20','\x20--appcode\x20','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','2533216BCTMlt','30inqkta','number','relatedPages','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','code','2041588yHkoXI','dataset','rabetbase\x20page\x20restore\x20--id\x20','bool','40YyfLIZ','relatedPageInfoList','POST','id=','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','Deleted\x20','num','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','appCode','7849719ODoCQE','Would\x20safely\x20delete\x20','add','3NnoUcZ','object','name','Required\x20to\x20execute\x20dataset\x20deletion','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','dbid=','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','dbid','dbtableConfig','tableName','expected-count','high-risk-write','\x20dataset(s)','deleted','dbName','description','dbId','validation','boolean'];a61_0x5a4d=function(){return _0x170889;};return a61_0x5a4d();}const DATASET_ID_FLAG={'name':'id','type':a61_0x31042d(0x1f3),'description':a61_0x31042d(0x229)},DBID_FLAG={'name':'dbid','type':'number','description':a61_0x31042d(0x1f5)},CONFIRM_FLAG={'name':'confirm','type':a61_0x31042d(0x219),'description':a61_0x31042d(0x20a)},CASCADE_FLAG={'name':a61_0x31042d(0x224),'type':a61_0x31042d(0x219),'description':a61_0x31042d(0x231)},EXPECTED_COUNT_FLAG={'name':a61_0x31042d(0x211),'type':'number','description':a61_0x31042d(0x20d)};export const datasetDelete={'service':a61_0x31042d(0x1f8),'command':'delete','description':a61_0x31042d(0x202),'risk':a61_0x31042d(0x212),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x11a64e){const _0x587499=a61_0x31042d,_0x1e5bb1=_0x11a64e[_0x587499(0x201)]('id'),_0x21a0ed=_0x11a64e[_0x587499(0x21a)](_0x587499(0x1f6)),_0x221ac1=_0x11a64e['num']('dbid'),_0x300690=[_0x1e5bb1>0x0,Boolean(_0x21a0ed),_0x221ac1>0x0][_0x587499(0x228)](Boolean);if(_0x300690[_0x587499(0x221)]===0x0)throw CliErrors[_0x587499(0x218)](_0x587499(0x20b));if(_0x300690[_0x587499(0x221)]>0x1)throw CliErrors[_0x587499(0x218)]('Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.');},async 'dryRun'(_0x1cc36c){const _0x18d525=a61_0x31042d,_0x5b8792=await resolveTargets(_0x1cc36c),_0xd07daf=_0x1cc36c[_0x18d525(0x1fa)](_0x18d525(0x224));return{'method':_0x18d525(0x1fd),'url':_0x18d525(0x21f)+(_0xd07daf?_0x18d525(0x226):'false'),'body':{'count':_0x5b8792['length'],'cascade':_0xd07daf,'datasets':_0x5b8792},'description':_0xd07daf?_0x18d525(0x22f)+_0x5b8792['length']+'\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.':_0x18d525(0x205)+_0x5b8792[_0x18d525(0x221)]+_0x18d525(0x220)};},async 'execute'(_0x2a71db){const _0x219b63=a61_0x31042d;if(!_0x2a71db[_0x219b63(0x1fa)](_0x219b63(0x22d)))throw CliErrors[_0x219b63(0x218)](_0x219b63(0x222),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x26e620=await resolveTargets(_0x2a71db),_0x51f5a8=_0x2a71db[_0x219b63(0x1fa)](_0x219b63(0x224)),_0x485f36=[],_0x53716d=[];for(const _0x41daaf of _0x26e620){try{await deleteDataset(_0x41daaf['id'],_0x51f5a8),_0x485f36[_0x219b63(0x22c)](_0x41daaf);}catch(_0x12aaef){_0x53716d[_0x219b63(0x22c)]({..._0x41daaf,'error':_0x12aaef instanceof Error?_0x12aaef['message']:String(_0x12aaef)});}}if(_0x53716d[_0x219b63(0x221)]>0x0){const _0x38a064=buildPageRestoreCommands(_0x2a71db[_0x219b63(0x203)],_0x51f5a8?_0x485f36:[]);return{'ok':![],'data':{'requested':_0x26e620[_0x219b63(0x221)],'cascade':_0x51f5a8,'deletedCount':_0x485f36[_0x219b63(0x221)],'failedCount':_0x53716d[_0x219b63(0x221)],'deleted':_0x485f36,'failed':_0x53716d,'pageRestoreCommands':_0x38a064},'message':_0x219b63(0x200)+_0x485f36['length']+'/'+_0x26e620[_0x219b63(0x221)]+_0x219b63(0x225)+_0x53716d[_0x219b63(0x221)]+'\x20failed'};}return{'ok':!![],'data':{'requested':_0x26e620['length'],'cascade':_0x51f5a8,'deletedCount':_0x485f36['length'],'deleted':_0x485f36,'pageRestoreCommands':buildPageRestoreCommands(_0x2a71db[_0x219b63(0x203)],_0x51f5a8?_0x485f36:[])},'message':_0x219b63(0x200)+_0x485f36['length']+_0x219b63(0x213)};}};async function resolveTargets(_0x5d9561){const _0x1776f8=a61_0x31042d,_0x1c02cf=_0x5d9561[_0x1776f8(0x201)]('id'),_0x111274=_0x5d9561[_0x1776f8(0x21a)]('code'),_0x14e6a0=_0x5d9561[_0x1776f8(0x201)](_0x1776f8(0x20e));let _0x37dac7;_0x111274?(_0x37dac7=await listDatasets(_0x5d9561[_0x1776f8(0x203)],{'code':_0x111274}),_0x37dac7=_0x37dac7['filter'](_0x3b35d9=>_0x3b35d9['code']===_0x111274)):(_0x37dac7=await listDatasets(_0x5d9561[_0x1776f8(0x203)]),_0x1c02cf>0x0&&(_0x37dac7=_0x37dac7[_0x1776f8(0x228)](_0x8e81c1=>_0x8e81c1['id']===_0x1c02cf)),_0x14e6a0>0x0&&(_0x37dac7=_0x37dac7[_0x1776f8(0x228)](_0x3d75e4=>_0x3d75e4[_0x1776f8(0x20f)]?.[_0x1776f8(0x217)]===_0x14e6a0)));const _0x3d6ea4=[];for(const _0x2b0aac of _0x37dac7){const _0x23b2c1=await getDatasetDetail(_0x2b0aac[_0x1776f8(0x1f6)]),_0x30cc38=Array['isArray'](_0x23b2c1['relatedPageInfoList'])?_0x23b2c1[_0x1776f8(0x1fc)]['filter'](_0x109a14=>_0x109a14!=null&&typeof _0x109a14===_0x1776f8(0x208)&&_0x109a14[_0x1776f8(0x214)]!==!![]):[];_0x3d6ea4[_0x1776f8(0x22c)](normalizeTarget(_0x2b0aac,_0x30cc38));}if(_0x3d6ea4[_0x1776f8(0x221)]===0x0){const _0x5e712e=_0x111274||(_0x1c02cf>0x0?_0x1776f8(0x1fe)+_0x1c02cf:_0x1776f8(0x20c)+_0x14e6a0);throw CliErrors['validation'](_0x1776f8(0x227)+_0x5e712e+'.');}const _0x3fec55=_0x5d9561[_0x1776f8(0x201)](_0x1776f8(0x211));if(_0x3fec55>0x0&&_0x3d6ea4[_0x1776f8(0x221)]!==_0x3fec55)throw CliErrors[_0x1776f8(0x218)](_0x1776f8(0x21b)+_0x3d6ea4[_0x1776f8(0x221)]+_0x1776f8(0x1ff)+_0x3fec55+'.');return _0x3d6ea4;}function normalizeTarget(_0x3d419c,_0x4f99c0){const _0x19d5f2=a61_0x31042d,_0x568148=_0x3d419c[_0x19d5f2(0x20f)]??{},_0x2df0aa=_0x4f99c0[_0x19d5f2(0x21c)](_0x39193c=>{const _0x5b092a=_0x19d5f2;if(_0x39193c==null||typeof _0x39193c!==_0x5b092a(0x208))return null;const _0x1198c1=_0x39193c,_0x105844=Number(_0x1198c1['id']);if(!Number['isInteger'](_0x105844)||_0x105844<=0x0)return null;const _0x22c79c=_0x1198c1['title']??_0x1198c1['name'];return{'id':_0x105844,..._0x22c79c?{'name':String(_0x22c79c)}:{},..._0x1198c1[_0x5b092a(0x21d)]?{'type':String(_0x1198c1[_0x5b092a(0x21d)])}:{}};})[_0x19d5f2(0x228)](_0x1f0fe8=>_0x1f0fe8!==null);return{'id':_0x3d419c['id'],'code':_0x3d419c[_0x19d5f2(0x1f6)],'name':_0x3d419c[_0x19d5f2(0x209)],'description':_0x3d419c[_0x19d5f2(0x216)],'source':_0x3d419c[_0x19d5f2(0x22a)],'dbId':_0x568148[_0x19d5f2(0x217)],'dbName':_0x568148[_0x19d5f2(0x215)],'tableName':_0x568148[_0x19d5f2(0x210)],'relatedPageCount':_0x2df0aa[_0x19d5f2(0x221)],'relatedPages':_0x2df0aa};}function buildPageRestoreCommands(_0x5ff770,_0x4ec5c4){const _0x3fae14=a61_0x31042d,_0x4e1c72=new Set();for(const _0xe2b307 of _0x4ec5c4){for(const _0x6d9e55 of _0xe2b307[_0x3fae14(0x1f4)])_0x4e1c72[_0x3fae14(0x206)](_0x6d9e55['id']);}return[..._0x4e1c72][_0x3fae14(0x21c)](_0x54cd6c=>_0x3fae14(0x1f9)+_0x54cd6c+_0x3fae14(0x230)+_0x5ff770);}
|