@lovrabet/rabetbase-cli 2.4.7 → 2.5.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +13 -3
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +7 -0
- package/lib/api/generate-sdk-config-file.js +1 -0
- 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.d.ts +2 -5
- 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/delete.d.ts +5 -0
- package/lib/commands/config/delete.js +1 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.d.ts +12 -0
- package/lib/commands/config/init.js +1 -0
- 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/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +1 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.d.ts +6 -2
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +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.d.ts +2 -2
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +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/domain-config.d.ts +10 -0
- package/lib/config/domain-config.js +1 -0
- package/lib/config/schema.d.ts +3 -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.d.ts +23 -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/region.d.ts +9 -0
- package/lib/constant/region.js +1 -0
- 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.d.ts +4 -6
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +2 -2
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -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.d.ts +11 -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.d.ts +2 -2
- 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/types/index.d.ts +28 -0
- package/lib/utils/ai_config.d.ts +1 -2
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/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 +1 -3
- package/skills/rabetbase/SKILL.md +33 -28
- package/skills/rabetbase/guides/backend-function.md +41 -12
- package/skills/rabetbase/guides/bff-creation-workflow.md +6 -4
- package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
- package/skills/rabetbase/guides/data-api-guidelines.md +8 -8
- package/skills/rabetbase/guides/database-connection-workflow.md +8 -16
- package/skills/rabetbase/guides/menu-anomaly-manual-cleanup.md +1 -6
- package/skills/rabetbase/guides/sdk-client-generation.md +146 -0
- package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
- package/skills/rabetbase/guides/troubleshooting.md +1 -1
- package/skills/rabetbase/guides/typescript-sdk.md +46 -10
- package/skills/rabetbase/references/rabetbase-api-list.md +4 -4
- package/skills/rabetbase/references/rabetbase-api-pull.md +44 -29
- package/skills/rabetbase/references/rabetbase-app-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-auth-login.md +4 -2
- package/skills/rabetbase/references/rabetbase-bff-push.md +3 -1
- package/skills/rabetbase/references/rabetbase-codegen-sql.md +3 -1
- package/skills/rabetbase/references/rabetbase-config.md +75 -30
- package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +17 -6
- package/skills/rabetbase/references/rabetbase-dataset-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-db-analyze.md +3 -3
- package/skills/rabetbase/references/rabetbase-db-detail.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -4
- package/skills/rabetbase/references/rabetbase-db-diff.md +6 -9
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
- package/skills/rabetbase/references/rabetbase-init.md +57 -51
- package/skills/rabetbase/references/rabetbase-kb.md +2 -0
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-custom-detail.md +3 -3
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-project-create.md +12 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +2 -2
- package/skills/rabetbase/references/rabetbase-role-user-resolve.md +2 -2
- package/skills/rabetbase/references/rabetbase-user-account.md +1 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +6 -6
- package/skills/rabetbase.manifest.json +4 -3
- package/templates/README.md +17 -28
- package/templates/generate-api/api.ts.tpl +3 -3
- package/templates/generate-api/client.ts.tpl +10 -37
- package/lib/commands/data/filter.d.ts +0 -7
- package/lib/commands/data/filter.js +0 -1
- package/lib/commands/data/getOne.d.ts +0 -7
- package/lib/commands/data/getOne.js +0 -1
- package/lib/commands/data/index.d.ts +0 -8
- package/lib/commands/data/index.js +0 -1
- package/lib/commands/data/shared.d.ts +0 -33
- package/lib/commands/data/shared.js +0 -1
- package/lib/commands/init/index.d.ts +0 -11
- package/lib/commands/init/index.js +0 -1
- package/lib/utils/rules-cdn.d.ts +0 -38
- package/lib/utils/rules-cdn.js +0 -1
- package/templates/rules/lovrabet_rules.mdc.tpl +0 -893
- package/templates/skill/SKILL.md.tpl +0 -120
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4c465b,_0x37d5b5){const _0x4eab3e=a284_0x5b3f,_0x1ba329=_0x4c465b();while(!![]){try{const _0xcca5db=parseInt(_0x4eab3e(0x11c))/0x1*(parseInt(_0x4eab3e(0x10b))/0x2)+-parseInt(_0x4eab3e(0x11f))/0x3+-parseInt(_0x4eab3e(0x114))/0x4+parseInt(_0x4eab3e(0x121))/0x5+-parseInt(_0x4eab3e(0x110))/0x6*(parseInt(_0x4eab3e(0x10c))/0x7)+parseInt(_0x4eab3e(0x113))/0x8*(parseInt(_0x4eab3e(0x11a))/0x9)+parseInt(_0x4eab3e(0x122))/0xa;if(_0xcca5db===_0x37d5b5)break;else _0x1ba329['push'](_0x1ba329['shift']());}catch(_0x2e4c75){_0x1ba329['push'](_0x1ba329['shift']());}}}(a284_0x3691,0xd2ab1));export async function httpRequest(_0x8b3209,_0x4d83e2={}){const _0xa3ead4=a284_0x5b3f,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x4d83e2;let _0x419012=null;for(let _0x2f4365=0x0;_0x2f4365<=retries;_0x2f4365++){try{const _0x1999cd=new AbortController(),_0x49fc1e=setTimeout(()=>_0x1999cd[_0xa3ead4(0x112)](),timeout),_0x1e9984=await fetch(_0x8b3209,{'headers':headers,'signal':_0x1999cd['signal']});clearTimeout(_0x49fc1e);let _0x50318c;const _0x8da133=_0x1e9984['headers']['get']('content-type');return _0x8da133?.[_0xa3ead4(0x11e)](_0xa3ead4(0x10d))?_0x50318c=await _0x1e9984[_0xa3ead4(0x126)]():_0x50318c=await _0x1e9984['text'](),{'ok':_0x1e9984['ok'],'status':_0x1e9984[_0xa3ead4(0x111)],'statusText':_0x1e9984['statusText'],'data':_0x50318c,'headers':_0x1e9984[_0xa3ead4(0x124)],'url':_0x1e9984[_0xa3ead4(0x10e)],'text':()=>_0x1e9984[_0xa3ead4(0x120)]()};}catch(_0x2b1643){_0x419012=_0x2b1643 instanceof Error?_0x2b1643:new Error(String(_0x2b1643));if(_0x2f4365===retries)break;if(shouldRetry(_0x2b1643)){console[_0xa3ead4(0x123)](_0xa3ead4(0x116)+(_0x2f4365+0x1)+_0xa3ead4(0x118)+retryDelay+_0xa3ead4(0x119)),await sleep(retryDelay);continue;}else break;}}throw _0x419012||new Error(_0xa3ead4(0x10f));}function a284_0x3691(){const _0x16d281=['status','abort','208sHeCOt','3094680IXYQkW','message','*\x20Request\x20failed;\x20retry\x20','TypeError','\x20in\x20','ms...','73386veUaas','name','535842QNgfiN','ECONNRESET','includes','2418570qgpBwm','text','2235525OztEsz','3207910VlewDe','log','headers','fetch','json','6buIPDe','4067qGkmse','application/json','url','Request\x20failed','1494hUPgFi'];a284_0x3691=function(){return _0x16d281;};return a284_0x3691();}function shouldRetry(_0x57b6d9){const _0x4c458f=a284_0x5b3f;if(_0x57b6d9 instanceof Error){if(_0x57b6d9[_0x4c458f(0x11b)]==='AbortError')return![];if(_0x57b6d9[_0x4c458f(0x11b)]===_0x4c458f(0x117)&&_0x57b6d9[_0x4c458f(0x115)]['includes'](_0x4c458f(0x125)))return!![];if(_0x57b6d9[_0x4c458f(0x115)][_0x4c458f(0x11e)](_0x4c458f(0x11d)))return!![];if(_0x57b6d9[_0x4c458f(0x115)]['includes']('ENOTFOUND'))return![];}return![];}function sleep(_0x1ea386){return new Promise(_0x20e790=>setTimeout(_0x20e790,_0x1ea386));}function a284_0x5b3f(_0x4067b8,_0x1b24f4){_0x4067b8=_0x4067b8-0x10b;const _0x369128=a284_0x3691();let _0x5b3f50=_0x369128[_0x4067b8];return _0x5b3f50;}export function validateUrl(_0x37f475){try{return new URL(_0x37f475),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1613ef,_0x54fcf1){const _0x598245=a285_0x4fef,_0x315d66=_0x1613ef();while(!![]){try{const _0x26d8df=parseInt(_0x598245(0x127))/0x1+-parseInt(_0x598245(0x132))/0x2+-parseInt(_0x598245(0x133))/0x3+parseInt(_0x598245(0x130))/0x4*(-parseInt(_0x598245(0x126))/0x5)+-parseInt(_0x598245(0x12d))/0x6*(-parseInt(_0x598245(0x129))/0x7)+-parseInt(_0x598245(0x12e))/0x8*(parseInt(_0x598245(0x131))/0x9)+parseInt(_0x598245(0x12b))/0xa;if(_0x26d8df===_0x54fcf1)break;else _0x315d66['push'](_0x315d66['shift']());}catch(_0x54ed45){_0x315d66['push'](_0x315d66['shift']());}}}(a285_0x4f86,0xea333));function env(_0xe00fc0){return process.env[`RABETBASE_${_0xe00fc0}`]||process.env[`LOVRABET_${_0xe00fc0}`]||undefined;}export function isNonInteractive(_0xa63a7a){const _0x118877=a285_0x4fef;return!!(_0xa63a7a['nonInteractive']||_0xa63a7a['ci']||env('CI')===_0x118877(0x12a)||process.env.CI==='true'||!process['stdout'][_0x118877(0x12c)]||!isStdinRawModeSupported());}function a285_0x4f86(){const _0x173c5c=['417893drBmxU','setRawMode','9494233LIZNwk','true','37187700MVifvD','isTTY','6LIvmQo','555952QMgKmN','stdin','12geBCXK','108TfiDcc','3479352ZBnXKj','5238972qEFhVC','356285CcipXV'];a285_0x4f86=function(){return _0x173c5c;};return a285_0x4f86();}function a285_0x4fef(_0x5a703c,_0x1db433){_0x5a703c=_0x5a703c-0x126;const _0x4f86e7=a285_0x4f86();let _0x4fef25=_0x4f86e7[_0x5a703c];return _0x4fef25;}function isStdinRawModeSupported(){const _0x1bd37e=a285_0x4fef;if(!process[_0x1bd37e(0x12f)][_0x1bd37e(0x12c)])return![];try{const _0x316769=process[_0x1bd37e(0x12f)]['isRaw'];return process['stdin'][_0x1bd37e(0x128)](!![]),process['stdin'][_0x1bd37e(0x128)](_0x316769??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a286_0x57232c=a286_0x14ee;(function(_0x20c081,_0x5863cc){const _0x5f5696=a286_0x14ee,_0x2de5f1=_0x20c081();while(!![]){try{const _0x279b32=-parseInt(_0x5f5696(0x1a0))/0x1*(-parseInt(_0x5f5696(0x189))/0x2)+parseInt(_0x5f5696(0x194))/0x3+parseInt(_0x5f5696(0x19d))/0x4*(parseInt(_0x5f5696(0x1ae))/0x5)+parseInt(_0x5f5696(0x1a6))/0x6*(parseInt(_0x5f5696(0x19b))/0x7)+parseInt(_0x5f5696(0x199))/0x8+-parseInt(_0x5f5696(0x1a2))/0x9+-parseInt(_0x5f5696(0x1a1))/0xa*(parseInt(_0x5f5696(0x1b4))/0xb);if(_0x279b32===_0x5863cc)break;else _0x2de5f1['push'](_0x2de5f1['shift']());}catch(_0x18c84d){_0x2de5f1['push'](_0x2de5f1['shift']());}}}(a286_0xfc7d,0x59d47));function a286_0x14ee(_0x460991,_0x3c984e){_0x460991=_0x460991-0x17a;const _0xfc7d95=a286_0xfc7d();let _0x14eed7=_0xfc7d95[_0x460991];return _0x14eed7;}import a286_0x517123 from'winston';import a286_0x14dfb0 from'node:fs';import a286_0x507c07 from'node:path';function a286_0xfc7d(){const _0x1ae772=['dirname','trim','stringify','red','createLogger','success','Starting:\x20','error','readLogs','writeFileSync','command','501484gCHsOF','map','currentRawCommand','errors','Failed\x20to\x20read\x20logs:','utf8','message','clear','printf','logTask','log','1332243zcddMJ','existsSync','setLogPath','readFileSync','yellow','5553672VHcSoZ','format','7qXhYAm','winstonLogger','21832ScarjJ','rawCommand','setRawCommand','1MXDlBa','4402120bnmewZ','4446054AaJFuV','clearLogs','filter','.lovrabet.log','3615138ZCzRbx','level','warn','toISOString','transports','logFilePath','split','combine','175jVJjDF','File','Completed:\x20','initWinstonLogger','details','timestamp','33OrtxuH','getWinstonInstance','now','Failed:\x20','mkdirSync','info'];a286_0xfc7d=function(){return _0x1ae772;};return a286_0xfc7d();}class Logger{[a286_0x57232c(0x19c)];[a286_0x57232c(0x1ab)];['currentRawCommand']='';constructor(){this['logFilePath']='';}[a286_0x57232c(0x19f)](_0x43f1c6){const _0x32e3dd=a286_0x57232c;this[_0x32e3dd(0x18b)]=_0x43f1c6;}[a286_0x57232c(0x1b1)](){const _0x31bc4c=a286_0x57232c,_0xa23092=a286_0x507c07[_0x31bc4c(0x17e)](this[_0x31bc4c(0x1ab)]);!a286_0x14dfb0[_0x31bc4c(0x195)](_0xa23092)&&a286_0x14dfb0[_0x31bc4c(0x17c)](_0xa23092,{'recursive':!![]});const _0x4c2d50=a286_0x517123[_0x31bc4c(0x19a)][_0x31bc4c(0x1ad)](a286_0x517123[_0x31bc4c(0x19a)][_0x31bc4c(0x1b3)](),a286_0x517123[_0x31bc4c(0x19a)][_0x31bc4c(0x18c)]({'stack':!![]}),a286_0x517123['format'][_0x31bc4c(0x191)](_0x174a24=>{const _0x2138bf=_0x31bc4c,_0x129461={'timestamp':_0x174a24[_0x2138bf(0x1b3)]||new Date()[_0x2138bf(0x1a9)](),'level':_0x174a24[_0x2138bf(0x1a7)]||'info','command':_0x174a24[_0x2138bf(0x188)]||'unknown','rawCommand':_0x174a24[_0x2138bf(0x19e)]||this[_0x2138bf(0x18b)]||undefined,'message':_0x174a24[_0x2138bf(0x18f)]||'','duration':_0x174a24['duration']||undefined,'details':_0x174a24[_0x2138bf(0x1b2)]||undefined};return JSON[_0x2138bf(0x180)](_0x129461);}));this[_0x31bc4c(0x19c)]=a286_0x517123[_0x31bc4c(0x182)]({'level':'info','format':_0x4c2d50,'transports':[new a286_0x517123[(_0x31bc4c(0x1aa))][(_0x31bc4c(0x1af))]({'filename':this[_0x31bc4c(0x1ab)],'level':_0x31bc4c(0x17d)})],'silent':![]}),a286_0x517123['addColors']({'success':'green','error':_0x31bc4c(0x181),'warn':_0x31bc4c(0x198),'info':'blue'});}[a286_0x57232c(0x196)](_0x146b9b){const _0x186f00=a286_0x57232c;this[_0x186f00(0x1ab)]=a286_0x507c07['join'](_0x146b9b,_0x186f00(0x1a5)),this[_0x186f00(0x19c)]&&this[_0x186f00(0x19c)][_0x186f00(0x190)](),this['initWinstonLogger']();}[a286_0x57232c(0x17d)](_0x2ed5e8,_0x13b0fb,_0x459ed9){const _0x36b700=a286_0x57232c;if(!this[_0x36b700(0x1ab)]||!this[_0x36b700(0x19c)])return;this[_0x36b700(0x19c)][_0x36b700(0x17d)](_0x13b0fb,{'command':_0x2ed5e8,'details':_0x459ed9});}[a286_0x57232c(0x183)](_0xd54de2,_0x66e50a,_0x539560,_0x45621f){const _0x4e6470=a286_0x57232c;if(!this[_0x4e6470(0x1ab)]||!this[_0x4e6470(0x19c)])return;this[_0x4e6470(0x19c)][_0x4e6470(0x193)](_0x4e6470(0x17d),_0x66e50a,{'level':_0x4e6470(0x183),'command':_0xd54de2,'duration':_0x539560,'details':_0x45621f});}[a286_0x57232c(0x185)](_0x5c5df3,_0x17482c,_0x25cf02){const _0x1ca1bb=a286_0x57232c;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x1ca1bb(0x19c)][_0x1ca1bb(0x185)](_0x17482c,{'command':_0x5c5df3,'details':_0x25cf02});}[a286_0x57232c(0x1a8)](_0x21eb73,_0x4f1977,_0x322274){const _0x42dc92=a286_0x57232c;if(!this[_0x42dc92(0x1ab)]||!this[_0x42dc92(0x19c)])return;this[_0x42dc92(0x19c)]['warn'](_0x4f1977,{'command':_0x21eb73,'details':_0x322274});}async[a286_0x57232c(0x192)](_0x4bd042,_0x251f9a,_0x411308){const _0x32dca6=a286_0x57232c,_0x13ee6e=Date[_0x32dca6(0x17a)]();this[_0x32dca6(0x17d)](_0x4bd042,_0x32dca6(0x184)+_0x251f9a);try{const _0x5749fd=await _0x411308(),_0x401fc8=Date[_0x32dca6(0x17a)]()-_0x13ee6e;return this[_0x32dca6(0x183)](_0x4bd042,_0x32dca6(0x1b0)+_0x251f9a,_0x401fc8),_0x5749fd;}catch(_0x1dde29){const _0x36e50e=Date['now']()-_0x13ee6e;this[_0x32dca6(0x185)](_0x4bd042,_0x32dca6(0x17b)+_0x251f9a,{'error':_0x1dde29 instanceof Error?_0x1dde29['message']:String(_0x1dde29),'duration':_0x36e50e});throw _0x1dde29;}}[a286_0x57232c(0x186)](){const _0x39dd1a=a286_0x57232c;try{if(!a286_0x14dfb0[_0x39dd1a(0x195)](this['logFilePath']))return[];const _0x828818=a286_0x14dfb0[_0x39dd1a(0x197)](this['logFilePath'],'utf8');return _0x828818[_0x39dd1a(0x1ac)]('\x0a')[_0x39dd1a(0x1a4)](_0x553e75=>_0x553e75[_0x39dd1a(0x17f)]())[_0x39dd1a(0x18a)](_0x77d3dc=>JSON['parse'](_0x77d3dc));}catch(_0x562f95){return console['warn'](_0x39dd1a(0x18d),_0x562f95),[];}}[a286_0x57232c(0x1a3)](){const _0xeac2d=a286_0x57232c;try{a286_0x14dfb0[_0xeac2d(0x195)](this['logFilePath'])&&a286_0x14dfb0[_0xeac2d(0x187)](this[_0xeac2d(0x1ab)],'',_0xeac2d(0x18e));}catch(_0x525cbe){console['warn']('Failed\x20to\x20clear\x20logs:',_0x525cbe);}}[a286_0x57232c(0x1b5)](){const _0x44408d=a286_0x57232c;return this[_0x44408d(0x19c)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a287_0xc397(_0x5c2d85,_0x1cc0eb){_0x5c2d85=_0x5c2d85-0x17c;const _0x3ba8e6=a287_0x3ba8();let _0xc3978=_0x3ba8e6[_0x5c2d85];return _0xc3978;}(function(_0x1f2297,_0x1fbb35){const _0x4a42dc=a287_0xc397,_0x38623a=_0x1f2297();while(!![]){try{const _0x5463a9=parseInt(_0x4a42dc(0x182))/0x1+parseInt(_0x4a42dc(0x18c))/0x2+parseInt(_0x4a42dc(0x18d))/0x3*(parseInt(_0x4a42dc(0x188))/0x4)+-parseInt(_0x4a42dc(0x187))/0x5*(parseInt(_0x4a42dc(0x189))/0x6)+-parseInt(_0x4a42dc(0x186))/0x7*(-parseInt(_0x4a42dc(0x184))/0x8)+parseInt(_0x4a42dc(0x181))/0x9+parseInt(_0x4a42dc(0x180))/0xa*(-parseInt(_0x4a42dc(0x17d))/0xb);if(_0x5463a9===_0x1fbb35)break;else _0x38623a['push'](_0x38623a['shift']());}catch(_0x3ddfd3){_0x38623a['push'](_0x38623a['shift']());}}}(a287_0x3ba8,0x8c166));function a287_0x3ba8(){const _0x5e6c5e=['validation','7dXnRYp','15UeBzYg','36ySQdgz','1744212YFKsVw','--params\x20must\x20be\x20a\x20JSON\x20object','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','889210yOZltj','200154IaVNrE','Invalid\x20JSON\x20for\x20--params:\x20','10868671iozvDK','object','parse','10uiZKkG','3058173wQUIYx','27127SZBjYO','isArray','8175792YefmVF'];a287_0x3ba8=function(){return _0x5e6c5e;};return a287_0x3ba8();}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x1fdbbc){const _0x139e99=a287_0xc397;if(!_0x1fdbbc)return undefined;let _0x624022;try{_0x624022=JSON[_0x139e99(0x17f)](_0x1fdbbc);}catch{throw CliErrors[_0x139e99(0x185)](_0x139e99(0x17c)+_0x1fdbbc);}if(!_0x624022||typeof _0x624022!==_0x139e99(0x17e)||Array[_0x139e99(0x183)](_0x624022))throw CliErrors[_0x139e99(0x185)](_0x139e99(0x18a),_0x139e99(0x18b));return _0x624022;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a288_0x1e11(){const _0x164a76=['229360GMpuyQ','21907EcnURC','3411576OJPqLo','20373DjkaGz','50uuPXhO','1646538HVqitS','284YSgVOI','660920muFzSx','3523491Kcqbax','8kjxaEK'];a288_0x1e11=function(){return _0x164a76;};return a288_0x1e11();}(function(_0x2402c9,_0x191470){const _0x1f9eb5=a288_0x13ac,_0x1d2434=_0x2402c9();while(!![]){try{const _0x313c4d=parseInt(_0x1f9eb5(0xdb))/0x1*(-parseInt(_0x1f9eb5(0xde))/0x2)+parseInt(_0x1f9eb5(0xdd))/0x3*(parseInt(_0x1f9eb5(0xe0))/0x4)+-parseInt(_0x1f9eb5(0xda))/0x5+parseInt(_0x1f9eb5(0xdf))/0x6+parseInt(_0x1f9eb5(0xdc))/0x7+-parseInt(_0x1f9eb5(0xe3))/0x8*(parseInt(_0x1f9eb5(0xe2))/0x9)+parseInt(_0x1f9eb5(0xe1))/0xa;if(_0x313c4d===_0x191470)break;else _0x1d2434['push'](_0x1d2434['shift']());}catch(_0x3b519c){_0x1d2434['push'](_0x1d2434['shift']());}}}(a288_0x1e11,0x4f586));function a288_0x13ac(_0x2c0d06,_0x4f7765){_0x2c0d06=_0x2c0d06-0xda;const _0x1e1144=a288_0x1e11();let _0x13ac76=_0x1e1144[_0x2c0d06];return _0x13ac76;}export const isWindows=process['platform']==='win32';export function resolveNpmBin(_0xd63ecf){return isWindows?_0xd63ecf+'.cmd':_0xd63ecf;}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x154081){return new Promise(_0x3ae0dc=>setTimeout(_0x3ae0dc,_0x154081));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a290_0x379beb=a290_0x3549;(function(_0x57440f,_0x4844c7){const _0x2a73b1=a290_0x3549,_0x4cc44a=_0x57440f();while(!![]){try{const _0x14fff0=-parseInt(_0x2a73b1(0x164))/0x1+parseInt(_0x2a73b1(0x170))/0x2+-parseInt(_0x2a73b1(0x188))/0x3+parseInt(_0x2a73b1(0x169))/0x4*(parseInt(_0x2a73b1(0x161))/0x5)+parseInt(_0x2a73b1(0x156))/0x6+parseInt(_0x2a73b1(0x15f))/0x7+-parseInt(_0x2a73b1(0x177))/0x8*(parseInt(_0x2a73b1(0x181))/0x9);if(_0x14fff0===_0x4844c7)break;else _0x4cc44a['push'](_0x4cc44a['shift']());}catch(_0x2f3bb2){_0x4cc44a['push'](_0x4cc44a['shift']());}}}(a290_0x4ad1,0xa642d));import a290_0x5b77c9 from'node:fs';import a290_0x30b013 from'node:path';function a290_0x3549(_0x33ad00,_0x39d0c1){_0x33ad00=_0x33ad00-0x156;const _0x4ad140=a290_0x4ad1();let _0x35499a=_0x4ad140[_0x33ad00];return _0x35499a;}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a290_0x4ad1(){const _0x25b4b6=['split','toISOString','datasetCode:\x20\x22','toLowerCase','readFile','tableName','error','includes','replaceContent','getDate','2840490bjSQeP','\x20},','writeFile','getFullYear','replace','pad','alias','formatLocalTimestamp','isFile','3386404DiHojs','replaceApiContent','774255tywlXA','default','getHours','71773kGkuaR','utf8','name:\x20\x22','pop','mkdir','32lXCxzo','map','processFile','Template\x20content\x20replacement\x20completed','now','promises','charAt','567550UXVcfY','.jsx','isDirectory','tableName:\x20\x22','success','padStart','.json','2919352DwVcFP','toUpperCase','YourModel','join','.css','processTemplate','.scss','alias:\x20\x22','endsWith','info','27ilZUAN','Starting\x20template\x20content\x20replacement','LOVRABET','.tsx','Template\x20content\x20replacement\x20failed','name','getMonth','1896705RDhSNv','.tpl','getMinutes','template','processDirectory','toDisplayTitle','copyFile','slice','push'];a290_0x4ad1=function(){return _0x25b4b6;};return a290_0x4ad1();}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a290_0x379beb(0x15b)](_0x4d7e09){const _0xe3786b=a290_0x379beb;return String(_0x4d7e09)[_0xe3786b(0x175)](0x2,'0');}static[a290_0x379beb(0x15d)](_0x937b8f){const _0x2a5d9f=a290_0x379beb,_0x1a37f0=_0x937b8f[_0x2a5d9f(0x159)](),_0x31d37a=this[_0x2a5d9f(0x15b)](_0x937b8f[_0x2a5d9f(0x187)]()+0x1),_0x57e303=this[_0x2a5d9f(0x15b)](_0x937b8f[_0x2a5d9f(0x19a)]()),_0x2a9a44=this['pad'](_0x937b8f[_0x2a5d9f(0x163)]()),_0x3694f4=this[_0x2a5d9f(0x15b)](_0x937b8f[_0x2a5d9f(0x18a)]()),_0x8f60bc=this['pad'](_0x937b8f['getSeconds']());return{'createdAt':_0x1a37f0+'-'+_0x31d37a+'-'+_0x57e303+'\x20'+_0x2a9a44+':'+_0x3694f4+':'+_0x8f60bc,'createdDate':_0x1a37f0+'-'+_0x31d37a+'-'+_0x57e303,'createdTime':_0x2a9a44+':'+_0x3694f4+':'+_0x8f60bc};}static['toComponentName'](_0x476bad){const _0x632410=a290_0x379beb,_0x5e5c2c=_0x476bad[_0x632410(0x191)]('/')[_0x632410(0x167)]()||_0x476bad;return _0x5e5c2c[_0x632410(0x191)]('-')['map'](_0x3db934=>_0x3db934[_0x632410(0x16f)](0x0)[_0x632410(0x178)]()+_0x3db934[_0x632410(0x18f)](0x1)['toLowerCase']())[_0x632410(0x17a)]('');}static[a290_0x379beb(0x18d)](_0x1fceb1){const _0x50ae13=a290_0x379beb,_0x941bf7=_0x1fceb1[_0x50ae13(0x191)]('/')[_0x50ae13(0x167)]()||_0x1fceb1;return _0x941bf7[_0x50ae13(0x191)]('-')[_0x50ae13(0x16a)](_0x2c76e9=>_0x2c76e9[_0x50ae13(0x16f)](0x0)[_0x50ae13(0x178)]()+_0x2c76e9[_0x50ae13(0x18f)](0x1)[_0x50ae13(0x194)]())[_0x50ae13(0x17a)]('\x20');}static['replaceContent'](_0x4c2724,_0xc7b50a,_0x3349d6){const _0x13eb9e=a290_0x379beb,_0x18fcf6=this['toComponentName'](_0xc7b50a),_0xeefce6=this[_0x13eb9e(0x18d)](_0xc7b50a),{createdAt:_0x56af26,createdDate:_0x1829fb,createdTime:_0x241130}=this[_0x13eb9e(0x15d)](new Date());let _0x4a3cf0=_0x4c2724[_0x13eb9e(0x15a)](/\{CliVersion\}/g,CLI_VERSION)[_0x13eb9e(0x15a)](/\{ComponentName\}/g,_0x18fcf6)[_0x13eb9e(0x15a)](/\{DisplayTitle\}/g,_0xeefce6)[_0x13eb9e(0x15a)](/\{PageName\}/g,_0xc7b50a)['replace'](/\{TemplateName\}/g,_0x3349d6)[_0x13eb9e(0x15a)](/\{CreatedAt\}/g,_0x56af26)[_0x13eb9e(0x15a)](/\{CreatedDate\}/g,_0x1829fb)[_0x13eb9e(0x15a)](/\{CreatedTime\}/g,_0x241130);return _0x4a3cf0;}static[a290_0x379beb(0x160)](_0x340f2e,_0x5d16bd,_0x232cdd,_0x56303a,_0x5cc71a,_0xf07541,_0x3703da,_0x176d35){const _0x271916=a290_0x379beb,_0x17c351=new Date(),_0x3c7473=_0x17c351[_0x271916(0x192)](),_0x17579a=_0x232cdd['map'](_0x4c01fb=>{const _0x10a5a0=_0x271916,_0x2533a1=[_0x10a5a0(0x193)+_0x4c01fb['datasetCode']+'\x22',_0x10a5a0(0x173)+_0x4c01fb[_0x10a5a0(0x196)]+'\x22',_0x10a5a0(0x166)+_0x4c01fb[_0x10a5a0(0x186)]+'\x22'];return _0x4c01fb[_0x10a5a0(0x15c)]&&_0x2533a1[_0x10a5a0(0x190)](_0x10a5a0(0x17e)+_0x4c01fb[_0x10a5a0(0x15c)]+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x2533a1[_0x10a5a0(0x17a)](',\x20')+_0x10a5a0(0x157);})[_0x271916(0x17a)](''),_0x1b6093=_0x56303a||_0x232cdd[0x0]?.[_0x271916(0x15c)]||_0x271916(0x179);let _0x322064=_0x340f2e[_0x271916(0x15a)](/\{AppCode\}/g,_0x5d16bd)['replace'](/\{ModelConfigs\}/g,_0x17579a)[_0x271916(0x15a)](/\{ExampleModelName\}/g,_0x1b6093)['replace'](/\{ApiFileName\}/g,_0x5cc71a||'api')['replace'](/\{ConfigName\}/g,_0xf07541||_0x271916(0x162))['replace'](/\{ClientConfigParam\}/g,_0x3703da||'')[_0x271916(0x15a)](/\{VarPrefix\}/g,_0x176d35||_0x271916(0x183))[_0x271916(0x15a)](/\{CreatedAt\}/g,_0x3c7473);return _0x322064;}static async[a290_0x379beb(0x17c)](_0x8f5dc5,_0x284b2c,_0x43fef7,_0x3ada1f,_0x5730a4=!![]){const _0xa650fa=a290_0x379beb,_0x293192=Date[_0xa650fa(0x16d)]();try{_0x5730a4&&logger[_0xa650fa(0x180)](_0xa650fa(0x18b),_0xa650fa(0x182),{'templatePath':_0x8f5dc5,'targetPath':_0x284b2c,'pageName':_0x43fef7,'templateName':_0x3ada1f});await a290_0x5b77c9[_0xa650fa(0x16e)][_0xa650fa(0x168)](_0x284b2c,{'recursive':!![]}),await this['processDirectory'](_0x8f5dc5,_0x284b2c,_0x43fef7,_0x3ada1f);if(_0x5730a4){const _0xbadfdd=Date['now']()-_0x293192;logger[_0xa650fa(0x174)](_0xa650fa(0x18b),_0xa650fa(0x16c),_0xbadfdd,{'pageName':_0x43fef7,'templateName':_0x3ada1f});}}catch(_0xc11bca){if(_0x5730a4){const _0x54d32a=Date[_0xa650fa(0x16d)]()-_0x293192;logger[_0xa650fa(0x197)]('template',_0xa650fa(0x185),{'templatePath':_0x8f5dc5,'targetPath':_0x284b2c,'pageName':_0x43fef7,'templateName':_0x3ada1f,'error':_0xc11bca instanceof Error?_0xc11bca['message']:String(_0xc11bca),'duration':_0x54d32a});}throw _0xc11bca;}}static async['processDirectory'](_0x548f11,_0xaa182d,_0x5bb958,_0x3d3dee){const _0x1011f8=a290_0x379beb,_0x78602f=await a290_0x5b77c9[_0x1011f8(0x16e)]['readdir'](_0x548f11,{'withFileTypes':!![]});for(const _0x4bb1c2 of _0x78602f){const _0xe10e46=a290_0x30b013[_0x1011f8(0x17a)](_0x548f11,_0x4bb1c2['name']);let _0x579bb3=a290_0x30b013[_0x1011f8(0x17a)](_0xaa182d,_0x4bb1c2[_0x1011f8(0x186)]);_0x4bb1c2['name']['endsWith']('.tpl')&&(_0x579bb3=a290_0x30b013[_0x1011f8(0x17a)](_0xaa182d,_0x4bb1c2[_0x1011f8(0x186)][_0x1011f8(0x15a)](/\.tpl$/,'')));if(_0x4bb1c2[_0x1011f8(0x172)]())await a290_0x5b77c9[_0x1011f8(0x16e)][_0x1011f8(0x168)](_0x579bb3,{'recursive':!![]}),await this[_0x1011f8(0x18c)](_0xe10e46,_0x579bb3,_0x5bb958,_0x3d3dee);else _0x4bb1c2[_0x1011f8(0x15e)]()&&await this['processFile'](_0xe10e46,_0x579bb3,_0x5bb958,_0x3d3dee);}}static async[a290_0x379beb(0x16b)](_0x1b28d3,_0x4775c7,_0x2f7024,_0x585bbb){const _0xc2b0ce=a290_0x379beb,_0x50f833=a290_0x30b013['extname'](_0x1b28d3)[_0xc2b0ce(0x194)]();_0x1b28d3['endsWith'](_0xc2b0ce(0x189))&&(_0x4775c7=_0x4775c7['replace'](/\.tpl$/,''));const _0xb90a39=[_0xc2b0ce(0x184),'.ts',_0xc2b0ce(0x171),'.js',_0xc2b0ce(0x176),'.md',_0xc2b0ce(0x17b),_0xc2b0ce(0x17d),_0xc2b0ce(0x189)];if(_0xb90a39[_0xc2b0ce(0x198)](_0x50f833)||_0x1b28d3[_0xc2b0ce(0x17f)](_0xc2b0ce(0x189))){const _0xff4ab4=await a290_0x5b77c9[_0xc2b0ce(0x16e)][_0xc2b0ce(0x195)](_0x1b28d3,_0xc2b0ce(0x165)),_0x42d94c=this[_0xc2b0ce(0x199)](_0xff4ab4,_0x2f7024,_0x585bbb);await a290_0x5b77c9[_0xc2b0ce(0x16e)][_0xc2b0ce(0x158)](_0x4775c7,_0x42d94c,_0xc2b0ce(0x165));}else await a290_0x5b77c9[_0xc2b0ce(0x16e)][_0xc2b0ce(0x18e)](_0x1b28d3,_0x4775c7);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x137671,_0x203371){const _0x410548=a291_0xed11,_0x219e7e=_0x137671();while(!![]){try{const _0x50b5e7=-parseInt(_0x410548(0x15f))/0x1+parseInt(_0x410548(0x175))/0x2*(parseInt(_0x410548(0x16c))/0x3)+-parseInt(_0x410548(0x167))/0x4+parseInt(_0x410548(0x168))/0x5*(-parseInt(_0x410548(0x160))/0x6)+-parseInt(_0x410548(0x16d))/0x7*(-parseInt(_0x410548(0x172))/0x8)+-parseInt(_0x410548(0x158))/0x9*(parseInt(_0x410548(0x16b))/0xa)+parseInt(_0x410548(0x157))/0xb;if(_0x50b5e7===_0x203371)break;else _0x219e7e['push'](_0x219e7e['shift']());}catch(_0x2ebf55){_0x219e7e['push'](_0x219e7e['shift']());}}}(a291_0x17a8,0x9469b));function a291_0xed11(_0x156163,_0x8bf335){_0x156163=_0x156163-0x157;const _0x17a888=a291_0x17a8();let _0xed11ed=_0x17a888[_0x156163];return _0xed11ed;}import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a291_0x2d8251 from'semver';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 isUpdateNoticeDisabled(){const _0x4a204d=a291_0xed11,_0x4b81af=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x4a204d(0x159)]()[_0x4a204d(0x173)]();return _0x4b81af==='1'||_0x4b81af===_0x4a204d(0x163)||_0x4b81af===_0x4a204d(0x15c);}function cacheRoot(){const _0x15fbf7=a291_0xed11;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x15fbf7(0x174));}export function getUpdateNoticeCachePath(){return join(cacheRoot(),'rabetbase-cli','update-check.json');}async function readUpdateNoticeCache(){const _0xd4e63b=a291_0xed11;try{const _0x38ac33=await readFile(getUpdateNoticeCachePath(),_0xd4e63b(0x16e)),_0x5c72bf=JSON[_0xd4e63b(0x15e)](_0x38ac33);if(!_0x5c72bf||typeof _0x5c72bf!==_0xd4e63b(0x162))return{};return _0x5c72bf;}catch{return{};}}async function writeUpdateNoticeCache(_0x435f25){const _0x14507e=a291_0xed11;try{const _0xb48be3=getUpdateNoticeCachePath();await mkdir(dirname(_0xb48be3),{'recursive':!![]}),await writeFile(_0xb48be3,JSON[_0x14507e(0x176)](_0x435f25,null,0x2)+'\x0a',_0x14507e(0x16e));}catch{}}function isFreshCheck(_0x5c967e,_0x47cfbc){const _0x192312=a291_0xed11;return typeof _0x5c967e[_0x192312(0x166)]===_0x192312(0x16f)&&_0x47cfbc-_0x5c967e[_0x192312(0x166)]<UPDATE_CHECK_TTL_MS;}function a291_0x17a8(){const _0x4d8d21=['valid','\x20available,\x20current\x20','yes','stableVersion','parse','207440Ijuxvz','5220hffQYY',',\x20run:\x20','object','true','\x20update','/v/','checkedAt','1207940YqsXHJ','4930rcBDPq','gte','https://www.npmjs.com/package/','11134810HqjJtg','2040216URvway','21yNDaUO','utf8','number','latest','lastNotifiedAt','1873896oLKXuQ','toLowerCase','.cache','2sMqFFJ','stringify','18764262GHyLdN','9eDlXpH','trim'];a291_0x17a8=function(){return _0x4d8d21;};return a291_0x17a8();}function isRecentlyNotified(_0x27888e,_0xd1212f,_0x255271){const _0x752807=a291_0xed11;return _0x27888e['lastNotifiedVersion']===_0xd1212f&&typeof _0x27888e['lastNotifiedAt']===_0x752807(0x16f)&&_0x255271-_0x27888e[_0x752807(0x171)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x172caa){const _0x4637a1=a291_0xed11;return _0x4637a1(0x16a)+NPM_PACKAGE_NAME+_0x4637a1(0x165)+_0x172caa;}export async function resolveLatestUpdateNotice(){const _0x42c46d=a291_0xed11;if(isUpdateNoticeDisabled())return null;try{const _0xafee2a=Date['now'](),_0x2e44fb=getCliVersion(),_0x1c8c6b=await readUpdateNoticeCache();let _0xe50eb8=isFreshCheck(_0x1c8c6b,_0xafee2a)?_0x1c8c6b[_0x42c46d(0x170)]?.[_0x42c46d(0x159)]():undefined;if(!_0xe50eb8&&!isFreshCheck(_0x1c8c6b,_0xafee2a)){const _0x448aed=await getCliVersionPolicy();_0xe50eb8=_0x448aed?.[_0x42c46d(0x15d)]?.['trim']()||undefined,await writeUpdateNoticeCache({..._0x1c8c6b,'checkedAt':_0xafee2a,'latest':_0xe50eb8,'failed':!_0xe50eb8});}if(!_0xe50eb8||!a291_0x2d8251[_0x42c46d(0x15a)](_0x2e44fb)||!a291_0x2d8251[_0x42c46d(0x15a)](_0xe50eb8))return null;if(a291_0x2d8251[_0x42c46d(0x169)](_0x2e44fb,_0xe50eb8))return null;if(isRecentlyNotified(_0x1c8c6b,_0xe50eb8,_0xafee2a))return null;const _0x3ef7e9=CLI_BIN_NAME+_0x42c46d(0x164);return await writeUpdateNoticeCache({..._0x1c8c6b,'checkedAt':isFreshCheck(_0x1c8c6b,_0xafee2a)?_0x1c8c6b[_0x42c46d(0x166)]:_0xafee2a,'latest':_0xe50eb8,'failed':![],'lastNotifiedVersion':_0xe50eb8,'lastNotifiedAt':_0xafee2a}),{'command':_0x3ef7e9,'current':_0x2e44fb,'latest':_0xe50eb8,'url':buildNpmVersionUrl(_0xe50eb8),'message':CLI_BIN_NAME+'\x20'+_0xe50eb8+_0x42c46d(0x15b)+_0x2e44fb+_0x42c46d(0x161)+_0x3ef7e9};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x594097,_0x4d89c3){var _0x4a2cc9=a292_0x4655,_0x47c703=_0x594097();while(!![]){try{var _0xf83b22=-parseInt(_0x4a2cc9(0xab))/0x1*(-parseInt(_0x4a2cc9(0xa9))/0x2)+-parseInt(_0x4a2cc9(0xaa))/0x3+-parseInt(_0x4a2cc9(0xa8))/0x4*(-parseInt(_0x4a2cc9(0xae))/0x5)+parseInt(_0x4a2cc9(0xa7))/0x6+-parseInt(_0x4a2cc9(0xb0))/0x7*(-parseInt(_0x4a2cc9(0xad))/0x8)+-parseInt(_0x4a2cc9(0xaf))/0x9+parseInt(_0x4a2cc9(0xac))/0xa*(-parseInt(_0x4a2cc9(0xb1))/0xb);if(_0xf83b22===_0x4d89c3)break;else _0x47c703['push'](_0x47c703['shift']());}catch(_0x32c7cc){_0x47c703['push'](_0x47c703['shift']());}}}(a292_0x4bc1,0x9d295));function a292_0x4bc1(){var _0x9cff65=['6ShDVaO','559341VMNIkH','342807rEchlK','40sGaTlv','10091240SdSoUi','3920WGTmDR','7707474ppeGzp','7QVwFxk','5025614EApYey','3789192akiUVa','3024JHQNJC'];a292_0x4bc1=function(){return _0x9cff65;};return a292_0x4bc1();}function a292_0x4655(_0xc817a9,_0x4137fe){_0xc817a9=_0xc817a9-0xa7;var _0x4bc1b0=a292_0x4bc1();var _0x465560=_0x4bc1b0[_0xc817a9];return _0x465560;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27b718,_0x32563a){var _0xa9f0e7=a293_0x57fb,_0x50e77a=_0x27b718();while(!![]){try{var _0x2c39ec=parseInt(_0xa9f0e7(0x194))/0x1*(parseInt(_0xa9f0e7(0x18c))/0x2)+parseInt(_0xa9f0e7(0x18d))/0x3+-parseInt(_0xa9f0e7(0x191))/0x4*(parseInt(_0xa9f0e7(0x192))/0x5)+parseInt(_0xa9f0e7(0x18e))/0x6*(parseInt(_0xa9f0e7(0x18f))/0x7)+parseInt(_0xa9f0e7(0x190))/0x8+-parseInt(_0xa9f0e7(0x195))/0x9+parseInt(_0xa9f0e7(0x193))/0xa;if(_0x2c39ec===_0x32563a)break;else _0x50e77a['push'](_0x50e77a['shift']());}catch(_0x50e6a4){_0x50e77a['push'](_0x50e77a['shift']());}}}(a293_0x2fd4,0x2d974));function a293_0x57fb(_0xe435cc,_0x138405){_0xe435cc=_0xe435cc-0x18c;var _0x2fd458=a293_0x2fd4();var _0x57fb28=_0x2fd458[_0xe435cc];return _0x57fb28;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a293_0x2fd4(){var _0x2c2846=['188jsjUTO','323184Gojxeq','6siljVm','595777sLqaih','82776HzhNcc','1186924jlPjaP','5uCjYYN','933570EWLxRD','3013oEsOaH','866646aieQRK'];a293_0x2fd4=function(){return _0x2c2846;};return a293_0x2fd4();}export async function withActiveCookie(_0x4e509d,_0x1082b6){setActiveCookie(_0x4e509d);try{return await _0x1082b6();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a294_0x27ca(_0x6fec0e,_0x5ccef4){_0x6fec0e=_0x6fec0e-0x15e;var _0x3efb79=a294_0x3efb();var _0x27ca74=_0x3efb79[_0x6fec0e];return _0x27ca74;}function a294_0x3efb(){var _0x1a8f98=['4uskQOI','606TNZOXs','86499eIbnRb','4379967uEUsIV','1514127qMuZWD','55870kkTcQV','28202779ugwZpD','7525150WjMBCy','1753558aqNkht','1XhjRTg','16ovTlEv'];a294_0x3efb=function(){return _0x1a8f98;};return a294_0x3efb();}(function(_0x529efd,_0x29047b){var _0x5c4f19=a294_0x27ca,_0x1daf12=_0x529efd();while(!![]){try{var _0x2793b2=-parseInt(_0x5c4f19(0x15e))/0x1*(-parseInt(_0x5c4f19(0x168))/0x2)+-parseInt(_0x5c4f19(0x164))/0x3*(parseInt(_0x5c4f19(0x160))/0x4)+-parseInt(_0x5c4f19(0x165))/0x5*(parseInt(_0x5c4f19(0x161))/0x6)+-parseInt(_0x5c4f19(0x162))/0x7*(-parseInt(_0x5c4f19(0x15f))/0x8)+-parseInt(_0x5c4f19(0x163))/0x9+-parseInt(_0x5c4f19(0x167))/0xa+parseInt(_0x5c4f19(0x166))/0xb;if(_0x2793b2===_0x29047b)break;else _0x1daf12['push'](_0x1daf12['shift']());}catch(_0x45c42b){_0x1daf12['push'](_0x1daf12['shift']());}}}(a294_0x3efb,0x90c19));export function writeCliSideChannelLine(_0x588a21){process['stderr']['write'](_0x588a21+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0-beta.2",
|
|
4
4
|
"description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, Backend Function, database connections, skills, and AI agent workflows.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"keywords": [
|
|
@@ -84,8 +84,6 @@
|
|
|
84
84
|
"skills/rabetbase.manifest.json",
|
|
85
85
|
"scripts/postinstall.mjs",
|
|
86
86
|
"templates/generate-api",
|
|
87
|
-
"templates/rules",
|
|
88
|
-
"templates/skill",
|
|
89
87
|
"sidecar",
|
|
90
88
|
"README.md",
|
|
91
89
|
"LICENSE"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase
|
|
3
|
-
version: 2.
|
|
3
|
+
version: 2.5.0-beta.2
|
|
4
4
|
description: "Lovrabet 开发工作流 CLI — 通过 rabetbase 命令管理数据集、数据库连接(dblink)、数据列表页(Data List Page)、自定义页面(Custom Page)、SQL 查询、Backend Function 脚本、通知配置、企业知识库、菜单事实读取与同步、开发角色与协作者、应用文件、面向票证类业务材料文字与结构化字段提取的 OCR、代码生成,以及平台问题上报。触发词:数据集、数据表、dataset relation-audit、dataset delete、dataset restore、废弃数据集、恢复数据集、dataset rename、dataset field-update、dataset extend-update、dataset business-groups、dataset business-group-update、businessGroup、字段对象更新、doType、options、数据列表页、Data List Page、自定义页面、Custom Page、page create、page custom-list、page custom-detail、page custom-update、page custom-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 create、db update、db delete、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 消息通知、Backend Function 消息通知、notification config-list、EMAIL configCode、通知配置、notification.send、企业知识库、公司知识、公共知识、kb search、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 visibility-update、菜单显示、菜单隐藏、visible、menu external-link-create、menu external-link-update、menu rename、菜单改名、外链菜单创建、外链 URL 更新、菜单异常审计、菜单手动删除清单、menu sync、menu asset-update、菜单资源更新、menu move、菜单移动、开发角色、开发协作者、role、role list、role user-add、role user-remove、user-resolve、加入开发者、ADMIN、DEV、OWNER、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:
|
|
@@ -18,9 +18,9 @@ metadata:
|
|
|
18
18
|
|
|
19
19
|
## 前置条件
|
|
20
20
|
|
|
21
|
-
1.
|
|
22
|
-
2. **AppCode**:确保 `.rabetbase.json` 中设置了 `apps
|
|
23
|
-
3. **配置文件**:`rabetbase init`
|
|
21
|
+
1. **连接配置与认证分离**:首次使用先执行 `rabetbase config init`。交互模式选择 `Mainland China (cn)` 或 `Indonesia (id)`;非交互模式显式传 `--region cn|id`,未传时默认 `cn`。企业独立部署使用 `--domain-config <file>` 或六个 `--*-domain` flags。`config init` 固定重建全局节点/Domain 配置,保留 Cookie、AccessKey、format、locale 和应用绑定,但不登录、不绑定项目;随后再执行 `rabetbase auth login`
|
|
22
|
+
2. **AppCode**:确保 `.rabetbase.json` 中设置了 `apps`(单应用自动选中;多应用再配 `defaultApp`),或兼容读取的顶层 `appcode`,或通过 `--appcode <code>` / `--app <name>` 传入。旧 `.lovrabet.json` 不会自动读取
|
|
23
|
+
3. **配置文件**:`rabetbase config init` 固定写全局 `~/.rabetbase.json`,不接受项目作用域;默认 `cn` 不落冗余 `region`。官方节点模式清理显式和遗留 Domain,独立部署模式清理旧 `region`/Domain 后写入所提供的覆盖值。完整字段说明见 [`.rabetbase.json` 配置参考](references/rabetbase-config.md)。当前目录应用绑定使用下方 `workspace init`,二者不要混用
|
|
24
24
|
4. **工作目录应用绑定**:当前目录要固定使用某个应用时,使用 `rabetbase workspace init --appcode <code>` 或 `rabetbase workspace use --app <name>`(选型见「app vs workspace 职责边界」)
|
|
25
25
|
5. **多应用场景**:一个项目有多个应用时,先 `rabetbase workspace add <name> --appcode …` 登记各应用,再用 `--app <name>` 临时切换,或 `workspace use --app <name>` 修改当前工作目录默认应用
|
|
26
26
|
6. **平台发现**:当你不知道当前登录账号能访问哪些应用时,先 `rabetbase app list --remote`;它查询平台目录,不修改本地配置
|
|
@@ -29,7 +29,7 @@ metadata:
|
|
|
29
29
|
9. **本地 SQL / Backend Function 目录**:新建或长期维护的源文件应落在 CLI 与 `bff status` / `sql pull` 一致的路径,避免写在 `src/`、`queries/` 等随意目录后再迁移。
|
|
30
30
|
- **SQL**:项目根 **`.rabetbase/sql/<appCode>/<dbName|db-<id>>/<sqlCode>_<sqlName>.sql|xml`**;草稿或人工兜底可放 `.draft.sql`。`sql create` / `sql pull` / `sql push` / `sql status` 默认围绕这套目录与 `.rabetbase/sql.lock.json` 工作。
|
|
31
31
|
- **Backend Function**:**`.rabetbase/bff/<appCode>/...`**(由 `bff create` 创建或 `bff pull` 同步;与 `bff status` / `bff push` 扫描范围一致)。详见 [`guides/sql-creation-workflow.md`](guides/sql-creation-workflow.md)、[`guides/bff-creation-workflow.md`](guides/bff-creation-workflow.md)。
|
|
32
|
-
10.
|
|
32
|
+
10. **运行态查数显式交接** — `rabetbase` 只负责 Dataset 结构与研发发布。不需要真实行数据时,`lovrabet` CLI 可以不装。一旦要验证真实业务行数据,必须交接给 **`lovrabet data filter/getOne`**;不可用时报告阻断并提示安装 `lovrabet` Skill 与 CLI。不要调用已移除的 `rabetbase data filter/getOne`,也不要由本 Skill 静默安装或修复运行态 CLI。`rabetbase sql exec` 只验证已发布 SQL,不是行数据查询的通用替代。详见 [`guides/data-api-guidelines.md`](guides/data-api-guidelines.md)。
|
|
33
33
|
|
|
34
34
|
## Skill Freshness
|
|
35
35
|
|
|
@@ -53,16 +53,17 @@ metadata:
|
|
|
53
53
|
- 需要了解数据集关联关系时用 `rabetbase dataset relations --format compress`(或 `json`);需要审计关系事实错误和人工复核项时用 `rabetbase dataset relation-audit --format compress`
|
|
54
54
|
- 需要从文本需求创建新的 `METADATA` 数据集时,先读 [`dataset generate-start/status`](references/rabetbase-dataset-generate.md),执行 preview 写出 design 文件,审阅后用 `generate-start --apply --design-file` 提交任务,再用 `generate-status` 查询到成功
|
|
55
55
|
- **管理物理库连接 / 测连 / 同步表结构分析**时用 `rabetbase db …`(先 [`db list`](references/rabetbase-db-list.md),trace/plan id 见 [`database-connection-workflow.md`](guides/database-connection-workflow.md))
|
|
56
|
-
-
|
|
56
|
+
- DBAgent 增量分析默认先执行一次异步差异刷新:调用 `db diff-refresh-start`,保存 traceId,并用 `db diff-refresh-status` 查询同一任务到终态,成功后再执行 `db diff --all --changed-only`。无论 `tableCount` 大小都执行刷新;只有用户明确表示“不需要分析”“不刷新”或“只看现有结果”时才跳过异步刷新,并说明结果可能不是最新事实
|
|
57
57
|
- 需要查看无差异表或主动重新分析既有表时,用 `db diff --view all`;`--all` 只表示聚合当前视角全部分页,不等价于全部表
|
|
58
58
|
- DB 增量分析先对完整 `toAnalyzeTables` 执行 `db analyze-batch-plan`;它生成的是本地批次方案,不是服务端 `planId`,也不会创建任务。再严格按批次顺序启动;每批独立保存 `planId`(即 `analyze-start` 返回值),当前批次到达已知终态前不得启动下一批
|
|
59
|
-
-
|
|
59
|
+
- 全部批次结束后再次执行异步差异刷新并重新获取完整差异;仍未收敛时,按 [`database-connection-workflow.md`](guides/database-connection-workflow.md) 对剩余 `toAnalyzeTables` 逐表串行重试且每表只恢复一次。仅当用户明确要求跳过分析/刷新时直接读取现有差异。状态查询失败继续使用原 `planId`,不得重复启动任务
|
|
60
60
|
- 输出很大且只需子集时,在 `compress`/`json` 上加 `--jq '.data…'` 缩小结果
|
|
61
|
-
-
|
|
61
|
+
- 需要真实业务行数据时必须交接给 `lovrabet data filter/getOne`;`lovrabet` 不可用时报告阻断并提示安装 Skill 与 CLI,不要静默安装或修复,也不要用 `rabetbase sql exec` 当行数据替代,见 [`guides/data-api-guidelines.md`](guides/data-api-guidelines.md)
|
|
62
|
+
- 需要 `src/api/api.ts` / `client.ts` 时:先 `rabetbase api pull --format compress` 取 `data.models`、`data.files`、`data.needsAgentMerge`,再按 [`sdk-client-generation.md`](guides/sdk-client-generation.md) 更新 TypeScript。`api pull` **不会覆盖已有** `api.ts`/`client.ts`
|
|
62
63
|
3. **SQL 工作流严格分步**
|
|
63
64
|
- 推荐路径:查现有(`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
65
|
- 先使用 `sql list/detail` 查找可复用的 Custom SQL;没有满足需求的资源时,按照 [`sql-creation-workflow.md`](guides/sql-creation-workflow.md) 与 [`sql-mybatis.md`](guides/sql-mybatis.md) 创建、校验、发布并验证
|
|
65
|
-
-
|
|
66
|
+
- 页面执行已发布的 Custom SQL 时使用 `sqlCode` + `params`;Backend Function 默认使用 `context.client.sql.byName(sqlName).execute({ params })`,`sql.execute({ sqlCode, params })` 仅作兼容路径
|
|
66
67
|
4. **Backend Function 工作流严格分步**
|
|
67
68
|
- 查现有 → 确认字段或通知配置 → 查公共函数 → 本地创建(`bff create`) → 检查状态(`bff status`) → 先预览(`--dry-run`) → 再拉取/推送/删除
|
|
68
69
|
- 创建会发送消息通知的 Backend Function 时,先读取 [`backend-function.md`](guides/backend-function.md) 的“消息通知扩展”契约,再执行 [`rabetbase notification config-list --type EMAIL`](references/rabetbase-notification-config-list.md) 获取当前应用的 `configCode`;不得猜测渠道、收件人或把密钥写进脚本
|
|
@@ -99,7 +100,7 @@ metadata:
|
|
|
99
100
|
- 直接执行目标命令,不需要先查 `rabetbase app list --remote`
|
|
100
101
|
|
|
101
102
|
2. **已明确本地应用名**
|
|
102
|
-
- 当前项目 `.rabetbase.json`
|
|
103
|
+
- 当前项目 `.rabetbase.json` 已有唯一 app,或多 app 已配置 `defaultApp`
|
|
103
104
|
- 或用户给了 `--app <name>`
|
|
104
105
|
- 先用 `rabetbase app list` 验证本地配置,再执行目标命令
|
|
105
106
|
|
|
@@ -132,12 +133,12 @@ metadata:
|
|
|
132
133
|
|
|
133
134
|
- **入口**:先 [`db list`](references/rabetbase-db-list.md) 取 `id` 与 `latestAnalysisTraceId`(如有)。
|
|
134
135
|
- **只读常用**:[`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)
|
|
136
|
+
- **差异刷新**:[`db diff-refresh-start/status`](references/rabetbase-db-diff-refresh.md)。CLI 发起 DBAgent 增量分析时,无论 `tableCount` 多少或是否缺失,默认先刷新再读取差异;只有用户明确要求跳过分析/刷新时才直接读取现有结果。刷新与 schema `analyze-*` 是两类任务,不得混用。
|
|
136
137
|
- **分析任务**:`db analyze-batch-plan` / `analyze-start` / `analyze-cancel` / `analyze-status`(服务端 plan/trace 来源见下)。
|
|
137
138
|
- **状态诊断边界**:`analyze-status` 的 `requestedAnalysis` 只还原原始提交范围;`hasMultipleAttempts=true` 只表示观察到多个执行尝试。不得据此推断尝试间连续性、实际执行范围或自动重启。
|
|
138
139
|
- **增量分批**:先用本地只读的 `db analyze-batch-plan --id <id> --tables <清单>` 得到确定性批次及 `planningEstimate`;这里生成的是本地批次方案,不是服务端 `planId`,不会创建或预留任务。再逐批调用一次 `analyze-start`,读取真实 `planId` 与当前任务的 `serverEstimate`;每批独立保存其返回的 `planId`,同一 dblink 严格串行。两类估算都不得驱动超时、取消、重试、自动重启或状态判断,`PENDING / RUNNING / RETRYING / CANCELING` 均不得推进下一批。
|
|
139
140
|
- **取消已有任务**:只使用正在跟踪的原 `planId` 执行 `analyze-cancel --plan <原 planId>`;取消分支不得调用 `analyze-start`,也不得用可能变化的 `latestAnalysisTraceId` 替换已知目标。
|
|
140
|
-
-
|
|
141
|
+
- **失败恢复**:全部批次结束后默认再次异步刷新,再读取完整 `db diff --all --changed-only` 获取未收敛表;只有用户明确要求跳过分析/刷新时才直接读取。随后逐表串行执行 `analyze-start --tables <单表>`,每表只恢复一次;累计原因计数只作可能不完整的参考展示。Agent 可语义理解原始 `errorMsg` 辅助解释和建议,但两者都不驱动任务状态、重提任务或收敛判断。
|
|
141
142
|
- **ER 图引导**:`db analyze-status` 终态成功后,检查并转述 `data.links.erPage`;若没有 `data.links`,补 `--appcode` 或进入已配置 app 的项目上下文后重查。
|
|
142
143
|
- **写入**:[`db create`](references/rabetbase-db-create.md) / [`db update`](references/rabetbase-db-update.md) 默认先测试未保存配置,只有显式 `--skip-connection-test` 才跳过;[`db delete`](references/rabetbase-db-delete.md) 必须先 dry-run,执行前重新检查 DB_TABLE Dataset 依赖,有依赖即阻止且无 force。三者都支持 **`--dry-run`**。
|
|
143
144
|
- **横切流程与 trace/plan**:[`database-connection-workflow.md`](guides/database-connection-workflow.md)。**单命令细则**见 `references/rabetbase-db-*.md`(与仓库 `src/commands/db/` 一一对应)。
|
|
@@ -154,10 +155,10 @@ metadata:
|
|
|
154
155
|
|
|
155
156
|
## 配置作用域原则(`--global`)
|
|
156
157
|
|
|
157
|
-
-
|
|
158
|
+
- **普通写操作默认当前项目**(`workspace add`、`config set`、`project create` 等),除非用户**显式**传 `--global`;`config init` 是首次连接配置入口,固定写全局配置。
|
|
158
159
|
- **不要**在用户未要求时给命令加 `--global`** — 默认行为已是「项目优先」;只有用户明确要改全局配置或不在项目内且意图写全局时才使用。
|
|
159
|
-
- **`config set`**:在**没有**项目配置文件(当前目录未解析到 `.rabetbase.json`)且**未**传 `--global` 时,CLI **拒绝执行**并提示使用 `--global` 或先 `rabetbase init
|
|
160
|
-
- **`project create`** 生成的新项目 `.rabetbase.json` **只继承**少量全局偏好(如 `cookie` / `locale` / `format` / `riskLevel` 等),**不会**把全局 `apps` / `defaultApp`
|
|
160
|
+
- **`config set`**:在**没有**项目配置文件(当前目录未解析到 `.rabetbase.json`)且**未**传 `--global` 时,CLI **拒绝执行**并提示使用 `--global` 或先 `rabetbase workspace init --appcode <code>`,**不会**静默写入全局。
|
|
161
|
+
- **`project create`** 生成的新项目 `.rabetbase.json` **只继承**少量全局偏好(如 `cookie` / `locale` / `format` / `riskLevel` 等),**不会**把全局 `apps` / `defaultApp` 带入新项目文件;同时生成浏览器安全的 `src/api/sdk-config.ts`:默认 CN 不写路由,ID 写 `region: "id"`,非默认企业 Runtime 写 `runtimeDomain` 且优先于 region,不下发认证配置。
|
|
161
162
|
- **`api pull` / `api list`**:默认仅针对**项目** `apps`;需要合并全局已登记应用时加 `--global`(见各命令 reference)。
|
|
162
163
|
- **`app list`**:默认展示**合并**后的全量;`--global` 仅全局、`--project` 仅项目(见 [`rabetbase app list`](references/rabetbase-app-list.md))。
|
|
163
164
|
|
|
@@ -176,9 +177,9 @@ metadata:
|
|
|
176
177
|
|
|
177
178
|
| 场景 | 命令 |
|
|
178
179
|
|------|------|
|
|
179
|
-
| 首次安装后的全局引导 | `rabetbase init` |
|
|
180
|
-
|
|
|
181
|
-
| 目录已有配置,只再登记一个 profile | `rabetbase workspace add <name> --appcode <code
|
|
180
|
+
| 首次安装后的全局引导 | `rabetbase config init` |
|
|
181
|
+
| 当前目录还没绑定 app | `rabetbase workspace init --appcode <code>`(单应用不写 `defaultApp`) |
|
|
182
|
+
| 目录已有配置,只再登记一个 profile | `rabetbase workspace add <name> --appcode <code>`(从单应用变为多应用时保留原应用为默认;`--global` 写全局) |
|
|
182
183
|
| 切换当前目录默认应用 | `rabetbase workspace use --app <name>` |
|
|
183
184
|
|
|
184
185
|
**入口判断**:
|
|
@@ -223,11 +224,14 @@ metadata:
|
|
|
223
224
|
import { createClient } from "@lovrabet/sdk";
|
|
224
225
|
const client = createClient({
|
|
225
226
|
appCode: "your-app-code",
|
|
227
|
+
authMode: "client-ak", // 传 accessKey 时必须显式声明;缺省 authMode 一律走 cookie 模式,accessKey 会被忽略
|
|
226
228
|
accessKey: process.env.RABETBASE_ACCESS_KEY,
|
|
227
229
|
models: [{ tableName: "users", datasetCode: "abc123", alias: "users" }],
|
|
228
230
|
});
|
|
229
231
|
```
|
|
230
232
|
|
|
233
|
+
> 认证模式必须显式声明:`accessKey`(仅 accessKey)用 `authMode: "client-ak"`;`accessKey + secretKey` 或 `token` 的签名场景用 `authMode: "openapi"`;浏览器 Cookie 环境省略 `authMode`(默认 cookie)。
|
|
234
|
+
|
|
231
235
|
### filter 查询(最常用)
|
|
232
236
|
|
|
233
237
|
```typescript
|
|
@@ -242,11 +246,11 @@ const result = await client.models.users.filter({
|
|
|
242
246
|
|
|
243
247
|
参数名强制约束:`select`(非 fields)、`orderBy`(非 sort)、`currentPage`/`pageSize`(非 page/limit)
|
|
244
248
|
|
|
245
|
-
where 条件强制使用操作符:`$eq` `$ne` `$
|
|
249
|
+
where 条件强制使用操作符:`$eq` `$ne` `$gt` `$lt` `$gte`(或别名 `$gteq`)`$lte`(或别名 `$lteq`)`$in` `$contain` `$startWith` `$endWith` `$notNull`(`$gteq`/`$lteq` 为后端兼容别名,映射同一 SQL,新代码推荐 `$gte`/`$lte`)
|
|
246
250
|
|
|
247
251
|
### SQL 调用
|
|
248
252
|
|
|
249
|
-
|
|
253
|
+
页面 SDK 通过已发布 Custom SQL 的 `sqlCode` + `params` 执行查询;Backend Function 默认通过当前应用内唯一 `sqlName` 的 `context.client.sql.byName(sqlName).execute({ params })` 执行查询,`sql.execute({ sqlCode, params })` 作为兼容调用方式。
|
|
250
254
|
|
|
251
255
|
```typescript
|
|
252
256
|
const data = await client.sql.execute<MyRow>({
|
|
@@ -275,7 +279,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
275
279
|
| --------------- | -------------------------------------------- | ------------------------------------ |
|
|
276
280
|
| SQL 返回值 | `{ execSuccess, execResult }` | 直接返回数组 `T[]` |
|
|
277
281
|
| 单条查询 | `getOne({ id })` | `getOne({ id })` |
|
|
278
|
-
|
|
|
282
|
+
| 数据集访问 | 可通过初始化/生成代码使用 alias | `DB_TABLE` 默认使用 `models.byTable(tableName, { dblinkId? })`;`METADATA` 使用 `"dataset_" + 数据集 code`,`DB_TABLE` 也支持该兼容调用方式 |
|
|
279
283
|
| `filter()` 返回 | `tableData` 为列表数据 | `tableData` 为列表数据,不是 `list` |
|
|
280
284
|
| `create()` 返回 | 以 SDK 文档/类型为准 | 新记录 ID,不是完整对象 |
|
|
281
285
|
| SDK 初始化能力 | `createClient` / `registerModels` | 不可用;`context.client` 由平台注入 |
|
|
@@ -285,7 +289,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
285
289
|
|
|
286
290
|
| 意图 | 推荐命令 | 备注 |
|
|
287
291
|
|------|---------|------|
|
|
288
|
-
|
|
|
292
|
+
| 初始化连接配置 | [`rabetbase config init`](references/rabetbase-init.md) | 选择官方节点或导入独立部署 Domain |
|
|
289
293
|
| 创建新项目 | [`rabetbase project create`](references/rabetbase-project-create.md) | 支持 `--name` + `--appcode` 非交互 |
|
|
290
294
|
| 从 lovrabet-cli 迁移 | [`rabetbase project upgrade`](references/rabetbase-project-upgrade.md) | 6 步自动迁移,`--yes` 跳过确认 |
|
|
291
295
|
| 老项目翻新蓝图 / Legacy Application Blueprint | [`guides/legacy-application-blueprint-workflow.md`](guides/legacy-application-blueprint-workflow.md) | 先输出 `.rabetbase/blueprint/<appCode>/application-blueprint.md`,把老代码逻辑与 Dataset / Relations 绑定后再生成迁移 Backlog |
|
|
@@ -314,7 +318,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
314
318
|
| 同步本地微前端路由到平台 | [`rabetbase menu sync`](references/rabetbase-menu-sync.md) | 扫描 `src/pages` 创建缺失的 `procode` 菜单;不上传构建产物;正式执行前先 `--dry-run` |
|
|
315
319
|
| 修改微前端菜单资源 URL | [`rabetbase menu asset-update`](references/rabetbase-menu-asset-update.md) | `write`;用 ID/path 精确选目标或显式 `--all`,默认 patch 且保留加载模式,先 dry-run 再复用参数正式执行 |
|
|
316
320
|
| 查看/管理开发角色 | [`rabetbase role list/detail/update/delete`](references/rabetbase-role-list.md) | 角色类型为 ADMIN/DEV/OWNER/CUSTOM;仅 CUSTOM 可改/删;当前不提供 create;输出 `scope: dev` |
|
|
317
|
-
| 解析昵称/用户名到 userId | [`rabetbase role user-resolve`](references/rabetbase-role-user-resolve.md) |
|
|
321
|
+
| 解析昵称/用户名到 userId | [`rabetbase role user-resolve`](references/rabetbase-role-user-resolve.md) | 基于租户成员目录;重名时列出候选 ID,再把选中的 ID 传给 `role user-add/user-remove --user <id>` |
|
|
318
322
|
| 查询租户人员列表 | [`rabetbase tenant members-list --tenant-code <code>`](references/rabetbase-tenant-members-list.md) | 先校验当前账号所属租户,再返回全量人员;不分页、不输出邮箱/手机号/头像 |
|
|
319
323
|
| 查询应用人员及角色列表 | [`rabetbase app members-list --appcode <code>`](references/rabetbase-app-members-list.md) | 按 userId 去重并聚合 `roles[]`;同时保留 ACTIVE/PENDING 角色归属 |
|
|
320
324
|
| 把开发协作者加入/移出角色 | [`rabetbase role user-add / user-remove`](references/rabetbase-role-user-add.md) | 只改目标开发角色;OWNER 直接拒绝;`high-risk-write`,先 `--dry-run` |
|
|
@@ -353,7 +357,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
353
357
|
| 推送本地数据列表页 schema | [`rabetbase page push --id <pageId>`](references/rabetbase-page-push.md) | 推送后自动回拉 canonical schema 覆盖本地 |
|
|
354
358
|
| 恢复已删除页面 | [`rabetbase page restore --id <pageId>`](references/rabetbase-page-restore.md) | 支持 `DATA_LIST|CUSTOM` 自动识别;跨类型同 ID 时显式传 `--page-type` |
|
|
355
359
|
| 数据库连接(dblink)/ 测连 / 结构分析 | [`rabetbase db list`](references/rabetbase-db-list.md) 起 | **`id`**、**trace/plan id** 与“终态 + 复跑 diff”完成口径见 [database-connection-workflow.md](guides/database-connection-workflow.md);各子命令见 `references/rabetbase-db-*.md` |
|
|
356
|
-
| 生成 API 客户端代码 | [`rabetbase api pull`](references/rabetbase-api-pull.md) |
|
|
360
|
+
| 生成 / 更新 API 客户端代码 | [`rabetbase api pull`](references/rabetbase-api-pull.md) → [`sdk-client-generation.md`](guides/sdk-client-generation.md) | `api pull` 拉 Dataset 事实并刷新 `sdk-config.ts`;已有 `api.ts`/`client.ts` 按 guide 合并更新 |
|
|
357
361
|
| 查看生成的 API 模型 | [`rabetbase api list`](references/rabetbase-api-list.md) | 列出已生成的数据模型 |
|
|
358
362
|
| 查看现有 SQL | [`rabetbase sql list --name "xxx"`](references/rabetbase-sql-list.md) | 分页,按名称过滤;默认查当前决议到的单个应用 |
|
|
359
363
|
| 查看 SQL 详情 | [`rabetbase sql detail --sqlcode xxx`](references/rabetbase-sql-detail.md) | 含完整 SQL 内容和参数定义 |
|
|
@@ -378,9 +382,9 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
378
382
|
| 查询应用人员及角色归属 | [`rabetbase app members-list --appcode <code>`](references/rabetbase-app-members-list.md) | 全量只读;按 userId 去重,角色归属聚合到 `roles[]` |
|
|
379
383
|
| 查询租户人员 | [`rabetbase tenant members-list --tenant-code <code>`](references/rabetbase-tenant-members-list.md) | 全量只读;租户必须属于当前账号 |
|
|
380
384
|
| 查看 app 服务帮助 | `rabetbase app` | 只显示 `app` 子命令帮助,不等价于 `app list` |
|
|
381
|
-
| 绑定当前目录到应用 | [`rabetbase workspace init --appcode <code>`](references/rabetbase-workspace.md) |
|
|
385
|
+
| 绑定当前目录到应用 | [`rabetbase workspace init --appcode <code>`](references/rabetbase-workspace.md) | 首次绑定;单应用自动选中且不写 `defaultApp`;与 `config init`(全局引导)不同 |
|
|
382
386
|
| 切换当前工作目录默认应用 | [`rabetbase workspace use --app <name>`](references/rabetbase-workspace.md) | 持久修改当前目录 defaultApp |
|
|
383
|
-
| 登记应用 | [`rabetbase workspace add <name> --appcode <code>`](references/rabetbase-workspace.md) |
|
|
387
|
+
| 登记应用 | [`rabetbase workspace add <name> --appcode <code>`](references/rabetbase-workspace.md) | 单应用不写 default;增加第二个应用时保留原应用为默认;`--global` 写全局 |
|
|
384
388
|
| 移除应用 | [`rabetbase workspace remove <name>`](references/rabetbase-workspace.md) | 只移除本地 profile,移除后自动切换 default |
|
|
385
389
|
| 临时切换应用执行 | 任何命令加 `--app <name>` 或 `--appcode <code>` | 不修改配置文件 |
|
|
386
390
|
| 查看配置文件格式 | [`.rabetbase.json` 配置参考](references/rabetbase-config.md) | 完整字段、优先级、环境变量 |
|
|
@@ -402,7 +406,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
402
406
|
| Diagnostics | [`doctor`](references/rabetbase-doctor.md) |
|
|
403
407
|
| Platform Issue | [`report`](references/rabetbase-issue-report.md) |
|
|
404
408
|
| File | [`upload` / `query-url`](references/rabetbase-file.md) |
|
|
405
|
-
| Configuration | [`config set
|
|
409
|
+
| Configuration | [`config set/get/list/delete`](references/rabetbase-config.md) |
|
|
406
410
|
| Runtime App Config Management | [`app-config list/get/set/delete`](references/rabetbase-app-config.md) |
|
|
407
411
|
| Company Knowledge Base | [`kb list/detail/search/create/update/delete`](references/rabetbase-kb.md) |
|
|
408
412
|
| 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) |
|
|
@@ -486,11 +490,12 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
486
490
|
| 主题 | Use when | Guide |
|
|
487
491
|
| ---------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
488
492
|
| SDK 完整参数与返回值 | 初始化 client、filter/create、sql.execute、bff.execute、错误处理 | [`typescript-sdk.md`](guides/typescript-sdk.md) |
|
|
493
|
+
| 生成 / 更新 api.ts 与 client.ts | `api pull` 之后、模型过期、脚手架缺失、或用户要求修复 SDK 客户端 | [`sdk-client-generation.md`](guides/sdk-client-generation.md) |
|
|
489
494
|
| SQL MyBatis 与动态 SQL | 写自定义 SQL、`<if>`/`<foreach>`、参数绑定 | [`sql-mybatis.md`](guides/sql-mybatis.md) |
|
|
490
495
|
| 前端页面开发约束 | React 页、表单、列表、与数据集绑定 | [`frontend-development.md`](guides/frontend-development.md) |
|
|
491
496
|
| 故障诊断 | CLI/登录/数据集/保存失败排障 | [`troubleshooting.md`](guides/troubleshooting.md) |
|
|
492
497
|
| Backend Function 脚本规范 | HOOK/ENDPOINT/COMMON、`context.client`、消息通知扩展、目录与注释模板 | [`backend-function.md`](guides/backend-function.md) |
|
|
493
|
-
| 数据接口访问 | 先 detail 再编码、外键/枚举、禁止 N+1
|
|
498
|
+
| 数据接口访问 | 先 detail 再编码、外键/枚举、禁止 N+1、批量与关联查询;验证真实行数据时交接 `lovrabet data`(**`lovrabet` CLI ≥ 2.0**) | [`data-api-guidelines.md`](guides/data-api-guidelines.md) |
|
|
494
499
|
| SQL 创建工作流 | list/detail → pull/create → edit → validate → status → push/delete → exec 全链路 | [`sql-creation-workflow.md`](guides/sql-creation-workflow.md) |
|
|
495
500
|
| Backend Function 创建工作流 | new → status → dry-run → pull/push | [`bff-creation-workflow.md`](guides/bff-creation-workflow.md) |
|
|
496
501
|
| 冲突检测与保存 | `blocked`、未保存时的用户沟通、响应结构 | [`conflict-detection.md`](guides/conflict-detection.md) |
|