@lovrabet/rabetbase-cli 2.5.6 → 2.5.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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/detail.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.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/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.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/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.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/page-list.d.ts +2 -0
- package/lib/commands/flow/page-list.js +1 -0
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.d.ts +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 +6 -2
- 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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.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/feishu-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.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +26 -6
- 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-analysis.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 +12 -0
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -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.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.js +1 -1
- 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/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.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 +8 -4
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +52 -13
- package/skills/rabetbase/guides/backend-function.md +26 -4
- package/skills/rabetbase/guides/bff-creation-workflow.md +9 -0
- package/skills/rabetbase/guides/cross-database-bff.md +1 -0
- package/skills/rabetbase/guides/custom-page-flow-sdk.md +2 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +2 -0
- package/skills/rabetbase/guides/flow-config-examples.md +75 -0
- package/skills/rabetbase/guides/form-flow-start.md +61 -0
- package/skills/rabetbase/guides/typescript-sdk.md +1 -1
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +18 -4
- package/skills/rabetbase/references/rabetbase-codegen-sdk.md +5 -4
- package/skills/rabetbase/references/rabetbase-flow-commands.md +21 -2
- package/skills/rabetbase/references/rabetbase-flow-resources.md +21 -3
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +6 -2
- package/skills/rabetbase/references/rabetbase-kb.md +4 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49b423,_0x25f5ed){const _0x4a02e8=a359_0x50e9,_0x1ca379=_0x49b423();while(!![]){try{const _0x1153cf=-parseInt(_0x4a02e8(0x1ae))/0x1+-parseInt(_0x4a02e8(0x1b2))/0x2*(-parseInt(_0x4a02e8(0x1bb))/0x3)+-parseInt(_0x4a02e8(0x1b9))/0x4+parseInt(_0x4a02e8(0x1b8))/0x5*(-parseInt(_0x4a02e8(0x1bd))/0x6)+parseInt(_0x4a02e8(0x1b4))/0x7+parseInt(_0x4a02e8(0x1af))/0x8*(-parseInt(_0x4a02e8(0x1ba))/0x9)+parseInt(_0x4a02e8(0x1c0))/0xa;if(_0x1153cf===_0x25f5ed)break;else _0x1ca379['push'](_0x1ca379['shift']());}catch(_0x1523ac){_0x1ca379['push'](_0x1ca379['shift']());}}}(a359_0x59bf,0x5b0f5));import{getCliVersionPolicyUrl,getProjectTemplateAssetBaseUrl,getProjectTemplateLegacyAssetBaseUrl}from'../constant/cdn.js';import a359_0x34f83e from'semver';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;export function isBetaCliVersion(_0x36a30c){const _0x3e7a34=a359_0x50e9,_0x25c43a=a359_0x34f83e[_0x3e7a34(0x1c2)](_0x36a30c);return _0x25c43a?a359_0x34f83e[_0x3e7a34(0x1b0)](_0x25c43a)?.[0x0]===_0x3e7a34(0x1b5):![];}export function resolveProjectTemplateDescriptor(_0x4d01b8,_0x159786){const _0x1a3de6=a359_0x50e9;if(isBetaCliVersion(_0x159786))return _0x4d01b8[_0x1a3de6(0x1b5)]?.[_0x1a3de6(0x1c9)]??_0x4d01b8[_0x1a3de6(0x1c9)];return _0x4d01b8[_0x1a3de6(0x1c9)];}function pickString(_0x465b4c){const _0x1cd912=a359_0x50e9;return typeof _0x465b4c===_0x1cd912(0x1c4)&&_0x465b4c[_0x1cd912(0x1bc)]()[_0x1cd912(0x1c7)]>0x0?_0x465b4c[_0x1cd912(0x1bc)]():null;}function normalizeCliVersionPolicy(_0x1fd329){const _0x13867b=a359_0x50e9;if(!_0x1fd329||typeof _0x1fd329!==_0x13867b(0x1c6))return null;const _0x40d4c8=_0x1fd329,_0x7c8cc4=_0x40d4c8['cli']&&typeof _0x40d4c8[_0x13867b(0x1c3)]===_0x13867b(0x1c6)?_0x40d4c8[_0x13867b(0x1c3)]:_0x40d4c8,_0x699939=pickString(_0x7c8cc4[_0x13867b(0x1b7)])||pickString(_0x7c8cc4[_0x13867b(0x1b3)])||pickString(_0x7c8cc4[_0x13867b(0x1c5)]),_0x108bba=pickString(_0x7c8cc4[_0x13867b(0x1bf)])||pickString(_0x7c8cc4[_0x13867b(0x1ca)]);if(!_0x699939&&!_0x108bba)return null;return{'stableVersion':_0x699939,'minimumVersion':_0x108bba,'upgradeMessage':pickString(_0x7c8cc4[_0x13867b(0x1be)])||undefined,'minimumVersionMessage':pickString(_0x7c8cc4[_0x13867b(0x1b1)])||undefined};}async function fetchRabetbaseCdnConfigAt(_0x3158aa){const _0x55e0de=a359_0x50e9,_0x91328c=new AbortController(),_0x291ee9=setTimeout(()=>_0x91328c['abort'](),FETCH_TIMEOUT_MS);try{const _0x474368=await fetch(_0x3158aa,{'headers':{'Accept':_0x55e0de(0x1b6)},'signal':_0x91328c[_0x55e0de(0x1c8)]});if(!_0x474368['ok'])return null;const _0x31a0a7=await _0x474368[_0x55e0de(0x1c1)]();return _0x31a0a7&&typeof _0x31a0a7===_0x55e0de(0x1c6)?_0x31a0a7:null;}catch{return null;}finally{clearTimeout(_0x291ee9);}}export async function fetchRabetbaseCdnConfig(){return fetchRabetbaseCdnConfigAt(getCliVersionPolicyUrl());}export async function fetchProjectTemplateCdnConfig(){const _0x3ac7f3=await getRabetbaseCdnConfig();return _0x3ac7f3?{'config':_0x3ac7f3,'assetBaseUrl':getProjectTemplateAssetBaseUrl(),'legacyAssetBaseUrl':getProjectTemplateLegacyAssetBaseUrl()}:null;}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];function a359_0x50e9(_0x4b15fa,_0x5336ab){_0x4b15fa=_0x4b15fa-0x1ae;const _0x59bf71=a359_0x59bf();let _0x50e99e=_0x59bf71[_0x4b15fa];return _0x50e99e;}export async function getRabetbaseCdnConfig(){const _0x2916f6=Date['now']();if(hasCachedConfig){const _0x6400ff=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2916f6-cacheTime<_0x6400ff)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x2916f6,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}function a359_0x59bf(){const _0x1e2f7e=['2707240xDEGCJ','5760jNZIJC','330213gdEdNP','trim','55764FyTsJG','upgradeMessage','minimumVersion','13302600NcLvEa','json','valid','cli','string','recommendedVersion','object','length','signal','projectTemplate','minVersion','125616ngmtZX','848KGvJFZ','prerelease','minimumVersionMessage','2TWbOxp','latestVersion','1743196tqsxEz','beta','application/json','stableVersion','240oLCcGC'];a359_0x59bf=function(){return _0x1e2f7e;};return a359_0x59bf();}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a360_0x19103f=a360_0x32c4;(function(_0x50eb6a,_0x53b9bf){const _0x25c72c=a360_0x32c4,_0x38b5c2=_0x50eb6a();while(!![]){try{const _0x5c6638=parseInt(_0x25c72c(0xf4))/0x1*(parseInt(_0x25c72c(0xf7))/0x2)+parseInt(_0x25c72c(0xf9))/0x3*(parseInt(_0x25c72c(0xf1))/0x4)+parseInt(_0x25c72c(0xf6))/0x5*(parseInt(_0x25c72c(0xee))/0x6)+parseInt(_0x25c72c(0xf8))/0x7+-parseInt(_0x25c72c(0xf0))/0x8+parseInt(_0x25c72c(0xf2))/0x9+parseInt(_0x25c72c(0xfa))/0xa*(-parseInt(_0x25c72c(0xf3))/0xb);if(_0x5c6638===_0x53b9bf)break;else _0x38b5c2['push'](_0x38b5c2['shift']());}catch(_0x1ebc2b){_0x38b5c2['push'](_0x38b5c2['shift']());}}}(a360_0x2086,0x328f8));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a360_0x5c42cd,getMultiAppConfigs as a360_0x4b267b,getTemplateBaseUrl as a360_0x4245f4}from'../context.js';function a360_0x2086(){const _0x543fe2=['string','5ZcpLsX','930fPUddT','2796794FHbHTq','9bhrBbJ','7890CSPEdE','project','294726eqdVYP','env','2159784sgWGTW','144804kTkcCd','3118383fwUmfk','10571sEQvnO','713oWMUaw'];a360_0x2086=function(){return _0x543fe2;};return a360_0x2086();}export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x505b14){const _0x1cd945=a360_0x32c4,_0x43e1a0=readRawConfig(_0x505b14);return _0x43e1a0['env']&&typeof _0x43e1a0[_0x1cd945(0xef)]===_0x1cd945(0xf5)&&initEnv(_0x43e1a0[_0x1cd945(0xef)]),_0x43e1a0;}export function getConfigAppCode(){return a360_0x5c42cd();}function a360_0x32c4(_0x27e473,_0x4fea4e){_0x27e473=_0x27e473-0xed;const _0x2086c4=a360_0x2086();let _0x32c491=_0x2086c4[_0x27e473];return _0x32c491;}export function getMultiAppConfigs(_0x3fbd5c=a360_0x19103f(0xed)){return a360_0x4b267b(_0x3fbd5c);}export function getTemplateBaseUrl(){return a360_0x4245f4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a361_0x2982(){const _0x4f8264=['string','trim','1789FTmcxd','object','5110bvhENQ','number','1562LqTzBK','1429497PqTotd','5149340sWvNOl','5438144nqwIrj','isFinite','6384RrEYow','882141wDWEOo','6084456RdbgjO'];a361_0x2982=function(){return _0x4f8264;};return a361_0x2982();}(function(_0x461bfc,_0x1ac8e9){const _0x31a9d3=a361_0x5dd7,_0xcc0110=_0x461bfc();while(!![]){try{const _0x487e7f=parseInt(_0x31a9d3(0x73))/0x1*(-parseInt(_0x31a9d3(0x77))/0x2)+-parseInt(_0x31a9d3(0x7d))/0x3+parseInt(_0x31a9d3(0x7a))/0x4+parseInt(_0x31a9d3(0x79))/0x5+-parseInt(_0x31a9d3(0x7c))/0x6*(-parseInt(_0x31a9d3(0x75))/0x7)+-parseInt(_0x31a9d3(0x70))/0x8+parseInt(_0x31a9d3(0x78))/0x9;if(_0x487e7f===_0x1ac8e9)break;else _0xcc0110['push'](_0xcc0110['shift']());}catch(_0x49f819){_0xcc0110['push'](_0xcc0110['shift']());}}}(a361_0x2982,0xd52b8));function a361_0x5dd7(_0x18412e,_0x577d6a){_0x18412e=_0x18412e-0x70;const _0x298289=a361_0x2982();let _0x5dd7de=_0x298289[_0x18412e];return _0x5dd7de;}function toFiniteNumber(_0x5b9a57){const _0x37b97b=a361_0x5dd7;if(typeof _0x5b9a57===_0x37b97b(0x76)&&Number[_0x37b97b(0x7b)](_0x5b9a57))return _0x5b9a57;if(typeof _0x5b9a57===_0x37b97b(0x71)){const _0x220e11=_0x5b9a57[_0x37b97b(0x72)]();if(!_0x220e11)return undefined;const _0x59a04e=Number(_0x220e11);if(Number['isFinite'](_0x59a04e))return _0x59a04e;}return undefined;}export function normalizeEntityWithIdResponse(_0x135fba){const _0x41a223=a361_0x5dd7,_0x135567=toFiniteNumber(_0x135fba);if(_0x135567!==undefined)return{'id':_0x135567,'entity':{'id':_0x135567}};if(!_0x135fba||typeof _0x135fba!==_0x41a223(0x74))return{'id':undefined,'entity':{}};const _0xf36212={..._0x135fba},_0x2a4cc3=toFiniteNumber(_0xf36212['id']);return _0x2a4cc3!==undefined&&(_0xf36212['id']=_0x2a4cc3),{'id':_0x2a4cc3,'entity':_0xf36212};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1137fa,_0x227ab2){const _0x231ec7=a362_0x3926,_0x394a08=_0x1137fa();while(!![]){try{const _0x208a69=-parseInt(_0x231ec7(0x138))/0x1+parseInt(_0x231ec7(0x136))/0x2*(parseInt(_0x231ec7(0x132))/0x3)+parseInt(_0x231ec7(0x131))/0x4*(-parseInt(_0x231ec7(0x139))/0x5)+parseInt(_0x231ec7(0x13b))/0x6+-parseInt(_0x231ec7(0x12f))/0x7*(-parseInt(_0x231ec7(0x135))/0x8)+parseInt(_0x231ec7(0x134))/0x9*(-parseInt(_0x231ec7(0x13a))/0xa)+parseInt(_0x231ec7(0x137))/0xb*(parseInt(_0x231ec7(0x130))/0xc);if(_0x208a69===_0x227ab2)break;else _0x394a08['push'](_0x394a08['shift']());}catch(_0x4a1b2d){_0x394a08['push'](_0x394a08['shift']());}}}(a362_0x3775,0x2db46));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a362_0x3926(_0x58f25b,_0x51efd5){_0x58f25b=_0x58f25b-0x12f;const _0x377580=a362_0x3775();let _0x3926c1=_0x377580[_0x58f25b];return _0x3926c1;}export async function copyDir(_0x30a8bc,_0x5c6081){const _0x1275c6=a362_0x3926,_0x9454ab=statSync(_0x30a8bc);if(_0x9454ab[_0x1275c6(0x133)]()){!existsSync(_0x5c6081)&&mkdirSync(_0x5c6081,{'recursive':!![]});const _0x247b60=readdirSync(_0x30a8bc);for(const _0x3b24c3 of _0x247b60){await copyDir(join(_0x30a8bc,_0x3b24c3),join(_0x5c6081,_0x3b24c3));}}else copyFileSync(_0x30a8bc,_0x5c6081);}export function ensureDir(_0x278550){!existsSync(_0x278550)&&mkdirSync(_0x278550,{'recursive':!![]});}export function pathExists(_0x2068e4){return existsSync(_0x2068e4);}function a362_0x3775(){const _0x2f0c93=['3228SCaGIa','35608KQYenM','171MKzKxg','isDirectory','2435895fipxRH','222520sgVnGG','8510kflhev','6699WGyBCT','203053OgAZtT','195BuWlhW','10NxRdFN','1440846XNvaIO','91cIFFOR'];a362_0x3775=function(){return _0x2f0c93;};return a362_0x3775();}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a363_0x5eee21=a363_0x1716;(function(_0xcefcac,_0x1436e9){const _0x2f3fdb=a363_0x1716,_0x18a8ed=_0xcefcac();while(!![]){try{const _0x3d8d5a=parseInt(_0x2f3fdb(0x112))/0x1*(parseInt(_0x2f3fdb(0x117))/0x2)+parseInt(_0x2f3fdb(0x10d))/0x3*(parseInt(_0x2f3fdb(0x111))/0x4)+-parseInt(_0x2f3fdb(0x120))/0x5+-parseInt(_0x2f3fdb(0x10b))/0x6+-parseInt(_0x2f3fdb(0x10f))/0x7*(parseInt(_0x2f3fdb(0x123))/0x8)+-parseInt(_0x2f3fdb(0x118))/0x9+-parseInt(_0x2f3fdb(0x11b))/0xa;if(_0x3d8d5a===_0x1436e9)break;else _0x18a8ed['push'](_0x18a8ed['shift']());}catch(_0x421144){_0x18a8ed['push'](_0x18a8ed['shift']());}}}(a363_0x52d2,0x4e6a7));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';function a363_0x52d2(){const _0x32c63f=['91990egfXWe','.lovrabet/skill/guides','trimEnd','title','replace','10UsXNyy','660312LBMjhc','\x0a\x0a>更新时间:','json','236860qDBwVt','push','.lovrabet','statusText','.md','799715WmXYPR','join','path','22248rbiBaq','CDN\x20data\x20is\x20missing\x20skillTemplate','status','lastUpdated','length','content','extendContent','entries','cache','1462104yfRyKV','guides','96018dnAFvr','utf-8','378DQiDzF','skillTemplate','64kENzaH'];a363_0x52d2=function(){return _0x32c63f;};return a363_0x52d2();}import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x44163b=getTemplateBaseUrl();return _0x44163b+'/skills/guides.json';}const CACHE_DIR=join(homedir(),a363_0x5eee21(0x11d),a363_0x5eee21(0x10a));export async function fetchGuidesFromCDN(){const _0xee4b7c=a363_0x5eee21,_0x545d2f=getGuidesCdnUrl(),_0x2bcf3a=await fetch(_0x545d2f,{'headers':{'Accept':'application/json'}});if(!_0x2bcf3a['ok'])throw new Error('CDN\x20request\x20failed:\x20'+_0x2bcf3a[_0xee4b7c(0x125)]+'\x20'+_0x2bcf3a[_0xee4b7c(0x11e)]);const _0x1f7c3a=await _0x2bcf3a[_0xee4b7c(0x11a)]();if(!_0x1f7c3a[_0xee4b7c(0x10c)]||typeof _0x1f7c3a[_0xee4b7c(0x10c)]!=='object')throw new Error('CDN\x20returned\x20invalid\x20data');return _0x1f7c3a;}export function writeGuidesToProject(_0x51fb60,_0x19d95b,_0x58f050=a363_0x5eee21(0x113),_0x3d37d6){const _0x7eae43=a363_0x5eee21,_0x473c10=join(_0x19d95b,_0x58f050);mkdirSync(_0x473c10,{'recursive':!![]});for(const [_0x3ef205,_0x449887]of Object[_0x7eae43(0x109)](_0x51fb60[_0x7eae43(0x10c)])){let _0x358b8b=_0x449887[_0x7eae43(0x128)];_0x449887[_0x7eae43(0x126)]&&(_0x358b8b=appendUpdateTime(_0x358b8b,_0x449887['lastUpdated'])),writeFileSync(join(_0x473c10,_0x3ef205+_0x7eae43(0x11f)),_0x358b8b,_0x7eae43(0x10e));}}export function appendUpdateTime(_0x1f0dca,_0x1ef12d){const _0x1797eb=a363_0x5eee21;return _0x1f0dca=_0x1f0dca[_0x1797eb(0x116)](/\n*>更新时间:.*$/m,''),_0x1f0dca[_0x1797eb(0x114)]()+(_0x1797eb(0x119)+_0x1ef12d);}export function getSkillTemplate(_0x386a69){const _0x15666c=a363_0x5eee21;return _0x386a69[_0x15666c(0x110)]?.[_0x15666c(0x128)]||'';}export function appendExtendContents(_0x27ab83,_0x1bdf4c,_0x90d3b4){const _0x4b4c95=a363_0x5eee21,_0x17f298=[];for(const [,_0x12d6c1]of Object[_0x4b4c95(0x109)](_0x1bdf4c[_0x4b4c95(0x10c)])){_0x12d6c1[_0x4b4c95(0x108)]&&_0x17f298[_0x4b4c95(0x11c)](_0x12d6c1['extendContent'][_0x4b4c95(0x114)]());}if(_0x17f298[_0x4b4c95(0x127)]===0x0)return _0x27ab83;return _0x27ab83['trimEnd']()+'\x0a\x0a'+_0x17f298[_0x4b4c95(0x121)]('\x0a\x0a')+'\x0a';}function a363_0x1716(_0xc5ce2d,_0x282fa5){_0xc5ce2d=_0xc5ce2d-0x108;const _0x52d208=a363_0x52d2();let _0x17161b=_0x52d208[_0xc5ce2d];return _0x17161b;}export function writeSkillFile(_0x28d447,_0x149600,_0x54f43f){const _0x1bb947=a363_0x5eee21,_0x4664dc=getSkillTemplate(_0x28d447);if(!_0x4664dc)throw new Error(_0x1bb947(0x124));const _0x14e711=dirname(_0x149600);mkdirSync(_0x14e711,{'recursive':!![]});let _0x159223=_0x4664dc[_0x1bb947(0x116)](/\{\{IDE_NAME\}\}/g,_0x54f43f);_0x159223=appendExtendContents(_0x159223,_0x28d447),_0x28d447[_0x1bb947(0x110)][_0x1bb947(0x126)]&&(_0x159223=appendUpdateTime(_0x159223,_0x28d447[_0x1bb947(0x110)][_0x1bb947(0x126)])),writeFileSync(_0x149600,_0x159223,'utf-8');}export async function installGuides(_0x29ffbf){const _0x21f97c=a363_0x5eee21,_0xb20cc1=await fetchGuidesFromCDN();return writeGuidesToProject(_0xb20cc1,_0x29ffbf),Object['keys'](_0xb20cc1[_0x21f97c(0x10c)])[_0x21f97c(0x127)];}export function getGuidesSummary(_0x3dc79a){const _0x5d9218=a363_0x5eee21;return Object['entries'](_0x3dc79a['guides'])['map'](([_0x59f842,_0x59f86d])=>({'key':_0x59f842,'title':_0x59f86d[_0x5d9218(0x115)],'path':_0x59f86d[_0x5d9218(0x122)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a364_0x4c59(){const _0x363ae2=['name','ENOTFOUND','get','2640264BgSisl','TypeError','2ggfRxs','abort','420385OmVqBu','url','statusText','\x20in\x20','Request\x20failed','8697208GtheVB','json','295hYscpK','2186583tCmLqS','application/json','includes','7713363xkiLNC','content-type','text','25212492LvQIut','message','AbortError','log','ms...','77060xQbcMB','signal','*\x20Request\x20failed;\x20retry\x20','ECONNRESET'];a364_0x4c59=function(){return _0x363ae2;};return a364_0x4c59();}(function(_0x3ab1c3,_0x538b7c){const _0x4d9181=a364_0xaff7,_0x456d61=_0x3ab1c3();while(!![]){try{const _0x1b6d36=parseInt(_0x4d9181(0x1d1))/0x1+-parseInt(_0x4d9181(0x1cf))/0x2*(parseInt(_0x4d9181(0x1d9))/0x3)+-parseInt(_0x4d9181(0x1c6))/0x4*(-parseInt(_0x4d9181(0x1d8))/0x5)+parseInt(_0x4d9181(0x1cd))/0x6+parseInt(_0x4d9181(0x1dc))/0x7+parseInt(_0x4d9181(0x1d6))/0x8+-parseInt(_0x4d9181(0x1df))/0x9;if(_0x1b6d36===_0x538b7c)break;else _0x456d61['push'](_0x456d61['shift']());}catch(_0x2ab0aa){_0x456d61['push'](_0x456d61['shift']());}}}(a364_0x4c59,0xa0203));export async function httpRequest(_0x532b02,_0x5cd9bd={}){const _0x320ab2=a364_0xaff7,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x5cd9bd;let _0x57ff46=null;for(let _0x52a3b8=0x0;_0x52a3b8<=retries;_0x52a3b8++){try{const _0x3a02e6=new AbortController(),_0x3d6383=setTimeout(()=>_0x3a02e6[_0x320ab2(0x1d0)](),timeout),_0x45ae32=await fetch(_0x532b02,{'headers':headers,'signal':_0x3a02e6[_0x320ab2(0x1c7)]});clearTimeout(_0x3d6383);let _0x2b8cce;const _0x4098dc=_0x45ae32['headers'][_0x320ab2(0x1cc)](_0x320ab2(0x1dd));return _0x4098dc?.[_0x320ab2(0x1db)](_0x320ab2(0x1da))?_0x2b8cce=await _0x45ae32[_0x320ab2(0x1d7)]():_0x2b8cce=await _0x45ae32[_0x320ab2(0x1de)](),{'ok':_0x45ae32['ok'],'status':_0x45ae32['status'],'statusText':_0x45ae32[_0x320ab2(0x1d3)],'data':_0x2b8cce,'headers':_0x45ae32['headers'],'url':_0x45ae32[_0x320ab2(0x1d2)],'text':()=>_0x45ae32[_0x320ab2(0x1de)]()};}catch(_0xce9e41){_0x57ff46=_0xce9e41 instanceof Error?_0xce9e41:new Error(String(_0xce9e41));if(_0x52a3b8===retries)break;if(shouldRetry(_0xce9e41)){console[_0x320ab2(0x1c4)](_0x320ab2(0x1c8)+(_0x52a3b8+0x1)+_0x320ab2(0x1d4)+retryDelay+_0x320ab2(0x1c5)),await sleep(retryDelay);continue;}else break;}}throw _0x57ff46||new Error(_0x320ab2(0x1d5));}function shouldRetry(_0x3e3a4a){const _0x22569c=a364_0xaff7;if(_0x3e3a4a instanceof Error){if(_0x3e3a4a[_0x22569c(0x1ca)]===_0x22569c(0x1c3))return![];if(_0x3e3a4a[_0x22569c(0x1ca)]===_0x22569c(0x1ce)&&_0x3e3a4a[_0x22569c(0x1c2)]['includes']('fetch'))return!![];if(_0x3e3a4a['message'][_0x22569c(0x1db)](_0x22569c(0x1c9)))return!![];if(_0x3e3a4a[_0x22569c(0x1c2)]['includes'](_0x22569c(0x1cb)))return![];}return![];}function a364_0xaff7(_0x2f21d3,_0x10d111){_0x2f21d3=_0x2f21d3-0x1c2;const _0x4c5917=a364_0x4c59();let _0xaff703=_0x4c5917[_0x2f21d3];return _0xaff703;}function sleep(_0x36041d){return new Promise(_0x5bdd04=>setTimeout(_0x5bdd04,_0x36041d));}export function validateUrl(_0x57d582){try{return new URL(_0x57d582),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a365_0x3366(_0x5a99c8,_0x5b907a){_0x5a99c8=_0x5a99c8-0x199;const _0x72013e=a365_0x7201();let _0x3366a8=_0x72013e[_0x5a99c8];return _0x3366a8;}function a365_0x7201(){const _0x24e76d=['65176xEBrKa','247323gEoFzp','623rZYCzS','5419030vbcDCM','6KFNmXT','stdin','20jPTcAx','true','1516113ajFIlH','2034681fmdLTo','stdout','isTTY','1088874rRmYdz','3267288hQQxVz','setRawMode','4DkxIZN'];a365_0x7201=function(){return _0x24e76d;};return a365_0x7201();}(function(_0x87cf09,_0x48da4f){const _0x52a2dc=a365_0x3366,_0x38ef3a=_0x87cf09();while(!![]){try{const _0x25e802=-parseInt(_0x52a2dc(0x199))/0x1*(parseInt(_0x52a2dc(0x19c))/0x2)+-parseInt(_0x52a2dc(0x1a4))/0x3+-parseInt(_0x52a2dc(0x1a7))/0x4*(-parseInt(_0x52a2dc(0x19b))/0x5)+parseInt(_0x52a2dc(0x1a5))/0x6+parseInt(_0x52a2dc(0x19a))/0x7*(parseInt(_0x52a2dc(0x1a8))/0x8)+-parseInt(_0x52a2dc(0x1a0))/0x9+parseInt(_0x52a2dc(0x19e))/0xa*(-parseInt(_0x52a2dc(0x1a1))/0xb);if(_0x25e802===_0x48da4f)break;else _0x38ef3a['push'](_0x38ef3a['shift']());}catch(_0xfc499f){_0x38ef3a['push'](_0x38ef3a['shift']());}}}(a365_0x7201,0xad5df));function env(_0x39d8a8){return process.env[`RABETBASE_${_0x39d8a8}`]||process.env[`LOVRABET_${_0x39d8a8}`]||undefined;}export function isNonInteractive(_0x263fc1){const _0x5251b9=a365_0x3366;return!!(_0x263fc1['nonInteractive']||_0x263fc1['ci']||env('CI')===_0x5251b9(0x19f)||process.env.CI===_0x5251b9(0x19f)||!process[_0x5251b9(0x1a2)][_0x5251b9(0x1a3)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x3fc31f=a365_0x3366;if(!process[_0x3fc31f(0x19d)]['isTTY'])return![];try{const _0x57ba58=process[_0x3fc31f(0x19d)]['isRaw'];return process['stdin']['setRawMode'](!![]),process[_0x3fc31f(0x19d)][_0x3fc31f(0x1a6)](_0x57ba58??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a366_0x3ebe(){const _0x33df85=['split','success','4008RwWCqJ','readLogs','blue','error','existsSync','stringify','warn','Completed:\x20','logFilePath','888GvrwFu','928020iblRBR','message','Failed\x20to\x20clear\x20logs:','combine','command','level','setRawCommand','358DPOYqr','details','1182sGnDmK','Starting:\x20','setLogPath','winstonLogger','23645YIaqgf','parse','23429vIRtrE','63668136lHMHHp','filter','printf','22cuIgJV','70TuQRCj','currentRawCommand','createLogger','timestamp','Failed\x20to\x20read\x20logs:','initWinstonLogger','errors','dirname','163341kBELDC','info','map','8271LlTivF','Failed:\x20','clearLogs','15612uzrvlz','now','duration','green','join','yellow','format','mkdirSync','utf8','toISOString','rawCommand','red','readFileSync','13CkzSnz','logTask'];a366_0x3ebe=function(){return _0x33df85;};return a366_0x3ebe();}const a366_0x993588=a366_0x24b7;(function(_0x4002a8,_0x368494){const _0x130cf3=a366_0x24b7,_0x50befa=_0x4002a8();while(!![]){try{const _0x193c58=-parseInt(_0x130cf3(0x19c))/0x1*(parseInt(_0x130cf3(0x184))/0x2)+-parseInt(_0x130cf3(0x19f))/0x3*(parseInt(_0x130cf3(0x17c))/0x4)+-parseInt(_0x130cf3(0x18a))/0x5*(-parseInt(_0x130cf3(0x186))/0x6)+parseInt(_0x130cf3(0x18c))/0x7*(-parseInt(_0x130cf3(0x173))/0x8)+parseInt(_0x130cf3(0x199))/0x9*(-parseInt(_0x130cf3(0x191))/0xa)+-parseInt(_0x130cf3(0x190))/0xb*(parseInt(_0x130cf3(0x17d))/0xc)+-parseInt(_0x130cf3(0x16f))/0xd*(-parseInt(_0x130cf3(0x18d))/0xe);if(_0x193c58===_0x368494)break;else _0x50befa['push'](_0x50befa['shift']());}catch(_0x4ccce3){_0x50befa['push'](_0x50befa['shift']());}}}(a366_0x3ebe,0xd80f4));import a366_0x2c1dcf from'winston';function a366_0x24b7(_0x4b841a,_0x2402c5){_0x4b841a=_0x4b841a-0x168;const _0x3ebe22=a366_0x3ebe();let _0x24b741=_0x3ebe22[_0x4b841a];return _0x24b741;}import a366_0x35493a from'node:fs';import a366_0x1b1ac6 from'node:path';class Logger{['winstonLogger'];[a366_0x993588(0x17b)];[a366_0x993588(0x192)]='';constructor(){const _0x4f9cb9=a366_0x993588;this[_0x4f9cb9(0x17b)]='';}[a366_0x993588(0x183)](_0x2dd2b8){const _0x3ad4fc=a366_0x993588;this[_0x3ad4fc(0x192)]=_0x2dd2b8;}[a366_0x993588(0x196)](){const _0x13779c=a366_0x993588,_0xc87c7a=a366_0x1b1ac6[_0x13779c(0x198)](this[_0x13779c(0x17b)]);!a366_0x35493a[_0x13779c(0x177)](_0xc87c7a)&&a366_0x35493a[_0x13779c(0x169)](_0xc87c7a,{'recursive':!![]});const _0x1cd13f=a366_0x2c1dcf[_0x13779c(0x168)][_0x13779c(0x180)](a366_0x2c1dcf[_0x13779c(0x168)][_0x13779c(0x194)](),a366_0x2c1dcf['format'][_0x13779c(0x197)]({'stack':!![]}),a366_0x2c1dcf['format'][_0x13779c(0x18f)](_0x1ffceb=>{const _0x46730a=_0x13779c,_0x1c3a19={'timestamp':_0x1ffceb[_0x46730a(0x194)]||new Date()[_0x46730a(0x16b)](),'level':_0x1ffceb[_0x46730a(0x182)]||_0x46730a(0x19a),'command':_0x1ffceb[_0x46730a(0x181)]||'unknown','rawCommand':_0x1ffceb[_0x46730a(0x16c)]||this[_0x46730a(0x192)]||undefined,'message':_0x1ffceb['message']||'','duration':_0x1ffceb[_0x46730a(0x1a1)]||undefined,'details':_0x1ffceb[_0x46730a(0x185)]||undefined};return JSON[_0x46730a(0x178)](_0x1c3a19);}));this[_0x13779c(0x189)]=a366_0x2c1dcf[_0x13779c(0x193)]({'level':_0x13779c(0x19a),'format':_0x1cd13f,'transports':[new a366_0x2c1dcf['transports']['File']({'filename':this['logFilePath'],'level':_0x13779c(0x19a)})],'silent':![]}),a366_0x2c1dcf['addColors']({'success':_0x13779c(0x1a2),'error':_0x13779c(0x16d),'warn':_0x13779c(0x1a4),'info':_0x13779c(0x175)});}[a366_0x993588(0x188)](_0x56a3e4){const _0x332bf5=a366_0x993588;this[_0x332bf5(0x17b)]=a366_0x1b1ac6[_0x332bf5(0x1a3)](_0x56a3e4,'.lovrabet.log'),this[_0x332bf5(0x189)]&&this[_0x332bf5(0x189)]['clear'](),this[_0x332bf5(0x196)]();}[a366_0x993588(0x19a)](_0x41d294,_0x2e278e,_0x136362){const _0xa3dc35=a366_0x993588;if(!this[_0xa3dc35(0x17b)]||!this[_0xa3dc35(0x189)])return;this[_0xa3dc35(0x189)][_0xa3dc35(0x19a)](_0x2e278e,{'command':_0x41d294,'details':_0x136362});}[a366_0x993588(0x172)](_0xe0dde9,_0x2bce90,_0x26cd15,_0x4a5b8f){const _0x547183=a366_0x993588;if(!this['logFilePath']||!this[_0x547183(0x189)])return;this[_0x547183(0x189)]['log'](_0x547183(0x19a),_0x2bce90,{'level':_0x547183(0x172),'command':_0xe0dde9,'duration':_0x26cd15,'details':_0x4a5b8f});}['error'](_0x49a43a,_0x13b7f1,_0x415b99){const _0x5d6798=a366_0x993588;if(!this[_0x5d6798(0x17b)]||!this[_0x5d6798(0x189)])return;this['winstonLogger'][_0x5d6798(0x176)](_0x13b7f1,{'command':_0x49a43a,'details':_0x415b99});}['warn'](_0x2a130c,_0x17047c,_0x4de16b){const _0x4fe9e4=a366_0x993588;if(!this[_0x4fe9e4(0x17b)]||!this[_0x4fe9e4(0x189)])return;this[_0x4fe9e4(0x189)]['warn'](_0x17047c,{'command':_0x2a130c,'details':_0x4de16b});}async[a366_0x993588(0x170)](_0x2228cd,_0x5b53f5,_0x6b456e){const _0x5e8eff=a366_0x993588,_0x1aa5e0=Date[_0x5e8eff(0x1a0)]();this[_0x5e8eff(0x19a)](_0x2228cd,_0x5e8eff(0x187)+_0x5b53f5);try{const _0x31b62b=await _0x6b456e(),_0x2a4af5=Date[_0x5e8eff(0x1a0)]()-_0x1aa5e0;return this['success'](_0x2228cd,_0x5e8eff(0x17a)+_0x5b53f5,_0x2a4af5),_0x31b62b;}catch(_0x50fb7a){const _0x58bff0=Date['now']()-_0x1aa5e0;this[_0x5e8eff(0x176)](_0x2228cd,_0x5e8eff(0x19d)+_0x5b53f5,{'error':_0x50fb7a instanceof Error?_0x50fb7a[_0x5e8eff(0x17e)]:String(_0x50fb7a),'duration':_0x58bff0});throw _0x50fb7a;}}[a366_0x993588(0x174)](){const _0x527b6c=a366_0x993588;try{if(!a366_0x35493a[_0x527b6c(0x177)](this[_0x527b6c(0x17b)]))return[];const _0x8dd738=a366_0x35493a[_0x527b6c(0x16e)](this[_0x527b6c(0x17b)],_0x527b6c(0x16a));return _0x8dd738[_0x527b6c(0x171)]('\x0a')[_0x527b6c(0x18e)](_0x51aec9=>_0x51aec9['trim']())[_0x527b6c(0x19b)](_0x43ad0c=>JSON[_0x527b6c(0x18b)](_0x43ad0c));}catch(_0x24389f){return console[_0x527b6c(0x179)](_0x527b6c(0x195),_0x24389f),[];}}[a366_0x993588(0x19e)](){const _0x136ea1=a366_0x993588;try{a366_0x35493a['existsSync'](this[_0x136ea1(0x17b)])&&a366_0x35493a['writeFileSync'](this['logFilePath'],'',_0x136ea1(0x16a));}catch(_0x24f798){console[_0x136ea1(0x179)](_0x136ea1(0x17f),_0x24f798);}}['getWinstonInstance'](){const _0x2bf410=a366_0x993588;return this[_0x2bf410(0x189)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a367_0x2fa2(){const _0x2067c2=['228936HIcTEA','2408982JHWBQL','4QSsLDi','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','12gzvOia','parse','427MjNUyY','150nbknbT','182924OtyVVD','11945527xQMhpN','object','313083HJhMTh','Invalid\x20JSON\x20for\x20--params:\x20','55459209ibYwbW','10998npIqcm','8YbYKZm','4695BUnaRF','validation','--params\x20must\x20be\x20a\x20JSON\x20object'];a367_0x2fa2=function(){return _0x2067c2;};return a367_0x2fa2();}function a367_0x4206(_0x300d71,_0x3e3309){_0x300d71=_0x300d71-0xa8;const _0x2fa243=a367_0x2fa2();let _0x420657=_0x2fa243[_0x300d71];return _0x420657;}(function(_0xce6565,_0x3b1a71){const _0x5455c8=a367_0x4206,_0x191511=_0xce6565();while(!![]){try{const _0x360b6d=parseInt(_0x5455c8(0xae))/0x1*(-parseInt(_0x5455c8(0xb5))/0x2)+parseInt(_0x5455c8(0xba))/0x3*(parseInt(_0x5455c8(0xa8))/0x4)+parseInt(_0x5455c8(0xb6))/0x5*(parseInt(_0x5455c8(0xb4))/0x6)+-parseInt(_0x5455c8(0xac))/0x7*(-parseInt(_0x5455c8(0xb9))/0x8)+parseInt(_0x5455c8(0xb1))/0x9*(parseInt(_0x5455c8(0xad))/0xa)+parseInt(_0x5455c8(0xaf))/0xb*(parseInt(_0x5455c8(0xaa))/0xc)+-parseInt(_0x5455c8(0xb3))/0xd;if(_0x360b6d===_0x3b1a71)break;else _0x191511['push'](_0x191511['shift']());}catch(_0x2a36a0){_0x191511['push'](_0x191511['shift']());}}}(a367_0x2fa2,0xd6caf));import{CliErrors}from'../errors.js';export function parseJsonParams(_0xee5f0a){const _0x1cecd2=a367_0x4206;if(!_0xee5f0a)return undefined;let _0x720fc1;try{_0x720fc1=JSON[_0x1cecd2(0xab)](_0xee5f0a);}catch{throw CliErrors[_0x1cecd2(0xb7)](_0x1cecd2(0xb2)+_0xee5f0a);}if(!_0x720fc1||typeof _0x720fc1!==_0x1cecd2(0xb0)||Array['isArray'](_0x720fc1))throw CliErrors['validation'](_0x1cecd2(0xb8),_0x1cecd2(0xa9));return _0x720fc1;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a368_0x5d32b9=a368_0x48ea;function a368_0x48ea(_0x133547,_0x3fd82b){_0x133547=_0x133547-0x1de;const _0x2a27d2=a368_0x2a27();let _0x48ea5c=_0x2a27d2[_0x133547];return _0x48ea5c;}(function(_0x584d32,_0x232c97){const _0x221b88=a368_0x48ea,_0x479cae=_0x584d32();while(!![]){try{const _0x3f03d2=-parseInt(_0x221b88(0x1e9))/0x1*(parseInt(_0x221b88(0x1e1))/0x2)+parseInt(_0x221b88(0x1e0))/0x3*(parseInt(_0x221b88(0x1e7))/0x4)+parseInt(_0x221b88(0x1de))/0x5+-parseInt(_0x221b88(0x1df))/0x6+-parseInt(_0x221b88(0x1e4))/0x7+-parseInt(_0x221b88(0x1e5))/0x8+-parseInt(_0x221b88(0x1e2))/0x9*(-parseInt(_0x221b88(0x1e8))/0xa);if(_0x3f03d2===_0x232c97)break;else _0x479cae['push'](_0x479cae['shift']());}catch(_0x59499d){_0x479cae['push'](_0x479cae['shift']());}}}(a368_0x2a27,0x4e3aa));export const isWindows=process[a368_0x5d32b9(0x1e6)]===a368_0x5d32b9(0x1ea);export function resolveNpmBin(_0x518134){const _0x4e7330=a368_0x5d32b9;return isWindows?_0x518134+_0x4e7330(0x1e3):_0x518134;}function a368_0x2a27(){const _0x2cee4e=['2759865TuQkSs','515052ZJIWId','63Jecxvb','2hycdLr','99ZBvcPK','.cmd','2883202vDFPdQ','2119488mybqIK','platform','12356GwLkvj','909290RroaBY','533971KVtIza','win32'];a368_0x2a27=function(){return _0x2cee4e;};return a368_0x2a27();}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x4089f7){return new Promise(_0x1b5c1f=>setTimeout(_0x1b5c1f,_0x4089f7));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a370_0x400957=a370_0x1e7f;(function(_0x5c9324,_0xbed3a3){const _0x417988=a370_0x1e7f,_0x20668a=_0x5c9324();while(!![]){try{const _0x550181=-parseInt(_0x417988(0x163))/0x1*(parseInt(_0x417988(0x13b))/0x2)+-parseInt(_0x417988(0x17c))/0x3+parseInt(_0x417988(0x139))/0x4+-parseInt(_0x417988(0x16a))/0x5*(-parseInt(_0x417988(0x153))/0x6)+parseInt(_0x417988(0x157))/0x7+-parseInt(_0x417988(0x179))/0x8*(parseInt(_0x417988(0x158))/0x9)+parseInt(_0x417988(0x171))/0xa;if(_0x550181===_0xbed3a3)break;else _0x20668a['push'](_0x20668a['shift']());}catch(_0x38b321){_0x20668a['push'](_0x20668a['shift']());}}}(a370_0x8336,0x6b0fe));import a370_0x4bef0a from'node:fs';function a370_0x1e7f(_0x3e7158,_0x7d45f1){_0x3e7158=_0x3e7158-0x138;const _0x8336a9=a370_0x8336();let _0x1e7f6a=_0x8336a9[_0x3e7158];return _0x1e7f6a;}function a370_0x8336(){const _0x4a3a69=['2389324XAMYNa','3073014MuHWnp','getDate','datasetCode:\x20\x22','replaceApiContent','promises','\x0a\x20\x20\x20\x20{\x20','processTemplate','alias','split','padStart','readdir','657473bJcnLr','extname','LOVRABET','.css','getSeconds','.json','Starting\x20template\x20content\x20replacement','2490nmtXEU','pad','push','.tpl','toDisplayTitle','now','template','13367330GmSXmu','replace','tableName','.tsx','.ts','slice','formatLocalTimestamp','datasetCode','8TlKYwP','Template\x20content\x20replacement\x20completed','info','2355594eqaMpU','tableName:\x20\x22','processFile','1419360eHjbRR','map','2PGkGOH','name','processDirectory','default','getMonth','toUpperCase','toLowerCase','getHours','.jsx','utf8','api','replaceContent','join','alias:\x20\x22','includes','YourModel','Template\x20content\x20replacement\x20failed','pop','endsWith','.md','.js','isDirectory','charAt','readFile','2286JpfouC','toISOString','mkdir','copyFile'];a370_0x8336=function(){return _0x4a3a69;};return a370_0x8336();}import a370_0x4a2a84 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a370_0x400957(0x16b)](_0x2534c8){const _0x583911=a370_0x400957;return String(_0x2534c8)[_0x583911(0x161)](0x2,'0');}static[a370_0x400957(0x177)](_0x67e26){const _0x2f85ce=a370_0x400957,_0x14da8e=_0x67e26['getFullYear'](),_0x4a345e=this[_0x2f85ce(0x16b)](_0x67e26[_0x2f85ce(0x13f)]()+0x1),_0x1be08c=this[_0x2f85ce(0x16b)](_0x67e26[_0x2f85ce(0x159)]()),_0x3c5274=this[_0x2f85ce(0x16b)](_0x67e26[_0x2f85ce(0x142)]()),_0x402eb8=this[_0x2f85ce(0x16b)](_0x67e26['getMinutes']()),_0x16455f=this[_0x2f85ce(0x16b)](_0x67e26[_0x2f85ce(0x167)]());return{'createdAt':_0x14da8e+'-'+_0x4a345e+'-'+_0x1be08c+'\x20'+_0x3c5274+':'+_0x402eb8+':'+_0x16455f,'createdDate':_0x14da8e+'-'+_0x4a345e+'-'+_0x1be08c,'createdTime':_0x3c5274+':'+_0x402eb8+':'+_0x16455f};}static['toComponentName'](_0x136b68){const _0x3759dd=a370_0x400957,_0x1c3e16=_0x136b68[_0x3759dd(0x160)]('/')[_0x3759dd(0x14c)]()||_0x136b68;return _0x1c3e16[_0x3759dd(0x160)]('-')[_0x3759dd(0x13a)](_0x37a855=>_0x37a855[_0x3759dd(0x151)](0x0)[_0x3759dd(0x140)]()+_0x37a855['slice'](0x1)['toLowerCase']())[_0x3759dd(0x147)]('');}static[a370_0x400957(0x16e)](_0x10012d){const _0x2fa257=a370_0x400957,_0x1227ca=_0x10012d[_0x2fa257(0x160)]('/')[_0x2fa257(0x14c)]()||_0x10012d;return _0x1227ca[_0x2fa257(0x160)]('-')[_0x2fa257(0x13a)](_0x37ff27=>_0x37ff27['charAt'](0x0)['toUpperCase']()+_0x37ff27[_0x2fa257(0x176)](0x1)[_0x2fa257(0x141)]())['join']('\x20');}static[a370_0x400957(0x146)](_0x938964,_0x459135,_0x1491ab){const _0x29ce0e=a370_0x400957,_0x293057=this['toComponentName'](_0x459135),_0x4ea090=this[_0x29ce0e(0x16e)](_0x459135),{createdAt:_0x4f3678,createdDate:_0x55ef79,createdTime:_0xce9627}=this[_0x29ce0e(0x177)](new Date());let _0x8fc033=_0x938964[_0x29ce0e(0x172)](/\{CliVersion\}/g,CLI_VERSION)[_0x29ce0e(0x172)](/\{ComponentName\}/g,_0x293057)[_0x29ce0e(0x172)](/\{DisplayTitle\}/g,_0x4ea090)['replace'](/\{PageName\}/g,_0x459135)[_0x29ce0e(0x172)](/\{TemplateName\}/g,_0x1491ab)[_0x29ce0e(0x172)](/\{CreatedAt\}/g,_0x4f3678)[_0x29ce0e(0x172)](/\{CreatedDate\}/g,_0x55ef79)[_0x29ce0e(0x172)](/\{CreatedTime\}/g,_0xce9627);return _0x8fc033;}static[a370_0x400957(0x15b)](_0x586989,_0x319216,_0x138dc3,_0x3d61a2,_0x3e3ff2,_0x318049,_0x32b871,_0x2839ae,_0x4c221b){const _0x1f8e24=a370_0x400957,_0xdd544=new Date(),_0x499260=_0xdd544[_0x1f8e24(0x154)](),_0x26eadd=_0x138dc3['map'](_0x23be39=>{const _0x5182a3=_0x1f8e24,_0xa60e5e=[_0x5182a3(0x15a)+_0x23be39[_0x5182a3(0x178)]+'\x22',_0x5182a3(0x17d)+_0x23be39[_0x5182a3(0x173)]+'\x22','name:\x20\x22'+_0x23be39[_0x5182a3(0x13c)]+'\x22'];return _0x23be39[_0x5182a3(0x15f)]&&_0xa60e5e[_0x5182a3(0x16c)](_0x5182a3(0x148)+_0x23be39[_0x5182a3(0x15f)]+'\x22'),_0x5182a3(0x15d)+_0xa60e5e[_0x5182a3(0x147)](',\x20')+'\x20},';})[_0x1f8e24(0x147)](''),_0x1f8268=_0x3d61a2||_0x138dc3[0x0]?.['alias']||_0x1f8e24(0x14a);let _0x424e40=_0x586989['replace'](/\{AppCode\}/g,_0x319216)[_0x1f8e24(0x172)](/\{ModelConfigs\}/g,_0x26eadd)[_0x1f8e24(0x172)](/\{ExampleModelName\}/g,_0x1f8268)[_0x1f8e24(0x172)](/\{ApiFileName\}/g,_0x3e3ff2||_0x1f8e24(0x145))[_0x1f8e24(0x172)](/\{ConfigName\}/g,_0x318049||_0x1f8e24(0x13e))['replace'](/\{ClientConfigParam\}/g,_0x32b871||'')[_0x1f8e24(0x172)](/\{SdkConfigFileName\}/g,_0x4c221b||'sdk-config')[_0x1f8e24(0x172)](/\{VarPrefix\}/g,_0x2839ae||_0x1f8e24(0x165))['replace'](/\{CreatedAt\}/g,_0x499260);return _0x424e40;}static async[a370_0x400957(0x15e)](_0x4e9a26,_0x25a9bf,_0x4d3e06,_0x30ee9c,_0x268e7a=!![]){const _0x3b6141=a370_0x400957,_0x4a0018=Date[_0x3b6141(0x16f)]();try{_0x268e7a&&logger[_0x3b6141(0x17b)](_0x3b6141(0x170),_0x3b6141(0x169),{'templatePath':_0x4e9a26,'targetPath':_0x25a9bf,'pageName':_0x4d3e06,'templateName':_0x30ee9c});await a370_0x4bef0a[_0x3b6141(0x15c)][_0x3b6141(0x155)](_0x25a9bf,{'recursive':!![]}),await this[_0x3b6141(0x13d)](_0x4e9a26,_0x25a9bf,_0x4d3e06,_0x30ee9c);if(_0x268e7a){const _0x49ed18=Date[_0x3b6141(0x16f)]()-_0x4a0018;logger['success'](_0x3b6141(0x170),_0x3b6141(0x17a),_0x49ed18,{'pageName':_0x4d3e06,'templateName':_0x30ee9c});}}catch(_0x153647){if(_0x268e7a){const _0x59575d=Date[_0x3b6141(0x16f)]()-_0x4a0018;logger['error'](_0x3b6141(0x170),_0x3b6141(0x14b),{'templatePath':_0x4e9a26,'targetPath':_0x25a9bf,'pageName':_0x4d3e06,'templateName':_0x30ee9c,'error':_0x153647 instanceof Error?_0x153647['message']:String(_0x153647),'duration':_0x59575d});}throw _0x153647;}}static async[a370_0x400957(0x13d)](_0x357216,_0x19dd29,_0x177d90,_0x567f91){const _0x54e89d=a370_0x400957,_0x2ce5f5=await a370_0x4bef0a['promises'][_0x54e89d(0x162)](_0x357216,{'withFileTypes':!![]});for(const _0x39114b of _0x2ce5f5){const _0x13e14d=a370_0x4a2a84['join'](_0x357216,_0x39114b[_0x54e89d(0x13c)]);let _0x56d4a7=a370_0x4a2a84[_0x54e89d(0x147)](_0x19dd29,_0x39114b[_0x54e89d(0x13c)]);_0x39114b[_0x54e89d(0x13c)][_0x54e89d(0x14d)](_0x54e89d(0x16d))&&(_0x56d4a7=a370_0x4a2a84['join'](_0x19dd29,_0x39114b[_0x54e89d(0x13c)][_0x54e89d(0x172)](/\.tpl$/,'')));if(_0x39114b[_0x54e89d(0x150)]())await a370_0x4bef0a['promises'][_0x54e89d(0x155)](_0x56d4a7,{'recursive':!![]}),await this[_0x54e89d(0x13d)](_0x13e14d,_0x56d4a7,_0x177d90,_0x567f91);else _0x39114b['isFile']()&&await this[_0x54e89d(0x138)](_0x13e14d,_0x56d4a7,_0x177d90,_0x567f91);}}static async[a370_0x400957(0x138)](_0x33c5c9,_0x3ec2c7,_0x14e900,_0x13f211){const _0x4ce284=a370_0x400957,_0x3fd17f=a370_0x4a2a84[_0x4ce284(0x164)](_0x33c5c9)[_0x4ce284(0x141)]();_0x33c5c9[_0x4ce284(0x14d)](_0x4ce284(0x16d))&&(_0x3ec2c7=_0x3ec2c7[_0x4ce284(0x172)](/\.tpl$/,''));const _0x3165e6=[_0x4ce284(0x174),_0x4ce284(0x175),_0x4ce284(0x143),_0x4ce284(0x14f),_0x4ce284(0x168),_0x4ce284(0x14e),_0x4ce284(0x166),'.scss',_0x4ce284(0x16d)];if(_0x3165e6[_0x4ce284(0x149)](_0x3fd17f)||_0x33c5c9['endsWith'](_0x4ce284(0x16d))){const _0x3e3a72=await a370_0x4bef0a[_0x4ce284(0x15c)][_0x4ce284(0x152)](_0x33c5c9,_0x4ce284(0x144)),_0x2a2fa5=this['replaceContent'](_0x3e3a72,_0x14e900,_0x13f211);await a370_0x4bef0a[_0x4ce284(0x15c)]['writeFile'](_0x3ec2c7,_0x2a2fa5,_0x4ce284(0x144));}else await a370_0x4bef0a[_0x4ce284(0x15c)][_0x4ce284(0x156)](_0x33c5c9,_0x3ec2c7);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a371_0x3eeb(_0x34677c,_0x5e664b){_0x34677c=_0x34677c-0x1a5;const _0x2153ef=a371_0x2153();let _0x3eeb62=_0x2153ef[_0x34677c];return _0x3eeb62;}(function(_0x407e36,_0x34abb5){const _0x155a84=a371_0x3eeb,_0x7abff4=_0x407e36();while(!![]){try{const _0x3bf5e6=parseInt(_0x155a84(0x1bf))/0x1+-parseInt(_0x155a84(0x1b6))/0x2*(-parseInt(_0x155a84(0x1b3))/0x3)+-parseInt(_0x155a84(0x1bd))/0x4*(-parseInt(_0x155a84(0x1b4))/0x5)+parseInt(_0x155a84(0x1a6))/0x6*(-parseInt(_0x155a84(0x1c0))/0x7)+parseInt(_0x155a84(0x1a5))/0x8+parseInt(_0x155a84(0x1b8))/0x9*(-parseInt(_0x155a84(0x1af))/0xa)+parseInt(_0x155a84(0x1ab))/0xb;if(_0x3bf5e6===_0x34abb5)break;else _0x7abff4['push'](_0x7abff4['shift']());}catch(_0x2b65da){_0x7abff4['push'](_0x7abff4['shift']());}}}(a371_0x2153,0x673e8));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a371_0x2dd7c0 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 _0x2f32fd=a371_0x3eeb,_0x49b8ab=process.env.RABETBASE_NO_UPDATE_NOTICE?.['trim']()['toLowerCase']();return _0x49b8ab==='1'||_0x49b8ab===_0x2f32fd(0x1b7)||_0x49b8ab===_0x2f32fd(0x1c6);}function cacheRoot(){const _0x3a84b3=a371_0x3eeb;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x3a84b3(0x1bc));}export function getUpdateNoticeCachePath(){const _0x802914=a371_0x3eeb;return join(cacheRoot(),_0x802914(0x1c4),_0x802914(0x1ae));}async function readUpdateNoticeCache(){const _0x5a0997=a371_0x3eeb;try{const _0xdf42bd=await readFile(getUpdateNoticeCachePath(),_0x5a0997(0x1bb)),_0x36e76d=JSON[_0x5a0997(0x1a7)](_0xdf42bd);if(!_0x36e76d||typeof _0x36e76d!==_0x5a0997(0x1ac))return{};return _0x36e76d;}catch{return{};}}async function writeUpdateNoticeCache(_0x37a9ea){const _0x4409a9=a371_0x3eeb;try{const _0x2f9b98=getUpdateNoticeCachePath();await mkdir(dirname(_0x2f9b98),{'recursive':!![]}),await writeFile(_0x2f9b98,JSON[_0x4409a9(0x1ba)](_0x37a9ea,null,0x2)+'\x0a',_0x4409a9(0x1bb));}catch{}}function isFreshCheck(_0x3b7396,_0x4d2d8b){const _0x7f799=a371_0x3eeb;return typeof _0x3b7396['checkedAt']===_0x7f799(0x1b1)&&_0x4d2d8b-_0x3b7396[_0x7f799(0x1c5)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x3f8c82,_0xac3a40,_0x1a9006){const _0x1a14c6=a371_0x3eeb;return _0x3f8c82[_0x1a14c6(0x1b0)]===_0xac3a40&&typeof _0x3f8c82[_0x1a14c6(0x1c3)]==='number'&&_0x1a9006-_0x3f8c82[_0x1a14c6(0x1c3)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x1c07a8){const _0x433094=a371_0x3eeb;return _0x433094(0x1aa)+NPM_PACKAGE_NAME+_0x433094(0x1b9)+_0x1c07a8;}export async function resolveLatestUpdateNotice(){const _0x147e7a=a371_0x3eeb;if(isUpdateNoticeDisabled())return null;try{const _0x2fe202=Date['now'](),_0x3b4253=getCliVersion(),_0x2ec424=await readUpdateNoticeCache();let _0x41cc5a=isFreshCheck(_0x2ec424,_0x2fe202)?_0x2ec424[_0x147e7a(0x1a9)]?.[_0x147e7a(0x1b2)]():undefined;if(!_0x41cc5a&&!isFreshCheck(_0x2ec424,_0x2fe202)){const _0x19b296=await getCliVersionPolicy();_0x41cc5a=_0x19b296?.[_0x147e7a(0x1c1)]?.[_0x147e7a(0x1b2)]()||undefined,await writeUpdateNoticeCache({..._0x2ec424,'checkedAt':_0x2fe202,'latest':_0x41cc5a,'failed':!_0x41cc5a});}if(!_0x41cc5a||!a371_0x2dd7c0[_0x147e7a(0x1c2)](_0x3b4253)||!a371_0x2dd7c0[_0x147e7a(0x1c2)](_0x41cc5a))return null;if(a371_0x2dd7c0[_0x147e7a(0x1ad)](_0x3b4253,_0x41cc5a))return null;if(isRecentlyNotified(_0x2ec424,_0x41cc5a,_0x2fe202))return null;const _0x20aecd=CLI_BIN_NAME+_0x147e7a(0x1a8);return await writeUpdateNoticeCache({..._0x2ec424,'checkedAt':isFreshCheck(_0x2ec424,_0x2fe202)?_0x2ec424[_0x147e7a(0x1c5)]:_0x2fe202,'latest':_0x41cc5a,'failed':![],'lastNotifiedVersion':_0x41cc5a,'lastNotifiedAt':_0x2fe202}),{'command':_0x20aecd,'current':_0x3b4253,'latest':_0x41cc5a,'url':buildNpmVersionUrl(_0x41cc5a),'message':CLI_BIN_NAME+'\x20'+_0x41cc5a+_0x147e7a(0x1be)+_0x3b4253+_0x147e7a(0x1b5)+_0x20aecd};}catch{return null;}}function a371_0x2153(){const _0x31ebfc=['4997322Xfkfvo','object','gte','update-check.json','30INamTm','lastNotifiedVersion','number','trim','3zlSqoS','70gcVnfr',',\x20run:\x20','395842abVqnb','true','1755693NvgUVD','/v/','stringify','utf8','.cache','38444zctwuH','\x20available,\x20current\x20','446181cXEPkj','7aMyfxZ','stableVersion','valid','lastNotifiedAt','rabetbase-cli','checkedAt','yes','1279184DNGkto','2308422ctOfpm','parse','\x20update','latest','https://www.npmjs.com/package/'];a371_0x2153=function(){return _0x31ebfc;};return a371_0x2153();}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x124a31,_0x2734fe){var _0x166c02=a372_0x313a,_0x2a4256=_0x124a31();while(!![]){try{var _0x47afaf=-parseInt(_0x166c02(0x18e))/0x1*(parseInt(_0x166c02(0x191))/0x2)+parseInt(_0x166c02(0x193))/0x3*(parseInt(_0x166c02(0x18d))/0x4)+parseInt(_0x166c02(0x198))/0x5*(-parseInt(_0x166c02(0x190))/0x6)+-parseInt(_0x166c02(0x197))/0x7*(-parseInt(_0x166c02(0x196))/0x8)+parseInt(_0x166c02(0x18f))/0x9+parseInt(_0x166c02(0x199))/0xa*(-parseInt(_0x166c02(0x192))/0xb)+parseInt(_0x166c02(0x194))/0xc*(parseInt(_0x166c02(0x195))/0xd);if(_0x47afaf===_0x2734fe)break;else _0x2a4256['push'](_0x2a4256['shift']());}catch(_0x1c8c2a){_0x2a4256['push'](_0x2a4256['shift']());}}}(a372_0x245b,0x6c26e));function a372_0x313a(_0x4be92f,_0xdc75ee){_0x4be92f=_0x4be92f-0x18d;var _0x245b1c=a372_0x245b();var _0x313ad4=_0x245b1c[_0x4be92f];return _0x313ad4;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a372_0x245b(){var _0x50ff94=['35Stnmch','50WXFNmv','32756TmaqBh','137519NIqaCQ','4646970kQQtmE','290640lcFYhx','10mXOFHq','1148191zCrFni','186WqVbqv','46380sfUbni','2327IUHeXb','8AgSWBD','1929809ZSTUPO'];a372_0x245b=function(){return _0x50ff94;};return a372_0x245b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x109bda,_0x87fdae){var _0x424d3b=a373_0x4f7f,_0x21c42d=_0x109bda();while(!![]){try{var _0x3aa8c3=parseInt(_0x424d3b(0xcd))/0x1+parseInt(_0x424d3b(0xcf))/0x2*(parseInt(_0x424d3b(0xd4))/0x3)+-parseInt(_0x424d3b(0xd1))/0x4+-parseInt(_0x424d3b(0xca))/0x5*(-parseInt(_0x424d3b(0xc9))/0x6)+parseInt(_0x424d3b(0xd2))/0x7*(-parseInt(_0x424d3b(0xd3))/0x8)+parseInt(_0x424d3b(0xd0))/0x9*(parseInt(_0x424d3b(0xcb))/0xa)+-parseInt(_0x424d3b(0xcc))/0xb*(parseInt(_0x424d3b(0xce))/0xc);if(_0x3aa8c3===_0x87fdae)break;else _0x21c42d['push'](_0x21c42d['shift']());}catch(_0x1c91a7){_0x21c42d['push'](_0x21c42d['shift']());}}}(a373_0x4b22,0x95cd6));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a373_0x4f7f(_0x34197e,_0x16c8bc){_0x34197e=_0x34197e-0xc9;var _0x4b22a5=a373_0x4b22();var _0x4f7f39=_0x4b22a5[_0x34197e];return _0x4f7f39;}function a373_0x4b22(){var _0x3f4d28=['1938huDNon','13445WQbILL','10TQrNux','592339RchvnV','1036203HwiHRf','564DzUDFY','34656fRsYfX','9843453qHKZLX','2009480zLzYoQ','234122yYZpcq','48mqUxKo','147YCpNZf'];a373_0x4b22=function(){return _0x3f4d28;};return a373_0x4b22();}export async function withActiveCookie(_0x20baf5,_0xf8f7ef){setActiveCookie(_0x20baf5);try{return await _0xf8f7ef();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a374_0x32e5(_0x3f5c38,_0x3c15bf){_0x3f5c38=_0x3f5c38-0x1e0;var _0x39f3e7=a374_0x39f3();var _0x32e527=_0x39f3e7[_0x3f5c38];return _0x32e527;}(function(_0x1fcbc9,_0x1acb33){var _0x24c930=a374_0x32e5,_0x2645ef=_0x1fcbc9();while(!![]){try{var _0x16623a=parseInt(_0x24c930(0x1e9))/0x1*(-parseInt(_0x24c930(0x1e7))/0x2)+parseInt(_0x24c930(0x1e2))/0x3+-parseInt(_0x24c930(0x1ea))/0x4*(parseInt(_0x24c930(0x1ec))/0x5)+parseInt(_0x24c930(0x1e6))/0x6*(-parseInt(_0x24c930(0x1e3))/0x7)+-parseInt(_0x24c930(0x1e4))/0x8*(parseInt(_0x24c930(0x1e1))/0x9)+-parseInt(_0x24c930(0x1e5))/0xa+parseInt(_0x24c930(0x1eb))/0xb;if(_0x16623a===_0x1acb33)break;else _0x2645ef['push'](_0x2645ef['shift']());}catch(_0x3cb4e4){_0x2645ef['push'](_0x2645ef['shift']());}}}(a374_0x39f3,0x454ea));export function writeCliSideChannelLine(_0x158958){var _0x57c4d1=a374_0x32e5;process[_0x57c4d1(0x1e8)][_0x57c4d1(0x1e0)](_0x158958+'\x0a');}function a374_0x39f3(){var _0x4c3f54=['926358OfZiEH','3662bZTdHr','stderr','1cMOzQH','124FErDyu','14428656hihWpS','61485OiPvtl','write','116892KiKYdV','1196244dBrZFX','21hurEvG','184tinyEw','2816210kZZRIn'];a374_0x39f3=function(){return _0x4c3f54;};return a374_0x39f3();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.7-beta.1",
|
|
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,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase
|
|
3
|
-
version: 2.5.
|
|
3
|
+
version: 2.5.7-beta.1
|
|
4
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, host frontend integration, frontend subapp resources, 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, host frontend integration, subapp resource versions, 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:
|
|
@@ -52,7 +52,7 @@ Agent 负责把已授权的目标推进到可验证的结果:主动获取事
|
|
|
52
52
|
## Agent 快速执行顺序
|
|
53
53
|
|
|
54
54
|
1. **判断需求类型**
|
|
55
|
-
- 用户要创建或设计审批流、工作流、业务流程或多级审批 → 先读 [`approval-flow-development-workflow.md`](guides/approval-flow-development-workflow.md)。用户未明确限定类型时,默认推荐独立工作流 `INDEPENDENT_FLOW`;只有明确是已有数据集表单提交后的纯审批,且不包含填写、补材料、执行或确认等办理步骤时,才选择 `FORM_FLOW`;再使用 `flow validate/create/update/publish`
|
|
55
|
+
- 用户要创建或设计审批流、工作流、业务流程或多级审批 → 先读 [`approval-flow-development-workflow.md`](guides/approval-flow-development-workflow.md)。用户未明确限定类型时,默认推荐独立工作流 `INDEPENDENT_FLOW`;只有明确是已有数据集表单提交后的纯审批,且不包含填写、补材料、执行或确认等办理步骤时,才选择 `FORM_FLOW`;再使用 `flow validate/create/update/publish`;表单绑定与运行页面提交见 [表单发起指南](guides/form-flow-start.md),可绑定页面用 `flow page-list` 查询
|
|
56
56
|
- Instant API 标准数据记录操作 → SDK filter/getOne/create/batchCreate/update/delete;批量更新使用 `update({ id: [...] })`,不存在 `batchUpdate()`
|
|
57
57
|
- 简单聚合且数据集是 DB_TABLE → SDK aggregate;聚合列用 `aggregate[].column`,不要用旧别名 `field`
|
|
58
58
|
- 同库 DB_TABLE 的复杂 JOIN / 数据库函数 → 评估 Custom SQL;跨库查询 → 按 [跨库 BFF 指南](guides/cross-database-bff.md)分别读取并拼接
|
|
@@ -80,6 +80,7 @@ Agent 负责把已授权的目标推进到可验证的结果:主动获取事
|
|
|
80
80
|
- 先使用 `sql list/detail` 查找可复用的 Custom SQL;没有满足需求的资源时,按照 [`sql-creation-workflow.md`](guides/sql-creation-workflow.md) 与 [`sql-mybatis.md`](guides/sql-mybatis.md) 创建、校验、发布并验证
|
|
81
81
|
- 页面执行已发布的 Custom SQL 时使用 `sqlCode` + `params`;Backend Function 默认使用 `context.client.sql.byName(sqlName).execute({ params })`,`sql.execute({ sqlCode, params })` 仅作兼容路径
|
|
82
82
|
4. **Backend Function 工作流**
|
|
83
|
+
- 涉及用户、角色、数据权限或系统任务时,先读 [执行身份与数据集权限](guides/backend-function.md#执行身份与数据集权限):服务端可信身份、多角色、逐数据集操作鉴权及主子关联边界
|
|
83
84
|
- 跨数据库连接的业务查询、关联筛选或聚合,先读 [跨库 BFF 查询与拼接](guides/cross-database-bff.md),确认完整键、执行顺序、各端授权和结果完整性
|
|
84
85
|
- 创建或修改 Backend Function 时,按 [BFF 工作流](guides/bff-creation-workflow.md)复用有效事实、按需查询并完成必要验证;运行行为异常时用 `bff logs` 按时间、级别和关键字查询日志
|
|
85
86
|
- `bff pull` / `bff push` 返回 `data.conflicts` 时,逐项报告 `lockKey` 和 `code`,并只在审阅后执行该项 `nextAction`;不得把同步冲突说成失败、自动使用 `--force`,或盲目重试整批脚本
|
|
@@ -120,10 +121,12 @@ Agent 负责把已授权的目标推进到可验证的结果:主动获取事
|
|
|
120
121
|
- 填写办理人、角色或转交候选人前,使用 `rabetbase flow runtime-user-search`、`runtime-role-list`、`runtime-role-user-list` 查询运行态真实 ID;这些命令只读,不办理待办。
|
|
121
122
|
- 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`。
|
|
122
123
|
- `FORM_FLOW` 是表单审批流,人工节点只能使用 `taskMode: APPROVAL`,不得生成 `HANDLE`。
|
|
124
|
+
- 表单流程用 `flow page-list` 发现 CREATE 页面并写完整 `pageIds`;新建无 ID 时结果只是候选,已有流程传 `--id` 筛除其他流程占用。绑定集合发生增删时必须先审阅 dry-run 原绑定变化,正式 update 传 `--expected-page-ids`。生成表单提交代码时阅读 [`form-flow-start.md`](guides/form-flow-start.md),先保存业务记录,再以实际页面与已有 dataId 显式发起。
|
|
123
125
|
- `INDEPENDENT_FLOW` 是工作流,可以组合 `APPROVAL` 和 `HANDLE`;包含审批节点也不会改变其工作流类型。
|
|
124
126
|
- `pageMode` 只属于独立工作流:当前公开 Skill 只生成 `CUSTOM_PAGE`,由业务页面根据业务状态自行渲染并通过 SDK 驱动;缺省也按 `CUSTOM_PAGE`。用户要求 `PLATFORM_FORM` 时返回 `NEEDS_DSL_EXTENSION`,不生成或提交 FlowConfig。`CUSTOM_PAGE` 可选配置 `flowJson.startPath` 以及 `APPROVAL` / `END` 节点 `path` 作为纯导航信息;这些字段都不参与流程执行。配置时必须使用目标自定义页面返回的完整 `runtimePageUrl`,不得填写菜单原始 `path`、`pageUrl`、`editPageUrl` 或手工拼接地址。
|
|
125
127
|
- 为独立工作流填写页面导航前,先用 `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`。
|
|
126
128
|
- 自定义页面 Flow SDK 只面向 `INDEPENDENT_FLOW + CUSTOM_PAGE`,使用当前 Runtime 登录会话;不得把表单审批流或平台表单工作流混入该入口。生成页面前必须按 Flow SDK 指南的完整字段字典解释所有固定返回对象及嵌套字段,不能只知道方法名和 TypeScript 类型。
|
|
129
|
+
- 发布后回读定义和完整页面绑定,启用状态通过平台或实际运行入口核验;已发布流程更新会回草稿,必须重新发布。曾发布的流程不能改类型。发布成功后仍按创建工作流完成运行态验收。
|
|
127
130
|
|
|
128
131
|
## 应用决议指引
|
|
129
132
|
|
|
@@ -360,7 +363,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
360
363
|
| 列出配置 | [`rabetbase config list`](references/rabetbase-config.md) | 查看当前生效的配置 |
|
|
361
364
|
| 管理运行态 app-config | [`rabetbase app-config list/get/set/delete`](references/rabetbase-app-config.md) | 运行态 app-config 管理面;默认不输出明文 value;`set` 为 `write`,`delete` 保持 `high-risk-write` |
|
|
362
365
|
| 管理 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 |
|
|
363
|
-
| 管理和检索当前研发应用的企业知识库 | [`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` |
|
|
366
|
+
| 管理和检索当前研发应用的企业知识库 | [`rabetbase kb list/detail/search/create/update/delete`](references/rabetbase-kb.md) | 管理仅 company scope;detail 返回完整正文,追加前必须读取;search 仅V2,默认解析 `kbServiceDomain`,可用 `--kb-service-url` 单次覆盖,使用Cookie且仅 `public/company`;`create/update` 为 `write`,`delete` 保持 `high-risk-write` |
|
|
364
367
|
| 管理当前研发应用的 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 |
|
|
365
368
|
| 查询或管理应用级通知配置 | [`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` |
|
|
366
369
|
| 设计、校验和发布表单审批流或独立工作流 | [`rabetbase flow validate/list/detail/create/update/publish`](references/rabetbase-flow-commands.md) | 先确定 `flowType`;本地 validate 后再 create/update 和 publish |
|
|
@@ -561,6 +564,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
561
564
|
| SQL MyBatis 与动态 SQL | 写自定义 SQL、`<if>`/`<foreach>`、参数绑定 | [`sql-mybatis.md`](guides/sql-mybatis.md) |
|
|
562
565
|
| 前端页面开发约束 | React 页、表单、列表、与数据集绑定 | [`frontend-development.md`](guides/frontend-development.md) |
|
|
563
566
|
| 自定义页面 Flow SDK | 页面发起、查询或办理 `INDEPENDENT_FLOW + CUSTOM_PAGE`,以及 appCode、Cookie、表单和流程变量边界 | [`custom-page-flow-sdk.md`](guides/custom-page-flow-sdk.md) |
|
|
567
|
+
| 表单页面发起审批 | `FORM_FLOW` 多页面绑定、先保存业务记录再显式启动及失败恢复 | [`form-flow-start.md`](guides/form-flow-start.md) |
|
|
564
568
|
| 故障诊断 | CLI/登录/数据集/保存失败排障 | [`troubleshooting.md`](guides/troubleshooting.md) |
|
|
565
569
|
| Backend Function 脚本规范 | HOOK/ENDPOINT/COMMON、`context.client`、消息通知扩展、目录与注释模板 | [`backend-function.md`](guides/backend-function.md) |
|
|
566
570
|
| 数据接口访问 | 先 detail 再编码、外键/枚举、禁止 N+1、批量与关联查询;验证真实行数据时交接 `lovrabet data`(**`lovrabet` CLI ≥ 2.0**) | [`data-api-guidelines.md`](guides/data-api-guidelines.md) |
|
|
@@ -571,4 +575,4 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
571
575
|
| 质量与最佳实践 | 审查 SQL/Backend Function、命名、高危边界、描述字段 | [`best-practices.md`](guides/best-practices.md) |
|
|
572
576
|
| 数据库连接与分析 | 接入/改连/测连、`traceId` 来源、`db analyze-*` 与 dataset 分工;子命令速查见上文 **「数据库连接(db)」** | [`database-connection-workflow.md`](guides/database-connection-workflow.md) |
|
|
573
577
|
| 菜单异常审计与安全修复 | 重复 path、根级菜单重名、空 folder 删除计划和平台处理后回查 | [`menu-anomaly-manual-cleanup.md`](guides/menu-anomaly-manual-cleanup.md) |
|
|
574
|
-
| 表单审批流与独立工作流设计态开发 |
|
|
578
|
+
| 表单审批流与独立工作流设计态开发 | 流程分类、页面绑定、资源发现、FlowConfig、校验、创建、发布和运行验收 | [`approval-flow-development-workflow.md`](guides/approval-flow-development-workflow.md) |
|