@lovrabet/rabetbase-cli 2.5.2 → 2.5.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +2 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.d.ts +7 -0
- package/lib/commands/bff/logs.js +1 -0
- 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.d.ts +21 -0
- package/lib/commands/dataset/batch-design.js +1 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-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.d.ts +2 -0
- package/lib/commands/flow/create.js +1 -0
- package/lib/commands/flow/detail.d.ts +2 -0
- package/lib/commands/flow/detail.js +1 -0
- package/lib/commands/flow/index.d.ts +3 -0
- package/lib/commands/flow/index.js +1 -0
- package/lib/commands/flow/list.d.ts +2 -0
- package/lib/commands/flow/list.js +1 -0
- package/lib/commands/flow/publish.d.ts +2 -0
- package/lib/commands/flow/publish.js +1 -0
- package/lib/commands/flow/runtime-resources-shared.d.ts +40 -0
- package/lib/commands/flow/runtime-resources-shared.js +1 -0
- package/lib/commands/flow/runtime-role-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-list.js +1 -0
- package/lib/commands/flow/runtime-role-user-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-user-list.js +1 -0
- package/lib/commands/flow/runtime-user-search.d.ts +2 -0
- package/lib/commands/flow/runtime-user-search.js +1 -0
- package/lib/commands/flow/shared.d.ts +41 -0
- package/lib/commands/flow/shared.js +1 -0
- package/lib/commands/flow/update.d.ts +2 -0
- package/lib/commands/flow/update.js +1 -0
- package/lib/commands/flow/validate.d.ts +3 -0
- package/lib/commands/flow/validate.js +1 -0
- 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/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.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.d.ts +23 -0
- package/lib/config/region-config.js +1 -0
- package/lib/config/schema.d.ts +15 -0
- 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.d.ts +6 -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.d.ts +13 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +172 -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.d.ts +55 -0
- package/lib/core/bff/hook-directory.js +1 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +15 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +628 -0
- package/lib/core/flow-config.js +1 -0
- 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.d.ts +6 -0
- package/lib/core/page/lr-smart-jsx.js +1 -0
- 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/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +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.d.ts +2 -8
- 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.d.ts +2 -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 +27 -8
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +137 -0
- package/skills/rabetbase/guides/backend-function.md +19 -9
- package/skills/rabetbase/guides/bff-creation-workflow.md +10 -1
- package/skills/rabetbase/guides/conflict-detection.md +2 -0
- package/skills/rabetbase/guides/page-development-workflow.md +3 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +6 -5
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
- package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
- package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
- package/skills/rabetbase/references/rabetbase-bff-pull.md +9 -3
- package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
- package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +10 -9
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -2
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
- package/skills/rabetbase/references/rabetbase-flow-commands.md +86 -0
- package/skills/rabetbase/references/rabetbase-flow-resources.md +83 -0
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +25 -0
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +103 -11
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +17 -0
- package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
- package/skills/rabetbase.manifest.json +9 -3
- package/templates/generate-api/client.ts.tpl +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x5ac1da,_0x13d4b6){const _0x18b2ee=a264_0x5f0d,_0x3cefb5=_0x5ac1da();while(!![]){try{const _0x1871cf=parseInt(_0x18b2ee(0x11b))/0x1*(parseInt(_0x18b2ee(0x11c))/0x2)+-parseInt(_0x18b2ee(0x104))/0x3*(-parseInt(_0x18b2ee(0x110))/0x4)+parseInt(_0x18b2ee(0x10b))/0x5+parseInt(_0x18b2ee(0x10c))/0x6+parseInt(_0x18b2ee(0xf1))/0x7*(-parseInt(_0x18b2ee(0x113))/0x8)+-parseInt(_0x18b2ee(0x116))/0x9*(parseInt(_0x18b2ee(0x121))/0xa)+-parseInt(_0x18b2ee(0x11a))/0xb;if(_0x1871cf===_0x13d4b6)break;else _0x3cefb5['push'](_0x3cefb5['shift']());}catch(_0x4c2503){_0x3cefb5['push'](_0x3cefb5['shift']());}}}(a264_0x12d6,0x9038b));function a264_0x5f0d(_0x46ae2d,_0x5c9f51){_0x46ae2d=_0x46ae2d-0xee;const _0x12d6c2=a264_0x12d6();let _0x5f0d44=_0x12d6c2[_0x46ae2d];return _0x5f0d44;}function a264_0x12d6(){const _0x28d3bf=['HOOK_ALIAS_AMBIGUOUS','length','normalize','message','SDK\x20alias\x20\x22','values','size','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','includes','alias','datasetCode','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','push','HOOK_DATASET_NOT_FOUND','HOOK\x20directory\x20\x22','HOOK_DATASET_CODE_AMBIGUOUS','\x22\x20resolves\x20to\x20multiple\x20Datasets.','1215PViwfG','datasetCodeToDatasets','toLowerCase','lockKey','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','set','entries','4899110WLBDXx','4928616fILJnn','get','functions','code','3364YzTena','HOOK_DIRECTORY_UNRESOLVED','HOOK_DIRECTORY_AMBIGUOUS','91384wHTuXd','name','join','827208keoNgq','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','add','HOOK_MAPPING_DRIFT','8719799xKjmmR','1ICPvaP','1580036tDGCiV','HOOK_DUPLICATE_DIRECTORIES','Dataset\x20\x22','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','\x22\x20to\x20\x22','120ETzqLN','type','split','details','Dataset\x20code\x20\x22','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','HOOK','map','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','273rlcVsN','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20'];a264_0x12d6=function(){return _0x28d3bf;};return a264_0x12d6();}import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x39bf4a){const _0x4effa3=a264_0x5f0d,_0x3144eb=[];for(const [_0x57b91f,_0x3418ea]of Object[_0x4effa3(0x10a)](_0x39bf4a[_0x4effa3(0x10e)])){const [_0x292985,_0x24a407]=_0x57b91f[_0x4effa3(0x123)]('/');if(_0x292985!==_0x4effa3(0xee)||!_0x24a407||!_0x3418ea[_0x4effa3(0xfd)])continue;_0x3144eb[_0x4effa3(0xff)]({'alias':_0x24a407,'datasetCode':_0x3418ea[_0x4effa3(0xfd)]});}return _0x3144eb;}export function uniqueTrackedHookDirectoryByDataset(_0x4f1123){const _0x63c1a8=a264_0x5f0d,_0x3380ce=new Map();for(const _0x4133ac of trackedHookDirectoryMappings(_0x4f1123)){const _0x3215c0=directoryIdentity(_0x4133ac[_0x63c1a8(0xfd)]),_0x39215a=_0x3380ce[_0x63c1a8(0x10d)](_0x3215c0)??new Map();_0x39215a['set'](directoryIdentity(_0x4133ac[_0x63c1a8(0xfc)]),_0x4133ac[_0x63c1a8(0xfc)]),_0x3380ce[_0x63c1a8(0x109)](_0x3215c0,_0x39215a);}const _0x42f797=new Map();for(const [_0x300e11,_0x374c23]of _0x3380ce){if(_0x374c23[_0x63c1a8(0xf9)]>0x1)throw hookDirectoryError('HOOK_DUPLICATE_DIRECTORIES',_0x63c1a8(0x11e)+_0x300e11+_0x63c1a8(0x108)+[..._0x374c23[_0x63c1a8(0xf8)]()][_0x63c1a8(0x115)](',\x20')+'.',{'datasetCode':_0x300e11,'directories':[..._0x374c23[_0x63c1a8(0xf8)]()]});_0x42f797[_0x63c1a8(0x109)](_0x300e11,[..._0x374c23[_0x63c1a8(0xf8)]()][0x0]);}return _0x42f797;}export function assertUnambiguousHookDirectoryMappings(_0x2e894d){const _0x565a06=a264_0x5f0d,_0x296e04=new Map();for(const {alias:_0x25ef7c,datasetCode:_0x3bad42}of _0x2e894d){const _0x37874c=directoryIdentity(_0x25ef7c),_0x28d61e=_0x296e04[_0x565a06(0x10d)](_0x37874c)??new Set();_0x28d61e['add'](_0x3bad42),_0x296e04[_0x565a06(0x109)](_0x37874c,_0x28d61e);}for(const [_0x1af008,_0x25c462]of _0x296e04){if(_0x25c462[_0x565a06(0xf9)]>0x1)throw hookDirectoryError(_0x565a06(0x112),_0x565a06(0x101)+_0x1af008+_0x565a06(0x103),{'directoryName':_0x1af008,'datasetCodes':[..._0x25c462]});}}export function assertUnambiguousHookAliases(_0x1649a8){const _0x1a0e7c=a264_0x5f0d,_0x13cbf9=[..._0x1649a8],_0x5b8240=new Map(),_0x1c89a5=new Map();for(const {alias:_0x5b373e,datasetCode:_0x4f3e02}of _0x13cbf9){const _0x20bd53=directoryIdentity(_0x5b373e),_0x4400c8=directoryIdentity(_0x4f3e02),_0x3ee9ab=_0x5b8240[_0x1a0e7c(0x10d)](_0x20bd53)??new Set();_0x3ee9ab[_0x1a0e7c(0x118)](_0x4f3e02),_0x5b8240['set'](_0x20bd53,_0x3ee9ab);const _0x139786=_0x1c89a5['get'](_0x4400c8)??new Set();_0x139786[_0x1a0e7c(0x118)](_0x5b373e),_0x1c89a5[_0x1a0e7c(0x109)](_0x4400c8,_0x139786);}for(const [_0x1b16d9,_0x1ee982]of _0x5b8240){if(_0x1ee982[_0x1a0e7c(0xf9)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x1a0e7c(0xf7)+_0x1b16d9+_0x1a0e7c(0x103),{'alias':_0x1b16d9,'datasetCodes':[..._0x1ee982]});}for(const [_0x38c647,_0x25fefd]of _0x1c89a5){if(_0x25fefd['size']>0x1)throw hookDirectoryError(_0x1a0e7c(0xf3),_0x1a0e7c(0x11e)+_0x38c647+_0x1a0e7c(0xfe),{'datasetCode':_0x38c647,'aliases':[..._0x25fefd]});}}export function buildHookDirectoryIndexes(_0x55a4ed,_0x493493=[]){const _0x579c34=a264_0x5f0d,_0x1a4f21=[..._0x493493];assertUnambiguousHookDirectoryMappings(_0x1a4f21[_0x579c34(0xef)](([_0xaceab3,_0x5379e9])=>({'alias':_0xaceab3,'datasetCode':_0x5379e9})));const _0x1ff66d=new Map(),_0x247afe=new Map();for(const _0x5dcc02 of _0x55a4ed){appendUnique(_0x1ff66d,directoryIdentity(_0x5dcc02['code']),_0x5dcc02,_0x5ea8f4=>_0x5ea8f4[_0x579c34(0x10f)]);}for(const [_0x5bad93,_0x392a18]of _0x1a4f21){appendUnique(_0x247afe,directoryIdentity(_0x5bad93),_0x392a18,_0xbbe7db=>_0xbbe7db);}return{'datasetCodeToDatasets':_0x1ff66d,'aliasToDatasetCodes':_0x247afe};}export function resolvePushHookDirectory(_0x2e550d,_0x3b622b,_0x5c24f6){const _0x4c2178=a264_0x5f0d,_0x32693b=directoryIdentity(_0x2e550d),_0x39d10f=_0x5c24f6[_0x4c2178(0x105)][_0x4c2178(0x10d)](_0x32693b)??[],_0x57e307=_0x5c24f6['aliasToDatasetCodes']['get'](_0x32693b)??[],_0x1cd824=new Set([..._0x39d10f[_0x4c2178(0xef)](_0x50b299=>_0x50b299[_0x4c2178(0x10f)]),..._0x57e307]);if(_0x1cd824[_0x4c2178(0xf9)]>0x1)throw hookDirectoryError(_0x4c2178(0x112),_0x4c2178(0x101)+_0x2e550d+_0x4c2178(0x126),{'directoryName':_0x2e550d,'datasetCodes':[..._0x1cd824]});const _0xb6abdb=[..._0x1cd824][0x0];if(_0xb6abdb&&_0x3b622b?.[_0x4c2178(0xfd)]&&_0xb6abdb!==_0x3b622b['datasetCode'])throw hookDirectoryError(_0x4c2178(0x119),'HOOK\x20directory\x20\x22'+_0x2e550d+_0x4c2178(0x11f)+_0x3b622b[_0x4c2178(0xfd)]+_0x4c2178(0x120)+_0xb6abdb+'\x22.',{'directoryName':_0x2e550d,'datasetCode':_0xb6abdb,'lockedDatasetCode':_0x3b622b[_0x4c2178(0xfd)]});const _0x37282b=_0xb6abdb?findDatasetByCode(_0x5c24f6,_0xb6abdb):undefined,_0x2b84ee=!!_0xb6abdb&&_0x57e307[_0x4c2178(0xfb)](_0xb6abdb);if(_0x37282b)return{'dataset':_0x37282b,'datasetCode':_0x37282b[_0x4c2178(0x10f)],..._0x2b84ee?{'alias':_0x2e550d}:{},'directoryProtocol':_0x2b84ee?_0x4c2178(0xfc):_0x4c2178(0xfd),'warnings':[]};const _0x461abf=_0x3b622b?.[_0x4c2178(0xfd)];if(_0x461abf){const _0xe1c9d8=findDatasetByCode(_0x5c24f6,_0x461abf);if(_0xe1c9d8)return{'dataset':_0xe1c9d8,'datasetCode':_0xe1c9d8[_0x4c2178(0x10f)],..._0x3b622b[_0x4c2178(0xfc)]?{'alias':_0x3b622b[_0x4c2178(0xfc)]}:{},'directoryProtocol':_0x3b622b[_0x4c2178(0xfc)]?_0x4c2178(0xfc):_0x4c2178(0xfd),'warnings':[]};}if(_0xb6abdb||_0x461abf){const _0x2e2e64=_0xb6abdb??_0x461abf;throw hookDirectoryError(_0x4c2178(0x100),_0x4c2178(0x101)+_0x2e550d+'\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.',{'directoryName':_0x2e550d,'datasetCode':_0x2e2e64});}throw hookDirectoryError(_0x4c2178(0x111),_0x4c2178(0xfa)+_0x2e550d+_0x4c2178(0xf0),{'directoryName':_0x2e550d});}export function preflightPushHookDirectories(_0x1a2f6f,_0x2f4f5f,_0x212c92,_0x2ff915){const _0x38a646=a264_0x5f0d,_0x6e41c3=new Map(),_0x877fa2=new Map();for(const _0x26c4bc of _0x1a2f6f){if(_0x26c4bc[_0x38a646(0x122)]!==_0x38a646(0xee))continue;const _0x326aff=_0x26c4bc['alias'];if(!_0x326aff)throw hookDirectoryError(_0x38a646(0x111),'Incomplete\x20HOOK\x20path:\x20'+_0x26c4bc[_0x38a646(0x107)],{'lockKey':_0x26c4bc['lockKey']});let _0x5cb81a;try{_0x5cb81a=resolvePushHookDirectory(_0x326aff,_0x2f4f5f[_0x38a646(0x10e)][_0x26c4bc[_0x38a646(0x107)]],_0x212c92);}catch(_0x561e1f){if(_0x2ff915&&_0x561e1f instanceof CliError&&[_0x38a646(0x100),_0x38a646(0x111)][_0x38a646(0xfb)](_0x561e1f['code'])){_0x2ff915[_0x38a646(0x109)](_0x26c4bc[_0x38a646(0x107)],_0x561e1f[_0x38a646(0xf6)]);continue;}throw _0x561e1f;}_0x6e41c3[_0x38a646(0x109)](_0x26c4bc[_0x38a646(0x107)],_0x5cb81a);const _0x1a9260=_0x877fa2[_0x38a646(0x10d)](_0x5cb81a[_0x38a646(0xfd)])??new Set();_0x1a9260[_0x38a646(0x118)](_0x326aff),_0x877fa2[_0x38a646(0x109)](_0x5cb81a[_0x38a646(0xfd)],_0x1a9260);}for(const [_0x47b2b6,_0x540e4e]of _0x877fa2){if(_0x540e4e[_0x38a646(0xf9)]>0x1)throw hookDirectoryError(_0x38a646(0x11d),'Dataset\x20\x22'+_0x47b2b6+_0x38a646(0xf2)+[..._0x540e4e]['join'](',\x20')+'.',{'datasetCode':_0x47b2b6,'directories':[..._0x540e4e]});}return _0x6e41c3;}export function hookDirectoryError(_0x3f32d0,_0x4b7677,_0x20b865){const _0x1417a5=a264_0x5f0d,_0xd25010=new CliError(_0x3f32d0,0x2,_0x3f32d0+':\x20'+_0x4b7677);return _0xd25010[_0x1417a5(0x124)]=_0x20b865,_0xd25010;}function findDatasetByCode(_0x5914b7,_0x44016d){const _0x5b00c4=a264_0x5f0d,_0x27a2e8=_0x5914b7[_0x5b00c4(0x105)][_0x5b00c4(0x10d)](directoryIdentity(_0x44016d))??[];if(_0x27a2e8[_0x5b00c4(0xf4)]>0x1)throw hookDirectoryError(_0x5b00c4(0x102),_0x5b00c4(0x125)+_0x44016d+_0x5b00c4(0x117),{'datasetCode':_0x44016d,'candidates':_0x27a2e8[_0x5b00c4(0xef)](datasetFact)});return _0x27a2e8[0x0];}function directoryIdentity(_0x504b08){const _0xd5aaad=a264_0x5f0d;return _0x504b08[_0xd5aaad(0xf5)]('NFC')[_0xd5aaad(0x106)]();}function appendUnique(_0x1e418f,_0x521e2f,_0x3d90d1,_0x23bece){const _0x2ad3d3=a264_0x5f0d,_0x15e40d=_0x1e418f[_0x2ad3d3(0x10d)](_0x521e2f)??[];!_0x15e40d['some'](_0x10b03b=>_0x23bece(_0x10b03b)===_0x23bece(_0x3d90d1))&&_0x15e40d[_0x2ad3d3(0xff)](_0x3d90d1),_0x1e418f['set'](_0x521e2f,_0x15e40d);}function datasetFact(_0x5ee582){const _0x2e5ac3=a264_0x5f0d;return{'id':_0x5ee582['id'],'name':_0x5ee582[_0x2e5ac3(0x114)],'datasetCode':_0x5ee582['code']};}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x543fc6,_0x39cc47){const _0x3cbb1f=a265_0x2ca4,_0x166027=_0x543fc6();while(!![]){try{const _0x23ca29=parseInt(_0x3cbb1f(0x104))/0x1+parseInt(_0x3cbb1f(0x113))/0x2*(parseInt(_0x3cbb1f(0x117))/0x3)+parseInt(_0x3cbb1f(0x106))/0x4*(parseInt(_0x3cbb1f(0x11a))/0x5)+parseInt(_0x3cbb1f(0x10b))/0x6+-parseInt(_0x3cbb1f(0x107))/0x7*(parseInt(_0x3cbb1f(0x112))/0x8)+-parseInt(_0x3cbb1f(0x114))/0x9+parseInt(_0x3cbb1f(0x111))/0xa;if(_0x23ca29===_0x39cc47)break;else _0x166027['push'](_0x166027['shift']());}catch(_0x530bf0){_0x166027['push'](_0x166027['shift']());}}}(a265_0x9e15,0xaaf57));import{mkdir,readFile,writeFile}from'node:fs/promises';function a265_0x2ca4(_0x3257c7,_0x12f4cc){_0x3257c7=_0x3257c7-0x104;const _0x9e15c7=a265_0x9e15();let _0x2ca4f8=_0x9e15c7[_0x3257c7];return _0x2ca4f8;}import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x1abcb7,_0x56f94c,_0xeb74a8,_0x2f1ba8){const _0x5acfd2=a265_0x2ca4,_0x1cb820={'apps':_0x1abcb7[_0x5acfd2(0x10d)]&&typeof _0x1abcb7['apps']===_0x5acfd2(0x115)?_0x1abcb7[_0x5acfd2(0x10d)]:{}};let _0x468080=_0x1cb820[_0x5acfd2(0x10d)][_0x56f94c];if(!_0x468080)return _0x468080={'scriptsRoot':_0xeb74a8,'lastSync':'','functions':{}},_0x1cb820[_0x5acfd2(0x10d)][_0x56f94c]=_0x468080,{'lockData':_0x1cb820,'appLock':_0x468080};if(!_0x468080['scriptsRoot'])_0x468080[_0x5acfd2(0x10a)]=_0xeb74a8;else{if(_0x468080[_0x5acfd2(0x10a)]!==_0xeb74a8)throw new Error(_0x2f1ba8+_0x5acfd2(0x118)+(_0x5acfd2(0x110)+_0xeb74a8+_0x5acfd2(0x10e)+_0x468080[_0x5acfd2(0x10a)]+_0x5acfd2(0x108))+_0x5acfd2(0x119));}return!_0x468080[_0x5acfd2(0x10f)]&&(_0x468080[_0x5acfd2(0x10f)]={}),!_0x468080[_0x5acfd2(0x109)]&&(_0x468080[_0x5acfd2(0x109)]=''),{'lockData':_0x1cb820,'appLock':_0x468080};}export async function readBffLockFile(_0x5e1cbb){const _0x2b1ca4=a265_0x2ca4;try{const _0x49584a=await readFile(_0x5e1cbb,_0x2b1ca4(0x116)),_0x4e5e35=JSON[_0x2b1ca4(0x105)](_0x49584a);return{'apps':_0x4e5e35[_0x2b1ca4(0x10d)]&&typeof _0x4e5e35[_0x2b1ca4(0x10d)]===_0x2b1ca4(0x115)?_0x4e5e35['apps']:{}};}catch(_0x192e85){if(_0x192e85['code']==='ENOENT')return null;throw new Error(_0x2b1ca4(0x10c)+String(_0x192e85));}}export async function writeBffLockFile(_0x2bdd93,_0x456820){const _0x38457e=a265_0x2ca4;await mkdir(dirname(_0x2bdd93),{'recursive':!![]}),await writeFile(_0x2bdd93,JSON['stringify'](_0x456820,null,0x2),_0x38457e(0x116));}function a265_0x9e15(){const _0x4dace1=['1005YFirNo','808328oNYjQg','parse','2980dzvKrP','70BLwMHH','\x22.\x20','lastSync','scriptsRoot','3176622DJBLjf','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','apps','\x22\x20vs\x20lock\x20\x22','functions','current\x20\x22','11897820USjxTH','927632bADiUJ','4axKiPo','12154887RblSbl','object','utf8','799557CTSlUB',':\x20scriptsRoot\x20mismatch\x20—\x20','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.'];a265_0x9e15=function(){return _0x4dace1;};return a265_0x9e15();}
|
package/lib/core/bff/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* 仅类型,不含运行时逻辑。
|
|
6
6
|
*/
|
|
7
7
|
export type BffScriptType = "COMMON" | "ENDPOINT" | "HOOK";
|
|
8
|
+
export type HookDirectoryProtocol = "alias" | "datasetCode";
|
|
8
9
|
export interface HookLocation {
|
|
9
10
|
/** api.ts 中定义的别名,用于本地目录命名和 lockKey。从 statistics 构建时可能缺失,由命令层补充。 */
|
|
10
11
|
alias?: string;
|
|
@@ -42,6 +43,20 @@ export interface BffLockScope {
|
|
|
42
43
|
export interface BffLockFile {
|
|
43
44
|
apps: Record<string, BffLockScope>;
|
|
44
45
|
}
|
|
46
|
+
export interface BffSyncConflict {
|
|
47
|
+
code: "BFF_LOCAL_UNSYNCED" | "BFF_REMOTE_VERSION_CHANGED" | "BFF_REMOTE_VERSION_MISSING";
|
|
48
|
+
lockKey: string;
|
|
49
|
+
filePath: string;
|
|
50
|
+
remoteId?: number;
|
|
51
|
+
expectedVersion?: number;
|
|
52
|
+
message: string;
|
|
53
|
+
nextAction: {
|
|
54
|
+
action: "push_local" | "review_remote_and_merge";
|
|
55
|
+
command: string;
|
|
56
|
+
requiresReview: true;
|
|
57
|
+
message: string;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
45
60
|
export interface ScriptStatistics {
|
|
46
61
|
datasetCode: string;
|
|
47
62
|
operationType: string;
|
package/lib/core/bff/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a267_0x1c58f5=a267_0x50d5;function a267_0x50d5(_0x218b0d,_0x3f8ed4){_0x218b0d=_0x218b0d-0x1c9;const _0x4fd0ba=a267_0x4fd0();let _0x50d527=_0x4fd0ba[_0x218b0d];return _0x50d527;}(function(_0x414627,_0x5507b6){const _0x4a2733=a267_0x50d5,_0x4b1155=_0x414627();while(!![]){try{const _0x208d60=parseInt(_0x4a2733(0x1ca))/0x1*(-parseInt(_0x4a2733(0x1e1))/0x2)+-parseInt(_0x4a2733(0x1d7))/0x3*(parseInt(_0x4a2733(0x1d1))/0x4)+parseInt(_0x4a2733(0x1e0))/0x5+parseInt(_0x4a2733(0x1d5))/0x6+parseInt(_0x4a2733(0x1dc))/0x7*(parseInt(_0x4a2733(0x1d2))/0x8)+parseInt(_0x4a2733(0x1cf))/0x9*(-parseInt(_0x4a2733(0x1cd))/0xa)+parseInt(_0x4a2733(0x1e4))/0xb*(-parseInt(_0x4a2733(0x1d9))/0xc);if(_0x208d60===_0x5507b6)break;else _0x4b1155['push'](_0x4b1155['shift']());}catch(_0x1bf3f0){_0x4b1155['push'](_0x4b1155['shift']());}}}(a267_0x4fd0,0x632ea));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a267_0x1c58f5(0x1cc);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a267_0x1c58f5(0x1d8);function a267_0x4fd0(){const _0x32b174=['map','split','2165400bFqihf','some','12NTNAxn','TODO:\x20add\x20script\x20description','376392KrgmEM','after','toLowerCase','7ybcKAh','trim','toUpperCase','remoteId','3690615kOxLVE','10eeyZMt','replace','test','11hRRquP','functionNode','startsWith','before','entries','10552vmDCAc','alias','TODO:\x20补充脚本功能描述','380480nhJSZv','match','126UOrvrq','operationType','431968piRGQY','2847944NZUsfv'];a267_0x4fd0=function(){return _0x32b174;};return a267_0x4fd0();}export function snakeToCamel(_0x576a17){const _0x1b91f8=a267_0x1c58f5;return _0x576a17[_0x1b91f8(0x1db)]()[_0x1b91f8(0x1e2)](/_([a-z])/g,(_0xdab82a,_0x4ae2f2)=>_0x4ae2f2[_0x1b91f8(0x1de)]());}export function findHookLocationByRemoteId(_0x27cb04,_0x23c4cb){const _0x50dc14=a267_0x1c58f5;if(!_0x23c4cb)return undefined;for(const [_0x383cc7,_0x540e62]of Object[_0x50dc14(0x1c9)](_0x27cb04)){if(_0x540e62[_0x50dc14(0x1df)]===_0x23c4cb&&_0x540e62['datasetCode']&&_0x540e62['operationType']&&_0x540e62[_0x50dc14(0x1e5)]){const _0x3912b8=_0x383cc7[_0x50dc14(0x1d4)]('/')[0x1];return{'alias':_0x3912b8||_0x540e62[_0x50dc14(0x1cb)],'datasetCode':_0x540e62['datasetCode'],'operationType':_0x540e62[_0x50dc14(0x1d0)],'functionNode':_0x540e62[_0x50dc14(0x1e5)]};}}return undefined;}export function extractScriptDescription(_0x51cb68){const _0x260372=a267_0x1c58f5,_0x140468=_0x51cb68[_0x260372(0x1ce)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x140468?.[0x1])return undefined;const _0x112c89=_0x140468[0x1],_0x21c469=_0x54cccb=>{const _0x242b7d=_0x260372,_0x314f38=_0x54cccb?.[_0x242b7d(0x1dd)]();if(!_0x314f38||_0x314f38===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x314f38===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x314f38;},_0x3357d2=_0x112c89[_0x260372(0x1ce)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x3357d2)return _0x21c469(_0x3357d2[0x1]);const _0x56a45f=_0x112c89[_0x260372(0x1d4)](/\r?\n/)[_0x260372(0x1d3)](_0x52c555=>_0x52c555[_0x260372(0x1e2)](/^\s*\*\s?/,'')[_0x260372(0x1dd)]()),_0x4b9067=_0x56a45f[_0x260372(0x1d6)](_0x2aa8fb=>/^\[\s*脚本类型\s*]\s*\S+/['test'](_0x2aa8fb))&&_0x56a45f[_0x260372(0x1d6)](_0x2314ce=>/^\[\s*脚本名称\s*]\s*\S+/[_0x260372(0x1e3)](_0x2314ce));if(!_0x4b9067)return undefined;for(const _0x344418 of _0x56a45f){if(!_0x344418||_0x344418[_0x260372(0x1e6)]('@')||/^\[[^\]]+]\s*/[_0x260372(0x1e3)](_0x344418))continue;return _0x21c469(_0x344418);}return undefined;}export function isValidBffFunctionName(_0x2ac4d6){const _0x451369=a267_0x1c58f5;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x451369(0x1e3)](_0x2ac4d6);}export function normalizeHookFunctionNode(_0x5a2775){const _0x295a79=a267_0x1c58f5;if(!_0x5a2775)return undefined;const _0x3291de=_0x5a2775[_0x295a79(0x1dd)]()[_0x295a79(0x1db)]();if(_0x3291de===_0x295a79(0x1e7)||_0x3291de===_0x295a79(0x1da))return _0x3291de;return undefined;}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a268_0x4d3f(_0x2524e5,_0x376935){_0x2524e5=_0x2524e5-0x6c;const _0x38ba48=a268_0x38ba();let _0x4d3f7f=_0x38ba48[_0x2524e5];return _0x4d3f7f;}(function(_0x258b4c,_0x5af54c){const _0x514df1=a268_0x4d3f,_0x201222=_0x258b4c();while(!![]){try{const _0x38ff3f=parseInt(_0x514df1(0x87))/0x1+-parseInt(_0x514df1(0x7e))/0x2+parseInt(_0x514df1(0x82))/0x3*(parseInt(_0x514df1(0x77))/0x4)+-parseInt(_0x514df1(0x83))/0x5+-parseInt(_0x514df1(0x73))/0x6+parseInt(_0x514df1(0x74))/0x7+parseInt(_0x514df1(0x76))/0x8;if(_0x38ff3f===_0x5af54c)break;else _0x201222['push'](_0x201222['shift']());}catch(_0x55cad3){_0x201222['push'](_0x201222['shift']());}}}(a268_0x38ba,0x8ee44));function a268_0x38ba(){const _0x5818fd=['Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','\x22\x20under\x20app\x20\x22','toLowerCase','has','entries','.\x20Be\x20more\x20specific.','3625398MTPBaM','4894421PyRvjH','isNaN','7074712LTLQKo','376KoqzlA','No\x20database\x20matching\x20\x22','join','dbtableConfig','map','filter','\x22\x20matches\x20multiple\x20databases:\x20','1003180GlJnBW','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','\x22.\x20Available:\x20','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','3891wXGmMd','2685420XNUiwU','length','dbName','find','522731JCrKlY','includes','dbId','set'];a268_0x38ba=function(){return _0x5818fd;};return a268_0x38ba();}import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x4f3d0b){const _0x20ef59=a268_0x4d3f;if(cache[_0x20ef59(0x70)](_0x4f3d0b))return cache['get'](_0x4f3d0b);const _0x4ffe04=await listDatasets(_0x4f3d0b),_0x103617=new Map();for(const _0xc03eb9 of _0x4ffe04){const _0x44d749=_0xc03eb9[_0x20ef59(0x7a)];_0x44d749?.[_0x20ef59(0x89)]!=null&&_0x103617[_0x20ef59(0x6c)](_0x44d749[_0x20ef59(0x89)],_0x44d749[_0x20ef59(0x85)]??'db-'+_0x44d749[_0x20ef59(0x89)]);}const _0x55cf37=[..._0x103617[_0x20ef59(0x71)]()][_0x20ef59(0x7b)](([_0x496253,_0x5a07fd])=>({'dbId':_0x496253,'dbName':_0x5a07fd}));return cache['set'](_0x4f3d0b,_0x55cf37),_0x55cf37;}export async function resolveDb(_0x3fd658,_0x3c6b86){const _0x4c12d1=a268_0x4d3f,_0xfb7f27=await listDatabases(_0x3fd658);if(_0xfb7f27[_0x4c12d1(0x84)]===0x0)return{'resolved':[],'error':_0x4c12d1(0x7f)+_0x3fd658+_0x4c12d1(0x81)};if(!_0x3c6b86)return{'resolved':_0xfb7f27};const _0x2c0abd=Number(_0x3c6b86);if(!Number[_0x4c12d1(0x75)](_0x2c0abd)){const _0x220d5d=_0xfb7f27['find'](_0x51cfb3=>_0x51cfb3[_0x4c12d1(0x89)]===_0x2c0abd);if(_0x220d5d)return{'resolved':[_0x220d5d]};}const _0x321655=_0x3c6b86['toLowerCase'](),_0x5c19c0=_0xfb7f27[_0x4c12d1(0x7c)](_0x57cc05=>_0x57cc05[_0x4c12d1(0x85)][_0x4c12d1(0x6f)]()[_0x4c12d1(0x88)](_0x321655));if(_0x5c19c0[_0x4c12d1(0x84)]>0x0)return{'resolved':_0x5c19c0};const _0x3572d5=_0xfb7f27[_0x4c12d1(0x7b)](_0x4c99ab=>_0x4c99ab[_0x4c12d1(0x85)]+'\x20('+_0x4c99ab[_0x4c12d1(0x89)]+')')[_0x4c12d1(0x79)](',\x20');return{'resolved':[],'error':_0x4c12d1(0x78)+_0x3c6b86+_0x4c12d1(0x6e)+_0x3fd658+_0x4c12d1(0x80)+_0x3572d5+'.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'};}export async function resolveOneDb(_0x12dff2,_0x2486a0){const _0x483b28=a268_0x4d3f,{resolved:_0x256456,error:_0x43e016}=await resolveDb(_0x12dff2,_0x2486a0);if(_0x43e016)return{'db':null,'error':_0x43e016};if(_0x256456['length']===0x1)return{'db':_0x256456[0x0]};if(!_0x2486a0){const _0x568b59=_0x256456[_0x483b28(0x7b)](_0x2df257=>_0x2df257[_0x483b28(0x85)]+'\x20('+_0x2df257['dbId']+')')[_0x483b28(0x79)](',\x20');return{'db':null,'error':_0x483b28(0x6d)+_0x568b59};}const _0x52e84f=_0x256456[_0x483b28(0x7b)](_0x109484=>_0x109484['dbName']+'\x20('+_0x109484['dbId']+')')[_0x483b28(0x79)](',\x20');return{'db':null,'error':'\x22'+_0x2486a0+_0x483b28(0x7d)+_0x52e84f+_0x483b28(0x72)};}export async function getDbName(_0x5a13f9,_0x4dd83f){const _0x30933b=a268_0x4d3f,_0x1fd203=await listDatabases(_0x5a13f9);return _0x1fd203[_0x30933b(0x86)](_0x5a251f=>_0x5a251f['dbId']===_0x4dd83f)?.[_0x30933b(0x85)];}
|