@lovrabet/rabetbase-cli 2.4.3 → 2.4.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/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.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/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.d.ts +2 -0
- package/lib/commands/db/diff-refresh-start.js +1 -0
- package/lib/commands/db/diff-refresh-status.d.ts +2 -0
- package/lib/commands/db/diff-refresh-status.js +1 -0
- 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/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/notification/config-create.d.ts +2 -0
- package/lib/commands/notification/config-create.js +1 -0
- package/lib/commands/notification/config-delete.d.ts +2 -0
- package/lib/commands/notification/config-delete.js +1 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.d.ts +2 -0
- package/lib/commands/notification/config-update.js +1 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.d.ts +97 -0
- package/lib/commands/notification/shared.js +1 -0
- package/lib/commands/ocr/index.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/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.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/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +1 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.d.ts +11 -0
- package/lib/commands/project/create/materialize-project-template.js +1 -0
- package/lib/commands/project/create/project-name.d.ts +2 -0
- package/lib/commands/project/create/project-name.js +1 -0
- package/lib/commands/project/create/project-template-archive.d.ts +6 -0
- package/lib/commands/project/create/project-template-archive.js +1 -0
- package/lib/commands/project/create/project-template-path.d.ts +1 -3
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +2 -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/create.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.d.ts +2 -0
- 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.d.ts +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +29 -2
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/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.d.ts +13 -0
- 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 +9 -4
- package/skills/rabetbase/SKILL.md +33 -22
- package/skills/rabetbase/guides/backend-function.md +5 -3
- package/skills/rabetbase/guides/bff-creation-workflow.md +2 -2
- package/skills/rabetbase/guides/conflict-detection.md +2 -2
- package/skills/rabetbase/guides/database-connection-workflow.md +39 -5
- package/skills/rabetbase/guides/react-custom-page-workflow.md +16 -4
- package/skills/rabetbase/guides/sql-creation-workflow.md +4 -2
- package/skills/rabetbase/guides/sql-mybatis.md +2 -2
- package/skills/rabetbase/knowledge/page-schema/YtPage.md +3 -37
- package/skills/rabetbase/knowledge/react-page/generation-standards.md +14 -3
- package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
- package/skills/rabetbase/references/rabetbase-bff-push.md +4 -5
- package/skills/rabetbase/references/rabetbase-bff-save.md +3 -3
- package/skills/rabetbase/references/rabetbase-config.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-detail.md +3 -0
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +53 -0
- package/skills/rabetbase/references/rabetbase-db-diff.md +40 -21
- package/skills/rabetbase/references/rabetbase-db-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +5 -3
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -10
- package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +1 -3
- package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +2 -3
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-notification-config-mutations.md +56 -0
- package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-react-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-react-publish.md +2 -2
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -0
- package/skills/rabetbase/references/rabetbase-run.md +1 -1
- package/skills/rabetbase/references/rabetbase-sql-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-sql-push.md +3 -4
- package/skills/rabetbase/references/rabetbase-user-account.md +0 -1
- package/skills/rabetbase.manifest.json +5 -5
- package/templates/README.md +14 -2
- package/lib/commands/project/create/non-interactive.d.ts +0 -9
- package/lib/commands/project/create/non-interactive.js +0 -1
- package/lib/utils/copy-directory.d.ts +0 -1
- package/lib/utils/copy-directory.js +0 -1
- package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +0 -291
- package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +0 -223
- package/templates/projects/sub-app-react-demo/.prettierrc +0 -1
- package/templates/projects/sub-app-react-demo/CHANGELOG.md +0 -67
- package/templates/projects/sub-app-react-demo/README.md +0 -246
- package/templates/projects/sub-app-react-demo/docs/quick-start.md +0 -245
- package/templates/projects/sub-app-react-demo/index.html +0 -27
- package/templates/projects/sub-app-react-demo/package.json +0 -34
- package/templates/projects/sub-app-react-demo/public/logo.svg +0 -1
- package/templates/projects/sub-app-react-demo/public/vite.svg +0 -1
- package/templates/projects/sub-app-react-demo/src/api/api.ts +0 -26
- package/templates/projects/sub-app-react-demo/src/api/client.ts +0 -32
- package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.module.css +0 -28
- package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.tsx +0 -55
- package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +0 -308
- package/templates/projects/sub-app-react-demo/src/main.tsx +0 -52
- package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +0 -570
- package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +0 -531
- package/templates/projects/sub-app-react-demo/src/pages/index.module.css +0 -500
- package/templates/projects/sub-app-react-demo/src/pages/index.tsx +0 -641
- package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +0 -536
- package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +0 -295
- package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +0 -242
- package/templates/projects/sub-app-react-demo/src/router/index.tsx +0 -30
- package/templates/projects/sub-app-react-demo/src/style.css +0 -108
- package/templates/projects/sub-app-react-demo/src/utils/api.ts +0 -12
- package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +0 -2
- package/templates/projects/sub-app-react-demo/tsconfig.json +0 -26
- package/templates/projects/sub-app-react-demo/vite.config.ts +0 -111
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a50_0xf025(_0x3f78fe,_0x57aa88){_0x3f78fe=_0x3f78fe-0x159;const _0x19b39c=a50_0x19b3();let _0xf025ef=_0x19b39c[_0x3f78fe];return _0xf025ef;}const a50_0x3d6b66=a50_0xf025;function a50_0x19b3(){const _0x4980b8=['5677472GlMBNh','read','object','string','3916429yEecyD','Missing\x20key.','20RIpHCa','7320ntwoVk','3870UjQGpV','1665gzDlIq','str','Usage:\x20','validation','1384AvPXsr','\x20config\x20get\x20--key\x20<key>','637953JMYxKA','config','4034093SQUePg','key','1878534HLkmIr','Get\x20a\x20config\x20value\x20by\x20key','app','6ShZbVc'];a50_0x19b3=function(){return _0x4980b8;};return a50_0x19b3();}(function(_0x41101f,_0x5024e3){const _0x48c79d=a50_0xf025,_0x1a8664=_0x41101f();while(!![]){try{const _0x3f5773=parseInt(_0x48c79d(0x16a))/0x1+-parseInt(_0x48c79d(0x163))/0x2*(-parseInt(_0x48c79d(0x164))/0x3)+parseInt(_0x48c79d(0x168))/0x4*(-parseInt(_0x48c79d(0x162))/0x5)+-parseInt(_0x48c79d(0x15a))/0x6*(parseInt(_0x48c79d(0x16c))/0x7)+parseInt(_0x48c79d(0x15b))/0x8+-parseInt(_0x48c79d(0x16e))/0x9*(parseInt(_0x48c79d(0x161))/0xa)+-parseInt(_0x48c79d(0x15f))/0xb;if(_0x3f5773===_0x5024e3)break;else _0x1a8664['push'](_0x1a8664['shift']());}catch(_0x3b2d7b){_0x1a8664['push'](_0x1a8664['shift']());}}}(a50_0x19b3,0x89fec));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(_0x544947){const _0x4147eb=a50_0xf025,_0x326d01=_0x544947[_0x4147eb(0x165)]('key');if(!_0x326d01)throw CliErrors[_0x4147eb(0x167)](_0x4147eb(0x160),_0x4147eb(0x166)+CLI_BIN_NAME+_0x4147eb(0x169));const _0x1d3492=readConfig(),_0x2c3768=_0x326d01===_0x4147eb(0x159)?'appcode':_0x326d01,_0x1be154=_0x1d3492[_0x2c3768];if(_0x1be154===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x326d01);return{'ok':!![],'data':typeof _0x1be154===_0x4147eb(0x15d)?_0x1be154:{[_0x2c3768]:_0x1be154},'message':typeof _0x1be154==='object'?undefined:String(_0x1be154)};}export const configGetDefinition={'service':a50_0x3d6b66(0x16b),'command':'get','description':a50_0x3d6b66(0x16f),'risk':a50_0x3d6b66(0x15c),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x3d6b66(0x16d),'type':a50_0x3d6b66(0x15e),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4338a2,_0x2eb936){const _0x5efaab=a51_0x29f3,_0x47c4be=_0x4338a2();while(!![]){try{const _0x38e5ee=-parseInt(_0x5efaab(0x178))/0x1*(-parseInt(_0x5efaab(0x17d))/0x2)+parseInt(_0x5efaab(0x17e))/0x3*(-parseInt(_0x5efaab(0x17b))/0x4)+-parseInt(_0x5efaab(0x17f))/0x5*(-parseInt(_0x5efaab(0x17a))/0x6)+-parseInt(_0x5efaab(0x180))/0x7+parseInt(_0x5efaab(0x177))/0x8*(-parseInt(_0x5efaab(0x176))/0x9)+-parseInt(_0x5efaab(0x17c))/0xa+parseInt(_0x5efaab(0x179))/0xb;if(_0x38e5ee===_0x2eb936)break;else _0x47c4be['push'](_0x47c4be['shift']());}catch(_0x25e1dd){_0x47c4be['push'](_0x47c4be['shift']());}}}(a51_0x417c,0x6a781));function a51_0x417c(){const _0x90d4b7=['3pqbkVH','937540FuupeF','1981231HhcbAS','867366MtnDgR','8ynutpL','1OCYGyQ','6581267UoAGyh','18crvcqt','1830292Nmtelu','450030yvyYpN','314518hOSxMW'];a51_0x417c=function(){return _0x90d4b7;};return a51_0x417c();}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a51_0x29f3(_0x45c2e5,_0x5b5f42){_0x45c2e5=_0x45c2e5-0x176;const _0x417ce8=a51_0x417c();let _0x29f3d9=_0x417ce8[_0x45c2e5];return _0x29f3d9;}import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x1f33d0=a52_0x3df8;(function(_0x536b96,_0x1f0197){const _0xa22c41=a52_0x3df8,_0x2db167=_0x536b96();while(!![]){try{const _0x1d3ba1=parseInt(_0xa22c41(0xda))/0x1+parseInt(_0xa22c41(0xd4))/0x2+-parseInt(_0xa22c41(0xd1))/0x3*(-parseInt(_0xa22c41(0xd9))/0x4)+-parseInt(_0xa22c41(0xd7))/0x5+parseInt(_0xa22c41(0xd8))/0x6*(parseInt(_0xa22c41(0xd6))/0x7)+-parseInt(_0xa22c41(0xd5))/0x8+-parseInt(_0xa22c41(0xd0))/0x9;if(_0x1d3ba1===_0x1f0197)break;else _0x2db167['push'](_0x2db167['shift']());}catch(_0x1582c4){_0x2db167['push'](_0x2db167['shift']());}}}(a52_0x16a5,0x39a21));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a52_0x3df8(_0xa3b714,_0x324642){_0xa3b714=_0xa3b714-0xcd;const _0x16a524=a52_0x16a5();let _0x3df8df=_0x16a524[_0xa3b714];return _0x3df8df;}async function execute(_0x171abf){const _0x39fa5a=a52_0x3df8,_0x5476b0=_0x171abf['bool'](_0x39fa5a(0xd2))?readScopedConfig(_0x39fa5a(0xd2)):readConfig();return{'ok':!![],'data':_0x5476b0};}export const configListDefinition={'service':a52_0x1f33d0(0xd3),'command':a52_0x1f33d0(0xcf),'description':a52_0x1f33d0(0xcd),'risk':a52_0x1f33d0(0xdc),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x1f33d0(0xd2),'type':a52_0x1f33d0(0xdb),'description':a52_0x1f33d0(0xce),'default':![]}],'execute':execute};function a52_0x16a5(){const _0x2f9163=['3156VEeaqX','8cCFxAi','354640DASgqP','boolean','read','List\x20all\x20config\x20values','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','list','4689549KYZoeL','617703mzxhYm','global','config','715904Ijiicm','3573928jjSBNC','2513cCVlyu','546805fWwgBx'];a52_0x16a5=function(){return _0x2f9163;};return a52_0x16a5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a53_0x4d40(){const _0x2f411e=['Use\x20`','str','object','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','709049ELJXyT','\x20workspace\x20add\x20<name>\x20--appcode\x20','93303dHvOWt','keys','Usage:\x20','1237920TPhzFt','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','global','Project','app','1610628fcKqGU','string','value','152408WcUntM','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','130DMoSlZ','includes','\x22.\x20Allowed:\x20','\x20appcode\x20set\x20to:\x20','372054ARZGZw','length','appcode','key','riskLevel','locale','2hsYPBL','12723OMUBzo','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Invalid\x20locale\x20value.','Settable\x20top-level\x20keys:\x20','Set\x20a\x20config\x20value','Missing\x20value.','config','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','\x22\x20is\x20not\x20settable.','validation','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','42LLTlql','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','Invalid\x20value\x20for\x20\x22','168jVGgjD','boolean','`,\x20`','set','apps','bool','10soWSyL','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Config\x20value','env','5kxqaRL'];a53_0x4d40=function(){return _0x2f411e;};return a53_0x4d40();}const a53_0xad1164=a53_0x149f;function a53_0x149f(_0x1616ab,_0x587a01){_0x1616ab=_0x1616ab-0x9d;const _0x4d40e3=a53_0x4d40();let _0x149fe4=_0x4d40e3[_0x1616ab];return _0x149fe4;}(function(_0x9eefe0,_0x46255e){const _0x501525=a53_0x149f,_0x25583f=_0x9eefe0();while(!![]){try{const _0x1fb76e=parseInt(_0x501525(0xb7))/0x1+parseInt(_0x501525(0xc3))/0x2*(-parseInt(_0x501525(0xc4))/0x3)+-parseInt(_0x501525(0xb4))/0x4*(parseInt(_0x501525(0xa4))/0x5)+-parseInt(_0x501525(0xbd))/0x6*(parseInt(_0x501525(0xcf))/0x7)+parseInt(_0x501525(0xd2))/0x8*(-parseInt(_0x501525(0xac))/0x9)+-parseInt(_0x501525(0xa0))/0xa*(-parseInt(_0x501525(0xaa))/0xb)+-parseInt(_0x501525(0xaf))/0xc*(-parseInt(_0x501525(0xb9))/0xd);if(_0x1fb76e===_0x46255e)break;else _0x25583f['push'](_0x25583f['shift']());}catch(_0xad4332){_0x25583f['push'](_0x25583f['shift']());}}}(a53_0x4d40,0x3d7a0));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x25184b){const _0x5bf356=a53_0x149f,_0xe1f0e=_0x25184b[_0x5bf356(0xa6)]('key'),_0x410517=_0x25184b[_0x5bf356(0xa6)](_0x5bf356(0xb6));if(!_0xe1f0e)throw CliErrors[_0x5bf356(0xcd)]('Missing\x20key.',_0x5bf356(0xae)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x410517===undefined||_0x410517==='')throw CliErrors['validation'](_0x5bf356(0xc9),'Usage:\x20'+CLI_BIN_NAME+_0x5bf356(0xa8));if(_0x410517['length']>0x1f4)throw CliErrors['validation'](_0x5bf356(0xa9));if(!isTopLevelConfigKey(_0xe1f0e))throw CliErrors['validation']('Top-level\x20key\x20\x22'+_0xe1f0e+_0x5bf356(0xcc),_0x5bf356(0xc7)+getTopLevelConfigKeySummary());if(_0xe1f0e===_0x5bf356(0xc1))throw CliErrors[_0x5bf356(0xcd)](_0x5bf356(0xc5));if(CONFIG_ENUM_VALUES[_0xe1f0e]&&!CONFIG_ENUM_VALUES[_0xe1f0e][_0x5bf356(0xba)](_0x410517))throw CliErrors[_0x5bf356(0xcd)](_0x5bf356(0xd1)+_0xe1f0e+_0x5bf356(0xbb)+CONFIG_ENUM_VALUES[_0xe1f0e]['join'](',\x20'));if(_0xe1f0e===_0x5bf356(0xc2)&&!normalizeLocale(_0x410517))throw CliErrors[_0x5bf356(0xcd)](_0x5bf356(0xc6),_0x5bf356(0xcb));const _0x47b6c7={'global':_0x25184b[_0x5bf356(0x9f)]('global')},_0x43c541=resolveWriteScope(_0x47b6c7),_0x7dffb4=readScopedConfig(_0x43c541);let _0x4f2028=_0xe1f0e,_0x5d77b7=_0x410517;_0xe1f0e===_0x5bf356(0xb3)&&(_0x4f2028=_0x5bf356(0xbf),delete _0x7dffb4[_0x5bf356(0xb3)]);_0xe1f0e===_0x5bf356(0xc2)&&(_0x5d77b7=normalizeLocale(_0x410517));if(_0xe1f0e===_0x5bf356(0xa3)){_0x5d77b7=normalizeEnv(_0x410517);if(!isProduction(_0x5d77b7)&&!isDaily(_0x5d77b7))throw CliErrors[_0x5bf356(0xcd)](_0x5bf356(0xb0),_0x5bf356(0xb8));}if(_0xe1f0e===_0x5bf356(0xbf)){const _0x19a211=_0x7dffb4[_0x5bf356(0x9e)]&&typeof _0x7dffb4[_0x5bf356(0x9e)]===_0x5bf356(0xa7)?Object[_0x5bf356(0xad)](_0x7dffb4['apps']):[];if(_0x19a211[_0x5bf356(0xbe)]>0x0)throw CliErrors['validation'](_0x5bf356(0xce),_0x5bf356(0xa5)+CLI_BIN_NAME+_0x5bf356(0xab)+_0x5d77b7+_0x5bf356(0xd4)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x192304=buildCanonicalProjectConfig({..._0x7dffb4},{'appCodes':[_0x5d77b7],'env':typeof _0x7dffb4[_0x5bf356(0xa3)]===_0x5bf356(0xb5)?_0x7dffb4[_0x5bf356(0xa3)]:undefined});writeScopedConfig(_0x192304,_0x43c541);const _0xec0ad8=_0x43c541===_0x5bf356(0xb1)?'Global':_0x5bf356(0xb2);return{'ok':!![],'message':'✓\x20'+_0xec0ad8+_0x5bf356(0xbc)+_0x5d77b7+_0x5bf356(0xd0)};}_0x7dffb4[_0x4f2028]=_0x5d77b7,writeScopedConfig(_0x7dffb4,_0x43c541);const _0x5519c1=_0x43c541==='global'?'Global':_0x5bf356(0xb2);return{'ok':!![],'message':'✓\x20'+_0x5519c1+'\x20'+_0x4f2028+'\x20set\x20to:\x20'+_0x5d77b7};}export const configSetDefinition={'service':a53_0xad1164(0xca),'command':a53_0xad1164(0x9d),'description':a53_0xad1164(0xc8),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0xad1164(0xc0),'type':a53_0xad1164(0xb5),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a53_0xad1164(0xb6),'type':'string','description':a53_0xad1164(0xa2),'required':!![]},{'name':a53_0xad1164(0xb1),'type':a53_0xad1164(0xd3),'description':a53_0xad1164(0xa1),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a54_0x4504(){var _0x182a53=['6876CYrhOq','555GjHNKW','4008599pjnaci','42524WFgEhZ','23114960orJopH','30IDhFaD','2302578BXftzG','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','11KWkzFb','\x20init`\x20first.','validation','project','1552sbvjIc','global','613431oSIDDP','19142LTHNyc'];a54_0x4504=function(){return _0x182a53;};return a54_0x4504();}(function(_0x13e6af,_0x4712c3){var _0x31b915=a54_0xd227,_0x27a78a=_0x13e6af();while(!![]){try{var _0x1502c7=-parseInt(_0x31b915(0xb0))/0x1*(parseInt(_0x31b915(0xaa))/0x2)+-parseInt(_0x31b915(0xa9))/0x3+parseInt(_0x31b915(0xae))/0x4*(-parseInt(_0x31b915(0xac))/0x5)+-parseInt(_0x31b915(0xb1))/0x6+parseInt(_0x31b915(0xad))/0x7+-parseInt(_0x31b915(0xa7))/0x8*(-parseInt(_0x31b915(0xab))/0x9)+parseInt(_0x31b915(0xaf))/0xa*(parseInt(_0x31b915(0xb3))/0xb);if(_0x1502c7===_0x4712c3)break;else _0x27a78a['push'](_0x27a78a['shift']());}catch(_0x14de4b){_0x27a78a['push'](_0x27a78a['shift']());}}}(a54_0x4504,0xee83e));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};function a54_0xd227(_0x4b2f01,_0x1a34b7){_0x4b2f01=_0x4b2f01-0xa6;var _0x450414=a54_0x4504();var _0xd227c4=_0x450414[_0x4b2f01];return _0xd227c4;}export function resolveWriteScope(_0x54e246){var _0x5d187a=a54_0xd227;if(_0x54e246[_0x5d187a(0xa8)])return _0x5d187a(0xa8);if(!isInProject())throw CliErrors[_0x5d187a(0xb5)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x5d187a(0xb2)+CLI_BIN_NAME+_0x5d187a(0xb4));return _0x5d187a(0xa6);}export function readScopedConfig(_0x501dd2){return readConfigFile(resolveWriteConfigPath(_0x501dd2));}export function writeScopedConfig(_0x512aa5,_0x1eeb19){writeConfigFile(resolveWriteConfigPath(_0x1eeb19),_0x512aa5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a55_0x5d22(_0xfaeebe,_0x394b09){_0xfaeebe=_0xfaeebe-0xd9;const _0x50c016=a55_0x50c0();let _0x5d229d=_0x50c016[_0xfaeebe];return _0x5d229d;}const a55_0x397118=a55_0x5d22;(function(_0x10d3b7,_0x12e57e){const _0x281d2a=a55_0x5d22,_0x270e5b=_0x10d3b7();while(!![]){try{const _0x3311fa=parseInt(_0x281d2a(0xde))/0x1+parseInt(_0x281d2a(0xdf))/0x2+-parseInt(_0x281d2a(0xdc))/0x3+-parseInt(_0x281d2a(0xe7))/0x4*(parseInt(_0x281d2a(0xe8))/0x5)+parseInt(_0x281d2a(0xda))/0x6+parseInt(_0x281d2a(0xe3))/0x7*(-parseInt(_0x281d2a(0xdd))/0x8)+-parseInt(_0x281d2a(0xe1))/0x9;if(_0x3311fa===_0x12e57e)break;else _0x270e5b['push'](_0x270e5b['shift']());}catch(_0x16829a){_0x270e5b['push'](_0x270e5b['shift']());}}}(a55_0x50c0,0x581b2));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':'filter','operation':a55_0x397118(0xe4),'description':a55_0x397118(0xe6),'paramsRequired':![],'paramsHint':'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','helpExtra':['\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a55_0x397118(0xe0),a55_0x397118(0xe5),a55_0x397118(0xd9),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a55_0x397118(0xe2)][a55_0x397118(0xdb)]('\x0a')});function a55_0x50c0(){const _0x23095e=['704008TxvDfn','1362622GYNXMb','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','478467FrzuIE','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','456183LePZlq','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]','Filter\x20dataset\x20records\x20with\x20query\x20conditions','68GIWyWC','22605Itonus','\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}]','330576YvmFcG','join','1088976zQrkDI','72RJXuhX'];a55_0x50c0=function(){return _0x23095e;};return a55_0x50c0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a56_0x1763(_0x4f099c,_0x3426b1){_0x4f099c=_0x4f099c-0x17d;const _0x779df0=a56_0x779d();let _0x17638c=_0x779df0[_0x4f099c];return _0x17638c;}const a56_0x261952=a56_0x1763;(function(_0xee08be,_0x1bbee6){const _0x1e086d=a56_0x1763,_0x1db859=_0xee08be();while(!![]){try{const _0x4e5fb1=parseInt(_0x1e086d(0x188))/0x1+parseInt(_0x1e086d(0x185))/0x2+-parseInt(_0x1e086d(0x189))/0x3+parseInt(_0x1e086d(0x17d))/0x4+parseInt(_0x1e086d(0x17e))/0x5*(parseInt(_0x1e086d(0x180))/0x6)+-parseInt(_0x1e086d(0x184))/0x7*(-parseInt(_0x1e086d(0x183))/0x8)+-parseInt(_0x1e086d(0x17f))/0x9*(parseInt(_0x1e086d(0x181))/0xa);if(_0x4e5fb1===_0x1bbee6)break;else _0x1db859['push'](_0x1db859['shift']());}catch(_0x2d8a89){_0x1db859['push'](_0x1db859['shift']());}}}(a56_0x779d,0x7c3be));function a56_0x779d(){const _0x597229=['5896tenNzM','1799gzgNDc','437032Genife','Get\x20a\x20single\x20record\x20by\x20ID','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','840251bpOxox','2910027LTGaWu','3181864njXtXS','181455xvxwOC','27711IPXrDm','12SVBFHE','2070GkQiiE','getOne'];a56_0x779d=function(){return _0x597229;};return a56_0x779d();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a56_0x261952(0x182),'operation':a56_0x261952(0x182),'description':a56_0x261952(0x186),'paramsRequired':!![],'paramsHint':a56_0x261952(0x187)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2194b3,_0x151709){const _0x189813=a57_0x484c,_0x5ad43a=_0x2194b3();while(!![]){try{const _0x2155e1=parseInt(_0x189813(0xf2))/0x1+-parseInt(_0x189813(0xec))/0x2+-parseInt(_0x189813(0xe9))/0x3+parseInt(_0x189813(0xeb))/0x4*(-parseInt(_0x189813(0xef))/0x5)+parseInt(_0x189813(0xed))/0x6+-parseInt(_0x189813(0xf0))/0x7*(-parseInt(_0x189813(0xee))/0x8)+parseInt(_0x189813(0xea))/0x9*(parseInt(_0x189813(0xf1))/0xa);if(_0x2155e1===_0x151709)break;else _0x5ad43a['push'](_0x5ad43a['shift']());}catch(_0x4749ee){_0x5ad43a['push'](_0x5ad43a['shift']());}}}(a57_0x57bc,0x3c82f));function a57_0x484c(_0x4a634c,_0x4326c3){_0x4a634c=_0x4a634c-0xe9;const _0x57bcfa=a57_0x57bc();let _0x484ce4=_0x57bcfa[_0x4a634c];return _0x484ce4;}function a57_0x57bc(){const _0x577afb=['246163WImPZZ','188922cCscZf','99bXUIGP','1152hUYCPL','418682mZaihd','788358LBWTMU','27056WqdIjG','5940omZYDE','14LllaDm','434540bGhxoe'];a57_0x57bc=function(){return _0x577afb;};return a57_0x57bc();}import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x541664,_0x55a870){const _0x59b182=a58_0x4198,_0x5dd6db=_0x541664();while(!![]){try{const _0x34d2b=parseInt(_0x59b182(0x119))/0x1*(-parseInt(_0x59b182(0x122))/0x2)+parseInt(_0x59b182(0x136))/0x3+-parseInt(_0x59b182(0x130))/0x4*(parseInt(_0x59b182(0x12c))/0x5)+-parseInt(_0x59b182(0x11f))/0x6*(parseInt(_0x59b182(0x135))/0x7)+parseInt(_0x59b182(0x134))/0x8*(parseInt(_0x59b182(0x118))/0x9)+-parseInt(_0x59b182(0x116))/0xa+parseInt(_0x59b182(0x123))/0xb*(parseInt(_0x59b182(0x12e))/0xc);if(_0x34d2b===_0x55a870)break;else _0x5dd6db['push'](_0x5dd6db['shift']());}catch(_0x4f4ea7){_0x5dd6db['push'](_0x5dd6db['shift']());}}}(a58_0xcb3e,0xabbde));function a58_0x4198(_0x18dbf7,_0x12fa46){_0x18dbf7=_0x18dbf7-0x116;const _0xcb3ec6=a58_0xcb3e();let _0x419874=_0xcb3ec6[_0x18dbf7];return _0x419874;}function a58_0xcb3e(){const _0x54dbe7=['getOne','paramsRequired','read','string','helpExtra','validation','description','command','1865plCHXf','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','108kPUYsG','flagMissing','6140FpQwyO','alias','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','params','544abtvQr','18466ewQWgU','402549LlhWYr','now','3629420kAAxmE','data','21726leLbuj','26727gPquhf','paramsHint','appCode','data\x20','str','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','2124uTDVGY','compress','operation','52YoNWxt','3629230rrQReK'];a58_0xcb3e=function(){return _0x54dbe7;};return a58_0xcb3e();}import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0xfa24a7){const _0x4ae99b=a58_0x4198;if(!_0xfa24a7)throw CliErrors[_0x4ae99b(0x12f)](_0x4ae99b(0x133),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x1e659b=_0xfa24a7['id'];if(_0x1e659b===undefined||_0x1e659b===null||_0x1e659b==='')throw CliErrors[_0x4ae99b(0x129)](_0x4ae99b(0x132),_0x4ae99b(0x11e));}function parseCommandParams(_0x9c4d3e){return parseJsonParams(_0x9c4d3e)??{};}export function buildDataCommand(_0x49c97a){const _0x50fbb6=a58_0x4198,_0x45d707=_0x50fbb6(0x12d);return{'service':_0x50fbb6(0x117),'command':_0x49c97a[_0x50fbb6(0x12b)],'description':_0x49c97a[_0x50fbb6(0x12a)],'risk':_0x50fbb6(0x126),'defaultOutputFormat':_0x50fbb6(0x120),'helpExtra':_0x49c97a[_0x50fbb6(0x128)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x50fbb6(0x131),'type':_0x50fbb6(0x127),'description':_0x45d707},{'name':'params','type':_0x50fbb6(0x127),'description':_0x49c97a[_0x50fbb6(0x11a)]}],async 'validate'(_0x23b139){const _0x4a6cf1=_0x50fbb6,_0x5dbc93=_0x23b139[_0x4a6cf1(0x11d)](_0x4a6cf1(0x133));if(_0x49c97a[_0x4a6cf1(0x125)]&&!_0x5dbc93)throw CliErrors[_0x4a6cf1(0x12f)](_0x4a6cf1(0x133),_0x49c97a['paramsHint']);const _0x4f36fe=parseJsonParams(_0x5dbc93);_0x49c97a[_0x4a6cf1(0x121)]===_0x4a6cf1(0x124)&&assertGetOneId(_0x4f36fe);},async 'execute'(_0x3bff4){const _0x7b3fd4=_0x50fbb6,_0xe7a3a1=parseCommandParams(_0x3bff4['str'](_0x7b3fd4(0x133))),_0x46266c=Date[_0x7b3fd4(0x137)](),_0x48989a=await executeDatasetDataOperation(_0x3bff4[_0x7b3fd4(0x11b)],_0x3bff4[_0x7b3fd4(0x11d)]('code'),_0x49c97a[_0x7b3fd4(0x121)],_0xe7a3a1),_0x1d8573=Date[_0x7b3fd4(0x137)]()-_0x46266c;return{'ok':!![],'data':{'result':_0x48989a,'elapsed':_0x1d8573},'message':_0x7b3fd4(0x11c)+_0x49c97a['command']+'\x20completed\x20in\x20'+_0x1d8573+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x27c893=a59_0x1a11;(function(_0x2a0fb2,_0x2f207d){const _0x4ddc4f=a59_0x1a11,_0x3be4df=_0x2a0fb2();while(!![]){try{const _0x479a94=parseInt(_0x4ddc4f(0x1f2))/0x1*(parseInt(_0x4ddc4f(0x1e6))/0x2)+-parseInt(_0x4ddc4f(0x20d))/0x3*(-parseInt(_0x4ddc4f(0x1f6))/0x4)+-parseInt(_0x4ddc4f(0x216))/0x5*(parseInt(_0x4ddc4f(0x218))/0x6)+-parseInt(_0x4ddc4f(0x214))/0x7+-parseInt(_0x4ddc4f(0x1f3))/0x8*(-parseInt(_0x4ddc4f(0x219))/0x9)+-parseInt(_0x4ddc4f(0x1e5))/0xa+-parseInt(_0x4ddc4f(0x1fd))/0xb*(-parseInt(_0x4ddc4f(0x1ff))/0xc);if(_0x479a94===_0x2f207d)break;else _0x3be4df['push'](_0x3be4df['shift']());}catch(_0x2cf5ff){_0x3be4df['push'](_0x3be4df['shift']());}}}(a59_0x17f3,0x62c4f));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_0x27c893(0x20c);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x344da2,input:_0x5ba050,dryRun:_0x266849}){const _0x3f6ca5=a59_0x27c893;validateInput(_0x5ba050);const _0x3fe1b9=normalizeBusinessGroup(_0x5ba050[_0x3f6ca5(0x208)]),_0x5e8d75=await getDatasetDetail(_0x5ba050['code']),_0x2ad9d3=resolveBusinessGroupDataset(_0x5e8d75,_0x5ba050[_0x3f6ca5(0x1f7)]),_0x391788=loadCurrentBusinessGroup(_0x5e8d75,_0x2ad9d3);assertExpectedBusinessGroup(_0x391788,_0x5ba050[_0x3f6ca5(0x202)]);const _0x1057a4=buildBackendPayload(_0x344da2,_0x2ad9d3,_0x3fe1b9),_0x4f075d=_0x391788!==_0x3fe1b9;let _0x3442dd;if(_0x4f075d&&!_0x266849){await updateErBusinessGroup(_0x1057a4);const _0x9f63f0=await getDatasetDetail(_0x2ad9d3[_0x3f6ca5(0x1f7)]),_0x3dec23=resolveBusinessGroupDataset(_0x9f63f0,_0x2ad9d3[_0x3f6ca5(0x1f7)]),_0x11b5f9=loadCurrentBusinessGroup(_0x9f63f0,_0x3dec23);if(_0x11b5f9!==_0x3fe1b9)throw CliErrors[_0x3f6ca5(0x215)]('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x3f6ca5(0x1e8)+JSON[_0x3f6ca5(0x1eb)](_0x3fe1b9)+_0x3f6ca5(0x1ec)+JSON[_0x3f6ca5(0x1eb)](_0x11b5f9)+'.');_0x3442dd={'verified':!![],'status':_0x3f6ca5(0x1fa),'afterReadback':{'businessGroup':_0x11b5f9}};}else!_0x4f075d&&(_0x3442dd={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':_0x391788}});const _0x5288fe={'operation':_0x3f6ca5(0x203),'appCode':_0x344da2,'selector':{'code':_0x2ad9d3[_0x3f6ca5(0x1f7)]},'dataset':_0x2ad9d3,'before':{'businessGroup':_0x391788},'after':{'businessGroup':_0x3fe1b9},'changed':_0x4f075d,'dryRun':_0x266849,'submitted':_0x4f075d&&!_0x266849,'backend':{'method':_0x3f6ca5(0x204),'path':BACKEND_PATH,'payload':_0x1057a4},..._0x3442dd?{'verification':_0x3442dd}:{},'warnings':[]};return{'ok':!![],'data':_0x5288fe,'message':_0x4f075d?_0x266849?_0x3f6ca5(0x201)+_0x2ad9d3[_0x3f6ca5(0x1f7)]:_0x3f6ca5(0x1de)+_0x2ad9d3[_0x3f6ca5(0x1f7)]:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x2ad9d3['code']};}export const datasetBusinessGroupUpdate={'service':a59_0x27c893(0x1f4),'command':'business-group-update','description':a59_0x27c893(0x1e1),'risk':a59_0x27c893(0x209),'flags':[CODE_FLAG,{'name':'business-group','type':a59_0x27c893(0x20b),'required':!![],'description':a59_0x27c893(0x20e)},{'name':a59_0x27c893(0x212),'type':'string','required':![],'description':a59_0x27c893(0x1fb)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x190974){validateInput(readBusinessGroupUpdateInput(_0x190974));},async 'dryRun'(_0x471b88){const _0x20e176=a59_0x27c893,_0x581db2=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x471b88[_0x20e176(0x1f0)],'input':readBusinessGroupUpdateInput(_0x471b88),'dryRun':!![]});return{'method':_0x20e176(0x204),'url':BACKEND_PATH,'body':_0x581db2[_0x20e176(0x1ef)][_0x20e176(0x1da)][_0x20e176(0x1f8)],'description':_0x581db2[_0x20e176(0x1e4)],..._0x581db2['data']};},async 'execute'(_0xc37116){return buildDatasetBusinessGroupUpdateResult({'appCode':_0xc37116['appCode'],'input':readBusinessGroupUpdateInput(_0xc37116),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x2593f1){const _0x587e6b=a59_0x27c893,_0x2edac9=_0x2593f1['str'](_0x587e6b(0x212));return{'code':trim(_0x2593f1['str'](_0x587e6b(0x1f7))),'businessGroup':_0x2593f1[_0x587e6b(0x1e0)]('business-group'),'expectBusinessGroup':_0x2edac9===undefined||_0x2edac9===''?undefined:_0x2edac9};}function validateInput(_0x39134d){const _0x2855ee=a59_0x27c893;if(!trim(_0x39134d['code']))throw CliErrors[_0x2855ee(0x1db)]('--code\x20is\x20required');if(_0x39134d[_0x2855ee(0x208)]===undefined)throw CliErrors[_0x2855ee(0x1db)](_0x2855ee(0x1e7));}function resolveBusinessGroupDataset(_0x4ce05d,_0x406013){const _0x41e4b8=a59_0x27c893,_0x245eb7=asPlainObject(_0x4ce05d['dataset']),_0x396917=asPlainObject(_0x4ce05d[_0x41e4b8(0x213)]),_0x3e3f63=resolveSourceType(_0x4ce05d,_0x245eb7,_0x396917),_0x1ec9cd=firstString(_0x4ce05d['modelCode'],_0x4ce05d[_0x41e4b8(0x1f7)],_0x245eb7[_0x41e4b8(0x205)],_0x406013)||_0x406013;return{'id':firstNumber(_0x4ce05d[_0x41e4b8(0x1fc)],_0x4ce05d['id'],_0x245eb7[_0x41e4b8(0x206)])??firstString(_0x4ce05d[_0x41e4b8(0x1fc)],_0x4ce05d['id'],_0x245eb7[_0x41e4b8(0x206)])??null,'code':_0x1ec9cd,'name':firstString(_0x4ce05d[_0x41e4b8(0x1ee)],_0x245eb7[_0x41e4b8(0x1fe)],_0x245eb7['name'])||null,'sourceType':_0x3e3f63};}function resolveSourceType(_0x2015a6,_0x14d1e7,_0x5644b9){const _0x457e6e=a59_0x27c893,_0x661f89=firstString(_0x2015a6[_0x457e6e(0x1ea)],_0x2015a6[_0x457e6e(0x1dd)],_0x14d1e7[_0x457e6e(0x1ea)],_0x14d1e7['sourceType'])?.[_0x457e6e(0x200)]()[_0x457e6e(0x1df)]();if(_0x661f89===_0x457e6e(0x1f1)||_0x661f89===_0x457e6e(0x1dc))return _0x661f89;if(Object['keys'](_0x5644b9)[_0x457e6e(0x217)]>0x0)return _0x457e6e(0x1f1);throw CliErrors[_0x457e6e(0x1db)](_0x457e6e(0x1e9));}function loadCurrentBusinessGroup(_0x147062,_0x4cb9ed){const _0x295d1d=a59_0x27c893,_0x50f233=readBusinessGroupFromDatasetDetail(_0x147062,_0x4cb9ed[_0x295d1d(0x1dd)]);if(_0x50f233[_0x295d1d(0x1ed)])return normalizeBusinessGroup(_0x50f233['value']);if(_0x4cb9ed[_0x295d1d(0x1dd)]==='METADATA')return'';throw CliErrors[_0x295d1d(0x1db)](_0x295d1d(0x207),_0x295d1d(0x20f));}function readBusinessGroupFromDatasetDetail(_0x39e391,_0x4642ad){const _0x507926=a59_0x27c893,_0x249009=asPlainObject(_0x39e391['dataset']),_0x18c5a6=firstPresent(_0x39e391[_0x507926(0x208)]);if(_0x18c5a6['found'])return _0x18c5a6;const _0x58b11b=firstPresent(_0x249009[_0x507926(0x208)]);if(_0x58b11b[_0x507926(0x1ed)])return _0x58b11b;if(_0x4642ad===_0x507926(0x1f1))return{'found':![]};const _0x12833f=readBusinessGroupFromExtend(_0x39e391[_0x507926(0x21b)]);if(_0x12833f['found'])return _0x12833f;return readBusinessGroupFromExtend(_0x249009[_0x507926(0x21b)]);}function readBusinessGroupFromExtend(_0x5d3d65){const _0x2b0f11=a59_0x27c893;if(_0x5d3d65===undefined||_0x5d3d65===null||_0x5d3d65==='')return{'found':![]};if(typeof _0x5d3d65==='string')try{const _0xae1891=JSON[_0x2b0f11(0x21a)](_0x5d3d65);return readBusinessGroupFromExtend(_0xae1891);}catch{return{'found':![]};}const _0x553fa8=asPlainObject(_0x5d3d65);if(Object[_0x2b0f11(0x1f9)][_0x2b0f11(0x1f5)][_0x2b0f11(0x20a)](_0x553fa8,_0x2b0f11(0x208)))return{'found':!![],'value':_0x553fa8['businessGroup']};return{'found':![]};}function a59_0x17f3(){const _0x49f74b=['Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','isFinite','Expectation\x20mismatch\x20at\x20businessGroup','expect-business-group','dbtableConfig','3432261abFwqk','apiError','5UDfCmT','length','2460006rMnAHZ','9rBSWYz','parse','extend','backend','validation','METADATA','sourceType','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','toUpperCase','str','Update\x20business\x20scenario\x20group','number','object','message','4476200pHJGAN','90McXkxs','--business-group\x20is\x20required','Expected\x20','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','source','stringify',',\x20actual\x20','found','name','data','appCode','DB_TABLE','10937nGAggD','3166808vxknsM','dataset','hasOwnProperty','528356vcsTYm','code','payload','prototype','matched','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','modelId','11Eqzkxo','datasetName','8788776WMVKDY','trim','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','expectBusinessGroup','update','POST','datasetCode','datasetId','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','businessGroup','write','call','string','/smartapi/question/er-config/business-group/edit','3GEkhfB','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'];a59_0x17f3=function(){return _0x49f74b;};return a59_0x17f3();}function firstPresent(..._0x2a90d0){for(const _0x6c5e2d of _0x2a90d0){if(_0x6c5e2d!==undefined&&_0x6c5e2d!==null)return{'found':!![],'value':_0x6c5e2d};}return{'found':![]};}function assertExpectedBusinessGroup(_0xe44a7b,_0x4d1343){const _0x2d0939=a59_0x27c893;if(_0x4d1343===undefined)return;const _0x55858b=normalizeBusinessGroup(_0x4d1343);if(_0xe44a7b!==_0x55858b)throw CliErrors['validation'](_0x2d0939(0x211),_0x2d0939(0x1e8)+JSON[_0x2d0939(0x1eb)](_0x55858b)+_0x2d0939(0x1ec)+JSON['stringify'](_0xe44a7b));}function buildBackendPayload(_0x124746,_0x59738d,_0x2c1da4){const _0x396a2b=a59_0x27c893;return{'appCode':_0x124746,'datasetCode':_0x59738d[_0x396a2b(0x1f7)],'businessGroup':_0x2c1da4};}function normalizeBusinessGroup(_0x1a399e){const _0x2d6e24=a59_0x27c893;if(_0x1a399e===undefined||_0x1a399e===null)return'';return String(_0x1a399e)[_0x2d6e24(0x200)]();}function asPlainObject(_0x413d6a){const _0x21c57c=a59_0x27c893;if(!_0x413d6a||typeof _0x413d6a!==_0x21c57c(0x1e3)||Array['isArray'](_0x413d6a))return{};return _0x413d6a;}function firstString(..._0x43d4db){const _0x597dc8=a59_0x27c893;for(const _0x446aaa of _0x43d4db){if(typeof _0x446aaa===_0x597dc8(0x20b)&&_0x446aaa[_0x597dc8(0x200)]())return _0x446aaa[_0x597dc8(0x200)]();if(typeof _0x446aaa===_0x597dc8(0x1e2)&&Number[_0x597dc8(0x210)](_0x446aaa))return String(_0x446aaa);}return undefined;}function firstNumber(..._0x56b82b){const _0x1c7106=a59_0x27c893;for(const _0x301676 of _0x56b82b){if(typeof _0x301676===_0x1c7106(0x1e2)&&Number[_0x1c7106(0x210)](_0x301676))return _0x301676;if(typeof _0x301676===_0x1c7106(0x20b)&&_0x301676[_0x1c7106(0x200)]()&&Number[_0x1c7106(0x210)](Number(_0x301676)))return Number(_0x301676);}return null;}function a59_0x1a11(_0x30ccd4,_0x45a6c3){_0x30ccd4=_0x30ccd4-0x1da;const _0x17f301=a59_0x17f3();let _0x1a112e=_0x17f301[_0x30ccd4];return _0x1a112e;}function trim(_0x2fffe4){const _0x849497=a59_0x27c893;return String(_0x2fffe4||'')[_0x849497(0x200)]();}
|
|
1
|
+
const a59_0x4d5af9=a59_0x5698;(function(_0x4c91af,_0x49b9a6){const _0x2ecea9=a59_0x5698,_0x1bf1b9=_0x4c91af();while(!![]){try{const _0x17fbdd=parseInt(_0x2ecea9(0x93))/0x1+-parseInt(_0x2ecea9(0xa7))/0x2*(parseInt(_0x2ecea9(0x9f))/0x3)+-parseInt(_0x2ecea9(0xc6))/0x4*(-parseInt(_0x2ecea9(0xcc))/0x5)+parseInt(_0x2ecea9(0xb5))/0x6*(-parseInt(_0x2ecea9(0x96))/0x7)+-parseInt(_0x2ecea9(0xad))/0x8+parseInt(_0x2ecea9(0x98))/0x9+parseInt(_0x2ecea9(0x9c))/0xa*(-parseInt(_0x2ecea9(0x9a))/0xb);if(_0x17fbdd===_0x49b9a6)break;else _0x1bf1b9['push'](_0x1bf1b9['shift']());}catch(_0x5e5cc9){_0x1bf1b9['push'](_0x1bf1b9['shift']());}}}(a59_0x1cf3,0x5eed1));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:_0x3dd66d,input:_0x41fee9,dryRun:_0x307b37}){const _0x5b8c49=a59_0x5698;validateInput(_0x41fee9);const _0x52942f=normalizeBusinessGroup(_0x41fee9[_0x5b8c49(0xb2)]),_0x1e0769=await getDatasetDetail(_0x41fee9[_0x5b8c49(0xb4)]),_0x559152=resolveBusinessGroupDataset(_0x1e0769,_0x41fee9[_0x5b8c49(0xb4)]),_0x27743a=loadCurrentBusinessGroup(_0x1e0769,_0x559152);assertExpectedBusinessGroup(_0x27743a,_0x41fee9[_0x5b8c49(0xca)]);const _0x5d101c=buildBackendPayload(_0x3dd66d,_0x559152,_0x52942f),_0x23c55a=_0x27743a!==_0x52942f;let _0x53f6a8;if(_0x23c55a&&!_0x307b37){await updateErBusinessGroup(_0x5d101c);const _0x317b6f=await getDatasetDetail(_0x559152[_0x5b8c49(0xb4)]),_0x463583=resolveBusinessGroupDataset(_0x317b6f,_0x559152[_0x5b8c49(0xb4)]),_0x11d932=loadCurrentBusinessGroup(_0x317b6f,_0x463583);if(_0x11d932!==_0x52942f)throw CliErrors['apiError']('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Expected\x20'+JSON[_0x5b8c49(0xc0)](_0x52942f)+_0x5b8c49(0xaf)+JSON['stringify'](_0x11d932)+'.');_0x53f6a8={'verified':!![],'status':_0x5b8c49(0xb9),'afterReadback':{'businessGroup':_0x11d932}};}else!_0x23c55a&&(_0x53f6a8={'verified':!![],'status':_0x5b8c49(0xc5),'afterReadback':{'businessGroup':_0x27743a}});const _0x25dfdc={'operation':_0x5b8c49(0xae),'appCode':_0x3dd66d,'selector':{'code':_0x559152[_0x5b8c49(0xb4)]},'dataset':_0x559152,'before':{'businessGroup':_0x27743a},'after':{'businessGroup':_0x52942f},'changed':_0x23c55a,'dryRun':_0x307b37,'submitted':_0x23c55a&&!_0x307b37,'backend':{'method':_0x5b8c49(0x9e),'path':BACKEND_PATH,'payload':_0x5d101c},..._0x53f6a8?{'verification':_0x53f6a8}:{},'warnings':[]};return{'ok':!![],'data':_0x25dfdc,'message':_0x23c55a?_0x307b37?_0x5b8c49(0x94)+_0x559152['code']:_0x5b8c49(0xbb)+_0x559152['code']:_0x5b8c49(0xc4)+_0x559152[_0x5b8c49(0xb4)]};}export const datasetBusinessGroupUpdate={'service':a59_0x4d5af9(0xac),'command':'business-group-update','description':'Update\x20business\x20scenario\x20group','risk':a59_0x4d5af9(0xaa),'flags':[CODE_FLAG,{'name':a59_0x4d5af9(0xcb),'type':a59_0x4d5af9(0x95),'required':!![],'description':a59_0x4d5af9(0xbd)},{'name':a59_0x4d5af9(0xc3),'type':a59_0x4d5af9(0x95),'required':![],'description':a59_0x4d5af9(0x9d)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1e0fbd){validateInput(readBusinessGroupUpdateInput(_0x1e0fbd));},async 'dryRun'(_0x1a42a4){const _0x2b784e=a59_0x4d5af9,_0x3923b5=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x1a42a4[_0x2b784e(0xc7)],'input':readBusinessGroupUpdateInput(_0x1a42a4),'dryRun':!![]});return{'method':_0x2b784e(0x9e),'url':BACKEND_PATH,'body':_0x3923b5[_0x2b784e(0xa6)][_0x2b784e(0xd1)][_0x2b784e(0xba)],'description':_0x3923b5[_0x2b784e(0xa3)],..._0x3923b5['data']};},async 'execute'(_0x1cc15c){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1cc15c['appCode'],'input':readBusinessGroupUpdateInput(_0x1cc15c),'dryRun':![]});}};function a59_0x5698(_0x2ded56,_0x54950c){_0x2ded56=_0x2ded56-0x91;const _0x1cf34b=a59_0x1cf3();let _0x569883=_0x1cf34b[_0x2ded56];return _0x569883;}function readBusinessGroupUpdateInput(_0x5ec699){const _0x183148=a59_0x4d5af9,_0x3afe06=_0x5ec699[_0x183148(0xb1)](_0x183148(0xc3));return{'code':trim(_0x5ec699[_0x183148(0xb1)]('code')),'businessGroup':_0x5ec699[_0x183148(0xb1)](_0x183148(0xcb)),'expectBusinessGroup':_0x3afe06===undefined||_0x3afe06===''?undefined:_0x3afe06};}function validateInput(_0xdb4a83){const _0x51def6=a59_0x4d5af9;if(!trim(_0xdb4a83[_0x51def6(0xb4)]))throw CliErrors[_0x51def6(0xce)](_0x51def6(0x91));if(_0xdb4a83[_0x51def6(0xb2)]===undefined)throw CliErrors[_0x51def6(0xce)](_0x51def6(0xb3));}function resolveBusinessGroupDataset(_0x2118cd,_0x33c64c){const _0x5a2d4a=a59_0x4d5af9,_0xf998f9=asPlainObject(_0x2118cd['dataset']),_0x5b272a=asPlainObject(_0x2118cd['dbtableConfig']),_0xeca6f3=resolveSourceType(_0x2118cd,_0xf998f9,_0x5b272a),_0x4591aa=firstString(_0x2118cd[_0x5a2d4a(0x92)],_0x2118cd[_0x5a2d4a(0xb4)],_0xf998f9['datasetCode'],_0x33c64c)||_0x33c64c;return{'id':firstNumber(_0x2118cd[_0x5a2d4a(0xa0)],_0x2118cd['id'],_0xf998f9[_0x5a2d4a(0xb6)])??firstString(_0x2118cd[_0x5a2d4a(0xa0)],_0x2118cd['id'],_0xf998f9[_0x5a2d4a(0xb6)])??null,'code':_0x4591aa,'name':firstString(_0x2118cd[_0x5a2d4a(0xcd)],_0xf998f9[_0x5a2d4a(0xa4)],_0xf998f9['name'])||null,'sourceType':_0xeca6f3};}function resolveSourceType(_0x43128e,_0x313da6,_0x1b49ed){const _0xc8e025=a59_0x4d5af9,_0x42be03=firstString(_0x43128e[_0xc8e025(0xcf)],_0x43128e[_0xc8e025(0xd0)],_0x313da6[_0xc8e025(0xcf)],_0x313da6['sourceType'])?.['trim']()[_0xc8e025(0xb7)]();if(_0x42be03===_0xc8e025(0xa9)||_0x42be03===_0xc8e025(0xc9))return _0x42be03;if(Object[_0xc8e025(0xa5)](_0x1b49ed)[_0xc8e025(0xa2)]>0x0)return _0xc8e025(0xa9);throw CliErrors[_0xc8e025(0xce)](_0xc8e025(0xc2));}function loadCurrentBusinessGroup(_0x217512,_0x448a9c){const _0x453eb8=a59_0x4d5af9,_0xbed505=readBusinessGroupFromDatasetDetail(_0x217512,_0x448a9c['sourceType']);if(_0xbed505[_0x453eb8(0xab)])return normalizeBusinessGroup(_0xbed505[_0x453eb8(0x9b)]);if(_0x448a9c[_0x453eb8(0xd0)]===_0x453eb8(0xc9))return'';throw CliErrors[_0x453eb8(0xce)]('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.',_0x453eb8(0xb8));}function readBusinessGroupFromDatasetDetail(_0x15b089,_0x283764){const _0x51eaea=a59_0x4d5af9,_0x559bb6=asPlainObject(_0x15b089[_0x51eaea(0xac)]),_0x2ee1d6=firstPresent(_0x15b089[_0x51eaea(0xb2)]);if(_0x2ee1d6[_0x51eaea(0xab)])return _0x2ee1d6;const _0x44705b=firstPresent(_0x559bb6[_0x51eaea(0xb2)]);if(_0x44705b['found'])return _0x44705b;if(_0x283764==='DB_TABLE')return{'found':![]};const _0x4e0e0b=readBusinessGroupFromExtend(_0x15b089['extend']);if(_0x4e0e0b[_0x51eaea(0xab)])return _0x4e0e0b;return readBusinessGroupFromExtend(_0x559bb6[_0x51eaea(0xc8)]);}function readBusinessGroupFromExtend(_0x5a6cba){const _0x4fee19=a59_0x4d5af9;if(_0x5a6cba===undefined||_0x5a6cba===null||_0x5a6cba==='')return{'found':![]};if(typeof _0x5a6cba===_0x4fee19(0x95))try{const _0x8a7666=JSON[_0x4fee19(0xb0)](_0x5a6cba);return readBusinessGroupFromExtend(_0x8a7666);}catch{return{'found':![]};}const _0x5c8ca1=asPlainObject(_0x5a6cba);if(Object['prototype']['hasOwnProperty'][_0x4fee19(0x97)](_0x5c8ca1,_0x4fee19(0xb2)))return{'found':!![],'value':_0x5c8ca1[_0x4fee19(0xb2)]};return{'found':![]};}function firstPresent(..._0x4dc534){for(const _0x3d69a2 of _0x4dc534){if(_0x3d69a2!==undefined&&_0x3d69a2!==null)return{'found':!![],'value':_0x3d69a2};}return{'found':![]};}function assertExpectedBusinessGroup(_0x3ed121,_0x404ec2){const _0x338d56=a59_0x4d5af9;if(_0x404ec2===undefined)return;const _0x3fcf01=normalizeBusinessGroup(_0x404ec2);if(_0x3ed121!==_0x3fcf01)throw CliErrors[_0x338d56(0xce)](_0x338d56(0xa1),_0x338d56(0xa8)+JSON[_0x338d56(0xc0)](_0x3fcf01)+_0x338d56(0xaf)+JSON[_0x338d56(0xc0)](_0x3ed121));}function a59_0x1cf3(){const _0x4c32ff=['business-group','51550NjqDOy','name','validation','source','sourceType','backend','--code\x20is\x20required','modelCode','336061NczjiM','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','string','70fOkwVS','call','6663051DjOFZY','trim','352uEkhpf','value','272920UGBTlq','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','POST','36213SfMOoL','modelId','Expectation\x20mismatch\x20at\x20businessGroup','length','message','datasetName','keys','data','2XaGruw','Expected\x20','DB_TABLE','write','found','dataset','631424tZaixa','update',',\x20actual\x20','parse','str','businessGroup','--business-group\x20is\x20required','code','50454syBfEe','datasetId','toUpperCase','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','matched','payload','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','isFinite','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','number','isArray','stringify','object','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','expect-business-group','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','unchanged','140xFSbvJ','appCode','extend','METADATA','expectBusinessGroup'];a59_0x1cf3=function(){return _0x4c32ff;};return a59_0x1cf3();}function buildBackendPayload(_0x248d5a,_0xe4f1be,_0x563ade){const _0xfc4b7a=a59_0x4d5af9;return{'appCode':_0x248d5a,'datasetCode':_0xe4f1be[_0xfc4b7a(0xb4)],'businessGroup':_0x563ade};}function normalizeBusinessGroup(_0x2fd18a){const _0x51f426=a59_0x4d5af9;if(_0x2fd18a===undefined||_0x2fd18a===null)return'';return String(_0x2fd18a)[_0x51f426(0x99)]();}function asPlainObject(_0x480af2){const _0x3c8839=a59_0x4d5af9;if(!_0x480af2||typeof _0x480af2!==_0x3c8839(0xc1)||Array[_0x3c8839(0xbf)](_0x480af2))return{};return _0x480af2;}function firstString(..._0x3254df){const _0x940676=a59_0x4d5af9;for(const _0x265f26 of _0x3254df){if(typeof _0x265f26===_0x940676(0x95)&&_0x265f26[_0x940676(0x99)]())return _0x265f26['trim']();if(typeof _0x265f26===_0x940676(0xbe)&&Number[_0x940676(0xbc)](_0x265f26))return String(_0x265f26);}return undefined;}function firstNumber(..._0x22eb10){const _0x34efcd=a59_0x4d5af9;for(const _0x4b138b of _0x22eb10){if(typeof _0x4b138b===_0x34efcd(0xbe)&&Number[_0x34efcd(0xbc)](_0x4b138b))return _0x4b138b;if(typeof _0x4b138b===_0x34efcd(0x95)&&_0x4b138b['trim']()&&Number[_0x34efcd(0xbc)](Number(_0x4b138b)))return Number(_0x4b138b);}return null;}function trim(_0x4bc548){const _0x50d4b1=a59_0x4d5af9;return String(_0x4bc548||'')[_0x50d4b1(0x99)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x16e217=a60_0x23b7;(function(_0x2fd3fc,_0x30e595){const _0xd3b659=a60_0x23b7,_0x4d3d30=_0x2fd3fc();while(!![]){try{const _0x3a7f2b=parseInt(_0xd3b659(0xab))/0x1+parseInt(_0xd3b659(0xb1))/0x2+parseInt(_0xd3b659(0xa1))/0x3*(parseInt(_0xd3b659(0xba))/0x4)+parseInt(_0xd3b659(0xaa))/0x5+-parseInt(_0xd3b659(0x9d))/0x6+parseInt(_0xd3b659(0xa4))/0x7*(parseInt(_0xd3b659(0xa6))/0x8)+-parseInt(_0xd3b659(0xae))/0x9;if(_0x3a7f2b===_0x30e595)break;else _0x4d3d30['push'](_0x4d3d30['shift']());}catch(_0x31b35e){_0x4d3d30['push'](_0x4d3d30['shift']());}}}(a60_0x45c3,0x2a4b4));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x16e217(0xad),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':a60_0x16e217(0xb9)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x16e217(0x9b);function a60_0x45c3(){const _0x2b8a68=['4243896seUZSA','filter','tableName','498972UQEvqM','dataset','modelCode','sourceType','getOne','datasetCode','join','name','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','172460qNaQVa','trim','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','\x20是\x20','datasetName','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','\x20类型,没有可用于\x20','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','toUpperCase','2070384hWzbya','dbtable','source','dbtableConfig','21FgjuVY','SQL\x20schema\x20validation','当前数据集\x20\x22','819BfgTCj','code','7704KskFcl','length','dbId','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','885995mhjVSe','148683tCbsLC','unknown','lovrabet'];a60_0x45c3=function(){return _0x2b8a68;};return a60_0x45c3();}function valueToString(_0x2f64ec){const _0x4beff7=a60_0x16e217;return _0x2f64ec==null?'':String(_0x2f64ec)[_0x4beff7(0xbb)]();}function getDatasetCode(_0x497b08){const _0x33b998=a60_0x16e217;return valueToString(_0x497b08[_0x33b998(0xa5)]??_0x497b08[_0x33b998(0xb3)]??_0x497b08['dataset']?.[_0x33b998(0xb6)]);}function getDatasetName(_0x21bcd5){const _0x2c27fb=a60_0x16e217;return valueToString(_0x21bcd5[_0x2c27fb(0xb8)]??_0x21bcd5[_0x2c27fb(0xb2)]?.[_0x2c27fb(0xbe)])||_0x2c27fb(0xac);}function getDatasetSource(_0x3054c4){const _0x2de6c6=a60_0x16e217;return valueToString(_0x3054c4[_0x2de6c6(0x9f)]??_0x3054c4['dataset']?.[_0x2de6c6(0xb4)])[_0x2de6c6(0x9c)]();}function getDbtableConfig(_0x50da91){const _0x26c157=a60_0x16e217,_0xb5dab6=_0x50da91[_0x26c157(0xa0)]??_0x50da91[_0x26c157(0x9e)];return _0xb5dab6&&typeof _0xb5dab6==='object'?_0xb5dab6:{};}export function isDbTableBackedDataset(_0x32f3e7){const _0x32f2f8=a60_0x16e217,_0x44b0ea=getDatasetSource(_0x32f3e7);if(_0x44b0ea==='METADATA')return![];const _0x137d90=getDbtableConfig(_0x32f3e7),_0x159cf5=_0x137d90[_0x32f2f8(0xa8)]??_0x137d90['id'],_0x72520f=valueToString(_0x137d90['tableName']??_0x32f3e7['tableName']??_0x32f3e7['dataset']?.[_0x32f2f8(0xb0)]);return _0x159cf5!==undefined&&_0x159cf5!==null&&_0x72520f[_0x32f2f8(0xa7)]>0x0;}export function filterDbTableBackedDatasets(_0x551687){const _0x589eaf=a60_0x16e217;return _0x551687[_0x589eaf(0xaf)](_0x153bc5=>isDbTableBackedDataset(_0x153bc5));}export function buildDbTableBackedRequirementMessage(_0x199647,_0x466f7b=a60_0x16e217(0xa2)){const _0x3112e8=a60_0x16e217,_0x417b6e=getDatasetSource(_0x199647)||'UNKNOWN',_0x4b463d=getDatasetName(_0x199647),_0x17c5e7=getDatasetCode(_0x199647),_0x14b089=_0x17c5e7?'\x20('+_0x17c5e7+')':'';return[_0x3112e8(0xa3)+_0x4b463d+'\x22'+_0x14b089+_0x3112e8(0xbd)+_0x417b6e+_0x3112e8(0xc0)+_0x466f7b+'\x20的\x20DB_TABLE\x20数据源上下文。',_0x3112e8(0xbc),_0x3112e8(0xbf),_0x3112e8(0xa9)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x3112e8(0xb5)]+'。'][_0x3112e8(0xb7)]('\x20');}function a60_0x23b7(_0x4ce198,_0x538c16){_0x4ce198=_0x4ce198-0x9b;const _0x45c3bd=a60_0x45c3();let _0x23b7e1=_0x45c3bd[_0x4ce198];return _0x23b7e1;}export function assertDatasetIsDbTableBacked(_0x42a51d,_0x107fb5){if(!isDbTableBackedDataset(_0x42a51d))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x42a51d,_0x107fb5));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x548571=a61_0x38ee;function a61_0x2c2b(){const _0x73234f=['name','dbName','/smartapi/dataset/delete-dataset','6GuXYXA','bool','637030MvTEgq','dbId','117hYqbiy','isArray','No\x20undeleted\x20dataset\x20found\x20for\x20','Deleted\x20','code','num','source','\x20dataset(s);\x20','filter','tableName','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','520030wyXKVI','length','validation','Would\x20delete\x20','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','1315024QQizAP','appCode','dbid=','high-risk-write','dbtableConfig','7204nrmpcv','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','dbid','message','4836168stExFR','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','push','expected-count','confirm','description','60YarkiV','relatedPageInfoList','delete','1099573ikTLSH','str','\x20failed','boolean','number','2854970VHtZrV','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','object','dataset','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id'];a61_0x2c2b=function(){return _0x73234f;};return a61_0x2c2b();}(function(_0x31373d,_0x552d2f){const _0x53734a=a61_0x38ee,_0x58522d=_0x31373d();while(!![]){try{const _0x43f67c=-parseInt(_0x53734a(0x13d))/0x1+parseInt(_0x53734a(0x12f))/0x2*(-parseInt(_0x53734a(0x13a))/0x3)+-parseInt(_0x53734a(0x12a))/0x4+parseInt(_0x53734a(0x142))/0x5*(parseInt(_0x53734a(0x14b))/0x6)+parseInt(_0x53734a(0x125))/0x7+parseInt(_0x53734a(0x134))/0x8+-parseInt(_0x53734a(0x14f))/0x9*(-parseInt(_0x53734a(0x14d))/0xa);if(_0x43f67c===_0x552d2f)break;else _0x58522d['push'](_0x58522d['shift']());}catch(_0x45e6aa){_0x58522d['push'](_0x58522d['shift']());}}}(a61_0x2c2b,0x8d027));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';function a61_0x38ee(_0x54c487,_0x31df82){_0x54c487=_0x54c487-0x123;const _0x2c2b52=a61_0x2c2b();let _0x38ee9d=_0x2c2b52[_0x54c487];return _0x38ee9d;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x548571(0x141),'description':'Dataset\x20id'},DBID_FLAG={'name':a61_0x548571(0x132),'type':a61_0x548571(0x141),'description':a61_0x548571(0x130)},CONFIRM_FLAG={'name':a61_0x548571(0x138),'type':a61_0x548571(0x140),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a61_0x548571(0x141),'description':a61_0x548571(0x131)};export const datasetDelete={'service':a61_0x548571(0x145),'command':a61_0x548571(0x13c),'description':a61_0x548571(0x147),'risk':a61_0x548571(0x12d),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x491243){const _0x3e0227=a61_0x548571,_0x12b649=_0x491243[_0x3e0227(0x154)]('id'),_0x2ed20b=_0x491243[_0x3e0227(0x13e)](_0x3e0227(0x153)),_0x40f563=_0x491243[_0x3e0227(0x154)](_0x3e0227(0x132)),_0x1c0182=[_0x12b649>0x0,Boolean(_0x2ed20b),_0x40f563>0x0][_0x3e0227(0x157)](Boolean);if(_0x1c0182['length']===0x0)throw CliErrors[_0x3e0227(0x127)](_0x3e0227(0x143));if(_0x1c0182[_0x3e0227(0x126)]>0x1)throw CliErrors[_0x3e0227(0x127)](_0x3e0227(0x146));},async 'dryRun'(_0x58bd61){const _0x105bbd=a61_0x548571,_0x30ab8e=await resolveTargets(_0x58bd61);return{'method':'POST','url':_0x105bbd(0x14a),'body':{'appCode':_0x58bd61[_0x105bbd(0x12b)],'count':_0x30ab8e[_0x105bbd(0x126)],'datasets':_0x30ab8e},'description':_0x105bbd(0x128)+_0x30ab8e[_0x105bbd(0x126)]+_0x105bbd(0x129)};},async 'execute'(_0x204cad){const _0x28a501=a61_0x548571;if(!_0x204cad[_0x28a501(0x14c)](_0x28a501(0x138)))throw CliErrors['validation'](_0x28a501(0x135),_0x28a501(0x124));const _0x362a0a=await resolveTargets(_0x204cad),_0x560c6a=[],_0x13930b=[];for(const _0x52dada of _0x362a0a){try{await deleteDataset(_0x204cad[_0x28a501(0x12b)],_0x52dada['id']),_0x560c6a[_0x28a501(0x136)](_0x52dada);}catch(_0x4a1dfa){_0x13930b[_0x28a501(0x136)]({..._0x52dada,'error':_0x4a1dfa instanceof Error?_0x4a1dfa[_0x28a501(0x133)]:String(_0x4a1dfa)});}}if(_0x13930b[_0x28a501(0x126)]>0x0)return{'ok':![],'data':{'requested':_0x362a0a[_0x28a501(0x126)],'deletedCount':_0x560c6a['length'],'failedCount':_0x13930b['length'],'deleted':_0x560c6a,'failed':_0x13930b},'message':'Deleted\x20'+_0x560c6a[_0x28a501(0x126)]+'/'+_0x362a0a[_0x28a501(0x126)]+_0x28a501(0x156)+_0x13930b['length']+_0x28a501(0x13f)};return{'ok':!![],'data':{'requested':_0x362a0a[_0x28a501(0x126)],'deletedCount':_0x560c6a['length'],'deleted':_0x560c6a},'message':_0x28a501(0x152)+_0x560c6a[_0x28a501(0x126)]+'\x20dataset(s)'};}};async function resolveTargets(_0x4f9ecb){const _0x5aed98=a61_0x548571,_0x5c7e35=_0x4f9ecb[_0x5aed98(0x154)]('id'),_0x44501c=_0x4f9ecb[_0x5aed98(0x13e)]('code'),_0x3d7381=_0x4f9ecb[_0x5aed98(0x154)](_0x5aed98(0x132));let _0x257cb7;_0x44501c?(_0x257cb7=await listDatasets(_0x4f9ecb[_0x5aed98(0x12b)],{'code':_0x44501c}),_0x257cb7=_0x257cb7['filter'](_0x3d10f4=>_0x3d10f4['code']===_0x44501c)):(_0x257cb7=await listDatasets(_0x4f9ecb[_0x5aed98(0x12b)]),_0x5c7e35>0x0&&(_0x257cb7=_0x257cb7[_0x5aed98(0x157)](_0x782629=>_0x782629['id']===_0x5c7e35)),_0x3d7381>0x0&&(_0x257cb7=_0x257cb7[_0x5aed98(0x157)](_0x26ccb0=>_0x26ccb0[_0x5aed98(0x12e)]?.[_0x5aed98(0x14e)]===_0x3d7381)));const _0x4f7106=[];for(const _0x32776f of _0x257cb7){const _0x51ad0e=await getDatasetDetail(_0x32776f[_0x5aed98(0x153)]),_0x4d8317=Array[_0x5aed98(0x150)](_0x51ad0e[_0x5aed98(0x13b)])?_0x51ad0e[_0x5aed98(0x13b)][_0x5aed98(0x157)](_0x51f294=>_0x51f294!=null&&typeof _0x51f294===_0x5aed98(0x144)&&_0x51f294['deleted']!==!![]):[];_0x4f7106['push'](normalizeTarget(_0x32776f,_0x4d8317[_0x5aed98(0x126)]));}if(_0x4f7106[_0x5aed98(0x126)]===0x0){const _0x234df6=_0x44501c||(_0x5c7e35>0x0?'id='+_0x5c7e35:_0x5aed98(0x12c)+_0x3d7381);throw CliErrors['validation'](_0x5aed98(0x151)+_0x234df6+'.');}const _0x2f716e=_0x4f9ecb[_0x5aed98(0x154)](_0x5aed98(0x137));if(_0x2f716e>0x0&&_0x4f7106[_0x5aed98(0x126)]!==_0x2f716e)throw CliErrors[_0x5aed98(0x127)]('Matched\x20'+_0x4f7106[_0x5aed98(0x126)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x2f716e+'.');return _0x4f7106;}function normalizeTarget(_0x168277,_0x31ee57){const _0x50ac68=a61_0x548571,_0x3725e3=_0x168277[_0x50ac68(0x12e)]??{};return{'id':_0x168277['id'],'code':_0x168277['code'],'name':_0x168277[_0x50ac68(0x148)],'description':_0x168277[_0x50ac68(0x139)],'source':_0x168277[_0x50ac68(0x155)],'dbId':_0x3725e3[_0x50ac68(0x14e)],'dbName':_0x3725e3[_0x50ac68(0x149)],'tableName':_0x3725e3[_0x50ac68(0x123)],'relatedPageCount':_0x31ee57};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x3b1ed8=a62_0x59e8;(function(_0x56380a,_0x3ab959){const _0x3828b4=a62_0x59e8,_0x55b37a=_0x56380a();while(!![]){try{const _0x196171=-parseInt(_0x3828b4(0x1eb))/0x1*(parseInt(_0x3828b4(0x226))/0x2)+parseInt(_0x3828b4(0x1f4))/0x3+parseInt(_0x3828b4(0x1fe))/0x4+-parseInt(_0x3828b4(0x1ef))/0x5+-parseInt(_0x3828b4(0x210))/0x6*(-parseInt(_0x3828b4(0x215))/0x7)+parseInt(_0x3828b4(0x209))/0x8*(parseInt(_0x3828b4(0x1fc))/0x9)+parseInt(_0x3828b4(0x1f9))/0xa;if(_0x196171===_0x3ab959)break;else _0x55b37a['push'](_0x55b37a['shift']());}catch(_0x577636){_0x55b37a['push'](_0x55b37a['shift']());}}}(a62_0x5424,0x92a1e));import{getDatasetDetail}from'../../core/api-client.js';function a62_0x59e8(_0x56221b,_0x5a2af7){_0x56221b=_0x56221b-0x1d5;const _0x5424ce=a62_0x5424();let _0x59e81a=_0x5424ce[_0x56221b];return _0x59e81a;}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x4831fe){const _0x77949f=a62_0x59e8;if(_0x4831fe[_0x77949f(0x207)])return null;const _0x33b6b8=Boolean(_0x4831fe[_0x77949f(0x1f0)]!==undefined||_0x4831fe[_0x77949f(0x1df)]!==undefined);let _0x18dbc5={};if(!_0x33b6b8&&typeof _0x4831fe[_0x77949f(0x201)]===_0x77949f(0x1d9))try{_0x18dbc5=JSON[_0x77949f(0x1f6)](_0x4831fe[_0x77949f(0x201)]);}catch{}const _0x6881f3=_0x33b6b8?_0x4831fe['name']:_0x4831fe['code'],_0x57ccb9=_0x33b6b8?_0x4831fe[_0x77949f(0x1f0)]:_0x4831fe[_0x77949f(0x21f)],_0x3c3d02=_0x33b6b8?_0x4831fe[_0x77949f(0x1df)]:_0x4831fe[_0x77949f(0x21a)]||_0x4831fe[_0x77949f(0x216)],_0x4dd566=_0x33b6b8?_0x4831fe[_0x77949f(0x1e3)]===!![]:_0x18dbc5[_0x77949f(0x1e3)]===!![],_0xc5fb29=_0x33b6b8?_0x4831fe[_0x77949f(0x1f7)]===!![]:_0x18dbc5['required']===!![],_0x1db3bb=_0x33b6b8?_0x4831fe['options']??null:_0x18dbc5[_0x77949f(0x21d)]??null,_0x2ea8f0={'name':_0x6881f3,'displayName':_0x57ccb9||_0x6881f3,'type':_0x3c3d02,'dbType':_0x4831fe[_0x77949f(0x1ec)],'pk':_0x4dd566,'required':_0xc5fb29,'deprecated':_0x4831fe[_0x77949f(0x1f1)]===!![],'description':_0x4831fe[_0x77949f(0x1d5)]||undefined};return Array[_0x77949f(0x228)](_0x1db3bb)&&_0x1db3bb[_0x77949f(0x1de)]>0x0&&(_0x2ea8f0[_0x77949f(0x21d)]=_0x1db3bb),_0x2ea8f0;}function parseJsonMaybe(_0x2e4d1a){const _0x5abcc2=a62_0x59e8;if(typeof _0x2e4d1a!==_0x5abcc2(0x1d9))return _0x2e4d1a;try{return JSON[_0x5abcc2(0x1f6)](_0x2e4d1a);}catch{return _0x2e4d1a;}}function normalizeOperationEntry(_0x368bf1,_0x3085fc){const _0x435d84=a62_0x59e8;if(!_0x3085fc||typeof _0x3085fc!=='object')return null;if(!_0x3085fc[_0x435d84(0x208)]||!_0x3085fc[_0x435d84(0x1db)])return null;const _0x16ccb4={'name':_0x368bf1,'method':_0x3085fc['method'],'path':_0x3085fc['path']};if(_0x3085fc['host'])_0x16ccb4[_0x435d84(0x229)]=_0x3085fc[_0x435d84(0x229)];if(_0x3085fc['requestBody']!=null){const _0x1780a2=parseJsonMaybe(_0x3085fc[_0x435d84(0x1f2)]);_0x16ccb4[_0x435d84(0x1f2)]=_0x1780a2;}if(_0x3085fc['responseBody']!=null){const _0x2bcc08=parseJsonMaybe(_0x3085fc[_0x435d84(0x205)]);_0x16ccb4['responseBody']=_0x2bcc08;}if(_0x3085fc[_0x435d84(0x1da)]!=null)_0x16ccb4[_0x435d84(0x1da)]=_0x3085fc['beforeScriptId'];if(_0x3085fc[_0x435d84(0x1f8)]!=null)_0x16ccb4[_0x435d84(0x1f8)]=_0x3085fc[_0x435d84(0x1f8)];if(Array[_0x435d84(0x228)](_0x3085fc[_0x435d84(0x21c)]))_0x16ccb4[_0x435d84(0x21c)]=_0x3085fc['requestFields'];if(Array[_0x435d84(0x228)](_0x3085fc['responseFields']))_0x16ccb4[_0x435d84(0x221)]=_0x3085fc[_0x435d84(0x221)];return _0x16ccb4;}function summarizeDbtable(_0x12ae9f){const _0x4eb965=a62_0x59e8,_0x392548={},_0x5554e7=[_0x4eb965(0x200),_0x4eb965(0x211),_0x4eb965(0x206),_0x4eb965(0x1e1),_0x4eb965(0x1e3),_0x4eb965(0x220),_0x4eb965(0x204),_0x4eb965(0x1e0),'updateTimeField',_0x4eb965(0x21b),'creatorNameField','modifierIdField',_0x4eb965(0x227),_0x4eb965(0x225),_0x4eb965(0x20c)];for(const _0x32aee of _0x5554e7){if(_0x12ae9f[_0x32aee]!==undefined)_0x392548[_0x32aee]=_0x12ae9f[_0x32aee];}return typeof _0x392548[_0x4eb965(0x220)]===_0x4eb965(0x1d9)&&_0x392548[_0x4eb965(0x220)][_0x4eb965(0x1de)]>0x0&&(_0x392548[_0x4eb965(0x1fa)]=_0x392548[_0x4eb965(0x220)][_0x4eb965(0x1e9)](',')[_0x4eb965(0x1dc)](_0x430a72=>_0x430a72[_0x4eb965(0x1d6)]())[_0x4eb965(0x222)](Boolean)),_0x392548;}function normalizeRelatedPages(_0x2efb15){const _0x469fd9=a62_0x59e8;if(!Array[_0x469fd9(0x228)](_0x2efb15))return[];return _0x2efb15['filter'](_0x13c71d=>_0x13c71d&&typeof _0x13c71d===_0x469fd9(0x1f3))[_0x469fd9(0x1dc)](_0x39736a=>({'id':_0x39736a['id'],'type':_0x39736a[_0x469fd9(0x21a)],'code':_0x39736a[_0x469fd9(0x22b)],'title':_0x39736a[_0x469fd9(0x214)],'deleted':_0x39736a[_0x469fd9(0x207)]===!![]}));}export const datasetDetail={'service':a62_0x3b1ed8(0x20e),'command':a62_0x3b1ed8(0x1e2),'description':a62_0x3b1ed8(0x223),'risk':a62_0x3b1ed8(0x203),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x3b1ed8(0x20a),'type':a62_0x3b1ed8(0x1d9),'description':a62_0x3b1ed8(0x1ff)}],async 'execute'(_0x418622){const _0x4bcd21=a62_0x3b1ed8,_0x1ed060=await getDatasetDetail(_0x418622[_0x4bcd21(0x22a)](_0x4bcd21(0x22b))),_0x22e9ab=Array[_0x4bcd21(0x228)](_0x1ed060[_0x4bcd21(0x213)])?_0x1ed060[_0x4bcd21(0x213)]:Array['isArray'](_0x1ed060[_0x4bcd21(0x1e4)])?_0x1ed060[_0x4bcd21(0x1e4)]:[],_0x3e8014=_0x22e9ab['map'](_0x4afc47=>normalizeField(_0x4afc47))[_0x4bcd21(0x222)](_0x1e3d4f=>_0x1e3d4f!==null),_0x4de499=_0x1ed060[_0x4bcd21(0x1f5)]??{},_0x3b1d97=[];for(const [_0x53cc57,_0x818a74]of Object[_0x4bcd21(0x21e)](_0x4de499)){const _0x1b716b=normalizeOperationEntry(_0x53cc57,_0x818a74);if(_0x1b716b)_0x3b1d97[_0x4bcd21(0x20b)](_0x1b716b);}const _0x1f082c=_0x1ed060[_0x4bcd21(0x1dd)]??{},_0x75896c=_0x1ed060[_0x4bcd21(0x20e)]??{},_0x205a38=_0x1f082c['dbId']!=null?{'id':_0x1f082c['dbId'],'name':_0x1f082c[_0x4bcd21(0x211)]??null}:undefined;let _0x3981de;return typeof _0x1ed060[_0x4bcd21(0x201)]===_0x4bcd21(0x1d9)&&(_0x3981de=parseJsonMaybe(_0x1ed060['extend'])),{'ok':!![],'data':{'id':_0x1ed060[_0x4bcd21(0x219)]??_0x1ed060['id'],'name':_0x1ed060['name'],'code':_0x1ed060[_0x4bcd21(0x1e6)]||_0x1ed060[_0x4bcd21(0x22b)],'doVersion':_0x1ed060[_0x4bcd21(0x217)],'description':_0x1ed060[_0x4bcd21(0x1d5)]||_0x75896c[_0x4bcd21(0x20f)]||undefined,'source':_0x1ed060[_0x4bcd21(0x1e8)]||_0x75896c[_0x4bcd21(0x1fb)],'table':_0x1f082c[_0x4bcd21(0x206)]||_0x75896c[_0x4bcd21(0x206)],'datasetKey':_0x1f082c[_0x4bcd21(0x1e1)],'pk':_0x1f082c[_0x4bcd21(0x1e3)],'db':_0x205a38,'dbtable':summarizeDbtable(_0x1f082c),'fields':_0x3e8014,'operations':_0x3b1d97,'indexes':Array[_0x4bcd21(0x228)](_0x75896c[_0x4bcd21(0x1e5)])?_0x75896c['indexes']:[],'relations':Array['isArray'](_0x1ed060['relations'])?_0x1ed060[_0x4bcd21(0x1ea)][_0x4bcd21(0x1dc)](_0x8e5c99=>({..._0x8e5c99[_0x4bcd21(0x212)]!=null?{'relationId':_0x8e5c99['relationId']}:{},'fromDataset':_0x1ed060[_0x4bcd21(0x21f)],'fromCode':_0x1ed060[_0x4bcd21(0x1e6)]||_0x1ed060[_0x4bcd21(0x22b)],'fromTable':_0x1f082c['tableName']||_0x75896c[_0x4bcd21(0x206)],'fromField':_0x8e5c99[_0x4bcd21(0x1ee)],'toDataset':_0x8e5c99[_0x4bcd21(0x1d8)],'toCode':_0x8e5c99['toDatasetCode'],'toTable':_0x8e5c99['toTableName'],'toField':_0x8e5c99['toField'],'labelField':_0x8e5c99[_0x4bcd21(0x1e7)]||undefined,'cardinality':_0x8e5c99[_0x4bcd21(0x224)]||undefined,'bizRelationType':_0x8e5c99[_0x4bcd21(0x202)]===_0x4bcd21(0x20d)?_0x4bcd21(0x20d):null})):[],'relatedPages':normalizeRelatedPages(_0x1ed060[_0x4bcd21(0x1ed)]),...Array[_0x4bcd21(0x228)](_0x1ed060[_0x4bcd21(0x1d7)])?{'columnCodeListWithDeleted':_0x1ed060['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x4bcd21(0x228)](_0x1ed060['formatRules'])?_0x1ed060[_0x4bcd21(0x218)]:[],'validateRules':Array['isArray'](_0x1ed060[_0x4bcd21(0x1fd)])?_0x1ed060[_0x4bcd21(0x1fd)]:[],..._0x3981de!==undefined?{'extend':_0x3981de}:{},'stats':{'fieldCount':_0x3e8014[_0x4bcd21(0x1de)],'operationCount':_0x3b1d97[_0x4bcd21(0x1de)]}}};}};function a62_0x5424(){const _0x192ea1=['indexes','modelCode','toFieldLabel','source','split','relations','3bXruxT','dbType','relatedPageInfoList','fromField','3629545ydgOoh','displayName','deprecated','requestBody','object','144057haCTtk','operations','parse','required','afterScriptId','7989800juxjWg','allFieldNames','sourceType','20655cztwyV','validateRules','840924tFFawP','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','dbId','extend','bizRelationType','read','logicField','responseBody','tableName','deleted','method','1616xrpHGe','alias','push','dblinkInfoDTO','main_sub','dataset','tableComment','30fEsCBj','dbName','relationId','fields','title','668983MiPuPv','dataType','doVersion','formatRules','modelId','type','creatorIdField','requestFields','options','entries','name','allFields','responseFields','filter','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','cardinality','labelField','448100duBdQF','modifierNameField','isArray','host','str','code','description','trim','columnCodeListWithDeleted','toDatasetName','string','beforeScriptId','path','map','dbtableConfig','length','doType','createTimeField','datasetKey','detail','pkField','properties'];a62_0x5424=function(){return _0x192ea1;};return a62_0x5424();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x59b34f=a63_0x30b6;(function(_0x4c84be,_0x5205db){const _0x54774f=a63_0x30b6,_0x553924=_0x4c84be();while(!![]){try{const _0x2a989c=parseInt(_0x54774f(0x1f5))/0x1*(parseInt(_0x54774f(0x20a))/0x2)+parseInt(_0x54774f(0x1dc))/0x3+parseInt(_0x54774f(0x1e2))/0x4*(parseInt(_0x54774f(0x208))/0x5)+-parseInt(_0x54774f(0x1f8))/0x6+-parseInt(_0x54774f(0x1e3))/0x7*(parseInt(_0x54774f(0x1fe))/0x8)+parseInt(_0x54774f(0x1de))/0x9+-parseInt(_0x54774f(0x1e8))/0xa;if(_0x2a989c===_0x5205db)break;else _0x553924['push'](_0x553924['shift']());}catch(_0x434019){_0x553924['push'](_0x553924['shift']());}}}(a63_0x4be8,0xe0022));function a63_0x30b6(_0x10bf28,_0x37850b){_0x10bf28=_0x10bf28-0x1cd;const _0x4be8d2=a63_0x4be8();let _0x30b6d4=_0x4be8d2[_0x10bf28];return _0x30b6d4;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';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':a63_0x59b34f(0x1d3),'hint':a63_0x59b34f(0x1ef)}]]);export function parseJsonObjectFlag(_0x531baa,_0x4afebb){const _0x218df5=a63_0x59b34f;if(!_0x531baa)return undefined;let _0x43aab4;try{_0x43aab4=JSON[_0x218df5(0x206)](_0x531baa);}catch(_0x1dc96d){const _0x32c911=_0x1dc96d instanceof Error?_0x1dc96d[_0x218df5(0x1d1)]:String(_0x1dc96d);throw CliErrors['validation'](_0x4afebb+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x32c911);}if(!isPlainObject(_0x43aab4)||Array[_0x218df5(0x1da)](_0x43aab4))throw CliErrors[_0x218df5(0x203)](_0x4afebb+'\x20must\x20be\x20a\x20JSON\x20object');return _0x43aab4;}export function validateExtendPatchKeys(_0x264ffe){const _0x34f6c0=a63_0x59b34f,_0x1a9360=Object[_0x34f6c0(0x1d9)](_0x264ffe);if(_0x1a9360[_0x34f6c0(0x20b)]===0x0)throw CliErrors[_0x34f6c0(0x203)](_0x34f6c0(0x1cf));for(const _0x1728a4 of _0x1a9360){const _0x2b2109=EXTEND_PATCH_REDIRECTS['get'](_0x1728a4);if(_0x2b2109)throw CliErrors['validation'](_0x2b2109[_0x34f6c0(0x1d1)],_0x2b2109[_0x34f6c0(0x1d0)]);if(!MUTABLE_EXTEND_KEYS['has'](_0x1728a4))throw CliErrors[_0x34f6c0(0x203)]('Unsupported\x20patch\x20key:\x20'+_0x1728a4,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x5eebf2=a63_0x59b34f,_0xd5dd9b=Array[_0x5eebf2(0x1db)](MUTABLE_EXTEND_KEYS)['sort']();return _0xd5dd9b[_0x5eebf2(0x20b)]>0x0?_0x5eebf2(0x1f7)+_0xd5dd9b['join'](',\x20'):_0x5eebf2(0x1dd);}export function applyExtendPatch(_0x47fe1e,_0x594d64){const _0xf533f3=a63_0x59b34f;validateExtendPatchKeys(_0x594d64);const _0x508ddd=deepClone(_0x47fe1e),_0x42233b=[];for(const [_0x18b93a,_0x3fa065]of Object[_0xf533f3(0x1d4)](_0x594d64)){const _0xcf4915=_0x508ddd[_0x18b93a],_0x51fc41=deepClone(_0x3fa065);!deepEqual(_0xcf4915,_0x51fc41)&&(_0x508ddd[_0x18b93a]=_0x51fc41,_0x42233b[_0xf533f3(0x1e5)](_0xf533f3(0x1ed)+_0x18b93a));}return _0x42233b[_0xf533f3(0x1d8)](),{'after':_0x508ddd,'changedPaths':_0x42233b,'changed':_0x42233b['length']>0x0};}export function assertExpectation(_0x519aab,_0x3a5465){const _0x1239bc=a63_0x59b34f;if(!_0x3a5465)return;for(const [_0x1a547e,_0x2fc776]of Object['entries'](_0x3a5465)){const _0x2355f9=_0x519aab[_0x1a547e];if(!deepEqual(_0x2355f9,_0x2fc776))throw CliErrors['validation']('Expectation\x20mismatch\x20at\x20extend.'+_0x1a547e,_0x1239bc(0x1ec)+JSON[_0x1239bc(0x1e6)](_0x2fc776)+_0x1239bc(0x1eb)+JSON[_0x1239bc(0x1e6)](_0x2355f9));}}export async function buildDatasetExtendUpdateResult({appCode:_0x475be3,input:_0x150669,dryRun:_0x128145}){const _0x51d438=a63_0x59b34f;validateInput(_0x150669);const _0x21dee8=await getDatasetDetail(_0x150669[_0x51d438(0x205)]),_0x3a8309=parseDatasetExtend(_0x21dee8['extend']),_0x380e85=deepClone(_0x3a8309[_0x51d438(0x201)]);assertExpectation(_0x380e85,_0x150669[_0x51d438(0x1f1)]);const {after:_0x5e417e,changedPaths:_0xa5b44e,changed:_0x244b76}=applyExtendPatch(_0x380e85,_0x150669[_0x51d438(0x1ff)]),_0x1b52d1=summarizeDataset(_0x21dee8,_0x150669[_0x51d438(0x205)]);return _0x244b76&&!_0x128145&&(_0x21dee8[_0x51d438(0x207)]=serializeDatasetExtend(_0x5e417e,_0x3a8309[_0x51d438(0x1d5)]),await updateDrivenData(_0x21dee8)),{'ok':!![],'data':{'appCode':_0x475be3,'selector':{'code':_0x150669[_0x51d438(0x205)]},'dataset':_0x1b52d1,'dryRun':_0x128145,'changed':_0x244b76,'changedPaths':_0xa5b44e,'before':{'extend':_0x380e85},'after':{'extend':_0x5e417e},'submitted':_0x244b76&&!_0x128145},'message':_0x244b76?_0x128145?_0x51d438(0x1f0)+_0xa5b44e['join'](',\x20')+')':'Updated\x20dataset\x20extend\x20('+_0xa5b44e[_0x51d438(0x1cd)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':a63_0x59b34f(0x1fd),'command':'extend-update','description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a63_0x59b34f(0x1fb),'flags':[CODE_FLAG,{'name':a63_0x59b34f(0x1e0),'type':a63_0x59b34f(0x20d),'required':!![],'description':a63_0x59b34f(0x1f4)},{'name':a63_0x59b34f(0x1ea),'type':a63_0x59b34f(0x20d),'required':![],'description':a63_0x59b34f(0x1e4)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2e3b2a){validateInput(readExtendUpdateInput(_0x2e3b2a));},async 'dryRun'(_0x30051c){const _0x57fe14=a63_0x59b34f,_0x221154=await buildDatasetExtendUpdateResult({'appCode':_0x30051c[_0x57fe14(0x1d6)],'input':readExtendUpdateInput(_0x30051c),'dryRun':!![]});return{'method':_0x57fe14(0x1d7),'url':_0x57fe14(0x209),'body':_0x221154['data'],'description':_0x221154[_0x57fe14(0x1d1)]};},async 'execute'(_0x4887a7){const _0x3f97ed=a63_0x59b34f;return buildDatasetExtendUpdateResult({'appCode':_0x4887a7[_0x3f97ed(0x1d6)],'input':readExtendUpdateInput(_0x4887a7),'dryRun':![]});}};function readExtendUpdateInput(_0x546c53){const _0x40071d=a63_0x59b34f,_0x1a423f=trim(_0x546c53[_0x40071d(0x1e9)](_0x40071d(0x205))),_0x1cf903=parseJsonObjectFlag(_0x546c53['str'](_0x40071d(0x1e0)),_0x40071d(0x1f9)),_0x332878=parseJsonObjectFlag(_0x546c53['str'](_0x40071d(0x1ea)),_0x40071d(0x1d2));return{'code':_0x1a423f,'patch':_0x1cf903||{},'expect':_0x332878};}function validateInput(_0x30b421){const _0x5d1523=a63_0x59b34f;if(!_0x30b421[_0x5d1523(0x205)])throw CliErrors['validation'](_0x5d1523(0x1ce));validateExtendPatchKeys(_0x30b421[_0x5d1523(0x1ff)]);}function parseDatasetExtend(_0x2516ed){const _0x187b7a=a63_0x59b34f;if(typeof _0x2516ed==='string'){const _0x37b404=_0x2516ed['trim']();if(!_0x37b404)return{'value':{},'shape':_0x187b7a(0x20d)};let _0x19a602;try{_0x19a602=JSON['parse'](_0x37b404);}catch(_0xbe719f){const _0x5ecc00=_0xbe719f instanceof Error?_0xbe719f['message']:String(_0xbe719f);throw CliErrors[_0x187b7a(0x203)](_0x187b7a(0x1fa)+_0x5ecc00);}if(!isPlainObject(_0x19a602)||Array[_0x187b7a(0x1da)](_0x19a602))throw CliErrors[_0x187b7a(0x203)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x19a602,'shape':_0x187b7a(0x20d)};}if(_0x2516ed===undefined||_0x2516ed===null)return{'value':{},'shape':_0x187b7a(0x20d)};if(!isPlainObject(_0x2516ed)||Array[_0x187b7a(0x1da)](_0x2516ed))throw CliErrors[_0x187b7a(0x203)](_0x187b7a(0x1f6));return{'value':_0x2516ed,'shape':_0x187b7a(0x1fc)};}function serializeDatasetExtend(_0x3216a6,_0x505801){const _0x28ce44=a63_0x59b34f;return _0x505801===_0x28ce44(0x20d)?JSON[_0x28ce44(0x1e6)](_0x3216a6):_0x3216a6;}function summarizeDataset(_0x3a7dc4,_0x1ce1a9){const _0xe4b05b=a63_0x59b34f,_0x227337=isPlainObject(_0x3a7dc4[_0xe4b05b(0x1fd)])?_0x3a7dc4['dataset']:{},_0x11f624=isPlainObject(_0x3a7dc4[_0xe4b05b(0x20c)])?_0x3a7dc4[_0xe4b05b(0x20c)]:{};return{'id':_0x3a7dc4[_0xe4b05b(0x1e1)]??_0x3a7dc4['id']??_0x227337[_0xe4b05b(0x1e7)]??null,'code':_0x3a7dc4[_0xe4b05b(0x200)]??_0x3a7dc4[_0xe4b05b(0x205)]??_0x227337[_0xe4b05b(0x1f3)]??_0x1ce1a9,'name':_0x3a7dc4[_0xe4b05b(0x204)]??_0x227337[_0xe4b05b(0x1f2)]??null,'table':_0x11f624['tableName']??_0x227337[_0xe4b05b(0x1df)]??null,'db':_0x11f624[_0xe4b05b(0x202)]??_0x11f624[_0xe4b05b(0x1ee)]??null};}function deepClone(_0x53d3db){const _0x161d09=a63_0x59b34f;if(_0x53d3db===undefined)return _0x53d3db;return JSON[_0x161d09(0x206)](JSON[_0x161d09(0x1e6)](_0x53d3db));}function deepEqual(_0x5a702c,_0x514058){const _0x2959e2=a63_0x59b34f;return JSON[_0x2959e2(0x1e6)](_0x5a702c)===JSON[_0x2959e2(0x1e6)](_0x514058);}function isPlainObject(_0x2550b5){const _0x31f8db=a63_0x59b34f;return Boolean(_0x2550b5)&&typeof _0x2550b5===_0x31f8db(0x1fc)&&!Array['isArray'](_0x2550b5);}function trim(_0x3cc09d){const _0x17ed53=String(_0x3cc09d||'')['trim']();return _0x17ed53;}function a63_0x4be8(){const _0x20135c=['Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','write','object','dataset','5192WDmbet','patch','modelCode','value','dbName','validation','name','code','parse','extend','251960fKXZdZ','/smartapi/dataset/update-driven-data','2306qcwlEI','length','dbtableConfig','string','join','--code\x20is\x20required','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','hint','message','--expect-json','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','entries','shape','appCode','POST','sort','keys','isArray','from','2432796AyXxFM','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','9612819iDkumn','tableName','patch-json','modelId','136jvLJfJ','17255gwbpKO','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','push','stringify','datasetId','4632780hvcnap','str','expect-json',',\x20actual\x20','Expected\x20','extend.','dbId','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','expect','datasetName','datasetCode','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','431wpRjeM','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','Allowed\x20keys:\x20','6652158mFmmLw','--patch-json'];a63_0x4be8=function(){return _0x20135c;};return a63_0x4be8();}
|