@lovrabet/rabetbase-cli 2.4.3 → 2.4.4
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
|
@@ -14,7 +14,7 @@ tags: [page, layout, page-schema]
|
|
|
14
14
|
|
|
15
15
|
| 类型 | 判断条件 | 特点 | 场景 |
|
|
16
16
|
|------|----------|------|------|
|
|
17
|
-
| 磁贴布局 | 包含 `YtRglContainer` | 网格定位、支持并排 |
|
|
17
|
+
| 磁贴布局 | 包含 `YtRglContainer` | 网格定位、支持并排 | 多区域表单、列表与详情组合 |
|
|
18
18
|
| 流式布局 | 无 `YtRglContainer` | 上下排列 | 表单页、详情页 |
|
|
19
19
|
|
|
20
20
|
---
|
|
@@ -56,7 +56,6 @@ tags: [page, layout, page-schema]
|
|
|
56
56
|
|------|------|
|
|
57
57
|
| 每行总宽度 | 必须为 12 |
|
|
58
58
|
| Filter/Table | 必须独占一行(w: 12) |
|
|
59
|
-
| 图表并排 | 两个图表各占 w: 6 |
|
|
60
59
|
|
|
61
60
|
---
|
|
62
61
|
|
|
@@ -83,31 +82,6 @@ tags: [page, layout, page-schema]
|
|
|
83
82
|
|
|
84
83
|
## 常见布局场景
|
|
85
84
|
|
|
86
|
-
### 并排图表
|
|
87
|
-
|
|
88
|
-
```json
|
|
89
|
-
{
|
|
90
|
-
"RGLlayout": [
|
|
91
|
-
{"i": "chart1", "w": 6, "h": 20, "x": 0, "y": 0},
|
|
92
|
-
{"i": "chart2", "w": 6, "h": 20, "x": 6, "y": 0}
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### 统计卡 + 图表
|
|
98
|
-
|
|
99
|
-
```json
|
|
100
|
-
{
|
|
101
|
-
"RGLlayout": [
|
|
102
|
-
{"i": "stat1", "w": 3, "h": 10, "x": 0, "y": 0},
|
|
103
|
-
{"i": "stat2", "w": 3, "h": 10, "x": 3, "y": 0},
|
|
104
|
-
{"i": "stat3", "w": 3, "h": 10, "x": 6, "y": 0},
|
|
105
|
-
{"i": "stat4", "w": 3, "h": 10, "x": 9, "y": 0},
|
|
106
|
-
{"i": "chart1", "w": 12, "h": 20, "x": 0, "y": 10}
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
```
|
|
110
|
-
|
|
111
85
|
### Filter + Table
|
|
112
86
|
|
|
113
87
|
```json
|
|
@@ -151,19 +125,11 @@ tags: [page, layout, page-schema]
|
|
|
151
125
|
"componentName": "YtRglContainer",
|
|
152
126
|
"props": {
|
|
153
127
|
"RGLlayout": [
|
|
154
|
-
{"i": "
|
|
155
|
-
{"i": "
|
|
156
|
-
{"i": "node_stat3", "w": 3, "h": 8, "x": 6, "y": 0},
|
|
157
|
-
{"i": "node_stat4", "w": 3, "h": 8, "x": 9, "y": 0},
|
|
158
|
-
{"i": "node_filter", "w": 12, "h": 10, "x": 0, "y": 8, "autoHeight": true},
|
|
159
|
-
{"i": "node_table", "w": 12, "h": 30, "x": 0, "y": 18}
|
|
128
|
+
{"i": "node_filter", "w": 12, "h": 10, "x": 0, "y": 0, "autoHeight": true},
|
|
129
|
+
{"i": "node_table", "w": 12, "h": 30, "x": 0, "y": 10}
|
|
160
130
|
]
|
|
161
131
|
},
|
|
162
132
|
"children": [
|
|
163
|
-
{"id": "node_stat1", "componentName": "LrSmartStatistic"},
|
|
164
|
-
{"id": "node_stat2", "componentName": "LrSmartStatistic"},
|
|
165
|
-
{"id": "node_stat3", "componentName": "LrSmartStatistic"},
|
|
166
|
-
{"id": "node_stat4", "componentName": "LrSmartStatistic"},
|
|
167
133
|
{"id": "node_filter", "componentName": "LrSmartFilter"},
|
|
168
134
|
{"id": "node_table", "componentName": "LrSmartTable"}
|
|
169
135
|
]
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
| 路由 | 使用 `navigate` 跳转、使用 `location` 读取地址,不使用 `window.location` |
|
|
24
24
|
| 样式 | 使用 Ant Design CSS 变量,不写死颜色或其他样式常量 |
|
|
25
25
|
| 数据访问 | `client` 支持当前页面可用的全部 `@lovrabet/sdk` 能力,先确认数据集、SQL 或 BFF 的事实与 SDK 调用方式,再使用 `client` |
|
|
26
|
+
| 图表 | 使用 `echarts@5` 构建图表、统计卡片与数据大屏;ECharts 只负责呈现,不承担数据访问或权限判断 |
|
|
26
27
|
|
|
27
28
|
### 依赖白名单(严格)
|
|
28
29
|
|
|
@@ -97,10 +98,18 @@ export default App;
|
|
|
97
98
|
| 方式 | 优先考虑的场景 | 使用边界 |
|
|
98
99
|
| --- | --- | --- |
|
|
99
100
|
| 单一数据集请求 | 只涉及一个数据集的列表查询、详情读取、分页、筛选、创建、更新或删除,且业务逻辑主要由数据集模型能力完成 | 优先使用 API-doc 中确认过的 `client.models` 方法;不要为简单的数据集操作改用 SQL 或 BFF,也不要猜测未在 API-doc 中出现的字段和参数 |
|
|
100
|
-
|
|
|
101
|
-
| BFF |
|
|
101
|
+
| Custom SQL | 需要一次查询组合多个数据集,或需要数据库完成明确的关联、聚合、分组、排序、计算和复杂筛选 | 先复用或按 SQL 工作流创建、校验并发布 Custom SQL,再通过 `client.sql.execute({ sqlCode, params })` 调用;不要在页面中拼接 SQL、把 SQL 当作通用业务逻辑容器,或据 CLI 的 `data.rows` 推断运行时返回值 |
|
|
102
|
+
| BFF | 需要基于当前用户、角色、数据范围或业务规则额外鉴权,或需要转换、加密、条件分支、多步编排和外部服务 | 将校验与业务逻辑放在已确认的 BFF 中,由页面通过 SDK 调用;前端只传业务参数,BFF 内按需执行已发布的 Custom SQL;不要用 BFF 包装本可直接完成的简单查询 |
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
选择顺序:先判断单一数据集请求是否能直接满足需求;仅在数据组合或数据库计算是主要问题时使用 Custom SQL;当当前用户、角色、数据范围或业务规则需要额外控制时使用 BFF。三种方式的具体方法、参数、返回值和异常形态,均以当前资源事实和 `@lovrabet/sdk` 使用规范为准。
|
|
105
|
+
|
|
106
|
+
页面和 BFF 通过已发布 Custom SQL 的 `sqlCode` + `params` 执行查询。执行失败时保留并报告原始错误,根据 SQL 资源状态、参数与权限定位问题。
|
|
107
|
+
|
|
108
|
+
### 图表与统计页面
|
|
109
|
+
|
|
110
|
+
- 使用 `echarts@5` 构建图表、统计卡片和数据大屏,复用 React 组件生命周期管理图表实例。
|
|
111
|
+
- ECharts option 只负责数据映射与呈现,数据通过 Dataset、已发布的 Custom SQL 或受控 BFF 获取。
|
|
112
|
+
- ECharts 不做权限判断;需要额外用户、角色或数据范围控制时由 BFF 承担。
|
|
104
113
|
|
|
105
114
|
### 国际化与样式
|
|
106
115
|
|
|
@@ -161,11 +170,13 @@ const client = useSdkClient();
|
|
|
161
170
|
|
|
162
171
|
- 数据集模型调用(如 `models.<dataset>`)的调用标识、方法、参数、返回值和异常形态,严格以当前数据集的 API-doc 返回文档为准,不得自行推测或自由发挥
|
|
163
172
|
- SQL、BFF 及其他非数据集能力的可用方法、参数、返回值和异常形态,均以 `@lovrabet/sdk` 的使用规范为准
|
|
173
|
+
- 页面通过已发布 Custom SQL 的 `sqlCode` + `params` 执行查询
|
|
164
174
|
- 页面调用 SQL 前,先用 `rabetbase sql list` 与 `rabetbase sql detail --sqlcode <sqlCode>` 确认目标资源
|
|
165
175
|
- 生成使用自定义 SQL 的页面代码前,使用代表性参数执行 `rabetbase sql exec --sqlcode <sqlCode> --params <json> --format json`。若返回 `data.error`,先解决执行错误;成功后再根据 `data.rows` 与 `data.rowCount` 确认实际数据结构
|
|
166
176
|
- `sql exec` 仅用于确认 SQL 可执行及返回数据结构。页面代码按 `@lovrabet/sdk` 的使用规范处理 `client.sql` 的返回值,不使用 CLI 输出字段 `data.rows`
|
|
167
177
|
- 页面调用 BFF 前,先用 `rabetbase bff list` 与 `rabetbase bff detail --id <id>` 确认目标资源
|
|
168
178
|
- 数据操作需要注入自定义业务逻辑,例如校验、转换或加密时,优先考虑使用 BFF;页面运行时通过 `client` 按 `@lovrabet/sdk` 规范调用已确认的 BFF
|
|
179
|
+
- Dataset、Custom SQL 或 BFF 执行失败时保留并报告原始错误,根据资源状态、参数与权限定位问题
|
|
169
180
|
- CLI 只用于读取 SQL 与 BFF 的资源事实,页面运行时仍通过 `client` 调用,不在页面中拼接 CLI 命令或平台接口
|
|
170
181
|
- 不在文档中出现的 dataset 字段、参数名、返回形态、方法名不得猜测
|
|
171
182
|
- `client` 只是页面内可直接调用的入口,页面侧不在本地重新创建 `createClient` 或重复注册模型
|
|
@@ -11,7 +11,7 @@ rabetbase app-config list --format compress
|
|
|
11
11
|
rabetbase app-config get <key> --format compress
|
|
12
12
|
rabetbase app-config get <key> --reveal --format compress
|
|
13
13
|
rabetbase app-config set <key> --from-env ENV_NAME --dry-run
|
|
14
|
-
rabetbase app-config set <key> --from-env ENV_NAME
|
|
14
|
+
rabetbase app-config set <key> --from-env ENV_NAME
|
|
15
15
|
rabetbase app-config delete <key> --dry-run
|
|
16
16
|
rabetbase app-config delete <key> --yes
|
|
17
17
|
```
|
|
@@ -66,7 +66,7 @@ rabetbase app-config set vectorengine.apiKey --file ./secret.txt --dry-run
|
|
|
66
66
|
确认 dry-run 的 `operation`、`selector.appCode`、`selector.key`、`before`、`after` 后,再执行正式写入:
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
rabetbase app-config set vectorengine.apiKey --from-env VECTORENGINE_API_KEY
|
|
69
|
+
rabetbase app-config set vectorengine.apiKey --from-env VECTORENGINE_API_KEY
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
显式位置参数 `<value>` 可用,但不推荐用于敏感值,因为 shell history 可能记录明文。
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
把本地 BFF 脚本上传到远端。
|
|
4
4
|
|
|
5
|
-
> **风险等级:
|
|
5
|
+
> **风险等级:write** — 建议先使用 `--dry-run` 预览。
|
|
6
6
|
|
|
7
7
|
## 命令
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
rabetbase bff push --
|
|
11
|
-
rabetbase bff push --
|
|
10
|
+
rabetbase bff push --format json
|
|
11
|
+
rabetbase bff push --type ENDPOINT --name getUserList --format json
|
|
12
12
|
rabetbase bff push --type ENDPOINT --name getUserList --dry-run --format json
|
|
13
|
-
rabetbase bff push --
|
|
13
|
+
rabetbase bff push --type HOOK --name beforeFilter --format json
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## 参数
|
|
@@ -21,7 +21,6 @@ rabetbase bff push --yes --type HOOK --name beforeFilter --format json
|
|
|
21
21
|
| `--name <name>` | string | 否 | — | 仅推指定函数名;传时必须搭配 `--type` |
|
|
22
22
|
| `--force` | boolean | 否 | — | 忽略 hash 保护强制推送 |
|
|
23
23
|
| `--dry-run` | boolean | 否 | — | 仅预览将要推送的本地脚本 |
|
|
24
|
-
| `--yes` | boolean | 是 | — | 跳过高风险确认 |
|
|
25
24
|
| `--format <fmt>` | string | 否 | `pretty` | 输出格式 |
|
|
26
25
|
|
|
27
26
|
## 输出
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
> - 本地创建:`rabetbase bff create`
|
|
8
8
|
> - 查看状态:`rabetbase bff status`
|
|
9
9
|
> - 预览上传:`rabetbase bff push --dry-run`
|
|
10
|
-
> - 推送远端:`rabetbase bff push
|
|
10
|
+
> - 推送远端:`rabetbase bff push`
|
|
11
11
|
> - 拉取远端:`rabetbase bff pull`
|
|
12
12
|
> - 删除脚本:`rabetbase bff delete --yes --target ...`
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ rabetbase bff save --file ./scripts/getUserInfo.js --name getUserInfo --format j
|
|
|
27
27
|
rabetbase bff create --type ENDPOINT --name getUserInfo --format json
|
|
28
28
|
# 编辑 .rabetbase/bff/<appCode>/ENDPOINT/getUserInfo.js
|
|
29
29
|
rabetbase bff push --dry-run --format json
|
|
30
|
-
rabetbase bff push --
|
|
30
|
+
rabetbase bff push --format json
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
### 旧“更新已有脚本”
|
|
@@ -45,7 +45,7 @@ rabetbase bff pull --format json
|
|
|
45
45
|
# 编辑同步目录中的本地文件
|
|
46
46
|
rabetbase bff status --format json
|
|
47
47
|
rabetbase bff push --dry-run --format json
|
|
48
|
-
rabetbase bff push --
|
|
48
|
+
rabetbase bff push --format json
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
## Agent 规则
|
|
@@ -87,7 +87,7 @@ CLI 对旧版顶层 `appcode` 仍兼容读取,但它已经不是推荐主模
|
|
|
87
87
|
}
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
每个 app profile 可单独覆盖普通顶层字段。`riskLevel` 是安全例外:默认值为 `
|
|
90
|
+
每个 app profile 可单独覆盖普通顶层字段。`riskLevel` 是安全例外:默认值为 `write`,全局、项目与 profile 决定基础上限并取最严格值;环境变量只能继续收紧,不能提权。CLI 运行时根据 `--app <name>` 或 `defaultApp` 选择激活的 profile。权限不足时只能提醒用户手动编辑配置;Agent 和自动化脚本不得自行修改 `riskLevel` 或尝试提权。
|
|
91
91
|
|
|
92
92
|
管理命令(声明式 flags,非位置参数):
|
|
93
93
|
|
|
@@ -112,7 +112,7 @@ rabetbase workspace remove product --yes
|
|
|
112
112
|
| `accessKey` | string | — | Access Key 认证(预留,未来替代 cookie) |
|
|
113
113
|
| `format` | string | — | 默认输出格式。可选值:`json`、`pretty`、`compress`。不设则命令默认 `compress` |
|
|
114
114
|
| `pageSize` | number | — | 默认分页大小,用于 `sql list` 等分页命令 |
|
|
115
|
-
| `riskLevel` | string | `"
|
|
115
|
+
| `riskLevel` | string | `"write"` | 允许执行的最高风险等级。可选值:`read`、`write`、`high-risk-write`。兼容旧名 `maxRisk` |
|
|
116
116
|
| `inherit` | boolean | 省略 | 配置继承模式。**省略**(默认):项目主导,仅从全局白名单继承 cookie/accessKey/locale/format/riskLevel/pageSize,不继承 apps/defaultApp/appcode。**`true`**:全量合并全局+项目(旧行为,需显式开启)。**`false`**:普通字段完全隔离;全局 `riskLevel` 仍作为不可绕过的上限 |
|
|
117
117
|
| `apiDir` | string | `"./src/api"` | `api pull` 生成代码的输出目录 |
|
|
118
118
|
| `template_base_url` | string | 平台默认 CDN | 模板 CDN 基础 URL,一般无需修改 |
|
|
@@ -70,7 +70,7 @@ rabetbase db analyze-status --id 10157 --plan <traceId> --format compress
|
|
|
70
70
|
|
|
71
71
|
必须按 `index` 严格串行:每批独立调用一次 `analyze-start`,并保存一个独立 `planId`。当前批次为 `PENDING / RUNNING / RETRYING / CANCELING` 时继续查询同一 planId;`SUCCESS` 才直接进入下一批;`PARTIAL_SUCCESS` 记录失败事实后继续;`FAILED / CANCELLED` 停止整个批次编排;未知状态停止自动推进。
|
|
72
72
|
|
|
73
|
-
如果 `analyze-start` 没有明确返回 `data.planId
|
|
73
|
+
如果 `analyze-start` 没有明确返回 `data.planId`,停止自动推进且不得盲目重试,因为请求结果可能不确定。全部批次结束后按 `db detail.tableCount` 的 200 表阈值决定直接读取或先执行 `db diff-refresh-start/status`,再执行完整 `db diff --all --changed-only`;只对仍在 `data.toAnalyzeTables` 的非删除表逐表串行恢复一次,最后按同一策略再读取一次完整 diff。
|
|
74
74
|
|
|
75
75
|
显式单批 `analyze-start --tables` 的持久化参数超过 1024 UTF-8 bytes 时,CLI 会在调用 API 前返回 validation error 并提示先运行 `db analyze-batch-plan`。960 是规划安全预算;960 至 1024 bytes 的显式单批仍允许启动。未传 `--tables` 的全量分析不受此保护影响。
|
|
76
76
|
|
|
@@ -101,7 +101,7 @@ rabetbase db analyze-status --id 10157 --plan <traceId> --format compress
|
|
|
101
101
|
| `data.totalElapsedMs` | 从 `firstStartTime` 到 `endTime` 或当前查询时刻的 plan 墙钟耗时;缺少可靠时间戳时为 `null` |
|
|
102
102
|
| `data.hasMultipleAttempts` | `firstStartTime` 与 `startTime` 都有效且不相同时为 `true`,表示服务端开启过后续执行尝试 |
|
|
103
103
|
|
|
104
|
-
`PENDING / RUNNING / RETRYING / CANCELING` 与未知状态都不是终态。不要根据 `failedTables`、`retryCount` 或错误文案推测状态。`PARTIAL_SUCCESS`
|
|
104
|
+
`PENDING / RUNNING / RETRYING / CANCELING` 与未知状态都不是终态。不要根据 `failedTables`、`retryCount` 或错误文案推测状态。`PARTIAL_SUCCESS` 只表示任务已到终态;必须按 200 表阈值刷新或直接复跑 `db diff --all --changed-only` 验证目标差异收敛,才能得出本轮分析完成结论。
|
|
105
105
|
|
|
106
106
|
`analyze-status` 每次只查询一次。轮询时必须继续使用当前任务的同一 `planId`;查询超时、断网或临时 API 失败不等于分析失败,也不得触发新的 `analyze-start`。当前稳定任务状态中没有独立的 `TIMEOUT` 终态。
|
|
107
107
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
## 何时用
|
|
6
6
|
|
|
7
7
|
- 已用 `db list` 拿到 `id`,需要比列表更全的字段
|
|
8
|
+
- 读取 `tableCount`,按 200 张表阈值决定是否先刷新差异结果
|
|
8
9
|
- 需要当前 **`latestAnalysisTraceId`** 查询最新分析状态;取消已知任务时仍使用正在跟踪的原 planId
|
|
9
10
|
|
|
10
11
|
## 命令
|
|
@@ -23,5 +24,7 @@ rabetbase db detail --id 10157 --format compress
|
|
|
23
24
|
|
|
24
25
|
## 参考
|
|
25
26
|
|
|
27
|
+
输出中的 `tableCount` 是当前连接表数量:不大于 200 时通常直接读取 `db diff`;大于 200 时建议先执行 `db diff-refresh-start/status`。字段缺失时不猜测数量,也不隐式刷新。
|
|
28
|
+
|
|
26
29
|
- [database-connection-workflow.md](../guides/database-connection-workflow.md)
|
|
27
30
|
- [SKILL.md](../SKILL.md)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# db diff-refresh-start / diff-refresh-status
|
|
2
|
+
|
|
3
|
+
显式刷新服务端数据库表差异结果。`diff-refresh-start` 为 **write**,只提交一次异步任务;`diff-refresh-status` 为 **read**,只查询一次指定 `traceId`。
|
|
4
|
+
|
|
5
|
+
## 何时刷新
|
|
6
|
+
|
|
7
|
+
- `db detail` 返回 `tableCount > 200`,读取差异前建议刷新。
|
|
8
|
+
- 用户明确要求“实时刷新”或“强制刷新”,无论表数量多少都刷新。
|
|
9
|
+
- `tableCount <= 200` 时服务端通常实时计算差异,默认不刷新。
|
|
10
|
+
|
|
11
|
+
刷新只影响默认 `db diff` 差异视角;`db diff --view all` 本身就是实时全表分页,不需要先刷新差异快照。
|
|
12
|
+
|
|
13
|
+
## 命令
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
rabetbase db diff-refresh-start --id 10157 --format compress
|
|
17
|
+
rabetbase db diff-refresh-status --id 10157 --plan <traceId> --format compress
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 执行规则
|
|
21
|
+
|
|
22
|
+
1. `diff-refresh-start` 只执行一次并保存 `data.traceId`。
|
|
23
|
+
2. 若响应没有明确 `traceId`,结果未知,停止且不得自动重提。
|
|
24
|
+
3. `PENDING / RUNNING / RETRYING` 时继续执行 `data.query.command`,始终查询同一个 traceId。
|
|
25
|
+
4. `SUCCESS` 时执行 `data.lookup.command`,重新读取刷新后的差异结果。
|
|
26
|
+
5. `FAILED / CANCELLED` 为失败终态;报告 `data.status.errorMsg`,不得自动重启。
|
|
27
|
+
6. 未知状态不是终态,停止自动推进或继续只读查询,不猜测成功。
|
|
28
|
+
|
|
29
|
+
## 输出
|
|
30
|
+
|
|
31
|
+
`diff-refresh-start`:
|
|
32
|
+
|
|
33
|
+
- `data.dbLinkId`
|
|
34
|
+
- `data.traceId`
|
|
35
|
+
- `data.status`
|
|
36
|
+
- `data.query.command`
|
|
37
|
+
|
|
38
|
+
`diff-refresh-status`:
|
|
39
|
+
|
|
40
|
+
- `data.status`:服务端原始任务事实
|
|
41
|
+
- `data.knownStatus`:是否属于已知运行态或终态;未知时为 `false` 且不提供自动查询命令
|
|
42
|
+
- `data.isTerminal`
|
|
43
|
+
- `data.isSuccessful`
|
|
44
|
+
- `data.query`:非终态时的同 traceId 查询命令
|
|
45
|
+
- `data.lookup`:仅成功时返回的 `db diff --all --changed-only` 命令
|
|
46
|
+
|
|
47
|
+
差异刷新任务与 schema 分析任务不是同一业务动作。不要用 `diff-refresh-start` 代替 `analyze-start`,也不要把刷新成功描述为数据集分析已经完成。
|
|
48
|
+
|
|
49
|
+
## 参考
|
|
50
|
+
|
|
51
|
+
- [db diff](rabetbase-db-diff.md)
|
|
52
|
+
- [database-connection-workflow.md](../guides/database-connection-workflow.md)
|
|
53
|
+
- [SKILL.md](../SKILL.md)
|
|
@@ -1,57 +1,76 @@
|
|
|
1
1
|
# db diff
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
分页查看数据库表差异或全部数据表。只读。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 两种视角
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
| 视角 | 命令 | 服务端语义 |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| 差异表(默认) | `db diff` | 调用 `getDiffTableByPage`。表数量不大于 200 时服务端通常实时计算;大于 200 时可能读取最近一次差异快照。 |
|
|
10
|
+
| 全部表 | `db diff --view all` | 调用实时分页接口,包含 `ALREADY_ANALYZED`,用于查看无差异表或手动选择重新分析。 |
|
|
11
|
+
|
|
12
|
+
`--all` 始终表示“聚合当前视角的全部分页”,不表示“全部表”。需要全部表必须显式传 `--view all`。
|
|
9
13
|
|
|
10
14
|
## 命令
|
|
11
15
|
|
|
12
16
|
```bash
|
|
17
|
+
# 默认差异表视角
|
|
13
18
|
rabetbase db diff --id 10157 --format compress
|
|
14
|
-
rabetbase db diff --id 10157 --table order --page 1 --pagesize 20 --format compress
|
|
15
19
|
rabetbase db diff --id 10157 --all --changed-only --format compress
|
|
20
|
+
|
|
21
|
+
# 全部表实时视角
|
|
22
|
+
rabetbase db diff --id 10157 --view all --page 1 --pagesize 20 --format compress
|
|
23
|
+
rabetbase db diff --id 10157 --view all --all --format compress
|
|
16
24
|
```
|
|
17
25
|
|
|
18
26
|
## 参数
|
|
19
27
|
|
|
20
28
|
| Flag | 必填 | 说明 |
|
|
21
|
-
|
|
29
|
+
|---|---|---|
|
|
22
30
|
| `--id` | **是** | dblink id |
|
|
31
|
+
| `--view` | 否 | `diff`(默认)或 `all` |
|
|
23
32
|
| `--table` | 否 | 表名模糊过滤 |
|
|
24
33
|
| `--page` / `--pagesize` | 否 | 默认 `1` / `20` |
|
|
25
|
-
| `--all`
|
|
26
|
-
| `--changed-only`
|
|
34
|
+
| `--all` | 否 | 从第 1 页开始按 `pageSize=100` 自动聚合当前视角全部分页;优先级高于 `--page / --pagesize` |
|
|
35
|
+
| `--changed-only` | 否 | 从输出行中排除 `ALREADY_ANALYZED`;保留 `DELETED_TABLE` |
|
|
36
|
+
|
|
37
|
+
## 刷新决策
|
|
38
|
+
|
|
39
|
+
先执行 `db detail --id <id>` 读取 `tableCount`:
|
|
40
|
+
|
|
41
|
+
- `tableCount <= 200`:直接读取 `db diff`;除非用户明确要求,否则不要刷新。
|
|
42
|
+
- `tableCount > 200`:读取前建议按 [`db diff-refresh-start/status`](rabetbase-db-diff-refresh.md) 刷新差异快照。
|
|
43
|
+
- 用户明确要求“实时刷新/强制刷新”:不考虑表数量,执行刷新。
|
|
44
|
+
- 用户明确要求“不刷新/只看现有结果”:直接读取;大库需提示结果可能滞后。
|
|
45
|
+
- `tableCount` 缺失:直接读取并说明新鲜度未知,不要因为未知而隐式发起写任务。
|
|
46
|
+
|
|
47
|
+
`db diff` 是只读命令,绝不隐式启动刷新任务。
|
|
27
48
|
|
|
28
49
|
## 机器可读摘要
|
|
29
50
|
|
|
30
51
|
| 字段 | 语义 |
|
|
31
|
-
|
|
52
|
+
|---|---|
|
|
53
|
+
| `view` | 当前视角:`diff` 或 `all` |
|
|
32
54
|
| `summaryByType` | 本次查询范围内四种 `diffType` 的计数 |
|
|
33
55
|
| `toAnalyzeTables` | 仅包含 `NEW_TABLE` 与 `MODIFIED_TABLE` 的表名,可传给 `analyze-start --tables` |
|
|
34
56
|
| `deletedTables` | 仅包含 `DELETED_TABLE`,供人工确认,不自动分析或清理 |
|
|
35
57
|
| `modifiedFieldDiffs` | 修改表的新增、删除、变更字段摘要 |
|
|
36
58
|
|
|
37
|
-
未传 `--all`
|
|
59
|
+
未传 `--all` 时,派生字段只代表当前页。默认差异视角通常不会返回 `physicalTableCount`、`datasetTableCount` 或 `summary`;CLI 不以 `0` 伪造缺失值。全表实时视角在服务端提供这些字段时会原样返回。
|
|
38
60
|
|
|
39
|
-
## `diffType`
|
|
40
|
-
|
|
41
|
-
接口返回 `IDbTableDiffInfo.diffType`,工作台「数据库连接 → 增量分析」里对每行表的展示文案如下,可与 CLI 输出对照:
|
|
61
|
+
## `diffType` 语义
|
|
42
62
|
|
|
43
63
|
| `diffType` | 界面文案 | 含义 |
|
|
44
|
-
|
|
45
|
-
| `NEW_TABLE`
|
|
46
|
-
| `DELETED_TABLE`
|
|
47
|
-
| `MODIFIED_TABLE`
|
|
48
|
-
| `ALREADY_ANALYZED` | 无差异
|
|
49
|
-
|
|
50
|
-
`DELETED_TABLE` 不会进入 `toAnalyzeTables`。如果自动分页在达到 `totalCount` 前遇到空页或不再产生新的唯一表,命令会失败,不把部分结果当作完整结果返回。
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| `NEW_TABLE` | 表新增 | 物理库中有该表,但尚未纳入或尚未完成上次智能分析。 |
|
|
66
|
+
| `DELETED_TABLE` | 表删除 | 相对上次已分析结果,该表在库侧已不存在或已被移除。 |
|
|
67
|
+
| `MODIFIED_TABLE` | 表修改 | 表仍在,但结构相对上次分析有变化。 |
|
|
68
|
+
| `ALREADY_ANALYZED` | 无差异 | 当前表结构与上次分析结果一致;在 `--view all` 中可供用户主动重新分析。 |
|
|
51
69
|
|
|
52
|
-
|
|
70
|
+
`DELETED_TABLE` 不进入 `toAnalyzeTables`。自动分页在达到 `totalCount` 前遇到空页或没有新增唯一表时,命令失败,不把部分结果伪装成完整结果。
|
|
53
71
|
|
|
54
72
|
## 参考
|
|
55
73
|
|
|
74
|
+
- [差异刷新](rabetbase-db-diff-refresh.md)
|
|
56
75
|
- [database-connection-workflow.md](../guides/database-connection-workflow.md)
|
|
57
76
|
- [SKILL.md](../SKILL.md)
|
|
@@ -27,7 +27,7 @@ rabetbase db list --appcode app-xxxx --format compress
|
|
|
27
27
|
|
|
28
28
|
## 输出要点
|
|
29
29
|
|
|
30
|
-
- `connections[]`:每条含 `id`、`dbName`、`dbType`、`latestAnalysisStatus`、`latestAnalysisTraceId` 等
|
|
30
|
+
- `connections[]`:每条含 `id`、`dbName`、`dbType`、`latestAnalysisStatus`、`latestAnalysisTraceId`,以及服务端提供时的 `tableCount` 等
|
|
31
31
|
- 返回中密码已脱敏
|
|
32
32
|
- 若接口未返回分页元数据,`paging.totalCount` 为 `null` 并带 `note`,**勿将本页条数当作全量总数**
|
|
33
33
|
|
|
@@ -11,9 +11,9 @@ rabetbase kb list --format compress
|
|
|
11
11
|
rabetbase kb list --appcode app-xxxxx --title "业务规则" --format compress
|
|
12
12
|
rabetbase kb detail --id 60 --format compress
|
|
13
13
|
rabetbase kb create --title "业务规则" --file ./knowledge.md --dry-run
|
|
14
|
-
rabetbase kb create --title "业务规则" --file ./knowledge.md
|
|
14
|
+
rabetbase kb create --title "业务规则" --file ./knowledge.md
|
|
15
15
|
rabetbase kb update --id 60 --file ./knowledge.md --expected-version 2 --dry-run
|
|
16
|
-
rabetbase kb update --id 60 --file ./knowledge.md --expected-version 2
|
|
16
|
+
rabetbase kb update --id 60 --file ./knowledge.md --expected-version 2
|
|
17
17
|
rabetbase kb delete --id 60 --dry-run
|
|
18
18
|
rabetbase kb delete --id 60 --yes
|
|
19
19
|
```
|
|
@@ -33,9 +33,10 @@ rabetbase kb delete --id 60 --yes
|
|
|
33
33
|
|
|
34
34
|
## create
|
|
35
35
|
|
|
36
|
+
- `create/update` 为 `write`,正式执行不要求 `--yes`;仍应先审阅 dry-run。
|
|
36
37
|
- 只需 `--title`、`--file`;应用由标准全局应用解析得到。
|
|
37
38
|
- 写前按 `(company, appCode, title)` 精确检查重复。
|
|
38
|
-
-
|
|
39
|
+
- 审阅 dry-run 后,使用相同参数移除 `--dry-run` 正式执行;请求最多提交一次。
|
|
39
40
|
- 正常响应使用服务端返回 VO/ID 并按 ID 回读。只有底层响应不确定时,才按同一 company/app/title 三元组做只读恢复;零条或多条都返回 outcome unknown,绝不自动重提。
|
|
40
41
|
- 授权、权限、参数和其他确定性服务端错误直接失败,不能用旧状态回读伪装成成功。
|
|
41
42
|
|
|
@@ -50,6 +51,7 @@ rabetbase kb delete --id 60 --yes
|
|
|
50
51
|
## delete
|
|
51
52
|
|
|
52
53
|
- 已验证服务端合同:`POST /admin/knowledge-base/delete`,请求体 `{id}`,成功为 `Result<Void>`。
|
|
54
|
+
- `delete` 保持 `high-risk-write`;正式执行必须显式 `--yes`,并建议先审阅 dry-run。
|
|
53
55
|
- 写前读取目标,校验 ID、company scope、appCode、可选 expected-version 和安全快照;`--expected-version` 仍是非原子断言,dry-run 明确输出 `atomicCompareAndSet: false`。
|
|
54
56
|
- 目标明确不存在时返回 no-op 且不发请求;只有服务端 `DATA_NOT_EXIST (306)` 可识别为不存在,`PARAM_INVALID (103)`、权限、认证或传输错误不能降级为 no-op。
|
|
55
57
|
- 正式删除最多提交一次,再按同一 ID 回读;明确不存在用于验证数据库软删除。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
更新指定线上微前端菜单的 CDN 资源 URL。
|
|
4
4
|
|
|
5
|
-
> **风险等级:
|
|
5
|
+
> **风险等级:write** — 修改线上菜单运行资源;建议先 dry-run,正式执行复用相同参数并移除 `--dry-run`。
|
|
6
6
|
|
|
7
7
|
## 命令
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ rabetbase menu asset-update
|
|
|
12
12
|
|
|
13
13
|
# 使用 menu list 返回的真实 path 精确预览并更新
|
|
14
14
|
rabetbase menu asset-update --paths "<menu-path>" --params '{"cssUrl":"https://...css"}' --dry-run --format compress
|
|
15
|
-
rabetbase menu asset-update --paths "<menu-path>" --params '{"cssUrl":"https://...css"}' --
|
|
15
|
+
rabetbase menu asset-update --paths "<menu-path>" --params '{"cssUrl":"https://...css"}' --format compress
|
|
16
16
|
|
|
17
17
|
# 按菜单 ID 精确更新,并显式切换加载方式
|
|
18
18
|
rabetbase menu asset-update --menu-ids "<menu-id>" --load-mode fetch --params '{"jsUrl":"https://...js"}' --dry-run --format compress
|
|
@@ -53,7 +53,7 @@ rabetbase menu asset-update --paths "<menu-path>" --params '{"cssUrl":"https://.
|
|
|
53
53
|
5. **正式执行必须复用 dry-run 的同一组 selector、`--mode` 和 `--params`**:
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
rabetbase menu asset-update --paths "<menu-path>" --params '{"cssUrl":"https://...css"}' --
|
|
56
|
+
rabetbase menu asset-update --paths "<menu-path>" --params '{"cssUrl":"https://...css"}' --format compress
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
6. **执行后回查资源现状**:
|
|
@@ -67,15 +67,15 @@ rabetbase menu list --format json --jq '.data.menus[] | select(.resources | leng
|
|
|
67
67
|
```bash
|
|
68
68
|
# 只替换 CSS,保留已有 JS
|
|
69
69
|
rabetbase menu asset-update --paths "<menu-path>" --params '{"cssUrl":"https://cdn.example.com/app.css"}' --dry-run --format compress
|
|
70
|
-
rabetbase menu asset-update --paths "<menu-path>" --params '{"cssUrl":"https://cdn.example.com/app.css"}' --
|
|
70
|
+
rabetbase menu asset-update --paths "<menu-path>" --params '{"cssUrl":"https://cdn.example.com/app.css"}' --format compress
|
|
71
71
|
|
|
72
72
|
# 只替换 JS,保留已有 CSS
|
|
73
73
|
rabetbase menu asset-update --menu-ids "<menu-id>" --params '{"jsUrl":"https://cdn.example.com/app.js"}' --dry-run --format compress
|
|
74
|
-
rabetbase menu asset-update --menu-ids "<menu-id>" --params '{"jsUrl":"https://cdn.example.com/app.js"}' --
|
|
74
|
+
rabetbase menu asset-update --menu-ids "<menu-id>" --params '{"jsUrl":"https://cdn.example.com/app.js"}' --format compress
|
|
75
75
|
|
|
76
76
|
# 显式更新全部菜单的 JS + CSS
|
|
77
77
|
rabetbase menu asset-update --all --params '{"jsUrl":"https://cdn.example.com/app.js","cssUrl":"https://cdn.example.com/app.css"}' --dry-run --format compress
|
|
78
|
-
rabetbase menu asset-update --all --params '{"jsUrl":"https://cdn.example.com/app.js","cssUrl":"https://cdn.example.com/app.css"}' --
|
|
78
|
+
rabetbase menu asset-update --all --params '{"jsUrl":"https://cdn.example.com/app.js","cssUrl":"https://cdn.example.com/app.css"}' --format compress
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
## 参数
|
|
@@ -86,7 +86,6 @@ rabetbase menu asset-update --all --params '{"jsUrl":"https://cdn.example.com/ap
|
|
|
86
86
|
| `--menu-ids <csv>` | string | 至少一个 selector | — | 精确菜单 ID;只接受正安全整数;可与 paths 组合,不可与 all 组合 |
|
|
87
87
|
| `--paths <csv>` | string | 至少一个 selector | — | 精确菜单 path;可与 menu-ids 组合,不可与 all 组合 |
|
|
88
88
|
| `--all` | boolean | 至少一个 selector | `false` | 显式选择所有已有 resources 的菜单;不可与 ID/path 组合 |
|
|
89
|
-
| `--yes` | boolean | 正式执行必填 | — | 跳过高风险确认并更新已选择菜单,必须配合有效 `--params` |
|
|
90
89
|
| `--mode <mode>` | string | 否 | `patch` | `patch` 只在目标唯一时替换传入的同类型资源并保留其他资源;`replace` 将传入 URL 作为完整 `resources` |
|
|
91
90
|
| `--load-mode <mode>` | string | 否 | 保留线上值 | 显式修改为 `import`、`script` 或 `fetch` |
|
|
92
91
|
| `--force` | boolean | 否 | `false` | 允许 `replace` 删除已有 JS 资源;仅用于明确的资源降级/迁移 |
|
|
@@ -96,7 +95,7 @@ rabetbase menu asset-update --all --params '{"jsUrl":"https://cdn.example.com/ap
|
|
|
96
95
|
## 执行模式
|
|
97
96
|
|
|
98
97
|
1. **selector + `--params` + `--dry-run`** — 非交互预览精确目标;全量必须显式 `--all`
|
|
99
|
-
2. **selector + `--params
|
|
98
|
+
2. **selector + `--params`** — 正式更新精确目标;必须复用 dry-run 参数并移除 `--dry-run`
|
|
100
99
|
3. **TTY 交互式** — 未给 selector 时展示全部有资源菜单并二次确认;给 selector 时只展示目标
|
|
101
100
|
|
|
102
101
|
## 输出
|
|
@@ -109,7 +108,7 @@ rabetbase menu asset-update --all --params '{"jsUrl":"https://cdn.example.com/ap
|
|
|
109
108
|
## 提示
|
|
110
109
|
|
|
111
110
|
- 仅更新已配置了资源 URL 且被 selector 命中的菜单
|
|
112
|
-
- 非交互和 dry-run 缺 selector
|
|
111
|
+
- 非交互和 dry-run 缺 selector 会被拒绝;空 `--params` 也会被拒绝
|
|
113
112
|
- 写入采用 read-modify-write:默认只更新 `extend.resources`,保留 `loadScriptMode` 和其他扩展字段
|
|
114
113
|
- 只有显式传 `--load-mode` 才修改加载方式
|
|
115
114
|
- 默认 `patch`;使用 `replace` 时仍会阻止无意删除已有 JS
|
|
@@ -120,7 +119,7 @@ rabetbase menu asset-update --all --params '{"jsUrl":"https://cdn.example.com/ap
|
|
|
120
119
|
## 常见错误
|
|
121
120
|
|
|
122
121
|
- 跳过 `--dry-run` 直接写入。
|
|
123
|
-
-
|
|
122
|
+
- 缺 selector 或传空 `--params`。
|
|
124
123
|
- 需要单菜单更新却使用 `--all`。
|
|
125
124
|
- 只想换 CSS 却显式使用 `replace`,导致已有 JS 被删除风险。
|
|
126
125
|
- dry-run 已出现删除 JS warning,仍未取得用户明确确认就继续执行。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
按精确 ID 原地更新一个既有 `iframe` 或 `link` 叶子菜单的 URL。只修改 URL,不删除重建菜单。
|
|
4
4
|
|
|
5
|
-
> **风险等级:
|
|
5
|
+
> **风险等级:write** — 会改变线上菜单实际打开地址;建议先 dry-run,正式执行复用相同参数并移除 `--dry-run`。
|
|
6
6
|
|
|
7
7
|
## 命令
|
|
8
8
|
|
|
@@ -20,7 +20,6 @@ rabetbase menu external-link-update \
|
|
|
20
20
|
--url "https://admin.example.com/new-page?hideShell=true" \
|
|
21
21
|
--expect-url "https://admin.example.com/old-page?hideShell=true" \
|
|
22
22
|
--expect-parent-id "<folder-id|root>" \
|
|
23
|
-
--yes \
|
|
24
23
|
--format compress
|
|
25
24
|
```
|
|
26
25
|
|
|
@@ -34,7 +33,6 @@ rabetbase menu external-link-update \
|
|
|
34
33
|
| `--expect-parent-id <id\|root>` | string | 是 | — | 始终断言当前父级 |
|
|
35
34
|
| `--appcode <code>` | string | 否 | 配置解析 | 显式指定 App Code |
|
|
36
35
|
| `--dry-run` | boolean | 否 | `false` | 输出精确 URL patch,不写入 |
|
|
37
|
-
| `--yes` | boolean | 正式执行必填 | — | 明确确认高风险写入 |
|
|
38
36
|
|
|
39
37
|
## 目标边界
|
|
40
38
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
提交一个异步任务:新建根级 folder,并将一组精确的非 folder 叶子菜单放入其中。命令返回重新分组任务的 `taskId/status`。
|
|
4
4
|
|
|
5
|
-
> **风险等级:
|
|
5
|
+
> **风险等级:write** — 建议先 dry-run,正式执行复用相同参数并移除 `--dry-run`。
|
|
6
6
|
|
|
7
7
|
## 命令
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
rabetbase menu regroup-start --label "业务管理" --menu-ids "<menu-id-1>,<menu-id-2>" --dry-run --format compress
|
|
11
|
-
rabetbase menu regroup-start --label "业务管理" --menu-ids "<menu-id-1>,<menu-id-2>" --
|
|
11
|
+
rabetbase menu regroup-start --label "业务管理" --menu-ids "<menu-id-1>,<menu-id-2>" --format compress
|
|
12
12
|
rabetbase task status --task-id "<task-id>" --format compress
|
|
13
13
|
```
|
|
14
14
|
|
|
@@ -19,7 +19,6 @@ rabetbase task status --task-id "<task-id>" --format compress
|
|
|
19
19
|
| `--label <label>` | string | 是 | 新建根 folder 名称;不能与现有根 folder 同名 |
|
|
20
20
|
| `--menu-ids <ids>` | string | 是 | 逗号分隔的精确叶子菜单 ID,最多 100 个 |
|
|
21
21
|
| `--dry-run` | boolean | 预览时 | 返回当前快照、before/after 和请求体,不写入 |
|
|
22
|
-
| `--yes` | boolean | 正式执行时 | 显式授权重新分组 |
|
|
23
22
|
|
|
24
23
|
## 状态流
|
|
25
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# rabetbase notification config-list
|
|
2
2
|
|
|
3
|
-
只读查询当前应用的应用级通知渠道配置,主要用于获取 BFF
|
|
3
|
+
只读查询当前应用的应用级通知渠道配置,主要用于获取 BFF 消息通知扩展需要的应用级 `configCode`。
|
|
4
4
|
|
|
5
5
|
## 命令
|
|
6
6
|
|
|
@@ -69,7 +69,7 @@ await context.client.extension.execute("notification", "send", {
|
|
|
69
69
|
边界:
|
|
70
70
|
|
|
71
71
|
* `configCode` 是应用级通知配置编码。
|
|
72
|
-
*
|
|
72
|
+
* 数据集级通知通道的 `channelCode` 不能替代应用级 `configCode`;创建、更新和删除应用级配置见 [`rabetbase-notification-config-mutations.md`](rabetbase-notification-config-mutations.md)。
|
|
73
73
|
* 没有查询结果时,不要编造配置编码。
|
|
74
74
|
* 多个候选无法判断时,向用户确认,不要默认取第一条。
|
|
75
75
|
* 该命令不会发送通知,也不会修改平台配置。
|