@lovrabet/rabetbase-cli 2.4.3 → 2.4.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.d.ts +2 -0
- package/lib/commands/db/diff-refresh-start.js +1 -0
- package/lib/commands/db/diff-refresh-status.d.ts +2 -0
- package/lib/commands/db/diff-refresh-status.js +1 -0
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-create.d.ts +2 -0
- package/lib/commands/notification/config-create.js +1 -0
- package/lib/commands/notification/config-delete.d.ts +2 -0
- package/lib/commands/notification/config-delete.js +1 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.d.ts +2 -0
- package/lib/commands/notification/config-update.js +1 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.d.ts +97 -0
- package/lib/commands/notification/shared.js +1 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +1 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.d.ts +11 -0
- package/lib/commands/project/create/materialize-project-template.js +1 -0
- package/lib/commands/project/create/project-name.d.ts +2 -0
- package/lib/commands/project/create/project-name.js +1 -0
- package/lib/commands/project/create/project-template-archive.d.ts +6 -0
- package/lib/commands/project/create/project-template-archive.js +1 -0
- package/lib/commands/project/create/project-template-path.d.ts +1 -3
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +2 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +2 -0
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +29 -2
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +13 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -4
- package/skills/rabetbase/SKILL.md +33 -22
- package/skills/rabetbase/guides/backend-function.md +5 -3
- package/skills/rabetbase/guides/bff-creation-workflow.md +2 -2
- package/skills/rabetbase/guides/conflict-detection.md +2 -2
- package/skills/rabetbase/guides/database-connection-workflow.md +39 -5
- package/skills/rabetbase/guides/react-custom-page-workflow.md +16 -4
- package/skills/rabetbase/guides/sql-creation-workflow.md +4 -2
- package/skills/rabetbase/guides/sql-mybatis.md +2 -2
- package/skills/rabetbase/knowledge/page-schema/YtPage.md +3 -37
- package/skills/rabetbase/knowledge/react-page/generation-standards.md +14 -3
- package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
- package/skills/rabetbase/references/rabetbase-bff-push.md +4 -5
- package/skills/rabetbase/references/rabetbase-bff-save.md +3 -3
- package/skills/rabetbase/references/rabetbase-config.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-detail.md +3 -0
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +53 -0
- package/skills/rabetbase/references/rabetbase-db-diff.md +40 -21
- package/skills/rabetbase/references/rabetbase-db-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +5 -3
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -10
- package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +1 -3
- package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +2 -3
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-notification-config-mutations.md +56 -0
- package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-react-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-react-publish.md +2 -2
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -0
- package/skills/rabetbase/references/rabetbase-run.md +1 -1
- package/skills/rabetbase/references/rabetbase-sql-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-sql-push.md +3 -4
- package/skills/rabetbase/references/rabetbase-user-account.md +0 -1
- package/skills/rabetbase.manifest.json +5 -5
- package/templates/README.md +14 -2
- package/lib/commands/project/create/non-interactive.d.ts +0 -9
- package/lib/commands/project/create/non-interactive.js +0 -1
- package/lib/utils/copy-directory.d.ts +0 -1
- package/lib/utils/copy-directory.js +0 -1
- package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +0 -291
- package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +0 -223
- package/templates/projects/sub-app-react-demo/.prettierrc +0 -1
- package/templates/projects/sub-app-react-demo/CHANGELOG.md +0 -67
- package/templates/projects/sub-app-react-demo/README.md +0 -246
- package/templates/projects/sub-app-react-demo/docs/quick-start.md +0 -245
- package/templates/projects/sub-app-react-demo/index.html +0 -27
- package/templates/projects/sub-app-react-demo/package.json +0 -34
- package/templates/projects/sub-app-react-demo/public/logo.svg +0 -1
- package/templates/projects/sub-app-react-demo/public/vite.svg +0 -1
- package/templates/projects/sub-app-react-demo/src/api/api.ts +0 -26
- package/templates/projects/sub-app-react-demo/src/api/client.ts +0 -32
- package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.module.css +0 -28
- package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.tsx +0 -55
- package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +0 -308
- package/templates/projects/sub-app-react-demo/src/main.tsx +0 -52
- package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +0 -570
- package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +0 -531
- package/templates/projects/sub-app-react-demo/src/pages/index.module.css +0 -500
- package/templates/projects/sub-app-react-demo/src/pages/index.tsx +0 -641
- package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +0 -536
- package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +0 -295
- package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +0 -242
- package/templates/projects/sub-app-react-demo/src/router/index.tsx +0 -30
- package/templates/projects/sub-app-react-demo/src/style.css +0 -108
- package/templates/projects/sub-app-react-demo/src/utils/api.ts +0 -12
- package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +0 -2
- package/templates/projects/sub-app-react-demo/tsconfig.json +0 -26
- package/templates/projects/sub-app-react-demo/vite.config.ts +0 -111
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a290_0x4254(){const _0x20c58e=['nonInteractive','103144ZLdKfW','1674603lXJXYt','3384800bJTasC','440405rjbgyI','94584YNDIgP','isRaw','7tGLjpU','stdin','1057242olXgku','16620Xbejpx','6iOGfDB','25NogcbH','true','setRawMode','isTTY','stdout','3586wuiEIZ'];a290_0x4254=function(){return _0x20c58e;};return a290_0x4254();}(function(_0x5a81e6,_0x25ec16){const _0x2ed683=a290_0x14bf,_0x1675fc=_0x5a81e6();while(!![]){try{const _0x47a689=parseInt(_0x2ed683(0x75))/0x1+-parseInt(_0x2ed683(0x76))/0x2+-parseInt(_0x2ed683(0x7c))/0x3*(parseInt(_0x2ed683(0x72))/0x4)+-parseInt(_0x2ed683(0x6b))/0x5*(-parseInt(_0x2ed683(0x7a))/0x6)+parseInt(_0x2ed683(0x78))/0x7*(-parseInt(_0x2ed683(0x74))/0x8)+parseInt(_0x2ed683(0x73))/0x9+-parseInt(_0x2ed683(0x7b))/0xa*(parseInt(_0x2ed683(0x70))/0xb);if(_0x47a689===_0x25ec16)break;else _0x1675fc['push'](_0x1675fc['shift']());}catch(_0x5bd942){_0x1675fc['push'](_0x1675fc['shift']());}}}(a290_0x4254,0x6c553));function a290_0x14bf(_0x36bfba,_0x15c37e){_0x36bfba=_0x36bfba-0x6b;const _0x4254d0=a290_0x4254();let _0x14bf21=_0x4254d0[_0x36bfba];return _0x14bf21;}function env(_0x551bd1){return process.env[`RABETBASE_${_0x551bd1}`]||process.env[`LOVRABET_${_0x551bd1}`]||undefined;}export function isNonInteractive(_0x11f9ba){const _0x21b31e=a290_0x14bf;return!!(_0x11f9ba[_0x21b31e(0x71)]||_0x11f9ba['ci']||env('CI')===_0x21b31e(0x6c)||process.env.CI===_0x21b31e(0x6c)||!process[_0x21b31e(0x6f)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x32a840=a290_0x14bf;if(!process[_0x32a840(0x79)][_0x32a840(0x6e)])return![];try{const _0x524037=process[_0x32a840(0x79)][_0x32a840(0x77)];return process[_0x32a840(0x79)]['setRawMode'](!![]),process[_0x32a840(0x79)][_0x32a840(0x6d)](_0x524037??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a291_0x3f45(_0x31c20d,_0x199de0){_0x31c20d=_0x31c20d-0x15c;const _0x17a9f2=a291_0x17a9();let _0x3f459e=_0x17a9f2[_0x31c20d];return _0x3f459e;}const a291_0x56eca3=a291_0x3f45;(function(_0x41d85f,_0x190888){const _0x50895f=a291_0x3f45,_0x4d1d4b=_0x41d85f();while(!![]){try{const _0x58ea77=parseInt(_0x50895f(0x167))/0x1*(-parseInt(_0x50895f(0x17d))/0x2)+parseInt(_0x50895f(0x17f))/0x3+parseInt(_0x50895f(0x18b))/0x4+parseInt(_0x50895f(0x15f))/0x5*(-parseInt(_0x50895f(0x165))/0x6)+parseInt(_0x50895f(0x180))/0x7+-parseInt(_0x50895f(0x174))/0x8+-parseInt(_0x50895f(0x16e))/0x9*(-parseInt(_0x50895f(0x190))/0xa);if(_0x58ea77===_0x190888)break;else _0x4d1d4b['push'](_0x4d1d4b['shift']());}catch(_0x433e8b){_0x4d1d4b['push'](_0x4d1d4b['shift']());}}}(a291_0x17a9,0x66dea));import a291_0x4b9f0f from'winston';import a291_0x533a86 from'node:fs';import a291_0x3d9fef from'node:path';class Logger{[a291_0x56eca3(0x15d)];[a291_0x56eca3(0x189)];[a291_0x56eca3(0x183)]='';constructor(){const _0x7ab247=a291_0x56eca3;this[_0x7ab247(0x189)]='';}[a291_0x56eca3(0x175)](_0x1e9f2c){const _0x5917a1=a291_0x56eca3;this[_0x5917a1(0x183)]=_0x1e9f2c;}[a291_0x56eca3(0x170)](){const _0x3f4069=a291_0x56eca3,_0x31e3d7=a291_0x3d9fef['dirname'](this[_0x3f4069(0x189)]);!a291_0x533a86[_0x3f4069(0x173)](_0x31e3d7)&&a291_0x533a86[_0x3f4069(0x191)](_0x31e3d7,{'recursive':!![]});const _0x3b3f5f=a291_0x4b9f0f[_0x3f4069(0x166)][_0x3f4069(0x17e)](a291_0x4b9f0f[_0x3f4069(0x166)][_0x3f4069(0x177)](),a291_0x4b9f0f['format'][_0x3f4069(0x182)]({'stack':!![]}),a291_0x4b9f0f['format'][_0x3f4069(0x162)](_0x39d605=>{const _0x1c5ca1=_0x3f4069,_0x1d4f2f={'timestamp':_0x39d605[_0x1c5ca1(0x177)]||new Date()['toISOString'](),'level':_0x39d605['level']||'info','command':_0x39d605['command']||_0x1c5ca1(0x18f),'rawCommand':_0x39d605[_0x1c5ca1(0x15c)]||this['currentRawCommand']||undefined,'message':_0x39d605[_0x1c5ca1(0x16a)]||'','duration':_0x39d605[_0x1c5ca1(0x161)]||undefined,'details':_0x39d605[_0x1c5ca1(0x171)]||undefined};return JSON[_0x1c5ca1(0x172)](_0x1d4f2f);}));this[_0x3f4069(0x15d)]=a291_0x4b9f0f[_0x3f4069(0x18a)]({'level':_0x3f4069(0x169),'format':_0x3b3f5f,'transports':[new a291_0x4b9f0f[(_0x3f4069(0x16c))][(_0x3f4069(0x164))]({'filename':this[_0x3f4069(0x189)],'level':'info'})],'silent':![]}),a291_0x4b9f0f[_0x3f4069(0x17c)]({'success':'green','error':_0x3f4069(0x184),'warn':'yellow','info':'blue'});}[a291_0x56eca3(0x16f)](_0x40206d){const _0x1b7211=a291_0x56eca3;this[_0x1b7211(0x189)]=a291_0x3d9fef[_0x1b7211(0x185)](_0x40206d,_0x1b7211(0x160)),this[_0x1b7211(0x15d)]&&this['winstonLogger']['clear'](),this[_0x1b7211(0x170)]();}[a291_0x56eca3(0x169)](_0x23f6f6,_0x1e489b,_0x5c347f){const _0x51c6bf=a291_0x56eca3;if(!this[_0x51c6bf(0x189)]||!this[_0x51c6bf(0x15d)])return;this[_0x51c6bf(0x15d)]['info'](_0x1e489b,{'command':_0x23f6f6,'details':_0x5c347f});}['success'](_0x3d896e,_0x49b675,_0xa0266b,_0x15a3a3){const _0x355c05=a291_0x56eca3;if(!this[_0x355c05(0x189)]||!this[_0x355c05(0x15d)])return;this[_0x355c05(0x15d)]['log'](_0x355c05(0x169),_0x49b675,{'level':_0x355c05(0x15e),'command':_0x3d896e,'duration':_0xa0266b,'details':_0x15a3a3});}[a291_0x56eca3(0x186)](_0x3aa8aa,_0x1e79e6,_0x27f82f){const _0x2c5723=a291_0x56eca3;if(!this['logFilePath']||!this[_0x2c5723(0x15d)])return;this[_0x2c5723(0x15d)]['error'](_0x1e79e6,{'command':_0x3aa8aa,'details':_0x27f82f});}[a291_0x56eca3(0x179)](_0x2cfece,_0x3bdb71,_0x238a49){const _0x5e1515=a291_0x56eca3;if(!this[_0x5e1515(0x189)]||!this[_0x5e1515(0x15d)])return;this['winstonLogger'][_0x5e1515(0x179)](_0x3bdb71,{'command':_0x2cfece,'details':_0x238a49});}async['logTask'](_0x40d839,_0x24ca29,_0x5f5b5d){const _0x1c7cbd=a291_0x56eca3,_0x365681=Date[_0x1c7cbd(0x17b)]();this['info'](_0x40d839,'开始执行:\x20'+_0x24ca29);try{const _0x28275b=await _0x5f5b5d(),_0xcf68c4=Date['now']()-_0x365681;return this[_0x1c7cbd(0x15e)](_0x40d839,_0x1c7cbd(0x178)+_0x24ca29,_0xcf68c4),_0x28275b;}catch(_0x49bd7b){const _0x5b148c=Date[_0x1c7cbd(0x17b)]()-_0x365681;this[_0x1c7cbd(0x186)](_0x40d839,_0x1c7cbd(0x181)+_0x24ca29,{'error':_0x49bd7b instanceof Error?_0x49bd7b[_0x1c7cbd(0x16a)]:String(_0x49bd7b),'duration':_0x5b148c});throw _0x49bd7b;}}[a291_0x56eca3(0x187)](){const _0x29dd97=a291_0x56eca3;try{if(!a291_0x533a86['existsSync'](this[_0x29dd97(0x189)]))return[];const _0x208cac=a291_0x533a86['readFileSync'](this[_0x29dd97(0x189)],_0x29dd97(0x188));return _0x208cac[_0x29dd97(0x18d)]('\x0a')[_0x29dd97(0x192)](_0x41f444=>_0x41f444[_0x29dd97(0x18e)]())[_0x29dd97(0x16d)](_0x2f7fea=>JSON[_0x29dd97(0x168)](_0x2f7fea));}catch(_0x8985bf){return console['warn'](_0x29dd97(0x16b),_0x8985bf),[];}}[a291_0x56eca3(0x176)](){const _0x33bde9=a291_0x56eca3;try{a291_0x533a86[_0x33bde9(0x173)](this['logFilePath'])&&a291_0x533a86[_0x33bde9(0x17a)](this['logFilePath'],'','utf8');}catch(_0x162838){console['warn'](_0x33bde9(0x18c),_0x162838);}}[a291_0x56eca3(0x163)](){const _0x5b6645=a291_0x56eca3;return this[_0x5b6645(0x15d)];}}function a291_0x17a9(){const _0x507192=['duration','printf','getWinstonInstance','File','3926100UpLkbx','format','1lsqGme','parse','info','message','Failed\x20to\x20read\x20logs:','transports','map','27xrRWzM','setLogPath','initWinstonLogger','details','stringify','existsSync','1014808pBLNBN','setRawCommand','clearLogs','timestamp','完成:\x20','warn','writeFileSync','now','addColors','1327944ZhBVzx','combine','2143623lINoFd','821156xeApPP','失败:\x20','errors','currentRawCommand','red','join','error','readLogs','utf8','logFilePath','createLogger','1275548cKOsGH','Failed\x20to\x20clear\x20logs:','split','trim','unknown','2385970FqFMKs','mkdirSync','filter','rawCommand','winstonLogger','success','5riMCqY','.lovrabet.log'];a291_0x17a9=function(){return _0x507192;};return a291_0x17a9();}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a292_0x1009(_0x1ffdb4,_0x18ffef){_0x1ffdb4=_0x1ffdb4-0xc2;const _0x16c938=a292_0x16c9();let _0x1009e1=_0x16c938[_0x1ffdb4];return _0x1009e1;}(function(_0x2b4f2f,_0x845ec2){const _0x329fc7=a292_0x1009,_0x2c426f=_0x2b4f2f();while(!![]){try{const _0x587c67=-parseInt(_0x329fc7(0xcf))/0x1+-parseInt(_0x329fc7(0xc2))/0x2*(-parseInt(_0x329fc7(0xc4))/0x3)+-parseInt(_0x329fc7(0xc3))/0x4*(parseInt(_0x329fc7(0xc7))/0x5)+-parseInt(_0x329fc7(0xcd))/0x6+parseInt(_0x329fc7(0xc6))/0x7+-parseInt(_0x329fc7(0xcb))/0x8*(-parseInt(_0x329fc7(0xc9))/0x9)+-parseInt(_0x329fc7(0xc5))/0xa;if(_0x587c67===_0x845ec2)break;else _0x2c426f['push'](_0x2c426f['shift']());}catch(_0x1ea0e7){_0x2c426f['push'](_0x2c426f['shift']());}}}(a292_0x16c9,0xac7b1));import{CliErrors}from'../errors.js';function a292_0x16c9(){const _0x4e7459=['342744dDPPvN','isArray','827719dmJSYP','10KrGyxR','8956QzpsOh','808701XfrqHx','3738590cFEYdD','4331754ExaFzT','555EnZQok','--params\x20must\x20be\x20a\x20JSON\x20object','9qitwXn','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','1976440pcHRjZ','object'];a292_0x16c9=function(){return _0x4e7459;};return a292_0x16c9();}export function parseJsonParams(_0x45d420){const _0xff701a=a292_0x1009;if(!_0x45d420)return undefined;let _0xa7c20e;try{_0xa7c20e=JSON['parse'](_0x45d420);}catch{throw CliErrors['validation']('Invalid\x20JSON\x20for\x20--params:\x20'+_0x45d420);}if(!_0xa7c20e||typeof _0xa7c20e!==_0xff701a(0xcc)||Array[_0xff701a(0xce)](_0xa7c20e))throw CliErrors['validation'](_0xff701a(0xc8),_0xff701a(0xca));return _0xa7c20e;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a293_0x2f5d(){const _0xd4837e=['141332orFliR','11sTpzWa','144bTARJA','27DeuTGh','win32','1867540bpMZMo','1390779MwslVk','371ZQEMsA','1dnRGit','925508jAzCSY','3540580FZGnfI','1208408yNoGPD','platform'];a293_0x2f5d=function(){return _0xd4837e;};return a293_0x2f5d();}function a293_0x9e56(_0x557b7e,_0x527857){_0x557b7e=_0x557b7e-0x1db;const _0x2f5d38=a293_0x2f5d();let _0x9e5620=_0x2f5d38[_0x557b7e];return _0x9e5620;}const a293_0x42470c=a293_0x9e56;(function(_0xb4c650,_0x42906f){const _0x4abbc7=a293_0x9e56,_0x1643df=_0xb4c650();while(!![]){try{const _0x32d541=-parseInt(_0x4abbc7(0x1e1))/0x1*(parseInt(_0x4abbc7(0x1e2))/0x2)+parseInt(_0x4abbc7(0x1dc))/0x3*(-parseInt(_0x4abbc7(0x1e6))/0x4)+parseInt(_0x4abbc7(0x1de))/0x5+parseInt(_0x4abbc7(0x1db))/0x6*(parseInt(_0x4abbc7(0x1e0))/0x7)+parseInt(_0x4abbc7(0x1e4))/0x8+parseInt(_0x4abbc7(0x1df))/0x9+-parseInt(_0x4abbc7(0x1e3))/0xa*(-parseInt(_0x4abbc7(0x1e7))/0xb);if(_0x32d541===_0x42906f)break;else _0x1643df['push'](_0x1643df['shift']());}catch(_0x4dcc91){_0x1643df['push'](_0x1643df['shift']());}}}(a293_0x2f5d,0x3dee5));export const isWindows=process[a293_0x42470c(0x1e5)]===a293_0x42470c(0x1dd);export function resolveNpmBin(_0x530130){return isWindows?_0x530130+'.cmd':_0x530130;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1bba52,_0x1f94dc){const _0x2e37af=a294_0x3476,_0x2f235c=_0x1bba52();while(!![]){try{const _0x4e92b1=-parseInt(_0x2e37af(0x190))/0x1+parseInt(_0x2e37af(0x18c))/0x2*(parseInt(_0x2e37af(0x17c))/0x3)+-parseInt(_0x2e37af(0x191))/0x4*(parseInt(_0x2e37af(0x18a))/0x5)+-parseInt(_0x2e37af(0x18f))/0x6+parseInt(_0x2e37af(0x183))/0x7*(parseInt(_0x2e37af(0x17b))/0x8)+-parseInt(_0x2e37af(0x189))/0x9+parseInt(_0x2e37af(0x185))/0xa;if(_0x4e92b1===_0x1f94dc)break;else _0x2f235c['push'](_0x2f235c['shift']());}catch(_0x853ca2){_0x2f235c['push'](_0x2f235c['shift']());}}}(a294_0x3dad,0x89b50));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';function a294_0x3476(_0x26a4f2,_0x1007c9){_0x26a4f2=_0x26a4f2-0x17b;const _0x3dadcf=a294_0x3dad();let _0x3476e9=_0x3dadcf[_0x26a4f2];return _0x3476e9;}function a294_0x3dad(){const _0x439566=['5632596gztKTK','34115DjNkYY','catch','6CVpOgA','statusText','status','3373926iugWfU','161372tsAOSy','612BGyZgG','1555304saEbJa','673383bsELne','.cursor/rules','CDN\x20返回数据格式错误','utf-8','本地模板文件不存在:\x20','lovrabet_rules.mdc','CDN\x20请求失败:\x20','21FXquuk','/rules/rules.json','17008820tNFSuw','content','agents.md','string'];a294_0x3dad=function(){return _0x439566;};return a294_0x3dad();}import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x32e504=a294_0x3476,_0x428ba8=getTemplateBaseUrl();return _0x428ba8+_0x32e504(0x184);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,'../../templates/rules/lovrabet_rules.mdc.tpl');export async function fetchRulesFromCDN(){const _0x343442=a294_0x3476,_0xe4a0cd=getRulesCdnUrl(),_0x59c564=await fetch(_0xe4a0cd,{'headers':{'Accept':'application/json'}});if(!_0x59c564['ok'])throw new Error(_0x343442(0x182)+_0x59c564[_0x343442(0x18e)]+'\x20'+_0x59c564[_0x343442(0x18d)]);const _0x17f39f=await _0x59c564['json']();if(!_0x17f39f[_0x343442(0x186)]||typeof _0x17f39f[_0x343442(0x186)]!==_0x343442(0x188))throw new Error(_0x343442(0x17e));return _0x17f39f;}export async function getRulesContent(){try{const _0x549f1c=await fetchRulesFromCDN();return _0x549f1c['content'];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x158b7f=a294_0x3476;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x158b7f(0x17f));throw new Error(_0x158b7f(0x180)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x2d3510){const _0x1ba91=a294_0x3476,_0x4ee4ee=await fetchRulesFromCDN()[_0x1ba91(0x18b)](()=>null);let _0x31481c;_0x4ee4ee?(_0x31481c=_0x4ee4ee[_0x1ba91(0x186)],_0x4ee4ee['lastUpdated']&&(_0x31481c=appendUpdateTime(_0x31481c,_0x4ee4ee['lastUpdated']))):_0x31481c=readLocalTemplate();const _0x15bc8b=dirname(_0x2d3510);!existsSync(_0x15bc8b)&&mkdirSync(_0x15bc8b,{'recursive':!![]}),writeFileSync(_0x2d3510,_0x31481c,'utf-8');}export async function copyRulesToCursor(_0x45cd0b){const _0x90c3d6=a294_0x3476,_0x5b8c36=join(_0x45cd0b,_0x90c3d6(0x17d)),_0x1044b1=join(_0x5b8c36,_0x90c3d6(0x181));if(existsSync(_0x1044b1))return![];return await writeRulesFile(_0x1044b1),!![];}export async function copyRulesToAgentsMd(_0x5724c1){const _0x3fbc76=a294_0x3476,_0x1a7165=join(_0x5724c1,_0x3fbc76(0x187));if(existsSync(_0x1a7165))return![];return await writeRulesFile(_0x1a7165),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x50c954){return new Promise(_0x155510=>setTimeout(_0x155510,_0x50c954));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a296_0x851c50=a296_0x1225;(function(_0xd5f23a,_0x3e5d08){const _0x458eaa=a296_0x1225,_0x4952f6=_0xd5f23a();while(!![]){try{const _0x148e3a=-parseInt(_0x458eaa(0x1cc))/0x1+parseInt(_0x458eaa(0x1bb))/0x2*(parseInt(_0x458eaa(0x1b8))/0x3)+-parseInt(_0x458eaa(0x1cd))/0x4+parseInt(_0x458eaa(0x1b0))/0x5+-parseInt(_0x458eaa(0x1a8))/0x6+parseInt(_0x458eaa(0x1b7))/0x7*(parseInt(_0x458eaa(0x1c1))/0x8)+parseInt(_0x458eaa(0x1d3))/0x9;if(_0x148e3a===_0x3e5d08)break;else _0x4952f6['push'](_0x4952f6['shift']());}catch(_0xba94bc){_0x4952f6['push'](_0x4952f6['shift']());}}}(a296_0x35f7,0xdb429));import a296_0x4b479b from'node:fs';import a296_0x5d7538 from'node:path';function a296_0x35f7(){const _0x15a8ce=['LOVRABET','endsWith','copyFile','9462775ZNjiiY','27Znffrq','default','.tpl','150214KZhXRx','alias','getMinutes','replace','isFile','.css','8WMYqGi','includes','.ts','push','getFullYear','processFile','\x20},','join','toComponentName','info','datasetCode','1178849KRqftt','321260RCSZeX','tableName:\x20\x22','.scss','promises','replaceContent','toDisplayTitle','9054441zppPAu','template','getDate','map','.jsx','name:\x20\x22','mkdir','replaceApiContent','getSeconds','.md','processTemplate','tableName','extname','getMonth','api','split','.js','processDirectory','readdir','datasetCode:\x20\x22','isDirectory','slice','charAt','now','模板内容替换完成','toUpperCase','8180430opWOwy','name','utf8','getHours','pad','success','toLowerCase','alias:\x20\x22','2434105GEigrT','formatLocalTimestamp','pop','error'];a296_0x35f7=function(){return _0x15a8ce;};return a296_0x35f7();}function a296_0x1225(_0x4c7be1,_0x443185){_0x4c7be1=_0x4c7be1-0x190;const _0x35f725=a296_0x35f7();let _0x12251d=_0x35f725[_0x4c7be1];return _0x12251d;}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a296_0x851c50(0x1ac)](_0x519582){return String(_0x519582)['padStart'](0x2,'0');}static[a296_0x851c50(0x1b1)](_0x42190e){const _0x244b06=a296_0x851c50,_0x1ec249=_0x42190e[_0x244b06(0x1c5)](),_0x2fecea=this[_0x244b06(0x1ac)](_0x42190e[_0x244b06(0x19b)]()+0x1),_0x2bc939=this[_0x244b06(0x1ac)](_0x42190e[_0x244b06(0x190)]()),_0xe97447=this[_0x244b06(0x1ac)](_0x42190e[_0x244b06(0x1ab)]()),_0x18048e=this['pad'](_0x42190e[_0x244b06(0x1bd)]()),_0x4854a3=this[_0x244b06(0x1ac)](_0x42190e[_0x244b06(0x196)]());return{'createdAt':_0x1ec249+'-'+_0x2fecea+'-'+_0x2bc939+'\x20'+_0xe97447+':'+_0x18048e+':'+_0x4854a3,'createdDate':_0x1ec249+'-'+_0x2fecea+'-'+_0x2bc939,'createdTime':_0xe97447+':'+_0x18048e+':'+_0x4854a3};}static[a296_0x851c50(0x1c9)](_0x4bcf46){const _0x5e8fa9=a296_0x851c50,_0x687c04=_0x4bcf46[_0x5e8fa9(0x19d)]('/')[_0x5e8fa9(0x1b2)]()||_0x4bcf46;return _0x687c04['split']('-')[_0x5e8fa9(0x191)](_0x21b2de=>_0x21b2de[_0x5e8fa9(0x1a4)](0x0)[_0x5e8fa9(0x1a7)]()+_0x21b2de['slice'](0x1)[_0x5e8fa9(0x1ae)]())[_0x5e8fa9(0x1c8)]('');}static[a296_0x851c50(0x1d2)](_0x417987){const _0x5760ca=a296_0x851c50,_0x23366c=_0x417987['split']('/')[_0x5760ca(0x1b2)]()||_0x417987;return _0x23366c['split']('-')[_0x5760ca(0x191)](_0xe231b9=>_0xe231b9[_0x5760ca(0x1a4)](0x0)['toUpperCase']()+_0xe231b9[_0x5760ca(0x1a3)](0x1)[_0x5760ca(0x1ae)]())[_0x5760ca(0x1c8)]('\x20');}static[a296_0x851c50(0x1d1)](_0x39f0b0,_0x7b358f,_0x3685e8){const _0x39b837=a296_0x851c50,_0x3d2daa=this[_0x39b837(0x1c9)](_0x7b358f),_0x1e9c80=this[_0x39b837(0x1d2)](_0x7b358f),{createdAt:_0xe58a27,createdDate:_0x5084fa,createdTime:_0x4dc3be}=this[_0x39b837(0x1b1)](new Date());let _0x26517b=_0x39f0b0[_0x39b837(0x1be)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x3d2daa)[_0x39b837(0x1be)](/\{DisplayTitle\}/g,_0x1e9c80)[_0x39b837(0x1be)](/\{PageName\}/g,_0x7b358f)['replace'](/\{TemplateName\}/g,_0x3685e8)[_0x39b837(0x1be)](/\{CreatedAt\}/g,_0xe58a27)['replace'](/\{CreatedDate\}/g,_0x5084fa)[_0x39b837(0x1be)](/\{CreatedTime\}/g,_0x4dc3be);return _0x26517b;}static[a296_0x851c50(0x195)](_0x241ff6,_0x4a9dca,_0x38bcf6,_0x378574,_0x3136af,_0x1550e1,_0x23cc44,_0x2cbf97){const _0x33afc5=a296_0x851c50,_0x54f593=new Date(),_0x4ace48=_0x54f593['toISOString'](),_0x4ccad9=_0x38bcf6[_0x33afc5(0x191)](_0x1a6f6b=>{const _0x4db532=_0x33afc5,_0x2bbeb9=[_0x4db532(0x1a1)+_0x1a6f6b[_0x4db532(0x1cb)]+'\x22',_0x4db532(0x1ce)+_0x1a6f6b[_0x4db532(0x199)]+'\x22',_0x4db532(0x193)+_0x1a6f6b[_0x4db532(0x1a9)]+'\x22'];return _0x1a6f6b[_0x4db532(0x1bc)]&&_0x2bbeb9[_0x4db532(0x1c4)](_0x4db532(0x1af)+_0x1a6f6b[_0x4db532(0x1bc)]+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x2bbeb9[_0x4db532(0x1c8)](',\x20')+_0x4db532(0x1c7);})[_0x33afc5(0x1c8)](''),_0x22cf63=_0x378574||_0x38bcf6[0x0]?.[_0x33afc5(0x1bc)]||'YourModel';let _0x414f3a=_0x241ff6[_0x33afc5(0x1be)](/\{AppCode\}/g,_0x4a9dca)[_0x33afc5(0x1be)](/\{ModelConfigs\}/g,_0x4ccad9)['replace'](/\{ExampleModelName\}/g,_0x22cf63)[_0x33afc5(0x1be)](/\{ApiFileName\}/g,_0x3136af||_0x33afc5(0x19c))[_0x33afc5(0x1be)](/\{ConfigName\}/g,_0x1550e1||_0x33afc5(0x1b9))[_0x33afc5(0x1be)](/\{ClientConfigParam\}/g,_0x23cc44||'')[_0x33afc5(0x1be)](/\{VarPrefix\}/g,_0x2cbf97||_0x33afc5(0x1b4))[_0x33afc5(0x1be)](/\{CreatedAt\}/g,_0x4ace48);return _0x414f3a;}static async[a296_0x851c50(0x198)](_0x154e7f,_0x31b677,_0x459d78,_0x265a57,_0x413f93=!![]){const _0x541e0d=a296_0x851c50,_0xb62624=Date[_0x541e0d(0x1a5)]();try{_0x413f93&&logger[_0x541e0d(0x1ca)]('template','开始处理模板内容替换',{'templatePath':_0x154e7f,'targetPath':_0x31b677,'pageName':_0x459d78,'templateName':_0x265a57});await a296_0x4b479b[_0x541e0d(0x1d0)]['mkdir'](_0x31b677,{'recursive':!![]}),await this['processDirectory'](_0x154e7f,_0x31b677,_0x459d78,_0x265a57);if(_0x413f93){const _0x1a4f21=Date[_0x541e0d(0x1a5)]()-_0xb62624;logger[_0x541e0d(0x1ad)](_0x541e0d(0x1d4),_0x541e0d(0x1a6),_0x1a4f21,{'pageName':_0x459d78,'templateName':_0x265a57});}}catch(_0x470d34){if(_0x413f93){const _0x27077d=Date[_0x541e0d(0x1a5)]()-_0xb62624;logger[_0x541e0d(0x1b3)]('template','模板内容替换失败',{'templatePath':_0x154e7f,'targetPath':_0x31b677,'pageName':_0x459d78,'templateName':_0x265a57,'error':_0x470d34 instanceof Error?_0x470d34['message']:String(_0x470d34),'duration':_0x27077d});}throw _0x470d34;}}static async[a296_0x851c50(0x19f)](_0x45573d,_0x2e274c,_0x2500eb,_0x5f3a6e){const _0x39e50b=a296_0x851c50,_0x1a1b5e=await a296_0x4b479b[_0x39e50b(0x1d0)][_0x39e50b(0x1a0)](_0x45573d,{'withFileTypes':!![]});for(const _0x21f3b9 of _0x1a1b5e){const _0x34c93e=a296_0x5d7538[_0x39e50b(0x1c8)](_0x45573d,_0x21f3b9[_0x39e50b(0x1a9)]);let _0x337a7a=a296_0x5d7538[_0x39e50b(0x1c8)](_0x2e274c,_0x21f3b9[_0x39e50b(0x1a9)]);_0x21f3b9[_0x39e50b(0x1a9)][_0x39e50b(0x1b5)]('.tpl')&&(_0x337a7a=a296_0x5d7538[_0x39e50b(0x1c8)](_0x2e274c,_0x21f3b9[_0x39e50b(0x1a9)][_0x39e50b(0x1be)](/\.tpl$/,'')));if(_0x21f3b9[_0x39e50b(0x1a2)]())await a296_0x4b479b[_0x39e50b(0x1d0)][_0x39e50b(0x194)](_0x337a7a,{'recursive':!![]}),await this[_0x39e50b(0x19f)](_0x34c93e,_0x337a7a,_0x2500eb,_0x5f3a6e);else _0x21f3b9[_0x39e50b(0x1bf)]()&&await this['processFile'](_0x34c93e,_0x337a7a,_0x2500eb,_0x5f3a6e);}}static async[a296_0x851c50(0x1c6)](_0x490abc,_0x3023ec,_0x50b3ad,_0x3fc466){const _0x12d75d=a296_0x851c50,_0x1cb301=a296_0x5d7538[_0x12d75d(0x19a)](_0x490abc)[_0x12d75d(0x1ae)]();_0x490abc['endsWith']('.tpl')&&(_0x3023ec=_0x3023ec[_0x12d75d(0x1be)](/\.tpl$/,''));const _0x461a38=['.tsx',_0x12d75d(0x1c3),_0x12d75d(0x192),_0x12d75d(0x19e),'.json',_0x12d75d(0x197),_0x12d75d(0x1c0),_0x12d75d(0x1cf),_0x12d75d(0x1ba)];if(_0x461a38[_0x12d75d(0x1c2)](_0x1cb301)||_0x490abc[_0x12d75d(0x1b5)]('.tpl')){const _0x5a5f60=await a296_0x4b479b[_0x12d75d(0x1d0)]['readFile'](_0x490abc,_0x12d75d(0x1aa)),_0x559e61=this[_0x12d75d(0x1d1)](_0x5a5f60,_0x50b3ad,_0x3fc466);await a296_0x4b479b[_0x12d75d(0x1d0)]['writeFile'](_0x3023ec,_0x559e61,_0x12d75d(0x1aa));}else await a296_0x4b479b[_0x12d75d(0x1d0)][_0x12d75d(0x1b6)](_0x490abc,_0x3023ec);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x55f4e4,_0x237b97){const _0x2f538a=a297_0x31ee,_0xa1305d=_0x55f4e4();while(!![]){try{const _0xdfec90=-parseInt(_0x2f538a(0xb9))/0x1+-parseInt(_0x2f538a(0xca))/0x2*(parseInt(_0x2f538a(0xbc))/0x3)+parseInt(_0x2f538a(0xc0))/0x4+parseInt(_0x2f538a(0xc8))/0x5*(parseInt(_0x2f538a(0xc6))/0x6)+parseInt(_0x2f538a(0xba))/0x7*(parseInt(_0x2f538a(0xc5))/0x8)+parseInt(_0x2f538a(0xbe))/0x9*(parseInt(_0x2f538a(0xc3))/0xa)+-parseInt(_0x2f538a(0xb6))/0xb;if(_0xdfec90===_0x237b97)break;else _0xa1305d['push'](_0xa1305d['shift']());}catch(_0x10c107){_0xa1305d['push'](_0xa1305d['shift']());}}}(a297_0x307e,0x9d434));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a297_0x464c4f from'semver';function a297_0x31ee(_0x235c32,_0x2eaea3){_0x235c32=_0x235c32-0xb0;const _0x307ebd=a297_0x307e();let _0x31ee88=_0x307ebd[_0x235c32];return _0x31ee88;}import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function a297_0x307e(){const _0x9e0263=['true','1010OYFSoy','\x20update','298424TKWQdv','209298xCXxiz','utf8','125CoCsZD','rabetbase-cli','61012yneovT','https://www.npmjs.com/package/','number','now','latest','valid','lastNotifiedAt',',\x20run:\x20','checkedAt','6674228PHkDXI','.cache','/v/','527293jRVRae','49qwTwRw','yes','126BsCgKv','gte','65655IUqkqr','trim','4757800nbaAtY','toLowerCase'];a297_0x307e=function(){return _0x9e0263;};return a297_0x307e();}function isUpdateNoticeDisabled(){const _0x327aac=a297_0x31ee,_0x157dd8=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x327aac(0xbf)]()[_0x327aac(0xc1)]();return _0x157dd8==='1'||_0x157dd8===_0x327aac(0xc2)||_0x157dd8===_0x327aac(0xbb);}function cacheRoot(){const _0x4ce45a=a297_0x31ee;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x4ce45a(0xb7));}export function getUpdateNoticeCachePath(){const _0x22b48c=a297_0x31ee;return join(cacheRoot(),_0x22b48c(0xc9),'update-check.json');}async function readUpdateNoticeCache(){try{const _0x53210f=await readFile(getUpdateNoticeCachePath(),'utf8'),_0xc47d54=JSON['parse'](_0x53210f);if(!_0xc47d54||typeof _0xc47d54!=='object')return{};return _0xc47d54;}catch{return{};}}async function writeUpdateNoticeCache(_0x302d83){const _0x4192bd=a297_0x31ee;try{const _0x2660b3=getUpdateNoticeCachePath();await mkdir(dirname(_0x2660b3),{'recursive':!![]}),await writeFile(_0x2660b3,JSON['stringify'](_0x302d83,null,0x2)+'\x0a',_0x4192bd(0xc7));}catch{}}function isFreshCheck(_0x239d08,_0x13eb02){const _0x23f0a6=a297_0x31ee;return typeof _0x239d08[_0x23f0a6(0xb5)]===_0x23f0a6(0xcc)&&_0x13eb02-_0x239d08[_0x23f0a6(0xb5)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x1504d6,_0xe29254,_0x3a5c84){const _0x156f34=a297_0x31ee;return _0x1504d6['lastNotifiedVersion']===_0xe29254&&typeof _0x1504d6[_0x156f34(0xb3)]===_0x156f34(0xcc)&&_0x3a5c84-_0x1504d6[_0x156f34(0xb3)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x2ac449){const _0x82ddea=a297_0x31ee;return _0x82ddea(0xcb)+NPM_PACKAGE_NAME+_0x82ddea(0xb8)+_0x2ac449;}export async function resolveLatestUpdateNotice(){const _0x164d1d=a297_0x31ee;if(isUpdateNoticeDisabled())return null;try{const _0x27c8a6=Date[_0x164d1d(0xb0)](),_0x5cddcf=getCliVersion(),_0x2c1415=await readUpdateNoticeCache();let _0x40c3f0=isFreshCheck(_0x2c1415,_0x27c8a6)?_0x2c1415[_0x164d1d(0xb1)]?.['trim']():undefined;if(!_0x40c3f0&&!isFreshCheck(_0x2c1415,_0x27c8a6)){const _0x4f0883=await getCliVersionPolicy();_0x40c3f0=_0x4f0883?.['stableVersion']?.[_0x164d1d(0xbf)]()||undefined,await writeUpdateNoticeCache({..._0x2c1415,'checkedAt':_0x27c8a6,'latest':_0x40c3f0,'failed':!_0x40c3f0});}if(!_0x40c3f0||!a297_0x464c4f[_0x164d1d(0xb2)](_0x5cddcf)||!a297_0x464c4f['valid'](_0x40c3f0))return null;if(a297_0x464c4f[_0x164d1d(0xbd)](_0x5cddcf,_0x40c3f0))return null;if(isRecentlyNotified(_0x2c1415,_0x40c3f0,_0x27c8a6))return null;const _0x515a23=CLI_BIN_NAME+_0x164d1d(0xc4);return await writeUpdateNoticeCache({..._0x2c1415,'checkedAt':isFreshCheck(_0x2c1415,_0x27c8a6)?_0x2c1415[_0x164d1d(0xb5)]:_0x27c8a6,'latest':_0x40c3f0,'failed':![],'lastNotifiedVersion':_0x40c3f0,'lastNotifiedAt':_0x27c8a6}),{'command':_0x515a23,'current':_0x5cddcf,'latest':_0x40c3f0,'url':buildNpmVersionUrl(_0x40c3f0),'message':CLI_BIN_NAME+'\x20'+_0x40c3f0+'\x20available,\x20current\x20'+_0x5cddcf+_0x164d1d(0xb4)+_0x515a23};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x40344a,_0x464c08){var _0x430e0b=a298_0x6462,_0x460e89=_0x40344a();while(!![]){try{var _0x34f0d3=-parseInt(_0x430e0b(0x119))/0x1+-parseInt(_0x430e0b(0x117))/0x2+parseInt(_0x430e0b(0x115))/0x3+parseInt(_0x430e0b(0x11a))/0x4*(parseInt(_0x430e0b(0x11d))/0x5)+-parseInt(_0x430e0b(0x11c))/0x6+parseInt(_0x430e0b(0x11b))/0x7+parseInt(_0x430e0b(0x118))/0x8*(parseInt(_0x430e0b(0x116))/0x9);if(_0x34f0d3===_0x464c08)break;else _0x460e89['push'](_0x460e89['shift']());}catch(_0x5a2dd4){_0x460e89['push'](_0x460e89['shift']());}}}(a298_0x76ff,0x59177));function a298_0x76ff(){var _0x3981be=['284841rKypoj','1375498ySGORj','248dTFqwW','559819qVcJzY','4320qIXWrG','1462286kJCCNX','4020912ffhfDb','2140RmvzsB','1891146KYFBhC'];a298_0x76ff=function(){return _0x3981be;};return a298_0x76ff();}function a298_0x6462(_0x4204b1,_0x372f75){_0x4204b1=_0x4204b1-0x115;var _0x76ff68=a298_0x76ff();var _0x64621a=_0x76ff68[_0x4204b1];return _0x64621a;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a299_0xc5af(){var _0x3f22ce=['175EJQRdJ','3931992VDZmvR','8SlbLWD','6330pSaygF','736348DWvwYf','372VrCCVW','3749466YiumPu','3976otfzvv','33502390nBynMW','15972588GSYmDm'];a299_0xc5af=function(){return _0x3f22ce;};return a299_0xc5af();}(function(_0x35e855,_0x357211){var _0x7ae038=a299_0x1666,_0x41f9ac=_0x35e855();while(!![]){try{var _0x31bcb6=parseInt(_0x7ae038(0x1c7))/0x1+-parseInt(_0x7ae038(0x1c0))/0x2*(-parseInt(_0x7ae038(0x1be))/0x3)+parseInt(_0x7ae038(0x1c4))/0x4+-parseInt(_0x7ae038(0x1c3))/0x5*(parseInt(_0x7ae038(0x1c6))/0x6)+-parseInt(_0x7ae038(0x1bf))/0x7*(-parseInt(_0x7ae038(0x1c5))/0x8)+parseInt(_0x7ae038(0x1c2))/0x9+-parseInt(_0x7ae038(0x1c1))/0xa;if(_0x31bcb6===_0x357211)break;else _0x41f9ac['push'](_0x41f9ac['shift']());}catch(_0x4c0c2d){_0x41f9ac['push'](_0x41f9ac['shift']());}}}(a299_0xc5af,0xd90e8));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a299_0x1666(_0x47916a,_0x580f71){_0x47916a=_0x47916a-0x1be;var _0xc5af23=a299_0xc5af();var _0x1666e5=_0xc5af23[_0x47916a];return _0x1666e5;}export async function withActiveCookie(_0x149b35,_0x40c14d){setActiveCookie(_0x149b35);try{return await _0x40c14d();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a300_0x4468(_0x4af830,_0x50570e){_0x4af830=_0x4af830-0x96;var _0x532b32=a300_0x532b();var _0x4468e4=_0x532b32[_0x4af830];return _0x4468e4;}(function(_0x2fca0d,_0x2140dd){var _0x478c1b=a300_0x4468,_0x3a912d=_0x2fca0d();while(!![]){try{var _0x7f0868=-parseInt(_0x478c1b(0x9c))/0x1+parseInt(_0x478c1b(0x9b))/0x2*(parseInt(_0x478c1b(0xa0))/0x3)+parseInt(_0x478c1b(0x9f))/0x4*(-parseInt(_0x478c1b(0x9e))/0x5)+parseInt(_0x478c1b(0x9a))/0x6*(parseInt(_0x478c1b(0x97))/0x7)+parseInt(_0x478c1b(0x99))/0x8+-parseInt(_0x478c1b(0xa1))/0x9*(parseInt(_0x478c1b(0xa2))/0xa)+parseInt(_0x478c1b(0x98))/0xb*(parseInt(_0x478c1b(0x9d))/0xc);if(_0x7f0868===_0x2140dd)break;else _0x3a912d['push'](_0x3a912d['shift']());}catch(_0x438ec7){_0x3a912d['push'](_0x3a912d['shift']());}}}(a300_0x532b,0x695b8));export function writeCliSideChannelLine(_0x511455){var _0x1bf2db=a300_0x4468;process[_0x1bf2db(0x96)]['write'](_0x511455+'\x0a');}function a300_0x532b(){var _0x11eb86=['20NFYtPe','stderr','7CHlcND','165kTmkDK','3825544mlCKgP','2964138MhULIV','4USOucc','800515ntnzCs','1075584qtGTKm','205dHfyIe','44508gGXUfo','87768mCcaHc','3091239xhNpoz'];a300_0x532b=function(){return _0x11eb86;};return a300_0x532b();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4-beta.1",
|
|
4
4
|
"description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, BFF, database connections, skills, and AI agent workflows.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"keywords": [
|
|
@@ -83,7 +83,9 @@
|
|
|
83
83
|
"skills/rabetbase",
|
|
84
84
|
"skills/rabetbase.manifest.json",
|
|
85
85
|
"scripts/postinstall.mjs",
|
|
86
|
-
"templates",
|
|
86
|
+
"templates/generate-api",
|
|
87
|
+
"templates/rules",
|
|
88
|
+
"templates/skill",
|
|
87
89
|
"sidecar",
|
|
88
90
|
"README.md",
|
|
89
91
|
"LICENSE"
|
|
@@ -100,18 +102,21 @@
|
|
|
100
102
|
"ora": "^9.3.0",
|
|
101
103
|
"prettier": "^3.6.2",
|
|
102
104
|
"semver": "^7.7.3",
|
|
103
|
-
"winston": "^3.17.0"
|
|
105
|
+
"winston": "^3.17.0",
|
|
106
|
+
"yauzl": "3.4.0"
|
|
104
107
|
},
|
|
105
108
|
"devDependencies": {
|
|
106
109
|
"@types/listr": "^0.14.9",
|
|
107
110
|
"@types/node": "^24.5.2",
|
|
108
111
|
"@types/semver": "^7.7.1",
|
|
112
|
+
"@types/yauzl": "2.10.3",
|
|
109
113
|
"@vitest/coverage-v8": "^3.2.4",
|
|
110
114
|
"@vitest/ui": "^3.2.4",
|
|
111
115
|
"c8": "^10.1.3",
|
|
112
116
|
"javascript-obfuscator": "^5.4.1",
|
|
113
117
|
"tsc-alias": "^1.8.10",
|
|
114
118
|
"typescript": "5.9.3",
|
|
115
|
-
"vitest": "^3.2.4"
|
|
119
|
+
"vitest": "^3.2.4",
|
|
120
|
+
"yazl": "3.3.1"
|
|
116
121
|
}
|
|
117
122
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase
|
|
3
|
-
version: 2.4.
|
|
4
|
-
description: "Lovrabet 开发工作流 CLI — 通过 rabetbase 命令管理数据集、数据库连接(dblink)、智能列表页(Smart List Page)、React 自定义页面(JSX 页面)、SQL 查询、BFF 脚本、通知配置、菜单事实读取与同步、应用文件、OCR 识别、代码生成,以及平台问题上报。触发词:数据集、数据表、dataset relation-audit、dataset delete、dataset restore、废弃数据集、恢复数据集、dataset rename、dataset field-update、dataset extend-update、dataset business-group-update、businessGroup、字段对象更新、doType、options、智能列表页、Smart List Page、React 自定义页面、JSX 页面、page react-create、page react-list、page react-detail、page react-update、page react-publish、page generate-start、page generate-status、page relation-audit、page sync、page pull、page push、page restore、恢复已删除页面、dblink、数据库连接、schema 分析、db list、db detail、db test、db tables、db diff、db diff --
|
|
3
|
+
version: 2.4.4-beta.1
|
|
4
|
+
description: "Lovrabet 开发工作流 CLI — 通过 rabetbase 命令管理数据集、数据库连接(dblink)、智能列表页(Smart List Page)、React 自定义页面(JSX 页面)、SQL 查询、BFF 脚本、通知配置、菜单事实读取与同步、应用文件、OCR 识别、代码生成,以及平台问题上报。触发词:数据集、数据表、dataset relation-audit、dataset delete、dataset restore、废弃数据集、恢复数据集、dataset rename、dataset field-update、dataset extend-update、dataset business-group-update、businessGroup、字段对象更新、doType、options、智能列表页、Smart List Page、React 自定义页面、JSX 页面、page react-create、page react-list、page react-detail、page react-update、page react-publish、page generate-start、page generate-status、page relation-audit、page sync、page pull、page push、page restore、恢复已删除页面、dblink、数据库连接、schema 分析、db list、db detail、db test、db tables、db diff、db diff --view all、db diff-refresh-start、db diff-refresh-status、db analyze-batch-plan、db analyze-start、analyze-cancel、analyze-status、traceId、自定义 SQL、sql.execute、bff.execute、BF 消息通知、BFF 消息通知、Backend Function 消息通知、notification config-list、EMAIL configCode、通知配置、notification.send、get_dataset_detail、validate_sql_content、save_or_update_custom_sql、@lovrabet/sdk、lovrabet 开发、rabetbase、filter、codegen、init、appcode、app list、app members-list、tenant members-list、应用人员列表、租户人员列表、workspace、workspace init、workspace use、workspace add、workspace remove、多应用、默认应用、menu list、menu external-link-create、menu external-link-update、menu rename、菜单改名、外链菜单创建、外链 URL 更新、菜单异常审计、菜单手动删除清单、menu sync、menu asset-update、菜单资源更新、menu move、菜单移动、角色、用户组、权限、role、permit、role list、role create、role user-add、role user-remove、user-resolve、销售组、加入开发者、page-set、page-get、row-roles、SELF、ALL、行级权限、role-menus-set、role-apis-set、菜单权限、API 权限、DEV、CUSTOM、project create、project upgrade、schema、jq、compress、file upload、file query-url、ocr recognize、文件上传、OCR 识别、发票识别、图片识别、长期链接、issue report、平台问题、platform issue、问题上报、user-account dingding-sandbox-bind、钉钉沙箱账号绑定。"
|
|
5
5
|
metadata:
|
|
6
6
|
requires:
|
|
7
7
|
bins: ["rabetbase"]
|
|
@@ -43,8 +43,9 @@ metadata:
|
|
|
43
43
|
1. **判断需求类型**
|
|
44
44
|
- Instant API 标准数据记录操作 → SDK filter/getOne/create/batchCreate/update/delete;批量更新使用 `update({ id: [...] })`,不存在 `batchUpdate()`
|
|
45
45
|
- 简单聚合且数据集是 DB_TABLE → SDK aggregate;聚合列用 `aggregate[].column`,不要用旧别名 `field`
|
|
46
|
-
- 复杂 JOIN / 数据库函数且数据集是 DB_TABLE →
|
|
47
|
-
-
|
|
46
|
+
- 复杂 JOIN / 数据库函数且数据集是 DB_TABLE → Custom SQL
|
|
47
|
+
- 图表、统计卡片或数据大屏 → React 自定义页面 + ECharts;数据层根据查询复杂度选择 Dataset 或 Custom SQL
|
|
48
|
+
- 当前用户、角色、数据范围、外部系统、跨表事务或复杂业务编排 → BFF;BFF HOOK 可挂 DB_TABLE 或 METADATA,具体 operation 以后端返回为准
|
|
48
49
|
2. **先拿元数据,再写代码**
|
|
49
50
|
- 至少先查 `rabetbase dataset detail --code xxx --format compress`(或 `json`)获取表结构
|
|
50
51
|
- 跨表场景还需查目标表的结构
|
|
@@ -52,12 +53,16 @@ metadata:
|
|
|
52
53
|
- 需要了解数据集关联关系时用 `rabetbase dataset relations --format compress`(或 `json`);需要审计关系事实错误和人工复核项时用 `rabetbase dataset relation-audit --format compress`
|
|
53
54
|
- 需要从文本需求创建新的 `METADATA` 数据集时,先读 [`dataset generate-start/status`](references/rabetbase-dataset-generate.md),执行 preview 写出 design 文件,审阅后用 `generate-start --apply --design-file` 提交任务,再用 `generate-status` 查询到成功
|
|
54
55
|
- **管理物理库连接 / 测连 / 同步表结构分析**时用 `rabetbase db …`(先 [`db list`](references/rabetbase-db-list.md),trace/plan id 见 [`database-connection-workflow.md`](guides/database-connection-workflow.md))
|
|
56
|
+
- DB 差异读取先用 `db detail` 获取 `tableCount`:不大于 200 时直接 `db diff --all --changed-only`;大于 200 或用户明确要求实时刷新时,先执行一次 `db diff-refresh-start`,保存 traceId 并用 `db diff-refresh-status` 查询同一任务到终态,成功后再读取 diff。用户明确不刷新时直接读取并提示大库结果可能滞后;数量未知时不隐式启动写任务
|
|
57
|
+
- 需要查看无差异表或主动重新分析既有表时,用 `db diff --view all`;`--all` 只表示聚合当前视角全部分页,不等价于全部表
|
|
55
58
|
- DB 增量分析先对完整 `toAnalyzeTables` 执行 `db analyze-batch-plan`;它生成的是本地批次方案,不是服务端 `planId`,也不会创建任务。再严格按批次顺序启动;每批独立保存 `planId`(即 `analyze-start` 返回值),当前批次到达已知终态前不得启动下一批
|
|
56
|
-
-
|
|
59
|
+
- 全部批次结束后按上述 200 表阈值重新获取差异;仍未收敛时,按 [`database-connection-workflow.md`](guides/database-connection-workflow.md) 对剩余 `toAnalyzeTables` 逐表串行重试且每表只恢复一次。状态查询失败继续使用原 `planId`,不得重复启动任务
|
|
57
60
|
- 输出很大且只需子集时,在 `compress`/`json` 上加 `--jq '.data…'` 缩小结果
|
|
58
61
|
- **(可选)** 若环境已安装 **`lovrabet` ≥ 2.0**,可用 `lovrabet data filter` / `data getOne` 对数据集做与 SDK 同语义的终端查数;**不要**假设用户已安装或版本够新,见 [`guides/data-api-guidelines.md`](guides/data-api-guidelines.md)
|
|
59
62
|
3. **SQL 工作流严格分步**
|
|
60
63
|
- 推荐路径:查现有(`sql list/detail`) 或新建(`sql create`) → 拉/落本地(`sql pull` / `sql create`) → 编辑同步目录文件 → 可选校验(`sql validate`) → 检查状态(`sql status`) → 先预览(`sql push --dry-run` / `sql delete --dry-run`) → 再 `sql push` / `sql delete` → `sql detail` / `sql exec` 验证
|
|
64
|
+
- 先使用 `sql list/detail` 查找可复用的 Custom SQL;没有满足需求的资源时,按照 [`sql-creation-workflow.md`](guides/sql-creation-workflow.md) 与 [`sql-mybatis.md`](guides/sql-mybatis.md) 创建、校验、发布并验证
|
|
65
|
+
- 页面和 BFF 执行已发布的 Custom SQL 时使用 `sqlCode` + `params`
|
|
61
66
|
4. **BFF 工作流严格分步**
|
|
62
67
|
- 查现有 → 确认字段或通知配置 → 查公共函数 → 本地创建(`bff create`) → 检查状态(`bff status`) → 先预览(`--dry-run`) → 再拉取/推送/删除
|
|
63
68
|
- 创建会发送消息通知的 BFF 时,先读取 [`backend-function.md`](guides/backend-function.md) 的“消息通知扩展”契约,再执行 [`rabetbase notification config-list --type EMAIL`](references/rabetbase-notification-config-list.md) 获取当前应用的 `configCode`;不得猜测渠道、收件人或把密钥写进脚本
|
|
@@ -65,6 +70,7 @@ metadata:
|
|
|
65
70
|
5. **页面体系选择**
|
|
66
71
|
- 智能标准页面(Smart List Page)是内置的基础表单、表格展示和常规数据操作页面,常规数据管理需求优先使用它
|
|
67
72
|
- 仅当标准页面无法满足个性化布局、可视化、复杂交互或自定义页面结构时,才使用 React 自定义 JSX 页面
|
|
73
|
+
- 图表、统计卡片和数据大屏使用 React 自定义页面与白名单内的 ECharts
|
|
68
74
|
- 页面体系不明确时,先向用户确认;不要为同一目标同时创建标准页面与 React 页面
|
|
69
75
|
6. **智能列表页(Smart List Page,page)工作流**
|
|
70
76
|
- 工作流判断先看 [`guides/page-development-workflow.md`](guides/page-development-workflow.md)
|
|
@@ -125,12 +131,13 @@ metadata:
|
|
|
125
131
|
与 **`dataset`(数据集模型)** 的分工:**`db *`** 管平台登记的 **物理库连接(dblink)**、**测连**、**schema 分析任务**、**物理表清单与差异**;表字段、枚举以 **`dataset detail`** 为准,数据集关联关系优先以 **`dataset relations`** 为准,关系事实风险用 **`dataset relation-audit`**。
|
|
126
132
|
|
|
127
133
|
- **入口**:先 [`db list`](references/rabetbase-db-list.md) 取 `id` 与 `latestAnalysisTraceId`(如有)。
|
|
128
|
-
- **只读常用**:[`db detail`](references/rabetbase-db-detail.md)、[`db test`](references/rabetbase-db-test.md)、[`db tables`](references/rabetbase-db-tables.md)、[`db diff`](references/rabetbase-db-diff.md)
|
|
134
|
+
- **只读常用**:[`db detail`](references/rabetbase-db-detail.md)、[`db test`](references/rabetbase-db-test.md)、[`db tables`](references/rabetbase-db-tables.md)、[`db diff`](references/rabetbase-db-diff.md)。`db diff` 默认只读差异结果;`--view all` 才是实时全部表视角;`--all` 只聚合当前视角全部分页。
|
|
135
|
+
- **差异刷新**:[`db diff-refresh-start/status`](references/rabetbase-db-diff-refresh.md)。先从 `db detail` 读取 `tableCount`;大于 200 或用户强制要求时刷新,小于等于 200 默认直接读取。刷新与 schema `analyze-*` 是两类任务,不得混用。
|
|
129
136
|
- **分析任务**:`db analyze-batch-plan` / `analyze-start` / `analyze-cancel` / `analyze-status`(服务端 plan/trace 来源见下)。
|
|
130
137
|
- **状态诊断边界**:`analyze-status` 的 `requestedAnalysis` 只还原原始提交范围;`hasMultipleAttempts=true` 只表示观察到多个执行尝试。不得据此推断尝试间连续性、实际执行范围或自动重启。
|
|
131
138
|
- **增量分批**:先用本地只读的 `db analyze-batch-plan --id <id> --tables <清单>` 得到确定性批次及 `planningEstimate`;这里生成的是本地批次方案,不是服务端 `planId`,不会创建或预留任务。再逐批调用一次 `analyze-start`,读取真实 `planId` 与当前任务的 `serverEstimate`;每批独立保存其返回的 `planId`,同一 dblink 严格串行。两类估算都不得驱动超时、取消、重试、自动重启或状态判断,`PENDING / RUNNING / RETRYING / CANCELING` 均不得推进下一批。
|
|
132
139
|
- **取消已有任务**:只使用正在跟踪的原 `planId` 执行 `analyze-cancel --plan <原 planId>`;取消分支不得调用 `analyze-start`,也不得用可能变化的 `latestAnalysisTraceId` 替换已知目标。
|
|
133
|
-
-
|
|
140
|
+
- **失败恢复**:全部批次结束后按 200 表阈值刷新或直接读取完整 `db diff --all --changed-only` 获取未收敛表,逐表串行执行 `analyze-start --tables <单表>`,每表只恢复一次;累计原因计数只作可能不完整的参考展示。Agent 可语义理解原始 `errorMsg` 辅助解释和建议,但两者都不驱动任务状态、重提任务或收敛判断。
|
|
134
141
|
- **ER 图引导**:`db analyze-status` 终态成功后,检查并转述 `data.links.erPage`;若没有 `data.links`,补 `--appcode` 或进入已配置 app 的项目上下文后重查。
|
|
135
142
|
- **写入**:[`db create`](references/rabetbase-db-create.md) / [`db update`](references/rabetbase-db-update.md) / [`db delete`](references/rabetbase-db-delete.md)(高危删连需确认);`create`/`update` 支持 **`--dry-run`** 预览。`db create` 成功后返回连接信息与数据库连接页链接。
|
|
136
143
|
- **横切流程与 trace/plan**:[`database-connection-workflow.md`](guides/database-connection-workflow.md)。**单命令细则**见 `references/rabetbase-db-*.md`(与仓库 `src/commands/db/` 一一对应)。
|
|
@@ -241,6 +248,8 @@ where 条件强制使用操作符:`$eq` `$ne` `$gte` `$lte` `$gt` `$lt` `$in`
|
|
|
241
248
|
|
|
242
249
|
### SQL 调用
|
|
243
250
|
|
|
251
|
+
页面和 BFF 通过已发布 Custom SQL 的 `sqlCode` + `params` 执行查询。
|
|
252
|
+
|
|
244
253
|
```typescript
|
|
245
254
|
const data = await client.sql.execute<MyRow>({
|
|
246
255
|
sqlCode: "xxx",
|
|
@@ -251,6 +260,8 @@ if (data.execSuccess && data.execResult) {
|
|
|
251
260
|
}
|
|
252
261
|
```
|
|
253
262
|
|
|
263
|
+
React 页面需要图表时,使用 React 自定义页面 + ECharts 呈现;只读查询且平台 `sqlCode` 权限已经满足时可以直接调用上面已发布的 Custom SQL。需要基于当前用户、角色、数据范围或业务规则做额外控制时,页面改调 BFF,由 BFF 完成校验后再执行该 Custom SQL。执行失败时保留并报告原始错误,根据 SQL 资源状态、参数与权限定位问题。
|
|
264
|
+
|
|
254
265
|
### BFF 调用
|
|
255
266
|
|
|
256
267
|
```typescript
|
|
@@ -280,10 +291,10 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
280
291
|
| 创建新项目 | [`rabetbase project create`](references/rabetbase-project-create.md) | 支持 `--name` + `--appcode` 非交互 |
|
|
281
292
|
| 从 lovrabet-cli 迁移 | [`rabetbase project upgrade`](references/rabetbase-project-upgrade.md) | 6 步自动迁移,`--yes` 跳过确认 |
|
|
282
293
|
| 老项目翻新蓝图 / Legacy Application Blueprint | [`guides/legacy-application-blueprint-workflow.md`](guides/legacy-application-blueprint-workflow.md) | 先输出 `.rabetbase/blueprint/<appCode>/application-blueprint.md`,把老代码逻辑与 Dataset / Relations 绑定后再生成迁移 Backlog |
|
|
283
|
-
| 运行 package.json 脚本 | [`rabetbase run <script>`](references/rabetbase-run.md) | `
|
|
294
|
+
| 运行 package.json 脚本 | [`rabetbase run <script>`](references/rabetbase-run.md) | `write`;先审阅脚本命令体,嵌入式工具暂不开放 |
|
|
284
295
|
| 安装 / 重装 / 刷新 CLI Built-in Skill | [`rabetbase cli-skill install`](references/rabetbase-cli-skill-install.md) | 由最新版官方 Skills CLI 从当前 npm 包内本地源重装同版本 Skill;发现本地 skill 过期时优先执行 |
|
|
285
296
|
| 退出登录 | [`rabetbase auth logout`](references/rabetbase-auth-logout.md) | 删除本地认证 cookie |
|
|
286
|
-
| 绑定当前用户的钉钉沙箱账号 | [`rabetbase user-account dingding-sandbox-bind`](references/rabetbase-user-account.md) |
|
|
297
|
+
| 绑定当前用户的钉钉沙箱账号 | [`rabetbase user-account dingding-sandbox-bind`](references/rabetbase-user-account.md) | `write`;先 `--dry-run` 核对 ID,正式执行不要求 `--yes`;不需要 appCode |
|
|
287
298
|
| 诊断配置问题 | [`rabetbase doctor`](references/rabetbase-doctor.md) | Built-in Skill 一致性、合并配置、各侧 JSON 语法、域名、认证状态 |
|
|
288
299
|
| 上报平台问题 | [`rabetbase issue report`](references/rabetbase-issue-report.md) | 由 Skill 组织完整客观事实,禁止代替平台侧做根因判断或方案设计 |
|
|
289
300
|
| 上传应用文件 | [`rabetbase file upload`](references/rabetbase-file.md) | 返回可持久保存的 `filePath` |
|
|
@@ -294,15 +305,15 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
294
305
|
| 初始化/切换当前工作目录应用 | [`rabetbase workspace`](references/rabetbase-workspace.md) | 写当前目录 `.rabetbase.json`;不从全局复制 cookie/accessKey |
|
|
295
306
|
| 修改配置文件 | [`rabetbase config set <key> <value>`](references/rabetbase-config.md) | 默认写项目;无项目配置且未 `--global` 会拒绝;`--global` 写 `~/.rabetbase.json` |
|
|
296
307
|
| 列出配置 | [`rabetbase config list`](references/rabetbase-config.md) | 查看当前生效的配置 |
|
|
297
|
-
| 管理运行态 app-config | [`rabetbase app-config list/get/set/delete`](references/rabetbase-app-config.md) | 运行态 app-config 管理面;默认不输出明文 value
|
|
298
|
-
| 管理当前研发应用的企业知识库 | [`rabetbase kb list/detail/create/update/delete`](references/rabetbase-kb.md) | 标准解析 `--app/--appcode`;仅 company scope
|
|
299
|
-
|
|
|
308
|
+
| 管理运行态 app-config | [`rabetbase app-config list/get/set/delete`](references/rabetbase-app-config.md) | 运行态 app-config 管理面;默认不输出明文 value;`set` 为 `write`,`delete` 保持 `high-risk-write` |
|
|
309
|
+
| 管理当前研发应用的企业知识库 | [`rabetbase kb list/detail/create/update/delete`](references/rabetbase-kb.md) | 标准解析 `--app/--appcode`;仅 company scope;`create/update` 为 `write`,`delete` 保持 `high-risk-write` |
|
|
310
|
+
| 查询或管理应用级通知配置 | [`rabetbase notification config-list`](references/rabetbase-notification-config-list.md) / [`rabetbase notification config-create`](references/rabetbase-notification-config-mutations.md) / [`rabetbase notification config-update`](references/rabetbase-notification-config-mutations.md) / [`rabetbase notification config-delete`](references/rabetbase-notification-config-mutations.md) | list 获取 BFF 所需 `configCode`;写入只接收单一敏感 JSON 源,先 dry-run;update/delete 必须 `--yes` |
|
|
300
311
|
| 查看线上菜单事实 / 菜单异常审计 | [`rabetbase menu list`](references/rabetbase-menu-list.md) | 返回 DFS 事实、children/page、URL、最近更新人/时间和 snapshotHash;异常治理先读 [`menu-anomaly-manual-cleanup`](guides/menu-anomaly-manual-cleanup.md) |
|
|
301
312
|
| 创建外部网站链接菜单 | [`rabetbase menu external-link-create`](references/rabetbase-menu-external-link-create.md) | `write`;显式选择 `embedded` 或 `new-window`,仅接受 HTTPS;建议先 dry-run,正式执行不要求 `--yes` |
|
|
302
|
-
| 原地更新既有外链 URL | [`rabetbase menu external-link-update`](references/rabetbase-menu-external-link-update.md) |
|
|
313
|
+
| 原地更新既有外链 URL | [`rabetbase menu external-link-update`](references/rabetbase-menu-external-link-update.md) | `write`;精确单 ID、URL-only;必须带旧 URL 与父级断言,先 dry-run,再复用参数正式执行 |
|
|
303
314
|
| 修改任意类型菜单名称 | [`rabetbase menu rename`](references/rabetbase-menu-rename.md) | 精确单 ID、label-only;使用 `--expect-label` 防漂移,先 dry-run 并检查 before/after |
|
|
304
315
|
| 同步本地微前端路由到平台 | [`rabetbase menu sync`](references/rabetbase-menu-sync.md) | 扫描 `src/pages` 创建缺失的 `procode` 菜单;不上传构建产物;正式执行前先 `--dry-run` |
|
|
305
|
-
| 修改微前端菜单资源 URL | [`rabetbase menu asset-update`](references/rabetbase-menu-asset-update.md) |
|
|
316
|
+
| 修改微前端菜单资源 URL | [`rabetbase menu asset-update`](references/rabetbase-menu-asset-update.md) | `write`;用 ID/path 精确选目标或显式 `--all`,默认 patch 且保留加载模式,先 dry-run 再复用参数正式执行 |
|
|
306
317
|
| 用户组与权限总览(先读工作流/决策树) | [`guides/role-permit-workflow.md`](guides/role-permit-workflow.md) | 先分清「成员归属」vs「能力授权」,再定位到具体命令;含 `role-menus-set` 与 `page-set` 的区别与 5 个剧本 |
|
|
307
318
|
| 查看/创建/管理角色(用户组) | [`rabetbase role list/detail/create/update/delete`](references/rabetbase-role-list.md) | 仅 CUSTOM 可改/删;DEV/ADMIN 拒绝;写操作先 `--dry-run` 再 `--yes` |
|
|
308
319
|
| 解析昵称/用户名到 userId | [`rabetbase role user-resolve`](references/rabetbase-role-user-resolve.md) | 基于租户成员目录;重名报错要求 `--user <id>` 消歧 |
|
|
@@ -315,7 +326,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
315
326
|
| 创建空菜单分组 | [`rabetbase menu group-create`](references/rabetbase-menu-group-create.md) | group 持久化为 `type=folder`,保留平台生成的非空 path;先 dry-run 并检查创建位置与排序 |
|
|
316
327
|
| 修改菜单分组排序 | [`rabetbase menu group-update`](references/rabetbase-menu-group-update.md) | 目标必须为 folder;修改任意菜单类型的名称统一使用 `menu rename`;先 dry-run 并检查 before/after |
|
|
317
328
|
| 移动已有叶子菜单 | [`rabetbase menu move`](references/rabetbase-menu-move.md) | 使用精确源 ID、目标父级 ID 和当前父级断言;逐项 dry-run 并检查写后回读 |
|
|
318
|
-
| 异步新建根分组 | [`rabetbase menu regroup-start`](references/rabetbase-menu-regroup-start.md) |
|
|
329
|
+
| 异步新建根分组 | [`rabetbase menu regroup-start`](references/rabetbase-menu-regroup-start.md) | `write`;只接收精确非 folder 叶子 ID;返回 taskId,非幂等请求不自动重提 |
|
|
319
330
|
| 查询通用异步任务 | [`rabetbase task status`](references/rabetbase-task-status.md) | 按 taskId + appCode 查询 `PENDING / PROCESSING / SUCCESS / FAILED`;只读,不重启业务操作 |
|
|
320
331
|
| 查找数据集 | [`rabetbase dataset list --name "xxx"`](references/rabetbase-dataset-list.md) | 默认返回全部 DO V2 数据集;查指定来源用 `--source DB_TABLE` / `--source METADATA`;也可 `--code` 精确查 |
|
|
321
332
|
| 查看表结构和字段 | [`rabetbase dataset detail --code xxx`](references/rabetbase-dataset-detail.md) | 含字段定义和操作列表 |
|
|
@@ -335,7 +346,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
335
346
|
| 查询 React 自定义页面 | [`rabetbase page react-list`](references/rabetbase-page-react-list.md) | 返回页面 ID、页面名称、`pageUrl`(查看最新保存内容)和 `editPageUrl`(打开编辑器) |
|
|
336
347
|
| 查看 React 自定义页面详情 | [`rabetbase page react-detail --id <pageId>`](references/rabetbase-page-react-detail.md) | 查询页面详情,`codeContent` 包含可修改后整体提交的完整页面文件 |
|
|
337
348
|
| 更新 React 自定义页面 | [`rabetbase page react-update --id <pageId> --page-content <json>`](references/rabetbase-page-react-update.md) | 保存完整页面文件并创建新版本;先 dry-run |
|
|
338
|
-
| 发布 React 自定义页面 | [`rabetbase page react-publish --id <pageId>`](references/rabetbase-page-react-publish.md) |
|
|
349
|
+
| 发布 React 自定义页面 | [`rabetbase page react-publish --id <pageId>`](references/rabetbase-page-react-publish.md) | `write`;发布当前保存内容,先 dry-run 并审阅预览 |
|
|
339
350
|
| 查询智能列表页生成任务状态 | [`rabetbase page generate-status --datasetcode <code> --operation-id <id>`](references/rabetbase-page-generate-status.md) | 查询 job 状态,支持 `operationId` / `clientOperationId` |
|
|
340
351
|
| 查询智能列表页生成任务状态 | [`rabetbase page generate-status --datasetcode <code> --task-id <id>`](references/rabetbase-page-generate-status.md) | 查询 job 状态;taskId 首选,operationId/clientOperationId 兼容。成功后仍读取标准页事实,未知状态不得自动重提 |
|
|
341
352
|
| 查询智能列表页事实快照 | [`rabetbase page standard-page-status --datasetcode <code>`](references/rabetbase-standard-page-status.md) | 查询智能列表页四件套、残留页与菜单事实 |
|
|
@@ -352,7 +363,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
352
363
|
| 新建本地同步 SQL | [`rabetbase sql create --name xxx --db-id 10001 --mode sql`](references/rabetbase-sql-create.md) | 先在远端创建,再落本地文件与 `sql.lock.json` |
|
|
353
364
|
| 查看本地同步状态 | [`rabetbase sql status`](references/rabetbase-sql-status.md) | 检查 `added / modified / missing / unchanged / remoteOnly` |
|
|
354
365
|
| 拉取远端 SQL 到本地 | [`rabetbase sql pull`](references/rabetbase-sql-pull.md) | 写入 `.rabetbase/sql/<appCode>/<dbName|db-<id>>/`,含 `@lovrabet` 头注释 |
|
|
355
|
-
| 推送本地 SQL 到远端 | [`rabetbase sql push --sqlcode xxx
|
|
366
|
+
| 推送本地 SQL 到远端 | [`rabetbase sql push --sqlcode xxx`](references/rabetbase-sql-push.md) | `write`;以 `sql.lock.json` 为基准上传同步目录中的本地文件 |
|
|
356
367
|
| 删除 SQL | [`rabetbase sql delete --sqlcode xxx --yes`](references/rabetbase-sql-delete.md) | 删除远端并将本地文件移入 `.rabetbase/sql-trash/` |
|
|
357
368
|
| 校验 SQL 内容 | [`rabetbase sql validate --file xxx`](references/rabetbase-sql-validate.md) | 类型检测、危险语句检查、参数提取 |
|
|
358
369
|
| 执行 SQL 查询 | [`rabetbase sql exec --sqlcode xxx`](references/rabetbase-sql-exec.md) | 支持 `--params` JSON 参数 |
|
|
@@ -361,7 +372,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
361
372
|
| 创建本地 BFF | [`rabetbase bff create --type ENDPOINT --name xxx`](references/rabetbase-bff-create.md) | 在 `.rabetbase/bff/<appCode>/...` 下创建脚手架 |
|
|
362
373
|
| 查看 BFF 本地状态 | [`rabetbase bff status`](references/rabetbase-bff-status.md) | 检查 added / modified / unchanged / remoteOnly |
|
|
363
374
|
| 拉取远端 BFF | [`rabetbase bff pull`](references/rabetbase-bff-pull.md) | 从远端同步到本地 |
|
|
364
|
-
| 推送本地 BFF | [`rabetbase bff push
|
|
375
|
+
| 推送本地 BFF | [`rabetbase bff push`](references/rabetbase-bff-push.md) | `write`;建议先 dry-run,正式执行不要求 `--yes` |
|
|
365
376
|
| 删除 BFF | [`rabetbase bff delete --yes --target xxx`](references/rabetbase-bff-delete.md) | high-risk-write,删远端并清理本地 |
|
|
366
377
|
| 生成 SDK 代码 | [`rabetbase codegen sdk --code xxx`](references/rabetbase-codegen-sdk.md) | 按操作生成 TypeScript |
|
|
367
378
|
| 生成 SQL 调用代码 | [`rabetbase codegen sql --sqlcode xxx`](references/rabetbase-codegen-sql.md) | sdk/bff 两种 target |
|
|
@@ -399,7 +410,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
399
410
|
| Company Knowledge Base | [`kb list/detail/create/update/delete`](references/rabetbase-kb.md) |
|
|
400
411
|
| Menu | [`list`](references/rabetbase-menu-list.md) / [`external-link-create`](references/rabetbase-menu-external-link-create.md) / [`external-link-update`](references/rabetbase-menu-external-link-update.md) / [`rename`](references/rabetbase-menu-rename.md) / [`sync`](references/rabetbase-menu-sync.md) / [`asset-update`](references/rabetbase-menu-asset-update.md) / [`delete`](references/rabetbase-menu-delete.md) / [`group-create`](references/rabetbase-menu-group-create.md) / [`group-update`](references/rabetbase-menu-group-update.md) / [`move`](references/rabetbase-menu-move.md) / [`regroup-start`](references/rabetbase-menu-regroup-start.md) |
|
|
401
412
|
| Async Tasks | [`task status`](references/rabetbase-task-status.md) |
|
|
402
|
-
| Notification Configuration | [`notification config-list`](references/rabetbase-notification-config-list.md) |
|
|
413
|
+
| Notification Configuration | [`notification config-list`](references/rabetbase-notification-config-list.md) / [`notification config-create`](references/rabetbase-notification-config-mutations.md) / [`notification config-update`](references/rabetbase-notification-config-mutations.md) / [`notification config-delete`](references/rabetbase-notification-config-mutations.md) |
|
|
403
414
|
| Roles | [`list`](references/rabetbase-role-list.md) / `detail` / `create` / `update` / `delete` / [`user-resolve`](references/rabetbase-role-user-resolve.md) / [`user-add` / `user-remove`](references/rabetbase-role-user-add.md) |
|
|
404
415
|
| Permissions | [`page-get` / `page-set`](references/rabetbase-permit-page-set.md) / `role-menus` / [`role-menus-set`](references/rabetbase-permit-role-menus-set.md) / [`role-apis-set`](references/rabetbase-permit-role-apis-set.md) |
|
|
405
416
|
| Tenant Members | [`tenant members-list`](references/rabetbase-tenant-members-list.md)(当前账号所属租户的全量人员目录) |
|
|
@@ -407,7 +418,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
407
418
|
| dataset commands | [`list`](references/rabetbase-dataset-list.md) / [`detail`](references/rabetbase-dataset-detail.md) / [`delete`](references/rabetbase-dataset-delete.md) / [`restore`](references/rabetbase-dataset-restore.md) / [`generate-start/status`](references/rabetbase-dataset-generate.md) / [`rename`](references/rabetbase-dataset-rename.md) / [`field-update`](references/rabetbase-dataset-field-update.md) / [`extend-update`](references/rabetbase-dataset-extend-update.md) / [`business-group-update`](references/rabetbase-dataset-business-group-update.md) / [`operations`](references/rabetbase-dataset-operations.md) / [`relations`](references/rabetbase-dataset-relations.md) / [`relation-audit`](references/rabetbase-dataset-relation-audit.md) / [`relation-create/update/delete`](references/rabetbase-dataset-relation-mutations.md) |
|
|
408
419
|
| Smart List Page commands | [`generate-start`](references/rabetbase-page-generate-start.md) / [`generate-status`](references/rabetbase-page-generate-status.md) / [`standard-page-status`](references/rabetbase-standard-page-status.md) / [`relation-audit`](references/rabetbase-page-relation-binding.md) / [`sync`](references/rabetbase-page-sync.md) / [`pull`](references/rabetbase-page-pull.md) / [`push`](references/rabetbase-page-push.md) |
|
|
409
420
|
| React custom page commands | [`react-create`](references/rabetbase-page-react-create.md) / [`react-list`](references/rabetbase-page-react-list.md) / [`react-detail`](references/rabetbase-page-react-detail.md) / [`react-update`](references/rabetbase-page-react-update.md) / [`react-publish`](references/rabetbase-page-react-publish.md) |
|
|
410
|
-
| Database Connections (`db`) | [`list`](references/rabetbase-db-list.md) / [`detail`](references/rabetbase-db-detail.md) / [`create`](references/rabetbase-db-create.md) / [`update`](references/rabetbase-db-update.md) / [`delete`](references/rabetbase-db-delete.md) / [`test`](references/rabetbase-db-test.md) / [`analyze`](references/rabetbase-db-analyze.md) / [`tables`](references/rabetbase-db-tables.md) / [`diff`](references/rabetbase-db-diff.md) |
|
|
421
|
+
| Database Connections (`db`) | [`list`](references/rabetbase-db-list.md) / [`detail`](references/rabetbase-db-detail.md) / [`create`](references/rabetbase-db-create.md) / [`update`](references/rabetbase-db-update.md) / [`delete`](references/rabetbase-db-delete.md) / [`test`](references/rabetbase-db-test.md) / [`analyze`](references/rabetbase-db-analyze.md) / [`tables`](references/rabetbase-db-tables.md) / [`diff`](references/rabetbase-db-diff.md) / [`diff-refresh-start/status`](references/rabetbase-db-diff-refresh.md) |
|
|
411
422
|
| api commands | [`pull`](references/rabetbase-api-pull.md) / [`list`](references/rabetbase-api-list.md) |
|
|
412
423
|
| sql commands | [`list`](references/rabetbase-sql-list.md) / [`detail`](references/rabetbase-sql-detail.md) / [`create`](references/rabetbase-sql-create.md) / [`status`](references/rabetbase-sql-status.md) / [`pull`](references/rabetbase-sql-pull.md) / [`push`](references/rabetbase-sql-push.md) / [`delete`](references/rabetbase-sql-delete.md) / [`validate`](references/rabetbase-sql-validate.md) / [`save`(deprecated)](references/rabetbase-sql-save.md) / [`exec`](references/rabetbase-sql-exec.md) |
|
|
413
424
|
| bff commands | [`list`](references/rabetbase-bff-list.md) / [`detail`](references/rabetbase-bff-detail.md) / [`create`](references/rabetbase-bff-create.md) / [`status`](references/rabetbase-bff-status.md) / [`pull`](references/rabetbase-bff-pull.md) / [`push`](references/rabetbase-bff-push.md) / [`delete`](references/rabetbase-bff-delete.md) |
|
|
@@ -429,7 +440,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
429
440
|
|
|
430
441
|
`sql validate` 是 SQL 内容校验入口;SQL 写入统一通过 `sql create` 或编辑同步文件后执行 `sql push`。
|
|
431
442
|
|
|
432
|
-
配置 `riskLevel`
|
|
443
|
+
配置 `riskLevel` 可限制允许执行的最高风险等级,默认值为 `write`(详见 [配置参考](references/rabetbase-config.md))。权限不足时,Agent 只能提醒用户手动编辑 `.rabetbase.json`;**禁止 Agent 或自动化脚本自行修改 `riskLevel`、写入环境变量或以其他方式尝试提权**。
|
|
433
444
|
|
|
434
445
|
## 输出格式
|
|
435
446
|
|
|
@@ -484,7 +495,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
484
495
|
| 故障诊断 | CLI/登录/数据集/保存失败排障 | [`troubleshooting.md`](guides/troubleshooting.md) |
|
|
485
496
|
| BFF 脚本规范 | HOOK/ENDPOINT/COMMON、`context.client`、消息通知扩展、目录与注释模板 | [`backend-function.md`](guides/backend-function.md) |
|
|
486
497
|
| 数据接口访问 | 先 detail 再编码、外键/枚举、禁止 N+1、批量与关联查询;可选 `lovrabet data` 查数(**`lovrabet` CLI ≥ 2.0** 且已安装) | [`data-api-guidelines.md`](guides/data-api-guidelines.md) |
|
|
487
|
-
| SQL 创建工作流 | list/detail → pull/
|
|
498
|
+
| SQL 创建工作流 | list/detail → pull/create → edit → validate → status → push/delete → exec 全链路 | [`sql-creation-workflow.md`](guides/sql-creation-workflow.md) |
|
|
488
499
|
| BFF 创建工作流 | new → status → dry-run → pull/push | [`bff-creation-workflow.md`](guides/bff-creation-workflow.md) |
|
|
489
500
|
| 冲突检测与保存 | `blocked`、未保存时的用户沟通、响应结构 | [`conflict-detection.md`](guides/conflict-detection.md) |
|
|
490
501
|
| 质量与最佳实践 | 审查 SQL/BFF、命名、高危边界、描述字段 | [`best-practices.md`](guides/best-practices.md) |
|