@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
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { type OutputFormat, type Risk } from "../framework/types.js";
|
|
2
2
|
import type { RawConfigLayers } from "../context/config-loader.js";
|
|
3
|
+
import { type LovrabetRegion } from "../constant/region.js";
|
|
4
|
+
import { type RegionConfigSource } from "../config/region-config.js";
|
|
3
5
|
export interface AppProfile {
|
|
4
6
|
appcode: string;
|
|
7
|
+
region?: LovrabetRegion;
|
|
5
8
|
env?: "production" | "daily";
|
|
6
9
|
apiDir?: string;
|
|
7
10
|
cookie?: string;
|
|
@@ -13,6 +16,9 @@ export interface AppProfile {
|
|
|
13
16
|
}
|
|
14
17
|
export interface ResolvedAppConfig {
|
|
15
18
|
appCode: string | undefined;
|
|
19
|
+
region: LovrabetRegion;
|
|
20
|
+
regionConfiguredValue: unknown;
|
|
21
|
+
regionSource: RegionConfigSource;
|
|
16
22
|
env: "production" | "daily";
|
|
17
23
|
locale: string;
|
|
18
24
|
cookie: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c023f,_0x1bf5df){const _0x2f076b=a255_0x4248,_0x3f2a7b=_0x5c023f();while(!![]){try{const _0x513eed=parseInt(_0x2f076b(0x132))/0x1+parseInt(_0x2f076b(0x122))/0x2*(-parseInt(_0x2f076b(0x135))/0x3)+-parseInt(_0x2f076b(0x121))/0x4*(parseInt(_0x2f076b(0x120))/0x5)+-parseInt(_0x2f076b(0x126))/0x6+-parseInt(_0x2f076b(0x13e))/0x7*(parseInt(_0x2f076b(0x147))/0x8)+-parseInt(_0x2f076b(0x140))/0x9*(-parseInt(_0x2f076b(0x12a))/0xa)+parseInt(_0x2f076b(0x142))/0xb*(parseInt(_0x2f076b(0x14a))/0xc);if(_0x513eed===_0x1bf5df)break;else _0x3f2a7b['push'](_0x3f2a7b['shift']());}catch(_0x1ab888){_0x3f2a7b['push'](_0x3f2a7b['shift']());}}}(a255_0x2b3b,0xd0173));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 a255_0x4248(_0x5f0543,_0x2a7149){_0x5f0543=_0x5f0543-0x11d;const _0x2b3b0d=a255_0x2b3b();let _0x4248e7=_0x2b3b0d[_0x5f0543];return _0x4248e7;}function stringConfigValue(_0x193d93){const _0x580a7d=a255_0x4248;return typeof _0x193d93===_0x580a7d(0x12c)&&_0x193d93[_0x580a7d(0x12f)]()?_0x193d93[_0x580a7d(0x12f)]():undefined;}function appProfiles(_0x31f30e){const _0x224754=a255_0x4248;return _0x31f30e[_0x224754(0x139)]&&typeof _0x31f30e['apps']===_0x224754(0x131)?_0x31f30e['apps']:{};}function resolveDefaultAppName(_0x354ba9){const _0x486e82=a255_0x4248,_0x7c9dfa=stringConfigValue(_0x354ba9[_0x486e82(0x128)]);if(_0x7c9dfa)return _0x7c9dfa;const _0x51ad8f=Object['keys'](appProfiles(_0x354ba9));return _0x51ad8f[_0x486e82(0x130)]===0x1?_0x51ad8f[0x0]:undefined;}function a255_0x2b3b(){const _0x499ba0=['444pQOBxM','production','cookie','PAGE_SIZE','24375iKNARf','948WSxeZT','254AFLWaL','env','source','projectConfig','3213978RaCqJP','accessKey','defaultApp','ENV','250dWBOYk','region','string','entries','APP','trim','length','object','370923CYeItL','locale','appcode','23181XjmsqZ','COOKIE','riskLevel','globalConfig','apps','find','value','ACCESS_KEY','FORMAT','216391AmfhEW','high-risk-write','380970kkfjpa','keys','641377QFWaPT','read','pageSize','projectPath','format','16lHHBza','apiDir','app'];a255_0x2b3b=function(){return _0x499ba0;};return a255_0x2b3b();}function resolveTopLevelAppCode(_0x561aba){const _0x4e30d3=a255_0x4248;return stringConfigValue(_0x561aba[_0x4e30d3(0x134)])||stringConfigValue(_0x561aba[_0x4e30d3(0x149)]);}function normalizeRiskCeiling(_0x4d5116){const _0x340773=a255_0x4248;if(_0x4d5116===undefined||_0x4d5116===null)return undefined;if(_0x4d5116===_0x340773(0x143)||_0x4d5116==='write'||_0x4d5116===_0x340773(0x13f))return _0x4d5116;return'read';}function resolveRiskCeiling(..._0x2ca4d1){const _0x48a0d9=a255_0x4248;let _0x112546;for(const _0x135d3b of _0x2ca4d1){const _0x5b7c7e=normalizeRiskCeiling(_0x135d3b);_0x5b7c7e&&(!_0x112546||riskLevelOrder(_0x5b7c7e)<riskLevelOrder(_0x112546))&&(_0x112546=_0x5b7c7e);}return _0x112546??DEFAULT_CONFIG_VALUES[_0x48a0d9(0x137)];}export function resolveAppConfig({raw:_0x46a8be,flags:_0x49bf70,layers:_0x31a6a8,readEnv:_0x3020ad}){const _0x32b0b6=a255_0x4248,_0x57cefd=_0x31a6a8?.[_0x32b0b6(0x125)]??{},_0x56094b=_0x31a6a8?.[_0x32b0b6(0x138)]??{},_0x2de0c4=!!_0x31a6a8?.[_0x32b0b6(0x145)]||Object[_0x32b0b6(0x141)](_0x57cefd)[_0x32b0b6(0x130)]>0x0,_0x5d48b5=!_0x2de0c4,_0x754448=_0x2de0c4?resolveDefaultAppName(_0x57cefd):undefined,_0x4680b4=_0x5d48b5?resolveDefaultAppName(_0x56094b):undefined,_0x10c78a=stringConfigValue(_0x49bf70[_0x32b0b6(0x149)]),_0xef135c=_0x3020ad(_0x32b0b6(0x12e)),_0x12daf7={};if(_0x46a8be[_0x32b0b6(0x139)]&&typeof _0x46a8be[_0x32b0b6(0x139)]==='object')for(const [_0x113b87,_0x233564]of Object[_0x32b0b6(0x12d)](_0x46a8be['apps'])){_0x233564&&typeof _0x233564===_0x32b0b6(0x131)&&_0x233564['appcode']&&(_0x12daf7[_0x113b87]=_0x233564);}const _0x2b13a3=_0x754448||_0x4680b4||resolveDefaultAppName(_0x46a8be),_0x1cdf11=Object['keys'](_0x12daf7)[_0x32b0b6(0x130)]>0x0,_0x115ad6=_0x10c78a||_0x754448||_0xef135c||_0x4680b4||_0x2b13a3||undefined,_0x20beee=stringConfigValue(_0x49bf70[_0x32b0b6(0x134)]),_0x4b2d2f=_0x20beee?Object['entries'](_0x12daf7)[_0x32b0b6(0x13a)](([,_0x53db3d])=>_0x53db3d?.[_0x32b0b6(0x134)]===_0x20beee):undefined,_0x5f67d1=_0x4b2d2f?.[0x0],_0x932226=_0x4b2d2f?.[0x1],_0x526cd0=_0x20beee?_0x5f67d1:_0x115ad6;let _0x4d1050=_0x526cd0&&_0x12daf7[_0x526cd0]?_0x12daf7[_0x526cd0]:undefined;_0x20beee&&_0x932226&&(_0x4d1050=_0x932226);const _0x12cbd4=_0x20beee?_0x932226??_0x4d1050:_0x4d1050,_0x5564f7=!_0x10c78a&&!_0x754448&&_0xef135c&&_0x526cd0===_0xef135c,_0x1b262e=_0x10c78a||(_0x5564f7?_0xef135c:undefined)||(_0x20beee?_0x5f67d1:undefined),_0x5971a0=_0x12cbd4?.['appcode'],_0x1f2c43=_0x2de0c4?resolveTopLevelAppCode(_0x57cefd):undefined,_0x2f9245=_0x5d48b5?resolveTopLevelAppCode(_0x56094b):undefined,_0x3fa170=_0x10c78a||_0x754448?_0x5971a0:undefined,_0xdf937b=!_0x10c78a&&!_0x754448?_0x5971a0:undefined,_0x125360=_0x20beee||_0x3fa170||_0x1f2c43||_0xdf937b||_0x2f9245||undefined,_0xd3c68c=_0x2de0c4?stringConfigValue(_0x57cefd['env']):undefined,_0xc1d6ab=_0x5d48b5?stringConfigValue(_0x56094b[_0x32b0b6(0x123)]):undefined,_0x24751c=_0x49bf70[_0x32b0b6(0x123)]||_0x12cbd4?.['env']||_0xd3c68c||_0x3020ad(_0x32b0b6(0x129))||_0xc1d6ab||_0x46a8be['env']||DEFAULT_CONFIG_VALUES[_0x32b0b6(0x123)],_0x35e00c=_0x12cbd4?.['locale']||_0x46a8be['locale']||DEFAULT_CONFIG_VALUES[_0x32b0b6(0x133)],_0x5c0e52=_0x3020ad(_0x32b0b6(0x136))||_0x12cbd4?.[_0x32b0b6(0x11e)]||_0x46a8be[_0x32b0b6(0x11e)]||undefined,_0xe5e851=_0x3020ad(_0x32b0b6(0x13c))||_0x12cbd4?.[_0x32b0b6(0x127)]||_0x46a8be[_0x32b0b6(0x127)]||undefined,_0x51f3cb=_0x49bf70['format']||_0x3020ad(_0x32b0b6(0x13d))||_0x12cbd4?.['format']||_0x46a8be[_0x32b0b6(0x146)],_0x63b411=normalizeLegacyOutputFormat(_0x51f3cb),_0x9e493e=_0x3020ad(_0x32b0b6(0x11f))||_0x12cbd4?.[_0x32b0b6(0x144)]||_0x46a8be['pageSize'],_0x1eccd7=_0x9e493e?Number(_0x9e493e)||undefined:undefined,_0x3f3c29=_0x31a6a8?[_0x31a6a8[_0x32b0b6(0x138)][_0x32b0b6(0x137)],_0x31a6a8['projectConfig']['riskLevel']]:[_0x46a8be[_0x32b0b6(0x137)]],_0x538d28=resolveRiskCeiling(..._0x3f3c29,_0x12cbd4?.[_0x32b0b6(0x137)]),_0x9b2475=resolveRiskCeiling(_0x538d28,_0x3020ad('RISK_LEVEL')),_0x90dad6=_0x3020ad('VERBOSE'),_0x5e6fdb=_0x90dad6==='1'||_0x90dad6==='true',_0x34e2f2=_0x12cbd4?.['apiDir']||_0x46a8be[_0x32b0b6(0x148)]||DEFAULT_CONFIG_VALUES[_0x32b0b6(0x148)],_0x1848cb=selectConfiguredRegion({'appRegion':_0x12cbd4?.[_0x32b0b6(0x12b)],'projectRegion':_0x2de0c4?_0x57cefd[_0x32b0b6(0x12b)]:undefined,'globalRegion':_0x2de0c4||_0x5d48b5?_0x56094b[_0x32b0b6(0x12b)]:undefined,'mergedRegion':_0x46a8be[_0x32b0b6(0x12b)]}),_0x1f1f27=normalizeLovrabetRegion(_0x1848cb[_0x32b0b6(0x13b)])??DEFAULT_LOVRABET_REGION,_0x37746e=isDaily(normalizeEnv(String(_0x24751c)))?'daily':_0x32b0b6(0x11d);return{'appCode':typeof _0x125360===_0x32b0b6(0x12c)&&_0x125360[_0x32b0b6(0x12f)]()?_0x125360[_0x32b0b6(0x12f)]():undefined,'region':_0x1f1f27,'regionConfiguredValue':_0x1848cb[_0x32b0b6(0x13b)],'regionSource':_0x1848cb[_0x32b0b6(0x124)],'env':_0x37746e,'locale':_0x35e00c,'cookie':_0x5c0e52,'accessKey':_0xe5e851,'format':_0x63b411,'pageSize':_0x1eccd7,'riskLevel':_0x9b2475,'verbose':_0x5e6fdb,'apiDir':_0x34e2f2,'apps':_0x12daf7,'defaultApp':_0x2b13a3,'currentApp':_0x1cdf11?_0x526cd0:undefined,'explicitAppName':_0x1b262e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a256_0x2232(){const _0x198a6e=['12231zXhlDO','21990asfXSy','467690NNwCXb','101199iYCggB','1358tAgaLl','9432610XXZSyt','256648JFqjnO','45xWSAoe','authRequired','2NxEVGj','1797072mLwDdt','4590OSpaVT','../auth/get-cookie.js'];a256_0x2232=function(){return _0x198a6e;};return a256_0x2232();}(function(_0x5b5fb1,_0x519909){const _0x4b056d=a256_0x9d36,_0x37374e=_0x5b5fb1();while(!![]){try{const _0x430d2e=parseInt(_0x4b056d(0x12a))/0x1+-parseInt(_0x4b056d(0x124))/0x2*(-parseInt(_0x4b056d(0x11e))/0x3)+-parseInt(_0x4b056d(0x121))/0x4*(-parseInt(_0x4b056d(0x122))/0x5)+parseInt(_0x4b056d(0x129))/0x6*(-parseInt(_0x4b056d(0x11f))/0x7)+-parseInt(_0x4b056d(0x125))/0x8+-parseInt(_0x4b056d(0x128))/0x9*(parseInt(_0x4b056d(0x126))/0xa)+parseInt(_0x4b056d(0x120))/0xb;if(_0x430d2e===_0x519909)break;else _0x37374e['push'](_0x37374e['shift']());}catch(_0xf9590e){_0x37374e['push'](_0x37374e['shift']());}}}(a256_0x2232,0x5c086));function a256_0x9d36(_0x5ecba0,_0x3f263c){_0x5ecba0=_0x5ecba0-0x11e;const _0x2232ad=a256_0x2232();let _0x9d3663=_0x2232ad[_0x5ecba0];return _0x9d3663;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x9461e3){const _0x101551=a256_0x9d36,{getCookie:_0x2fc927}=await import(_0x101551(0x127)),_0x58d38d=_0x9461e3['cookie']||_0x2fc927(),_0x5da4f3=_0x58d38d?await getIsSessionValid():![];return{'cookie':_0x58d38d,'isLoggedIn':_0x5da4f3,async 'getOrLogin'(){const _0x463d63=_0x101551;if(_0x58d38d&&_0x5da4f3)return _0x58d38d;throw CliErrors[_0x463d63(0x123)]();}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a257_0x210273=a257_0x4878;(function(_0x17719b,_0x295a12){const _0x43e02d=a257_0x4878,_0x5456d7=_0x17719b();while(!![]){try{const _0x4da11a=-parseInt(_0x43e02d(0x16d))/0x1+parseInt(_0x43e02d(0x153))/0x2+parseInt(_0x43e02d(0x180))/0x3*(parseInt(_0x43e02d(0x158))/0x4)+parseInt(_0x43e02d(0x169))/0x5*(parseInt(_0x43e02d(0x148))/0x6)+parseInt(_0x43e02d(0x17b))/0x7*(parseInt(_0x43e02d(0x165))/0x8)+parseInt(_0x43e02d(0x163))/0x9*(-parseInt(_0x43e02d(0x154))/0xa)+-parseInt(_0x43e02d(0x17d))/0xb*(parseInt(_0x43e02d(0x14d))/0xc);if(_0x4da11a===_0x295a12)break;else _0x5456d7['push'](_0x5456d7['shift']());}catch(_0x177aa9){_0x5456d7['push'](_0x5456d7['shift']());}}}(a257_0x428f,0x1c94e));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='.rabetbase.json';export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map();export function resolveConfigPath(_0xeb8536){for(const _0x5c1f9a of CONFIG_NAMES){const _0x789eab=resolve(_0xeb8536,_0x5c1f9a);if(existsSync(_0x789eab))return _0x789eab;}return undefined;}export function findProjectRootDirectory(_0x2c62cb=process['cwd']()){let _0x21d9c2=resolve(_0x2c62cb);const {root:_0x4e2c2f}=parse(_0x21d9c2),_0x243c42=homedir();while(!![]){if(resolveConfigPath(_0x21d9c2)){if(_0x21d9c2===_0x243c42)break;return _0x21d9c2;}if(_0x21d9c2===_0x4e2c2f||_0x21d9c2===_0x243c42)break;const _0x6a7ee1=dirname(_0x21d9c2);if(_0x6a7ee1===_0x21d9c2)break;_0x21d9c2=_0x6a7ee1;}return resolve(_0x2c62cb);}export function getProjectConfigPath(){const _0x188d1d=a257_0x4878;return resolveConfigPath(process[_0x188d1d(0x14f)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x58d46d){const _0x41a320=a257_0x4878;if(!existsSync(_0x58d46d))return{'status':_0x41a320(0x178)};try{const _0x4ff0c5=readFileSync(_0x58d46d,{'encoding':_0x41a320(0x15a)});if(!_0x4ff0c5?.[_0x41a320(0x162)]())return{'status':_0x41a320(0x167)};const _0x1cce29=JSON[_0x41a320(0x168)](_0x4ff0c5);return{'status':'ok','data':_0x1cce29};}catch(_0x389222){return{'status':_0x41a320(0x14c),'message':_0x389222 instanceof Error?_0x389222[_0x41a320(0x157)]:String(_0x389222)};}}function parseCliConfigJsonFile(_0x146e77,_0x3c04aa,_0x5ae3bf){const _0x5eb86d=a257_0x4878,_0x161bfb=inspectCliConfigJsonFile(_0x146e77);if(_0x161bfb[_0x5eb86d(0x16a)]===_0x5eb86d(0x178)||_0x161bfb[_0x5eb86d(0x16a)]==='empty')return{};if(_0x161bfb['status']==='ok')return _0x161bfb[_0x5eb86d(0x17e)];return _0x3c04aa===_0x5eb86d(0x176)&&_0x5ae3bf&&console['error'](CLI_BIN_NAME+':\x20'+_0x5ae3bf+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x146e77+_0x5eb86d(0x170)+_0x161bfb[_0x5eb86d(0x157)]),{};}function normalizeLegacyConfigShape(_0x4af9c2){const _0x213486=a257_0x4878;if(!_0x4af9c2||typeof _0x4af9c2!==_0x213486(0x152))return{'config':{},'migrated':![]};const _0x4f8ac4={..._0x4af9c2},_0x577c83=_0x4f8ac4[_0x213486(0x15e)]&&typeof _0x4f8ac4['apps']==='object'?{..._0x4f8ac4['apps']}:{},_0x411adb=Object[_0x213486(0x16e)](_0x577c83)['length'],_0x6be48=_0x4f8ac4[_0x213486(0x166)]||_0x4f8ac4[_0x213486(0x171)];let _0x29f9d1=![];if(_0x6be48&&_0x411adb===0x0){const _0x4a09d7=typeof _0x4f8ac4['defaultApp']==='string'&&_0x4f8ac4[_0x213486(0x155)][_0x213486(0x162)]()?_0x4f8ac4[_0x213486(0x155)]:String(_0x6be48)[_0x213486(0x162)]();_0x577c83[_0x4a09d7]={'appcode':String(_0x6be48)['trim'](),..._0x4f8ac4[_0x213486(0x149)]!=null?{'env':_0x4f8ac4['env']}:{},..._0x4f8ac4[_0x213486(0x160)]!=null?{'apiDir':_0x4f8ac4[_0x213486(0x160)]}:{},..._0x4f8ac4['cookie']!=null?{'cookie':_0x4f8ac4[_0x213486(0x16c)]}:{},..._0x4f8ac4[_0x213486(0x175)]!=null?{'accessKey':_0x4f8ac4[_0x213486(0x175)]}:{},..._0x4f8ac4['format']!=null?{'format':_0x4f8ac4[_0x213486(0x172)]}:{},..._0x4f8ac4['pageSize']!=null?{'pageSize':_0x4f8ac4[_0x213486(0x159)]}:{},..._0x4f8ac4['riskLevel']!=null?{'riskLevel':_0x4f8ac4[_0x213486(0x177)]}:{},..._0x4f8ac4['locale']!=null?{'locale':_0x4f8ac4[_0x213486(0x17c)]}:{}},_0x4f8ac4['apps']=_0x577c83,delete _0x4f8ac4['defaultApp'],_0x29f9d1=!![];}return(_0x213486(0x166)in _0x4f8ac4||'app'in _0x4f8ac4)&&(delete _0x4f8ac4[_0x213486(0x166)],delete _0x4f8ac4[_0x213486(0x171)],_0x29f9d1=!![]),{'config':_0x4f8ac4,'migrated':_0x29f9d1};}function writeNormalizedConfigIfNeeded(_0x3e4dbc,_0x131193){const _0x434ea9=a257_0x4878,_0x5b28e7=JSON[_0x434ea9(0x173)](normalizeConfigForWrite(_0x131193),null,0x2)+'\x0a';if(normalizedWriteCache[_0x434ea9(0x14a)](_0x3e4dbc)===_0x5b28e7)return;writeConfigFile(_0x3e4dbc,_0x131193),normalizedWriteCache[_0x434ea9(0x147)](_0x3e4dbc,_0x5b28e7);}function parseAndNormalizeConfig(_0xbaa9,_0x736b44,_0x28c89f){const _0x5fa55f=a257_0x4878,_0x8c26fe=parseCliConfigJsonFile(_0xbaa9,_0x736b44,_0x28c89f),_0x575ade=normalizeLegacyConfigShape(_0x8c26fe);if(_0x575ade[_0x5fa55f(0x15b)])try{writeNormalizedConfigIfNeeded(_0xbaa9,_0x575ade['config']);}catch{}return _0x575ade[_0x5fa55f(0x179)];}export function loadRawConfigLayers(_0x545196){const _0x4142dc=a257_0x4878;let _0x133a75={},_0x27131b={};const _0x430fc4=resolveConfigPath(homedir());_0x430fc4&&(_0x133a75=parseAndNormalizeConfig(_0x430fc4,_0x4142dc(0x176),_0x4142dc(0x16f)));const _0x4f7191=_0x545196??findProjectRootDirectory(),_0x1e237a=resolveConfigPath(_0x4f7191);return _0x1e237a&&(_0x27131b=parseAndNormalizeConfig(_0x1e237a,'warn',_0x4142dc(0x15f))),{'globalPath':_0x430fc4,'projectPath':_0x1e237a,'globalConfig':_0x133a75,'projectConfig':_0x27131b};}const INHERIT_WHITELIST=[a257_0x210273(0x16c),a257_0x210273(0x175),a257_0x210273(0x17c),a257_0x210273(0x172),a257_0x210273(0x177),a257_0x210273(0x159),a257_0x210273(0x15c),a257_0x210273(0x174),a257_0x210273(0x16b),'apiDomain',a257_0x210273(0x150),'skillDomain',a257_0x210273(0x17f),a257_0x210273(0x14b),a257_0x210273(0x14e),a257_0x210273(0x161)];export function mergeRawConfigLayers(_0x1aea1d){const _0x50aa21=a257_0x210273,{globalConfig:_0x47e07b,projectConfig:_0x10cc91}=_0x1aea1d,_0x2fdf68=!!_0x1aea1d[_0x50aa21(0x164)]||Object['keys'](_0x10cc91)[_0x50aa21(0x17a)]>0x0;if(!_0x2fdf68)return mergeGlobalOnly(_0x47e07b);return mergeProjectFirst(_0x47e07b,_0x10cc91);}function mergeGlobalOnly(_0x3f1ef9){const _0x3aeedc=a257_0x210273,_0xcd3aae={..._0x3f1ef9};delete _0xcd3aae[_0x3aeedc(0x156)];const _0x4673d1=_0x3f1ef9['apps']&&typeof _0x3f1ef9['apps']===_0x3aeedc(0x152)?_0x3f1ef9[_0x3aeedc(0x15e)]:{};if(Object[_0x3aeedc(0x16e)](_0x4673d1)[_0x3aeedc(0x17a)]>0x0)_0xcd3aae[_0x3aeedc(0x15e)]=_0x4673d1;if(_0x3f1ef9[_0x3aeedc(0x155)])_0xcd3aae['defaultApp']=_0x3f1ef9['defaultApp'];return _0xcd3aae;}function a257_0x4878(_0x1313b7,_0xea3048){_0x1313b7=_0x1313b7-0x147;const _0x428fbb=a257_0x428f();let _0x4878d0=_0x428fbb[_0x1313b7];return _0x4878d0;}function mergeProjectFirst(_0x5b4648,_0x49d67f){const _0x38dc01=a257_0x210273,_0xa689bb={..._0x49d67f};delete _0xa689bb[_0x38dc01(0x156)];for(const _0x5b0569 of INHERIT_WHITELIST){!(_0x5b0569 in _0xa689bb)&&_0x5b0569 in _0x5b4648&&(_0xa689bb[_0x5b0569]=_0x5b4648[_0x5b0569]);}const _0xfecfb3=_0x49d67f['apps']&&typeof _0x49d67f[_0x38dc01(0x15e)]===_0x38dc01(0x152)?_0x49d67f[_0x38dc01(0x15e)]:{};return Object[_0x38dc01(0x16e)](_0xfecfb3)[_0x38dc01(0x17a)]>0x0?_0xa689bb['apps']=_0xfecfb3:delete _0xa689bb[_0x38dc01(0x15e)],_0x38dc01(0x155)in _0x49d67f?_0xa689bb[_0x38dc01(0x155)]=_0x49d67f[_0x38dc01(0x155)]:delete _0xa689bb[_0x38dc01(0x155)],_0xa689bb;}export function readRawConfigWithLayers(_0x2341ed){const _0x207d35=loadRawConfigLayers(_0x2341ed);return{'config':mergeRawConfigLayers(_0x207d35),'layers':_0x207d35};}function a257_0x428f(){const _0x453c5e=['942486PXifZu','env','get','appDomain','error','3288WHaIJX','localDomain','cwd','runtimeDomain','silent','object','259464JinwLJ','1794830NqTmSj','defaultApp','inherit','message','232roaJuM','pageSize','utf8','migrated','region','.tmp','apps','Project','apiDir','certificateDomain','trim','9MsXaoM','projectPath','1102216ocFLLk','appcode','empty','parse','5phWYyH','status','userDomain','cookie','135557waymvh','keys','Global','\x0a\x20\x20','app','format','stringify','routing','accessKey','warn','riskLevel','missing','config','length','7cnyqmb','locale','6765ELvxKe','data','kbDomain','9105NDzSkv','set'];a257_0x428f=function(){return _0x453c5e;};return a257_0x428f();}export function readRawConfig(_0x4ae1e7){return mergeRawConfigLayers(loadRawConfigLayers(_0x4ae1e7));}export function readConfigFile(_0x2389c3){const _0xfbcf6a=a257_0x210273;return parseAndNormalizeConfig(_0x2389c3,_0xfbcf6a(0x151));}export function writeConfigFile(_0x2cd2fd,_0x39192c){const _0x104599=a257_0x210273,_0x1782b1=dirname(_0x2cd2fd);!existsSync(_0x1782b1)&&mkdirSync(_0x1782b1,{'recursive':!![]});const _0x1c00a8=_0x2cd2fd+_0x104599(0x15d);try{const _0x8c126=normalizeConfigForWrite(_0x39192c);writeFileSync(_0x1c00a8,JSON['stringify'](_0x8c126,null,0x2)+'\x0a',{'encoding':_0x104599(0x15a),'mode':0x180}),renameSync(_0x1c00a8,_0x2cd2fd);}catch(_0x211e12){try{unlinkSync(_0x1c00a8);}catch{}throw _0x211e12;}}export function resolveWriteConfigPath(_0x568db8){const _0x4fc240=a257_0x210273,_0x232138=_0x568db8==='project'?process[_0x4fc240(0x14f)]():homedir(),_0x52b7ec=resolveConfigPath(_0x232138);return _0x52b7ec??resolve(_0x232138,NEW_CONFIG_NAME);}
|
package/lib/context.d.ts
CHANGED
|
@@ -8,10 +8,17 @@
|
|
|
8
8
|
import { type AppProfile } from "./context/app-resolver.js";
|
|
9
9
|
import { CONFIG_NAMES, NEW_CONFIG_NAME, findProjectRootDirectory, getGlobalConfigPath, getProjectConfigPath, inspectCliConfigJsonFile, isInProject, loadRawConfigLayers, mergeRawConfigLayers, readConfigFile, readRawConfig, readRawConfigWithLayers, resolveConfigPath, resolveWriteConfigPath, writeConfigFile, type CliConfigJsonInspect, type RawConfigLayers } from "./context/config-loader.js";
|
|
10
10
|
import type { OutputFormat, Risk } from "./framework/types.js";
|
|
11
|
+
import { type LovrabetRegion } from "./constant/region.js";
|
|
12
|
+
import { type RegionConfigSource } from "./config/region-config.js";
|
|
11
13
|
import { logger } from "./utils/logger.js";
|
|
12
14
|
export { CONFIG_NAMES, NEW_CONFIG_NAME, findProjectRootDirectory, getGlobalConfigPath, getProjectConfigPath, inspectCliConfigJsonFile, isInProject, loadRawConfigLayers, mergeRawConfigLayers, readConfigFile, readRawConfig, readRawConfigWithLayers, resolveConfigPath, resolveWriteConfigPath, writeConfigFile, type AppProfile, type CliConfigJsonInspect, type RawConfigLayers, };
|
|
13
15
|
export interface CLIConfig {
|
|
14
16
|
appCode: string | undefined;
|
|
17
|
+
/** Effective country/region after the selected app profile override. */
|
|
18
|
+
region?: LovrabetRegion;
|
|
19
|
+
/** Raw selected value retained so doctor can report invalid manual edits. */
|
|
20
|
+
regionConfiguredValue?: unknown;
|
|
21
|
+
regionSource?: RegionConfigSource;
|
|
15
22
|
env: "production" | "daily";
|
|
16
23
|
locale: string;
|
|
17
24
|
/** 内联 cookie,优先于 ~/.lovrabet/cookie 文件 */
|
|
@@ -58,9 +65,13 @@ export interface MultiAppConfig {
|
|
|
58
65
|
name: string;
|
|
59
66
|
appcode: string;
|
|
60
67
|
isDefault: boolean;
|
|
68
|
+
region: LovrabetRegion;
|
|
69
|
+
regionSource: RegionConfigSource;
|
|
61
70
|
env?: string;
|
|
62
71
|
apiDir?: string;
|
|
63
72
|
cookie?: string;
|
|
73
|
+
/** Effective top-level connection settings for this app's defining layer. */
|
|
74
|
+
routingConfig: Record<string, any>;
|
|
64
75
|
}
|
|
65
76
|
export interface CLIContext {
|
|
66
77
|
config: CLIConfig;
|
|
@@ -87,6 +98,8 @@ export declare function buildConfigFromFlags(flags: Record<string, any>): CLICon
|
|
|
87
98
|
* 终端 CLI 与嵌入式 runtime 共用该入口,避免 env/domain 初始化语义漂移。
|
|
88
99
|
*/
|
|
89
100
|
export declare function initGlobalEnvironment(config: CLIConfig): Promise<void>;
|
|
101
|
+
/** Switch process-wide routing before a multi-app operation. Callers must run apps sequentially. */
|
|
102
|
+
export declare function initMultiAppEnvironment(app: MultiAppConfig): Promise<void>;
|
|
90
103
|
export declare function getConfigAppCode(projectRoot?: string): string | undefined;
|
|
91
104
|
export type MultiAppConfigScope = "project" | "merged";
|
|
92
105
|
export declare function getMultiAppConfigs(scope?: MultiAppConfigScope, projectRoot?: string): MultiAppConfig[] | null;
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a243_0x3770c8=a243_0x566a;(function(_0x180137,_0x4f5b1a){const _0x2d28d3=a243_0x566a,_0x3b7369=_0x180137();while(!![]){try{const _0xf8925=parseInt(_0x2d28d3(0x133))/0x1+-parseInt(_0x2d28d3(0x129))/0x2*(-parseInt(_0x2d28d3(0x13c))/0x3)+-parseInt(_0x2d28d3(0x147))/0x4*(parseInt(_0x2d28d3(0x143))/0x5)+parseInt(_0x2d28d3(0x146))/0x6*(-parseInt(_0x2d28d3(0x132))/0x7)+-parseInt(_0x2d28d3(0x12c))/0x8+-parseInt(_0x2d28d3(0x127))/0x9+parseInt(_0x2d28d3(0x126))/0xa;if(_0xf8925===_0x4f5b1a)break;else _0x3b7369['push'](_0x3b7369['shift']());}catch(_0x3ba190){_0x3b7369['push'](_0x3b7369['shift']());}}}(a243_0x2ceb,0x2d483));import{resolve}from'node:path';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';import{DEFAULT_LOVRABET_REGION,isInvalidLovrabetRegion,normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingManifest}from'./config/domain-config.js';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';function a243_0x2ceb(){const _0xa5c170=['10CRSyCX','setRawCommand','./constant/domain.js','11742ySFkEO','271384WLmsRT','routing','stringify','template_base_url','apiDir','a\x20value\x20of\x20type\x20','app','null','cookie','apps','runtimeDomain','projectConfig','kbDomain','merged','find','https://g.lovrabet.com/dist/lovrabet-skill','./constant/env.js','-api.ts','slice','skillDomain','values','cwd','trim','config','localDomain','5883110qKlTye','3126060wxrzck','certificateDomain','2VLLLTW','raw','agentDomain','2308184GdEMUT','globalConfig','join','domains','\x20doctor`\x20to\x20locate\x20and\x20repair\x20the\x20invalid\x20configuration\x20before\x20retrying.','length','91XhbOxm','129822oETycJ','Run\x20`','env','object','string','keys','project','setLogPath','api.ts','793014deyLVl','appDomain','userDomain','cdn','entries','appcode','defaultApp'];a243_0x2ceb=function(){return _0xa5c170;};return a243_0x2ceb();}export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x3d66f5){return process.env[`RABETBASE_${_0x3d66f5}`]||process.env[`LOVRABET_${_0x3d66f5}`]||undefined;}function optionalString(_0x533aad){const _0x1161b9=a243_0x566a;return typeof _0x533aad==='string'&&_0x533aad[_0x1161b9(0x123)]()?_0x533aad[_0x1161b9(0x123)]():undefined;}function a243_0x566a(_0xe7c251,_0x25ae58){_0xe7c251=_0xe7c251-0x117;const _0x2cebad=a243_0x2ceb();let _0x566a1a=_0x2cebad[_0xe7c251];return _0x566a1a;}function describeConfiguredRegion(_0x2e1a92){const _0x438e8e=a243_0x566a;return typeof _0x2e1a92==='string'?JSON[_0x438e8e(0x149)](_0x2e1a92):_0x438e8e(0x14c)+(_0x2e1a92===null?_0x438e8e(0x14e):typeof _0x2e1a92);}function resolveConfiguredRegion(_0x94155a){const _0x105984=a243_0x566a;if(isInvalidLovrabetRegion(_0x94155a))throw CliErrors['validation']('Invalid\x20country/region\x20'+describeConfiguredRegion(_0x94155a)+'\x20in\x20Rabetbase\x20configuration.',_0x105984(0x134)+CLI_BIN_NAME+_0x105984(0x130));return normalizeLovrabetRegion(_0x94155a)??DEFAULT_LOVRABET_REGION;}export function isRoutingRecoveryService(_0x47fb86){const _0x4c8f3c=a243_0x566a;return _0x47fb86===_0x4c8f3c(0x124)||_0x47fb86==='doctor';}export async function createContext(_0x7eacca){const _0x38b7b8=a243_0x566a,{config:_0x23b51c,layers:_0x617544}=readRawConfigWithLayers(),_0x13733c=buildConfig(_0x23b51c,_0x7eacca,_0x617544);await initGlobalEnvironment(_0x13733c);const {getUserDomain:_0x3d083e,getApiDomain:_0x48ab64}=await import(_0x38b7b8(0x145)),_0x4682d4={'apiDomain':_0x48ab64(),'userDomain':_0x3d083e()},_0x10c271=await buildAuth(_0x13733c);logger[_0x38b7b8(0x13a)](process['cwd']());const _0x1810ff=(CLI_BIN_NAME+'\x20'+process['argv'][_0x38b7b8(0x11f)](0x2)[_0x38b7b8(0x12e)]('\x20'))[_0x38b7b8(0x123)]();logger[_0x38b7b8(0x144)](_0x1810ff);const {isNonInteractive:_0x4f4e11}=await import('./utils/is-non-interactive.js'),_0x87663a=_0x4f4e11(_0x7eacca);return{'config':_0x13733c,'auth':_0x10c271,'logger':logger,'env':_0x4682d4,'nonInteractive':_0x87663a};}export function buildConfigFromFlags(_0x1de3aa){const {config:_0x4315c8,layers:_0x468a30}=readRawConfigWithLayers();return buildConfig(_0x4315c8,_0x1de3aa,_0x468a30);}export async function initGlobalEnvironment(_0x209528){const _0x30eb63=a243_0x566a,_0x23896f=resolveConfiguredRegion(_0x209528['raw']?.['region']),_0x1d340c=resolveEnterpriseRoutingManifest(_0x209528[_0x30eb63(0x12a)]?.[_0x30eb63(0x148)]),_0x28e579={'region':_0x23896f,'apiDomain':_0x1d340c?_0x1d340c[_0x30eb63(0x12f)]['apiDomain']:optionalString(_0x209528[_0x30eb63(0x12a)]?.['apiDomain']),'userDomain':_0x1d340c?_0x1d340c[_0x30eb63(0x12f)][_0x30eb63(0x13e)]:optionalString(_0x209528[_0x30eb63(0x12a)]?.[_0x30eb63(0x13e)]),'runtimeDomain':_0x1d340c?_0x1d340c[_0x30eb63(0x12f)][_0x30eb63(0x117)]:optionalString(_0x209528['raw']?.[_0x30eb63(0x117)]),'skillDomain':_0x1d340c?_0x1d340c[_0x30eb63(0x12f)][_0x30eb63(0x120)]:optionalString(_0x209528[_0x30eb63(0x12a)]?.[_0x30eb63(0x120)])||optionalString(_0x209528[_0x30eb63(0x12a)]?.['skillHubDomain'])||optionalString(_0x209528[_0x30eb63(0x12a)]?.[_0x30eb63(0x12b)])||optionalString(_0x209528[_0x30eb63(0x12a)]?.['platformDomain']),'kbDomain':_0x1d340c?_0x1d340c[_0x30eb63(0x12f)][_0x30eb63(0x119)]:optionalString(_0x209528[_0x30eb63(0x12a)]?.['kbDomain'])||optionalString(_0x209528[_0x30eb63(0x12a)]?.[_0x30eb63(0x12b)])||optionalString(_0x209528[_0x30eb63(0x12a)]?.['platformDomain']),'appDomain':_0x1d340c?_0x1d340c[_0x30eb63(0x12f)][_0x30eb63(0x13d)]:optionalString(_0x209528['raw']?.[_0x30eb63(0x13d)]),'localDomain':_0x1d340c?_0x1d340c['domains']['localDomain']:optionalString(_0x209528['raw']?.[_0x30eb63(0x125)]),'certificateDomain':_0x1d340c?_0x1d340c['domains'][_0x30eb63(0x128)]:optionalString(_0x209528[_0x30eb63(0x12a)]?.['certificateDomain']),'cdn':_0x1d340c?.[_0x30eb63(0x13f)]},{initEnv:_0x5aafbc}=await import(_0x30eb63(0x11d)),{initDomains:_0x2a3313}=await import(_0x30eb63(0x145));_0x5aafbc(_0x209528[_0x30eb63(0x135)]),_0x2a3313(_0x28e579);}export function getConfigAppCode(_0x125c24){const _0x2b09dc=a243_0x566a,_0x2ee588=readRawConfig(_0x125c24);if(_0x2ee588[_0x2b09dc(0x150)]&&typeof _0x2ee588[_0x2b09dc(0x150)]==='object'){const _0x1148dd=_0x2ee588['defaultApp'];if(_0x1148dd)return _0x2ee588[_0x2b09dc(0x150)][_0x1148dd]?.['appcode']?String(_0x2ee588['apps'][_0x1148dd]['appcode'])[_0x2b09dc(0x123)]():undefined;const _0x120cb3=Object[_0x2b09dc(0x121)](_0x2ee588[_0x2b09dc(0x150)]);if(_0x120cb3[_0x2b09dc(0x131)]===0x1&&_0x120cb3[0x0]?.[_0x2b09dc(0x141)])return String(_0x120cb3[0x0][_0x2b09dc(0x141)])[_0x2b09dc(0x123)]();}const _0x33952c=_0x2ee588[_0x2b09dc(0x141)]||_0x2ee588[_0x2b09dc(0x14d)];if(typeof _0x33952c!=='string'||_0x33952c[_0x2b09dc(0x123)]()==='')return undefined;return _0x33952c[_0x2b09dc(0x123)]();}export function getMultiAppConfigs(_0x1deadc=a243_0x3770c8(0x139),_0x34faeb){const _0x5ef8cb=a243_0x3770c8,_0x132856=loadRawConfigLayers(_0x34faeb);let _0x34b115,_0x3879f0;if(_0x1deadc===_0x5ef8cb(0x11a)){const _0x252a0c=_0x132856['globalConfig'][_0x5ef8cb(0x150)]&&typeof _0x132856[_0x5ef8cb(0x12d)][_0x5ef8cb(0x150)]==='object'?_0x132856[_0x5ef8cb(0x12d)][_0x5ef8cb(0x150)]:{},_0x32b6ae=_0x132856[_0x5ef8cb(0x118)][_0x5ef8cb(0x150)]&&typeof _0x132856['projectConfig'][_0x5ef8cb(0x150)]==='object'?_0x132856[_0x5ef8cb(0x118)][_0x5ef8cb(0x150)]:{};_0x34b115={..._0x252a0c,..._0x32b6ae};const _0x5a4d3e=readRawConfig(_0x34faeb);_0x3879f0=_0x5a4d3e[_0x5ef8cb(0x142)];}else _0x34b115=_0x132856[_0x5ef8cb(0x118)][_0x5ef8cb(0x150)],_0x3879f0=_0x132856[_0x5ef8cb(0x118)][_0x5ef8cb(0x142)];!_0x3879f0&&_0x34b115&&typeof _0x34b115==='object'&&Object[_0x5ef8cb(0x138)](_0x34b115)[_0x5ef8cb(0x131)]===0x1&&(_0x3879f0=Object[_0x5ef8cb(0x138)](_0x34b115)[0x0]);if(!_0x34b115||typeof _0x34b115!==_0x5ef8cb(0x136)||Object[_0x5ef8cb(0x138)](_0x34b115)[_0x5ef8cb(0x131)]===0x0)return null;return Object[_0x5ef8cb(0x140)](_0x34b115)['map'](([_0x5c340c,_0x207f1d])=>({'name':_0x5c340c,'appcode':_0x207f1d?.['appcode']||'','isDefault':_0x5c340c===_0x3879f0,'env':_0x207f1d?.[_0x5ef8cb(0x135)],'apiDir':_0x207f1d?.['apiDir'],'cookie':_0x207f1d?.[_0x5ef8cb(0x14f)]||undefined}))['filter'](_0x266808=>_0x266808[_0x5ef8cb(0x141)]);}export function getTemplateBaseUrl(_0xb8247d){const _0x212781=a243_0x3770c8,_0x40bcca=readRawConfig(_0xb8247d);if(_0x40bcca[_0x212781(0x14a)]&&typeof _0x40bcca[_0x212781(0x14a)]===_0x212781(0x137))return _0x40bcca[_0x212781(0x14a)]['replace'](/\/$/,'');return _0x212781(0x11c);}function buildConfig(_0x471f1b,_0x418e1b,_0x5e95ea){return{...resolveAppConfig({'raw':_0x471f1b,'flags':_0x418e1b,'layers':_0x5e95ea,'readEnv':env}),'raw':_0x471f1b};}export function resolveApiFilePath(_0xd7ea8c,_0x1fa050){const _0x14546b=a243_0x3770c8,_0x3a9b49=resolve(process[_0x14546b(0x122)](),_0xd7ea8c),_0x4e3442=resolve(_0x3a9b49,_0x14546b(0x13b));if(!_0x1fa050)return _0x4e3442;const _0x232cc3=readRawConfig(),_0x308433=_0x232cc3[_0x14546b(0x150)]&&typeof _0x232cc3[_0x14546b(0x150)]===_0x14546b(0x136)?_0x232cc3[_0x14546b(0x150)]:{},_0x41e25b=Object[_0x14546b(0x140)](_0x308433)[_0x14546b(0x11b)](([,_0xc62e60])=>_0xc62e60?.['appcode']===_0x1fa050);if(!_0x41e25b)return _0x4e3442;const [_0x2b0981,_0x58bea3]=_0x41e25b,_0x5cb71e=typeof _0x232cc3[_0x14546b(0x142)]===_0x14546b(0x137)?_0x232cc3[_0x14546b(0x142)]:undefined;if(_0x58bea3?.[_0x14546b(0x14b)])return _0x4e3442;if(_0x5cb71e&&_0x2b0981!==_0x5cb71e)return resolve(_0x3a9b49,_0x2b0981+_0x14546b(0x11e));return _0x4e3442;}
|
|
1
|
+
const a258_0x25662d=a258_0x5880;(function(_0x126891,_0x1e5eeb){const _0x653858=a258_0x5880,_0x215d23=_0x126891();while(!![]){try{const _0x261382=parseInt(_0x653858(0x1a7))/0x1+parseInt(_0x653858(0x1aa))/0x2*(parseInt(_0x653858(0x1ae))/0x3)+-parseInt(_0x653858(0x18b))/0x4+parseInt(_0x653858(0x1ba))/0x5+-parseInt(_0x653858(0x190))/0x6*(-parseInt(_0x653858(0x1ad))/0x7)+-parseInt(_0x653858(0x1b3))/0x8*(parseInt(_0x653858(0x1a8))/0x9)+parseInt(_0x653858(0x1a3))/0xa*(-parseInt(_0x653858(0x189))/0xb);if(_0x261382===_0x1e5eeb)break;else _0x215d23['push'](_0x215d23['shift']());}catch(_0x363c54){_0x215d23['push'](_0x215d23['shift']());}}}(a258_0x458c,0xc893d));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';function a258_0x458c(){const _0x592ac9=['392904iDChHB','userDomain','cwd','regionSource','production','raw','app','1243060FcDbCi','targetEnv','project\x20Rabetbase\x20configuration','appDomain','template_base_url','length','certificateDomain','name','defaultApp','keys','object','setLogPath','string','appcode','cookie','argv','skillDomain','domains','api.ts','slice','env','globalConfig','routing','Rabetbase\x20configuration','skillHubDomain','global\x20Rabetbase\x20configuration','values','11tDxjxx','hasOwnProperty','664276llTzmC','join','https://g.lovrabet.com/dist/lovrabet-skill','agentDomain','runtimeDomain','79626dsNOlK','currentApp','source','prototype','projectConfig','doctor','apiDir','region','apps','project','trim','./constant/domain.js','merged','platformDomain','localDomain','kbDomain','app\x20profile\x20\x22','daily','global','16183190FEQRXL','configuredRegion','./constant/env.js','regionLocation','1495965AQvEJh','117ZMorAb','./utils/is-non-interactive.js','10WooRDI','find','replace','420zQjCEI','422151hQrfbH','entries','call','apiDomain','setRawCommand'];a258_0x458c=function(){return _0x592ac9;};return a258_0x458c();}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';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(_0x256ba7){return process.env[`RABETBASE_${_0x256ba7}`]||process.env[`LOVRABET_${_0x256ba7}`]||undefined;}function optionalString(_0x56bba7){const _0x2f39c4=a258_0x5880;return typeof _0x56bba7===_0x2f39c4(0x17a)&&_0x56bba7[_0x2f39c4(0x19a)]()?_0x56bba7['trim']():undefined;}export function isRoutingRecoveryService(_0x84b1cf){const _0xbfa591=a258_0x5880;return _0x84b1cf==='config'||_0x84b1cf===_0xbfa591(0x195);}export async function createContext(_0x273bec){const _0x221583=a258_0x5880,{config:_0x56bd69,layers:_0x19a853}=readRawConfigWithLayers(),_0x3a2fe8=buildConfig(_0x56bd69,_0x273bec,_0x19a853);await initGlobalEnvironment(_0x3a2fe8);const {getUserDomain:_0xd89414,getApiDomain:_0x51bf0a}=await import(_0x221583(0x19b)),_0x464589={'apiDomain':_0x51bf0a(),'userDomain':_0xd89414()},_0x1ee919=await buildAuth(_0x3a2fe8);logger[_0x221583(0x1c5)](process[_0x221583(0x1b5)]());const _0x3471b0=(CLI_BIN_NAME+'\x20'+process[_0x221583(0x17d)][_0x221583(0x181)](0x2)[_0x221583(0x18c)]('\x20'))['trim']();logger[_0x221583(0x1b2)](_0x3471b0);const {isNonInteractive:_0x405e2a}=await import(_0x221583(0x1a9)),_0x6b63ee=_0x405e2a(_0x273bec);return{'config':_0x3a2fe8,'auth':_0x1ee919,'logger':logger,'env':_0x464589,'nonInteractive':_0x6b63ee};}export function buildConfigFromFlags(_0x56215a){const {config:_0x57fdec,layers:_0x5b46ea}=readRawConfigWithLayers();return buildConfig(_0x57fdec,_0x56215a,_0x5b46ea);}export async function initGlobalEnvironment(_0x3ee606){const _0x2a0b78=a258_0x5880,_0x57ebac=_0x3ee606[_0x2a0b78(0x1b6)]===_0x2a0b78(0x1b9)&&_0x3ee606[_0x2a0b78(0x191)]?'app\x20profile\x20\x22'+_0x3ee606[_0x2a0b78(0x191)]+'\x22':_0x3ee606['regionSource']==='project'?_0x2a0b78(0x1bc):_0x3ee606[_0x2a0b78(0x1b6)]===_0x2a0b78(0x1a2)?_0x2a0b78(0x187):_0x2a0b78(0x185);await initConfiguredEnvironment({'raw':_0x3ee606[_0x2a0b78(0x1b8)],'configuredRegion':_0x3ee606['regionConfiguredValue']??_0x3ee606[_0x2a0b78(0x1b8)]?.[_0x2a0b78(0x197)]??_0x3ee606['region'],'regionLocation':_0x57ebac,'targetEnv':_0x3ee606[_0x2a0b78(0x182)]});}async function initConfiguredEnvironment(_0x5c8846){const _0x2f92d2=a258_0x5880,_0xfbb48e=resolveConfiguredRegion(_0x5c8846[_0x2f92d2(0x1a4)],_0x5c8846[_0x2f92d2(0x1a6)]),_0x25f1fb=resolveEnterpriseRoutingManifest(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x184)]),_0x2d4a25={'region':_0xfbb48e,'apiDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)]['apiDomain']:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x1b1)]),'userDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)]['userDomain']:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x1b4)]),'runtimeDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)][_0x2f92d2(0x18f)]:optionalString(_0x5c8846['raw']?.[_0x2f92d2(0x18f)]),'skillDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)][_0x2f92d2(0x17e)]:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.['skillDomain'])||optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x186)])||optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.['agentDomain'])||optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x19d)]),'kbDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)]['kbDomain']:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.['kbDomain'])||optionalString(_0x5c8846['raw']?.['agentDomain'])||optionalString(_0x5c8846['raw']?.[_0x2f92d2(0x19d)]),'appDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)][_0x2f92d2(0x1bd)]:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.['appDomain']),'localDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)][_0x2f92d2(0x19e)]:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x19e)]),'certificateDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)][_0x2f92d2(0x1c0)]:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x1c0)]),'cdn':_0x25f1fb?.['cdn']},{initEnv:_0x4a7395}=await import(_0x2f92d2(0x1a5)),{initDomains:_0x58d6c1}=await import(_0x2f92d2(0x19b));_0x4a7395(_0x5c8846[_0x2f92d2(0x1bb)]),_0x58d6c1(_0x2d4a25);}export async function initMultiAppEnvironment(_0x1032d0){const _0x2da189=a258_0x5880;await initConfiguredEnvironment({'raw':_0x1032d0['routingConfig'],'configuredRegion':_0x1032d0[_0x2da189(0x197)],'regionLocation':_0x2da189(0x1a0)+_0x1032d0[_0x2da189(0x1c1)]+'\x22','targetEnv':_0x1032d0[_0x2da189(0x182)]===_0x2da189(0x1a1)?_0x2da189(0x1a1):_0x2da189(0x1b7)});}export function getConfigAppCode(_0x4b1700){const _0x58e9f3=a258_0x5880,_0xe34182=readRawConfig(_0x4b1700);if(_0xe34182[_0x58e9f3(0x198)]&&typeof _0xe34182[_0x58e9f3(0x198)]==='object'){const _0xca3443=_0xe34182[_0x58e9f3(0x1c2)];if(_0xca3443)return _0xe34182['apps'][_0xca3443]?.[_0x58e9f3(0x17b)]?String(_0xe34182[_0x58e9f3(0x198)][_0xca3443][_0x58e9f3(0x17b)])[_0x58e9f3(0x19a)]():undefined;const _0x310250=Object[_0x58e9f3(0x188)](_0xe34182[_0x58e9f3(0x198)]);if(_0x310250[_0x58e9f3(0x1bf)]===0x1&&_0x310250[0x0]?.['appcode'])return String(_0x310250[0x0][_0x58e9f3(0x17b)])[_0x58e9f3(0x19a)]();}const _0x364975=_0xe34182[_0x58e9f3(0x17b)]||_0xe34182[_0x58e9f3(0x1b9)];if(typeof _0x364975!==_0x58e9f3(0x17a)||_0x364975['trim']()==='')return undefined;return _0x364975['trim']();}const CONNECTION_ROUTING_KEYS=['routing',a258_0x25662d(0x1b1),a258_0x25662d(0x1b4),a258_0x25662d(0x18f),a258_0x25662d(0x17e),a258_0x25662d(0x186),a258_0x25662d(0x19f),a258_0x25662d(0x18e),a258_0x25662d(0x19d),a258_0x25662d(0x1bd),a258_0x25662d(0x19e),'certificateDomain'];function pickConnectionRoutingConfig(_0x5de954,_0x253766){const _0x338d09={'region':_0x253766};for(const _0x567be1 of CONNECTION_ROUTING_KEYS){if(_0x5de954[_0x567be1]!==undefined)_0x338d09[_0x567be1]=_0x5de954[_0x567be1];}return _0x338d09;}function a258_0x5880(_0x172188,_0x39f28e){_0x172188=_0x172188-0x17a;const _0x458cac=a258_0x458c();let _0x588085=_0x458cac[_0x172188];return _0x588085;}export function getMultiAppConfigs(_0x346114=a258_0x25662d(0x199),_0x34d603){const _0x4823f2=a258_0x25662d,_0x49a70c=loadRawConfigLayers(_0x34d603);let _0x542932,_0x2933bf;const _0x133c8e=mergeRawConfigLayers(_0x49a70c),_0x31b090=_0x49a70c[_0x4823f2(0x183)][_0x4823f2(0x198)]&&typeof _0x49a70c['globalConfig'][_0x4823f2(0x198)]==='object'?_0x49a70c[_0x4823f2(0x183)][_0x4823f2(0x198)]:{},_0x12476f=_0x49a70c[_0x4823f2(0x194)][_0x4823f2(0x198)]&&typeof _0x49a70c['projectConfig'][_0x4823f2(0x198)]===_0x4823f2(0x1c4)?_0x49a70c[_0x4823f2(0x194)][_0x4823f2(0x198)]:{};_0x346114===_0x4823f2(0x19c)?(_0x542932={..._0x31b090,..._0x12476f},_0x2933bf=_0x133c8e[_0x4823f2(0x1c2)]):(_0x542932=_0x49a70c[_0x4823f2(0x194)][_0x4823f2(0x198)],_0x2933bf=_0x49a70c[_0x4823f2(0x194)][_0x4823f2(0x1c2)]);!_0x2933bf&&_0x542932&&typeof _0x542932===_0x4823f2(0x1c4)&&Object[_0x4823f2(0x1c3)](_0x542932)[_0x4823f2(0x1bf)]===0x1&&(_0x2933bf=Object[_0x4823f2(0x1c3)](_0x542932)[0x0]);if(!_0x542932||typeof _0x542932!==_0x4823f2(0x1c4)||Object[_0x4823f2(0x1c3)](_0x542932)[_0x4823f2(0x1bf)]===0x0)return null;return Object[_0x4823f2(0x1af)](_0x542932)['map'](([_0x46dccb,_0x50e4ca])=>{const _0x74720f=_0x4823f2,_0x2027f=_0x346114===_0x74720f(0x199)||Object[_0x74720f(0x193)][_0x74720f(0x18a)][_0x74720f(0x1b0)](_0x12476f,_0x46dccb),_0x14bc2b=_0x2027f?_0x133c8e:_0x49a70c['globalConfig'],_0x3f60fa=resolveEffectiveRegion({'appRegion':_0x50e4ca?.['region'],'projectRegion':_0x2027f?_0x49a70c[_0x74720f(0x194)][_0x74720f(0x197)]:undefined,'globalRegion':_0x49a70c[_0x74720f(0x183)][_0x74720f(0x197)],'mergedRegion':_0x14bc2b[_0x74720f(0x197)],'appName':_0x46dccb});return{'name':_0x46dccb,'appcode':_0x50e4ca?.[_0x74720f(0x17b)]||'','isDefault':_0x46dccb===_0x2933bf,'region':_0x3f60fa[_0x74720f(0x197)],'regionSource':_0x3f60fa[_0x74720f(0x192)],'env':_0x50e4ca?.[_0x74720f(0x182)],'apiDir':_0x50e4ca?.[_0x74720f(0x196)],'cookie':_0x50e4ca?.[_0x74720f(0x17c)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0x14bc2b,_0x3f60fa['region'])};})['filter'](_0x4d5558=>_0x4d5558[_0x4823f2(0x17b)]);}export function getTemplateBaseUrl(_0x378306){const _0xd073c7=a258_0x25662d,_0x45fa33=readRawConfig(_0x378306);if(_0x45fa33[_0xd073c7(0x1be)]&&typeof _0x45fa33[_0xd073c7(0x1be)]==='string')return _0x45fa33[_0xd073c7(0x1be)][_0xd073c7(0x1ac)](/\/$/,'');return _0xd073c7(0x18d);}function buildConfig(_0x5a356d,_0x1bfa8a,_0x535c5f){return{...resolveAppConfig({'raw':_0x5a356d,'flags':_0x1bfa8a,'layers':_0x535c5f,'readEnv':env}),'raw':_0x5a356d};}export function resolveApiFilePath(_0x576fc8,_0x2c21ea){const _0x44c2a1=a258_0x25662d,_0x35ae75=resolve(process[_0x44c2a1(0x1b5)](),_0x576fc8),_0x4cc349=resolve(_0x35ae75,_0x44c2a1(0x180));if(!_0x2c21ea)return _0x4cc349;const _0x41fa34=readRawConfig(),_0x502d71=_0x41fa34['apps']&&typeof _0x41fa34[_0x44c2a1(0x198)]===_0x44c2a1(0x1c4)?_0x41fa34[_0x44c2a1(0x198)]:{},_0x2bdcf0=Object[_0x44c2a1(0x1af)](_0x502d71)[_0x44c2a1(0x1ab)](([,_0x53cc9b])=>_0x53cc9b?.[_0x44c2a1(0x17b)]===_0x2c21ea);if(!_0x2bdcf0)return _0x4cc349;const [_0x41b36a,_0x3c661e]=_0x2bdcf0,_0x4087ea=typeof _0x41fa34[_0x44c2a1(0x1c2)]==='string'?_0x41fa34[_0x44c2a1(0x1c2)]:undefined;if(_0x3c661e?.['apiDir'])return _0x4cc349;if(_0x4087ea&&_0x41b36a!==_0x4087ea)return resolve(_0x35ae75,_0x41b36a+'-api.ts');return _0x4cc349;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a259_0x20d828=a259_0x133e;(function(_0x32a7cf,_0x410820){const _0x13b34b=a259_0x133e,_0xb30680=_0x32a7cf();while(!![]){try{const _0x594ebd=-parseInt(_0x13b34b(0x78))/0x1*(parseInt(_0x13b34b(0x72))/0x2)+-parseInt(_0x13b34b(0x83))/0x3*(-parseInt(_0x13b34b(0x8d))/0x4)+parseInt(_0x13b34b(0x76))/0x5+-parseInt(_0x13b34b(0x7e))/0x6*(parseInt(_0x13b34b(0x8a))/0x7)+parseInt(_0x13b34b(0x7b))/0x8+-parseInt(_0x13b34b(0x86))/0x9*(-parseInt(_0x13b34b(0x77))/0xa)+-parseInt(_0x13b34b(0x75))/0xb;if(_0x594ebd===_0x410820)break;else _0xb30680['push'](_0xb30680['shift']());}catch(_0x47b1f6){_0xb30680['push'](_0xb30680['shift']());}}}(a259_0x2daa,0x84cc1));import{existsSync,readFileSync,realpathSync,statSync}from'node:fs';import{dirname,extname,isAbsolute,relative,resolve}from'node:path';import{findProjectRootDirectory}from'../context/config-loader.js';const cache=new Map(),MAX_LOCAL_REEXPORT_DEPTH=0x8,SOURCE_FILE_EXTENSIONS=[a259_0x20d828(0x71),a259_0x20d828(0x85),a259_0x20d828(0x7d),a259_0x20d828(0x7a),a259_0x20d828(0x88),a259_0x20d828(0x73),a259_0x20d828(0x74),a259_0x20d828(0x6c)],LOCAL_REEXPORT_RE=/\bexport\s+(?:type\s+)?(?:\{[\s\S]*?\}|\*)\s+from\s*["']([^"']+)["']/g,SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION={'.js':[a259_0x20d828(0x71),a259_0x20d828(0x85)],'.jsx':['.tsx'],'.mjs':['.mts'],'.cjs':[a259_0x20d828(0x7a)]};function parseApiFile(_0x27992d){const _0x48ecdf=a259_0x20d828,_0x396de9=[],_0x280860=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x4b7f79;while((_0x4b7f79=_0x280860[_0x48ecdf(0x82)](_0x27992d))!==null){_0x396de9[_0x48ecdf(0x81)]({'datasetCode':_0x4b7f79[0x1],'tableName':_0x4b7f79[0x2],'name':_0x4b7f79[0x3],'alias':_0x4b7f79[0x4]});}return _0x396de9;}function isWithinRoot(_0x4eb188,_0x25fdf0){const _0x4036d6=a259_0x20d828,_0x131dfc=relative(_0x4eb188,_0x25fdf0);return _0x131dfc===''||!_0x131dfc[_0x4036d6(0x7c)]('..')&&!isAbsolute(_0x131dfc);}function resolveExistingFile(_0x4e3bb7){const _0x36ab39=a259_0x20d828;if(!existsSync(_0x4e3bb7))return undefined;try{return statSync(_0x4e3bb7)[_0x36ab39(0x80)]()?realpathSync(_0x4e3bb7):undefined;}catch{return undefined;}}function reexportCandidatePaths(_0x108ec0){const _0x1d4f75=a259_0x20d828,_0x49d3d7=extname(_0x108ec0);if(!_0x49d3d7)return[...SOURCE_FILE_EXTENSIONS[_0x1d4f75(0x6e)](_0x490b81=>''+_0x108ec0+_0x490b81),...SOURCE_FILE_EXTENSIONS['map'](_0x54ccd5=>resolve(_0x108ec0,'index'+_0x54ccd5))];const _0x5d009b=SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION[_0x49d3d7];if(!_0x5d009b)return[_0x108ec0];const _0x5144bf=_0x108ec0[_0x1d4f75(0x8b)](0x0,-_0x49d3d7[_0x1d4f75(0x8f)]);return[..._0x5d009b[_0x1d4f75(0x6e)](_0x550bb9=>''+_0x5144bf+_0x550bb9),_0x108ec0];}function resolveLocalReexport(_0x56c2f7,_0x52bc57,_0x3c3928){const _0x57a0ff=a259_0x20d828;if(!_0x52bc57['startsWith']('./')&&!_0x52bc57[_0x57a0ff(0x7c)](_0x57a0ff(0x87)))return undefined;const _0xc5ec6b=resolve(dirname(_0x56c2f7),_0x52bc57);if(!isWithinRoot(_0x3c3928,_0xc5ec6b))return undefined;for(const _0x4cb472 of reexportCandidatePaths(_0xc5ec6b)){const _0x21425e=resolveExistingFile(_0x4cb472);if(_0x21425e&&isWithinRoot(_0x3c3928,_0x21425e))return _0x21425e;}return undefined;}function parseApiFileTree(_0x347653,_0x309b59,_0x12ccc7,_0x107375){const _0x58e83c=a259_0x20d828,_0x4afe21=resolveExistingFile(_0x347653);if(!_0x4afe21)return[];const _0x2a4f83=_0x12ccc7[_0x58e83c(0x89)](_0x4afe21);if(_0x2a4f83!==undefined&&_0x2a4f83<=_0x107375)return[];_0x12ccc7[_0x58e83c(0x8e)](_0x4afe21,_0x107375);const _0x36b0e0=readFileSync(_0x4afe21,'utf-8'),_0x384a9b=parseApiFile(_0x36b0e0);if(_0x107375>=MAX_LOCAL_REEXPORT_DEPTH)return _0x384a9b;const _0x46c587=new RegExp(LOCAL_REEXPORT_RE[_0x58e83c(0x6a)],LOCAL_REEXPORT_RE[_0x58e83c(0x7f)]);let _0x27bde6;while((_0x27bde6=_0x46c587[_0x58e83c(0x82)](_0x36b0e0))!==null){const _0x3893e0=resolveLocalReexport(_0x4afe21,_0x27bde6[0x1],_0x309b59);_0x3893e0&&_0x384a9b[_0x58e83c(0x81)](...parseApiFileTree(_0x3893e0,_0x309b59,_0x12ccc7,_0x107375+0x1));}return _0x384a9b;}function aliasProjectRoot(_0x100718){const _0x3c4950=findProjectRootDirectory(dirname(_0x100718));try{return realpathSync(_0x3c4950);}catch{return _0x3c4950;}}function a259_0x2daa(){const _0x1d75e8=['api.ts','.tsx','568638zUnWve','../','.js','get','70odcZWz','slice','stringify','4pgvANt','set','length','has','source','add','.cjs','cwd','map','datasetCode','alias','.ts','5164cxeAAG','.jsx','.mjs','14433716LdTsSq','4414040sQeHpZ','10uPeEKP','39nnCEcr','size','.cts','4866776WzGgdz','startsWith','.mts','323832iqOiHb','flags','isFile','push','exec','2826522OUiBnn'];a259_0x2daa=function(){return _0x1d75e8;};return a259_0x2daa();}function uniqueAliasEntries(_0x1ccbb7){const _0x5d4c13=new Set();return _0x1ccbb7['filter'](_0x27e79a=>{const _0x47b63c=a259_0x133e,_0x45cff5=JSON[_0x47b63c(0x8c)](_0x27e79a);if(_0x5d4c13[_0x47b63c(0x90)](_0x45cff5))return![];return _0x5d4c13[_0x47b63c(0x6b)](_0x45cff5),!![];});}export function loadAliasMap(_0x39520e,_0x2d0043,_0x565462){const _0x5c9448=a259_0x20d828,_0x1ec09e=resolve(_0x565462??resolve(process[_0x5c9448(0x6d)](),_0x39520e,_0x5c9448(0x84)));if(cache[_0x5c9448(0x90)](_0x1ec09e))return cache[_0x5c9448(0x89)](_0x1ec09e);if(!existsSync(_0x1ec09e))return cache[_0x5c9448(0x8e)](_0x1ec09e,[]),[];try{const _0x38a259=uniqueAliasEntries(parseApiFileTree(_0x1ec09e,aliasProjectRoot(_0x1ec09e),new Map(),0x0));return cache[_0x5c9448(0x8e)](_0x1ec09e,_0x38a259),_0x38a259;}catch{return cache['set'](_0x1ec09e,[]),[];}}export function resolveAlias(_0x50bcbe,_0x1fb8b7,_0x82d6c1,_0x1146e3){const _0x3abf14=a259_0x20d828;if(!_0x1fb8b7)return undefined;const _0x269b6e=loadAliasMap(_0x50bcbe,_0x82d6c1,_0x1146e3),_0x15bc2e=new Set(_0x269b6e['filter'](_0x569706=>_0x569706[_0x3abf14(0x70)]===_0x1fb8b7)['map'](_0x3b44a6=>_0x3b44a6[_0x3abf14(0x6f)]));return _0x15bc2e[_0x3abf14(0x79)]===0x1?[..._0x15bc2e][0x0]:undefined;}function a259_0x133e(_0x1bf9d6,_0x2ff35f){_0x1bf9d6=_0x1bf9d6-0x6a;const _0x2daabe=a259_0x2daa();let _0x133ee0=_0x2daabe[_0x1bf9d6];return _0x133ee0;}export function listAliases(_0x3291ff,_0x416e9c,_0x5254e8){return loadAliasMap(_0x3291ff,_0x416e9c,_0x5254e8);}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -294,6 +294,15 @@ export interface BffScriptStatistics {
|
|
|
294
294
|
beforeScriptId: number | null;
|
|
295
295
|
afterScriptId: number | null;
|
|
296
296
|
}
|
|
297
|
+
export interface BffScriptLogQuery {
|
|
298
|
+
appCode: string;
|
|
299
|
+
startTime: number;
|
|
300
|
+
endTime: number;
|
|
301
|
+
level?: string;
|
|
302
|
+
keyword?: string;
|
|
303
|
+
limit?: number;
|
|
304
|
+
}
|
|
305
|
+
export declare const BFF_LIST_PAGE_SIZE = 100;
|
|
297
306
|
export declare function listBffScripts(appCode: string, type?: string, options?: {
|
|
298
307
|
scriptName?: string;
|
|
299
308
|
}): Promise<BffScript[]>;
|
|
@@ -313,6 +322,14 @@ export declare function saveBffScript(params: {
|
|
|
313
322
|
export declare function deleteBffScript(id: number): Promise<void>;
|
|
314
323
|
export declare function getBffScriptStatistics(appCode: string): Promise<BffScriptStatistics[]>;
|
|
315
324
|
export declare function clearBffScriptCache(): Promise<string>;
|
|
325
|
+
/**
|
|
326
|
+
* Query runtime Backend Function logs for development diagnostics.
|
|
327
|
+
*
|
|
328
|
+
* The runtime endpoint returns already-formatted log lines. Keep the raw
|
|
329
|
+
* lines intact so callers can search, display, or pipe them without losing
|
|
330
|
+
* trace and script metadata embedded by the server.
|
|
331
|
+
*/
|
|
332
|
+
export declare function searchBffScriptLogs(query: BffScriptLogQuery): Promise<string[]>;
|
|
316
333
|
export declare function listBffDatasetOperations(appCode: string, datasetId: number): Promise<Record<string, unknown> | null>;
|
|
317
334
|
export interface SqlQuery {
|
|
318
335
|
id: number;
|
|
@@ -503,12 +520,36 @@ export declare function listRecycleBinResources(appCode: string, resourceType: R
|
|
|
503
520
|
paging?: Paging;
|
|
504
521
|
}>;
|
|
505
522
|
export declare function restoreRecycleBinResource(deleteLogId: number): Promise<void>;
|
|
506
|
-
export
|
|
523
|
+
export type TextGeneratedDatasetPreviewInput = {
|
|
507
524
|
datasetName: string;
|
|
508
525
|
requirementDescription: string;
|
|
526
|
+
mode?: "single";
|
|
527
|
+
} | {
|
|
528
|
+
mode: "batch";
|
|
529
|
+
requirementDescription: string;
|
|
530
|
+
};
|
|
531
|
+
/** Server measurements for a single generation attempt; absent values are unknown. */
|
|
532
|
+
export interface DatasetGenerationMetrics {
|
|
533
|
+
schemaVersion?: number;
|
|
534
|
+
attemptId?: string;
|
|
535
|
+
attempt?: number;
|
|
536
|
+
datasetCount?: number;
|
|
537
|
+
fieldCount?: number;
|
|
538
|
+
previewDurationMs?: number;
|
|
539
|
+
queueWaitMs?: number;
|
|
540
|
+
executionDurationMs?: number;
|
|
541
|
+
resultReadDurationMs?: number;
|
|
542
|
+
stageDurationsMs?: Record<string, number>;
|
|
543
|
+
modelCallCount?: number;
|
|
544
|
+
retryCount?: number;
|
|
545
|
+
failedStage?: string;
|
|
546
|
+
previousAttempts?: DatasetGenerationMetrics[];
|
|
509
547
|
}
|
|
510
548
|
export declare function previewTextGeneratedDataset(appCode: string, input: TextGeneratedDatasetPreviewInput): Promise<any>;
|
|
511
549
|
export interface TextGeneratedDatasetJobStartResult {
|
|
550
|
+
mode?: "single" | "batch";
|
|
551
|
+
metrics?: DatasetGenerationMetrics | null;
|
|
552
|
+
failedStage?: string | null;
|
|
512
553
|
taskId?: string;
|
|
513
554
|
operationId?: string;
|
|
514
555
|
clientOperationId?: string;
|
|
@@ -521,6 +562,9 @@ export interface TextGeneratedDatasetJobStartResult {
|
|
|
521
562
|
[key: string]: any;
|
|
522
563
|
}
|
|
523
564
|
export interface TextGeneratedDatasetJobStatus {
|
|
565
|
+
mode?: "single" | "batch";
|
|
566
|
+
metrics?: DatasetGenerationMetrics | null;
|
|
567
|
+
failedStage?: string | null;
|
|
524
568
|
taskId?: string;
|
|
525
569
|
operationId?: string;
|
|
526
570
|
clientOperationId?: string;
|
|
@@ -534,6 +578,7 @@ export interface TextGeneratedDatasetJobStatus {
|
|
|
534
578
|
}
|
|
535
579
|
export declare function startTextGeneratedDataset(appCode: string, design: Record<string, any>, options?: {
|
|
536
580
|
clientOperationId?: string;
|
|
581
|
+
mode?: "batch";
|
|
537
582
|
}): Promise<TextGeneratedDatasetJobStartResult>;
|
|
538
583
|
export declare function getTextGeneratedDatasetStatus(appCode: string, options: {
|
|
539
584
|
taskId?: string;
|
|
@@ -814,6 +859,7 @@ export declare function listDeletedPages(appCode: string, pageType: PageProductT
|
|
|
814
859
|
export declare function restoreDataListPage(pageId: number): Promise<void>;
|
|
815
860
|
export declare function restoreCustomPage(appCode: string, pageId: number): Promise<boolean>;
|
|
816
861
|
export declare function updatePage(appCode: string, pageId: number, code: string, datasetIds: number[]): Promise<boolean>;
|
|
862
|
+
export declare function transpileLrSmartJsx(source: string): Promise<string>;
|
|
817
863
|
export declare function generateSdkCode(dataset: {
|
|
818
864
|
name: string;
|
|
819
865
|
code: string;
|
|
@@ -975,16 +1021,141 @@ export interface DbAnalysisStatus {
|
|
|
975
1021
|
endTime?: number | string | null;
|
|
976
1022
|
[key: string]: unknown;
|
|
977
1023
|
}
|
|
1024
|
+
/** Runtime role exposed by lovrabet-runtime for approval assignee selection. */
|
|
1025
|
+
export interface ApprovalRuntimeRole {
|
|
1026
|
+
id: number;
|
|
1027
|
+
appCode?: string | null;
|
|
1028
|
+
roleName?: string | null;
|
|
1029
|
+
roleType?: string | null;
|
|
1030
|
+
remark?: string | null;
|
|
1031
|
+
userCount?: number | null;
|
|
1032
|
+
permitCount?: number | null;
|
|
1033
|
+
[key: string]: unknown;
|
|
1034
|
+
}
|
|
1035
|
+
/** Runtime app user exposed by /api/dept/queryAppUser. */
|
|
1036
|
+
export interface ApprovalRuntimeUser {
|
|
1037
|
+
code?: string | number | null;
|
|
1038
|
+
userName?: string | null;
|
|
1039
|
+
nickName?: string | null;
|
|
1040
|
+
displayName?: string | null;
|
|
1041
|
+
email?: string | null;
|
|
1042
|
+
status?: string | null;
|
|
1043
|
+
[key: string]: unknown;
|
|
1044
|
+
}
|
|
1045
|
+
/** Safe runtime role member fields used to inspect approval role membership. */
|
|
1046
|
+
export interface ApprovalRuntimeRoleMember {
|
|
1047
|
+
userId: string | number;
|
|
1048
|
+
username?: string | null;
|
|
1049
|
+
nickname?: string | null;
|
|
1050
|
+
[key: string]: unknown;
|
|
1051
|
+
}
|
|
1052
|
+
/** Runtime role and its current members. */
|
|
1053
|
+
export interface ApprovalRuntimeRoleUsers {
|
|
1054
|
+
id: number;
|
|
1055
|
+
roleName?: string | null;
|
|
1056
|
+
roleType?: string | null;
|
|
1057
|
+
userList?: ApprovalRuntimeRoleMember[] | null;
|
|
1058
|
+
[key: string]: unknown;
|
|
1059
|
+
}
|
|
1060
|
+
export interface ApprovalRuntimeRoleListOptions {
|
|
1061
|
+
roleId?: number;
|
|
1062
|
+
roleName?: string;
|
|
1063
|
+
currentPage?: number;
|
|
1064
|
+
pageSize?: number;
|
|
1065
|
+
}
|
|
1066
|
+
/** POST Runtime /api/permit/role/get-list: list roles from the runtime environment. */
|
|
1067
|
+
export declare function listApprovalRuntimeRoles(appCode: string, options?: ApprovalRuntimeRoleListOptions): Promise<{
|
|
1068
|
+
items: ApprovalRuntimeRole[];
|
|
1069
|
+
paging?: Paging;
|
|
1070
|
+
}>;
|
|
1071
|
+
/** GET Runtime /api/dept/queryAppUser: list users attached to the runtime app. */
|
|
1072
|
+
export declare function listApprovalRuntimeUsers(appCode: string): Promise<ApprovalRuntimeUser[]>;
|
|
1073
|
+
/** POST Runtime /api/permit/user-role/get-user-list: inspect runtime role members. */
|
|
1074
|
+
export declare function listApprovalRuntimeRoleUsers(appCode: string): Promise<ApprovalRuntimeRoleUsers[]>;
|
|
1075
|
+
/** Flow definition returned by SmartFlowController. */
|
|
1076
|
+
export interface FlowDefinition {
|
|
1077
|
+
id: number;
|
|
1078
|
+
flowCode?: string | null;
|
|
1079
|
+
appCode?: string | null;
|
|
1080
|
+
datasetCode?: string | null;
|
|
1081
|
+
pageId?: number | null;
|
|
1082
|
+
flowName?: string | null;
|
|
1083
|
+
flowDesc?: string | null;
|
|
1084
|
+
flowType?: string | null;
|
|
1085
|
+
sourceType?: string | null;
|
|
1086
|
+
version?: number | null;
|
|
1087
|
+
flowSchema?: string | null;
|
|
1088
|
+
draftSchema?: string | null;
|
|
1089
|
+
flowStatus?: string | null;
|
|
1090
|
+
templateName?: string | null;
|
|
1091
|
+
deployId?: string | null;
|
|
1092
|
+
procDefId?: string | null;
|
|
1093
|
+
procDefVersion?: number | null;
|
|
1094
|
+
flowConfig?: string | null;
|
|
1095
|
+
flowJson?: Record<string, unknown> | null;
|
|
1096
|
+
enabled?: boolean | null;
|
|
1097
|
+
createUserId?: string | null;
|
|
1098
|
+
updateUserId?: string | null;
|
|
1099
|
+
gmtCreate?: string | null;
|
|
1100
|
+
gmtModified?: string | null;
|
|
1101
|
+
[key: string]: unknown;
|
|
1102
|
+
}
|
|
1103
|
+
/** Exact writable fields exposed by FlowDefRequest. */
|
|
1104
|
+
export interface FlowDefinitionWriteRequest {
|
|
1105
|
+
id?: number;
|
|
1106
|
+
flowName: string;
|
|
1107
|
+
flowDesc?: string;
|
|
1108
|
+
flowType: "FORM_FLOW" | "INDEPENDENT_FLOW";
|
|
1109
|
+
appCode: string;
|
|
1110
|
+
datasetCode?: string;
|
|
1111
|
+
pageId?: number;
|
|
1112
|
+
flowJson: Record<string, unknown>;
|
|
1113
|
+
}
|
|
1114
|
+
/** Supported filters exposed by FlowDefQueryRequest. */
|
|
1115
|
+
export interface FlowDefinitionListOptions {
|
|
1116
|
+
flowCode?: string;
|
|
1117
|
+
flowName?: string;
|
|
1118
|
+
flowStatus?: string;
|
|
1119
|
+
datasetCode?: string;
|
|
1120
|
+
flowType?: string;
|
|
1121
|
+
pageNum?: number;
|
|
1122
|
+
pageSize?: number;
|
|
1123
|
+
}
|
|
1124
|
+
/** POST /smartapi/flow/page: list flow definitions for one app. */
|
|
1125
|
+
export declare function listFlowDefinitions(appCode: string, options?: FlowDefinitionListOptions): Promise<{
|
|
1126
|
+
items: FlowDefinition[];
|
|
1127
|
+
paging?: Paging;
|
|
1128
|
+
}>;
|
|
1129
|
+
/** POST /smartapi/flow/detail: read one flow definition by id and app. */
|
|
1130
|
+
export declare function getFlowDefinition(appCode: string, id: number): Promise<FlowDefinition>;
|
|
1131
|
+
/** POST /smartapi/flow/create: create a draft flow definition. */
|
|
1132
|
+
export declare function createFlowDefinition(input: FlowDefinitionWriteRequest): Promise<FlowDefinition>;
|
|
1133
|
+
/** POST /smartapi/flow/update: replace a flow definition draft. */
|
|
1134
|
+
export declare function updateFlowDefinition(input: FlowDefinitionWriteRequest & {
|
|
1135
|
+
id: number;
|
|
1136
|
+
}): Promise<FlowDefinition>;
|
|
1137
|
+
/** POST /smartapi/flow/publish: publish the current draft. */
|
|
1138
|
+
export declare function publishFlowDefinition(appCode: string, id: number): Promise<FlowDefinition>;
|
|
978
1139
|
export type InstantApiPolicyAction = "allow" | "deny" | "route";
|
|
979
1140
|
export interface InstantApiPolicyDatasetTarget {
|
|
980
1141
|
datasetCode?: string | null;
|
|
981
1142
|
tableName?: string | null;
|
|
982
1143
|
}
|
|
1144
|
+
/**
|
|
1145
|
+
* 版本 2 规则中需要从匹配范围扣除的数据集与 API 组合。
|
|
1146
|
+
*
|
|
1147
|
+
* @author binggan
|
|
1148
|
+
*/
|
|
1149
|
+
export interface InstantApiPolicyExclusion {
|
|
1150
|
+
datasets: InstantApiPolicyDatasetTarget[];
|
|
1151
|
+
apis: string[];
|
|
1152
|
+
}
|
|
983
1153
|
export interface InstantApiPolicyRule {
|
|
984
1154
|
name: string;
|
|
985
1155
|
description?: string | null;
|
|
986
1156
|
datasets: InstantApiPolicyDatasetTarget[];
|
|
987
1157
|
apis: string[];
|
|
1158
|
+
excludes?: InstantApiPolicyExclusion[] | null;
|
|
988
1159
|
action: InstantApiPolicyAction | string;
|
|
989
1160
|
backendFunction?: string | null;
|
|
990
1161
|
}
|