@lovrabet/rabetbase-cli 2.3.16-beta.7 → 2.4.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/README.md +4 -10
- 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.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-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- 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.d.ts +2 -0
- package/lib/commands/page/react/create.js +1 -0
- package/lib/commands/page/react/detail.d.ts +2 -0
- package/lib/commands/page/react/detail.js +1 -0
- package/lib/commands/page/react/list.d.ts +2 -0
- package/lib/commands/page/react/list.js +1 -0
- package/lib/commands/page/react/publish.d.ts +2 -0
- package/lib/commands/page/react/publish.js +1 -0
- package/lib/commands/page/react/shared.d.ts +78 -0
- package/lib/commands/page/react/shared.js +1 -0
- package/lib/commands/page/react/syntax.d.ts +18 -0
- package/lib/commands/page/react/syntax.js +1 -0
- package/lib/commands/page/react/template.d.ts +8 -0
- package/lib/commands/page/react/template.js +1 -0
- package/lib/commands/page/react/update.d.ts +2 -0
- package/lib/commands/page/react/update.js +1 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +1 -0
- 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.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/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.d.ts +2 -0
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -0
- package/lib/commands/user-account/index.d.ts +2 -0
- package/lib/commands/user-account/index.js +1 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +117 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/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.d.ts +3 -0
- package/lib/postinstall.js +1 -0
- 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.d.ts +37 -0
- package/lib/skills/builtin-skill.js +1 -0
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +4 -2
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.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 -3
- package/scripts/postinstall.mjs +24 -0
- package/skills/rabetbase/SKILL.md +493 -0
- package/skills/rabetbase/guides/backend-function.md +835 -0
- package/skills/rabetbase/guides/best-practices.md +137 -0
- package/skills/rabetbase/guides/bff-creation-workflow.md +148 -0
- package/skills/rabetbase/guides/conflict-detection.md +119 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +414 -0
- package/skills/rabetbase/guides/database-connection-workflow.md +169 -0
- package/skills/rabetbase/guides/frontend-development.md +179 -0
- package/skills/rabetbase/guides/legacy-application-blueprint-workflow.md +495 -0
- package/skills/rabetbase/guides/menu-anomaly-manual-cleanup.md +137 -0
- package/skills/rabetbase/guides/page-development-workflow.md +187 -0
- package/skills/rabetbase/guides/react-custom-page-workflow.md +184 -0
- package/skills/rabetbase/guides/role-permit-workflow.md +127 -0
- package/skills/rabetbase/guides/sql-creation-workflow.md +173 -0
- package/skills/rabetbase/guides/sql-mybatis.md +126 -0
- package/skills/rabetbase/guides/troubleshooting.md +67 -0
- package/skills/rabetbase/guides/typescript-sdk.md +227 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartCreate.md +367 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartDetail.md +153 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +291 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartFilter.md +478 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +119 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +223 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +632 -0
- package/skills/rabetbase/knowledge/page-schema/YtPage.md +172 -0
- package/skills/rabetbase/knowledge/page-schema/dataset-relations.md +126 -0
- package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +232 -0
- package/skills/rabetbase/knowledge/page-schema/field-components.md +312 -0
- package/skills/rabetbase/knowledge/page-schema/syntax-reference.md +278 -0
- package/skills/rabetbase/knowledge/react-page/components.md +225 -0
- package/skills/rabetbase/knowledge/react-page/generation-standards.md +385 -0
- package/skills/rabetbase/references/rabetbase-api-list.md +58 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +82 -0
- package/skills/rabetbase/references/rabetbase-app-config.md +95 -0
- package/skills/rabetbase/references/rabetbase-app-list.md +79 -0
- package/skills/rabetbase/references/rabetbase-app-members-list.md +64 -0
- package/skills/rabetbase/references/rabetbase-auth-login.md +53 -0
- package/skills/rabetbase/references/rabetbase-auth-logout.md +29 -0
- package/skills/rabetbase/references/rabetbase-bff-create.md +59 -0
- package/skills/rabetbase/references/rabetbase-bff-delete.md +42 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +38 -0
- package/skills/rabetbase/references/rabetbase-bff-list.md +61 -0
- package/skills/rabetbase/references/rabetbase-bff-pull.md +42 -0
- package/skills/rabetbase/references/rabetbase-bff-push.md +65 -0
- package/skills/rabetbase/references/rabetbase-bff-save.md +63 -0
- package/skills/rabetbase/references/rabetbase-bff-status.md +37 -0
- package/skills/rabetbase/references/rabetbase-cli-skill-install.md +42 -0
- package/skills/rabetbase/references/rabetbase-codegen-sdk.md +35 -0
- package/skills/rabetbase/references/rabetbase-codegen-sql.md +33 -0
- package/skills/rabetbase/references/rabetbase-config.md +296 -0
- package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +84 -0
- package/skills/rabetbase/references/rabetbase-dataset-delete.md +54 -0
- package/skills/rabetbase/references/rabetbase-dataset-detail.md +106 -0
- package/skills/rabetbase/references/rabetbase-dataset-extend-update.md +70 -0
- package/skills/rabetbase/references/rabetbase-dataset-field-update.md +117 -0
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +206 -0
- package/skills/rabetbase/references/rabetbase-dataset-list.md +42 -0
- package/skills/rabetbase/references/rabetbase-dataset-operations.md +34 -0
- package/skills/rabetbase/references/rabetbase-dataset-relation-audit.md +63 -0
- package/skills/rabetbase/references/rabetbase-dataset-relation-mutations.md +141 -0
- package/skills/rabetbase/references/rabetbase-dataset-relations.md +71 -0
- package/skills/rabetbase/references/rabetbase-dataset-rename.md +107 -0
- package/skills/rabetbase/references/rabetbase-dataset-restore.md +54 -0
- package/skills/rabetbase/references/rabetbase-db-analyze.md +135 -0
- package/skills/rabetbase/references/rabetbase-db-create.md +54 -0
- package/skills/rabetbase/references/rabetbase-db-delete.md +26 -0
- package/skills/rabetbase/references/rabetbase-db-detail.md +27 -0
- package/skills/rabetbase/references/rabetbase-db-diff.md +57 -0
- package/skills/rabetbase/references/rabetbase-db-list.md +37 -0
- package/skills/rabetbase/references/rabetbase-db-tables.md +25 -0
- package/skills/rabetbase/references/rabetbase-db-test.md +29 -0
- package/skills/rabetbase/references/rabetbase-db-update.md +29 -0
- package/skills/rabetbase/references/rabetbase-doctor.md +62 -0
- package/skills/rabetbase/references/rabetbase-file.md +35 -0
- package/skills/rabetbase/references/rabetbase-init.md +70 -0
- package/skills/rabetbase/references/rabetbase-issue-report.md +132 -0
- package/skills/rabetbase/references/rabetbase-kb.md +62 -0
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +135 -0
- package/skills/rabetbase/references/rabetbase-menu-delete.md +54 -0
- package/skills/rabetbase/references/rabetbase-menu-external-link-create.md +63 -0
- package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +74 -0
- package/skills/rabetbase/references/rabetbase-menu-group-create.md +33 -0
- package/skills/rabetbase/references/rabetbase-menu-group-update.md +38 -0
- package/skills/rabetbase/references/rabetbase-menu-list.md +144 -0
- package/skills/rabetbase/references/rabetbase-menu-move.md +54 -0
- package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +45 -0
- package/skills/rabetbase/references/rabetbase-menu-rename.md +48 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +60 -0
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +80 -0
- package/skills/rabetbase/references/rabetbase-ocr.md +86 -0
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +32 -0
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +32 -0
- package/skills/rabetbase/references/rabetbase-page-pull.md +47 -0
- package/skills/rabetbase/references/rabetbase-page-push.md +45 -0
- package/skills/rabetbase/references/rabetbase-page-react-create.md +29 -0
- package/skills/rabetbase/references/rabetbase-page-react-detail.md +26 -0
- package/skills/rabetbase/references/rabetbase-page-react-list.md +23 -0
- package/skills/rabetbase/references/rabetbase-page-react-publish.md +23 -0
- package/skills/rabetbase/references/rabetbase-page-react-update.md +24 -0
- package/skills/rabetbase/references/rabetbase-page-relation-binding.md +72 -0
- package/skills/rabetbase/references/rabetbase-page-restore.md +45 -0
- package/skills/rabetbase/references/rabetbase-page-sync.md +36 -0
- package/skills/rabetbase/references/rabetbase-permit-page-set.md +69 -0
- package/skills/rabetbase/references/rabetbase-permit-role-apis-set.md +53 -0
- package/skills/rabetbase/references/rabetbase-permit-role-menus-set.md +57 -0
- package/skills/rabetbase/references/rabetbase-project-create.md +46 -0
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +57 -0
- package/skills/rabetbase/references/rabetbase-role-list.md +68 -0
- package/skills/rabetbase/references/rabetbase-role-user-add.md +54 -0
- package/skills/rabetbase/references/rabetbase-role-user-resolve.md +27 -0
- package/skills/rabetbase/references/rabetbase-run.md +53 -0
- package/skills/rabetbase/references/rabetbase-schema.md +22 -0
- package/skills/rabetbase/references/rabetbase-sql-create.md +41 -0
- package/skills/rabetbase/references/rabetbase-sql-delete.md +37 -0
- package/skills/rabetbase/references/rabetbase-sql-detail.md +32 -0
- package/skills/rabetbase/references/rabetbase-sql-exec.md +34 -0
- package/skills/rabetbase/references/rabetbase-sql-list.md +54 -0
- package/skills/rabetbase/references/rabetbase-sql-pull.md +54 -0
- package/skills/rabetbase/references/rabetbase-sql-push.md +46 -0
- package/skills/rabetbase/references/rabetbase-sql-status.md +39 -0
- package/skills/rabetbase/references/rabetbase-sql-validate.md +73 -0
- package/skills/rabetbase/references/rabetbase-standard-page-status.md +31 -0
- package/skills/rabetbase/references/rabetbase-task-status.md +40 -0
- package/skills/rabetbase/references/rabetbase-tenant-members-list.md +69 -0
- package/skills/rabetbase/references/rabetbase-update.md +56 -0
- package/skills/rabetbase/references/rabetbase-user-account.md +45 -0
- package/skills/rabetbase/references/rabetbase-workspace.md +60 -0
- package/skills/rabetbase.manifest.json +137 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# api pull
|
|
2
|
+
|
|
3
|
+
拉取当前 App 下所有数据集(Dataset)的元信息,生成 TypeScript API 客户端代码到 `src/api/` 目录。
|
|
4
|
+
|
|
5
|
+
生成的代码包含每个 Dataset 的 Model 类,可直接用于 SDK 查询,无需手动调用 HTTP 接口。
|
|
6
|
+
|
|
7
|
+
## 命令
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# 拉取并生成 API 代码(默认 ./src/api/)
|
|
11
|
+
rabetbase api pull
|
|
12
|
+
|
|
13
|
+
# 指定输出目录
|
|
14
|
+
rabetbase api pull --output ./src/generated/api/
|
|
15
|
+
|
|
16
|
+
# 多应用:默认只解析「项目级」apps;与全局合并配置一起拉取时加 --global
|
|
17
|
+
rabetbase api pull --global
|
|
18
|
+
|
|
19
|
+
# 多应用模式:指定某个应用
|
|
20
|
+
rabetbase api pull --app order
|
|
21
|
+
rabetbase api pull --appcode app-order-001
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 参数
|
|
25
|
+
|
|
26
|
+
| 参数 | 说明 |
|
|
27
|
+
|------|------|
|
|
28
|
+
| `--output <dir>` | 输出目录,默认 `./src/api/` |
|
|
29
|
+
| `--global` | 多应用时从「全局+项目」合并配置解析 `apps`(默认仅项目级 `apps`)。若项目配置了 `inherit: false`,见下节 |
|
|
30
|
+
| `--app <name>` | 多应用模式下,指定应用名称 |
|
|
31
|
+
| `--appcode <code>` | 直接指定 appcode,跳过配置查找 |
|
|
32
|
+
|
|
33
|
+
## 多应用过滤
|
|
34
|
+
|
|
35
|
+
多应用模式下:
|
|
36
|
+
- **不加 `--app` / `--appcode`**:遍历已配置应用(默认仅 **项目** `.rabetbase.json` 中的 `apps`;若需包含全局里合并进来的应用,加 **`--global`**)
|
|
37
|
+
- **加 `--app <name>`**:仅拉取指定应用
|
|
38
|
+
- **加 `--appcode <code>`**:反查到对应 app profile,使用其 cookie/env/apiDir
|
|
39
|
+
|
|
40
|
+
## 与 `inherit` 的关系
|
|
41
|
+
|
|
42
|
+
项目 `.rabetbase.json` 的 `inherit` 字段控制配置合并行为:
|
|
43
|
+
|
|
44
|
+
- **省略**(默认):项目主导,仅从全局白名单继承 cookie/accessKey/locale/format/riskLevel/pageSize,不继承 apps/defaultApp/appcode。`--global` 仍可看到全局 apps(多应用列表从双层直接取)。
|
|
45
|
+
- **`true`**:全量合并全局+项目(旧行为,需显式开启)。
|
|
46
|
+
- **`false`**:完全隔离,不继承任何全局字段。
|
|
47
|
+
|
|
48
|
+
此时:
|
|
49
|
+
|
|
50
|
+
- **`api pull` 使用的 cookie、apiDir、appcode 等**均来自**项目文件**(默认行为下 cookie/accessKey 仍可从全局白名单继承)。
|
|
51
|
+
- **`--global` 多应用列表**始终从全局+项目双层取 apps,不受 inherit 限制。
|
|
52
|
+
|
|
53
|
+
## 输出文件
|
|
54
|
+
|
|
55
|
+
| 文件 | 说明 |
|
|
56
|
+
|------|------|
|
|
57
|
+
| `<prefix>-api.ts` | 数据模型定义(datasetCode → Model 映射) |
|
|
58
|
+
| `<prefix>-client.ts` | SDK 客户端初始化代码 |
|
|
59
|
+
|
|
60
|
+
默认 `prefix` 为空(单应用),多应用非 default 应用使用应用名作为 prefix。
|
|
61
|
+
|
|
62
|
+
## 生成标识符
|
|
63
|
+
|
|
64
|
+
`api pull` 遵循 [`best-practices.md`](../guides/best-practices.md) 的动态标识符原则,确保生成的 TypeScript 标识符合法且稳定。数字开头的 App Namespace 使用 `APP` 领域前缀,运行时 AppCode 保持不变;该前缀不适用于其他代码生成场景。
|
|
65
|
+
|
|
66
|
+
## 前置条件
|
|
67
|
+
|
|
68
|
+
- 已完成 `rabetbase auth` 登录
|
|
69
|
+
- 已配置 appcode(单应用或多应用)
|
|
70
|
+
|
|
71
|
+
## 示例
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# 单应用:生成到 ./src/api/
|
|
75
|
+
rabetbase api pull
|
|
76
|
+
|
|
77
|
+
# 多应用 order:生成到 ./src/api/ 并使用 order- 前缀
|
|
78
|
+
rabetbase api pull --app order
|
|
79
|
+
|
|
80
|
+
# 独立输出目录
|
|
81
|
+
rabetbase api pull --output ./src/generated/api/
|
|
82
|
+
```
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# rabetbase app-config
|
|
2
|
+
|
|
3
|
+
管理当前应用的运行态 app-config key。事实源是平台 app-config 管理面,不是本地 `.rabetbase.json`;本地配置仍用 `rabetbase config` / `rabetbase app` 管理。
|
|
4
|
+
|
|
5
|
+
`value` 默认按敏感内容处理:`list` 和默认 `get` 不输出明文,`set --dry-run` / `delete --dry-run` 也不输出明文。不要把 app-config value 写入本地配置、缓存、日志或命令参数转发给业务 BFF。
|
|
6
|
+
|
|
7
|
+
## 命令
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
rabetbase app-config list --format compress
|
|
11
|
+
rabetbase app-config get <key> --format compress
|
|
12
|
+
rabetbase app-config get <key> --reveal --format compress
|
|
13
|
+
rabetbase app-config set <key> --from-env ENV_NAME --dry-run
|
|
14
|
+
rabetbase app-config set <key> --from-env ENV_NAME --yes
|
|
15
|
+
rabetbase app-config delete <key> --dry-run
|
|
16
|
+
rabetbase app-config delete <key> --yes
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## list
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
rabetbase app-config list --format compress
|
|
23
|
+
rabetbase app-config list --tags webhook --format compress
|
|
24
|
+
rabetbase app-config list --key vectorengine.apiKey --format compress
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
输出关注:
|
|
28
|
+
|
|
29
|
+
- `data.configs[]`
|
|
30
|
+
- `key`
|
|
31
|
+
- `tags`
|
|
32
|
+
- `hasValue`
|
|
33
|
+
- `valueRedacted`
|
|
34
|
+
- `gmtModified`
|
|
35
|
+
|
|
36
|
+
不会输出 `value`,也不展示服务端预留的 `encrypted` 字段。
|
|
37
|
+
|
|
38
|
+
## get
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
rabetbase app-config get vectorengine.apiKey --format compress
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
默认只用于确认 key 是否存在、是否有值、路由 appCode 是否正确。
|
|
45
|
+
|
|
46
|
+
只有明确需要查看单个 key 明文时才使用:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
rabetbase app-config get vectorengine.apiKey --reveal --format compress
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`--reveal` 只支持单 key,不存在批量 reveal。
|
|
53
|
+
|
|
54
|
+
## set
|
|
55
|
+
|
|
56
|
+
`set` 以 key 为主路径,CLI 会先按 key 查询:存在则 update,不存在则 create。用户不需要传服务端 id。
|
|
57
|
+
|
|
58
|
+
value 来源必须且只能选一种:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
printf '%s' "$VECTORENGINE_API_KEY" | rabetbase app-config set vectorengine.apiKey --stdin --dry-run
|
|
62
|
+
rabetbase app-config set vectorengine.apiKey --from-env VECTORENGINE_API_KEY --dry-run
|
|
63
|
+
rabetbase app-config set vectorengine.apiKey --file ./secret.txt --dry-run
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
确认 dry-run 的 `operation`、`selector.appCode`、`selector.key`、`before`、`after` 后,再执行正式写入:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
rabetbase app-config set vectorengine.apiKey --from-env VECTORENGINE_API_KEY --yes
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
显式位置参数 `<value>` 可用,但不推荐用于敏感值,因为 shell history 可能记录明文。
|
|
73
|
+
|
|
74
|
+
## delete
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
rabetbase app-config delete vectorengine.apiKey --dry-run
|
|
78
|
+
rabetbase app-config delete vectorengine.apiKey --yes
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
删除同样以 key 定位,CLI 内部解析服务端 id 后调用 delete。缺失 key 会报 validation error。
|
|
82
|
+
|
|
83
|
+
## 安全边界
|
|
84
|
+
|
|
85
|
+
- `list` 永不批量输出明文 value。
|
|
86
|
+
- 默认 `get` 不输出明文 value。
|
|
87
|
+
- `set/delete --dry-run` 不输出明文 value,也不写入。
|
|
88
|
+
- `set` 的成功/失败输出只报告 key、appCode、operation 和脱敏上下文。
|
|
89
|
+
- 不依赖、不展示、不判断 `encrypted`。
|
|
90
|
+
- 不把运行态 app-config 混入 `rabetbase config`。
|
|
91
|
+
- 当前不把该能力描述为 KMS、密钥托管、自动轮换或后端加密能力。
|
|
92
|
+
|
|
93
|
+
## 业务消费
|
|
94
|
+
|
|
95
|
+
rabetbase 负责维护运行态 app-config 管理面。业务代码需要敏感配置时,应由服务端 BFF 上下文通过 `context.appConfig.get(...)` 读取并消费;不要让 Agent 先 `--reveal` value,再把明文作为 `lovrabet bff exec` 参数或脚本参数传入。
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# rabetbase app list
|
|
2
|
+
|
|
3
|
+
列出应用。
|
|
4
|
+
|
|
5
|
+
默认列出**本地配置视图**,与 CLI 运行时一致:合并全局 `~/.rabetbase.json`(或同目录下首个匹配的旧名)与**项目**当前目录下的配置文件。
|
|
6
|
+
加 `--remote` 时改为查询**平台目录视图**:当前登录账号在平台上可访问的应用,不读取或修改本地 app 配置。
|
|
7
|
+
|
|
8
|
+
- **不加 flag**:合并视图(global + project)。
|
|
9
|
+
- **`--global`**:仅列出**全局**文件中的应用。
|
|
10
|
+
- **`--project`**:仅列出**项目**文件中的应用(与 `--global` 互斥)。
|
|
11
|
+
- **`--remote`**:列出当前登录账号在平台上可访问的应用(与 `--global` / `--project` 互斥)。
|
|
12
|
+
|
|
13
|
+
登记应用用 `workspace add`(默认写项目,`--global` 写全局)。当前工作目录默认应用用 `workspace use` 修改。移除应用用 `workspace remove`,落盘规则见 workspace reference。
|
|
14
|
+
|
|
15
|
+
## 命令
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
rabetbase app list
|
|
19
|
+
rabetbase app list --global
|
|
20
|
+
rabetbase app list --project
|
|
21
|
+
rabetbase app list --remote
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
> **说明:** `rabetbase app` 本身只显示 `app` 服务帮助;查看本地配置中的应用请显式执行 `rabetbase app list`。平台目录视图使用 `rabetbase app list --remote`。
|
|
25
|
+
|
|
26
|
+
## 参数
|
|
27
|
+
|
|
28
|
+
| Flag | 说明 |
|
|
29
|
+
|------|------|
|
|
30
|
+
| `--global` | 仅全局配置中的应用 |
|
|
31
|
+
| `--project` | 仅项目配置中的应用 |
|
|
32
|
+
| `--remote` | 查询平台目录中的可访问应用;需要登录;不能与 `--global` / `--project` 同用 |
|
|
33
|
+
|
|
34
|
+
## 结构化输出(`--format json` / `compress`)
|
|
35
|
+
|
|
36
|
+
本地配置视图中,`data` 为对象(**不是**顶层数组),包含 `items` 与 `meta`:
|
|
37
|
+
|
|
38
|
+
| 字段 | 说明 |
|
|
39
|
+
|------|------|
|
|
40
|
+
| `items` | 应用条目数组 |
|
|
41
|
+
| `meta` | **合并视图**:`globalPath`、`projectPath`、`defaultApp`(无命名默认时为**有效 appcode**)、`defaultAppSource`(`project` \| `global` \| `null`)。**`--global` / `--project`**:`scope`、`configPath` |
|
|
42
|
+
|
|
43
|
+
每个 `items[]` 元素除 `name`、`appcode`、`env` 等外,另有:
|
|
44
|
+
|
|
45
|
+
| 字段 | 说明 |
|
|
46
|
+
|------|------|
|
|
47
|
+
| `named` | `true` — 来自 `apps` 中的命名应用;`false` — 仅顶层 `appcode`/`app` 的**旧版单应用**行(`name` 可能为 `null`) |
|
|
48
|
+
| `definedIn` | `global` / `project` / `both`(合并视图下;单边视图下为对应侧) |
|
|
49
|
+
| `isDefault` | 是否为当前解析出的默认应用 |
|
|
50
|
+
| `isCurrent` | 是否为当前激活应用(合并视图) |
|
|
51
|
+
|
|
52
|
+
**jq 示例**(只取命名应用名):`--format json --jq '.data.items[] | select(.named) | .name'`
|
|
53
|
+
|
|
54
|
+
无任何应用时:`data` 可能为空数组 `[]`(见命令 `message`)。
|
|
55
|
+
|
|
56
|
+
`--remote` 输出同样是 `{ items, meta }`,但语义不同:
|
|
57
|
+
|
|
58
|
+
| 字段 | 说明 |
|
|
59
|
+
|------|------|
|
|
60
|
+
| `items` | 平台返回的可访问应用数组,常见字段为 `id`、`appCode`、`appName`、`appDesc` |
|
|
61
|
+
| `meta.source` | 固定为 `platform` |
|
|
62
|
+
|
|
63
|
+
## 人类可读(`pretty` / `table`)
|
|
64
|
+
|
|
65
|
+
合并视图:先打印全局/项目配置文件路径、当前 **Default app**(及来源),再列出各应用。`--global` / `--project` 时元信息对应该单层。`--remote` 展示平台目录返回的应用。
|
|
66
|
+
|
|
67
|
+
## 提示
|
|
68
|
+
|
|
69
|
+
- 若列表与预期不符,先检查项目或全局 JSON **是否为合法 JSON**(例如尾随逗号会导致该侧配置被忽略);`rabetbase doctor` 的 **Config JSON** 段可检测语法。
|
|
70
|
+
- 无 `apps` 时显示单应用信息,并提示可用 `workspace add` 迁移到多应用模式。
|
|
71
|
+
- 如果你想知道“本地已经登记了哪些应用”,执行 `rabetbase app list`。
|
|
72
|
+
- 如果你想知道“当前登录账号在平台上还能访问哪些应用”,执行 `rabetbase app list --remote`。
|
|
73
|
+
|
|
74
|
+
## 参考
|
|
75
|
+
|
|
76
|
+
- [SKILL.md](../SKILL.md) — 总索引
|
|
77
|
+
- [`.rabetbase.json` 配置参考](rabetbase-config.md) — 合并策略与路径
|
|
78
|
+
- [rabetbase doctor](rabetbase-doctor.md) — 配置与 JSON 诊断
|
|
79
|
+
- [rabetbase workspace](rabetbase-workspace.md) — 工作环境应用配置(绑定/登记/移除)入口
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# rabetbase app members-list
|
|
2
|
+
|
|
3
|
+
列出当前解析应用的完整人员清单,并将服务端角色分组整理为按 userId 去重的人员视图。只读,需要认证和 App Code。
|
|
4
|
+
|
|
5
|
+
## 命令
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
rabetbase app members-list --format compress
|
|
9
|
+
rabetbase app members-list --appcode app-example --format compress
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
应用选择遵循 CLI 统一规则:显式 `--appcode`、`--app` 或当前工作区默认应用。命令返回全量人员,不提供分页、关键字、状态或角色筛选。
|
|
13
|
+
|
|
14
|
+
## 结构化输出
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"ok": true,
|
|
19
|
+
"command": "rabetbase app members-list",
|
|
20
|
+
"risk": "read",
|
|
21
|
+
"data": {
|
|
22
|
+
"appCode": "app-example",
|
|
23
|
+
"items": [
|
|
24
|
+
{
|
|
25
|
+
"userId": 100,
|
|
26
|
+
"username": "alice",
|
|
27
|
+
"displayName": "Alice",
|
|
28
|
+
"status": "ACTIVE",
|
|
29
|
+
"roles": [
|
|
30
|
+
{
|
|
31
|
+
"roleId": 2,
|
|
32
|
+
"roleName": "开发者",
|
|
33
|
+
"roleType": "DEV",
|
|
34
|
+
"membershipStatus": "ACTIVE"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"totalCount": 1
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- `membershipStatus` 为 `ACTIVE`(正式成员)或 `PENDING`(待加入成员)。
|
|
45
|
+
- 同一用户只要存在一个 ACTIVE 角色,顶层 `status` 即为 `ACTIVE`;全部角色待加入时为 `PENDING`。
|
|
46
|
+
- 人员按 `userId` 升序;角色按 `roleId` 升序,同角色下 ACTIVE 排在 PENDING 前。
|
|
47
|
+
- `username`、`displayName` 缺失时为 `null`;不会用 userId 伪造。
|
|
48
|
+
- 不输出头像、手机、邮箱、Cookie、Token 或 AccessKey。
|
|
49
|
+
|
|
50
|
+
## 失败路径
|
|
51
|
+
|
|
52
|
+
- 未登录:先执行 `rabetbase auth login`。
|
|
53
|
+
- 缺少 App Code:在工作区绑定应用,或显式传 `--appcode` / `--app`。
|
|
54
|
+
- 当前账号无应用权限:保留服务端权限错误,不把错误解释为空列表。
|
|
55
|
+
- 网络异常或服务端错误:保留 CLI 结构化错误。
|
|
56
|
+
|
|
57
|
+
合法空应用返回成功,`items: []` 且 `totalCount: 0`。
|
|
58
|
+
|
|
59
|
+
## 参考
|
|
60
|
+
|
|
61
|
+
- [租户人员列表](rabetbase-tenant-members-list.md)
|
|
62
|
+
- [应用列表](rabetbase-app-list.md)
|
|
63
|
+
- [角色列表](rabetbase-role-list.md)
|
|
64
|
+
- [SKILL.md](../SKILL.md)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# auth login
|
|
2
|
+
|
|
3
|
+
通过浏览器完成 OAuth 登录,并把登录态 cookie 写入本机配置目录。
|
|
4
|
+
|
|
5
|
+
## 命令
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# 交互式登录:CLI 会询问是否开始登录,并自动打开浏览器
|
|
9
|
+
rabetbase auth login
|
|
10
|
+
|
|
11
|
+
# 非交互 Agent 登录:不打开本机浏览器,打印授权链接给用户
|
|
12
|
+
rabetbase auth login --yes
|
|
13
|
+
|
|
14
|
+
# 查看帮助
|
|
15
|
+
rabetbase auth login --help
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Agent 执行规则
|
|
19
|
+
|
|
20
|
+
- 在非交互环境、Coding Agent、CI 或无法打开浏览器的终端中,使用 `rabetbase auth login --yes`。
|
|
21
|
+
- 命令会启动本地回调服务,并打印登录 URL;Agent 应把该 URL 原样发给用户,让用户在自己的浏览器中打开并完成授权。
|
|
22
|
+
- 登录 URL 有效期为 **10 分钟**。过期后重新执行 `rabetbase auth login --yes` 获取新链接。
|
|
23
|
+
- 不要让 Agent 自己访问登录 URL,也不要要求用户提供账号密码或 cookie。
|
|
24
|
+
- 如果命令提示已有有效 session,则无需重复登录。
|
|
25
|
+
|
|
26
|
+
## 行为
|
|
27
|
+
|
|
28
|
+
1. 检查本机是否已有有效 session。
|
|
29
|
+
2. 无有效 session 时启动本地 OAuth 回调服务。
|
|
30
|
+
3. 交互式模式会自动打开浏览器;非交互 `--yes` 模式只打印登录 URL。
|
|
31
|
+
4. 用户授权成功后,CLI 保存 cookie 并输出登录成功。
|
|
32
|
+
5. 10 分钟内未完成授权时,登录服务退出,需要重新执行命令。
|
|
33
|
+
|
|
34
|
+
## 常见错误
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
Browser login cannot run in non-interactive mode.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
说明当前环境是非交互模式,但没有传 `--yes`。改用:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
rabetbase auth login --yes
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 后续
|
|
47
|
+
|
|
48
|
+
登录完成后,通常继续执行:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
rabetbase app list --remote --format compress
|
|
52
|
+
rabetbase app list --format compress
|
|
53
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# auth logout
|
|
2
|
+
|
|
3
|
+
退出登录,删除本地认证 cookie。
|
|
4
|
+
|
|
5
|
+
> **风险等级:write** — 删除认证文件。
|
|
6
|
+
|
|
7
|
+
## 命令
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
rabetbase auth logout
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 参数
|
|
14
|
+
|
|
15
|
+
无。
|
|
16
|
+
|
|
17
|
+
## 输出
|
|
18
|
+
|
|
19
|
+
- 已登录:`✓ Logged out`
|
|
20
|
+
- 未登录:`! Not logged in`
|
|
21
|
+
|
|
22
|
+
## 提示
|
|
23
|
+
|
|
24
|
+
- 删除的是本地 cookie 文件,不影响其他设备
|
|
25
|
+
- 退出后需重新 `rabetbase auth` 才能使用 API 命令
|
|
26
|
+
|
|
27
|
+
## 参考
|
|
28
|
+
|
|
29
|
+
- [SKILL.md](../SKILL.md)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# bff create
|
|
2
|
+
|
|
3
|
+
在本地脚手架创建一个新的 BFF 脚本文件。
|
|
4
|
+
|
|
5
|
+
## 命令
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
rabetbase bff create --type ENDPOINT --name getUserList --description "获取用户列表" --format json
|
|
9
|
+
rabetbase bff create --type COMMON --name normalizePayload --format json
|
|
10
|
+
rabetbase bff create --type HOOK --name beforeFilter --alias appUser --operation-type filter --function-node before --format json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 参数
|
|
14
|
+
|
|
15
|
+
| Flag | 类型 | 必填 | 默认 | 说明 |
|
|
16
|
+
|------|------|------|------|------|
|
|
17
|
+
| `--type <type>` | string | 是 | — | 脚本类型:`COMMON` / `ENDPOINT` / `HOOK` |
|
|
18
|
+
| `--name <name>` | string | 是 | — | 函数名(合法 JS 标识符) |
|
|
19
|
+
| `--description <desc>` | string | 否 | — | 脚本描述 |
|
|
20
|
+
| `--alias <alias>` | string | HOOK 时推荐 | — | 数据集 alias |
|
|
21
|
+
| `--datasetcode <code>` | string | HOOK 兜底 | — | 数据集编码 |
|
|
22
|
+
| `--operation-type <op>` | string | HOOK 必填 | — | 如 `getOne` / `filter` / `create` |
|
|
23
|
+
| `--function-node <node>` | string | HOOK 必填 | — | `before` / `after` |
|
|
24
|
+
| `--format <fmt>` | string | 否 | `pretty` | 输出格式 |
|
|
25
|
+
|
|
26
|
+
## 本地路径
|
|
27
|
+
|
|
28
|
+
| 类型 | 路径 |
|
|
29
|
+
|------|------|
|
|
30
|
+
| ENDPOINT | `.rabetbase/bff/<appCode>/ENDPOINT/<name>.js` |
|
|
31
|
+
| COMMON | `.rabetbase/bff/<appCode>/COMMON/<name>.js` |
|
|
32
|
+
| HOOK | `.rabetbase/bff/<appCode>/HOOK/<alias-or-datasetCode>/<operationType>/<functionNode>/<name>.js` |
|
|
33
|
+
|
|
34
|
+
BFF 源码**仅**应在此目录树内创建与长期维护(与 `bff status` / `bff push` 扫描一致);不要在本仓库其他路径手写 BFF 再尝试推送。
|
|
35
|
+
|
|
36
|
+
## 脚手架边界
|
|
37
|
+
|
|
38
|
+
`bff create` 只创建本地脚本模板,不会替你确认数据集字段、必填字段、枚举值或运行时 API 语义。编辑脚本前先按需阅读:
|
|
39
|
+
|
|
40
|
+
- [`backend-function.md`](../guides/backend-function.md):`context.client`、模型键、返回值、事务、消息通知扩展、禁止事项
|
|
41
|
+
- [`data-api-guidelines.md`](../guides/data-api-guidelines.md):字段、枚举、外键、性能规则
|
|
42
|
+
|
|
43
|
+
创建可由 CLI 调用的通知型 BFF 时使用 `ENDPOINT`,并先用 [`rabetbase notification config-list`](rabetbase-notification-config-list.md) 确认当前应用真实的通知 `configCode`。纯通知 ENDPOINT 不需要虚构数据集;脚本只通过 `context.client.extension.execute("notification", "send", ...)` 使用 `configCode`、`audiences`、`message`,不得写渠道地址或密钥。
|
|
44
|
+
|
|
45
|
+
## 提示
|
|
46
|
+
|
|
47
|
+
- `HOOK` 非交互场景建议优先传 `--alias`
|
|
48
|
+
- 如果 alias 解析失败,再用 `--datasetcode`
|
|
49
|
+
- `HOOK` 可以挂载 `DB_TABLE` 或 `METADATA` 数据集;可用 operation 以后端返回为准
|
|
50
|
+
- `METADATA` 数据集不支持 SQL / aggregate 路径,脚本里应使用标准数据操作
|
|
51
|
+
- 涉及数据集读写时,先执行 `rabetbase dataset detail --code <code> --format compress` 获取当前字段事实
|
|
52
|
+
- 创建后先跑 `rabetbase bff status --format json` 确认本地状态
|
|
53
|
+
|
|
54
|
+
## 参考
|
|
55
|
+
|
|
56
|
+
- [SKILL.md](../SKILL.md)
|
|
57
|
+
- [bff-creation-workflow.md](../guides/bff-creation-workflow.md)
|
|
58
|
+
- [backend-function.md](../guides/backend-function.md)
|
|
59
|
+
- [data-api-guidelines.md](../guides/data-api-guidelines.md)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# bff delete
|
|
2
|
+
|
|
3
|
+
删除远端 BFF 脚本,并把本地文件移到 `.rabetbase/bff-trash/`。
|
|
4
|
+
|
|
5
|
+
> **风险等级:high-risk-write** — 必须显式 `--yes`。
|
|
6
|
+
|
|
7
|
+
## 命令
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
rabetbase bff delete --yes --target ENDPOINT/getUserList --format json
|
|
11
|
+
rabetbase bff delete --yes --target getUserList --format json
|
|
12
|
+
rabetbase bff delete --target ENDPOINT/getUserList --dry-run --format json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 参数
|
|
16
|
+
|
|
17
|
+
| Flag | 类型 | 必填 | 默认 | 说明 |
|
|
18
|
+
|------|------|------|------|------|
|
|
19
|
+
| `--target <target>` | string | 是 | — | 完整 lockKey(推荐)或短函数名 |
|
|
20
|
+
| `--dry-run` | boolean | 否 | — | 仅预览删除目标、远端 ID 和本地 trash 路径 |
|
|
21
|
+
| `--yes` | boolean | 是 | — | 跳过高风险确认 |
|
|
22
|
+
| `--format <fmt>` | string | 否 | `pretty` | 输出格式 |
|
|
23
|
+
|
|
24
|
+
## 目标匹配规则
|
|
25
|
+
|
|
26
|
+
- 传完整 lockKey 时,精确匹配
|
|
27
|
+
- 只传短名时:
|
|
28
|
+
- 0 个匹配 → 失败
|
|
29
|
+
- 1 个匹配 → 执行删除
|
|
30
|
+
- 多个匹配 → 失败并要求使用完整 lockKey
|
|
31
|
+
|
|
32
|
+
## 提示
|
|
33
|
+
|
|
34
|
+
- 这是破坏性操作,会删远端并清理本地 lock
|
|
35
|
+
- `--dry-run` 不会删远端、不会改 lock、不会移动本地文件
|
|
36
|
+
- 本地文件不会直接硬删,而是移入 `.rabetbase/bff-trash`
|
|
37
|
+
- 实际执行前建议先用 `bff status` / `bff list` 确认目标
|
|
38
|
+
|
|
39
|
+
## 参考
|
|
40
|
+
|
|
41
|
+
- [SKILL.md](../SKILL.md)
|
|
42
|
+
- [conflict-detection.md](../guides/conflict-detection.md)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# bff detail
|
|
2
|
+
|
|
3
|
+
根据 ID 获取 BFF 脚本详情(含完整脚本内容)。
|
|
4
|
+
|
|
5
|
+
## 命令
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
rabetbase bff detail --id 42 --format json
|
|
9
|
+
rabetbase bff detail --id 42 --verbose --format json
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## 参数
|
|
13
|
+
|
|
14
|
+
| Flag | 类型 | 必填 | 默认 | 说明 |
|
|
15
|
+
|------|------|------|------|------|
|
|
16
|
+
| `--id <id>` | number | 是 | — | BFF 脚本 ID(从 `bff list` 获取) |
|
|
17
|
+
| `--verbose` | boolean | 否 | — | 返回完整原始对象 |
|
|
18
|
+
| `--format <fmt>` | string | 否 | `pretty` | 输出格式 |
|
|
19
|
+
|
|
20
|
+
## 输出
|
|
21
|
+
|
|
22
|
+
返回 BFF 脚本的完整信息:id、functionName、scriptContent(完整脚本源码)、scriptType、description。
|
|
23
|
+
|
|
24
|
+
## 使用边界
|
|
25
|
+
|
|
26
|
+
`bff detail` 用于确认远端事实和取得最新源码。长期维护仍应在 `.rabetbase/bff/<appCode>/...` 同步目录中进行;不要把 `scriptContent` 复制到任意目录后再期望 `bff status` / `bff push` 识别。
|
|
27
|
+
|
|
28
|
+
## 提示
|
|
29
|
+
|
|
30
|
+
- 修改已有 BFF 前必须先用此命令拉取最新内容(平台是 source of truth)
|
|
31
|
+
- scriptContent 是完整的 JavaScript 源码
|
|
32
|
+
- 需要落本地维护时,优先用 `rabetbase bff pull --format json` 同步到规范目录
|
|
33
|
+
|
|
34
|
+
## 参考
|
|
35
|
+
|
|
36
|
+
- [SKILL.md](../SKILL.md)
|
|
37
|
+
- [bff-creation-workflow.md](../guides/bff-creation-workflow.md)
|
|
38
|
+
- [backend-function.md](../guides/backend-function.md)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# bff list
|
|
2
|
+
|
|
3
|
+
列出当前 App 下的 BFF 脚本。
|
|
4
|
+
|
|
5
|
+
## 命令
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
rabetbase bff list --format json
|
|
9
|
+
rabetbase bff list --type COMMON --format json
|
|
10
|
+
rabetbase bff list --name getUserInfo --format json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 参数
|
|
14
|
+
|
|
15
|
+
| Flag | 类型 | 必填 | 默认 | 说明 |
|
|
16
|
+
|------|------|------|------|------|
|
|
17
|
+
| `--app <name>` | string | 否 | — | 多应用模式下指定应用名称 |
|
|
18
|
+
| `--appcode <code>` | string | 否 | — | 直接指定 appcode |
|
|
19
|
+
| `--type <type>` | string | 否 | `ENDPOINT` | 脚本类型:`ENDPOINT` / `COMMON` |
|
|
20
|
+
| `--name <name>` | string | 否 | — | 按脚本名过滤 |
|
|
21
|
+
| `--verbose` | boolean | 否 | — | 返回完整脚本对象 |
|
|
22
|
+
| `--format <fmt>` | string | 否 | `pretty` | 输出格式 |
|
|
23
|
+
|
|
24
|
+
## 多应用过滤
|
|
25
|
+
|
|
26
|
+
多应用模式下:
|
|
27
|
+
- 不加 `--app` / `--appcode`:遍历所有已配置应用,依次列出各应用的 BFF
|
|
28
|
+
- 加 `--app <name>`:仅列出指定应用的 BFF
|
|
29
|
+
- 加 `--appcode <code>`:反查到对应 app profile,使用其 cookie/env
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# 仅列出 order 应用的 BFF
|
|
33
|
+
rabetbase bff list --app order
|
|
34
|
+
|
|
35
|
+
# 指定 appcode
|
|
36
|
+
rabetbase bff list --appcode app-xxxxxxxx
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 输出
|
|
40
|
+
|
|
41
|
+
默认返回精简列表(id, functionName, description, scriptType)。`--verbose` 返回完整对象。
|
|
42
|
+
|
|
43
|
+
## BFF 脚本类型
|
|
44
|
+
|
|
45
|
+
| 类型 | 用途 | 说明 |
|
|
46
|
+
|------|------|------|
|
|
47
|
+
| ENDPOINT | 独立业务端点,前端通过 `client.bff.execute()` 调用 | 默认类型 |
|
|
48
|
+
| COMMON | 公共函数,供其他 BFF 脚本 import 复用 | 需 `--type COMMON` 查询 |
|
|
49
|
+
| HOOK | 挂在标准数据接口前后执行 | 通过数据集详情查看 |
|
|
50
|
+
|
|
51
|
+
## 提示
|
|
52
|
+
|
|
53
|
+
- 写 BFF 前先查公共函数列表(`--type COMMON`),看是否有可复用函数
|
|
54
|
+
- 复用 COMMON 前用 `bff detail --id <id>` 确认入参、返回值和副作用,不要按函数名猜契约
|
|
55
|
+
- 修改已有 BFF 前必须先用此命令找到脚本 ID
|
|
56
|
+
|
|
57
|
+
## 参考
|
|
58
|
+
|
|
59
|
+
- [SKILL.md](../SKILL.md)
|
|
60
|
+
- [bff-creation-workflow.md](../guides/bff-creation-workflow.md)
|
|
61
|
+
- [backend-function.md](../guides/backend-function.md)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# bff pull
|
|
2
|
+
|
|
3
|
+
把远端 BFF 脚本同步到本地 `.rabetbase/bff/<appCode>/...`。
|
|
4
|
+
|
|
5
|
+
## 命令
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
rabetbase bff pull --format json
|
|
9
|
+
rabetbase bff pull --type ENDPOINT --format json
|
|
10
|
+
rabetbase bff pull --dry-run --format json
|
|
11
|
+
rabetbase bff pull --type HOOK --force --format json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## 参数
|
|
15
|
+
|
|
16
|
+
| Flag | 类型 | 必填 | 默认 | 说明 |
|
|
17
|
+
|------|------|------|------|------|
|
|
18
|
+
| `--type <type>` | string | 否 | — | 仅拉指定类型:`COMMON` / `ENDPOINT` / `HOOK` |
|
|
19
|
+
| `--force` | boolean | 否 | — | 强制覆盖本地未同步改动 |
|
|
20
|
+
| `--dry-run` | boolean | 否 | — | 仅预览将要拉取的远端脚本与目标本地路径 |
|
|
21
|
+
| `--format <fmt>` | string | 否 | `pretty` | 输出格式 |
|
|
22
|
+
|
|
23
|
+
## 输出
|
|
24
|
+
|
|
25
|
+
返回:
|
|
26
|
+
- `pulled`
|
|
27
|
+
- `skipped`
|
|
28
|
+
- `failed`
|
|
29
|
+
|
|
30
|
+
`--dry-run` 时返回预览对象,包含远端脚本、目标 `filePath` 和预期状态(如 `would_pull` / `conflict`)。
|
|
31
|
+
|
|
32
|
+
## 提示
|
|
33
|
+
|
|
34
|
+
- 默认会保护本地未同步改动,冲突时进入 `skipped: local unsynced changes`
|
|
35
|
+
- `--dry-run` 不会改本地文件,也不会写 lock
|
|
36
|
+
- `HOOK` 落盘目录依赖 alias / datasetCode 解析
|
|
37
|
+
- 拉取后建议立刻跑一次 `bff status`
|
|
38
|
+
|
|
39
|
+
## 参考
|
|
40
|
+
|
|
41
|
+
- [SKILL.md](../SKILL.md)
|
|
42
|
+
- [conflict-detection.md](../guides/conflict-detection.md)
|