@lovrabet/rabetbase-cli 2.4.7-beta.1 → 2.4.7-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- 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/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +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/get.js +1 -1
- package/lib/commands/config/index.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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/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-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/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/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.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/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/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/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/risk.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 +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +2 -2
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +1 -1
- package/lib/core/bff/utils.d.ts +2 -2
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/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/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/sidecar/flags.json +1 -1
- package/skills/rabetbase/SKILL.md +28 -28
- package/skills/rabetbase/guides/backend-function.md +30 -30
- package/skills/rabetbase/guides/best-practices.md +8 -8
- package/skills/rabetbase/guides/bff-creation-workflow.md +16 -16
- package/skills/rabetbase/guides/conflict-detection.md +3 -3
- package/skills/rabetbase/guides/custom-page-workflow.md +8 -8
- package/skills/rabetbase/guides/data-api-guidelines.md +6 -6
- package/skills/rabetbase/guides/legacy-application-blueprint-workflow.md +8 -8
- package/skills/rabetbase/guides/sql-creation-workflow.md +2 -2
- package/skills/rabetbase/guides/troubleshooting.md +6 -6
- package/skills/rabetbase/guides/typescript-sdk.md +10 -10
- package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +1 -1
- package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +10 -10
- package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
- package/skills/rabetbase/references/rabetbase-bff-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-bff-delete.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-detail.md +4 -4
- package/skills/rabetbase/references/rabetbase-bff-list.md +8 -8
- package/skills/rabetbase/references/rabetbase-bff-pull.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +3 -3
- package/skills/rabetbase/references/rabetbase-bff-status.md +1 -1
- package/skills/rabetbase/references/rabetbase-codegen-sql.md +3 -3
- package/skills/rabetbase/references/rabetbase-dataset-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +3 -3
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/rules/lovrabet_rules.mdc.tpl +7 -7
- package/templates/skill/SKILL.md.tpl +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3e82b0,_0x525c15){const _0x28b2a7=a49_0x3985,_0x3b6e59=_0x3e82b0();while(!![]){try{const _0x56e631=parseInt(_0x28b2a7(0xb7))/0x1*(parseInt(_0x28b2a7(0xc4))/0x2)+-parseInt(_0x28b2a7(0xb9))/0x3*(-parseInt(_0x28b2a7(0xc2))/0x4)+-parseInt(_0x28b2a7(0xc3))/0x5+-parseInt(_0x28b2a7(0xb8))/0x6*(parseInt(_0x28b2a7(0xc0))/0x7)+parseInt(_0x28b2a7(0xbb))/0x8+-parseInt(_0x28b2a7(0xbc))/0x9+parseInt(_0x28b2a7(0xbf))/0xa;if(_0x56e631===_0x525c15)break;else _0x3b6e59['push'](_0x3b6e59['shift']());}catch(_0x1fc89d){_0x3b6e59['push'](_0x3b6e59['shift']());}}}(a49_0x8469,0x56038));function a49_0x8469(){const _0x2a3f9f=['301186JUMURq','1926fygJSE','30onUzoP','App\x20Code\x20cannot\x20exceed\x20100\x20characters','5031032dEyDIv','5281605TzvvBF','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','test','3715920dNnKRh','11599oEtceF','trim','160784fdlQKl','2668745HnuyUa','4CqUbCK'];a49_0x8469=function(){return _0x2a3f9f;};return a49_0x8469();}function a49_0x3985(_0xb7175c,_0x16a4c7){_0xb7175c=_0xb7175c-0xb7;const _0x846977=a49_0x8469();let _0x39852b=_0x846977[_0xb7175c];return _0x39852b;}export function validateAppcode(_0x147472){const _0x3960f=a49_0x3985,_0x2bdbb5=_0x147472[_0x3960f(0xc1)]();if(!_0x2bdbb5)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x2bdbb5['length']>0x64)return{'valid':![],'message':_0x3960f(0xba)};if(!/^[A-Za-z0-9_-]+$/[_0x3960f(0xbe)](_0x2bdbb5))return{'valid':![],'message':_0x3960f(0xbd)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x58494c=a50_0x4ad9;(function(_0x5b952f,_0x332eec){const _0x5adfce=a50_0x4ad9,_0x1b5dec=_0x5b952f();while(!![]){try{const _0x2c015c=parseInt(_0x5adfce(0xad))/0x1*(-parseInt(_0x5adfce(0xab))/0x2)+parseInt(_0x5adfce(0x9b))/0x3*(parseInt(_0x5adfce(0xa1))/0x4)+-parseInt(_0x5adfce(0x9d))/0x5*(parseInt(_0x5adfce(0xa9))/0x6)+-parseInt(_0x5adfce(0x96))/0x7*(parseInt(_0x5adfce(0xa5))/0x8)+-parseInt(_0x5adfce(0xae))/0x9+parseInt(_0x5adfce(0xa0))/0xa*(parseInt(_0x5adfce(0x9a))/0xb)+-parseInt(_0x5adfce(0xac))/0xc*(-parseInt(_0x5adfce(0xa8))/0xd);if(_0x2c015c===_0x332eec)break;else _0x1b5dec['push'](_0x1b5dec['shift']());}catch(_0xe7e6b5){_0x1b5dec['push'](_0x1b5dec['shift']());}}}(a50_0xefcc,0x405ff));function a50_0x4ad9(_0x36fbcf,_0x3ee977){_0x36fbcf=_0x36fbcf-0x95;const _0xefcc5=a50_0xefcc();let _0x4ad959=_0xefcc5[_0x36fbcf];return _0x4ad959;}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x41695c){const _0x30fc42=a50_0x4ad9,_0x7c3661=_0x41695c[_0x30fc42(0xa6)](_0x30fc42(0x9e));if(!_0x7c3661)throw CliErrors[_0x30fc42(0x97)](_0x30fc42(0x98),_0x30fc42(0xa7)+CLI_BIN_NAME+_0x30fc42(0xaa));const _0x2a72bf=readConfig(),_0x54e0b1=_0x7c3661==='app'?_0x30fc42(0xa3):_0x7c3661,_0x53f63d=_0x2a72bf[_0x54e0b1];if(_0x53f63d===undefined)throw CliErrors[_0x30fc42(0x97)](_0x30fc42(0xa2)+_0x7c3661);return{'ok':!![],'data':typeof _0x53f63d===_0x30fc42(0x95)?_0x53f63d:{[_0x54e0b1]:_0x53f63d},'message':typeof _0x53f63d==='object'?undefined:String(_0x53f63d)};}function a50_0xefcc(){const _0x50c8c4=['\x20config\x20get\x20--key\x20<key>','23576GpyubF','15114804lXpThJ','39NHoQDi','3131073sIlrYH','object','1841539vgbiAW','validation','Missing\x20key.','read','466532pwEgvz','129972aIXSAl','config','10hBJrxv','key','string','50jLGNcc','36ItsRxy','Key\x20not\x20found:\x20','appcode','get','8azrpEv','str','Usage:\x20','13XTelTv','1581474CapNdM'];a50_0xefcc=function(){return _0x50c8c4;};return a50_0xefcc();}export const configGetDefinition={'service':a50_0x58494c(0x9c),'command':a50_0x58494c(0xa4),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a50_0x58494c(0x99),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x58494c(0x9e),'type':a50_0x58494c(0x9f),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a51_0x21b3(_0x445925,_0x75ed97){_0x445925=_0x445925-0xbe;const _0x8bf462=a51_0x8bf4();let _0x21b308=_0x8bf462[_0x445925];return _0x21b308;}(function(_0x11a56f,_0x11779d){const _0x4927c6=a51_0x21b3,_0x22e1a2=_0x11a56f();while(!![]){try{const _0x57f54e=-parseInt(_0x4927c6(0xc2))/0x1+parseInt(_0x4927c6(0xc0))/0x2+parseInt(_0x4927c6(0xbe))/0x3+-parseInt(_0x4927c6(0xc5))/0x4*(-parseInt(_0x4927c6(0xc6))/0x5)+parseInt(_0x4927c6(0xbf))/0x6+parseInt(_0x4927c6(0xc7))/0x7*(parseInt(_0x4927c6(0xc4))/0x8)+-parseInt(_0x4927c6(0xc3))/0x9*(parseInt(_0x4927c6(0xc1))/0xa);if(_0x57f54e===_0x11779d)break;else _0x22e1a2['push'](_0x22e1a2['shift']());}catch(_0xea3812){_0x22e1a2['push'](_0x22e1a2['shift']());}}}(a51_0x8bf4,0xab66a));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a51_0x8bf4(){const _0x33226f=['2306001GukEjS','7479378rWkhmd','2409122llwWjr','2180610LTQcHs','155500tGDlre','180SUIwcg','8419208cDnwkM','4AIzYRQ','4732930FZXJpp','7ucQgNs'];a51_0x8bf4=function(){return _0x33226f;};return a51_0x8bf4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a52_0x1454(){const _0x46f97b=['1368216BlKQMw','config','1184606TlgVFU','2383544zwzoMA','List\x20all\x20config\x20values','18WbDTFq','2407768pdTMTj','30FJBYXx','global','list','boolean','187345iNjQjx','6520017iZjJUJ','read','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','3ywSpJE','23831760AYefQb'];a52_0x1454=function(){return _0x46f97b;};return a52_0x1454();}const a52_0x33b9dd=a52_0x4f4c;(function(_0x2c1d70,_0xe5f789){const _0x5d1a98=a52_0x4f4c,_0x2dc9da=_0x2c1d70();while(!![]){try{const _0x379320=parseInt(_0x5d1a98(0x83))/0x1+-parseInt(_0x5d1a98(0x87))/0x2+parseInt(_0x5d1a98(0x7f))/0x3*(-parseInt(_0x5d1a98(0x81))/0x4)+-parseInt(_0x5d1a98(0x7b))/0x5*(-parseInt(_0x5d1a98(0x88))/0x6)+-parseInt(_0x5d1a98(0x7c))/0x7+-parseInt(_0x5d1a98(0x84))/0x8*(parseInt(_0x5d1a98(0x86))/0x9)+parseInt(_0x5d1a98(0x80))/0xa;if(_0x379320===_0xe5f789)break;else _0x2dc9da['push'](_0x2dc9da['shift']());}catch(_0x3b459e){_0x2dc9da['push'](_0x2dc9da['shift']());}}}(a52_0x1454,0xa6790));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a52_0x4f4c(_0x89102d,_0x17390b){_0x89102d=_0x89102d-0x79;const _0x1454bc=a52_0x1454();let _0x4f4cf8=_0x1454bc[_0x89102d];return _0x4f4cf8;}async function execute(_0x5724f8){const _0x3db34b=a52_0x4f4c,_0x249807=_0x5724f8['bool'](_0x3db34b(0x89))?readScopedConfig(_0x3db34b(0x89)):readConfig();return{'ok':!![],'data':_0x249807};}export const configListDefinition={'service':a52_0x33b9dd(0x82),'command':a52_0x33b9dd(0x79),'description':a52_0x33b9dd(0x85),'risk':a52_0x33b9dd(0x7d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x33b9dd(0x89),'type':a52_0x33b9dd(0x7a),'description':a52_0x33b9dd(0x7e),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0x4a67b7=a53_0x23ed;(function(_0x555ab9,_0x39b645){const _0x2af5a4=a53_0x23ed,_0x491750=_0x555ab9();while(!![]){try{const _0x4652a2=-parseInt(_0x2af5a4(0x193))/0x1+-parseInt(_0x2af5a4(0x1ab))/0x2+-parseInt(_0x2af5a4(0x18c))/0x3*(-parseInt(_0x2af5a4(0x1ae))/0x4)+parseInt(_0x2af5a4(0x194))/0x5*(-parseInt(_0x2af5a4(0x19d))/0x6)+parseInt(_0x2af5a4(0x18b))/0x7*(-parseInt(_0x2af5a4(0x1b3))/0x8)+parseInt(_0x2af5a4(0x18f))/0x9*(parseInt(_0x2af5a4(0x198))/0xa)+parseInt(_0x2af5a4(0x19f))/0xb;if(_0x4652a2===_0x39b645)break;else _0x491750['push'](_0x491750['shift']());}catch(_0x248145){_0x491750['push'](_0x491750['shift']());}}}(a53_0x1202,0xed631));import{CliErrors}from'../../errors.js';function a53_0x1202(){const _0x7518f7=['\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','object','riskLevel','168XMuFYT','2124ppdKvd','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','locale','658017pfsrnO','Settable\x20top-level\x20keys:\x20','config','Top-level\x20key\x20\x22','1902092PxLzHX','6860645zBPkio','validation','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','50uoZqfU','Use\x20`','includes','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Usage:\x20','6AQhgbC','key','57926297KvgUov','str','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','set','bool','join','value','length','`,\x20`','boolean','env','\x20workspace\x20add\x20<name>\x20--appcode\x20','2149932FVYIwH','Project','\x22\x20is\x20not\x20settable.','2428VlTxGD','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','app','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','246608DYOYnC','apps','global','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Config\x20value','Missing\x20key.','keys','string','\x20set\x20to:\x20'];a53_0x1202=function(){return _0x7518f7;};return a53_0x1202();}function a53_0x23ed(_0xa5988c,_0x489f41){_0xa5988c=_0xa5988c-0x186;const _0x1202f1=a53_0x1202();let _0x23ed89=_0x1202f1[_0xa5988c];return _0x23ed89;}import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x973a44){const _0x314972=a53_0x23ed,_0x3d82a3=_0x973a44[_0x314972(0x1a0)](_0x314972(0x19e)),_0x2c00b9=_0x973a44['str'](_0x314972(0x1a5));if(!_0x3d82a3)throw CliErrors[_0x314972(0x195)](_0x314972(0x1b8),_0x314972(0x19c)+CLI_BIN_NAME+_0x314972(0x1b1));if(_0x2c00b9===undefined||_0x2c00b9==='')throw CliErrors[_0x314972(0x195)]('Missing\x20value.',_0x314972(0x19c)+CLI_BIN_NAME+_0x314972(0x1b1));if(_0x2c00b9['length']>0x1f4)throw CliErrors[_0x314972(0x195)](_0x314972(0x19b));if(!isTopLevelConfigKey(_0x3d82a3))throw CliErrors[_0x314972(0x195)](_0x314972(0x192)+_0x3d82a3+_0x314972(0x1ad),_0x314972(0x190)+getTopLevelConfigKeySummary());if(_0x3d82a3===_0x314972(0x18a))throw CliErrors[_0x314972(0x195)](_0x314972(0x188));if(CONFIG_ENUM_VALUES[_0x3d82a3]&&!CONFIG_ENUM_VALUES[_0x3d82a3][_0x314972(0x19a)](_0x2c00b9))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x3d82a3+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x3d82a3][_0x314972(0x1a4)](',\x20'));if(_0x3d82a3==='locale'&&!normalizeLocale(_0x2c00b9))throw CliErrors[_0x314972(0x195)]('Invalid\x20locale\x20value.',_0x314972(0x1af));const _0x1b1164={'global':_0x973a44[_0x314972(0x1a3)](_0x314972(0x1b5))},_0x486d71=resolveWriteScope(_0x1b1164),_0x30a0e5=readScopedConfig(_0x486d71);let _0x513aca=_0x3d82a3,_0x3e6f87=_0x2c00b9;_0x3d82a3===_0x314972(0x1b0)&&(_0x513aca='appcode',delete _0x30a0e5[_0x314972(0x1b0)]);_0x3d82a3===_0x314972(0x18e)&&(_0x3e6f87=normalizeLocale(_0x2c00b9));if(_0x3d82a3===_0x314972(0x1a9)){_0x3e6f87=normalizeEnv(_0x2c00b9);if(!isProduction(_0x3e6f87)&&!isDaily(_0x3e6f87))throw CliErrors['validation'](_0x314972(0x196),_0x314972(0x197));}if(_0x3d82a3==='appcode'){const _0x45d798=_0x30a0e5[_0x314972(0x1b4)]&&typeof _0x30a0e5[_0x314972(0x1b4)]===_0x314972(0x189)?Object[_0x314972(0x1b9)](_0x30a0e5[_0x314972(0x1b4)]):[];if(_0x45d798[_0x314972(0x1a6)]>0x0)throw CliErrors['validation'](_0x314972(0x1b2),_0x314972(0x199)+CLI_BIN_NAME+_0x314972(0x1aa)+_0x3e6f87+_0x314972(0x1a7)+CLI_BIN_NAME+_0x314972(0x18d));const _0x10f256=buildCanonicalProjectConfig({..._0x30a0e5},{'appCodes':[_0x3e6f87],'env':typeof _0x30a0e5['env']==='string'?_0x30a0e5['env']:undefined});writeScopedConfig(_0x10f256,_0x486d71);const _0xa75086=_0x486d71===_0x314972(0x1b5)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0xa75086+'\x20appcode\x20set\x20to:\x20'+_0x3e6f87+_0x314972(0x1a1)};}_0x30a0e5[_0x513aca]=_0x3e6f87,writeScopedConfig(_0x30a0e5,_0x486d71);const _0x526a68=_0x486d71==='global'?'Global':_0x314972(0x1ac);return{'ok':!![],'message':'✓\x20'+_0x526a68+'\x20'+_0x513aca+_0x314972(0x187)+_0x3e6f87};}export const configSetDefinition={'service':a53_0x4a67b7(0x191),'command':a53_0x4a67b7(0x1a2),'description':'Set\x20a\x20config\x20value','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a53_0x4a67b7(0x186),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a53_0x4a67b7(0x1a5),'type':a53_0x4a67b7(0x186),'description':a53_0x4a67b7(0x1b7),'required':!![]},{'name':a53_0x4a67b7(0x1b5),'type':a53_0x4a67b7(0x1a8),'description':a53_0x4a67b7(0x1b6),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a54_0x4b3b(_0x2aec3c,_0x3339f7){_0x2aec3c=_0x2aec3c-0x1d5;var _0x5b860a=a54_0x5b86();var _0x4b3ba1=_0x5b860a[_0x2aec3c];return _0x4b3ba1;}(function(_0x5d140f,_0x4642d1){var _0x4c5cde=a54_0x4b3b,_0x51d6cf=_0x5d140f();while(!![]){try{var _0x7fc5e9=-parseInt(_0x4c5cde(0x1dc))/0x1*(parseInt(_0x4c5cde(0x1e0))/0x2)+-parseInt(_0x4c5cde(0x1da))/0x3*(parseInt(_0x4c5cde(0x1d9))/0x4)+parseInt(_0x4c5cde(0x1e1))/0x5*(-parseInt(_0x4c5cde(0x1d7))/0x6)+parseInt(_0x4c5cde(0x1db))/0x7+-parseInt(_0x4c5cde(0x1e5))/0x8*(parseInt(_0x4c5cde(0x1d5))/0x9)+-parseInt(_0x4c5cde(0x1e4))/0xa*(parseInt(_0x4c5cde(0x1de))/0xb)+-parseInt(_0x4c5cde(0x1d8))/0xc*(-parseInt(_0x4c5cde(0x1df))/0xd);if(_0x7fc5e9===_0x4642d1)break;else _0x51d6cf['push'](_0x51d6cf['shift']());}catch(_0x1ccad3){_0x51d6cf['push'](_0x51d6cf['shift']());}}}(a54_0x5b86,0xab77c));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x5b9be9){var _0x5938ba=a54_0x4b3b;if(_0x5b9be9[_0x5938ba(0x1d6)])return _0x5938ba(0x1d6);if(!isInProject())throw CliErrors[_0x5938ba(0x1e3)](_0x5938ba(0x1e2),_0x5938ba(0x1dd)+CLI_BIN_NAME+_0x5938ba(0x1e6));return'project';}export function readScopedConfig(_0xf5a3f1){return readConfigFile(resolveWriteConfigPath(_0xf5a3f1));}export function writeScopedConfig(_0xa05f79,_0x2bece3){writeConfigFile(resolveWriteConfigPath(_0x2bece3),_0xa05f79);}function a54_0x5b86(){var _0x415ab4=['Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','validation','7460760nWkCTS','2352368vneTeq','\x20init`\x20first.','18eHSslJ','global','701544pMGzks','47868VZmBuH','425812lXKeUs','3lcGHvO','317114JdiRWG','400966mIDSom','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','11lCbysQ','8905hSMdzm','2uPQoRx','10RLrZrL'];a54_0x5b86=function(){return _0x415ab4;};return a54_0x5b86();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a55_0x18e820=a55_0x5164;(function(_0xc353f6,_0x337b31){const _0x3c1f0f=a55_0x5164,_0x5f3b93=_0xc353f6();while(!![]){try{const _0xf21bfc=parseInt(_0x3c1f0f(0x14d))/0x1+parseInt(_0x3c1f0f(0x149))/0x2*(parseInt(_0x3c1f0f(0x142))/0x3)+-parseInt(_0x3c1f0f(0x145))/0x4*(parseInt(_0x3c1f0f(0x147))/0x5)+-parseInt(_0x3c1f0f(0x140))/0x6+-parseInt(_0x3c1f0f(0x141))/0x7*(-parseInt(_0x3c1f0f(0x14b))/0x8)+-parseInt(_0x3c1f0f(0x144))/0x9+-parseInt(_0x3c1f0f(0x143))/0xa*(parseInt(_0x3c1f0f(0x148))/0xb);if(_0xf21bfc===_0x337b31)break;else _0x5f3b93['push'](_0x5f3b93['shift']());}catch(_0x3365a6){_0x5f3b93['push'](_0x5f3b93['shift']());}}}(a55_0xcea6,0x1ae30));function a55_0xcea6(){const _0x2e3c8c=['\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','filter','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','Filter\x20dataset\x20records\x20with\x20query\x20conditions','713712XoSjXy','14iMyzjV','3jWmSPf','50ikViGI','615735rwcCtE','315484wKGfLm','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','5ATrOew','115247cfcPql','335822NxxLwZ','join','820112IgOAeJ','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','55812fXmNDJ'];a55_0xcea6=function(){return _0x2e3c8c;};return a55_0xcea6();}import{buildDataCommand}from'../../commands/data/shared.js';function a55_0x5164(_0x4529e2,_0x2f8d23){_0x4529e2=_0x4529e2-0x13f;const _0xcea6a7=a55_0xcea6();let _0x51649b=_0xcea6a7[_0x4529e2];return _0x51649b;}export const dataFilter=buildDataCommand({'command':'filter','operation':a55_0x18e820(0x14f),'description':a55_0x18e820(0x13f),'paramsRequired':![],'paramsHint':a55_0x18e820(0x14c),'helpExtra':['\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a55_0x18e820(0x151),a55_0x18e820(0x150),a55_0x18e820(0x14e),a55_0x18e820(0x146),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page'][a55_0x18e820(0x14a)]('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a56_0x235c(){const _0x2f729d=['getOne','18kUrtRg','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','535416toWSKL','23888yvZSmf','21046575BSLNgi','Get\x20a\x20single\x20record\x20by\x20ID','948495fpwtvb','10NCyJeH','6OLvMhR','4nDHrpr','1004434QvETFF','2088955JydrgG','3120677tSjMtr'];a56_0x235c=function(){return _0x2f729d;};return a56_0x235c();}const a56_0x396a91=a56_0x6a93;function a56_0x6a93(_0x510efb,_0x3acdec){_0x510efb=_0x510efb-0x1a3;const _0x235cfa=a56_0x235c();let _0x6a934b=_0x235cfa[_0x510efb];return _0x6a934b;}(function(_0x229449,_0x5960c5){const _0x31c1b5=a56_0x6a93,_0x233f2b=_0x229449();while(!![]){try{const _0x2a01ad=-parseInt(_0x31c1b5(0x1ab))/0x1+-parseInt(_0x31c1b5(0x1a5))/0x2+-parseInt(_0x31c1b5(0x1af))/0x3*(-parseInt(_0x31c1b5(0x1a4))/0x4)+-parseInt(_0x31c1b5(0x1a6))/0x5+parseInt(_0x31c1b5(0x1a3))/0x6*(-parseInt(_0x31c1b5(0x1a7))/0x7)+parseInt(_0x31c1b5(0x1ac))/0x8*(-parseInt(_0x31c1b5(0x1a9))/0x9)+parseInt(_0x31c1b5(0x1b0))/0xa*(parseInt(_0x31c1b5(0x1ad))/0xb);if(_0x2a01ad===_0x5960c5)break;else _0x233f2b['push'](_0x233f2b['shift']());}catch(_0x49c4ce){_0x233f2b['push'](_0x233f2b['shift']());}}}(a56_0x235c,0x4eaeb));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a56_0x396a91(0x1a8),'operation':a56_0x396a91(0x1a8),'description':a56_0x396a91(0x1ae),'paramsRequired':!![],'paramsHint':a56_0x396a91(0x1aa)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xaa371f,_0x4774ac){const _0x4eecbc=a57_0x3b5d,_0x166acc=_0xaa371f();while(!![]){try{const _0xc05c79=parseInt(_0x4eecbc(0xc4))/0x1+-parseInt(_0x4eecbc(0xc5))/0x2+-parseInt(_0x4eecbc(0xc7))/0x3+parseInt(_0x4eecbc(0xc1))/0x4*(-parseInt(_0x4eecbc(0xc8))/0x5)+-parseInt(_0x4eecbc(0xc6))/0x6+-parseInt(_0x4eecbc(0xc2))/0x7*(-parseInt(_0x4eecbc(0xc9))/0x8)+-parseInt(_0x4eecbc(0xc3))/0x9*(-parseInt(_0x4eecbc(0xca))/0xa);if(_0xc05c79===_0x4774ac)break;else _0x166acc['push'](_0x166acc['shift']());}catch(_0xe65833){_0x166acc['push'](_0x166acc['shift']());}}}(a57_0x2c34,0xc4e74));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';function a57_0x3b5d(_0x2e786a,_0xbebf4b){_0x2e786a=_0x2e786a-0xc1;const _0x2c34de=a57_0x2c34();let _0x3b5dc5=_0x2c34de[_0x2e786a];return _0x3b5dc5;}export const dataDefinitions=[dataFilter,dataGetOne];function a57_0x2c34(){const _0x110c40=['716083QHqGHX','2193784nWeayc','2950800vcqNZw','4806252Lyvygs','10NFhzZP','8gSBldl','270SKchqS','2144696kNkJmB','5999966esidmR','1165473USKZlB'];a57_0x2c34=function(){return _0x110c40;};return a57_0x2c34();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x470929,_0x2d526e){const _0x47916e=a58_0x1005,_0x903db=_0x470929();while(!![]){try{const _0x551a5b=parseInt(_0x47916e(0x167))/0x1+-parseInt(_0x47916e(0x15c))/0x2*(-parseInt(_0x47916e(0x153))/0x3)+parseInt(_0x47916e(0x14f))/0x4*(parseInt(_0x47916e(0x163))/0x5)+-parseInt(_0x47916e(0x14e))/0x6+-parseInt(_0x47916e(0x160))/0x7*(-parseInt(_0x47916e(0x158))/0x8)+-parseInt(_0x47916e(0x149))/0x9+-parseInt(_0x47916e(0x148))/0xa;if(_0x551a5b===_0x2d526e)break;else _0x903db['push'](_0x903db['shift']());}catch(_0x38b33e){_0x903db['push'](_0x903db['shift']());}}}(a58_0x237a,0xd58f7));function a58_0x1005(_0x3d86f8,_0x481aec){_0x3d86f8=_0x3d86f8-0x148;const _0x237a84=a58_0x237a();let _0x1005f0=_0x237a84[_0x3d86f8];return _0x1005f0;}import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a58_0x237a(){const _0x575327=['6766020UJUfFg','alias','data','now','paramsHint','483540OODPuA','40RqPfpe','appCode','string','helpExtra','3qSVjlS','flagMissing','code','description','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','389736bnJRuA','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','read','str','3096208fbqZpP','params','validation','getOne','105NrvSmm','compress','paramsRequired','442515Sjbffn','command','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','\x20completed\x20in\x20','52739QxsWrb','15095150FzxdAy'];a58_0x237a=function(){return _0x575327;};return a58_0x237a();}import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x302be8){const _0x1bf214=a58_0x1005;if(!_0x302be8)throw CliErrors['flagMissing'](_0x1bf214(0x15d),_0x1bf214(0x159));const _0x1583e6=_0x302be8['id'];if(_0x1583e6===undefined||_0x1583e6===null||_0x1583e6==='')throw CliErrors[_0x1bf214(0x15e)]('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params',_0x1bf214(0x165));}function parseCommandParams(_0xc671b7){return parseJsonParams(_0xc671b7)??{};}export function buildDataCommand(_0x400fb5){const _0x4bd415=a58_0x1005,_0x22bb2a=_0x4bd415(0x157);return{'service':_0x4bd415(0x14b),'command':_0x400fb5[_0x4bd415(0x164)],'description':_0x400fb5[_0x4bd415(0x156)],'risk':_0x4bd415(0x15a),'defaultOutputFormat':_0x4bd415(0x161),'helpExtra':_0x400fb5[_0x4bd415(0x152)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x4bd415(0x14a),'type':_0x4bd415(0x151),'description':_0x22bb2a},{'name':'params','type':_0x4bd415(0x151),'description':_0x400fb5[_0x4bd415(0x14d)]}],async 'validate'(_0x5ce81b){const _0x4d6832=_0x4bd415,_0x17880a=_0x5ce81b[_0x4d6832(0x15b)]('params');if(_0x400fb5[_0x4d6832(0x162)]&&!_0x17880a)throw CliErrors[_0x4d6832(0x154)](_0x4d6832(0x15d),_0x400fb5[_0x4d6832(0x14d)]);const _0x4fe1ed=parseJsonParams(_0x17880a);_0x400fb5['operation']===_0x4d6832(0x15f)&&assertGetOneId(_0x4fe1ed);},async 'execute'(_0x23d1d3){const _0x4925c1=_0x4bd415,_0x3090c7=parseCommandParams(_0x23d1d3[_0x4925c1(0x15b)](_0x4925c1(0x15d))),_0x519490=Date['now'](),_0x48785c=await executeDatasetDataOperation(_0x23d1d3[_0x4925c1(0x150)],_0x23d1d3[_0x4925c1(0x15b)](_0x4925c1(0x155)),_0x400fb5['operation'],_0x3090c7),_0x401058=Date[_0x4925c1(0x14c)]()-_0x519490;return{'ok':!![],'data':{'result':_0x48785c,'elapsed':_0x401058},'message':'data\x20'+_0x400fb5[_0x4925c1(0x164)]+_0x4925c1(0x166)+_0x401058+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x218fa2=a59_0x35f2;(function(_0x214ac5,_0xbc3b5a){const _0x5e4c43=a59_0x35f2,_0x1c7d21=_0x214ac5();while(!![]){try{const _0xb8eda0=-parseInt(_0x5e4c43(0x135))/0x1*(parseInt(_0x5e4c43(0x130))/0x2)+parseInt(_0x5e4c43(0x120))/0x3+parseInt(_0x5e4c43(0x113))/0x4*(parseInt(_0x5e4c43(0x124))/0x5)+-parseInt(_0x5e4c43(0x12b))/0x6+-parseInt(_0x5e4c43(0x108))/0x7+parseInt(_0x5e4c43(0xfd))/0x8*(parseInt(_0x5e4c43(0x11f))/0x9)+parseInt(_0x5e4c43(0x132))/0xa;if(_0xb8eda0===_0xbc3b5a)break;else _0x1c7d21['push'](_0x1c7d21['shift']());}catch(_0x53caab){_0x1c7d21['push'](_0x1c7d21['shift']());}}}(a59_0x559d,0xa720f));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH='/smartapi/question/er-config/business-group/edit';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x42e045,input:_0x5a947d,dryRun:_0x3498f3}){const _0x51c900=a59_0x35f2;validateInput(_0x5a947d);const _0x248fe3=normalizeBusinessGroup(_0x5a947d[_0x51c900(0x122)]),_0x37ec5b=await getDatasetDetail(_0x5a947d[_0x51c900(0x125)]),_0x2ad6d6=resolveBusinessGroupDataset(_0x37ec5b,_0x5a947d['code']),_0x2b7c0e=loadCurrentBusinessGroup(_0x37ec5b,_0x2ad6d6);assertExpectedBusinessGroup(_0x2b7c0e,_0x5a947d['expectBusinessGroup']);const _0x36ad98=buildBackendPayload(_0x42e045,_0x2ad6d6,_0x248fe3),_0x186cf4=_0x2b7c0e!==_0x248fe3;let _0x393453;if(_0x186cf4&&!_0x3498f3){await updateErBusinessGroup(_0x36ad98);const _0x411f01=await getDatasetDetail(_0x2ad6d6['code']),_0x307a75=resolveBusinessGroupDataset(_0x411f01,_0x2ad6d6[_0x51c900(0x125)]),_0x5eeda5=loadCurrentBusinessGroup(_0x411f01,_0x307a75);if(_0x5eeda5!==_0x248fe3)throw CliErrors['apiError']('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x51c900(0x126)+JSON[_0x51c900(0x112)](_0x248fe3)+',\x20actual\x20'+JSON[_0x51c900(0x112)](_0x5eeda5)+'.');_0x393453={'verified':!![],'status':_0x51c900(0x11c),'afterReadback':{'businessGroup':_0x5eeda5}};}else!_0x186cf4&&(_0x393453={'verified':!![],'status':_0x51c900(0x133),'afterReadback':{'businessGroup':_0x2b7c0e}});const _0x2df0d7={'operation':_0x51c900(0x10d),'appCode':_0x42e045,'selector':{'code':_0x2ad6d6['code']},'dataset':_0x2ad6d6,'before':{'businessGroup':_0x2b7c0e},'after':{'businessGroup':_0x248fe3},'changed':_0x186cf4,'dryRun':_0x3498f3,'submitted':_0x186cf4&&!_0x3498f3,'backend':{'method':_0x51c900(0xff),'path':BACKEND_PATH,'payload':_0x36ad98},..._0x393453?{'verification':_0x393453}:{},'warnings':[]};return{'ok':!![],'data':_0x2df0d7,'message':_0x186cf4?_0x3498f3?_0x51c900(0x12c)+_0x2ad6d6[_0x51c900(0x125)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x2ad6d6[_0x51c900(0x125)]:_0x51c900(0x11d)+_0x2ad6d6[_0x51c900(0x125)]};}export const datasetBusinessGroupUpdate={'service':a59_0x218fa2(0x106),'command':a59_0x218fa2(0xfe),'description':a59_0x218fa2(0x12e),'risk':a59_0x218fa2(0x103),'flags':[CODE_FLAG,{'name':a59_0x218fa2(0x100),'type':a59_0x218fa2(0x117),'required':!![],'description':a59_0x218fa2(0x10b)},{'name':a59_0x218fa2(0x11b),'type':a59_0x218fa2(0x117),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1cba5f){validateInput(readBusinessGroupUpdateInput(_0x1cba5f));},async 'dryRun'(_0x2a6317){const _0x2d0ae4=a59_0x218fa2,_0x3cf108=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x2a6317[_0x2d0ae4(0x119)],'input':readBusinessGroupUpdateInput(_0x2a6317),'dryRun':!![]});return{'method':_0x2d0ae4(0xff),'url':BACKEND_PATH,'body':_0x3cf108[_0x2d0ae4(0xfa)][_0x2d0ae4(0x107)]['payload'],'description':_0x3cf108[_0x2d0ae4(0x121)],..._0x3cf108[_0x2d0ae4(0xfa)]};},async 'execute'(_0x32c2e3){const _0x135d0b=a59_0x218fa2;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x32c2e3[_0x135d0b(0x119)],'input':readBusinessGroupUpdateInput(_0x32c2e3),'dryRun':![]});}};function a59_0x559d(){const _0x23f9b8=['expect-business-group','matched','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','modelCode','5402610jCZpAP','2619585Ukqgby','message','businessGroup','length','35CJOrZg','code','Expected\x20','isFinite','parse','sourceType','object','3614052qhOIBW','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','source','Update\x20business\x20scenario\x20group','prototype','5290yhdckQ','name','16373150pJsXMS','unchanged','keys','237TWPExI','datasetId','data','extend','toUpperCase','8SnwJeM','business-group-update','POST','business-group','trim','found','write','modelId','validation','dataset','backend','9281475TwSrnq','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','isArray','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it','str','update','--code\x20is\x20required','DB_TABLE','number',',\x20actual\x20','stringify','73652UEKgOu','METADATA','Expectation\x20mismatch\x20at\x20businessGroup','value','string','hasOwnProperty','appCode','--business-group\x20is\x20required'];a59_0x559d=function(){return _0x23f9b8;};return a59_0x559d();}function readBusinessGroupUpdateInput(_0x1559af){const _0x13d97a=a59_0x218fa2,_0x31e3ea=_0x1559af[_0x13d97a(0x10c)](_0x13d97a(0x11b));return{'code':trim(_0x1559af['str'](_0x13d97a(0x125))),'businessGroup':_0x1559af['str'](_0x13d97a(0x100)),'expectBusinessGroup':_0x31e3ea===undefined||_0x31e3ea===''?undefined:_0x31e3ea};}function validateInput(_0x3e7b87){const _0xb3e6e=a59_0x218fa2;if(!trim(_0x3e7b87['code']))throw CliErrors[_0xb3e6e(0x105)](_0xb3e6e(0x10e));if(_0x3e7b87['businessGroup']===undefined)throw CliErrors[_0xb3e6e(0x105)](_0xb3e6e(0x11a));}function resolveBusinessGroupDataset(_0x1ac4a1,_0x1ba937){const _0x583d3c=a59_0x218fa2,_0x37c1a2=asPlainObject(_0x1ac4a1[_0x583d3c(0x106)]),_0x1ffed6=asPlainObject(_0x1ac4a1['dbtableConfig']),_0x4850f5=resolveSourceType(_0x1ac4a1,_0x37c1a2,_0x1ffed6),_0x3c40fa=firstString(_0x1ac4a1[_0x583d3c(0x11e)],_0x1ac4a1['code'],_0x37c1a2['datasetCode'],_0x1ba937)||_0x1ba937;return{'id':firstNumber(_0x1ac4a1[_0x583d3c(0x104)],_0x1ac4a1['id'],_0x37c1a2[_0x583d3c(0xf9)])??firstString(_0x1ac4a1['modelId'],_0x1ac4a1['id'],_0x37c1a2[_0x583d3c(0xf9)])??null,'code':_0x3c40fa,'name':firstString(_0x1ac4a1[_0x583d3c(0x131)],_0x37c1a2['datasetName'],_0x37c1a2[_0x583d3c(0x131)])||null,'sourceType':_0x4850f5};}function resolveSourceType(_0x53b3d4,_0x38dcba,_0x555ba6){const _0x14a265=a59_0x218fa2,_0x441a08=firstString(_0x53b3d4['source'],_0x53b3d4[_0x14a265(0x129)],_0x38dcba[_0x14a265(0x12d)],_0x38dcba[_0x14a265(0x129)])?.[_0x14a265(0x101)]()[_0x14a265(0xfc)]();if(_0x441a08==='DB_TABLE'||_0x441a08==='METADATA')return _0x441a08;if(Object[_0x14a265(0x134)](_0x555ba6)[_0x14a265(0x123)]>0x0)return _0x14a265(0x10f);throw CliErrors[_0x14a265(0x105)](_0x14a265(0x109));}function loadCurrentBusinessGroup(_0xbb6145,_0x534503){const _0x530b04=a59_0x218fa2,_0x56ab55=readBusinessGroupFromDatasetDetail(_0xbb6145,_0x534503['sourceType']);if(_0x56ab55[_0x530b04(0x102)])return normalizeBusinessGroup(_0x56ab55[_0x530b04(0x116)]);if(_0x534503[_0x530b04(0x129)]===_0x530b04(0x114))return'';throw CliErrors[_0x530b04(0x105)]('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.');}function readBusinessGroupFromDatasetDetail(_0x24e854,_0x1bcbcf){const _0x37038f=a59_0x218fa2,_0x522ec5=asPlainObject(_0x24e854[_0x37038f(0x106)]),_0x5e1e6c=firstPresent(_0x24e854[_0x37038f(0x122)]);if(_0x5e1e6c[_0x37038f(0x102)])return _0x5e1e6c;const _0x157781=firstPresent(_0x522ec5[_0x37038f(0x122)]);if(_0x157781['found'])return _0x157781;if(_0x1bcbcf===_0x37038f(0x10f))return{'found':![]};const _0x5e5b9c=readBusinessGroupFromExtend(_0x24e854[_0x37038f(0xfb)]);if(_0x5e5b9c[_0x37038f(0x102)])return _0x5e5b9c;return readBusinessGroupFromExtend(_0x522ec5[_0x37038f(0xfb)]);}function readBusinessGroupFromExtend(_0x2d1031){const _0x2984eb=a59_0x218fa2;if(_0x2d1031===undefined||_0x2d1031===null||_0x2d1031==='')return{'found':![]};if(typeof _0x2d1031===_0x2984eb(0x117))try{const _0x100e98=JSON[_0x2984eb(0x128)](_0x2d1031);return readBusinessGroupFromExtend(_0x100e98);}catch{return{'found':![]};}const _0x32ed30=asPlainObject(_0x2d1031);if(Object[_0x2984eb(0x12f)][_0x2984eb(0x118)]['call'](_0x32ed30,'businessGroup'))return{'found':!![],'value':_0x32ed30[_0x2984eb(0x122)]};return{'found':![]};}function firstPresent(..._0x30c8e3){for(const _0x25ce35 of _0x30c8e3){if(_0x25ce35!==undefined&&_0x25ce35!==null)return{'found':!![],'value':_0x25ce35};}return{'found':![]};}function a59_0x35f2(_0x58c1f9,_0x2bc76c){_0x58c1f9=_0x58c1f9-0xf9;const _0x559d5f=a59_0x559d();let _0x35f209=_0x559d5f[_0x58c1f9];return _0x35f209;}function assertExpectedBusinessGroup(_0x112a1b,_0x28d5b1){const _0x5e15af=a59_0x218fa2;if(_0x28d5b1===undefined)return;const _0x11d9d1=normalizeBusinessGroup(_0x28d5b1);if(_0x112a1b!==_0x11d9d1)throw CliErrors[_0x5e15af(0x105)](_0x5e15af(0x115),'Expected\x20'+JSON[_0x5e15af(0x112)](_0x11d9d1)+_0x5e15af(0x111)+JSON[_0x5e15af(0x112)](_0x112a1b));}function buildBackendPayload(_0x1615cf,_0x11235,_0x131e6c){const _0x4af0fc=a59_0x218fa2;return{'appCode':_0x1615cf,'datasetCode':_0x11235[_0x4af0fc(0x125)],'businessGroup':_0x131e6c};}function normalizeBusinessGroup(_0x4a1cd6){const _0x25c3a3=a59_0x218fa2;if(_0x4a1cd6===undefined||_0x4a1cd6===null)return'';return String(_0x4a1cd6)[_0x25c3a3(0x101)]();}function asPlainObject(_0x2a032c){const _0xe5ba0f=a59_0x218fa2;if(!_0x2a032c||typeof _0x2a032c!==_0xe5ba0f(0x12a)||Array[_0xe5ba0f(0x10a)](_0x2a032c))return{};return _0x2a032c;}function firstString(..._0x30bad0){const _0xe09902=a59_0x218fa2;for(const _0x85bf22 of _0x30bad0){if(typeof _0x85bf22===_0xe09902(0x117)&&_0x85bf22['trim']())return _0x85bf22[_0xe09902(0x101)]();if(typeof _0x85bf22===_0xe09902(0x110)&&Number[_0xe09902(0x127)](_0x85bf22))return String(_0x85bf22);}return undefined;}function firstNumber(..._0x927fdd){const _0x4f5a0e=a59_0x218fa2;for(const _0x3bd1fd of _0x927fdd){if(typeof _0x3bd1fd===_0x4f5a0e(0x110)&&Number[_0x4f5a0e(0x127)](_0x3bd1fd))return _0x3bd1fd;if(typeof _0x3bd1fd==='string'&&_0x3bd1fd['trim']()&&Number[_0x4f5a0e(0x127)](Number(_0x3bd1fd)))return Number(_0x3bd1fd);}return null;}function trim(_0x20d9c8){const _0x2430b5=a59_0x218fa2;return String(_0x20d9c8||'')[_0x2430b5(0x101)]();}
|
|
1
|
+
const a59_0x8f71c9=a59_0x53bf;(function(_0x1c6c5d,_0xf3ffab){const _0x409ca2=a59_0x53bf,_0x35422d=_0x1c6c5d();while(!![]){try{const _0x39ef8c=-parseInt(_0x409ca2(0x178))/0x1+-parseInt(_0x409ca2(0x1a1))/0x2+parseInt(_0x409ca2(0x188))/0x3*(-parseInt(_0x409ca2(0x186))/0x4)+parseInt(_0x409ca2(0x1a5))/0x5+-parseInt(_0x409ca2(0x173))/0x6+-parseInt(_0x409ca2(0x17c))/0x7+-parseInt(_0x409ca2(0x191))/0x8*(-parseInt(_0x409ca2(0x18d))/0x9);if(_0x39ef8c===_0xf3ffab)break;else _0x35422d['push'](_0x35422d['shift']());}catch(_0x5d46e0){_0x35422d['push'](_0x35422d['shift']());}}}(a59_0x4fd2,0x9e7c7));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a59_0x8f71c9(0x17d);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x28a9f5,input:_0x3b4d45,dryRun:_0x49a8de}){const _0x4d060d=a59_0x8f71c9;validateInput(_0x3b4d45);const _0x2eaf3a=normalizeBusinessGroup(_0x3b4d45[_0x4d060d(0x193)]),_0x1b994f=await getDatasetDetail(_0x3b4d45[_0x4d060d(0x174)]),_0x18f71d=resolveBusinessGroupDataset(_0x1b994f,_0x3b4d45['code']),_0x33fe10=loadCurrentBusinessGroup(_0x1b994f,_0x18f71d);assertExpectedBusinessGroup(_0x33fe10,_0x3b4d45[_0x4d060d(0x198)]);const _0x2e300d=buildBackendPayload(_0x28a9f5,_0x18f71d,_0x2eaf3a),_0x3218bc=_0x33fe10!==_0x2eaf3a;let _0x1ff776;if(_0x3218bc&&!_0x49a8de){await updateErBusinessGroup(_0x2e300d);const _0x26a62a=await getDatasetDetail(_0x18f71d['code']),_0x23c0d6=resolveBusinessGroupDataset(_0x26a62a,_0x18f71d[_0x4d060d(0x174)]),_0x1b28a0=loadCurrentBusinessGroup(_0x26a62a,_0x23c0d6);if(_0x1b28a0!==_0x2eaf3a)throw CliErrors[_0x4d060d(0x17e)](_0x4d060d(0x170),_0x4d060d(0x18f)+JSON[_0x4d060d(0x194)](_0x2eaf3a)+',\x20actual\x20'+JSON['stringify'](_0x1b28a0)+'.');_0x1ff776={'verified':!![],'status':'matched','afterReadback':{'businessGroup':_0x1b28a0}};}else!_0x3218bc&&(_0x1ff776={'verified':!![],'status':_0x4d060d(0x175),'afterReadback':{'businessGroup':_0x33fe10}});const _0x59bc58={'operation':_0x4d060d(0x182),'appCode':_0x28a9f5,'selector':{'code':_0x18f71d[_0x4d060d(0x174)]},'dataset':_0x18f71d,'before':{'businessGroup':_0x33fe10},'after':{'businessGroup':_0x2eaf3a},'changed':_0x3218bc,'dryRun':_0x49a8de,'submitted':_0x3218bc&&!_0x49a8de,'backend':{'method':_0x4d060d(0x19b),'path':BACKEND_PATH,'payload':_0x2e300d},..._0x1ff776?{'verification':_0x1ff776}:{},'warnings':[]};return{'ok':!![],'data':_0x59bc58,'message':_0x3218bc?_0x49a8de?_0x4d060d(0x199)+_0x18f71d['code']:_0x4d060d(0x1a9)+_0x18f71d[_0x4d060d(0x174)]:_0x4d060d(0x17b)+_0x18f71d['code']};}export const datasetBusinessGroupUpdate={'service':'dataset','command':'business-group-update','description':a59_0x8f71c9(0x171),'risk':a59_0x8f71c9(0x18e),'flags':[CODE_FLAG,{'name':a59_0x8f71c9(0x19c),'type':a59_0x8f71c9(0x19d),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it'},{'name':a59_0x8f71c9(0x19a),'type':a59_0x8f71c9(0x19d),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x19a224){validateInput(readBusinessGroupUpdateInput(_0x19a224));},async 'dryRun'(_0xc928cb){const _0x3022f4=a59_0x8f71c9,_0x15b099=await buildDatasetBusinessGroupUpdateResult({'appCode':_0xc928cb[_0x3022f4(0x185)],'input':readBusinessGroupUpdateInput(_0xc928cb),'dryRun':!![]});return{'method':_0x3022f4(0x19b),'url':BACKEND_PATH,'body':_0x15b099[_0x3022f4(0x17f)][_0x3022f4(0x17a)][_0x3022f4(0x176)],'description':_0x15b099['message'],..._0x15b099[_0x3022f4(0x17f)]};},async 'execute'(_0x2225d6){const _0x1f2406=a59_0x8f71c9;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x2225d6[_0x1f2406(0x185)],'input':readBusinessGroupUpdateInput(_0x2225d6),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0xc8d8d7){const _0x13869d=a59_0x8f71c9,_0x489428=_0xc8d8d7[_0x13869d(0x177)](_0x13869d(0x19a));return{'code':trim(_0xc8d8d7[_0x13869d(0x177)](_0x13869d(0x174))),'businessGroup':_0xc8d8d7[_0x13869d(0x177)](_0x13869d(0x19c)),'expectBusinessGroup':_0x489428===undefined||_0x489428===''?undefined:_0x489428};}function validateInput(_0x41f9e2){const _0x1c532a=a59_0x8f71c9;if(!trim(_0x41f9e2[_0x1c532a(0x174)]))throw CliErrors[_0x1c532a(0x1a8)](_0x1c532a(0x192));if(_0x41f9e2[_0x1c532a(0x193)]===undefined)throw CliErrors['validation'](_0x1c532a(0x195));}function resolveBusinessGroupDataset(_0x282495,_0x48e2bb){const _0x2cc340=a59_0x8f71c9,_0x28c43b=asPlainObject(_0x282495[_0x2cc340(0x183)]),_0x4d8366=asPlainObject(_0x282495['dbtableConfig']),_0x46f8c4=resolveSourceType(_0x282495,_0x28c43b,_0x4d8366),_0x326ec5=firstString(_0x282495[_0x2cc340(0x196)],_0x282495[_0x2cc340(0x174)],_0x28c43b[_0x2cc340(0x1a4)],_0x48e2bb)||_0x48e2bb;return{'id':firstNumber(_0x282495['modelId'],_0x282495['id'],_0x28c43b[_0x2cc340(0x16f)])??firstString(_0x282495[_0x2cc340(0x181)],_0x282495['id'],_0x28c43b['datasetId'])??null,'code':_0x326ec5,'name':firstString(_0x282495['name'],_0x28c43b['datasetName'],_0x28c43b[_0x2cc340(0x184)])||null,'sourceType':_0x46f8c4};}function resolveSourceType(_0x39a35c,_0x2f1f48,_0x337996){const _0x46544c=a59_0x8f71c9,_0x47ef94=firstString(_0x39a35c[_0x46544c(0x1ab)],_0x39a35c[_0x46544c(0x19f)],_0x2f1f48[_0x46544c(0x1ab)],_0x2f1f48[_0x46544c(0x19f)])?.[_0x46544c(0x19e)]()[_0x46544c(0x1a0)]();if(_0x47ef94===_0x46544c(0x189)||_0x47ef94===_0x46544c(0x179))return _0x47ef94;if(Object['keys'](_0x337996)['length']>0x0)return _0x46544c(0x189);throw CliErrors['validation'](_0x46544c(0x1aa));}function loadCurrentBusinessGroup(_0x3b91cc,_0x417520){const _0x39d712=a59_0x8f71c9,_0x50e8bb=readBusinessGroupFromDatasetDetail(_0x3b91cc,_0x417520[_0x39d712(0x19f)]);if(_0x50e8bb[_0x39d712(0x1a6)])return normalizeBusinessGroup(_0x50e8bb[_0x39d712(0x1a7)]);if(_0x417520[_0x39d712(0x19f)]===_0x39d712(0x179))return'';throw CliErrors[_0x39d712(0x1a8)](_0x39d712(0x1ac),_0x39d712(0x197));}function readBusinessGroupFromDatasetDetail(_0x1e5335,_0x67ced0){const _0x1561e0=a59_0x8f71c9,_0x4d3b7d=asPlainObject(_0x1e5335[_0x1561e0(0x183)]),_0x1afcb6=firstPresent(_0x1e5335[_0x1561e0(0x193)]);if(_0x1afcb6['found'])return _0x1afcb6;const _0x51f1e6=firstPresent(_0x4d3b7d[_0x1561e0(0x193)]);if(_0x51f1e6['found'])return _0x51f1e6;if(_0x67ced0===_0x1561e0(0x189))return{'found':![]};const _0x1217a6=readBusinessGroupFromExtend(_0x1e5335[_0x1561e0(0x1a2)]);if(_0x1217a6['found'])return _0x1217a6;return readBusinessGroupFromExtend(_0x4d3b7d[_0x1561e0(0x1a2)]);}function readBusinessGroupFromExtend(_0xc41681){const _0x4498d8=a59_0x8f71c9;if(_0xc41681===undefined||_0xc41681===null||_0xc41681==='')return{'found':![]};if(typeof _0xc41681==='string')try{const _0x1e9a96=JSON[_0x4498d8(0x180)](_0xc41681);return readBusinessGroupFromExtend(_0x1e9a96);}catch{return{'found':![]};}const _0x2ef743=asPlainObject(_0xc41681);if(Object[_0x4498d8(0x187)]['hasOwnProperty']['call'](_0x2ef743,_0x4498d8(0x193)))return{'found':!![],'value':_0x2ef743[_0x4498d8(0x193)]};return{'found':![]};}function firstPresent(..._0x21701d){for(const _0x5ba393 of _0x21701d){if(_0x5ba393!==undefined&&_0x5ba393!==null)return{'found':!![],'value':_0x5ba393};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4cf560,_0xe86206){const _0x49aa94=a59_0x8f71c9;if(_0xe86206===undefined)return;const _0x138257=normalizeBusinessGroup(_0xe86206);if(_0x4cf560!==_0x138257)throw CliErrors[_0x49aa94(0x1a8)](_0x49aa94(0x18b),_0x49aa94(0x18f)+JSON[_0x49aa94(0x194)](_0x138257)+_0x49aa94(0x190)+JSON['stringify'](_0x4cf560));}function buildBackendPayload(_0x375eac,_0x232577,_0x853544){const _0x2bf1d0=a59_0x8f71c9;return{'appCode':_0x375eac,'datasetCode':_0x232577[_0x2bf1d0(0x174)],'businessGroup':_0x853544};}function normalizeBusinessGroup(_0x462dc6){const _0x298a30=a59_0x8f71c9;if(_0x462dc6===undefined||_0x462dc6===null)return'';return String(_0x462dc6)[_0x298a30(0x19e)]();}function a59_0x4fd2(){const _0x2b2fc9=['modelId','update','dataset','name','appCode','4wtPFbV','prototype','1263723mkzUNt','DB_TABLE','isFinite','Expectation\x20mismatch\x20at\x20businessGroup','number','18LOAEpu','write','Expected\x20',',\x20actual\x20','14106632tbPRVf','--code\x20is\x20required','businessGroup','stringify','--business-group\x20is\x20required','modelCode','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','expectBusinessGroup','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','expect-business-group','POST','business-group','string','trim','sourceType','toUpperCase','2164682XTvhgd','extend','isArray','datasetCode','809985pboKaV','found','value','validation','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','source','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','datasetId','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Update\x20business\x20scenario\x20group','object','3560826wMszJz','code','unchanged','payload','str','298275uSwhGX','METADATA','backend','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','4509176AawPFk','/smartapi/question/er-config/business-group/edit','apiError','data','parse'];a59_0x4fd2=function(){return _0x2b2fc9;};return a59_0x4fd2();}function asPlainObject(_0x32c007){const _0xd028b0=a59_0x8f71c9;if(!_0x32c007||typeof _0x32c007!==_0xd028b0(0x172)||Array[_0xd028b0(0x1a3)](_0x32c007))return{};return _0x32c007;}function firstString(..._0x5b7032){const _0x1c415e=a59_0x8f71c9;for(const _0x347896 of _0x5b7032){if(typeof _0x347896===_0x1c415e(0x19d)&&_0x347896[_0x1c415e(0x19e)]())return _0x347896[_0x1c415e(0x19e)]();if(typeof _0x347896==='number'&&Number[_0x1c415e(0x18a)](_0x347896))return String(_0x347896);}return undefined;}function a59_0x53bf(_0x5f3f84,_0x221bf7){_0x5f3f84=_0x5f3f84-0x16f;const _0x4fd2e2=a59_0x4fd2();let _0x53bf79=_0x4fd2e2[_0x5f3f84];return _0x53bf79;}function firstNumber(..._0xbc53b5){const _0x4c17a3=a59_0x8f71c9;for(const _0x332f13 of _0xbc53b5){if(typeof _0x332f13===_0x4c17a3(0x18c)&&Number[_0x4c17a3(0x18a)](_0x332f13))return _0x332f13;if(typeof _0x332f13===_0x4c17a3(0x19d)&&_0x332f13[_0x4c17a3(0x19e)]()&&Number['isFinite'](Number(_0x332f13)))return Number(_0x332f13);}return null;}function trim(_0x442f3f){const _0x2d51ab=a59_0x8f71c9;return String(_0x442f3f||'')[_0x2d51ab(0x19e)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a60_0x4f5f(_0x44832f,_0x593ab7){_0x44832f=_0x44832f-0xb6;const _0x4ab314=a60_0x4ab3();let _0x4f5f18=_0x4ab314[_0x44832f];return _0x4f5f18;}const a60_0x39ed2f=a60_0x4f5f;(function(_0x38e850,_0x321b65){const _0x454353=a60_0x4f5f,_0x4fe3f3=_0x38e850();while(!![]){try{const _0x5bc729=parseInt(_0x454353(0xc4))/0x1*(-parseInt(_0x454353(0xb6))/0x2)+parseInt(_0x454353(0xca))/0x3+-parseInt(_0x454353(0xc2))/0x4+-parseInt(_0x454353(0xc5))/0x5*(parseInt(_0x454353(0xc6))/0x6)+-parseInt(_0x454353(0xbf))/0x7+parseInt(_0x454353(0xc7))/0x8+parseInt(_0x454353(0xc8))/0x9;if(_0x5bc729===_0x321b65)break;else _0x4fe3f3['push'](_0x4fe3f3['shift']());}catch(_0x5df224){_0x4fe3f3['push'](_0x4fe3f3['shift']());}}}(a60_0x4ab3,0x7f3f5));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a60_0x39ed2f(0xc9),'command':a60_0x39ed2f(0xcc),'description':a60_0x39ed2f(0xb8),'risk':a60_0x39ed2f(0xb9),'flags':[{'name':a60_0x39ed2f(0xba),'type':a60_0x39ed2f(0xc1),'required':!![],'description':a60_0x39ed2f(0xbe)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3852ea){const _0x3a2a4a=a60_0x39ed2f,_0x30abc9=_0x3852ea[_0x3a2a4a(0xb7)](_0x3a2a4a(0xba)),_0x3ef587=await getErBusinessGroupSummary(_0x3852ea[_0x3a2a4a(0xc0)],_0x30abc9);return{'ok':!![],'data':{..._0x3ef587,'scope':_0x3a2a4a(0xbd)},'message':_0x3a2a4a(0xbc)+_0x3ef587[_0x3a2a4a(0xc3)][_0x3a2a4a(0xbb)]+_0x3a2a4a(0xcb)+_0x30abc9};}};function a60_0x4ab3(){const _0x55022a=['3130248iENDGt','24912648hAMzBY','dataset','693645JsUfNk','\x20business\x20group(s)\x20for\x20database\x20connection\x20','business-groups','842KEjnfX','num','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','read','dbid','length','Found\x20','DB_TABLE','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','4703706KzZMBN','appCode','number','3880012UizEyV','groups','1217jJjEXc','715045AsHjBB','30NBqhDN'];a60_0x4ab3=function(){return _0x55022a;};return a60_0x4ab3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a61_0x37a9(_0x37c991,_0xc3073b){_0x37c991=_0x37c991-0x1a1;const _0x1ba4de=a61_0x1ba4();let _0x37a932=_0x1ba4de[_0x37c991];return _0x37a932;}const a61_0x2ec871=a61_0x37a9;(function(_0x4d7e1f,_0x14b21b){const _0x4b6bfd=a61_0x37a9,_0x148291=_0x4d7e1f();while(!![]){try{const _0x4ec673=-parseInt(_0x4b6bfd(0x1a3))/0x1*(parseInt(_0x4b6bfd(0x1bd))/0x2)+parseInt(_0x4b6bfd(0x1ad))/0x3*(parseInt(_0x4b6bfd(0x1c3))/0x4)+parseInt(_0x4b6bfd(0x1b1))/0x5+-parseInt(_0x4b6bfd(0x1a5))/0x6+parseInt(_0x4b6bfd(0x1a4))/0x7+-parseInt(_0x4b6bfd(0x1ac))/0x8*(parseInt(_0x4b6bfd(0x1c8))/0x9)+parseInt(_0x4b6bfd(0x1a6))/0xa*(parseInt(_0x4b6bfd(0x1c6))/0xb);if(_0x4ec673===_0x14b21b)break;else _0x148291['push'](_0x148291['shift']());}catch(_0x21e031){_0x148291['push'](_0x148291['shift']());}}}(a61_0x1ba4,0x3c6b8));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x2ec871(0x1a2),'filter':a61_0x2ec871(0x1c1),'getOne':a61_0x2ec871(0x1a7)};export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x10670f){const _0x1d09e0=a61_0x2ec871;return _0x10670f==null?'':String(_0x10670f)[_0x1d09e0(0x1b0)]();}function a61_0x1ba4(){const _0x2fade7=['650130woqAsO','331060FSUIBC','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','dataset','\x20类型,没有可用于\x20','\x20是\x20','validation','810928molwTW','111357yTvOdI','source','datasetName','trim','113200setiew','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','dbId','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','getOne','SQL\x20schema\x20validation','UNKNOWN','length','code','filter','object','join','43918LrLNNb','dbtable','toUpperCase','modelCode','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','\x20的\x20DB_TABLE\x20数据源上下文。','44paWGPo','tableName','sourceType','242dEGAuF','name','36DzyytL','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','lovrabet','21GGIkbX','442099QvtaMg'];a61_0x1ba4=function(){return _0x2fade7;};return a61_0x1ba4();}function getDatasetCode(_0x5ad5d4){const _0x47eac0=a61_0x2ec871;return valueToString(_0x5ad5d4[_0x47eac0(0x1b9)]??_0x5ad5d4[_0x47eac0(0x1c0)]??_0x5ad5d4[_0x47eac0(0x1a8)]?.['datasetCode']);}function getDatasetName(_0x334dce){const _0x40dfd3=a61_0x2ec871;return valueToString(_0x334dce[_0x40dfd3(0x1c7)]??_0x334dce[_0x40dfd3(0x1a8)]?.[_0x40dfd3(0x1af)])||'unknown';}function getDatasetSource(_0x3ccc05){const _0xa7781b=a61_0x2ec871;return valueToString(_0x3ccc05[_0xa7781b(0x1ae)]??_0x3ccc05[_0xa7781b(0x1a8)]?.[_0xa7781b(0x1c5)])[_0xa7781b(0x1bf)]();}function getDbtableConfig(_0x406e47){const _0x4d51b1=a61_0x2ec871,_0x4d9de6=_0x406e47['dbtableConfig']??_0x406e47[_0x4d51b1(0x1be)];return _0x4d9de6&&typeof _0x4d9de6===_0x4d51b1(0x1bb)?_0x4d9de6:{};}export function isDbTableBackedDataset(_0x84084){const _0x511798=a61_0x2ec871,_0x5c4772=getDatasetSource(_0x84084);if(_0x5c4772==='METADATA')return![];const _0x4c51ab=getDbtableConfig(_0x84084),_0x5393f9=_0x4c51ab[_0x511798(0x1b3)]??_0x4c51ab['id'],_0x28a2b1=valueToString(_0x4c51ab[_0x511798(0x1c4)]??_0x84084[_0x511798(0x1c4)]??_0x84084[_0x511798(0x1a8)]?.[_0x511798(0x1c4)]);return _0x5393f9!==undefined&&_0x5393f9!==null&&_0x28a2b1[_0x511798(0x1b8)]>0x0;}export function filterDbTableBackedDatasets(_0x51a576){return _0x51a576['filter'](_0x5f0102=>isDbTableBackedDataset(_0x5f0102));}export function buildDbTableBackedRequirementMessage(_0x30d8dd,_0x6c077d=a61_0x2ec871(0x1b6)){const _0x5c8ffd=a61_0x2ec871,_0x13fb02=getDatasetSource(_0x30d8dd)||_0x5c8ffd(0x1b7),_0x11be69=getDatasetName(_0x30d8dd),_0x444d08=getDatasetCode(_0x30d8dd),_0x2e0bd5=_0x444d08?'\x20('+_0x444d08+')':'';return['当前数据集\x20\x22'+_0x11be69+'\x22'+_0x2e0bd5+_0x5c8ffd(0x1aa)+_0x13fb02+_0x5c8ffd(0x1a9)+_0x6c077d+_0x5c8ffd(0x1c2),_0x5c8ffd(0x1b4),_0x5c8ffd(0x1b2),_0x5c8ffd(0x1a1)+RUNTIME_DATA_ACCESS_COMMANDS[_0x5c8ffd(0x1ba)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x5c8ffd(0x1b5)]+'。'][_0x5c8ffd(0x1bc)]('\x20');}export function assertDatasetIsDbTableBacked(_0x578eb6,_0x574704){const _0x353247=a61_0x2ec871;if(!isDbTableBackedDataset(_0x578eb6))throw CliErrors[_0x353247(0x1ab)](buildDbTableBackedRequirementMessage(_0x578eb6,_0x574704));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x28e302=a62_0x4479;(function(_0x8ca20,_0x3da8fc){const _0x4a6c65=a62_0x4479,_0x198510=_0x8ca20();while(!![]){try{const _0x527a98=parseInt(_0x4a6c65(0x95))/0x1+-parseInt(_0x4a6c65(0xc5))/0x2+-parseInt(_0x4a6c65(0x92))/0x3*(-parseInt(_0x4a6c65(0xb2))/0x4)+-parseInt(_0x4a6c65(0xc0))/0x5*(parseInt(_0x4a6c65(0xc3))/0x6)+parseInt(_0x4a6c65(0xa5))/0x7+-parseInt(_0x4a6c65(0xb5))/0x8*(parseInt(_0x4a6c65(0x97))/0x9)+-parseInt(_0x4a6c65(0xae))/0xa;if(_0x527a98===_0x3da8fc)break;else _0x198510['push'](_0x198510['shift']());}catch(_0x48db1d){_0x198510['push'](_0x198510['shift']());}}}(a62_0x498d,0x6b065));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';function a62_0x4479(_0x35ea90,_0x468e3c){_0x35ea90=_0x35ea90-0x91;const _0x498d01=a62_0x498d();let _0x447925=_0x498d01[_0x35ea90];return _0x447925;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a62_0x28e302(0xc4),'description':a62_0x28e302(0xc1)},DBID_FLAG={'name':a62_0x28e302(0x94),'type':'number','description':a62_0x28e302(0xb0)},CONFIRM_FLAG={'name':a62_0x28e302(0xa8),'type':a62_0x28e302(0xb3),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},CASCADE_FLAG={'name':'cascade','type':a62_0x28e302(0xb3),'description':'Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm'},EXPECTED_COUNT_FLAG={'name':a62_0x28e302(0xc9),'type':a62_0x28e302(0xc4),'description':a62_0x28e302(0x96)};export const datasetDelete={'service':'dataset','command':a62_0x28e302(0x9e),'description':a62_0x28e302(0xa4),'risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x12c4d5){const _0x3f8c67=a62_0x28e302,_0x29560f=_0x12c4d5[_0x3f8c67(0x9d)]('id'),_0x27b7ad=_0x12c4d5[_0x3f8c67(0xbf)]('code'),_0x3c2d7f=_0x12c4d5[_0x3f8c67(0x9d)](_0x3f8c67(0x94)),_0xd8ab9a=[_0x29560f>0x0,Boolean(_0x27b7ad),_0x3c2d7f>0x0]['filter'](Boolean);if(_0xd8ab9a[_0x3f8c67(0xba)]===0x0)throw CliErrors[_0x3f8c67(0xc8)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0xd8ab9a['length']>0x1)throw CliErrors['validation'](_0x3f8c67(0xa2));},async 'dryRun'(_0x3c3245){const _0x24106d=a62_0x28e302,_0x2b68fb=await resolveTargets(_0x3c3245),_0x47dca7=_0x3c3245[_0x24106d(0xca)](_0x24106d(0x93));return{'method':_0x24106d(0xab),'url':'/smartapi/dataset/delete?cascade='+(_0x47dca7?'true':'false'),'body':{'count':_0x2b68fb[_0x24106d(0xba)],'cascade':_0x47dca7,'datasets':_0x2b68fb},'description':_0x47dca7?'Would\x20delete\x20'+_0x2b68fb[_0x24106d(0xba)]+_0x24106d(0xad):'Would\x20safely\x20delete\x20'+_0x2b68fb[_0x24106d(0xba)]+_0x24106d(0x9a)};},async 'execute'(_0x126e2a){const _0xdf5f37=a62_0x28e302;if(!_0x126e2a['bool'](_0xdf5f37(0xa8)))throw CliErrors[_0xdf5f37(0xc8)](_0xdf5f37(0xbd),_0xdf5f37(0xb1));const _0x2fd045=await resolveTargets(_0x126e2a),_0x21a1af=_0x126e2a[_0xdf5f37(0xca)](_0xdf5f37(0x93)),_0x14cd2f=[],_0x19446c=[];for(const _0x14337f of _0x2fd045){try{await deleteDataset(_0x14337f['id'],_0x21a1af),_0x14cd2f[_0xdf5f37(0xc2)](_0x14337f);}catch(_0x5d1a64){_0x19446c['push']({..._0x14337f,'error':_0x5d1a64 instanceof Error?_0x5d1a64[_0xdf5f37(0xb7)]:String(_0x5d1a64)});}}if(_0x19446c[_0xdf5f37(0xba)]>0x0){const _0x3efb72=buildPageRestoreCommands(_0x126e2a[_0xdf5f37(0x99)],_0x21a1af?_0x14cd2f:[]);return{'ok':![],'data':{'requested':_0x2fd045[_0xdf5f37(0xba)],'cascade':_0x21a1af,'deletedCount':_0x14cd2f['length'],'failedCount':_0x19446c[_0xdf5f37(0xba)],'deleted':_0x14cd2f,'failed':_0x19446c,'pageRestoreCommands':_0x3efb72},'message':'Deleted\x20'+_0x14cd2f['length']+'/'+_0x2fd045['length']+'\x20dataset(s);\x20'+_0x19446c[_0xdf5f37(0xba)]+_0xdf5f37(0xbc)};}return{'ok':!![],'data':{'requested':_0x2fd045[_0xdf5f37(0xba)],'cascade':_0x21a1af,'deletedCount':_0x14cd2f[_0xdf5f37(0xba)],'deleted':_0x14cd2f,'pageRestoreCommands':buildPageRestoreCommands(_0x126e2a[_0xdf5f37(0x99)],_0x21a1af?_0x14cd2f:[])},'message':_0xdf5f37(0xbb)+_0x14cd2f[_0xdf5f37(0xba)]+_0xdf5f37(0xb8)};}};function a62_0x498d(){const _0x3d9dbf=['map','12kLkrAk','cascade','dbid','225370pcCyTx','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','4788eHdVZZ','code','appCode','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','add','deleted','num','delete','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','relatedPages','name','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','Matched\x20','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','3534321ygboBj','dbtableConfig','dbId','confirm','title','source','POST','isArray','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','6221710enUUiU','No\x20undeleted\x20dataset\x20found\x20for\x20','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','811268pJJHAx','boolean','object','3632OEPdNx','id=','message','\x20dataset(s)','filter','length','Deleted\x20','\x20failed','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','type','str','685OyztlB','Dataset\x20id','push','7098kQAVng','number','154796bklezL','dbid=','description','validation','expected-count','bool'];a62_0x498d=function(){return _0x3d9dbf;};return a62_0x498d();}async function resolveTargets(_0x69182d){const _0x3b33bf=a62_0x28e302,_0x502fe3=_0x69182d[_0x3b33bf(0x9d)]('id'),_0x2b4176=_0x69182d[_0x3b33bf(0xbf)](_0x3b33bf(0x98)),_0x26fd1f=_0x69182d['num']('dbid');let _0x542177;_0x2b4176?(_0x542177=await listDatasets(_0x69182d[_0x3b33bf(0x99)],{'code':_0x2b4176}),_0x542177=_0x542177[_0x3b33bf(0xb9)](_0x3a5db3=>_0x3a5db3[_0x3b33bf(0x98)]===_0x2b4176)):(_0x542177=await listDatasets(_0x69182d[_0x3b33bf(0x99)]),_0x502fe3>0x0&&(_0x542177=_0x542177['filter'](_0x1465c9=>_0x1465c9['id']===_0x502fe3)),_0x26fd1f>0x0&&(_0x542177=_0x542177[_0x3b33bf(0xb9)](_0x219dd4=>_0x219dd4[_0x3b33bf(0xa6)]?.[_0x3b33bf(0xa7)]===_0x26fd1f)));const _0x112a73=[];for(const _0x31c135 of _0x542177){const _0x1e6f14=await getDatasetDetail(_0x31c135[_0x3b33bf(0x98)]),_0x28142c=Array[_0x3b33bf(0xac)](_0x1e6f14['relatedPageInfoList'])?_0x1e6f14['relatedPageInfoList'][_0x3b33bf(0xb9)](_0x3b2eea=>_0x3b2eea!=null&&typeof _0x3b2eea==='object'&&_0x3b2eea[_0x3b33bf(0x9c)]!==!![]):[];_0x112a73[_0x3b33bf(0xc2)](normalizeTarget(_0x31c135,_0x28142c));}if(_0x112a73[_0x3b33bf(0xba)]===0x0){const _0x2ae833=_0x2b4176||(_0x502fe3>0x0?_0x3b33bf(0xb6)+_0x502fe3:_0x3b33bf(0xc6)+_0x26fd1f);throw CliErrors[_0x3b33bf(0xc8)](_0x3b33bf(0xaf)+_0x2ae833+'.');}const _0x2fe970=_0x69182d[_0x3b33bf(0x9d)](_0x3b33bf(0xc9));if(_0x2fe970>0x0&&_0x112a73[_0x3b33bf(0xba)]!==_0x2fe970)throw CliErrors[_0x3b33bf(0xc8)](_0x3b33bf(0xa3)+_0x112a73[_0x3b33bf(0xba)]+_0x3b33bf(0x9f)+_0x2fe970+'.');return _0x112a73;}function normalizeTarget(_0x560ff8,_0x130351){const _0x4050b0=a62_0x28e302,_0x3c9b2f=_0x560ff8[_0x4050b0(0xa6)]??{},_0x1f6f6c=_0x130351[_0x4050b0(0x91)](_0x1705df=>{const _0x4d5287=_0x4050b0;if(_0x1705df==null||typeof _0x1705df!==_0x4d5287(0xb4))return null;const _0x17616c=_0x1705df,_0x4ee116=Number(_0x17616c['id']);if(!Number['isInteger'](_0x4ee116)||_0x4ee116<=0x0)return null;const _0x419788=_0x17616c[_0x4d5287(0xa9)]??_0x17616c['name'];return{'id':_0x4ee116,..._0x419788?{'name':String(_0x419788)}:{},..._0x17616c[_0x4d5287(0xbe)]?{'type':String(_0x17616c[_0x4d5287(0xbe)])}:{}};})[_0x4050b0(0xb9)](_0x11ddfe=>_0x11ddfe!==null);return{'id':_0x560ff8['id'],'code':_0x560ff8[_0x4050b0(0x98)],'name':_0x560ff8[_0x4050b0(0xa1)],'description':_0x560ff8[_0x4050b0(0xc7)],'source':_0x560ff8[_0x4050b0(0xaa)],'dbId':_0x3c9b2f[_0x4050b0(0xa7)],'dbName':_0x3c9b2f['dbName'],'tableName':_0x3c9b2f['tableName'],'relatedPageCount':_0x1f6f6c[_0x4050b0(0xba)],'relatedPages':_0x1f6f6c};}function buildPageRestoreCommands(_0x2fe4a9,_0x49b28f){const _0x1425f3=a62_0x28e302,_0x414378=new Set();for(const _0x598a55 of _0x49b28f){for(const _0x4cfcc6 of _0x598a55[_0x1425f3(0xa0)])_0x414378[_0x1425f3(0x9b)](_0x4cfcc6['id']);}return[..._0x414378][_0x1425f3(0x91)](_0x3241d0=>'rabetbase\x20page\x20restore\x20--id\x20'+_0x3241d0+'\x20--appcode\x20'+_0x2fe4a9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a63_0x4e16(_0x24309f,_0x245c8e){_0x24309f=_0x24309f-0xe3;const _0x5df742=a63_0x5df7();let _0x4e1682=_0x5df742[_0x24309f];return _0x4e1682;}const a63_0x1f49e3=a63_0x4e16;(function(_0x2c804d,_0x4e97f7){const _0x11aae9=a63_0x4e16,_0x3c681f=_0x2c804d();while(!![]){try{const _0x1f8b0f=-parseInt(_0x11aae9(0xf7))/0x1*(parseInt(_0x11aae9(0x11c))/0x2)+-parseInt(_0x11aae9(0x100))/0x3+parseInt(_0x11aae9(0x106))/0x4+parseInt(_0x11aae9(0x10b))/0x5+parseInt(_0x11aae9(0x114))/0x6*(-parseInt(_0x11aae9(0x11d))/0x7)+-parseInt(_0x11aae9(0xf8))/0x8*(parseInt(_0x11aae9(0xe6))/0x9)+parseInt(_0x11aae9(0x12b))/0xa*(parseInt(_0x11aae9(0x10e))/0xb);if(_0x1f8b0f===_0x4e97f7)break;else _0x3c681f['push'](_0x3c681f['shift']());}catch(_0x345665){_0x3c681f['push'](_0x3c681f['shift']());}}}(a63_0x5df7,0x6f75b));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x5e9c3b){const _0x1888df=a63_0x4e16;if(_0x5e9c3b[_0x1888df(0x103)])return null;const _0x16e8ea=Boolean(_0x5e9c3b[_0x1888df(0xe8)]!==undefined||_0x5e9c3b[_0x1888df(0xf0)]!==undefined);let _0x21fa81={};if(!_0x16e8ea&&typeof _0x5e9c3b[_0x1888df(0x112)]===_0x1888df(0x12c))try{_0x21fa81=JSON[_0x1888df(0xf2)](_0x5e9c3b[_0x1888df(0x112)]);}catch{}const _0x56cc92=_0x16e8ea?_0x5e9c3b[_0x1888df(0x128)]:_0x5e9c3b[_0x1888df(0x113)],_0x28f604=_0x16e8ea?_0x5e9c3b['displayName']:_0x5e9c3b[_0x1888df(0x128)],_0x3ad537=_0x16e8ea?_0x5e9c3b[_0x1888df(0xf0)]:_0x5e9c3b['type']||_0x5e9c3b['dataType'],_0x36e586=_0x16e8ea?_0x5e9c3b['pkField']===!![]:_0x21fa81['pkField']===!![],_0x5c1e88=_0x16e8ea?_0x5e9c3b[_0x1888df(0x12f)]===!![]:_0x21fa81[_0x1888df(0x12f)]===!![],_0x32ff9f=_0x16e8ea?_0x5e9c3b[_0x1888df(0x11f)]??null:_0x21fa81[_0x1888df(0x11f)]??null,_0x19be9a={'name':_0x56cc92,'displayName':_0x28f604||_0x56cc92,'type':_0x3ad537,'dbType':_0x5e9c3b[_0x1888df(0xed)],'pk':_0x36e586,'required':_0x5c1e88,'deprecated':_0x5e9c3b[_0x1888df(0x12e)]===!![],'description':_0x5e9c3b[_0x1888df(0x108)]||undefined};return Array[_0x1888df(0x10a)](_0x32ff9f)&&_0x32ff9f['length']>0x0&&(_0x19be9a[_0x1888df(0x11f)]=_0x32ff9f),_0x19be9a;}function parseJsonMaybe(_0x1e9605){const _0x2757c5=a63_0x4e16;if(typeof _0x1e9605!==_0x2757c5(0x12c))return _0x1e9605;try{return JSON['parse'](_0x1e9605);}catch{return _0x1e9605;}}function normalizeOperationEntry(_0xe0dec4,_0x5b2dd2){const _0x4624e0=a63_0x4e16;if(!_0x5b2dd2||typeof _0x5b2dd2!==_0x4624e0(0x131))return null;if(!_0x5b2dd2[_0x4624e0(0x120)]||!_0x5b2dd2[_0x4624e0(0xfe)])return null;const _0xcc0dc5={'name':_0xe0dec4,'method':_0x5b2dd2['method'],'path':_0x5b2dd2[_0x4624e0(0xfe)]};if(_0x5b2dd2['host'])_0xcc0dc5[_0x4624e0(0x11b)]=_0x5b2dd2[_0x4624e0(0x11b)];if(_0x5b2dd2[_0x4624e0(0xfa)]!=null){const _0x32f561=parseJsonMaybe(_0x5b2dd2[_0x4624e0(0xfa)]);_0xcc0dc5[_0x4624e0(0xfa)]=_0x32f561;}if(_0x5b2dd2[_0x4624e0(0xf6)]!=null){const _0x56fa10=parseJsonMaybe(_0x5b2dd2[_0x4624e0(0xf6)]);_0xcc0dc5[_0x4624e0(0xf6)]=_0x56fa10;}if(_0x5b2dd2[_0x4624e0(0xf5)]!=null)_0xcc0dc5[_0x4624e0(0xf5)]=_0x5b2dd2[_0x4624e0(0xf5)];if(_0x5b2dd2[_0x4624e0(0x109)]!=null)_0xcc0dc5[_0x4624e0(0x109)]=_0x5b2dd2[_0x4624e0(0x109)];if(Array[_0x4624e0(0x10a)](_0x5b2dd2[_0x4624e0(0x105)]))_0xcc0dc5[_0x4624e0(0x105)]=_0x5b2dd2[_0x4624e0(0x105)];if(Array['isArray'](_0x5b2dd2['responseFields']))_0xcc0dc5[_0x4624e0(0x11a)]=_0x5b2dd2[_0x4624e0(0x11a)];return _0xcc0dc5;}function summarizeDbtable(_0x44de03){const _0x487975=a63_0x4e16,_0x35f607={},_0x115135=[_0x487975(0x124),_0x487975(0x119),'tableName',_0x487975(0xef),'pkField','allFields','logicField','createTimeField','updateTimeField',_0x487975(0xfd),_0x487975(0xee),_0x487975(0x123),_0x487975(0xeb),_0x487975(0x125),_0x487975(0x130)];for(const _0x5a94c1 of _0x115135){if(_0x44de03[_0x5a94c1]!==undefined)_0x35f607[_0x5a94c1]=_0x44de03[_0x5a94c1];}return typeof _0x35f607['allFields']===_0x487975(0x12c)&&_0x35f607[_0x487975(0x122)][_0x487975(0x111)]>0x0&&(_0x35f607['allFieldNames']=_0x35f607[_0x487975(0x122)][_0x487975(0x11e)](',')[_0x487975(0x118)](_0x113d78=>_0x113d78[_0x487975(0xf9)]())[_0x487975(0xe4)](Boolean)),_0x35f607;}function a63_0x5df7(){const _0x4cfac1=['91725fRHLBH','8LggXce','trim','requestBody','pkField','properties','creatorIdField','path','source','1504722AncrWR','relationId','dbtableConfig','deleted','bizRelationType','requestFields','3464112oxYIYI','fromField','description','afterScriptId','isArray','3462470geUeqv','toField','relations','4165975IObPud','modelCode','cardinality','length','extend','code','1738626gVnKDg','tableComment','alias','read','map','dbName','responseFields','host','10mZFHuP','14XJwtWv','split','options','method','toDatasetName','allFields','modifierIdField','dbId','labelField','columnCodeListWithDeleted','main_sub','name','tableName','formatRules','30wwKiIJ','string','modelId','deprecated','required','dblinkInfoDTO','object','sourceType','filter','relatedPageInfoList','6285753kgKNjm','operations','displayName','toTableName','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','modifierNameField','fields','dbType','creatorNameField','datasetKey','doType','title','parse','detail','entries','beforeScriptId','responseBody'];a63_0x5df7=function(){return _0x4cfac1;};return a63_0x5df7();}function normalizeRelatedPages(_0x5041be){const _0x468012=a63_0x4e16;if(!Array['isArray'](_0x5041be))return[];return _0x5041be['filter'](_0x2f0f89=>_0x2f0f89&&typeof _0x2f0f89==='object')['map'](_0x49b894=>({'id':_0x49b894['id'],'type':_0x49b894['type'],'code':_0x49b894[_0x468012(0x113)],'title':_0x49b894[_0x468012(0xf1)],'deleted':_0x49b894[_0x468012(0x103)]===!![]}));}export const datasetDetail={'service':'dataset','command':a63_0x1f49e3(0xf3),'description':a63_0x1f49e3(0xea),'risk':a63_0x1f49e3(0x117),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x1f49e3(0x116),'type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x5d7232){const _0xc7f25d=a63_0x1f49e3,_0x26b082=await getDatasetDetail(_0x5d7232['str']('code')),_0x38faab=Array[_0xc7f25d(0x10a)](_0x26b082[_0xc7f25d(0xec)])?_0x26b082[_0xc7f25d(0xec)]:Array[_0xc7f25d(0x10a)](_0x26b082[_0xc7f25d(0xfc)])?_0x26b082[_0xc7f25d(0xfc)]:[],_0x4862fb=_0x38faab[_0xc7f25d(0x118)](_0x1c315a=>normalizeField(_0x1c315a))['filter'](_0x131ba7=>_0x131ba7!==null),_0x1232a9=_0x26b082[_0xc7f25d(0xe7)]??{},_0x46a27e=[];for(const [_0x39f4d9,_0x49019b]of Object[_0xc7f25d(0xf4)](_0x1232a9)){const _0x4738a2=normalizeOperationEntry(_0x39f4d9,_0x49019b);if(_0x4738a2)_0x46a27e['push'](_0x4738a2);}const _0x2c5afa=_0x26b082[_0xc7f25d(0x102)]??{},_0x22978c=_0x26b082['dataset']??{},_0x3959b8=_0x2c5afa[_0xc7f25d(0x124)]!=null?{'id':_0x2c5afa[_0xc7f25d(0x124)],'name':_0x2c5afa['dbName']??null}:undefined;let _0x5e1e37;return typeof _0x26b082['extend']===_0xc7f25d(0x12c)&&(_0x5e1e37=parseJsonMaybe(_0x26b082[_0xc7f25d(0x112)])),{'ok':!![],'data':{'id':_0x26b082[_0xc7f25d(0x12d)]??_0x26b082['id'],'name':_0x26b082[_0xc7f25d(0x128)],'code':_0x26b082[_0xc7f25d(0x10f)]||_0x26b082[_0xc7f25d(0x113)],'doVersion':_0x26b082['doVersion'],'description':_0x26b082[_0xc7f25d(0x108)]||_0x22978c[_0xc7f25d(0x115)]||undefined,'source':_0x26b082[_0xc7f25d(0xff)]||_0x22978c[_0xc7f25d(0xe3)],'table':_0x2c5afa[_0xc7f25d(0x129)]||_0x22978c[_0xc7f25d(0x129)],'datasetKey':_0x2c5afa['datasetKey'],'pk':_0x2c5afa[_0xc7f25d(0xfb)],'db':_0x3959b8,'dbtable':summarizeDbtable(_0x2c5afa),'fields':_0x4862fb,'operations':_0x46a27e,'indexes':Array[_0xc7f25d(0x10a)](_0x22978c['indexes'])?_0x22978c['indexes']:[],'relations':Array['isArray'](_0x26b082['relations'])?_0x26b082[_0xc7f25d(0x10d)][_0xc7f25d(0x118)](_0x4704ac=>({..._0x4704ac[_0xc7f25d(0x101)]!=null?{'relationId':_0x4704ac['relationId']}:{},'fromDataset':_0x26b082[_0xc7f25d(0x128)],'fromCode':_0x26b082['modelCode']||_0x26b082[_0xc7f25d(0x113)],'fromTable':_0x2c5afa[_0xc7f25d(0x129)]||_0x22978c[_0xc7f25d(0x129)],'fromField':_0x4704ac[_0xc7f25d(0x107)],'toDataset':_0x4704ac[_0xc7f25d(0x121)],'toCode':_0x4704ac['toDatasetCode'],'toTable':_0x4704ac[_0xc7f25d(0xe9)],'toField':_0x4704ac[_0xc7f25d(0x10c)],'labelField':_0x4704ac['toFieldLabel']||undefined,'cardinality':_0x4704ac[_0xc7f25d(0x110)]||undefined,'bizRelationType':_0x4704ac[_0xc7f25d(0x104)]===_0xc7f25d(0x127)?_0xc7f25d(0x127):null})):[],'relatedPages':normalizeRelatedPages(_0x26b082[_0xc7f25d(0xe5)]),...Array[_0xc7f25d(0x10a)](_0x26b082[_0xc7f25d(0x126)])?{'columnCodeListWithDeleted':_0x26b082[_0xc7f25d(0x126)]}:{},'formatRules':Array[_0xc7f25d(0x10a)](_0x26b082[_0xc7f25d(0x12a)])?_0x26b082[_0xc7f25d(0x12a)]:[],'validateRules':Array['isArray'](_0x26b082['validateRules'])?_0x26b082['validateRules']:[],..._0x5e1e37!==undefined?{'extend':_0x5e1e37}:{},'stats':{'fieldCount':_0x4862fb['length'],'operationCount':_0x46a27e[_0xc7f25d(0x111)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x3d481f=a64_0x5822;(function(_0x5c2ac9,_0x152b1c){const _0x1ccc03=a64_0x5822,_0x52ffc3=_0x5c2ac9();while(!![]){try{const _0x1f57f3=parseInt(_0x1ccc03(0xab))/0x1+-parseInt(_0x1ccc03(0xb2))/0x2+parseInt(_0x1ccc03(0xad))/0x3*(-parseInt(_0x1ccc03(0x8f))/0x4)+-parseInt(_0x1ccc03(0x90))/0x5+-parseInt(_0x1ccc03(0xb1))/0x6+-parseInt(_0x1ccc03(0x89))/0x7*(parseInt(_0x1ccc03(0x88))/0x8)+parseInt(_0x1ccc03(0xb9))/0x9;if(_0x1f57f3===_0x152b1c)break;else _0x52ffc3['push'](_0x52ffc3['shift']());}catch(_0x22d92d){_0x52ffc3['push'](_0x52ffc3['shift']());}}}(a64_0x5849,0x9f4fb));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a64_0x5849(){const _0x166c29=['Expectation\x20mismatch\x20at\x20extend.','Patch\x20dataset\x20top-level\x20extend\x20safely','dataset','expect-json','patch-json','join','shape','object','3698456KUdlhH','14lfRwWB','stringify','dbName','patch','POST','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','836IuWvrV','5392670XhjwkN','message','--patch-json','hint','tableName','str','dbId','parse','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','length','value','--expect-json','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','extend.','validation','Allowed\x20keys:\x20','--code\x20is\x20required','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','dbtableConfig','\x20must\x20be\x20a\x20JSON\x20object','isArray','write','sort','name','appCode','Expected\x20','No\x20changes\x20for\x20dataset\x20extend','979918GwufHg','code','7263ggfRJL','entries','push','string','5917116AHgNhv','1225548zdnkZr','has','expect','keys','extend','Unsupported\x20patch\x20key:\x20',',\x20actual\x20','34026462MKloxO','extend-update','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','trim','get','Dry-run:\x20dataset\x20extend\x20would\x20change\x20('];a64_0x5849=function(){return _0x166c29;};return a64_0x5849();}import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([['businessGroup',{'message':a64_0x3d481f(0x8e),'hint':a64_0x3d481f(0x98)}]]);export function parseJsonObjectFlag(_0x428f9f,_0x34907f){const _0x31ad3e=a64_0x3d481f;if(!_0x428f9f)return undefined;let _0x3eff92;try{_0x3eff92=JSON['parse'](_0x428f9f);}catch(_0x3f3930){const _0xc410aa=_0x3f3930 instanceof Error?_0x3f3930[_0x31ad3e(0x91)]:String(_0x3f3930);throw CliErrors[_0x31ad3e(0x9e)](_0x34907f+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0xc410aa);}if(!isPlainObject(_0x3eff92)||Array['isArray'](_0x3eff92))throw CliErrors[_0x31ad3e(0x9e)](_0x34907f+_0x31ad3e(0xa3));return _0x3eff92;}export function validateExtendPatchKeys(_0x5d6750){const _0x387b19=a64_0x3d481f,_0x193c10=Object[_0x387b19(0xb5)](_0x5d6750);if(_0x193c10[_0x387b19(0x99)]===0x0)throw CliErrors[_0x387b19(0x9e)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x398171 of _0x193c10){const _0x119400=EXTEND_PATCH_REDIRECTS[_0x387b19(0x7e)](_0x398171);if(_0x119400)throw CliErrors[_0x387b19(0x9e)](_0x119400[_0x387b19(0x91)],_0x119400[_0x387b19(0x93)]);if(!MUTABLE_EXTEND_KEYS[_0x387b19(0xb3)](_0x398171))throw CliErrors['validation'](_0x387b19(0xb7)+_0x398171,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x2b4a20=a64_0x3d481f,_0x4dd7cc=Array['from'](MUTABLE_EXTEND_KEYS)[_0x2b4a20(0xa6)]();return _0x4dd7cc['length']>0x0?_0x2b4a20(0x9f)+_0x4dd7cc['join'](',\x20'):_0x2b4a20(0xa1);}export function applyExtendPatch(_0x5a19c8,_0x582735){const _0xfca6b7=a64_0x3d481f;validateExtendPatchKeys(_0x582735);const _0x19751b=deepClone(_0x5a19c8),_0x51e848=[];for(const [_0x437eed,_0x18bf55]of Object[_0xfca6b7(0xae)](_0x582735)){const _0x5f2c46=_0x19751b[_0x437eed],_0x2397a1=deepClone(_0x18bf55);!deepEqual(_0x5f2c46,_0x2397a1)&&(_0x19751b[_0x437eed]=_0x2397a1,_0x51e848[_0xfca6b7(0xaf)](_0xfca6b7(0x9d)+_0x437eed));}return _0x51e848[_0xfca6b7(0xa6)](),{'after':_0x19751b,'changedPaths':_0x51e848,'changed':_0x51e848[_0xfca6b7(0x99)]>0x0};}export function assertExpectation(_0x272d43,_0x971b5a){const _0x5e8438=a64_0x3d481f;if(!_0x971b5a)return;for(const [_0x286117,_0x5e42b4]of Object[_0x5e8438(0xae)](_0x971b5a)){const _0x252a41=_0x272d43[_0x286117];if(!deepEqual(_0x252a41,_0x5e42b4))throw CliErrors['validation'](_0x5e8438(0x80)+_0x286117,_0x5e8438(0xa9)+JSON[_0x5e8438(0x8a)](_0x5e42b4)+_0x5e8438(0xb8)+JSON[_0x5e8438(0x8a)](_0x252a41));}}export async function buildDatasetExtendUpdateResult({appCode:_0x17ccfb,input:_0x2f623d,dryRun:_0x5668bd}){const _0x1e0877=a64_0x3d481f;validateInput(_0x2f623d);const _0x4a9ec7=await getDatasetDetail(_0x2f623d[_0x1e0877(0xac)]),_0x591649=parseDatasetExtend(_0x4a9ec7[_0x1e0877(0xb6)]),_0x36ccac=deepClone(_0x591649[_0x1e0877(0x9a)]);assertExpectation(_0x36ccac,_0x2f623d[_0x1e0877(0xb4)]);const {after:_0x53650a,changedPaths:_0x39f3ee,changed:_0x18a093}=applyExtendPatch(_0x36ccac,_0x2f623d[_0x1e0877(0x8c)]),_0x4e79f8=summarizeDataset(_0x4a9ec7,_0x2f623d[_0x1e0877(0xac)]);return _0x18a093&&!_0x5668bd&&(_0x4a9ec7[_0x1e0877(0xb6)]=serializeDatasetExtend(_0x53650a,_0x591649[_0x1e0877(0x86)]),await updateDrivenData(_0x4a9ec7)),{'ok':!![],'data':{'appCode':_0x17ccfb,'selector':{'code':_0x2f623d['code']},'dataset':_0x4e79f8,'dryRun':_0x5668bd,'changed':_0x18a093,'changedPaths':_0x39f3ee,'before':{'extend':_0x36ccac},'after':{'extend':_0x53650a},'submitted':_0x18a093&&!_0x5668bd},'message':_0x18a093?_0x5668bd?_0x1e0877(0x7f)+_0x39f3ee[_0x1e0877(0x85)](',\x20')+')':'Updated\x20dataset\x20extend\x20('+_0x39f3ee['join'](',\x20')+')':_0x1e0877(0xaa)};}export const datasetExtendUpdate={'service':a64_0x3d481f(0x82),'command':a64_0x3d481f(0xba),'description':a64_0x3d481f(0x81),'risk':a64_0x3d481f(0xa5),'flags':[CODE_FLAG,{'name':a64_0x3d481f(0x84),'type':'string','required':!![],'description':a64_0x3d481f(0xbb)},{'name':a64_0x3d481f(0x83),'type':a64_0x3d481f(0xb0),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4bdbb3){validateInput(readExtendUpdateInput(_0x4bdbb3));},async 'dryRun'(_0x399b38){const _0x13982b=a64_0x3d481f,_0x166c92=await buildDatasetExtendUpdateResult({'appCode':_0x399b38['appCode'],'input':readExtendUpdateInput(_0x399b38),'dryRun':!![]});return{'method':_0x13982b(0x8d),'url':'/smartapi/dataset/update-driven-data','body':_0x166c92['data'],'description':_0x166c92['message']};},async 'execute'(_0x1068a3){const _0x3e4a41=a64_0x3d481f;return buildDatasetExtendUpdateResult({'appCode':_0x1068a3[_0x3e4a41(0xa8)],'input':readExtendUpdateInput(_0x1068a3),'dryRun':![]});}};function readExtendUpdateInput(_0x2c39e5){const _0x1ba747=a64_0x3d481f,_0x38a008=trim(_0x2c39e5[_0x1ba747(0x95)]('code')),_0x563245=parseJsonObjectFlag(_0x2c39e5[_0x1ba747(0x95)](_0x1ba747(0x84)),_0x1ba747(0x92)),_0x1524e2=parseJsonObjectFlag(_0x2c39e5[_0x1ba747(0x95)](_0x1ba747(0x83)),_0x1ba747(0x9b));return{'code':_0x38a008,'patch':_0x563245||{},'expect':_0x1524e2};}function validateInput(_0x575025){const _0x3d8f09=a64_0x3d481f;if(!_0x575025[_0x3d8f09(0xac)])throw CliErrors['validation'](_0x3d8f09(0xa0));validateExtendPatchKeys(_0x575025['patch']);}function parseDatasetExtend(_0x1750d8){const _0x6b8507=a64_0x3d481f;if(typeof _0x1750d8===_0x6b8507(0xb0)){const _0x3a00b6=_0x1750d8['trim']();if(!_0x3a00b6)return{'value':{},'shape':_0x6b8507(0xb0)};let _0x15e2ec;try{_0x15e2ec=JSON['parse'](_0x3a00b6);}catch(_0x29ff0a){const _0x1f53df=_0x29ff0a instanceof Error?_0x29ff0a[_0x6b8507(0x91)]:String(_0x29ff0a);throw CliErrors['validation'](_0x6b8507(0x9c)+_0x1f53df);}if(!isPlainObject(_0x15e2ec)||Array[_0x6b8507(0xa4)](_0x15e2ec))throw CliErrors[_0x6b8507(0x9e)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x15e2ec,'shape':_0x6b8507(0xb0)};}if(_0x1750d8===undefined||_0x1750d8===null)return{'value':{},'shape':_0x6b8507(0xb0)};if(!isPlainObject(_0x1750d8)||Array[_0x6b8507(0xa4)](_0x1750d8))throw CliErrors[_0x6b8507(0x9e)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x1750d8,'shape':'object'};}function serializeDatasetExtend(_0x23d607,_0x1d83e6){const _0x45b129=a64_0x3d481f;return _0x1d83e6===_0x45b129(0xb0)?JSON[_0x45b129(0x8a)](_0x23d607):_0x23d607;}function a64_0x5822(_0x4ce47b,_0x3082fc){_0x4ce47b=_0x4ce47b-0x7d;const _0x58493c=a64_0x5849();let _0x5822eb=_0x58493c[_0x4ce47b];return _0x5822eb;}function summarizeDataset(_0x45e656,_0x308b56){const _0x178b6b=a64_0x3d481f,_0x399059=isPlainObject(_0x45e656[_0x178b6b(0x82)])?_0x45e656['dataset']:{},_0x2d0ad7=isPlainObject(_0x45e656[_0x178b6b(0xa2)])?_0x45e656[_0x178b6b(0xa2)]:{};return{'id':_0x45e656['modelId']??_0x45e656['id']??_0x399059['datasetId']??null,'code':_0x45e656['modelCode']??_0x45e656['code']??_0x399059['datasetCode']??_0x308b56,'name':_0x45e656[_0x178b6b(0xa7)]??_0x399059['datasetName']??null,'table':_0x2d0ad7[_0x178b6b(0x94)]??_0x399059[_0x178b6b(0x94)]??null,'db':_0x2d0ad7[_0x178b6b(0x8b)]??_0x2d0ad7[_0x178b6b(0x96)]??null};}function deepClone(_0x5abd8f){const _0x2e5e13=a64_0x3d481f;if(_0x5abd8f===undefined)return _0x5abd8f;return JSON[_0x2e5e13(0x97)](JSON[_0x2e5e13(0x8a)](_0x5abd8f));}function deepEqual(_0x2059f5,_0x1bae17){const _0x339781=a64_0x3d481f;return JSON['stringify'](_0x2059f5)===JSON[_0x339781(0x8a)](_0x1bae17);}function isPlainObject(_0xe52d2a){const _0x56bfcc=a64_0x3d481f;return Boolean(_0xe52d2a)&&typeof _0xe52d2a===_0x56bfcc(0x87)&&!Array[_0x56bfcc(0xa4)](_0xe52d2a);}function trim(_0x148377){const _0x82baf4=a64_0x3d481f,_0xffd83=String(_0x148377||'')[_0x82baf4(0x7d)]();return _0xffd83;}
|