@lovrabet/rabetbase-cli 2.5.3 → 2.5.4-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/README.md +11 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/logs.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.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.d.ts +1 -1
- package/lib/commands/config/init.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/dataset/batch-design.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/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.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-restore.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/dataset/user-deleted-field-list.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/table-diff-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/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.d.ts +2 -0
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.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/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/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/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.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/domain-routing-sync.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/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/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.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 +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.d.ts +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +4 -0
- 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 +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +14 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +1 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +11 -10
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.d.ts +7 -1
- package/lib/core/kb-search-client.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/page/lr-smart-jsx.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.d.ts +5 -2
- 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/supported-flags.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/generated/official-routing.d.ts +15 -3
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +2 -2
- package/lib/generated/routing-contract.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.d.ts +5 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/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 -1
- package/skills/rabetbase/SKILL.md +31 -17
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +33 -11
- package/skills/rabetbase/guides/best-practices.md +1 -1
- package/skills/rabetbase/guides/conflict-detection.md +44 -92
- package/skills/rabetbase/guides/custom-page-flow-sdk.md +642 -0
- package/skills/rabetbase/guides/custom-page-flow-timeline-display.md +289 -0
- package/skills/rabetbase/guides/custom-page-workflow.md +12 -3
- package/skills/rabetbase/guides/sql-creation-workflow.md +44 -26
- package/skills/rabetbase/guides/sql-mybatis.md +18 -49
- package/skills/rabetbase/guides/typescript-sdk.md +18 -0
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +22 -6
- package/skills/rabetbase/knowledge/components.md +34 -28
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +6 -4
- package/skills/rabetbase/references/rabetbase-flow-commands.md +8 -4
- package/skills/rabetbase/references/rabetbase-flow-resources.md +3 -3
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +2 -0
- package/skills/rabetbase/references/rabetbase-init.md +7 -5
- package/skills/rabetbase/references/rabetbase-kb.md +14 -4
- package/skills/rabetbase/references/rabetbase-page-custom-detail.md +3 -1
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-sql-push.md +5 -0
- package/skills/rabetbase/references/rabetbase-sql-validate.md +12 -6
- package/skills/rabetbase.manifest.json +5 -3
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a342_0x59fc3e=a342_0x49ec;(function(_0x17bf94,_0xf6d866){const _0x3ba397=a342_0x49ec,_0x2bc761=_0x17bf94();while(!![]){try{const _0x3f2533=-parseInt(_0x3ba397(0xb5))/0x1*(-parseInt(_0x3ba397(0xbb))/0x2)+-parseInt(_0x3ba397(0xce))/0x3+parseInt(_0x3ba397(0xbc))/0x4*(-parseInt(_0x3ba397(0xcd))/0x5)+-parseInt(_0x3ba397(0xb4))/0x6*(-parseInt(_0x3ba397(0xd2))/0x7)+-parseInt(_0x3ba397(0xc7))/0x8+parseInt(_0x3ba397(0xc9))/0x9*(parseInt(_0x3ba397(0xbd))/0xa)+-parseInt(_0x3ba397(0xb8))/0xb;if(_0x3f2533===_0xf6d866)break;else _0x2bc761['push'](_0x2bc761['shift']());}catch(_0x3b6ac0){_0x2bc761['push'](_0x2bc761['shift']());}}}(a342_0x1f8d,0x64679));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';function a342_0x1f8d(){const _0x1f86e0=['content','747386eWTuJZ','40edAGSo','12770jBTpqp','entries','trimEnd','.lovrabet','extendContent','statusText','keys','\x0a\x0a>更新时间:','guides','skillTemplate','1478696ofVxsh','status','4419SKdQCF','lastUpdated','.md','join','65015iJEYlL','741966nzYeAQ','utf-8','title','path','22414szHQvA','replace','push','CDN\x20request\x20failed:\x20','application/json','1200TQAQMT','2hJfZCB','CDN\x20returned\x20invalid\x20data','object','11454817AejLGM','length'];a342_0x1f8d=function(){return _0x1f86e0;};return a342_0x1f8d();}import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x5bbb5a=getTemplateBaseUrl();return _0x5bbb5a+'/skills/guides.json';}const CACHE_DIR=join(homedir(),a342_0x59fc3e(0xc0),'cache');export async function fetchGuidesFromCDN(){const _0x31748f=a342_0x59fc3e,_0x250f3b=getGuidesCdnUrl(),_0x73c96f=await fetch(_0x250f3b,{'headers':{'Accept':_0x31748f(0xd6)}});if(!_0x73c96f['ok'])throw new Error(_0x31748f(0xd5)+_0x73c96f[_0x31748f(0xc8)]+'\x20'+_0x73c96f[_0x31748f(0xc2)]);const _0x3002f7=await _0x73c96f['json']();if(!_0x3002f7[_0x31748f(0xc5)]||typeof _0x3002f7['guides']!==_0x31748f(0xb7))throw new Error(_0x31748f(0xb6));return _0x3002f7;}function a342_0x49ec(_0xdc75e2,_0x2e9514){_0xdc75e2=_0xdc75e2-0xb4;const _0x1f8d07=a342_0x1f8d();let _0x49ec59=_0x1f8d07[_0xdc75e2];return _0x49ec59;}export function writeGuidesToProject(_0x54ab20,_0x35b897,_0x3c67c7='.lovrabet/skill/guides',_0x3f5d56){const _0xf72adf=a342_0x59fc3e,_0x136467=join(_0x35b897,_0x3c67c7);mkdirSync(_0x136467,{'recursive':!![]});for(const [_0x19a2b4,_0x529ca2]of Object[_0xf72adf(0xbe)](_0x54ab20['guides'])){let _0x3ab89d=_0x529ca2[_0xf72adf(0xba)];_0x529ca2[_0xf72adf(0xca)]&&(_0x3ab89d=appendUpdateTime(_0x3ab89d,_0x529ca2[_0xf72adf(0xca)])),writeFileSync(join(_0x136467,_0x19a2b4+_0xf72adf(0xcb)),_0x3ab89d,_0xf72adf(0xcf));}}export function appendUpdateTime(_0x3eea37,_0xe145dc){const _0x4d0089=a342_0x59fc3e;return _0x3eea37=_0x3eea37['replace'](/\n*>更新时间:.*$/m,''),_0x3eea37[_0x4d0089(0xbf)]()+(_0x4d0089(0xc4)+_0xe145dc);}export function getSkillTemplate(_0x2d5cb8){const _0x25d63b=a342_0x59fc3e;return _0x2d5cb8[_0x25d63b(0xc6)]?.[_0x25d63b(0xba)]||'';}export function appendExtendContents(_0x2670e5,_0x2b30fc,_0x47e9c9){const _0xadf26a=a342_0x59fc3e,_0x1d9737=[];for(const [,_0x57f275]of Object[_0xadf26a(0xbe)](_0x2b30fc['guides'])){_0x57f275[_0xadf26a(0xc1)]&&_0x1d9737[_0xadf26a(0xd4)](_0x57f275[_0xadf26a(0xc1)][_0xadf26a(0xbf)]());}if(_0x1d9737[_0xadf26a(0xb9)]===0x0)return _0x2670e5;return _0x2670e5[_0xadf26a(0xbf)]()+'\x0a\x0a'+_0x1d9737[_0xadf26a(0xcc)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x552753,_0xe5a482,_0x9ce807){const _0x3f8b4=a342_0x59fc3e,_0x2e5a2c=getSkillTemplate(_0x552753);if(!_0x2e5a2c)throw new Error('CDN\x20data\x20is\x20missing\x20skillTemplate');const _0x5f7576=dirname(_0xe5a482);mkdirSync(_0x5f7576,{'recursive':!![]});let _0x1827cd=_0x2e5a2c[_0x3f8b4(0xd3)](/\{\{IDE_NAME\}\}/g,_0x9ce807);_0x1827cd=appendExtendContents(_0x1827cd,_0x552753),_0x552753['skillTemplate'][_0x3f8b4(0xca)]&&(_0x1827cd=appendUpdateTime(_0x1827cd,_0x552753[_0x3f8b4(0xc6)][_0x3f8b4(0xca)])),writeFileSync(_0xe5a482,_0x1827cd,_0x3f8b4(0xcf));}export async function installGuides(_0x52296e){const _0x3e02c3=a342_0x59fc3e,_0x5c8005=await fetchGuidesFromCDN();return writeGuidesToProject(_0x5c8005,_0x52296e),Object[_0x3e02c3(0xc3)](_0x5c8005[_0x3e02c3(0xc5)])[_0x3e02c3(0xb9)];}export function getGuidesSummary(_0x14baee){const _0xd42590=a342_0x59fc3e;return Object[_0xd42590(0xbe)](_0x14baee[_0xd42590(0xc5)])['map'](([_0x1d6d68,_0x1c7b1d])=>({'key':_0x1d6d68,'title':_0x1c7b1d[_0xd42590(0xd0)],'path':_0x1c7b1d[_0xd42590(0xd1)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4ce9f1,_0x4810ba){const _0x5c3f4e=a343_0x5526,_0x2e7b06=_0x4ce9f1();while(!![]){try{const _0x2ddbea=parseInt(_0x5c3f4e(0x102))/0x1*(-parseInt(_0x5c3f4e(0x10a))/0x2)+parseInt(_0x5c3f4e(0xfc))/0x3+parseInt(_0x5c3f4e(0x108))/0x4*(parseInt(_0x5c3f4e(0xf3))/0x5)+parseInt(_0x5c3f4e(0xfe))/0x6+-parseInt(_0x5c3f4e(0xff))/0x7+parseInt(_0x5c3f4e(0x107))/0x8+parseInt(_0x5c3f4e(0x106))/0x9*(-parseInt(_0x5c3f4e(0xf8))/0xa);if(_0x2ddbea===_0x4810ba)break;else _0x2e7b06['push'](_0x2e7b06['shift']());}catch(_0x51df45){_0x2e7b06['push'](_0x2e7b06['shift']());}}}(a343_0xd830,0x96ddf));export async function httpRequest(_0xe824f2,_0x374572={}){const _0x28661f=a343_0x5526,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x374572;let _0x3155ea=null;for(let _0x193bca=0x0;_0x193bca<=retries;_0x193bca++){try{const _0x5a317e=new AbortController(),_0xa00595=setTimeout(()=>_0x5a317e['abort'](),timeout),_0x2a6bd2=await fetch(_0xe824f2,{'headers':headers,'signal':_0x5a317e['signal']});clearTimeout(_0xa00595);let _0x400a1a;const _0x543aa6=_0x2a6bd2[_0x28661f(0x103)][_0x28661f(0x109)](_0x28661f(0xfa));return _0x543aa6?.['includes'](_0x28661f(0x101))?_0x400a1a=await _0x2a6bd2[_0x28661f(0xf9)]():_0x400a1a=await _0x2a6bd2[_0x28661f(0xfd)](),{'ok':_0x2a6bd2['ok'],'status':_0x2a6bd2[_0x28661f(0xf1)],'statusText':_0x2a6bd2[_0x28661f(0x10b)],'data':_0x400a1a,'headers':_0x2a6bd2[_0x28661f(0x103)],'url':_0x2a6bd2['url'],'text':()=>_0x2a6bd2[_0x28661f(0xfd)]()};}catch(_0x44f193){_0x3155ea=_0x44f193 instanceof Error?_0x44f193:new Error(String(_0x44f193));if(_0x193bca===retries)break;if(shouldRetry(_0x44f193)){console[_0x28661f(0xf4)]('*\x20Request\x20failed;\x20retry\x20'+(_0x193bca+0x1)+_0x28661f(0xf2)+retryDelay+_0x28661f(0xfb)),await sleep(retryDelay);continue;}else break;}}throw _0x3155ea||new Error('Request\x20failed');}function shouldRetry(_0x338659){const _0x418cdc=a343_0x5526;if(_0x338659 instanceof Error){if(_0x338659[_0x418cdc(0x100)]===_0x418cdc(0xf7))return![];if(_0x338659[_0x418cdc(0x100)]==='TypeError'&&_0x338659[_0x418cdc(0x105)][_0x418cdc(0xf5)]('fetch'))return!![];if(_0x338659[_0x418cdc(0x105)][_0x418cdc(0xf5)](_0x418cdc(0xf6)))return!![];if(_0x338659[_0x418cdc(0x105)][_0x418cdc(0xf5)](_0x418cdc(0x104)))return![];}return![];}function a343_0xd830(){const _0x1f9a56=['2122092wxHEei','name','application/json','485hclTUB','headers','ENOTFOUND','message','38106XMmmBX','4014864jeJLZf','101072dsbuFx','get','2180XvjPvi','statusText','status','\x20in\x20','180IAVABB','log','includes','ECONNRESET','AbortError','2570mmvGPG','json','content-type','ms...','932526ejRjak','text','4893282FYKgNp'];a343_0xd830=function(){return _0x1f9a56;};return a343_0xd830();}function sleep(_0x182e6d){return new Promise(_0x31af14=>setTimeout(_0x31af14,_0x182e6d));}function a343_0x5526(_0x5d2068,_0x437ade){_0x5d2068=_0x5d2068-0xf1;const _0xd830cf=a343_0xd830();let _0x55266a=_0xd830cf[_0x5d2068];return _0x55266a;}export function validateUrl(_0x85f792){try{return new URL(_0x85f792),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a344_0x5af2(){const _0x355f51=['isTTY','4304670nClNJd','1518700QcXtAg','84ZjZhLL','107577ETsnZt','true','3534DWpEVQ','99930bfDhMw','nonInteractive','stdout','isRaw','296YFdWOM','263351HTfTFb','446628XyyGbh','setRawMode','584pqXxhy','stdin'];a344_0x5af2=function(){return _0x355f51;};return a344_0x5af2();}function a344_0x230a(_0x2de902,_0x37e391){_0x2de902=_0x2de902-0x1b5;const _0x5af2a0=a344_0x5af2();let _0x230ad6=_0x5af2a0[_0x2de902];return _0x230ad6;}(function(_0xb8ac4c,_0x59edd3){const _0x802087=a344_0x230a,_0x3640e3=_0xb8ac4c();while(!![]){try{const _0x1718ba=-parseInt(_0x802087(0x1c1))/0x1+parseInt(_0x802087(0x1c2))/0x2+parseInt(_0x802087(0x1bb))/0x3*(parseInt(_0x802087(0x1c4))/0x4)+parseInt(_0x802087(0x1b6))/0x5+parseInt(_0x802087(0x1bc))/0x6*(parseInt(_0x802087(0x1b8))/0x7)+-parseInt(_0x802087(0x1c0))/0x8*(parseInt(_0x802087(0x1b9))/0x9)+parseInt(_0x802087(0x1b7))/0xa;if(_0x1718ba===_0x59edd3)break;else _0x3640e3['push'](_0x3640e3['shift']());}catch(_0x1af62f){_0x3640e3['push'](_0x3640e3['shift']());}}}(a344_0x5af2,0xdc4d2));function env(_0x585a31){return process.env[`RABETBASE_${_0x585a31}`]||process.env[`LOVRABET_${_0x585a31}`]||undefined;}export function isNonInteractive(_0x1e77f0){const _0x2567e2=a344_0x230a;return!!(_0x1e77f0[_0x2567e2(0x1bd)]||_0x1e77f0['ci']||env('CI')===_0x2567e2(0x1ba)||process.env.CI===_0x2567e2(0x1ba)||!process[_0x2567e2(0x1be)][_0x2567e2(0x1b5)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1e676f=a344_0x230a;if(!process[_0x1e676f(0x1c5)][_0x1e676f(0x1b5)])return![];try{const _0x5cbfe6=process[_0x1e676f(0x1c5)][_0x1e676f(0x1bf)];return process[_0x1e676f(0x1c5)]['setRawMode'](!![]),process[_0x1e676f(0x1c5)][_0x1e676f(0x1c3)](_0x5cbfe6??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a345_0x4c45(_0x4fce0d,_0x527e01){_0x4fce0d=_0x4fce0d-0x182;const _0x1f4458=a345_0x1f44();let _0x4c453b=_0x1f4458[_0x4fce0d];return _0x4c453b;}const a345_0x15ce45=a345_0x4c45;(function(_0x5d5ba2,_0x1cd202){const _0x258115=a345_0x4c45,_0x3be73e=_0x5d5ba2();while(!![]){try{const _0x3f3b38=-parseInt(_0x258115(0x1b7))/0x1*(parseInt(_0x258115(0x191))/0x2)+parseInt(_0x258115(0x1a7))/0x3+parseInt(_0x258115(0x1ae))/0x4*(-parseInt(_0x258115(0x1b2))/0x5)+-parseInt(_0x258115(0x182))/0x6+parseInt(_0x258115(0x1a8))/0x7+parseInt(_0x258115(0x1af))/0x8*(parseInt(_0x258115(0x1a9))/0x9)+-parseInt(_0x258115(0x1b0))/0xa*(-parseInt(_0x258115(0x18d))/0xb);if(_0x3f3b38===_0x1cd202)break;else _0x3be73e['push'](_0x3be73e['shift']());}catch(_0x24ddad){_0x3be73e['push'](_0x3be73e['shift']());}}}(a345_0x1f44,0x1893a));import a345_0x19e985 from'winston';import a345_0x4f930d from'node:fs';import a345_0x1eabac from'node:path';class Logger{[a345_0x15ce45(0x1b3)];[a345_0x15ce45(0x1a5)];[a345_0x15ce45(0x19e)]='';constructor(){this['logFilePath']='';}[a345_0x15ce45(0x1b8)](_0x516f17){const _0x4b5045=a345_0x15ce45;this[_0x4b5045(0x19e)]=_0x516f17;}[a345_0x15ce45(0x183)](){const _0x569297=a345_0x15ce45,_0x560733=a345_0x1eabac[_0x569297(0x1b5)](this['logFilePath']);!a345_0x4f930d[_0x569297(0x19c)](_0x560733)&&a345_0x4f930d[_0x569297(0x186)](_0x560733,{'recursive':!![]});const _0x39cc6a=a345_0x19e985[_0x569297(0x190)][_0x569297(0x18e)](a345_0x19e985[_0x569297(0x190)]['timestamp'](),a345_0x19e985[_0x569297(0x190)][_0x569297(0x185)]({'stack':!![]}),a345_0x19e985[_0x569297(0x190)]['printf'](_0x2e9789=>{const _0x30de23=_0x569297,_0xf7b10d={'timestamp':_0x2e9789[_0x30de23(0x189)]||new Date()[_0x30de23(0x1a1)](),'level':_0x2e9789[_0x30de23(0x1aa)]||_0x30de23(0x1a0),'command':_0x2e9789['command']||'unknown','rawCommand':_0x2e9789['rawCommand']||this[_0x30de23(0x19e)]||undefined,'message':_0x2e9789[_0x30de23(0x197)]||'','duration':_0x2e9789['duration']||undefined,'details':_0x2e9789[_0x30de23(0x1b4)]||undefined};return JSON[_0x30de23(0x1b9)](_0xf7b10d);}));this[_0x569297(0x1b3)]=a345_0x19e985['createLogger']({'level':_0x569297(0x1a0),'format':_0x39cc6a,'transports':[new a345_0x19e985[(_0x569297(0x194))][(_0x569297(0x19a))]({'filename':this[_0x569297(0x1a5)],'level':'info'})],'silent':![]}),a345_0x19e985[_0x569297(0x188)]({'success':_0x569297(0x1ac),'error':_0x569297(0x18b),'warn':_0x569297(0x192),'info':_0x569297(0x199)});}[a345_0x15ce45(0x1b1)](_0x550155){const _0xa8f7c4=a345_0x15ce45;this[_0xa8f7c4(0x1a5)]=a345_0x1eabac[_0xa8f7c4(0x1a6)](_0x550155,'.lovrabet.log'),this[_0xa8f7c4(0x1b3)]&&this[_0xa8f7c4(0x1b3)][_0xa8f7c4(0x19b)](),this[_0xa8f7c4(0x183)]();}[a345_0x15ce45(0x1a0)](_0x4fcd39,_0xa01e98,_0x54fdd9){const _0x1d5517=a345_0x15ce45;if(!this[_0x1d5517(0x1a5)]||!this[_0x1d5517(0x1b3)])return;this[_0x1d5517(0x1b3)][_0x1d5517(0x1a0)](_0xa01e98,{'command':_0x4fcd39,'details':_0x54fdd9});}[a345_0x15ce45(0x18f)](_0x360699,_0x3822d2,_0x1192d2,_0x47a4ef){const _0x68e815=a345_0x15ce45;if(!this['logFilePath']||!this[_0x68e815(0x1b3)])return;this['winstonLogger']['log'](_0x68e815(0x1a0),_0x3822d2,{'level':'success','command':_0x360699,'duration':_0x1192d2,'details':_0x47a4ef});}[a345_0x15ce45(0x19f)](_0x2b27c4,_0x53b4bf,_0x2d4844){const _0x505b50=a345_0x15ce45;if(!this[_0x505b50(0x1a5)]||!this['winstonLogger'])return;this[_0x505b50(0x1b3)]['error'](_0x53b4bf,{'command':_0x2b27c4,'details':_0x2d4844});}[a345_0x15ce45(0x18a)](_0x363189,_0x4d8fdf,_0x188595){const _0x983d79=a345_0x15ce45;if(!this[_0x983d79(0x1a5)]||!this[_0x983d79(0x1b3)])return;this[_0x983d79(0x1b3)][_0x983d79(0x18a)](_0x4d8fdf,{'command':_0x363189,'details':_0x188595});}async[a345_0x15ce45(0x1b6)](_0x1970df,_0x5bfe17,_0xb3a0ff){const _0x58fe3c=a345_0x15ce45,_0x53edaa=Date[_0x58fe3c(0x18c)]();this[_0x58fe3c(0x1a0)](_0x1970df,'Starting:\x20'+_0x5bfe17);try{const _0x1184ec=await _0xb3a0ff(),_0x3ffd87=Date['now']()-_0x53edaa;return this['success'](_0x1970df,'Completed:\x20'+_0x5bfe17,_0x3ffd87),_0x1184ec;}catch(_0x4919c1){const _0x5d49e5=Date['now']()-_0x53edaa;this['error'](_0x1970df,_0x58fe3c(0x19d)+_0x5bfe17,{'error':_0x4919c1 instanceof Error?_0x4919c1[_0x58fe3c(0x197)]:String(_0x4919c1),'duration':_0x5d49e5});throw _0x4919c1;}}[a345_0x15ce45(0x1a4)](){const _0x98b28b=a345_0x15ce45;try{if(!a345_0x4f930d['existsSync'](this[_0x98b28b(0x1a5)]))return[];const _0x5f4f12=a345_0x4f930d['readFileSync'](this[_0x98b28b(0x1a5)],_0x98b28b(0x184));return _0x5f4f12[_0x98b28b(0x195)]('\x0a')[_0x98b28b(0x198)](_0x134657=>_0x134657[_0x98b28b(0x196)]())[_0x98b28b(0x1a2)](_0x14e3d3=>JSON[_0x98b28b(0x1ab)](_0x14e3d3));}catch(_0x1c6f51){return console['warn'](_0x98b28b(0x193),_0x1c6f51),[];}}[a345_0x15ce45(0x187)](){const _0x10873a=a345_0x15ce45;try{a345_0x4f930d['existsSync'](this[_0x10873a(0x1a5)])&&a345_0x4f930d[_0x10873a(0x1ad)](this[_0x10873a(0x1a5)],'','utf8');}catch(_0x3a0502){console['warn'](_0x10873a(0x1ba),_0x3a0502);}}[a345_0x15ce45(0x1a3)](){return this['winstonLogger'];}}function a345_0x1f44(){const _0x21f101=['errors','mkdirSync','clearLogs','addColors','timestamp','warn','red','now','4499ifXHoG','combine','success','format','2rtICob','yellow','Failed\x20to\x20read\x20logs:','transports','split','trim','message','filter','blue','File','clear','existsSync','Failed:\x20','currentRawCommand','error','info','toISOString','map','getWinstonInstance','readLogs','logFilePath','join','176592urWvmw','327054nRGrpM','20790wiQcfM','level','parse','green','writeFileSync','4fHiiwK','8adEBaD','5680bAnRcn','setLogPath','97730vvgrde','winstonLogger','details','dirname','logTask','23450HrdWRk','setRawCommand','stringify','Failed\x20to\x20clear\x20logs:','1179276AEBxRa','initWinstonLogger','utf8'];a345_0x1f44=function(){return _0x21f101;};return a345_0x1f44();}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x510ac5,_0x268292){const _0x3cb81c=a346_0x2465,_0x4a4451=_0x510ac5();while(!![]){try{const _0x4ef22a=-parseInt(_0x3cb81c(0x177))/0x1*(parseInt(_0x3cb81c(0x16e))/0x2)+-parseInt(_0x3cb81c(0x169))/0x3*(parseInt(_0x3cb81c(0x176))/0x4)+-parseInt(_0x3cb81c(0x173))/0x5+parseInt(_0x3cb81c(0x16c))/0x6+parseInt(_0x3cb81c(0x170))/0x7*(-parseInt(_0x3cb81c(0x172))/0x8)+parseInt(_0x3cb81c(0x16a))/0x9+-parseInt(_0x3cb81c(0x178))/0xa*(-parseInt(_0x3cb81c(0x171))/0xb);if(_0x4ef22a===_0x268292)break;else _0x4a4451['push'](_0x4a4451['shift']());}catch(_0x221d28){_0x4a4451['push'](_0x4a4451['shift']());}}}(a346_0x2fd1,0xd2a96));function a346_0x2fd1(){const _0x2eca80=['5023555BXDhuh','isArray','object','42404iQeiPT','332085mpNbnw','124750DostIQ','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','78MkugOT','971883TOadFW','validation','8229018pDxrCY','parse','8eckzpF','Invalid\x20JSON\x20for\x20--params:\x20','4743151AnOilJ','2354RRFsxD','8SUpvVF'];a346_0x2fd1=function(){return _0x2eca80;};return a346_0x2fd1();}function a346_0x2465(_0x8bf29d,_0x3c88eb){_0x8bf29d=_0x8bf29d-0x169;const _0x2fd126=a346_0x2fd1();let _0x24657e=_0x2fd126[_0x8bf29d];return _0x24657e;}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x54a3ad){const _0x560830=a346_0x2465;if(!_0x54a3ad)return undefined;let _0x2659ea;try{_0x2659ea=JSON[_0x560830(0x16d)](_0x54a3ad);}catch{throw CliErrors[_0x560830(0x16b)](_0x560830(0x16f)+_0x54a3ad);}if(!_0x2659ea||typeof _0x2659ea!==_0x560830(0x175)||Array[_0x560830(0x174)](_0x2659ea))throw CliErrors[_0x560830(0x16b)]('--params\x20must\x20be\x20a\x20JSON\x20object',_0x560830(0x179));return _0x2659ea;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a347_0x3aa4b7=a347_0x57f4;(function(_0x564fe1,_0x32472d){const _0x5ab6e9=a347_0x57f4,_0x3ad476=_0x564fe1();while(!![]){try{const _0x31c39f=-parseInt(_0x5ab6e9(0xee))/0x1+parseInt(_0x5ab6e9(0xed))/0x2*(-parseInt(_0x5ab6e9(0xe8))/0x3)+parseInt(_0x5ab6e9(0xe6))/0x4*(-parseInt(_0x5ab6e9(0xf1))/0x5)+parseInt(_0x5ab6e9(0xe9))/0x6*(parseInt(_0x5ab6e9(0xf2))/0x7)+parseInt(_0x5ab6e9(0xe5))/0x8*(-parseInt(_0x5ab6e9(0xeb))/0x9)+parseInt(_0x5ab6e9(0xea))/0xa*(parseInt(_0x5ab6e9(0xf0))/0xb)+parseInt(_0x5ab6e9(0xef))/0xc;if(_0x31c39f===_0x32472d)break;else _0x3ad476['push'](_0x3ad476['shift']());}catch(_0x4105a1){_0x3ad476['push'](_0x3ad476['shift']());}}}(a347_0x5298,0xc08a9));function a347_0x57f4(_0x4cf931,_0x1d5824){_0x4cf931=_0x4cf931-0xe5;const _0x5298e9=a347_0x5298();let _0x57f46c=_0x5298e9[_0x4cf931];return _0x57f46c;}export const isWindows=process[a347_0x3aa4b7(0xf3)]===a347_0x3aa4b7(0xe7);function a347_0x5298(){const _0x4e4d42=['63Ipwkkd','18KKtvNK','3377330NTVUle','9HHGySF','.cmd','99798qPijhV','1497970hihncT','53720436UaTEJy','11kZJccV','7422645GSsUAp','3520538rNINHc','platform','12033688MhGOXD','4tKzIdC','win32'];a347_0x5298=function(){return _0x4e4d42;};return a347_0x5298();}export function resolveNpmBin(_0x2acf25){const _0x5713e8=a347_0x3aa4b7;return isWindows?_0x2acf25+_0x5713e8(0xec):_0x2acf25;}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x35fa7f){return new Promise(_0x849aa0=>setTimeout(_0x849aa0,_0x35fa7f));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a349_0x2be2e9=a349_0x5e2f;(function(_0x10c0fb,_0x69dd42){const _0x406cee=a349_0x5e2f,_0x5ba585=_0x10c0fb();while(!![]){try{const _0x5072b1=-parseInt(_0x406cee(0x120))/0x1+-parseInt(_0x406cee(0x13b))/0x2*(-parseInt(_0x406cee(0x11b))/0x3)+-parseInt(_0x406cee(0x150))/0x4+-parseInt(_0x406cee(0x123))/0x5+-parseInt(_0x406cee(0x152))/0x6*(-parseInt(_0x406cee(0x15c))/0x7)+parseInt(_0x406cee(0x140))/0x8*(-parseInt(_0x406cee(0x126))/0x9)+parseInt(_0x406cee(0x142))/0xa*(parseInt(_0x406cee(0x14a))/0xb);if(_0x5072b1===_0x69dd42)break;else _0x5ba585['push'](_0x5ba585['shift']());}catch(_0x4287e3){_0x5ba585['push'](_0x5ba585['shift']());}}}(a349_0x324d,0xb5101));function a349_0x324d(){const _0x4d89c5=['tableName:\x20\x22','processFile','replace','YourModel','includes','Starting\x20template\x20content\x20replacement','replaceApiContent','toLowerCase','processTemplate','map','.md','getDate','info','replaceContent','Template\x20content\x20replacement\x20completed','436936lXSzKl','sdk-config','datasetCode','endsWith','name','2136KYTIlj','join','5820qoQnlr','\x20},','mkdir','toUpperCase','tableName','split','now','extname','49269fFKOWl','charAt','writeFile','toISOString','.json','padStart','5697624mbfFEU','message','6bgGaCM','pad','processDirectory','promises','getSeconds','utf8','.tsx','template','getMinutes','getFullYear','1113651SsaXNg','alias','isFile','6AuizkX','Template\x20content\x20replacement\x20failed','default','alias:\x20\x22','formatLocalTimestamp','564235mykLLZ','LOVRABET','toComponentName','190620ijCqWd','getMonth','.scss','14643dkrVtD','pop','push','.tpl','name:\x20\x22','slice'];a349_0x324d=function(){return _0x4d89c5;};return a349_0x324d();}import a349_0x47312f from'node:fs';import a349_0x12b08a from'node:path';import{logger}from'../utils/logger.js';function a349_0x5e2f(_0x594a67,_0x1514dd){_0x594a67=_0x594a67-0x11a;const _0x324d11=a349_0x324d();let _0x5e2f75=_0x324d11[_0x594a67];return _0x5e2f75;}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a349_0x2be2e9(0x153)](_0x60f347){const _0x30be1e=a349_0x2be2e9;return String(_0x60f347)[_0x30be1e(0x14f)](0x2,'0');}static[a349_0x2be2e9(0x11f)](_0x2eff89){const _0x9bddd1=a349_0x2be2e9,_0x134bd8=_0x2eff89[_0x9bddd1(0x15b)](),_0x3941ce=this['pad'](_0x2eff89[_0x9bddd1(0x124)]()+0x1),_0x4741b1=this[_0x9bddd1(0x153)](_0x2eff89[_0x9bddd1(0x137)]()),_0x3d36c9=this['pad'](_0x2eff89['getHours']()),_0x1430a4=this[_0x9bddd1(0x153)](_0x2eff89[_0x9bddd1(0x15a)]()),_0x3dda32=this[_0x9bddd1(0x153)](_0x2eff89[_0x9bddd1(0x156)]());return{'createdAt':_0x134bd8+'-'+_0x3941ce+'-'+_0x4741b1+'\x20'+_0x3d36c9+':'+_0x1430a4+':'+_0x3dda32,'createdDate':_0x134bd8+'-'+_0x3941ce+'-'+_0x4741b1,'createdTime':_0x3d36c9+':'+_0x1430a4+':'+_0x3dda32};}static[a349_0x2be2e9(0x122)](_0x45735b){const _0x3b8fa0=a349_0x2be2e9,_0x50a9ee=_0x45735b['split']('/')[_0x3b8fa0(0x127)]()||_0x45735b;return _0x50a9ee[_0x3b8fa0(0x147)]('-')['map'](_0x464705=>_0x464705['charAt'](0x0)[_0x3b8fa0(0x145)]()+_0x464705[_0x3b8fa0(0x12b)](0x1)['toLowerCase']())[_0x3b8fa0(0x141)]('');}static['toDisplayTitle'](_0x497811){const _0x22ac60=a349_0x2be2e9,_0x2e42ba=_0x497811[_0x22ac60(0x147)]('/')[_0x22ac60(0x127)]()||_0x497811;return _0x2e42ba[_0x22ac60(0x147)]('-')[_0x22ac60(0x135)](_0x3ec5f2=>_0x3ec5f2[_0x22ac60(0x14b)](0x0)['toUpperCase']()+_0x3ec5f2[_0x22ac60(0x12b)](0x1)[_0x22ac60(0x133)]())['join']('\x20');}static[a349_0x2be2e9(0x139)](_0x23a628,_0x4f4b76,_0x1da067){const _0xd5854f=a349_0x2be2e9,_0x580071=this[_0xd5854f(0x122)](_0x4f4b76),_0x27e18a=this['toDisplayTitle'](_0x4f4b76),{createdAt:_0x2ad7f1,createdDate:_0x2d73cb,createdTime:_0x416a8e}=this[_0xd5854f(0x11f)](new Date());let _0x51d451=_0x23a628[_0xd5854f(0x12e)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x580071)[_0xd5854f(0x12e)](/\{DisplayTitle\}/g,_0x27e18a)['replace'](/\{PageName\}/g,_0x4f4b76)[_0xd5854f(0x12e)](/\{TemplateName\}/g,_0x1da067)[_0xd5854f(0x12e)](/\{CreatedAt\}/g,_0x2ad7f1)[_0xd5854f(0x12e)](/\{CreatedDate\}/g,_0x2d73cb)[_0xd5854f(0x12e)](/\{CreatedTime\}/g,_0x416a8e);return _0x51d451;}static[a349_0x2be2e9(0x132)](_0x918a48,_0x2b32f9,_0x495efc,_0x1e0b8a,_0x2d9869,_0x2df9e8,_0x2beeef,_0x16f3e3,_0x57511d){const _0x55177c=a349_0x2be2e9,_0x54085e=new Date(),_0x1f4d85=_0x54085e[_0x55177c(0x14d)](),_0x5a7ec6=_0x495efc[_0x55177c(0x135)](_0x2f4038=>{const _0x184aee=_0x55177c,_0x465aeb=['datasetCode:\x20\x22'+_0x2f4038[_0x184aee(0x13d)]+'\x22',_0x184aee(0x12c)+_0x2f4038[_0x184aee(0x146)]+'\x22',_0x184aee(0x12a)+_0x2f4038[_0x184aee(0x13f)]+'\x22'];return _0x2f4038[_0x184aee(0x15d)]&&_0x465aeb[_0x184aee(0x128)](_0x184aee(0x11e)+_0x2f4038['alias']+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x465aeb[_0x184aee(0x141)](',\x20')+_0x184aee(0x143);})[_0x55177c(0x141)](''),_0x1f954f=_0x1e0b8a||_0x495efc[0x0]?.[_0x55177c(0x15d)]||_0x55177c(0x12f);let _0x5f34f3=_0x918a48['replace'](/\{AppCode\}/g,_0x2b32f9)[_0x55177c(0x12e)](/\{ModelConfigs\}/g,_0x5a7ec6)[_0x55177c(0x12e)](/\{ExampleModelName\}/g,_0x1f954f)['replace'](/\{ApiFileName\}/g,_0x2d9869||'api')[_0x55177c(0x12e)](/\{ConfigName\}/g,_0x2df9e8||_0x55177c(0x11d))[_0x55177c(0x12e)](/\{ClientConfigParam\}/g,_0x2beeef||'')[_0x55177c(0x12e)](/\{SdkConfigFileName\}/g,_0x57511d||_0x55177c(0x13c))[_0x55177c(0x12e)](/\{VarPrefix\}/g,_0x16f3e3||_0x55177c(0x121))[_0x55177c(0x12e)](/\{CreatedAt\}/g,_0x1f4d85);return _0x5f34f3;}static async[a349_0x2be2e9(0x134)](_0x2043d9,_0x1f0d4f,_0x4ca999,_0x2bbbeb,_0x29223f=!![]){const _0x573f0c=a349_0x2be2e9,_0x30b6e2=Date[_0x573f0c(0x148)]();try{_0x29223f&&logger[_0x573f0c(0x138)](_0x573f0c(0x159),_0x573f0c(0x131),{'templatePath':_0x2043d9,'targetPath':_0x1f0d4f,'pageName':_0x4ca999,'templateName':_0x2bbbeb});await a349_0x47312f[_0x573f0c(0x155)][_0x573f0c(0x144)](_0x1f0d4f,{'recursive':!![]}),await this[_0x573f0c(0x154)](_0x2043d9,_0x1f0d4f,_0x4ca999,_0x2bbbeb);if(_0x29223f){const _0x38eeed=Date[_0x573f0c(0x148)]()-_0x30b6e2;logger['success'](_0x573f0c(0x159),_0x573f0c(0x13a),_0x38eeed,{'pageName':_0x4ca999,'templateName':_0x2bbbeb});}}catch(_0x196498){if(_0x29223f){const _0x263dee=Date[_0x573f0c(0x148)]()-_0x30b6e2;logger['error'](_0x573f0c(0x159),_0x573f0c(0x11c),{'templatePath':_0x2043d9,'targetPath':_0x1f0d4f,'pageName':_0x4ca999,'templateName':_0x2bbbeb,'error':_0x196498 instanceof Error?_0x196498[_0x573f0c(0x151)]:String(_0x196498),'duration':_0x263dee});}throw _0x196498;}}static async[a349_0x2be2e9(0x154)](_0x806bec,_0x3e0ff5,_0x3f17f3,_0xcdc4bc){const _0x2184a9=a349_0x2be2e9,_0x311d3a=await a349_0x47312f[_0x2184a9(0x155)]['readdir'](_0x806bec,{'withFileTypes':!![]});for(const _0x467daf of _0x311d3a){const _0xfabc69=a349_0x12b08a['join'](_0x806bec,_0x467daf[_0x2184a9(0x13f)]);let _0x1335d7=a349_0x12b08a[_0x2184a9(0x141)](_0x3e0ff5,_0x467daf[_0x2184a9(0x13f)]);_0x467daf[_0x2184a9(0x13f)]['endsWith'](_0x2184a9(0x129))&&(_0x1335d7=a349_0x12b08a['join'](_0x3e0ff5,_0x467daf[_0x2184a9(0x13f)][_0x2184a9(0x12e)](/\.tpl$/,'')));if(_0x467daf['isDirectory']())await a349_0x47312f[_0x2184a9(0x155)][_0x2184a9(0x144)](_0x1335d7,{'recursive':!![]}),await this[_0x2184a9(0x154)](_0xfabc69,_0x1335d7,_0x3f17f3,_0xcdc4bc);else _0x467daf[_0x2184a9(0x11a)]()&&await this['processFile'](_0xfabc69,_0x1335d7,_0x3f17f3,_0xcdc4bc);}}static async[a349_0x2be2e9(0x12d)](_0x351922,_0x4b9d5d,_0x4a585a,_0x5b14ec){const _0x27d5d4=a349_0x2be2e9,_0x2a4483=a349_0x12b08a[_0x27d5d4(0x149)](_0x351922)['toLowerCase']();_0x351922[_0x27d5d4(0x13e)](_0x27d5d4(0x129))&&(_0x4b9d5d=_0x4b9d5d['replace'](/\.tpl$/,''));const _0x1c090b=[_0x27d5d4(0x158),'.ts','.jsx','.js',_0x27d5d4(0x14e),_0x27d5d4(0x136),'.css',_0x27d5d4(0x125),_0x27d5d4(0x129)];if(_0x1c090b[_0x27d5d4(0x130)](_0x2a4483)||_0x351922[_0x27d5d4(0x13e)](_0x27d5d4(0x129))){const _0x8ac1bd=await a349_0x47312f[_0x27d5d4(0x155)]['readFile'](_0x351922,_0x27d5d4(0x157)),_0x1c3c5c=this[_0x27d5d4(0x139)](_0x8ac1bd,_0x4a585a,_0x5b14ec);await a349_0x47312f[_0x27d5d4(0x155)][_0x27d5d4(0x14c)](_0x4b9d5d,_0x1c3c5c,_0x27d5d4(0x157));}else await a349_0x47312f[_0x27d5d4(0x155)]['copyFile'](_0x351922,_0x4b9d5d);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4054b6,_0x23d119){const _0x2f4ab5=a350_0xacf3,_0x7239af=_0x4054b6();while(!![]){try{const _0x2675fe=-parseInt(_0x2f4ab5(0x189))/0x1+parseInt(_0x2f4ab5(0x17e))/0x2+-parseInt(_0x2f4ab5(0x185))/0x3+parseInt(_0x2f4ab5(0x17d))/0x4*(-parseInt(_0x2f4ab5(0x180))/0x5)+parseInt(_0x2f4ab5(0x186))/0x6*(parseInt(_0x2f4ab5(0x18c))/0x7)+-parseInt(_0x2f4ab5(0x18a))/0x8*(parseInt(_0x2f4ab5(0x191))/0x9)+parseInt(_0x2f4ab5(0x18d))/0xa;if(_0x2675fe===_0x23d119)break;else _0x7239af['push'](_0x7239af['shift']());}catch(_0x4aea8e){_0x7239af['push'](_0x7239af['shift']());}}}(a350_0x4bd3,0x379ab));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a350_0x362e20 from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';function a350_0xacf3(_0x24f712,_0x9ee825){_0x24f712=_0x24f712-0x177;const _0x4bd30d=a350_0x4bd3();let _0xacf30b=_0x4bd30d[_0x24f712];return _0xacf30b;}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 _0x1ddbd2=a350_0xacf3,_0x53cdff=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x1ddbd2(0x18f)]()['toLowerCase']();return _0x53cdff==='1'||_0x53cdff===_0x1ddbd2(0x184)||_0x53cdff===_0x1ddbd2(0x17f);}function a350_0x4bd3(){const _0x22ae39=['yes','110WYyoER','now','/v/','.cache','true','32763fUCAgo','787422VImfFL','stringify','latest','329233oAESah','2766488pbjDNF','parse','7qZXCan','11660690Jtlqlk','\x20update','trim','valid','9IKswBR','utf8','gte','lastNotifiedAt','number','lastNotifiedVersion',',\x20run:\x20','checkedAt','https://www.npmjs.com/package/','update-check.json','stableVersion','82332TRWMGc','138480nOsNRx'];a350_0x4bd3=function(){return _0x22ae39;};return a350_0x4bd3();}function cacheRoot(){const _0x3f6805=a350_0xacf3;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x3f6805(0x183));}export function getUpdateNoticeCachePath(){const _0x454cf1=a350_0xacf3;return join(cacheRoot(),'rabetbase-cli',_0x454cf1(0x17b));}async function readUpdateNoticeCache(){const _0x5784ac=a350_0xacf3;try{const _0x5190a8=await readFile(getUpdateNoticeCachePath(),_0x5784ac(0x192)),_0x421cdd=JSON[_0x5784ac(0x18b)](_0x5190a8);if(!_0x421cdd||typeof _0x421cdd!=='object')return{};return _0x421cdd;}catch{return{};}}async function writeUpdateNoticeCache(_0x2660df){const _0x8b991=a350_0xacf3;try{const _0x27803f=getUpdateNoticeCachePath();await mkdir(dirname(_0x27803f),{'recursive':!![]}),await writeFile(_0x27803f,JSON[_0x8b991(0x187)](_0x2660df,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x4580bb,_0x1d0728){const _0x434ab5=a350_0xacf3;return typeof _0x4580bb[_0x434ab5(0x179)]===_0x434ab5(0x195)&&_0x1d0728-_0x4580bb['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x526e8b,_0x4c2bbf,_0x3152d9){const _0x21710b=a350_0xacf3;return _0x526e8b[_0x21710b(0x177)]===_0x4c2bbf&&typeof _0x526e8b[_0x21710b(0x194)]===_0x21710b(0x195)&&_0x3152d9-_0x526e8b[_0x21710b(0x194)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0xa5a487){const _0x20ddcd=a350_0xacf3;return _0x20ddcd(0x17a)+NPM_PACKAGE_NAME+_0x20ddcd(0x182)+_0xa5a487;}export async function resolveLatestUpdateNotice(){const _0x5a3ac3=a350_0xacf3;if(isUpdateNoticeDisabled())return null;try{const _0x38193b=Date[_0x5a3ac3(0x181)](),_0x233f7c=getCliVersion(),_0x3c0690=await readUpdateNoticeCache();let _0x2d8fae=isFreshCheck(_0x3c0690,_0x38193b)?_0x3c0690[_0x5a3ac3(0x188)]?.[_0x5a3ac3(0x18f)]():undefined;if(!_0x2d8fae&&!isFreshCheck(_0x3c0690,_0x38193b)){const _0x1fbd21=await getCliVersionPolicy();_0x2d8fae=_0x1fbd21?.[_0x5a3ac3(0x17c)]?.[_0x5a3ac3(0x18f)]()||undefined,await writeUpdateNoticeCache({..._0x3c0690,'checkedAt':_0x38193b,'latest':_0x2d8fae,'failed':!_0x2d8fae});}if(!_0x2d8fae||!a350_0x362e20[_0x5a3ac3(0x190)](_0x233f7c)||!a350_0x362e20[_0x5a3ac3(0x190)](_0x2d8fae))return null;if(a350_0x362e20[_0x5a3ac3(0x193)](_0x233f7c,_0x2d8fae))return null;if(isRecentlyNotified(_0x3c0690,_0x2d8fae,_0x38193b))return null;const _0x58a737=CLI_BIN_NAME+_0x5a3ac3(0x18e);return await writeUpdateNoticeCache({..._0x3c0690,'checkedAt':isFreshCheck(_0x3c0690,_0x38193b)?_0x3c0690[_0x5a3ac3(0x179)]:_0x38193b,'latest':_0x2d8fae,'failed':![],'lastNotifiedVersion':_0x2d8fae,'lastNotifiedAt':_0x38193b}),{'command':_0x58a737,'current':_0x233f7c,'latest':_0x2d8fae,'url':buildNpmVersionUrl(_0x2d8fae),'message':CLI_BIN_NAME+'\x20'+_0x2d8fae+'\x20available,\x20current\x20'+_0x233f7c+_0x5a3ac3(0x178)+_0x58a737};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a351_0x4bc4(_0x5aa784,_0xd3fcfe){_0x5aa784=_0x5aa784-0x77;var _0x5602ed=a351_0x5602();var _0x4bc430=_0x5602ed[_0x5aa784];return _0x4bc430;}(function(_0x3f9429,_0x1aefca){var _0x44a534=a351_0x4bc4,_0x45d260=_0x3f9429();while(!![]){try{var _0x3dd79c=parseInt(_0x44a534(0x7d))/0x1+parseInt(_0x44a534(0x77))/0x2+parseInt(_0x44a534(0x7e))/0x3+-parseInt(_0x44a534(0x78))/0x4+-parseInt(_0x44a534(0x79))/0x5*(parseInt(_0x44a534(0x7c))/0x6)+-parseInt(_0x44a534(0x7f))/0x7*(-parseInt(_0x44a534(0x7a))/0x8)+parseInt(_0x44a534(0x7b))/0x9;if(_0x3dd79c===_0x1aefca)break;else _0x45d260['push'](_0x45d260['shift']());}catch(_0x533ba4){_0x45d260['push'](_0x45d260['shift']());}}}(a351_0x5602,0x714d6));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a351_0x5602(){var _0x46342a=['550416zKTrbB','45905KhzDAK','24dUnJPX','140319waJOuh','222oejjhe','16712onXOII','998361sCQrUP','697879kQzeUk','554412QUXnQZ'];a351_0x5602=function(){return _0x46342a;};return a351_0x5602();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a352_0x5b51(_0x4ddcc6,_0x1ddaf1){_0x4ddcc6=_0x4ddcc6-0xa9;var _0x2bbd3f=a352_0x2bbd();var _0x5b5146=_0x2bbd3f[_0x4ddcc6];return _0x5b5146;}(function(_0x318263,_0x3ec36c){var _0x3e808e=a352_0x5b51,_0x208672=_0x318263();while(!![]){try{var _0xc5da6e=-parseInt(_0x3e808e(0xad))/0x1*(-parseInt(_0x3e808e(0xaa))/0x2)+-parseInt(_0x3e808e(0xb1))/0x3+-parseInt(_0x3e808e(0xb0))/0x4+-parseInt(_0x3e808e(0xb3))/0x5*(-parseInt(_0x3e808e(0xaf))/0x6)+parseInt(_0x3e808e(0xae))/0x7+parseInt(_0x3e808e(0xb2))/0x8*(parseInt(_0x3e808e(0xa9))/0x9)+parseInt(_0x3e808e(0xab))/0xa*(parseInt(_0x3e808e(0xac))/0xb);if(_0xc5da6e===_0x3ec36c)break;else _0x208672['push'](_0x208672['shift']());}catch(_0x25f731){_0x208672['push'](_0x208672['shift']());}}}(a352_0x2bbd,0xbaaa5));function a352_0x2bbd(){var _0x237b15=['6008360Qdlbvz','4566240mYvszf','6840XmaDue','70uXnZbe','621WHSBtE','322402CwToPC','8487350rWrzSH','22saSLAn','2myZHAX','9446080bEXdsb','154476xyUquu'];a352_0x2bbd=function(){return _0x237b15;};return a352_0x2bbd();}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x5b13a9,_0x2e925d){setActiveCookie(_0x5b13a9);try{return await _0x2e925d();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a353_0x49d9(_0xbc95f4,_0x56e8ce){_0xbc95f4=_0xbc95f4-0x1dc;var _0x37c4bc=a353_0x37c4();var _0x49d921=_0x37c4bc[_0xbc95f4];return _0x49d921;}(function(_0x51170d,_0x52679f){var _0x1ba051=a353_0x49d9,_0x208679=_0x51170d();while(!![]){try{var _0x5290dc=parseInt(_0x1ba051(0x1e0))/0x1*(-parseInt(_0x1ba051(0x1e5))/0x2)+-parseInt(_0x1ba051(0x1df))/0x3+parseInt(_0x1ba051(0x1e3))/0x4*(-parseInt(_0x1ba051(0x1dd))/0x5)+parseInt(_0x1ba051(0x1e7))/0x6*(parseInt(_0x1ba051(0x1e2))/0x7)+parseInt(_0x1ba051(0x1e4))/0x8*(-parseInt(_0x1ba051(0x1dc))/0x9)+parseInt(_0x1ba051(0x1de))/0xa+parseInt(_0x1ba051(0x1e6))/0xb;if(_0x5290dc===_0x52679f)break;else _0x208679['push'](_0x208679['shift']());}catch(_0x574b7c){_0x208679['push'](_0x208679['shift']());}}}(a353_0x37c4,0xb712c));function a353_0x37c4(){var _0x48e562=['109BBxFLZ','stderr','82369NtFsoJ','44kSTpsK','1179552IAhmDY','13078ZuDIiL','15688838eGGLvs','342wMsKXf','18ZpaupZ','56945lfclcU','10916430gMfdSt','3917502fAtmoN'];a353_0x37c4=function(){return _0x48e562;};return a353_0x37c4();}export function writeCliSideChannelLine(_0x3c5d21){var _0x1872d4=a353_0x49d9;process[_0x1872d4(0x1e1)]['write'](_0x3c5d21+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4-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": [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase
|
|
3
|
-
version: 2.5.
|
|
4
|
-
description: "Use for Lovrabet development work through the rabetbase CLI: create or bind projects (including creating an AppCode project in the current folder), pull Dataset/API facts and maintain SDK clients, or manage datasets, Instant API access policies, database connections, pages, SQL, Backend Functions, menus, notifications, knowledge bases and kb search, Agent Context Rules, roles, files, OCR, deployment metadata, platform issues, and 钉钉沙箱账号绑定. Trigger when the user mentions rabetbase, Lovrabet development, AppCode, Dataset, Instant API allow/deny/route policy, project creation, api pull/codegen, dblink, page, SQL, BFF, menu, notification, knowledge base, kb search, Agent Context Rules, RULES.md, DATABASE.md, rule list/get/set, role, file/OCR, or related development workflows."
|
|
3
|
+
version: 2.5.4-beta.2
|
|
4
|
+
description: "Use for Lovrabet development work through the rabetbase CLI: create or bind projects (including creating an AppCode project in the current folder), pull Dataset/API facts and maintain SDK clients, or manage datasets, Instant API access policies, database connections, pages, SQL, Backend Functions, approval flows and workflows, menus, notifications, knowledge bases and kb search, Agent Context Rules, roles, files, OCR, deployment metadata, platform issues, and 钉钉沙箱账号绑定. Trigger when the user mentions rabetbase, Lovrabet development, AppCode, Dataset, Instant API allow/deny/route policy, project creation, api pull/codegen, dblink, page, SQL, BFF, creating or designing an approval flow, workflow, business process, or multi-step approval, menu, notification, knowledge base, kb search, Agent Context Rules, RULES.md, DATABASE.md, rule list/get/set, role, file/OCR, or related development workflows."
|
|
5
5
|
metadata:
|
|
6
6
|
requires:
|
|
7
7
|
bins: ["rabetbase"]
|
|
@@ -16,6 +16,16 @@ metadata:
|
|
|
16
16
|
> **命名约定:** 统一使用 `rabetbase <service> <command> [flags]` 格式。
|
|
17
17
|
> **输出格式:** AI Agent 需要结构化输出时,**优先 `--format compress`**(与 `json` 相同信封,单行紧凑、省 token);需要人类可读缩进时用 **`--format json`**。可在 **`json` / `compress`** 上叠加 **`--jq '<expr>'`**(对最终打印的整条 JSON 做 jq;二进制查找顺序为 **`JQ_PATH` → CLI 内置 sidecar jq → `PATH` 上的 jq**,通常无需单独安装系统 jq)。不确定当前 CLI 有哪些子命令或 flags 时,先跑 **`rabetbase schema`**(与 `--help` 同源的机器可读契约,无需登录)。
|
|
18
18
|
|
|
19
|
+
## AI First 执行原则
|
|
20
|
+
|
|
21
|
+
Agent 负责把已授权的目标推进到可验证的结果:主动获取事实、选择实现、修复错误、复验并交付。人负责关键业务决策与取舍。
|
|
22
|
+
|
|
23
|
+
- **先查证,再询问**:优先读取需求、项目约定、元数据、调用方和现有测试;能自行取得的信息由 Agent 获取,不把排查、方案准备或常规修复交给用户。
|
|
24
|
+
- **在授权内连续执行**:对事实明确、符合既有约定的工程选择自主处理;已有授权覆盖的步骤无需重复确认。预览由 Agent 核对目标与影响,满足命令前置要求后继续执行。
|
|
25
|
+
- **只提交必要决策**:业务语义仍有歧义、需要扩大授权或影响范围、存在未授权的成本或不可逆后果时,先完成可独立推进的准备,再给出具体方案、推荐项、影响和最小待决问题;不能把全部工作交回用户。
|
|
26
|
+
- **按原因恢复并验证**:已确认的实现错误主动修复;事实不足先补证;结果未知先回读;没有新证据时停止无效重试,继续不受阻碍的工作。交付区分已完成、实际验证、未验证项与具体阻碍。
|
|
27
|
+
- **尊重执行边界**:遵守实际命令契约、平台权限及明确的人工确认要求;用户取消后停止该操作,不用 `--yes`、修改风险配置或更换接口绕过取消或限制。授权、检查通过与执行成功分别判断。
|
|
28
|
+
|
|
19
29
|
## 前置条件
|
|
20
30
|
|
|
21
31
|
1. **连接配置与认证分离**:首次使用先执行 `rabetbase config init`。交互模式选择当前已开放国家/地区;非交互模式显式传 `--region`,未传时使用默认节点。企业独立部署优先导入 `lovrabet-routing/v1` 清单,也兼容旧扁平 Domain 文件和对应 `--*-domain` flags。`config init` 默认重建当前项目节点/Domain 配置,显式 `--global` 时写全局;保留 Cookie、AccessKey、format、locale 和应用绑定,但不登录、不绑定项目,随后再执行 `rabetbase auth login`
|
|
@@ -27,7 +37,7 @@ metadata:
|
|
|
27
37
|
7. **本地配置视图**:当你要确认当前项目或全局已经登记了哪些应用、默认应用是谁时,用 `rabetbase app list`。`rabetbase app` 本身只显示帮助,不等价于 `app list`
|
|
28
38
|
8. **人员目录查询**:查询某租户的人员用 `rabetbase tenant members-list --tenant-code <code>`;查询某应用的人员及其角色归属用 `rabetbase app members-list --appcode <code>`。两者均为只读全量查询,不提供分页、模糊搜索或写入能力。
|
|
29
39
|
9. **本地 SQL / Backend Function 目录**:新建或长期维护的源文件应落在 CLI 与 `bff status` / `sql pull` 一致的路径,避免写在 `src/`、`queries/` 等随意目录后再迁移。
|
|
30
|
-
- **SQL**:项目根 **`.rabetbase/sql/<appCode>/<dbName|db-<id>>/<sqlCode>_<sqlName>.sql|xml
|
|
40
|
+
- **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
41
|
- **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
42
|
- **Instant API Policy**:**`.rabetbase/instant-api-policy/<appCode>/policy.json`**。`instant-api-policy init/pull/validate/publish` 只读取或写入这一固定文件,不接受任意 `--file`。
|
|
33
43
|
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)。
|
|
@@ -42,7 +52,7 @@ metadata:
|
|
|
42
52
|
## Agent 快速执行顺序
|
|
43
53
|
|
|
44
54
|
1. **判断需求类型**
|
|
45
|
-
-
|
|
55
|
+
- 用户要创建或设计审批流、工作流、业务流程或多级审批 → 先读 [`approval-flow-development-workflow.md`](guides/approval-flow-development-workflow.md)。用户未明确限定类型时,默认推荐独立工作流 `INDEPENDENT_FLOW`;只有明确是已有数据集表单提交后的纯审批,且不包含填写、补材料、执行或确认等办理步骤时,才选择 `FORM_FLOW`;再使用 `flow validate/create/update/publish`
|
|
46
56
|
- Instant API 标准数据记录操作 → SDK filter/getOne/create/batchCreate/update/delete;批量更新使用 `update({ id: [...] })`,不存在 `batchUpdate()`
|
|
47
57
|
- 简单聚合且数据集是 DB_TABLE → SDK aggregate;聚合列用 `aggregate[].column`,不要用旧别名 `field`
|
|
48
58
|
- 同库 DB_TABLE 的复杂 JOIN / 数据库函数 → 评估 Custom SQL;跨库查询 → 按 [跨库 BFF 指南](guides/cross-database-bff.md)分别读取并拼接
|
|
@@ -66,7 +76,7 @@ metadata:
|
|
|
66
76
|
- 需要 `src/api/api.ts` / `client.ts` 时:已有项目先执行 `rabetbase project upgrade --dry-run`,确认计划后执行 `rabetbase project upgrade --yes`;再运行 `rabetbase api pull --format compress` 刷新模型事实。按 [`sdk-client-generation.md`](guides/sdk-client-generation.md) 检查 `data.files`、`data.needsProjectUpgrade` 与模型注册表;注册表源码迁移仅使用 `project upgrade`
|
|
67
77
|
- 需要按 Dataset + API 配置 Instant API 的 `allow`、`deny` 或 `route` 时,先读取 [`rabetbase-instant-api-policy.md`](references/rabetbase-instant-api-policy.md)。先执行 `api pull` 更新模型事实,从生成的 `models[].datasetCode` 取得精确选择器;**不得**把 SDK `alias` 当作 `datasetCode`。精确 Dataset 选择器在 v1/v2 都可写 `{ datasetCode: "<real-dataset-code>" }` 或 `{ tableName: "<real-table-name>" }`;两者同时写时必须指向同一 Dataset,已有 code 时优先只写 `datasetCode`。再用 `dataset detail --code <datasetCode>` 确认目标操作存在,只编辑固定 `policy.json`。仅版本 2 可以使用通配:全部 Dataset 固定写作 `datasets: [{"datasetCode":"*"}]`,全部 API 固定写作 `apis: ["*"]`;每种通配都必须是其数组的唯一元素,`tableName: "*"` 不支持,也不得与 Dataset 通配混用。需要从通配规则中豁免组合时,用 `excludes: [{ datasets: [{ datasetCode: "<real-dataset-code>" }], apis: ["<api>"] }]`,豁免项会回退到其他非重叠规则或 `defaults.instantApi`。版本 1 禁止 `*` 与 `excludes`。随后依次执行 `validate`、`publish --dry-run`,经人工确认后再正式发布。认证不可用时报告阻断,不得猜测或复用过期的 Dataset 信息
|
|
68
78
|
3. **SQL 工作流严格分步**
|
|
69
|
-
- 推荐路径:查现有(`sql list/detail`) 或新建(`sql create`) → 拉/落本地(`sql pull` / `sql create`) → 编辑同步目录文件 →
|
|
79
|
+
- 推荐路径:查现有(`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` 验证
|
|
70
80
|
- 先使用 `sql list/detail` 查找可复用的 Custom SQL;没有满足需求的资源时,按照 [`sql-creation-workflow.md`](guides/sql-creation-workflow.md) 与 [`sql-mybatis.md`](guides/sql-mybatis.md) 创建、校验、发布并验证
|
|
71
81
|
- 页面执行已发布的 Custom SQL 时使用 `sqlCode` + `params`;Backend Function 默认使用 `context.client.sql.byName(sqlName).execute({ params })`,`sql.execute({ sqlCode, params })` 仅作兼容路径
|
|
72
82
|
4. **Backend Function 工作流严格分步**
|
|
@@ -95,6 +105,7 @@ metadata:
|
|
|
95
105
|
- 自定义页面与数据列表页是两类独立页面能力,不混用两类页面的命令
|
|
96
106
|
- 创建、修改或发布前,必须先阅读 [`custom-page-workflow.md`](guides/custom-page-workflow.md),再按其中的编排读取对应原子命令 reference
|
|
97
107
|
- 编写 JSX、CSS 或词包前,必须阅读 [`generation-standards.md`](knowledge/custom-page/generation-standards.md);选择 UI 组件时阅读 [`components.md`](knowledge/components.md)
|
|
108
|
+
- 自定义页面需要发起、查询或办理独立工作流时,必须完整阅读 [`custom-page-flow-sdk.md`](guides/custom-page-flow-sdk.md) 的返回对象字段字典和页面组合规则;生成时间线 UI 还必须阅读 [`custom-page-flow-timeline-display.md`](guides/custom-page-flow-timeline-display.md),中文页面保留“处理人 / 处理结果 / 处理说明 / 处理时间”等可见字段标题。页面使用 `useSdkClient()` 提供的当前登录态客户端调用无参数 `client.flow()`;不手动传 `appCode`、`operatorUserId`、AccessKey 或 Cookie,也不根据字段名猜测列表、详情、时间线、审批记录、抄送或批量结果的展示语义
|
|
98
109
|
8. **Legacy modernization / Application Blueprint 工作流**
|
|
99
110
|
- 当用户要把无人交接老项目、外包接手项目或遗留系统翻新到 Lovrabet 体系时,先阅读 [`guides/legacy-application-blueprint-workflow.md`](guides/legacy-application-blueprint-workflow.md)
|
|
100
111
|
- 主产物是 `.rabetbase/blueprint/<appCode>/application-blueprint.md`,不是直接生成或推送 SQL/Backend Function
|
|
@@ -103,13 +114,15 @@ metadata:
|
|
|
103
114
|
## 流程定义(`flow`)
|
|
104
115
|
|
|
105
116
|
- 先按 [`approval-flow-development-workflow.md`](guides/approval-flow-development-workflow.md) 编排流程,再逐条阅读 [`rabetbase-flow-commands.md`](references/rabetbase-flow-commands.md)。
|
|
117
|
+
- “创建审批流”“创建工作流”“设计业务流程”“配置多级审批”等自然语言需求都进入本能力。用户未指定类型时,先面向用户推荐独立工作流,不要直接抛出 `flowType` 让用户选技术枚举。
|
|
106
118
|
- 角色、用户等候选资源按 [`rabetbase-flow-resources.md`](references/rabetbase-flow-resources.md) 查询;运行态责任边界见 [`rabetbase-flow-runtime-boundary.md`](references/rabetbase-flow-runtime-boundary.md)。
|
|
107
119
|
- 填写办理人、角色或转交候选人前,使用 `rabetbase flow runtime-user-search`、`runtime-role-list`、`runtime-role-user-list` 查询运行态真实 ID;这些命令只读,不办理待办。
|
|
108
120
|
- FlowConfig 字段和校验规则以 [`knowledge/approval-flow/config-json-schema.md`](knowledge/approval-flow/config-json-schema.md) 为准;CLI 校验结果区分 `READY`、`NEEDS_USER_CONFIRMATION`、`NEEDS_DSL_EXTENSION`、`INVALID_CONFIG` 和 `REMOTE_VALIDATION_FAILED`。
|
|
109
121
|
- `FORM_FLOW` 是表单审批流,人工节点只能使用 `taskMode: APPROVAL`,不得生成 `HANDLE`。
|
|
110
122
|
- `INDEPENDENT_FLOW` 是工作流,可以组合 `APPROVAL` 和 `HANDLE`;包含审批节点也不会改变其工作流类型。
|
|
111
|
-
- `pageMode` 只属于独立工作流:当前公开 Skill 只生成 `CUSTOM_PAGE`,由业务页面根据业务状态自行渲染并通过 SDK 驱动;缺省也按 `CUSTOM_PAGE`。用户要求 `PLATFORM_FORM` 时返回 `NEEDS_DSL_EXTENSION`,不生成或提交 FlowConfig。`CUSTOM_PAGE` 可选配置 `flowJson.
|
|
112
|
-
-
|
|
123
|
+
- `pageMode` 只属于独立工作流:当前公开 Skill 只生成 `CUSTOM_PAGE`,由业务页面根据业务状态自行渲染并通过 SDK 驱动;缺省也按 `CUSTOM_PAGE`。用户要求 `PLATFORM_FORM` 时返回 `NEEDS_DSL_EXTENSION`,不生成或提交 FlowConfig。`CUSTOM_PAGE` 可选配置 `flowJson.startPath` 以及 `APPROVAL` / `END` 节点 `path` 作为纯导航信息;这些字段都不参与流程执行。配置时必须使用目标自定义页面返回的完整 `runtimePageUrl`,不得填写菜单原始 `path`、`pageUrl`、`editPageUrl` 或手工拼接地址。
|
|
124
|
+
- 为独立工作流填写页面导航前,先用 `page custom-list` 找到目标页面,再用 `page custom-detail --id <pageId>` 检查 `data.status`。只有 `FORMAL` 页面才允许把 `runtimePageUrl` 写入 `startPath` 或节点 `path`;状态不是 `FORMAL` 时保持字段未填写,返回 `NEEDS_USER_CONFIRMATION` 并询问用户是否先发布。用户同意后按 `page custom-publish` 的 dry-run、确认、正式发布和 `FORMAL` 回读闭环执行,发布成功后再填写返回的 `runtimePageUrl`。
|
|
125
|
+
- 自定义页面 Flow SDK 只面向 `INDEPENDENT_FLOW + CUSTOM_PAGE`,使用当前 Runtime 登录会话;不得把表单审批流或平台表单工作流混入该入口。生成页面前必须按 Flow SDK 指南的完整字段字典解释所有固定返回对象及嵌套字段,不能只知道方法名和 TypeScript 类型。
|
|
113
126
|
|
|
114
127
|
## 应用决议指引
|
|
115
128
|
|
|
@@ -212,14 +225,14 @@ metadata:
|
|
|
212
225
|
## Agent 禁止行为
|
|
213
226
|
|
|
214
227
|
- **不要猜字段名** — 必须从 `dataset detail` 返回值获取真实字段名、类型、枚举值
|
|
215
|
-
-
|
|
228
|
+
- **不要跳过检查与预览** — 修改 SQL 后默认使用 `sql validate` 获取辅助诊断;已知超出覆盖范围时使用其他适用证据并说明限制,不把本地结果设为推送门禁。创建、推送或删除 SQL 前先执行对应命令的 `--dry-run`,由 Agent 核对目标与影响
|
|
216
229
|
- **不要手动拼 API URL** — 所有操作通过 CLI 命令完成,不要直接调 HTTP 接口
|
|
217
230
|
- **不要把 `sync-all` 当成日常发布或精确镜像** — 它只用于管理员首次初始化、历史回填或故障恢复,按源端现存记录 UPSERT,不删除目标端额外记录;在停止编辑的安静窗口执行,提交结果不确定时先用 `deployment sync-jobs` 恢复任务事实,不自动重提
|
|
218
231
|
- **不要向产品用户展开研发实现** — 回答角色权限操作时,不输出工程仓库、Controller、数据库表、接口路径、MR 排查或迁移过程;只说明 CLI 命令、角色边界、风险和可验证结果
|
|
219
232
|
- **不要臆测 sqlCode / id** — 从 `sql list` 或 `bff list` 获取真实标识
|
|
220
233
|
- **不要臆测 dblink id 或分析 trace/plan id** — 从 `db list` / `db detail` / `db analyze-start` 的返回字段获取(见 [database-connection-workflow.md](guides/database-connection-workflow.md))
|
|
221
234
|
- **只使用可见命令** — 以本 skill、`rabetbase schema`、`rabetbase --help` 中出现的命令为准;不要凭训练记忆调用未出现的旧别名
|
|
222
|
-
-
|
|
235
|
+
- **不要只报告失败就结束** — `sql create` / `sql push` / `sql delete` / `bff push` / `bff delete` 失败时先按原因处理可恢复问题;仍受阻时说明具体资源、原因、已完成的准备和最小待办,不声称写入成功
|
|
223
236
|
- **不要在不确认表结构时就写 SQL** — 先 `dataset detail`,后写 SQL、Backend Function、页面……
|
|
224
237
|
- **不要把案例字段当通用规则** — 任何 Demo、历史项目、示例里的字段名、枚举值、表名都不能照搬;必须以当前 `dataset detail` 为准
|
|
225
238
|
- **不要循环单条查询** — 用 SDK `filter + $in` 批量查询,不要 N+1
|
|
@@ -338,7 +351,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
338
351
|
| 列出配置 | [`rabetbase config list`](references/rabetbase-config.md) | 查看当前生效的配置 |
|
|
339
352
|
| 管理运行态 app-config | [`rabetbase app-config list/get/set/delete`](references/rabetbase-app-config.md) | 运行态 app-config 管理面;默认不输出明文 value;`set` 为 `write`,`delete` 保持 `high-risk-write` |
|
|
340
353
|
| 管理 Instant API 数据集访问策略 | [`rabetbase instant-api-policy init/current/pull/validate/publish/revisions/revision/rollback`](references/rabetbase-instant-api-policy.md) | 固定文件 `.rabetbase/instant-api-policy/<appCode>/policy.json`;`version` 是 JSON 结构版本,`revision` 是发布历史版本;publish/rollback 为 high-risk-write |
|
|
341
|
-
| 管理和检索当前研发应用的企业知识库 | [`rabetbase kb list/detail/search/create/update/delete`](references/rabetbase-kb.md) | 管理仅 company scope;search
|
|
354
|
+
| 管理和检索当前研发应用的企业知识库 | [`rabetbase kb list/detail/search/create/update/delete`](references/rabetbase-kb.md) | 管理仅 company scope;search 仅V2,默认解析 `kbServiceDomain`,可用 `--kb-service-url` 单次覆盖,使用Cookie且仅 `public/company`;`create/update` 为 `write`,`delete` 保持 `high-risk-write` |
|
|
342
355
|
| 管理当前研发应用的 Agent context 规则 | [`rabetbase rule list/get/set`](references/rabetbase-rule.md) | `RULES.md` 供页面、API 等研发 Agent 使用且排除 DB Agent;`DATABASE.md` 仅供数据库分析时 DB Agent 使用;两者在各自流程全程参与 context;set 为 `write`,先 dry-run |
|
|
343
356
|
| 查询或管理应用级通知配置 | [`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 获取 Backend Function 所需 `configCode`;写入只接收单一敏感 JSON 源,先 dry-run;update/delete 必须 `--yes` |
|
|
344
357
|
| 设计、校验和发布表单审批流或独立工作流 | [`rabetbase flow validate/list/detail/create/update/publish`](references/rabetbase-flow-commands.md) | 先确定 `flowType`;本地 validate 后再 create/update 和 publish |
|
|
@@ -380,7 +393,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
380
393
|
| 管理跨库数据集关联 | [`dataset cross-relation-list/create/update/delete`](references/rabetbase-dataset-cross-relations.md) | 不同连接的 DB_TABLE 逻辑关系;源端定位,更新/删除要求唯一匹配 |
|
|
381
394
|
| 首次生成数据列表页 | [`rabetbase page generate-start --datasetcode <code>`](references/rabetbase-page-generate-start.md) | 提交或复用服务端异步任务 |
|
|
382
395
|
| 创建自定义页面 | [`rabetbase page create --page-pattern BLANK --name "客户看板"`](references/rabetbase-page-create.md) | 综合操作页面优先使用 `ONEPAGE`,业务数据可视化使用 `DASHBOARD`,基础页面使用 `BLANK`;模板详情见 [`page-templates.md`](knowledge/custom-page/page-templates.md),也可通过 `--page-dir` 创建完整页面;先 dry-run |
|
|
383
|
-
| 查询自定义页面 | [`rabetbase page custom-list`](references/rabetbase-page-custom-list.md) | 返回页面 ID、页面名称、`pageUrl
|
|
396
|
+
| 查询自定义页面 | [`rabetbase page custom-list`](references/rabetbase-page-custom-list.md) | 返回页面 ID、页面名称、`pageUrl`(查看最新保存内容)、`runtimePageUrl`(始终可打开;未发布时显示错误提示)和 `editPageUrl`(打开编辑器) |
|
|
384
397
|
| 查看自定义页面详情 | [`rabetbase page custom-detail --id <pageId>`](references/rabetbase-page-custom-detail.md) | 查询页面详情,`codeContent` 包含可修改后整体提交的完整页面文件 |
|
|
385
398
|
| 更新自定义页面 | [`rabetbase page custom-update --id <pageId> --page-dir <dir>`](references/rabetbase-page-custom-update.md) | 以最新完整页面内容为基线更新,可参考 `BLANK`、`ONEPAGE` 或 `DASHBOARD` 的页面和交互模式;先 dry-run |
|
|
386
399
|
| 发布自定义页面 | [`rabetbase page custom-publish --id <pageId>`](references/rabetbase-page-custom-publish.md) | `write`;发布当前保存内容,先 dry-run 并审阅预览 |
|
|
@@ -482,7 +495,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
482
495
|
|
|
483
496
|
`sql validate` 是 SQL 内容校验入口;SQL 写入统一通过 `sql create` 或编辑同步文件后执行 `sql push`。
|
|
484
497
|
|
|
485
|
-
配置 `riskLevel` 可限制允许执行的最高风险等级,默认值为 `write`(详见 [配置参考](references/rabetbase-config.md)
|
|
498
|
+
配置 `riskLevel` 可限制允许执行的最高风险等级,默认值为 `write`(详见 [配置参考](references/rabetbase-config.md))。被风险配置阻止时,先完成允许的检查和方案准备,说明目标操作、影响与所需等级;是否调整配置由用户决定并手动操作。**禁止 Agent 或自动化脚本自行修改 `riskLevel`、写入环境变量或以其他方式尝试提权**;平台权限不足须按实际权限原因处理,修改本地配置不能替代平台授权。
|
|
486
499
|
|
|
487
500
|
## 输出格式
|
|
488
501
|
|
|
@@ -506,14 +519,14 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
506
519
|
| `auth_required` | 未登录 | 执行 `rabetbase auth` |
|
|
507
520
|
| `config_missing` | 未配置 appcode | `rabetbase workspace init --appcode <code>` 或传 `--appcode` |
|
|
508
521
|
| `flag_missing` | 缺少必填参数 | 检查 reference 文档确认必填 flags |
|
|
509
|
-
| `validation_error` |
|
|
522
|
+
| `validation_error` | 输入校验失败 | 按实际诊断查证内容或参数;修复确认的错误,不迎合误报删改必要语义 |
|
|
510
523
|
| `api_error` | 后端 API 错误 | 检查 appcode、网络、权限 |
|
|
511
|
-
| `cancelled` |
|
|
512
|
-
| `blocked` | 平台冲突检测或资源状态冲突(常见于旧保存链路或平台侧限制) |
|
|
524
|
+
| `cancelled` | 用户取消操作 | 停止该操作,保留准备结果;继续其他已授权工作,不自动重试或绕过取消 |
|
|
525
|
+
| `blocked` | 平台冲突检测或资源状态冲突(常见于旧保存链路或平台侧限制) | 明确未完成写入,回读事实并处理授权内可恢复问题;剩余阻碍按下方规则交付 |
|
|
513
526
|
|
|
514
527
|
## 冲突处理
|
|
515
528
|
|
|
516
|
-
|
|
529
|
+
写入失败、部分成功、结果未知或版本分歧,按[冲突处理指南](guides/conflict-detection.md)识别结果并恢复;不得将未确认成功的写入报告为成功。
|
|
517
530
|
|
|
518
531
|
## 前端页面规则
|
|
519
532
|
|
|
@@ -535,13 +548,14 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
535
548
|
| 生成 / 更新 api.ts 与 client.ts | `api pull` 之后、模型过期、脚手架缺失、或用户要求修复 SDK 客户端 | [`sdk-client-generation.md`](guides/sdk-client-generation.md) |
|
|
536
549
|
| SQL MyBatis 与动态 SQL | 写自定义 SQL、`<if>`/`<foreach>`、参数绑定 | [`sql-mybatis.md`](guides/sql-mybatis.md) |
|
|
537
550
|
| 前端页面开发约束 | React 页、表单、列表、与数据集绑定 | [`frontend-development.md`](guides/frontend-development.md) |
|
|
551
|
+
| 自定义页面 Flow SDK | 页面发起、查询或办理 `INDEPENDENT_FLOW + CUSTOM_PAGE`,以及 appCode、Cookie、表单和流程变量边界 | [`custom-page-flow-sdk.md`](guides/custom-page-flow-sdk.md) |
|
|
538
552
|
| 故障诊断 | CLI/登录/数据集/保存失败排障 | [`troubleshooting.md`](guides/troubleshooting.md) |
|
|
539
553
|
| Backend Function 脚本规范 | HOOK/ENDPOINT/COMMON、`context.client`、消息通知扩展、目录与注释模板 | [`backend-function.md`](guides/backend-function.md) |
|
|
540
554
|
| 数据接口访问 | 先 detail 再编码、外键/枚举、禁止 N+1、批量与关联查询;验证真实行数据时交接 `lovrabet data`(**`lovrabet` CLI ≥ 2.0**) | [`data-api-guidelines.md`](guides/data-api-guidelines.md) |
|
|
541
555
|
| SQL 创建工作流 | list/detail → pull/create → edit → validate → status → push/delete → exec 全链路 | [`sql-creation-workflow.md`](guides/sql-creation-workflow.md) |
|
|
542
556
|
| Backend Function 创建工作流 | new → status → dry-run → pull/push | [`bff-creation-workflow.md`](guides/bff-creation-workflow.md) |
|
|
543
557
|
| 跨库 BFF 查询与拼接 | 完整键、分库批量读取、分页筛选排序、授权与一致性边界 | [`cross-database-bff.md`](guides/cross-database-bff.md) |
|
|
544
|
-
| 冲突检测与保存 | `
|
|
558
|
+
| 冲突检测与保存 | 写入结果判定、`blocked` 与部分成功的恢复动作、响应样例、交付要求 | [`conflict-detection.md`](guides/conflict-detection.md) |
|
|
545
559
|
| 质量与最佳实践 | 审查 SQL/Backend Function、命名、高危边界、描述字段 | [`best-practices.md`](guides/best-practices.md) |
|
|
546
560
|
| 数据库连接与分析 | 接入/改连/测连、`traceId` 来源、`db analyze-*` 与 dataset 分工;子命令速查见上文 **「数据库连接(db)」** | [`database-connection-workflow.md`](guides/database-connection-workflow.md) |
|
|
547
561
|
| 菜单异常审计与安全修复 | 重复 path、根级菜单重名、空 folder 删除计划和平台处理后回查 | [`menu-anomaly-manual-cleanup.md`](guides/menu-anomaly-manual-cleanup.md) |
|