@lovrabet/rabetbase-cli 2.5.3-beta.1 → 2.5.3-beta.3
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.d.ts +22 -0
- package/lib/api/api-group.js +1 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +18 -2
- 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.d.ts +11 -0
- package/lib/api/legacy-api-file.js +1 -0
- package/lib/api/model-registry-file.d.ts +36 -0
- package/lib/api/model-registry-file.js +1 -0
- package/lib/api/model-registry-scaffold.d.ts +7 -0
- package/lib/api/model-registry-scaffold.js +1 -0
- package/lib/api/model-source.d.ts +6 -0
- package/lib/api/model-source.js +1 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.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.d.ts +7 -0
- 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/cross-relation-create.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-create.js +1 -0
- package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-delete.js +1 -0
- package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-list.js +1 -0
- package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
- package/lib/commands/dataset/cross-relation-shared.js +1 -0
- package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-update.js +1 -0
- 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/api-architecture-upgrade.d.ts +28 -0
- package/lib/commands/project/api-architecture-upgrade.js +1 -0
- 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.d.ts +30 -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.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.d.ts +2 -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 +2 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +13 -17
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +176 -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/cross-db-relation.d.ts +41 -0
- package/lib/core/cross-db-relation.js +1 -0
- 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.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.d.ts +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.d.ts +0 -10
- 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 +11 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +12 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/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 +4 -1
- package/skills/rabetbase/SKILL.md +31 -9
- 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/sdk-client-generation.md +112 -60
- package/skills/rabetbase/guides/typescript-sdk.md +9 -0
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
- package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
- package/skills/rabetbase/references/rabetbase-bff-pull.md +7 -3
- package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
- package/skills/rabetbase/references/rabetbase-config.md +2 -1
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +60 -0
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -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-project-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
- package/skills/rabetbase.manifest.json +10 -3
- package/templates/README.md +16 -4
- package/templates/generate-api/model-runtime.ts.tpl +101 -0
- package/templates/generate-api/profile-api.ts.tpl +21 -0
- package/templates/generate-api/profile-client.ts.tpl +14 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfe782f,_0x46ff9a){const _0x38fae9=a266_0x4f43,_0x51eb03=_0xfe782f();while(!![]){try{const _0x4a0fb6=parseInt(_0x38fae9(0x171))/0x1+parseInt(_0x38fae9(0x17f))/0x2+-parseInt(_0x38fae9(0x16f))/0x3*(parseInt(_0x38fae9(0x187))/0x4)+parseInt(_0x38fae9(0x17d))/0x5*(parseInt(_0x38fae9(0x167))/0x6)+parseInt(_0x38fae9(0x175))/0x7+-parseInt(_0x38fae9(0x185))/0x8+parseInt(_0x38fae9(0x18c))/0x9*(parseInt(_0x38fae9(0x182))/0xa);if(_0x4a0fb6===_0x46ff9a)break;else _0x51eb03['push'](_0x51eb03['shift']());}catch(_0x28dc14){_0x51eb03['push'](_0x51eb03['shift']());}}}(a266_0xe5c4,0x88f2d));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';import{DEFAULT_LOVRABET_REGION,normalizeLovrabetRegion}from'../constant/region.js';import{selectConfiguredRegion}from'../config/region-config.js';function stringConfigValue(_0x2a23b5){const _0x232260=a266_0x4f43;return typeof _0x2a23b5==='string'&&_0x2a23b5[_0x232260(0x165)]()?_0x2a23b5[_0x232260(0x165)]():undefined;}function a266_0xe5c4(){const _0x8fc6d8=['length','129323mRPhDw','projectConfig','FORMAT','defaultApp','4924122NxRPPR','read','accessKey','format','string','object','high-risk-write','env','41920pNPlRU','ENV','1759540NuPYrP','appcode','locale','10TdzHGM','keys','value','6018680XymzOf','write','118504VPaEMW','app','VERBOSE','source','ACCESS_KEY','718461XioKwh','projectPath','trim','RISK_LEVEL','378okPiUR','globalConfig','apiDir','region','entries','APP','apps','riskLevel','102riATqX'];a266_0xe5c4=function(){return _0x8fc6d8;};return a266_0xe5c4();}function appProfiles(_0x691545){const _0x46ed3a=a266_0x4f43;return _0x691545[_0x46ed3a(0x16d)]&&typeof _0x691545[_0x46ed3a(0x16d)]==='object'?_0x691545['apps']:{};}function resolveDefaultAppName(_0x2072cf){const _0x23a42c=a266_0x4f43,_0x5c334a=stringConfigValue(_0x2072cf[_0x23a42c(0x174)]);if(_0x5c334a)return _0x5c334a;const _0x5d2ba0=Object[_0x23a42c(0x183)](appProfiles(_0x2072cf));return _0x5d2ba0['length']===0x1?_0x5d2ba0[0x0]:undefined;}function resolveTopLevelAppCode(_0x428ec5){const _0x1edf12=a266_0x4f43;return stringConfigValue(_0x428ec5[_0x1edf12(0x180)])||stringConfigValue(_0x428ec5[_0x1edf12(0x188)]);}function normalizeRiskCeiling(_0x3d4a0b){const _0x5ae7a2=a266_0x4f43;if(_0x3d4a0b===undefined||_0x3d4a0b===null)return undefined;if(_0x3d4a0b==='read'||_0x3d4a0b===_0x5ae7a2(0x186)||_0x3d4a0b===_0x5ae7a2(0x17b))return _0x3d4a0b;return _0x5ae7a2(0x176);}function a266_0x4f43(_0x472385,_0x519e22){_0x472385=_0x472385-0x165;const _0xe5c4ce=a266_0xe5c4();let _0x4f4363=_0xe5c4ce[_0x472385];return _0x4f4363;}function resolveRiskCeiling(..._0x215774){const _0x5df8d0=a266_0x4f43;let _0x122677;for(const _0x112d57 of _0x215774){const _0x45cdbf=normalizeRiskCeiling(_0x112d57);_0x45cdbf&&(!_0x122677||riskLevelOrder(_0x45cdbf)<riskLevelOrder(_0x122677))&&(_0x122677=_0x45cdbf);}return _0x122677??DEFAULT_CONFIG_VALUES[_0x5df8d0(0x16e)];}export function resolveAppConfig({raw:_0x32c868,flags:_0x2ee63b,layers:_0x1ad1b5,readEnv:_0x8c1cfa}){const _0x1e62cd=a266_0x4f43,_0x1e8b68=_0x1ad1b5?.[_0x1e62cd(0x172)]??{},_0x18d8a9=_0x1ad1b5?.[_0x1e62cd(0x168)]??{},_0x21b2a5=!!_0x1ad1b5?.[_0x1e62cd(0x18d)]||Object[_0x1e62cd(0x183)](_0x1e8b68)[_0x1e62cd(0x170)]>0x0,_0x3aae6b=!_0x21b2a5,_0x1f042d=_0x21b2a5?resolveDefaultAppName(_0x1e8b68):undefined,_0x2cc294=_0x3aae6b?resolveDefaultAppName(_0x18d8a9):undefined,_0x289ad0=stringConfigValue(_0x2ee63b[_0x1e62cd(0x188)]),_0xa1911f=_0x8c1cfa(_0x1e62cd(0x16c)),_0x29c03e={};if(_0x32c868[_0x1e62cd(0x16d)]&&typeof _0x32c868[_0x1e62cd(0x16d)]===_0x1e62cd(0x17a))for(const [_0x20f09e,_0x37b6f0]of Object[_0x1e62cd(0x16b)](_0x32c868[_0x1e62cd(0x16d)])){_0x37b6f0&&typeof _0x37b6f0===_0x1e62cd(0x17a)&&_0x37b6f0['appcode']&&(_0x29c03e[_0x20f09e]=_0x37b6f0);}const _0x3368a4=_0x1f042d||_0x2cc294||resolveDefaultAppName(_0x32c868),_0x27ecd9=Object[_0x1e62cd(0x183)](_0x29c03e)[_0x1e62cd(0x170)]>0x0,_0x239f14=_0x289ad0||_0x1f042d||_0xa1911f||_0x2cc294||_0x3368a4||undefined,_0x328b21=stringConfigValue(_0x2ee63b[_0x1e62cd(0x180)]),_0x4d2155=_0x328b21?Object[_0x1e62cd(0x16b)](_0x29c03e)['filter'](([,_0x6693b5])=>_0x6693b5?.[_0x1e62cd(0x180)]===_0x328b21):[],_0x27179e=_0x289ad0&&_0x29c03e[_0x289ad0]?.[_0x1e62cd(0x180)]===_0x328b21?[_0x289ad0,_0x29c03e[_0x289ad0]]:undefined,_0x4e0b4f=_0x27179e??(_0x4d2155['length']===0x1?_0x4d2155[0x0]:undefined),_0x3f2a6c=_0x4e0b4f?.[0x0],_0xea38b9=_0x4e0b4f?.[0x1],_0x52a2=_0x328b21?_0x3f2a6c:_0x239f14;let _0x1d6e5b=_0x52a2&&_0x29c03e[_0x52a2]?_0x29c03e[_0x52a2]:undefined;_0x328b21&&_0xea38b9&&(_0x1d6e5b=_0xea38b9);const _0x768ab0=_0x328b21?_0xea38b9??_0x1d6e5b:_0x1d6e5b,_0x4b8833=!_0x289ad0&&!_0x1f042d&&_0xa1911f&&_0x52a2===_0xa1911f,_0x76de97=_0x289ad0||(_0x4b8833?_0xa1911f:undefined)||(_0x328b21?_0x3f2a6c:undefined),_0x1d8cb3=_0x768ab0?.['appcode'],_0x332d19=_0x21b2a5?resolveTopLevelAppCode(_0x1e8b68):undefined,_0x322c99=_0x3aae6b?resolveTopLevelAppCode(_0x18d8a9):undefined,_0x5373ec=_0x289ad0||_0x1f042d?_0x1d8cb3:undefined,_0x1e018a=!_0x289ad0&&!_0x1f042d?_0x1d8cb3:undefined,_0xd5d528=_0x328b21||_0x5373ec||_0x332d19||_0x1e018a||_0x322c99||undefined,_0x1227d9=_0x21b2a5?stringConfigValue(_0x1e8b68[_0x1e62cd(0x17c)]):undefined,_0x3f553=_0x3aae6b?stringConfigValue(_0x18d8a9[_0x1e62cd(0x17c)]):undefined,_0x3b8d21=_0x2ee63b['env']||_0x768ab0?.[_0x1e62cd(0x17c)]||_0x1227d9||_0x8c1cfa(_0x1e62cd(0x17e))||_0x3f553||_0x32c868[_0x1e62cd(0x17c)]||DEFAULT_CONFIG_VALUES[_0x1e62cd(0x17c)],_0x5b1619=_0x768ab0?.[_0x1e62cd(0x181)]||_0x32c868['locale']||DEFAULT_CONFIG_VALUES[_0x1e62cd(0x181)],_0x249618=_0x8c1cfa('COOKIE')||_0x768ab0?.['cookie']||_0x32c868['cookie']||undefined,_0x1169ec=_0x8c1cfa(_0x1e62cd(0x18b))||_0x768ab0?.['accessKey']||_0x32c868[_0x1e62cd(0x177)]||undefined,_0x2b9b02=_0x2ee63b[_0x1e62cd(0x178)]||_0x8c1cfa(_0x1e62cd(0x173))||_0x768ab0?.[_0x1e62cd(0x178)]||_0x32c868[_0x1e62cd(0x178)],_0x1f875d=normalizeLegacyOutputFormat(_0x2b9b02),_0x1b30d0=_0x8c1cfa('PAGE_SIZE')||_0x768ab0?.['pageSize']||_0x32c868['pageSize'],_0x4ffa13=_0x1b30d0?Number(_0x1b30d0)||undefined:undefined,_0x421f63=_0x1ad1b5?[_0x1ad1b5[_0x1e62cd(0x168)][_0x1e62cd(0x16e)],_0x1ad1b5['projectConfig'][_0x1e62cd(0x16e)]]:[_0x32c868[_0x1e62cd(0x16e)]],_0x189f4f=resolveRiskCeiling(..._0x421f63,_0x768ab0?.[_0x1e62cd(0x16e)]),_0x449dec=resolveRiskCeiling(_0x189f4f,_0x8c1cfa(_0x1e62cd(0x166))),_0x5a502e=_0x8c1cfa(_0x1e62cd(0x189)),_0x5e2d43=_0x5a502e==='1'||_0x5a502e==='true',_0x3ebe64=_0x768ab0?.['apiDir']||_0x32c868[_0x1e62cd(0x169)]||DEFAULT_CONFIG_VALUES[_0x1e62cd(0x169)],_0x9a2711=selectConfiguredRegion({'appRegion':_0x768ab0?.[_0x1e62cd(0x16a)],'projectRegion':_0x21b2a5?_0x1e8b68[_0x1e62cd(0x16a)]:undefined,'globalRegion':_0x21b2a5||_0x3aae6b?_0x18d8a9[_0x1e62cd(0x16a)]:undefined,'mergedRegion':_0x32c868['region']}),_0x545954=normalizeLovrabetRegion(_0x9a2711[_0x1e62cd(0x184)])??DEFAULT_LOVRABET_REGION,_0x179429=isDaily(normalizeEnv(String(_0x3b8d21)))?'daily':'production';return{'appCode':typeof _0xd5d528===_0x1e62cd(0x179)&&_0xd5d528['trim']()?_0xd5d528[_0x1e62cd(0x165)]():undefined,'region':_0x545954,'regionConfiguredValue':_0x9a2711[_0x1e62cd(0x184)],'regionSource':_0x9a2711[_0x1e62cd(0x18a)],'env':_0x179429,'locale':_0x5b1619,'cookie':_0x249618,'accessKey':_0x1169ec,'format':_0x1f875d,'pageSize':_0x4ffa13,'riskLevel':_0x449dec,'verbose':_0x5e2d43,'apiDir':_0x3ebe64,'apps':_0x29c03e,'defaultApp':_0x3368a4,'currentApp':_0x27ecd9?_0x52a2:undefined,'explicitAppName':_0x76de97};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9bdc5c,_0x52eac6){const _0x40a855=a267_0x4997,_0x1bec8d=_0x9bdc5c();while(!![]){try{const _0x6e38fa=parseInt(_0x40a855(0x1bf))/0x1*(-parseInt(_0x40a855(0x1bb))/0x2)+parseInt(_0x40a855(0x1c4))/0x3*(-parseInt(_0x40a855(0x1c3))/0x4)+-parseInt(_0x40a855(0x1c2))/0x5*(-parseInt(_0x40a855(0x1bd))/0x6)+-parseInt(_0x40a855(0x1bc))/0x7+parseInt(_0x40a855(0x1c1))/0x8+parseInt(_0x40a855(0x1c5))/0x9+parseInt(_0x40a855(0x1c0))/0xa;if(_0x6e38fa===_0x52eac6)break;else _0x1bec8d['push'](_0x1bec8d['shift']());}catch(_0x6854f1){_0x1bec8d['push'](_0x1bec8d['shift']());}}}(a267_0x620a,0xaa63c));function a267_0x620a(){const _0x3add81=['authRequired','13XidDEH','12339430NrJLzy','730336PoIvrt','5gldWBf','256436poAAEw','27gPddPX','2003382DHKZWi','62260nmDXpk','2645965Csinhc','3058494iHVIjQ'];a267_0x620a=function(){return _0x3add81;};return a267_0x620a();}function a267_0x4997(_0x4fd5e2,_0x3cbc69){_0x4fd5e2=_0x4fd5e2-0x1bb;const _0x620ac4=a267_0x620a();let _0x499720=_0x620ac4[_0x4fd5e2];return _0x499720;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x27d686){const {getCookie:_0xcebcac}=await import('../auth/get-cookie.js'),_0x470b5d=_0x27d686['cookie']||_0xcebcac(),_0x45343f=_0x470b5d?await getIsSessionValid():![];return{'cookie':_0x470b5d,'isLoggedIn':_0x45343f,async 'getOrLogin'(){const _0x1020d8=a267_0x4997;if(_0x470b5d&&_0x45343f)return _0x470b5d;throw CliErrors[_0x1020d8(0x1be)]();}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a268_0x145c(_0x30ef7c,_0x48a040){_0x30ef7c=_0x30ef7c-0x78;const _0xcdd488=a268_0xcdd4();let _0x145cd0=_0xcdd488[_0x30ef7c];return _0x145cd0;}const a268_0x5a722f=a268_0x145c;(function(_0x4d723b,_0x29ca2f){const _0x1c3f5e=a268_0x145c,_0x47df5b=_0x4d723b();while(!![]){try{const _0x32a0bb=-parseInt(_0x1c3f5e(0x99))/0x1*(-parseInt(_0x1c3f5e(0xa8))/0x2)+parseInt(_0x1c3f5e(0x8e))/0x3*(-parseInt(_0x1c3f5e(0x9a))/0x4)+parseInt(_0x1c3f5e(0x86))/0x5+parseInt(_0x1c3f5e(0xa0))/0x6*(-parseInt(_0x1c3f5e(0x98))/0x7)+-parseInt(_0x1c3f5e(0x93))/0x8*(parseInt(_0x1c3f5e(0x92))/0x9)+-parseInt(_0x1c3f5e(0x89))/0xa*(parseInt(_0x1c3f5e(0xa3))/0xb)+parseInt(_0x1c3f5e(0xaf))/0xc*(-parseInt(_0x1c3f5e(0x96))/0xd);if(_0x32a0bb===_0x29ca2f)break;else _0x47df5b['push'](_0x47df5b['shift']());}catch(_0x34e60b){_0x47df5b['push'](_0x47df5b['shift']());}}}(a268_0xcdd4,0x451c3));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';import{normalizeConfigForWrite}from'../config/schema.js';export const NEW_CONFIG_NAME=a268_0x5a722f(0xa5);export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map();export function resolveConfigPath(_0x2e4082){for(const _0x2ee9b3 of CONFIG_NAMES){const _0x27d603=resolve(_0x2e4082,_0x2ee9b3);if(existsSync(_0x27d603))return _0x27d603;}return undefined;}function a268_0xcdd4(){const _0x198f5f=['silent','status','2333148XOBCIl','message','accessKey','projectPath','length','pageSize','env','missing','format','data','runtimeDomain','empty','kbDomain','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','warn','userDomain','2820800sKpGIa','stringify','riskLevel','20pdptYI','keys','locale','Project','region','9neGZhK','cookie','project','apiDir','18ebILDP','32064SGSrbk','defaultApp','error','13LyKcJr','appcode','14zpWazt','1SIktSm','486392xRCUgU','trim','get','app','cwd','string','139362bTVCLm','utf8','appDomain','559339mfFhbS','parse','.rabetbase.json','object','config','868612zzvLfX','certificateDomain','localDomain','skillDomain','apps'];a268_0xcdd4=function(){return _0x198f5f;};return a268_0xcdd4();}export function findProjectRootDirectory(_0x3f6774=process[a268_0x5a722f(0x9e)]()){let _0xd5456f=resolve(_0x3f6774);const {root:_0x2ad2f9}=parse(_0xd5456f),_0x4380c0=homedir();while(!![]){if(resolveConfigPath(_0xd5456f)){if(_0xd5456f===_0x4380c0)break;return _0xd5456f;}if(_0xd5456f===_0x2ad2f9||_0xd5456f===_0x4380c0)break;const _0x334ab8=dirname(_0xd5456f);if(_0x334ab8===_0xd5456f)break;_0xd5456f=_0x334ab8;}return resolve(_0x3f6774);}export function getProjectConfigPath(){const _0x302bc4=a268_0x5a722f;return resolveConfigPath(process[_0x302bc4(0x9e)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x420693){const _0x19ae85=a268_0x5a722f;if(!existsSync(_0x420693))return{'status':_0x19ae85(0x7d)};try{const _0x57d96c=readFileSync(_0x420693,{'encoding':_0x19ae85(0xa1)});if(!_0x57d96c?.[_0x19ae85(0x9b)]())return{'status':_0x19ae85(0x81)};const _0x4ce252=JSON[_0x19ae85(0xa4)](_0x57d96c);return{'status':'ok','data':_0x4ce252};}catch(_0x1542ed){return{'status':_0x19ae85(0x95),'message':_0x1542ed instanceof Error?_0x1542ed[_0x19ae85(0xb0)]:String(_0x1542ed)};}}function parseCliConfigJsonFile(_0x5bdb73,_0x29349e,_0x28cc76){const _0x4ecd65=a268_0x5a722f,_0x43d896=inspectCliConfigJsonFile(_0x5bdb73);if(_0x43d896[_0x4ecd65(0xae)]===_0x4ecd65(0x7d)||_0x43d896[_0x4ecd65(0xae)]==='empty')return{};if(_0x43d896[_0x4ecd65(0xae)]==='ok')return _0x43d896[_0x4ecd65(0x7f)];return _0x29349e==='warn'&&_0x28cc76&&console[_0x4ecd65(0x95)](CLI_BIN_NAME+':\x20'+_0x28cc76+_0x4ecd65(0x83)+_0x5bdb73+'\x0a\x20\x20'+_0x43d896[_0x4ecd65(0xb0)]),{};}function normalizeLegacyConfigShape(_0x5ae9b0){const _0x4ebd24=a268_0x5a722f;if(!_0x5ae9b0||typeof _0x5ae9b0!==_0x4ebd24(0xa6))return{'config':{},'migrated':![]};const _0x5d832e={..._0x5ae9b0},_0x4107a4=_0x5d832e[_0x4ebd24(0xac)]&&typeof _0x5d832e['apps']===_0x4ebd24(0xa6)?{..._0x5d832e[_0x4ebd24(0xac)]}:{},_0x57485d=Object['keys'](_0x4107a4)[_0x4ebd24(0x7a)],_0xa54758=_0x5d832e[_0x4ebd24(0x97)]||_0x5d832e[_0x4ebd24(0x9d)];let _0x46f221=![];if(_0xa54758&&_0x57485d===0x0){const _0x10087a=typeof _0x5d832e[_0x4ebd24(0x94)]===_0x4ebd24(0x9f)&&_0x5d832e[_0x4ebd24(0x94)][_0x4ebd24(0x9b)]()?_0x5d832e['defaultApp']:String(_0xa54758)[_0x4ebd24(0x9b)]();_0x4107a4[_0x10087a]={'appcode':String(_0xa54758)[_0x4ebd24(0x9b)](),..._0x5d832e[_0x4ebd24(0x7c)]!=null?{'env':_0x5d832e[_0x4ebd24(0x7c)]}:{},..._0x5d832e['apiDir']!=null?{'apiDir':_0x5d832e[_0x4ebd24(0x91)]}:{},..._0x5d832e[_0x4ebd24(0x8f)]!=null?{'cookie':_0x5d832e['cookie']}:{},..._0x5d832e[_0x4ebd24(0x78)]!=null?{'accessKey':_0x5d832e['accessKey']}:{},..._0x5d832e[_0x4ebd24(0x7e)]!=null?{'format':_0x5d832e[_0x4ebd24(0x7e)]}:{},..._0x5d832e[_0x4ebd24(0x7b)]!=null?{'pageSize':_0x5d832e[_0x4ebd24(0x7b)]}:{},..._0x5d832e['riskLevel']!=null?{'riskLevel':_0x5d832e[_0x4ebd24(0x88)]}:{},..._0x5d832e[_0x4ebd24(0x8b)]!=null?{'locale':_0x5d832e[_0x4ebd24(0x8b)]}:{}},_0x5d832e[_0x4ebd24(0xac)]=_0x4107a4,delete _0x5d832e['defaultApp'],_0x46f221=!![];}return(_0x4ebd24(0x97)in _0x5d832e||_0x4ebd24(0x9d)in _0x5d832e)&&(delete _0x5d832e[_0x4ebd24(0x97)],delete _0x5d832e['app'],_0x46f221=!![]),{'config':_0x5d832e,'migrated':_0x46f221};}function writeNormalizedConfigIfNeeded(_0x1d72ce,_0x3cec9c){const _0x1e78c3=a268_0x5a722f,_0x4ea430=JSON[_0x1e78c3(0x87)](normalizeConfigForWrite(_0x3cec9c),null,0x2)+'\x0a';if(normalizedWriteCache[_0x1e78c3(0x9c)](_0x1d72ce)===_0x4ea430)return;writeConfigFile(_0x1d72ce,_0x3cec9c),normalizedWriteCache['set'](_0x1d72ce,_0x4ea430);}function parseAndNormalizeConfig(_0x3d928c,_0x4f30cf,_0x468d47){const _0x5be3ad=a268_0x5a722f,_0x3d90f5=parseCliConfigJsonFile(_0x3d928c,_0x4f30cf,_0x468d47),_0xae53fc=normalizeLegacyConfigShape(_0x3d90f5);if(_0xae53fc['migrated'])try{writeNormalizedConfigIfNeeded(_0x3d928c,_0xae53fc[_0x5be3ad(0xa7)]);}catch{}return _0xae53fc[_0x5be3ad(0xa7)];}export function loadRawConfigLayers(_0x40a693){const _0x253b28=a268_0x5a722f;let _0x3ed84c={},_0xeaa299={};const _0x1205a9=resolveConfigPath(homedir());_0x1205a9&&(_0x3ed84c=parseAndNormalizeConfig(_0x1205a9,'warn','Global'));const _0x241fea=_0x40a693??findProjectRootDirectory(),_0x10220f=resolveConfigPath(_0x241fea);return _0x10220f&&(_0xeaa299=parseAndNormalizeConfig(_0x10220f,_0x253b28(0x84),_0x253b28(0x8c))),{'globalPath':_0x1205a9,'projectPath':_0x10220f,'globalConfig':_0x3ed84c,'projectConfig':_0xeaa299};}const INHERIT_WHITELIST=['cookie',a268_0x5a722f(0x78),a268_0x5a722f(0x8b),a268_0x5a722f(0x7e),a268_0x5a722f(0x88),a268_0x5a722f(0x7b),a268_0x5a722f(0x8d),'routing',a268_0x5a722f(0x85),'apiDomain',a268_0x5a722f(0x80),a268_0x5a722f(0xab),a268_0x5a722f(0x82),a268_0x5a722f(0xa2),a268_0x5a722f(0xaa),a268_0x5a722f(0xa9)];export function mergeRawConfigLayers(_0xf06ed9){const _0x4af9b2=a268_0x5a722f,{globalConfig:_0x2b362d,projectConfig:_0x8abaa0}=_0xf06ed9,_0x499789=!!_0xf06ed9[_0x4af9b2(0x79)]||Object['keys'](_0x8abaa0)['length']>0x0;if(!_0x499789)return mergeGlobalOnly(_0x2b362d);return mergeProjectFirst(_0x2b362d,_0x8abaa0);}function mergeGlobalOnly(_0x52aff1){const _0x1ab01c=a268_0x5a722f,_0x21254b={..._0x52aff1};delete _0x21254b['inherit'];const _0x3d8278=_0x52aff1[_0x1ab01c(0xac)]&&typeof _0x52aff1['apps']==='object'?_0x52aff1['apps']:{};if(Object[_0x1ab01c(0x8a)](_0x3d8278)[_0x1ab01c(0x7a)]>0x0)_0x21254b['apps']=_0x3d8278;if(_0x52aff1[_0x1ab01c(0x94)])_0x21254b[_0x1ab01c(0x94)]=_0x52aff1[_0x1ab01c(0x94)];return _0x21254b;}function mergeProjectFirst(_0x5d6c05,_0x1f5535){const _0x4c590e=a268_0x5a722f,_0x8bfcc8={..._0x1f5535};delete _0x8bfcc8['inherit'];for(const _0x55b9e5 of INHERIT_WHITELIST){!(_0x55b9e5 in _0x8bfcc8)&&_0x55b9e5 in _0x5d6c05&&(_0x8bfcc8[_0x55b9e5]=_0x5d6c05[_0x55b9e5]);}const _0x507ad8=_0x1f5535[_0x4c590e(0xac)]&&typeof _0x1f5535[_0x4c590e(0xac)]===_0x4c590e(0xa6)?_0x1f5535[_0x4c590e(0xac)]:{};return Object['keys'](_0x507ad8)[_0x4c590e(0x7a)]>0x0?_0x8bfcc8['apps']=_0x507ad8:delete _0x8bfcc8[_0x4c590e(0xac)],_0x4c590e(0x94)in _0x1f5535?_0x8bfcc8[_0x4c590e(0x94)]=_0x1f5535['defaultApp']:delete _0x8bfcc8['defaultApp'],_0x8bfcc8;}export function readRawConfigWithLayers(_0x991358){const _0x46a3dc=loadRawConfigLayers(_0x991358);return{'config':mergeRawConfigLayers(_0x46a3dc),'layers':_0x46a3dc};}export function readRawConfig(_0x55c9d7){return mergeRawConfigLayers(loadRawConfigLayers(_0x55c9d7));}export function readConfigFile(_0x3bbc16){const _0x2a73aa=a268_0x5a722f;return parseAndNormalizeConfig(_0x3bbc16,_0x2a73aa(0xad));}export function writeConfigFile(_0x21d454,_0x2ce7ac){const _0x41c9f1=a268_0x5a722f,_0x2bc9f7=dirname(_0x21d454);!existsSync(_0x2bc9f7)&&mkdirSync(_0x2bc9f7,{'recursive':!![]});const _0x44b943=_0x21d454+'.tmp';try{const _0x184f85=normalizeConfigForWrite(_0x2ce7ac);writeFileSync(_0x44b943,JSON[_0x41c9f1(0x87)](_0x184f85,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x44b943,_0x21d454);}catch(_0x20e561){try{unlinkSync(_0x44b943);}catch{}throw _0x20e561;}}export function resolveWriteConfigPath(_0x5a2a5b){const _0x584be5=a268_0x5a722f,_0x2107f0=_0x5a2a5b===_0x584be5(0x90)?process[_0x584be5(0x9e)]():homedir(),_0x29c9ed=resolveConfigPath(_0x2107f0);return _0x29c9ed??resolve(_0x2107f0,NEW_CONFIG_NAME);}
|
package/lib/context.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export interface CLIEnv {
|
|
|
64
64
|
export interface MultiAppConfig {
|
|
65
65
|
name: string;
|
|
66
66
|
appcode: string;
|
|
67
|
+
apiGroup?: string;
|
|
67
68
|
isDefault: boolean;
|
|
68
69
|
region: LovrabetRegion;
|
|
69
70
|
regionSource: RegionConfigSource;
|
|
@@ -114,4 +115,4 @@ export declare function getTemplateBaseUrl(projectRoot?: string): string;
|
|
|
114
115
|
*
|
|
115
116
|
* 放在 context.ts 而非 alias-resolver.ts,因为需要读取 .rabetbase.json。
|
|
116
117
|
*/
|
|
117
|
-
export declare function resolveApiFilePath(apiDir: string, appCode?: string): string;
|
|
118
|
+
export declare function resolveApiFilePath(apiDir: string, appCode?: string, selectedAppName?: string): string;
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a244_0x3084ab=a244_0x5d02;(function(_0x3503df,_0x6efb39){const _0x5e939c=a244_0x5d02,_0x2dde36=_0x3503df();while(!![]){try{const _0x147c6f=-parseInt(_0x5e939c(0x1ac))/0x1+-parseInt(_0x5e939c(0x1a8))/0x2*(parseInt(_0x5e939c(0x1d1))/0x3)+parseInt(_0x5e939c(0x1bc))/0x4+parseInt(_0x5e939c(0x1df))/0x5+parseInt(_0x5e939c(0x1a1))/0x6+parseInt(_0x5e939c(0x1d2))/0x7+-parseInt(_0x5e939c(0x1ca))/0x8;if(_0x147c6f===_0x6efb39)break;else _0x2dde36['push'](_0x2dde36['shift']());}catch(_0x4bf535){_0x2dde36['push'](_0x2dde36['shift']());}}}(a244_0x5854,0x57dcd));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';function a244_0x5854(){const _0xd7fd59=['apiDomain','name','hasOwnProperty','setLogPath','platformDomain','prototype','api.ts','entries','length','skillDomain','projectConfig','filter','config','replace','doctor','1627036FQbhPV','production','region','userDomain','app','global','cookie','globalConfig','configuredRegion','defaultApp','template_base_url','appDomain','env','raw','443096SchKRn','agentDomain','apiDir','runtimeDomain','Rabetbase\x20configuration','-api.ts','call','364125dmSSdu','4917605ftfsNd','find','cdn','./constant/domain.js','routing','regionConfiguredValue','certificateDomain','domains','app\x20profile\x20\x22','appcode','argv','cwd','global\x20Rabetbase\x20configuration','786875LMmMzc','object','./utils/is-non-interactive.js','regionLocation','kbDomain','values','apps','daily','keys','regionSource','localDomain','1500216YZiEHs','string','join','skillHubDomain','trim','routingConfig','project','10NQOCnR','slice','https://g.lovrabet.com/dist/lovrabet-skill','currentApp','494538ADwXSC'];a244_0x5854=function(){return _0xd7fd59;};return a244_0x5854();}import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{resolveConfiguredRegion,resolveEffectiveRegion}from'./config/region-config.js';import{resolveEnterpriseRoutingManifest}from'./config/domain-config.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x4a63c8){return process.env[`RABETBASE_${_0x4a63c8}`]||process.env[`LOVRABET_${_0x4a63c8}`]||undefined;}function optionalString(_0x37011c){const _0x3bfe8d=a244_0x5d02;return typeof _0x37011c===_0x3bfe8d(0x1a2)&&_0x37011c['trim']()?_0x37011c['trim']():undefined;}export function isRoutingRecoveryService(_0x375edc){const _0x5499e2=a244_0x5d02;return _0x375edc===_0x5499e2(0x1b9)||_0x375edc===_0x5499e2(0x1bb);}export async function createContext(_0x5cb91c){const _0x1a6afd=a244_0x5d02,{config:_0x13e5a7,layers:_0x5f2195}=readRawConfigWithLayers(),_0x1319a0=buildConfig(_0x13e5a7,_0x5cb91c,_0x5f2195);await initGlobalEnvironment(_0x1319a0);const {getUserDomain:_0x18e4f7,getApiDomain:_0xe8250e}=await import('./constant/domain.js'),_0xe1f2e8={'apiDomain':_0xe8250e(),'userDomain':_0x18e4f7()},_0x21d4a0=await buildAuth(_0x1319a0);logger[_0x1a6afd(0x1b0)](process[_0x1a6afd(0x1dd)]());const _0xeb89e0=(CLI_BIN_NAME+'\x20'+process[_0x1a6afd(0x1dc)][_0x1a6afd(0x1a9)](0x2)[_0x1a6afd(0x1a3)]('\x20'))[_0x1a6afd(0x1a5)]();logger['setRawCommand'](_0xeb89e0);const {isNonInteractive:_0x43e2e2}=await import(_0x1a6afd(0x1e1)),_0x1230ce=_0x43e2e2(_0x5cb91c);return{'config':_0x1319a0,'auth':_0x21d4a0,'logger':logger,'env':_0xe1f2e8,'nonInteractive':_0x1230ce};}export function buildConfigFromFlags(_0x339093){const {config:_0x31d8f5,layers:_0x4edc0a}=readRawConfigWithLayers();return buildConfig(_0x31d8f5,_0x339093,_0x4edc0a);}export async function initGlobalEnvironment(_0x5e7dd2){const _0x3192b8=a244_0x5d02,_0xfa1319=_0x5e7dd2[_0x3192b8(0x19f)]==='app'&&_0x5e7dd2[_0x3192b8(0x1ab)]?_0x3192b8(0x1da)+_0x5e7dd2[_0x3192b8(0x1ab)]+'\x22':_0x5e7dd2['regionSource']===_0x3192b8(0x1a7)?'project\x20Rabetbase\x20configuration':_0x5e7dd2[_0x3192b8(0x19f)]===_0x3192b8(0x1c1)?_0x3192b8(0x1de):_0x3192b8(0x1ce);await initConfiguredEnvironment({'raw':_0x5e7dd2['raw'],'configuredRegion':_0x5e7dd2[_0x3192b8(0x1d7)]??_0x5e7dd2[_0x3192b8(0x1c9)]?.[_0x3192b8(0x1be)]??_0x5e7dd2[_0x3192b8(0x1be)],'regionLocation':_0xfa1319,'targetEnv':_0x5e7dd2[_0x3192b8(0x1c8)]});}async function initConfiguredEnvironment(_0x2bfedb){const _0x530251=a244_0x5d02,_0x207883=resolveConfiguredRegion(_0x2bfedb[_0x530251(0x1c4)],_0x2bfedb[_0x530251(0x1e2)]),_0x14e444=resolveEnterpriseRoutingManifest(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1d6)]),_0x31cb15={'region':_0x207883,'apiDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)][_0x530251(0x1ad)]:optionalString(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1ad)]),'userDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)][_0x530251(0x1bf)]:optionalString(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1bf)]),'runtimeDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)][_0x530251(0x1cd)]:optionalString(_0x2bfedb['raw']?.[_0x530251(0x1cd)]),'skillDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)]['skillDomain']:optionalString(_0x2bfedb['raw']?.[_0x530251(0x1b6)])||optionalString(_0x2bfedb[_0x530251(0x1c9)]?.['skillHubDomain'])||optionalString(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1cb)])||optionalString(_0x2bfedb['raw']?.[_0x530251(0x1b1)]),'kbDomain':_0x14e444?_0x14e444['domains']['kbDomain']:optionalString(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1e3)])||optionalString(_0x2bfedb['raw']?.['agentDomain'])||optionalString(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1b1)]),'appDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)][_0x530251(0x1c7)]:optionalString(_0x2bfedb[_0x530251(0x1c9)]?.['appDomain']),'localDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)]['localDomain']:optionalString(_0x2bfedb[_0x530251(0x1c9)]?.['localDomain']),'certificateDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)][_0x530251(0x1d8)]:optionalString(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1d8)]),'cdn':_0x14e444?.[_0x530251(0x1d4)]},{initEnv:_0x3528a0}=await import('./constant/env.js'),{initDomains:_0x2cad7e}=await import(_0x530251(0x1d5));_0x3528a0(_0x2bfedb['targetEnv']),_0x2cad7e(_0x31cb15);}export async function initMultiAppEnvironment(_0x33296d){const _0x55f01d=a244_0x5d02;await initConfiguredEnvironment({'raw':_0x33296d[_0x55f01d(0x1a6)],'configuredRegion':_0x33296d[_0x55f01d(0x1be)],'regionLocation':_0x55f01d(0x1da)+_0x33296d[_0x55f01d(0x1ae)]+'\x22','targetEnv':_0x33296d[_0x55f01d(0x1c8)]==='daily'?_0x55f01d(0x19d):_0x55f01d(0x1bd)});}export function getConfigAppCode(_0x4ef55a){const _0x545990=a244_0x5d02,_0x1150fd=readRawConfig(_0x4ef55a);if(_0x1150fd[_0x545990(0x1e5)]&&typeof _0x1150fd[_0x545990(0x1e5)]===_0x545990(0x1e0)){const _0xa7eeda=_0x1150fd['defaultApp'];if(_0xa7eeda)return _0x1150fd[_0x545990(0x1e5)][_0xa7eeda]?.[_0x545990(0x1db)]?String(_0x1150fd[_0x545990(0x1e5)][_0xa7eeda][_0x545990(0x1db)])['trim']():undefined;const _0x35f331=Object[_0x545990(0x1e4)](_0x1150fd[_0x545990(0x1e5)]);if(_0x35f331['length']===0x1&&_0x35f331[0x0]?.[_0x545990(0x1db)])return String(_0x35f331[0x0]['appcode'])['trim']();}const _0xd80df2=_0x1150fd[_0x545990(0x1db)]||_0x1150fd[_0x545990(0x1c0)];if(typeof _0xd80df2!==_0x545990(0x1a2)||_0xd80df2[_0x545990(0x1a5)]()==='')return undefined;return _0xd80df2[_0x545990(0x1a5)]();}function a244_0x5d02(_0x5708e3,_0x168f35){_0x5708e3=_0x5708e3-0x19d;const _0x5854ed=a244_0x5854();let _0x5d02c5=_0x5854ed[_0x5708e3];return _0x5d02c5;}const CONNECTION_ROUTING_KEYS=[a244_0x3084ab(0x1d6),'apiDomain','userDomain',a244_0x3084ab(0x1cd),a244_0x3084ab(0x1b6),a244_0x3084ab(0x1a4),'kbDomain','agentDomain','platformDomain',a244_0x3084ab(0x1c7),a244_0x3084ab(0x1a0),a244_0x3084ab(0x1d8)];function pickConnectionRoutingConfig(_0x12c5d0,_0x48f2c9){const _0x4088a4={'region':_0x48f2c9};for(const _0xb39a71 of CONNECTION_ROUTING_KEYS){if(_0x12c5d0[_0xb39a71]!==undefined)_0x4088a4[_0xb39a71]=_0x12c5d0[_0xb39a71];}return _0x4088a4;}export function getMultiAppConfigs(_0x3d2f52=a244_0x3084ab(0x1a7),_0x543728){const _0x2241d7=a244_0x3084ab,_0x2a927e=loadRawConfigLayers(_0x543728);let _0x38ec5b,_0x46ca1d;const _0x234a9d=mergeRawConfigLayers(_0x2a927e),_0x24b246=_0x2a927e[_0x2241d7(0x1c3)][_0x2241d7(0x1e5)]&&typeof _0x2a927e[_0x2241d7(0x1c3)][_0x2241d7(0x1e5)]===_0x2241d7(0x1e0)?_0x2a927e['globalConfig'][_0x2241d7(0x1e5)]:{},_0x268e9e=_0x2a927e['projectConfig'][_0x2241d7(0x1e5)]&&typeof _0x2a927e[_0x2241d7(0x1b7)]['apps']===_0x2241d7(0x1e0)?_0x2a927e[_0x2241d7(0x1b7)][_0x2241d7(0x1e5)]:{};_0x3d2f52==='merged'?(_0x38ec5b={..._0x24b246,..._0x268e9e},_0x46ca1d=_0x234a9d[_0x2241d7(0x1c5)]):(_0x38ec5b=_0x2a927e['projectConfig'][_0x2241d7(0x1e5)],_0x46ca1d=_0x2a927e[_0x2241d7(0x1b7)]['defaultApp']);!_0x46ca1d&&_0x38ec5b&&typeof _0x38ec5b===_0x2241d7(0x1e0)&&Object[_0x2241d7(0x19e)](_0x38ec5b)[_0x2241d7(0x1b5)]===0x1&&(_0x46ca1d=Object[_0x2241d7(0x19e)](_0x38ec5b)[0x0]);if(!_0x38ec5b||typeof _0x38ec5b!==_0x2241d7(0x1e0)||Object[_0x2241d7(0x19e)](_0x38ec5b)[_0x2241d7(0x1b5)]===0x0)return null;return Object[_0x2241d7(0x1b4)](_0x38ec5b)['map'](([_0xd0b1e2,_0x349c60])=>{const _0x153ed5=_0x2241d7,_0x350f4d=_0x3d2f52===_0x153ed5(0x1a7)||Object[_0x153ed5(0x1b2)][_0x153ed5(0x1af)][_0x153ed5(0x1d0)](_0x268e9e,_0xd0b1e2),_0x1921f9=_0x350f4d?_0x234a9d:_0x2a927e['globalConfig'],_0x17fe30=resolveEffectiveRegion({'appRegion':_0x349c60?.['region'],'projectRegion':_0x350f4d?_0x2a927e[_0x153ed5(0x1b7)][_0x153ed5(0x1be)]:undefined,'globalRegion':_0x2a927e['globalConfig']['region'],'mergedRegion':_0x1921f9[_0x153ed5(0x1be)],'appName':_0xd0b1e2});return{'name':_0xd0b1e2,'appcode':_0x349c60?.[_0x153ed5(0x1db)]||'','isDefault':_0xd0b1e2===_0x46ca1d,'region':_0x17fe30[_0x153ed5(0x1be)],'regionSource':_0x17fe30['source'],'env':_0x349c60?.['env'],'apiDir':_0x349c60?.[_0x153ed5(0x1cc)],'cookie':_0x349c60?.[_0x153ed5(0x1c2)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0x1921f9,_0x17fe30['region'])};})[_0x2241d7(0x1b8)](_0x1b1023=>_0x1b1023[_0x2241d7(0x1db)]);}export function getTemplateBaseUrl(_0x278a5f){const _0x5f6ae5=a244_0x3084ab,_0xdbe835=readRawConfig(_0x278a5f);if(_0xdbe835[_0x5f6ae5(0x1c6)]&&typeof _0xdbe835[_0x5f6ae5(0x1c6)]===_0x5f6ae5(0x1a2))return _0xdbe835[_0x5f6ae5(0x1c6)][_0x5f6ae5(0x1ba)](/\/$/,'');return _0x5f6ae5(0x1aa);}function buildConfig(_0x262cd5,_0x38412b,_0xd154b1){return{...resolveAppConfig({'raw':_0x262cd5,'flags':_0x38412b,'layers':_0xd154b1,'readEnv':env}),'raw':_0x262cd5};}export function resolveApiFilePath(_0x54f547,_0x5d7944){const _0x99d849=a244_0x3084ab,_0x2c49d2=resolve(process[_0x99d849(0x1dd)](),_0x54f547),_0x3aed45=resolve(_0x2c49d2,_0x99d849(0x1b3));if(!_0x5d7944)return _0x3aed45;const _0x4f65ed=readRawConfig(),_0x276426=_0x4f65ed[_0x99d849(0x1e5)]&&typeof _0x4f65ed[_0x99d849(0x1e5)]===_0x99d849(0x1e0)?_0x4f65ed[_0x99d849(0x1e5)]:{},_0x2d7873=Object[_0x99d849(0x1b4)](_0x276426)[_0x99d849(0x1d3)](([,_0x45ed9b])=>_0x45ed9b?.['appcode']===_0x5d7944);if(!_0x2d7873)return _0x3aed45;const [_0x339ac5,_0x373bc7]=_0x2d7873,_0x360725=typeof _0x4f65ed[_0x99d849(0x1c5)]==='string'?_0x4f65ed[_0x99d849(0x1c5)]:undefined;if(_0x373bc7?.[_0x99d849(0x1cc)])return _0x3aed45;if(_0x360725&&_0x339ac5!==_0x360725)return resolve(_0x2c49d2,_0x339ac5+_0x99d849(0x1cf));return _0x3aed45;}
|
|
1
|
+
const a269_0x250cc8=a269_0x16f4;(function(_0x369f74,_0x5335e5){const _0x102732=a269_0x16f4,_0xe17a8e=_0x369f74();while(!![]){try{const _0x3861fd=parseInt(_0x102732(0x11a))/0x1*(-parseInt(_0x102732(0x133))/0x2)+-parseInt(_0x102732(0x161))/0x3*(-parseInt(_0x102732(0x15d))/0x4)+parseInt(_0x102732(0x149))/0x5+-parseInt(_0x102732(0x13d))/0x6+parseInt(_0x102732(0x13e))/0x7*(-parseInt(_0x102732(0x158))/0x8)+parseInt(_0x102732(0x153))/0x9*(parseInt(_0x102732(0x12f))/0xa)+parseInt(_0x102732(0x138))/0xb*(-parseInt(_0x102732(0x12c))/0xc);if(_0x3861fd===_0x5335e5)break;else _0xe17a8e['push'](_0xe17a8e['shift']());}catch(_0x4fa19e){_0xe17a8e['push'](_0xe17a8e['shift']());}}}(a269_0x44e0,0x39c4a));import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';function a269_0x44e0(){const _0x45a6fa=['hasOwnProperty','project','3050968mnvNIT','source','domains','daily','./constant/env.js','937864wuuojf','agentDomain','regionSource','map','6aidNQc','setRawCommand','certificateDomain','skillHubDomain','158917aAXlDY','apiDomain','env','currentApp','defaultApp','object','config','entries','length','skillDomain','string','routing','cwd','kbDomain','global','join','app','globalConfig','1552596QHagpQ','keys','./utils/is-non-interactive.js','10UcxzYZ','./constant/domain.js','apps','apiGroup','4DNfdex','app\x20profile\x20\x22','argv','appcode','platformDomain','11RpmjZi','values','doctor','appDomain','https://g.lovrabet.com/dist/lovrabet-skill','1251408ldNjBp','7IuUmfu','project\x20Rabetbase\x20configuration','targetEnv','cdn','template_base_url','projectConfig','configuredRegion','cookie','apiDir','regionLocation','filePath','2266605KLbbrr','production','setLogPath','trim','raw','localDomain','filter','replace','Rabetbase\x20configuration','region','3163689NSBBWa','runtimeDomain','userDomain'];a269_0x44e0=function(){return _0x45a6fa;};return a269_0x44e0();}import{resolveConfiguredRegion,resolveEffectiveRegion}from'./config/region-config.js';import{resolveEnterpriseRoutingManifest}from'./config/domain-config.js';import{logger}from'./utils/logger.js';import{resolveApiModelSource}from'./api/model-source.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x2381fe){return process.env[`RABETBASE_${_0x2381fe}`]||process.env[`LOVRABET_${_0x2381fe}`]||undefined;}function optionalString(_0x51a76d){return typeof _0x51a76d==='string'&&_0x51a76d['trim']()?_0x51a76d['trim']():undefined;}export function isRoutingRecoveryService(_0x33b28a){const _0x4a2524=a269_0x16f4;return _0x33b28a===_0x4a2524(0x120)||_0x33b28a===_0x4a2524(0x13a);}export async function createContext(_0x4db87c){const _0x199828=a269_0x16f4,{config:_0x360ee0,layers:_0x33925b}=readRawConfigWithLayers(),_0x3edfdd=buildConfig(_0x360ee0,_0x4db87c,_0x33925b);await initGlobalEnvironment(_0x3edfdd);const {getUserDomain:_0x37dc94,getApiDomain:_0xe546fe}=await import(_0x199828(0x130)),_0x4e9e2={'apiDomain':_0xe546fe(),'userDomain':_0x37dc94()},_0x263836=await buildAuth(_0x3edfdd);logger[_0x199828(0x14b)](process[_0x199828(0x126)]());const _0x3114c4=(CLI_BIN_NAME+'\x20'+process[_0x199828(0x135)]['slice'](0x2)[_0x199828(0x129)]('\x20'))[_0x199828(0x14c)]();logger[_0x199828(0x162)](_0x3114c4);const {isNonInteractive:_0x3c5019}=await import(_0x199828(0x12e)),_0x48b445=_0x3c5019(_0x4db87c);return{'config':_0x3edfdd,'auth':_0x263836,'logger':logger,'env':_0x4e9e2,'nonInteractive':_0x48b445};}export function buildConfigFromFlags(_0x5f2043){const {config:_0x3dd285,layers:_0x5e0237}=readRawConfigWithLayers();return buildConfig(_0x3dd285,_0x5f2043,_0x5e0237);}export async function initGlobalEnvironment(_0x5855c7){const _0x2298ca=a269_0x16f4,_0x429144=_0x5855c7['regionSource']==='app'&&_0x5855c7[_0x2298ca(0x11d)]?_0x2298ca(0x134)+_0x5855c7['currentApp']+'\x22':_0x5855c7['regionSource']===_0x2298ca(0x157)?_0x2298ca(0x13f):_0x5855c7[_0x2298ca(0x15f)]===_0x2298ca(0x128)?'global\x20Rabetbase\x20configuration':_0x2298ca(0x151);await initConfiguredEnvironment({'raw':_0x5855c7[_0x2298ca(0x14d)],'configuredRegion':_0x5855c7['regionConfiguredValue']??_0x5855c7['raw']?.[_0x2298ca(0x152)]??_0x5855c7[_0x2298ca(0x152)],'regionLocation':_0x429144,'targetEnv':_0x5855c7[_0x2298ca(0x11c)]});}async function initConfiguredEnvironment(_0xf7e467){const _0xa277c1=a269_0x16f4,_0x57d257=resolveConfiguredRegion(_0xf7e467[_0xa277c1(0x144)],_0xf7e467[_0xa277c1(0x147)]),_0x2954b0=resolveEnterpriseRoutingManifest(_0xf7e467['raw']?.[_0xa277c1(0x125)]),_0x441d7c={'region':_0x57d257,'apiDomain':_0x2954b0?_0x2954b0[_0xa277c1(0x15a)][_0xa277c1(0x11b)]:optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x11b)]),'userDomain':_0x2954b0?_0x2954b0[_0xa277c1(0x15a)][_0xa277c1(0x155)]:optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x155)]),'runtimeDomain':_0x2954b0?_0x2954b0['domains'][_0xa277c1(0x154)]:optionalString(_0xf7e467[_0xa277c1(0x14d)]?.['runtimeDomain']),'skillDomain':_0x2954b0?_0x2954b0[_0xa277c1(0x15a)]['skillDomain']:optionalString(_0xf7e467['raw']?.[_0xa277c1(0x123)])||optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x119)])||optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x15e)])||optionalString(_0xf7e467[_0xa277c1(0x14d)]?.['platformDomain']),'kbDomain':_0x2954b0?_0x2954b0['domains'][_0xa277c1(0x127)]:optionalString(_0xf7e467[_0xa277c1(0x14d)]?.['kbDomain'])||optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x15e)])||optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x137)]),'appDomain':_0x2954b0?_0x2954b0[_0xa277c1(0x15a)][_0xa277c1(0x13b)]:optionalString(_0xf7e467['raw']?.['appDomain']),'localDomain':_0x2954b0?_0x2954b0[_0xa277c1(0x15a)][_0xa277c1(0x14e)]:optionalString(_0xf7e467['raw']?.['localDomain']),'certificateDomain':_0x2954b0?_0x2954b0[_0xa277c1(0x15a)][_0xa277c1(0x163)]:optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x163)]),'cdn':_0x2954b0?.[_0xa277c1(0x141)]},{initEnv:_0x3e8b72}=await import(_0xa277c1(0x15c)),{initDomains:_0x13c5f6}=await import(_0xa277c1(0x130));_0x3e8b72(_0xf7e467[_0xa277c1(0x140)]),_0x13c5f6(_0x441d7c);}export async function initMultiAppEnvironment(_0x21693c){const _0x331384=a269_0x16f4;await initConfiguredEnvironment({'raw':_0x21693c['routingConfig'],'configuredRegion':_0x21693c[_0x331384(0x152)],'regionLocation':_0x331384(0x134)+_0x21693c['name']+'\x22','targetEnv':_0x21693c[_0x331384(0x11c)]===_0x331384(0x15b)?_0x331384(0x15b):_0x331384(0x14a)});}export function getConfigAppCode(_0x583af4){const _0x40a9a3=a269_0x16f4,_0x58ccd4=readRawConfig(_0x583af4);if(_0x58ccd4['apps']&&typeof _0x58ccd4['apps']===_0x40a9a3(0x11f)){const _0x1bec9d=_0x58ccd4[_0x40a9a3(0x11e)];if(_0x1bec9d)return _0x58ccd4[_0x40a9a3(0x131)][_0x1bec9d]?.[_0x40a9a3(0x136)]?String(_0x58ccd4[_0x40a9a3(0x131)][_0x1bec9d][_0x40a9a3(0x136)])[_0x40a9a3(0x14c)]():undefined;const _0x15f8ff=Object[_0x40a9a3(0x139)](_0x58ccd4[_0x40a9a3(0x131)]);if(_0x15f8ff[_0x40a9a3(0x122)]===0x1&&_0x15f8ff[0x0]?.['appcode'])return String(_0x15f8ff[0x0][_0x40a9a3(0x136)])[_0x40a9a3(0x14c)]();}const _0x4c42e7=_0x58ccd4[_0x40a9a3(0x136)]||_0x58ccd4[_0x40a9a3(0x12a)];if(typeof _0x4c42e7!=='string'||_0x4c42e7[_0x40a9a3(0x14c)]()==='')return undefined;return _0x4c42e7[_0x40a9a3(0x14c)]();}const CONNECTION_ROUTING_KEYS=[a269_0x250cc8(0x125),a269_0x250cc8(0x11b),a269_0x250cc8(0x155),a269_0x250cc8(0x154),a269_0x250cc8(0x123),'skillHubDomain',a269_0x250cc8(0x127),a269_0x250cc8(0x15e),a269_0x250cc8(0x137),a269_0x250cc8(0x13b),a269_0x250cc8(0x14e),'certificateDomain'];function pickConnectionRoutingConfig(_0x3c7e79,_0x4b6054){const _0x58e075={'region':_0x4b6054};for(const _0x5a227e of CONNECTION_ROUTING_KEYS){if(_0x3c7e79[_0x5a227e]!==undefined)_0x58e075[_0x5a227e]=_0x3c7e79[_0x5a227e];}return _0x58e075;}export function getMultiAppConfigs(_0xbe59f4=a269_0x250cc8(0x157),_0x3acd7d){const _0x4ca42d=a269_0x250cc8,_0x42e82c=loadRawConfigLayers(_0x3acd7d);let _0x5a0052,_0x57647e;const _0x34ac21=mergeRawConfigLayers(_0x42e82c),_0x403123=_0x42e82c[_0x4ca42d(0x12b)][_0x4ca42d(0x131)]&&typeof _0x42e82c[_0x4ca42d(0x12b)][_0x4ca42d(0x131)]===_0x4ca42d(0x11f)?_0x42e82c[_0x4ca42d(0x12b)][_0x4ca42d(0x131)]:{},_0x3112bb=_0x42e82c[_0x4ca42d(0x143)]['apps']&&typeof _0x42e82c[_0x4ca42d(0x143)][_0x4ca42d(0x131)]===_0x4ca42d(0x11f)?_0x42e82c['projectConfig'][_0x4ca42d(0x131)]:{};_0xbe59f4==='merged'?(_0x5a0052={..._0x403123,..._0x3112bb},_0x57647e=_0x34ac21[_0x4ca42d(0x11e)]):(_0x5a0052=_0x42e82c[_0x4ca42d(0x143)][_0x4ca42d(0x131)],_0x57647e=_0x42e82c[_0x4ca42d(0x143)][_0x4ca42d(0x11e)]);!_0x57647e&&_0x5a0052&&typeof _0x5a0052===_0x4ca42d(0x11f)&&Object[_0x4ca42d(0x12d)](_0x5a0052)[_0x4ca42d(0x122)]===0x1&&(_0x57647e=Object[_0x4ca42d(0x12d)](_0x5a0052)[0x0]);if(!_0x5a0052||typeof _0x5a0052!=='object'||Object[_0x4ca42d(0x12d)](_0x5a0052)[_0x4ca42d(0x122)]===0x0)return null;return Object[_0x4ca42d(0x121)](_0x5a0052)[_0x4ca42d(0x160)](([_0x3ba171,_0x3c45bb])=>{const _0x3d4b78=_0x4ca42d,_0x5873bd=_0xbe59f4===_0x3d4b78(0x157)||Object['prototype'][_0x3d4b78(0x156)]['call'](_0x3112bb,_0x3ba171),_0x53e8f4=_0x5873bd?_0x34ac21:_0x42e82c[_0x3d4b78(0x12b)],_0x4fabbe=resolveEffectiveRegion({'appRegion':_0x3c45bb?.[_0x3d4b78(0x152)],'projectRegion':_0x5873bd?_0x42e82c[_0x3d4b78(0x143)]['region']:undefined,'globalRegion':_0x42e82c[_0x3d4b78(0x12b)][_0x3d4b78(0x152)],'mergedRegion':_0x53e8f4[_0x3d4b78(0x152)],'appName':_0x3ba171});return{'name':_0x3ba171,'appcode':_0x3c45bb?.[_0x3d4b78(0x136)]||'','apiGroup':optionalString(_0x3c45bb?.[_0x3d4b78(0x132)]),'isDefault':_0x3ba171===_0x57647e,'region':_0x4fabbe['region'],'regionSource':_0x4fabbe[_0x3d4b78(0x159)],'env':_0x3c45bb?.[_0x3d4b78(0x11c)],'apiDir':optionalString(_0x3c45bb?.[_0x3d4b78(0x146)])||optionalString(_0x53e8f4['apiDir']),'cookie':_0x3c45bb?.[_0x3d4b78(0x145)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0x53e8f4,_0x4fabbe['region'])};})[_0x4ca42d(0x14f)](_0x1b63ca=>_0x1b63ca[_0x4ca42d(0x136)]);}function a269_0x16f4(_0x3620d5,_0xbd1994){_0x3620d5=_0x3620d5-0x119;const _0x44e08c=a269_0x44e0();let _0x16f4bd=_0x44e08c[_0x3620d5];return _0x16f4bd;}export function getTemplateBaseUrl(_0x35ee30){const _0x334750=a269_0x250cc8,_0x54340a=readRawConfig(_0x35ee30);if(_0x54340a[_0x334750(0x142)]&&typeof _0x54340a[_0x334750(0x142)]===_0x334750(0x124))return _0x54340a[_0x334750(0x142)][_0x334750(0x150)](/\/$/,'');return _0x334750(0x13c);}function buildConfig(_0x67ae85,_0x43d73c,_0x5290f4){return{...resolveAppConfig({'raw':_0x67ae85,'flags':_0x43d73c,'layers':_0x5290f4,'readEnv':env}),'raw':_0x67ae85};}export function resolveApiFilePath(_0x2466e4,_0x40e26e,_0x364e65){const _0x3d1c9a=a269_0x250cc8;return resolveApiModelSource(_0x2466e4,_0x40e26e,_0x364e65)[_0x3d1c9a(0x148)];}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 通用数据集别名解析层
|
|
3
3
|
*
|
|
4
|
-
* 从 `rabetbase api pull`
|
|
5
|
-
* --alias
|
|
4
|
+
* 从 `rabetbase api pull` 生成的模型注册表或旧式 api.ts 中提取 alias → datasetCode 映射。
|
|
5
|
+
* --alias 参数接受生成模型中定义的 alias 名称,解析为对应的 datasetCode。
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* 无生成模型事实时(CI 环境未 pull)返回 undefined,由调用方报错。
|
|
8
8
|
*/
|
|
9
9
|
export interface AliasEntry {
|
|
10
10
|
alias: string;
|
|
@@ -13,19 +13,15 @@ export interface AliasEntry {
|
|
|
13
13
|
name: string;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* 加载并缓存指定模型事实文件的别名映射。
|
|
17
17
|
*
|
|
18
|
-
* @param apiDir
|
|
19
|
-
* @param appCode
|
|
20
|
-
* @param resolvedFilePath
|
|
21
|
-
*
|
|
18
|
+
* @param apiDir api 目录(用于默认路径兜底)
|
|
19
|
+
* @param appCode (已废弃,保留签名兼容)不再用于内部路径解析
|
|
20
|
+
* @param resolvedFilePath 已解析好的模型注册表或兼容 api.ts 路径
|
|
21
|
+
* @param profileName 模型注册表中的目标 profile
|
|
22
22
|
*/
|
|
23
|
-
export declare function loadAliasMap(apiDir: string, appCode?: string, resolvedFilePath?: string): AliasEntry[];
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
*/
|
|
27
|
-
export declare function
|
|
28
|
-
/**
|
|
29
|
-
* 列出所有可用的别名(用于 help、补全、错误提示等场景)
|
|
30
|
-
*/
|
|
31
|
-
export declare function listAliases(apiDir: string, appCode?: string, resolvedFilePath?: string): AliasEntry[];
|
|
23
|
+
export declare function loadAliasMap(apiDir: string, appCode?: string, resolvedFilePath?: string, profileName?: string): AliasEntry[];
|
|
24
|
+
/** 通过 alias 名称解析 datasetCode。 */
|
|
25
|
+
export declare function resolveAlias(apiDir: string, alias: string, appCode?: string, resolvedFilePath?: string, profileName?: string): string | undefined;
|
|
26
|
+
/** 列出所有可用的别名(用于 help、补全、错误提示等场景)。 */
|
|
27
|
+
export declare function listAliases(apiDir: string, appCode?: string, resolvedFilePath?: string, profileName?: string): AliasEntry[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a270_0x5ea829=a270_0x1c69;(function(_0xf2e65c,_0x16e822){const _0x5730d6=a270_0x1c69,_0x22defd=_0xf2e65c();while(!![]){try{const _0x1c23a2=parseInt(_0x5730d6(0x182))/0x1*(parseInt(_0x5730d6(0x16c))/0x2)+-parseInt(_0x5730d6(0x167))/0x3*(-parseInt(_0x5730d6(0x175))/0x4)+-parseInt(_0x5730d6(0x17b))/0x5*(parseInt(_0x5730d6(0x184))/0x6)+-parseInt(_0x5730d6(0x173))/0x7*(parseInt(_0x5730d6(0x170))/0x8)+-parseInt(_0x5730d6(0x16a))/0x9+-parseInt(_0x5730d6(0x181))/0xa*(-parseInt(_0x5730d6(0x179))/0xb)+parseInt(_0x5730d6(0x165))/0xc;if(_0x1c23a2===_0x16e822)break;else _0x22defd['push'](_0x22defd['shift']());}catch(_0x372917){_0x22defd['push'](_0x22defd['shift']());}}}(a270_0x19ce,0xab047));import{existsSync,readFileSync,realpathSync,statSync}from'node:fs';import{dirname,extname,isAbsolute,relative,resolve}from'node:path';import{MODEL_REGISTRY_FILE_NAME,getProfileModels,readModelRegistry}from'../api/model-registry-file.js';import{parseLegacyApiModels}from'../api/legacy-api-file.js';function a270_0x19ce(){const _0x407910=['size','set','.ts','flags','stringify','utf-8','has','14079540uTmtYt','.cjs','1135812YHgfeV','slice','.jsx','7670304kOmaGN','datasetCode','2gIGSbF','map','isFile','length','8PwezRR','../','.cts','9511026lXxlkr','flatMap','4KHYENq','.tsx','defaultProfile','alias','10590492NJuXWU','api.ts','4646885VopJvD','get','.js','endsWith','source','filter','10JDZdet','1326167gxVwJf','startsWith','6lYYKPl','push','.mts'];a270_0x19ce=function(){return _0x407910;};return a270_0x19ce();}import{findProjectRootDirectory}from'../context/config-loader.js';const cache=new Map(),MAX_LOCAL_REEXPORT_DEPTH=0x8,SOURCE_FILE_EXTENSIONS=[a270_0x5ea829(0x160),a270_0x5ea829(0x176),a270_0x5ea829(0x15d),a270_0x5ea829(0x172),a270_0x5ea829(0x17d),a270_0x5ea829(0x169),'.mjs',a270_0x5ea829(0x166)],LOCAL_REEXPORT_RE=/\bexport\s+(?:type\s+)?(?:\{[\s\S]*?\}|\*)\s+from\s*["']([^"']+)["']/g,SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION={'.js':[a270_0x5ea829(0x160),'.tsx'],'.jsx':['.tsx'],'.mjs':[a270_0x5ea829(0x15d)],'.cjs':[a270_0x5ea829(0x172)]};function parseApiFile(_0x1f32d0){const _0x3fcde0=a270_0x5ea829;return parseLegacyApiModels(_0x1f32d0)[_0x3fcde0(0x174)](_0x3061bd=>_0x3061bd[_0x3fcde0(0x178)]?[{'alias':_0x3061bd[_0x3fcde0(0x178)],'datasetCode':_0x3061bd['datasetCode'],'tableName':_0x3061bd['tableName'],'name':_0x3061bd['name']}]:[]);}function isWithinRoot(_0xad3f00,_0x54df31){const _0x428313=a270_0x5ea829,_0x2281b1=relative(_0xad3f00,_0x54df31);return _0x2281b1===''||!_0x2281b1[_0x428313(0x183)]('..')&&!isAbsolute(_0x2281b1);}function resolveExistingFile(_0x3a86ca){const _0x78a704=a270_0x5ea829;if(!existsSync(_0x3a86ca))return undefined;try{return statSync(_0x3a86ca)[_0x78a704(0x16e)]()?realpathSync(_0x3a86ca):undefined;}catch{return undefined;}}function reexportCandidatePaths(_0x55dc16){const _0x42283a=a270_0x5ea829,_0x4a2385=extname(_0x55dc16);if(!_0x4a2385)return[...SOURCE_FILE_EXTENSIONS[_0x42283a(0x16d)](_0x442378=>''+_0x55dc16+_0x442378),...SOURCE_FILE_EXTENSIONS[_0x42283a(0x16d)](_0x199530=>resolve(_0x55dc16,'index'+_0x199530))];const _0x4fec8b=SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION[_0x4a2385];if(!_0x4fec8b)return[_0x55dc16];const _0x100b13=_0x55dc16[_0x42283a(0x168)](0x0,-_0x4a2385[_0x42283a(0x16f)]);return[..._0x4fec8b[_0x42283a(0x16d)](_0x2e67de=>''+_0x100b13+_0x2e67de),_0x55dc16];}function a270_0x1c69(_0xe1dc89,_0x4f2651){_0xe1dc89=_0xe1dc89-0x15d;const _0x19cee1=a270_0x19ce();let _0x1c6963=_0x19cee1[_0xe1dc89];return _0x1c6963;}function resolveLocalReexport(_0xdc6853,_0x482813,_0x394125){const _0x1a0afd=a270_0x5ea829;if(!_0x482813[_0x1a0afd(0x183)]('./')&&!_0x482813[_0x1a0afd(0x183)](_0x1a0afd(0x171)))return undefined;const _0x321eee=resolve(dirname(_0xdc6853),_0x482813);if(!isWithinRoot(_0x394125,_0x321eee))return undefined;for(const _0x54e774 of reexportCandidatePaths(_0x321eee)){const _0x206dd6=resolveExistingFile(_0x54e774);if(_0x206dd6&&isWithinRoot(_0x394125,_0x206dd6))return _0x206dd6;}return undefined;}function parseApiFileTree(_0x4a58eb,_0x161260,_0x13c491,_0x4d1d90){const _0x1bc1ea=a270_0x5ea829,_0x413836=resolveExistingFile(_0x4a58eb);if(!_0x413836)return[];const _0x84e7c6=_0x13c491['get'](_0x413836);if(_0x84e7c6!==undefined&&_0x84e7c6<=_0x4d1d90)return[];_0x13c491[_0x1bc1ea(0x15f)](_0x413836,_0x4d1d90);const _0x114415=readFileSync(_0x413836,_0x1bc1ea(0x163)),_0x4b18cc=parseApiFile(_0x114415);if(_0x4d1d90>=MAX_LOCAL_REEXPORT_DEPTH)return _0x4b18cc;const _0x524247=new RegExp(LOCAL_REEXPORT_RE[_0x1bc1ea(0x17f)],LOCAL_REEXPORT_RE[_0x1bc1ea(0x161)]);let _0x1b7948;while((_0x1b7948=_0x524247['exec'](_0x114415))!==null){const _0x5530b9=resolveLocalReexport(_0x413836,_0x1b7948[0x1],_0x161260);_0x5530b9&&_0x4b18cc[_0x1bc1ea(0x185)](...parseApiFileTree(_0x5530b9,_0x161260,_0x13c491,_0x4d1d90+0x1));}return _0x4b18cc;}function aliasProjectRoot(_0x59dfcb){const _0x278763=findProjectRootDirectory(dirname(_0x59dfcb));try{return realpathSync(_0x278763);}catch{return _0x278763;}}function uniqueAliasEntries(_0x412527){const _0x29284c=a270_0x5ea829,_0x5a73e8=new Set();return _0x412527[_0x29284c(0x180)](_0x4f78d6=>{const _0x414598=_0x29284c,_0xdcd16a=JSON[_0x414598(0x162)](_0x4f78d6);if(_0x5a73e8['has'](_0xdcd16a))return![];return _0x5a73e8['add'](_0xdcd16a),!![];});}export function loadAliasMap(_0x350bf5,_0x2f99dd,_0x391489,_0xe0fe64){const _0x1aa00d=a270_0x5ea829,_0x6a97=resolve(_0x391489??resolve(process['cwd'](),_0x350bf5,_0x1aa00d(0x17a))),_0x5721c6=_0xe0fe64?_0x6a97+'#'+_0xe0fe64:_0x6a97;if(cache[_0x1aa00d(0x164)](_0x5721c6))return cache[_0x1aa00d(0x17c)](_0x5721c6);if(!existsSync(_0x6a97))return cache['set'](_0x5721c6,[]),[];try{if(_0x6a97[_0x1aa00d(0x17e)](MODEL_REGISTRY_FILE_NAME)){const _0x26a1b0=readModelRegistry(_0x6a97),_0x2238bb=_0xe0fe64??_0x26a1b0?.[_0x1aa00d(0x177)],_0x59a7e2=_0x2238bb&&_0x26a1b0?getProfileModels(_0x26a1b0,_0x2238bb):[],_0x12c13d=uniqueAliasEntries(_0x59a7e2['flatMap'](_0x2ca602=>_0x2ca602[_0x1aa00d(0x178)]?[{'alias':_0x2ca602[_0x1aa00d(0x178)],'datasetCode':_0x2ca602['datasetCode'],'tableName':_0x2ca602['tableName'],'name':_0x2ca602['name']}]:[]));return cache[_0x1aa00d(0x15f)](_0x5721c6,_0x12c13d),_0x12c13d;}const _0x8b2a34=uniqueAliasEntries(parseApiFileTree(_0x6a97,aliasProjectRoot(_0x6a97),new Map(),0x0));return cache[_0x1aa00d(0x15f)](_0x5721c6,_0x8b2a34),_0x8b2a34;}catch{return cache[_0x1aa00d(0x15f)](_0x5721c6,[]),[];}}export function resolveAlias(_0x57b7a2,_0x342936,_0x1a1504,_0x45321b,_0x37aab8){const _0x4a4cd4=a270_0x5ea829;if(!_0x342936)return undefined;const _0x1a4dff=loadAliasMap(_0x57b7a2,_0x1a1504,_0x45321b,_0x37aab8),_0x1c7d13=new Set(_0x1a4dff[_0x4a4cd4(0x180)](_0x1f47f0=>_0x1f47f0['alias']===_0x342936)[_0x4a4cd4(0x16d)](_0x4a959f=>_0x4a959f[_0x4a4cd4(0x16b)]));return _0x1c7d13[_0x4a4cd4(0x15e)]===0x1?[..._0x1c7d13][0x0]:undefined;}export function listAliases(_0x5dc12e,_0x132138,_0x2cec09,_0x370c75){return loadAliasMap(_0x5dc12e,_0x132138,_0x2cec09,_0x370c75);}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* 统一认证、超时、错误处理;命令层通过导出函数调用。
|
|
6
6
|
*/
|
|
7
7
|
import type { Paging } from "../framework/response.js";
|
|
8
|
+
import { type CrossDbRelationDetail, type CrossDbRelationMutation, type CrossDbRelationQuery, type CrossDbRelationSource } from "../core/cross-db-relation.js";
|
|
8
9
|
import type { FetchDocOptions, FetchModelListResult } from "../types/index.js";
|
|
9
10
|
export declare function setActiveCookie(cookie: string): void;
|
|
10
11
|
export declare function clearActiveCookie(): void;
|
|
@@ -294,6 +295,14 @@ export interface BffScriptStatistics {
|
|
|
294
295
|
beforeScriptId: number | null;
|
|
295
296
|
afterScriptId: number | null;
|
|
296
297
|
}
|
|
298
|
+
export interface BffScriptLogQuery {
|
|
299
|
+
appCode: string;
|
|
300
|
+
startTime: number;
|
|
301
|
+
endTime: number;
|
|
302
|
+
level?: string;
|
|
303
|
+
keyword?: string;
|
|
304
|
+
limit?: number;
|
|
305
|
+
}
|
|
297
306
|
export declare const BFF_LIST_PAGE_SIZE = 100;
|
|
298
307
|
export declare function listBffScripts(appCode: string, type?: string, options?: {
|
|
299
308
|
scriptName?: string;
|
|
@@ -314,6 +323,14 @@ export declare function saveBffScript(params: {
|
|
|
314
323
|
export declare function deleteBffScript(id: number): Promise<void>;
|
|
315
324
|
export declare function getBffScriptStatistics(appCode: string): Promise<BffScriptStatistics[]>;
|
|
316
325
|
export declare function clearBffScriptCache(): Promise<string>;
|
|
326
|
+
/**
|
|
327
|
+
* Query runtime Backend Function logs for development diagnostics.
|
|
328
|
+
*
|
|
329
|
+
* The runtime endpoint returns already-formatted log lines. Keep the raw
|
|
330
|
+
* lines intact so callers can search, display, or pipe them without losing
|
|
331
|
+
* trace and script metadata embedded by the server.
|
|
332
|
+
*/
|
|
333
|
+
export declare function searchBffScriptLogs(query: BffScriptLogQuery): Promise<string[]>;
|
|
317
334
|
export declare function listBffDatasetOperations(appCode: string, datasetId: number): Promise<Record<string, unknown> | null>;
|
|
318
335
|
export interface SqlQuery {
|
|
319
336
|
id: number;
|
|
@@ -504,12 +521,36 @@ export declare function listRecycleBinResources(appCode: string, resourceType: R
|
|
|
504
521
|
paging?: Paging;
|
|
505
522
|
}>;
|
|
506
523
|
export declare function restoreRecycleBinResource(deleteLogId: number): Promise<void>;
|
|
507
|
-
export
|
|
524
|
+
export type TextGeneratedDatasetPreviewInput = {
|
|
508
525
|
datasetName: string;
|
|
509
526
|
requirementDescription: string;
|
|
527
|
+
mode?: "single";
|
|
528
|
+
} | {
|
|
529
|
+
mode: "batch";
|
|
530
|
+
requirementDescription: string;
|
|
531
|
+
};
|
|
532
|
+
/** Server measurements for a single generation attempt; absent values are unknown. */
|
|
533
|
+
export interface DatasetGenerationMetrics {
|
|
534
|
+
schemaVersion?: number;
|
|
535
|
+
attemptId?: string;
|
|
536
|
+
attempt?: number;
|
|
537
|
+
datasetCount?: number;
|
|
538
|
+
fieldCount?: number;
|
|
539
|
+
previewDurationMs?: number;
|
|
540
|
+
queueWaitMs?: number;
|
|
541
|
+
executionDurationMs?: number;
|
|
542
|
+
resultReadDurationMs?: number;
|
|
543
|
+
stageDurationsMs?: Record<string, number>;
|
|
544
|
+
modelCallCount?: number;
|
|
545
|
+
retryCount?: number;
|
|
546
|
+
failedStage?: string;
|
|
547
|
+
previousAttempts?: DatasetGenerationMetrics[];
|
|
510
548
|
}
|
|
511
549
|
export declare function previewTextGeneratedDataset(appCode: string, input: TextGeneratedDatasetPreviewInput): Promise<any>;
|
|
512
550
|
export interface TextGeneratedDatasetJobStartResult {
|
|
551
|
+
mode?: "single" | "batch";
|
|
552
|
+
metrics?: DatasetGenerationMetrics | null;
|
|
553
|
+
failedStage?: string | null;
|
|
513
554
|
taskId?: string;
|
|
514
555
|
operationId?: string;
|
|
515
556
|
clientOperationId?: string;
|
|
@@ -522,6 +563,9 @@ export interface TextGeneratedDatasetJobStartResult {
|
|
|
522
563
|
[key: string]: any;
|
|
523
564
|
}
|
|
524
565
|
export interface TextGeneratedDatasetJobStatus {
|
|
566
|
+
mode?: "single" | "batch";
|
|
567
|
+
metrics?: DatasetGenerationMetrics | null;
|
|
568
|
+
failedStage?: string | null;
|
|
525
569
|
taskId?: string;
|
|
526
570
|
operationId?: string;
|
|
527
571
|
clientOperationId?: string;
|
|
@@ -535,6 +579,7 @@ export interface TextGeneratedDatasetJobStatus {
|
|
|
535
579
|
}
|
|
536
580
|
export declare function startTextGeneratedDataset(appCode: string, design: Record<string, any>, options?: {
|
|
537
581
|
clientOperationId?: string;
|
|
582
|
+
mode?: "batch";
|
|
538
583
|
}): Promise<TextGeneratedDatasetJobStartResult>;
|
|
539
584
|
export declare function getTextGeneratedDatasetStatus(appCode: string, options: {
|
|
540
585
|
taskId?: string;
|
|
@@ -922,6 +967,11 @@ export interface ErBusinessGroupSummary {
|
|
|
922
967
|
}
|
|
923
968
|
export declare function getErRelationDetail(appCode: string, relationId: number): Promise<ErRelationDetail | null>;
|
|
924
969
|
export declare function createErRelation(payload: ErRelationMutationPayload): Promise<boolean>;
|
|
970
|
+
/** Cookie-authenticated POST query. Reject incomplete facts rather than treating them as absence. */
|
|
971
|
+
export declare function queryCrossDbRelations(payload: CrossDbRelationQuery): Promise<CrossDbRelationDetail[]>;
|
|
972
|
+
export declare function createCrossDbRelation(payload: Omit<CrossDbRelationMutation, "fromDblinkId">): Promise<true>;
|
|
973
|
+
export declare function updateCrossDbRelation(payload: CrossDbRelationMutation): Promise<true>;
|
|
974
|
+
export declare function deleteCrossDbRelation(payload: CrossDbRelationSource): Promise<true>;
|
|
925
975
|
export declare function updateErRelation(payload: ErRelationMutationPayload): Promise<boolean>;
|
|
926
976
|
export declare function deleteErRelation(payload: ErRelationDeletePayload): Promise<boolean>;
|
|
927
977
|
export declare function updateErBusinessGroup(payload: ErBusinessGroupUpdatePayload): Promise<boolean>;
|
|
@@ -977,16 +1027,141 @@ export interface DbAnalysisStatus {
|
|
|
977
1027
|
endTime?: number | string | null;
|
|
978
1028
|
[key: string]: unknown;
|
|
979
1029
|
}
|
|
1030
|
+
/** Runtime role exposed by lovrabet-runtime for approval assignee selection. */
|
|
1031
|
+
export interface ApprovalRuntimeRole {
|
|
1032
|
+
id: number;
|
|
1033
|
+
appCode?: string | null;
|
|
1034
|
+
roleName?: string | null;
|
|
1035
|
+
roleType?: string | null;
|
|
1036
|
+
remark?: string | null;
|
|
1037
|
+
userCount?: number | null;
|
|
1038
|
+
permitCount?: number | null;
|
|
1039
|
+
[key: string]: unknown;
|
|
1040
|
+
}
|
|
1041
|
+
/** Runtime app user exposed by /api/dept/queryAppUser. */
|
|
1042
|
+
export interface ApprovalRuntimeUser {
|
|
1043
|
+
code?: string | number | null;
|
|
1044
|
+
userName?: string | null;
|
|
1045
|
+
nickName?: string | null;
|
|
1046
|
+
displayName?: string | null;
|
|
1047
|
+
email?: string | null;
|
|
1048
|
+
status?: string | null;
|
|
1049
|
+
[key: string]: unknown;
|
|
1050
|
+
}
|
|
1051
|
+
/** Safe runtime role member fields used to inspect approval role membership. */
|
|
1052
|
+
export interface ApprovalRuntimeRoleMember {
|
|
1053
|
+
userId: string | number;
|
|
1054
|
+
username?: string | null;
|
|
1055
|
+
nickname?: string | null;
|
|
1056
|
+
[key: string]: unknown;
|
|
1057
|
+
}
|
|
1058
|
+
/** Runtime role and its current members. */
|
|
1059
|
+
export interface ApprovalRuntimeRoleUsers {
|
|
1060
|
+
id: number;
|
|
1061
|
+
roleName?: string | null;
|
|
1062
|
+
roleType?: string | null;
|
|
1063
|
+
userList?: ApprovalRuntimeRoleMember[] | null;
|
|
1064
|
+
[key: string]: unknown;
|
|
1065
|
+
}
|
|
1066
|
+
export interface ApprovalRuntimeRoleListOptions {
|
|
1067
|
+
roleId?: number;
|
|
1068
|
+
roleName?: string;
|
|
1069
|
+
currentPage?: number;
|
|
1070
|
+
pageSize?: number;
|
|
1071
|
+
}
|
|
1072
|
+
/** POST Runtime /api/permit/role/get-list: list roles from the runtime environment. */
|
|
1073
|
+
export declare function listApprovalRuntimeRoles(appCode: string, options?: ApprovalRuntimeRoleListOptions): Promise<{
|
|
1074
|
+
items: ApprovalRuntimeRole[];
|
|
1075
|
+
paging?: Paging;
|
|
1076
|
+
}>;
|
|
1077
|
+
/** GET Runtime /api/dept/queryAppUser: list users attached to the runtime app. */
|
|
1078
|
+
export declare function listApprovalRuntimeUsers(appCode: string): Promise<ApprovalRuntimeUser[]>;
|
|
1079
|
+
/** POST Runtime /api/permit/user-role/get-user-list: inspect runtime role members. */
|
|
1080
|
+
export declare function listApprovalRuntimeRoleUsers(appCode: string): Promise<ApprovalRuntimeRoleUsers[]>;
|
|
1081
|
+
/** Flow definition returned by SmartFlowController. */
|
|
1082
|
+
export interface FlowDefinition {
|
|
1083
|
+
id: number;
|
|
1084
|
+
flowCode?: string | null;
|
|
1085
|
+
appCode?: string | null;
|
|
1086
|
+
datasetCode?: string | null;
|
|
1087
|
+
pageId?: number | null;
|
|
1088
|
+
flowName?: string | null;
|
|
1089
|
+
flowDesc?: string | null;
|
|
1090
|
+
flowType?: string | null;
|
|
1091
|
+
sourceType?: string | null;
|
|
1092
|
+
version?: number | null;
|
|
1093
|
+
flowSchema?: string | null;
|
|
1094
|
+
draftSchema?: string | null;
|
|
1095
|
+
flowStatus?: string | null;
|
|
1096
|
+
templateName?: string | null;
|
|
1097
|
+
deployId?: string | null;
|
|
1098
|
+
procDefId?: string | null;
|
|
1099
|
+
procDefVersion?: number | null;
|
|
1100
|
+
flowConfig?: string | null;
|
|
1101
|
+
flowJson?: Record<string, unknown> | null;
|
|
1102
|
+
enabled?: boolean | null;
|
|
1103
|
+
createUserId?: string | null;
|
|
1104
|
+
updateUserId?: string | null;
|
|
1105
|
+
gmtCreate?: string | null;
|
|
1106
|
+
gmtModified?: string | null;
|
|
1107
|
+
[key: string]: unknown;
|
|
1108
|
+
}
|
|
1109
|
+
/** Exact writable fields exposed by FlowDefRequest. */
|
|
1110
|
+
export interface FlowDefinitionWriteRequest {
|
|
1111
|
+
id?: number;
|
|
1112
|
+
flowName: string;
|
|
1113
|
+
flowDesc?: string;
|
|
1114
|
+
flowType: "FORM_FLOW" | "INDEPENDENT_FLOW";
|
|
1115
|
+
appCode: string;
|
|
1116
|
+
datasetCode?: string;
|
|
1117
|
+
pageId?: number;
|
|
1118
|
+
flowJson: Record<string, unknown>;
|
|
1119
|
+
}
|
|
1120
|
+
/** Supported filters exposed by FlowDefQueryRequest. */
|
|
1121
|
+
export interface FlowDefinitionListOptions {
|
|
1122
|
+
flowCode?: string;
|
|
1123
|
+
flowName?: string;
|
|
1124
|
+
flowStatus?: string;
|
|
1125
|
+
datasetCode?: string;
|
|
1126
|
+
flowType?: string;
|
|
1127
|
+
pageNum?: number;
|
|
1128
|
+
pageSize?: number;
|
|
1129
|
+
}
|
|
1130
|
+
/** POST /smartapi/flow/page: list flow definitions for one app. */
|
|
1131
|
+
export declare function listFlowDefinitions(appCode: string, options?: FlowDefinitionListOptions): Promise<{
|
|
1132
|
+
items: FlowDefinition[];
|
|
1133
|
+
paging?: Paging;
|
|
1134
|
+
}>;
|
|
1135
|
+
/** POST /smartapi/flow/detail: read one flow definition by id and app. */
|
|
1136
|
+
export declare function getFlowDefinition(appCode: string, id: number): Promise<FlowDefinition>;
|
|
1137
|
+
/** POST /smartapi/flow/create: create a draft flow definition. */
|
|
1138
|
+
export declare function createFlowDefinition(input: FlowDefinitionWriteRequest): Promise<FlowDefinition>;
|
|
1139
|
+
/** POST /smartapi/flow/update: replace a flow definition draft. */
|
|
1140
|
+
export declare function updateFlowDefinition(input: FlowDefinitionWriteRequest & {
|
|
1141
|
+
id: number;
|
|
1142
|
+
}): Promise<FlowDefinition>;
|
|
1143
|
+
/** POST /smartapi/flow/publish: publish the current draft. */
|
|
1144
|
+
export declare function publishFlowDefinition(appCode: string, id: number): Promise<FlowDefinition>;
|
|
980
1145
|
export type InstantApiPolicyAction = "allow" | "deny" | "route";
|
|
981
1146
|
export interface InstantApiPolicyDatasetTarget {
|
|
982
1147
|
datasetCode?: string | null;
|
|
983
1148
|
tableName?: string | null;
|
|
984
1149
|
}
|
|
1150
|
+
/**
|
|
1151
|
+
* 版本 2 规则中需要从匹配范围扣除的数据集与 API 组合。
|
|
1152
|
+
*
|
|
1153
|
+
* @author binggan
|
|
1154
|
+
*/
|
|
1155
|
+
export interface InstantApiPolicyExclusion {
|
|
1156
|
+
datasets: InstantApiPolicyDatasetTarget[];
|
|
1157
|
+
apis: string[];
|
|
1158
|
+
}
|
|
985
1159
|
export interface InstantApiPolicyRule {
|
|
986
1160
|
name: string;
|
|
987
1161
|
description?: string | null;
|
|
988
1162
|
datasets: InstantApiPolicyDatasetTarget[];
|
|
989
1163
|
apis: string[];
|
|
1164
|
+
excludes?: InstantApiPolicyExclusion[] | null;
|
|
990
1165
|
action: InstantApiPolicyAction | string;
|
|
991
1166
|
backendFunction?: string | null;
|
|
992
1167
|
}
|