@lovrabet/rabetbase-cli 2.5.10-beta.1 → 2.5.10-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/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.d.ts +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -28
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a280_0xf986(_0x19b8da,_0x50215e){_0x19b8da=_0x19b8da-0xf8;const _0x1779f0=a280_0x1779();let _0xf9863d=_0x1779f0[_0x19b8da];return _0xf9863d;}(function(_0xd2a27e,_0x3498dc){const _0x1000c0=a280_0xf986,_0x39c142=_0xd2a27e();while(!![]){try{const _0x5dc02f=parseInt(_0x1000c0(0x102))/0x1+parseInt(_0x1000c0(0xff))/0x2+-parseInt(_0x1000c0(0xfd))/0x3+parseInt(_0x1000c0(0xf8))/0x4+parseInt(_0x1000c0(0xfc))/0x5+-parseInt(_0x1000c0(0xfb))/0x6*(parseInt(_0x1000c0(0x100))/0x7)+parseInt(_0x1000c0(0x101))/0x8*(-parseInt(_0x1000c0(0xfe))/0x9);if(_0x5dc02f===_0x3498dc)break;else _0x39c142['push'](_0x39c142['shift']());}catch(_0x36ca24){_0x39c142['push'](_0x39c142['shift']());}}}(a280_0x1779,0x34a94));import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';export const LOVRABET_REGION_VALUES=REGION_VALUES;export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;export function isLovrabetRegion(_0xa8b58e){return typeof _0xa8b58e==='string'&&LOVRABET_REGION_VALUES['includes'](_0xa8b58e);}export function isEnabledLovrabetRegion(_0x5ce3fc){const _0x1f1423=a280_0xf986;return typeof _0x5ce3fc===_0x1f1423(0xfa)&&ENABLED_LOVRABET_REGION_VALUES[_0x1f1423(0xf9)](_0x5ce3fc);}export function normalizeLovrabetRegion(_0x2ec261){const _0x59038d=a280_0xf986;if(typeof _0x2ec261!==_0x59038d(0xfa))return undefined;const _0x52a8ae=REGION_ALIASES[_0x2ec261]??_0x2ec261;return isLovrabetRegion(_0x52a8ae)?_0x52a8ae:undefined;}export function isInvalidLovrabetRegion(_0x52798f){return _0x52798f!==undefined&&_0x52798f!==null&&_0x52798f!==''&&normalizeLovrabetRegion(_0x52798f)===undefined;}function a280_0x1779(){const _0x49e599=['168SYcIFQ','35811buDcCs','899224WzLKXr','includes','string','6IpLmYT','906090HRGiBV','403656PCqOqE','79479oHHkHw','836154xHiamV','2269463cDqcli'];a280_0x1779=function(){return _0x49e599;};return a280_0x1779();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a281_0x26c8e1=a281_0x37db;function a281_0x37db(_0x40f56a,_0x56de12){_0x40f56a=_0x40f56a-0xd9;const _0x4050ed=a281_0x4050();let _0x37dbd8=_0x4050ed[_0x40f56a];return _0x37dbd8;}function a281_0x4050(){const _0x543f99=['3026223juOLLv','387502maBOjH','35114676BXCSgf','6RvkAEZ','10wMghLn','10660595veNWHJ','33868KAOWhI','high-risk-write','472uSPmWU','read','30474iCujVE','365BELsUo','2sGlMkS','5424559TbNgtk'];a281_0x4050=function(){return _0x543f99;};return a281_0x4050();}(function(_0x7d5c2b,_0xf7058f){const _0x596f67=a281_0x37db,_0x49467d=_0x7d5c2b();while(!![]){try{const _0x28b993=-parseInt(_0x596f67(0xdc))/0x1*(parseInt(_0x596f67(0xd9))/0x2)+-parseInt(_0x596f67(0xdb))/0x3+parseInt(_0x596f67(0xe1))/0x4*(-parseInt(_0x596f67(0xe6))/0x5)+parseInt(_0x596f67(0xde))/0x6*(parseInt(_0x596f67(0xda))/0x7)+-parseInt(_0x596f67(0xe3))/0x8*(parseInt(_0x596f67(0xe5))/0x9)+-parseInt(_0x596f67(0xdf))/0xa*(parseInt(_0x596f67(0xe0))/0xb)+parseInt(_0x596f67(0xdd))/0xc;if(_0x28b993===_0xf7058f)break;else _0x49467d['push'](_0x49467d['shift']());}catch(_0x414a86){_0x49467d['push'](_0x49467d['shift']());}}}(a281_0x4050,0x7e713));export const RISK_LEVEL_VALUES=[a281_0x26c8e1(0xe4),'write',a281_0x26c8e1(0xe2)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x63983e,_0x1ce1b8){const _0x1f9fa8=a282_0x3051,_0x1081bc=_0x63983e();while(!![]){try{const _0x129b7d=-parseInt(_0x1f9fa8(0x15b))/0x1+parseInt(_0x1f9fa8(0x15c))/0x2*(-parseInt(_0x1f9fa8(0x154))/0x3)+parseInt(_0x1f9fa8(0x15a))/0x4+parseInt(_0x1f9fa8(0x156))/0x5+-parseInt(_0x1f9fa8(0x159))/0x6*(parseInt(_0x1f9fa8(0x15e))/0x7)+parseInt(_0x1f9fa8(0x158))/0x8+parseInt(_0x1f9fa8(0x157))/0x9;if(_0x129b7d===_0x1ce1b8)break;else _0x1081bc['push'](_0x1081bc['shift']());}catch(_0x162fda){_0x1081bc['push'](_0x1081bc['shift']());}}}(a282_0x4d9f,0x89abc));function a282_0x4d9f(){const _0x1761f4=['920309bAxRpP','4126WctPdn','cdn','42JBgoWs','735UyQWGt','lovrabet','3924355EzCoVH','3756141nWuatb','859528EqdHrl','370398kxPCVu','4201524hrMHFx'];a282_0x4d9f=function(){return _0x1761f4;};return a282_0x4d9f();}import{OFFICIAL_ROUTING_PROFILES as a282_0x3d3a1c,ROUTING_CATALOG_DIGEST}from'../generated/official-routing.js';export const OFFICIAL_ROUTING_PROFILES=a282_0x3d3a1c;function a282_0x3051(_0x553f1d,_0x127489){_0x553f1d=_0x553f1d-0x154;const _0x4d9f5b=a282_0x4d9f();let _0x3051af=_0x4d9f5b[_0x553f1d];return _0x3051af;}export{ROUTING_CATALOG_DIGEST};export function getOfficialRoutingProfile(_0x37595a){return OFFICIAL_ROUTING_PROFILES[_0x37595a];}export function getOfficialRoutingCdn(_0x1b0261){const _0x5cdecb=a282_0x3051,_0x2d0e7e=getOfficialRoutingProfile(_0x1b0261)[_0x5cdecb(0x15d)];if(!_0x2d0e7e[_0x5cdecb(0x155)])throw new Error('Official\x20routing\x20for\x20region\x20\x22'+_0x1b0261+'\x22\x20is\x20not\x20ready:\x20Lovrabet\x20CDN\x20Domain\x20is\x20not\x20configured.');return{'libraries':_0x2d0e7e['libraries'],'lovrabet':_0x2d0e7e['lovrabet']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a283_0x54d6(){const _0x3e04ce=['high-risk-write','app','value','pageSize','PAGE_SIZE','entries','579rXSMxM','accessKey','ACCESS_KEY','appcode','apiDir','FORMAT','103976SZSWec','39775373YcfJsN','trim','length','object','2422322RLCIJM','1845292tjxbNu','VERBOSE','region','12362355cXkkEJ','9XNkZTw','globalConfig','filter','locale','cookie','string','riskLevel','1141240UkgbTW','10mvujkt','defaultApp','daily','projectConfig','apps','ENV','2598ZkFhpI','COOKIE','format','keys','6cusyGZ','read','source','env'];a283_0x54d6=function(){return _0x3e04ce;};return a283_0x54d6();}(function(_0x384747,_0x1781ea){const _0x1dff96=a283_0x51e3,_0x41425c=_0x384747();while(!![]){try{const _0x3531c3=-parseInt(_0x1dff96(0xa8))/0x1*(parseInt(_0x1dff96(0xc6))/0x2)+-parseInt(_0x1dff96(0xb8))/0x3*(parseInt(_0x1dff96(0xb4))/0x4)+parseInt(_0x1dff96(0xbf))/0x5+-parseInt(_0x1dff96(0xca))/0x6*(-parseInt(_0x1dff96(0xb3))/0x7)+parseInt(_0x1dff96(0xae))/0x8+-parseInt(_0x1dff96(0xb7))/0x9+parseInt(_0x1dff96(0xc0))/0xa*(parseInt(_0x1dff96(0xaf))/0xb);if(_0x3531c3===_0x1781ea)break;else _0x41425c['push'](_0x41425c['shift']());}catch(_0x5115a7){_0x41425c['push'](_0x41425c['shift']());}}}(a283_0x54d6,0xa952d));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 a283_0x51e3(_0x2cc3e3,_0x7dd34b){_0x2cc3e3=_0x2cc3e3-0xa3;const _0x54d695=a283_0x54d6();let _0x51e3c5=_0x54d695[_0x2cc3e3];return _0x51e3c5;}function stringConfigValue(_0x23a8c5){const _0x32dee7=a283_0x51e3;return typeof _0x23a8c5===_0x32dee7(0xbd)&&_0x23a8c5[_0x32dee7(0xb0)]()?_0x23a8c5['trim']():undefined;}function appProfiles(_0x1d4bd5){const _0x4033a3=a283_0x51e3;return _0x1d4bd5[_0x4033a3(0xc4)]&&typeof _0x1d4bd5[_0x4033a3(0xc4)]===_0x4033a3(0xb2)?_0x1d4bd5['apps']:{};}function resolveDefaultAppName(_0x4e91a1){const _0x164eca=a283_0x51e3,_0x3a0cb0=stringConfigValue(_0x4e91a1[_0x164eca(0xc1)]);if(_0x3a0cb0)return _0x3a0cb0;const _0x2fc8ff=Object[_0x164eca(0xc9)](appProfiles(_0x4e91a1));return _0x2fc8ff[_0x164eca(0xb1)]===0x1?_0x2fc8ff[0x0]:undefined;}function resolveTopLevelAppCode(_0x1041fe){return stringConfigValue(_0x1041fe['appcode'])||stringConfigValue(_0x1041fe['app']);}function normalizeRiskCeiling(_0x3ba992){const _0x4588fd=a283_0x51e3;if(_0x3ba992===undefined||_0x3ba992===null)return undefined;if(_0x3ba992===_0x4588fd(0xcb)||_0x3ba992==='write'||_0x3ba992===_0x4588fd(0xce))return _0x3ba992;return _0x4588fd(0xcb);}function resolveRiskCeiling(..._0x267f51){const _0x592e74=a283_0x51e3;let _0x8046e2;for(const _0xc560fc of _0x267f51){const _0x11db64=normalizeRiskCeiling(_0xc560fc);_0x11db64&&(!_0x8046e2||riskLevelOrder(_0x11db64)<riskLevelOrder(_0x8046e2))&&(_0x8046e2=_0x11db64);}return _0x8046e2??DEFAULT_CONFIG_VALUES[_0x592e74(0xbe)];}export function resolveAppConfig({raw:_0x53f2ca,flags:_0x49ab89,layers:_0x54f2bc,readEnv:_0x3466b7}){const _0x2cf02e=a283_0x51e3,_0x582e0c=_0x54f2bc?.[_0x2cf02e(0xc3)]??{},_0x5d9664=_0x54f2bc?.[_0x2cf02e(0xb9)]??{},_0x3e07e1=!!_0x54f2bc?.['projectPath']||Object[_0x2cf02e(0xc9)](_0x582e0c)[_0x2cf02e(0xb1)]>0x0,_0x385aa7=!_0x3e07e1,_0x6523b1=_0x3e07e1?resolveDefaultAppName(_0x582e0c):undefined,_0x23ae95=_0x385aa7?resolveDefaultAppName(_0x5d9664):undefined,_0x4a25fc=stringConfigValue(_0x49ab89[_0x2cf02e(0xa3)]),_0x4a8731=_0x3466b7('APP'),_0x43d805={};if(_0x53f2ca[_0x2cf02e(0xc4)]&&typeof _0x53f2ca[_0x2cf02e(0xc4)]==='object')for(const [_0x51b5d7,_0x579f5b]of Object[_0x2cf02e(0xa7)](_0x53f2ca[_0x2cf02e(0xc4)])){_0x579f5b&&typeof _0x579f5b===_0x2cf02e(0xb2)&&_0x579f5b[_0x2cf02e(0xab)]&&(_0x43d805[_0x51b5d7]=_0x579f5b);}const _0x42e86d=_0x6523b1||_0x23ae95||resolveDefaultAppName(_0x53f2ca),_0x5bfdb2=Object[_0x2cf02e(0xc9)](_0x43d805)['length']>0x0,_0x46a9dd=_0x4a25fc||_0x6523b1||_0x4a8731||_0x23ae95||_0x42e86d||undefined,_0x4684ff=stringConfigValue(_0x49ab89[_0x2cf02e(0xab)]),_0xd5e004=_0x4684ff?Object[_0x2cf02e(0xa7)](_0x43d805)[_0x2cf02e(0xba)](([,_0x1f1e01])=>_0x1f1e01?.[_0x2cf02e(0xab)]===_0x4684ff):[],_0x32cd34=_0x4a25fc&&_0x43d805[_0x4a25fc]?.[_0x2cf02e(0xab)]===_0x4684ff?[_0x4a25fc,_0x43d805[_0x4a25fc]]:undefined,_0x1819a2=_0x32cd34??(_0xd5e004[_0x2cf02e(0xb1)]===0x1?_0xd5e004[0x0]:undefined),_0x116f36=_0x1819a2?.[0x0],_0x17ebf9=_0x1819a2?.[0x1],_0x5dd611=_0x4684ff?_0x116f36:_0x46a9dd;let _0x370705=_0x5dd611&&_0x43d805[_0x5dd611]?_0x43d805[_0x5dd611]:undefined;_0x4684ff&&_0x17ebf9&&(_0x370705=_0x17ebf9);const _0x3a590e=_0x4684ff?_0x17ebf9??_0x370705:_0x370705,_0x1eaa1e=!_0x4a25fc&&!_0x6523b1&&_0x4a8731&&_0x5dd611===_0x4a8731,_0x4a6f79=_0x4a25fc||(_0x1eaa1e?_0x4a8731:undefined)||(_0x4684ff?_0x116f36:undefined),_0x5de4ef=_0x3a590e?.['appcode'],_0x5225fb=_0x3e07e1?resolveTopLevelAppCode(_0x582e0c):undefined,_0x2fb717=_0x385aa7?resolveTopLevelAppCode(_0x5d9664):undefined,_0x34cea3=_0x4a25fc||_0x6523b1?_0x5de4ef:undefined,_0x5f15e0=!_0x4a25fc&&!_0x6523b1?_0x5de4ef:undefined,_0x324921=_0x4684ff||_0x34cea3||_0x5225fb||_0x5f15e0||_0x2fb717||undefined,_0x4306bc=_0x3e07e1?stringConfigValue(_0x582e0c[_0x2cf02e(0xcd)]):undefined,_0x5157c4=_0x385aa7?stringConfigValue(_0x5d9664['env']):undefined,_0x489eaf=_0x49ab89[_0x2cf02e(0xcd)]||_0x3a590e?.[_0x2cf02e(0xcd)]||_0x4306bc||_0x3466b7(_0x2cf02e(0xc5))||_0x5157c4||_0x53f2ca[_0x2cf02e(0xcd)]||DEFAULT_CONFIG_VALUES['env'],_0x3efb81=_0x3a590e?.[_0x2cf02e(0xbb)]||_0x53f2ca[_0x2cf02e(0xbb)]||DEFAULT_CONFIG_VALUES[_0x2cf02e(0xbb)],_0x98834=_0x3466b7(_0x2cf02e(0xc7))||_0x3a590e?.[_0x2cf02e(0xbc)]||_0x53f2ca[_0x2cf02e(0xbc)]||undefined,_0x112710=_0x3466b7(_0x2cf02e(0xaa))||_0x3a590e?.[_0x2cf02e(0xa9)]||_0x53f2ca[_0x2cf02e(0xa9)]||undefined,_0x16c489=_0x49ab89[_0x2cf02e(0xc8)]||_0x3466b7(_0x2cf02e(0xad))||_0x3a590e?.['format']||_0x53f2ca['format'],_0x2bd98d=normalizeLegacyOutputFormat(_0x16c489),_0x30fb9f=_0x3466b7(_0x2cf02e(0xa6))||_0x3a590e?.[_0x2cf02e(0xa5)]||_0x53f2ca[_0x2cf02e(0xa5)],_0x442f19=_0x30fb9f?Number(_0x30fb9f)||undefined:undefined,_0xf66181=_0x54f2bc?[_0x54f2bc[_0x2cf02e(0xb9)][_0x2cf02e(0xbe)],_0x54f2bc['projectConfig'][_0x2cf02e(0xbe)]]:[_0x53f2ca[_0x2cf02e(0xbe)]],_0x50881e=resolveRiskCeiling(..._0xf66181,_0x3a590e?.[_0x2cf02e(0xbe)]),_0x5b21d1=resolveRiskCeiling(_0x50881e,_0x3466b7('RISK_LEVEL')),_0x988d7=_0x3466b7(_0x2cf02e(0xb5)),_0x383443=_0x988d7==='1'||_0x988d7==='true',_0xdfb32f=_0x3a590e?.[_0x2cf02e(0xac)]||_0x53f2ca[_0x2cf02e(0xac)]||DEFAULT_CONFIG_VALUES[_0x2cf02e(0xac)],_0x3266ef=selectConfiguredRegion({'appRegion':_0x3a590e?.[_0x2cf02e(0xb6)],'projectRegion':_0x3e07e1?_0x582e0c['region']:undefined,'globalRegion':_0x3e07e1||_0x385aa7?_0x5d9664['region']:undefined,'mergedRegion':_0x53f2ca[_0x2cf02e(0xb6)]}),_0x53e2c5=normalizeLovrabetRegion(_0x3266ef['value'])??DEFAULT_LOVRABET_REGION,_0x12b53f=isDaily(normalizeEnv(String(_0x489eaf)))?_0x2cf02e(0xc2):'production';return{'appCode':typeof _0x324921==='string'&&_0x324921[_0x2cf02e(0xb0)]()?_0x324921['trim']():undefined,'region':_0x53e2c5,'regionConfiguredValue':_0x3266ef[_0x2cf02e(0xa4)],'regionSource':_0x3266ef[_0x2cf02e(0xcc)],'env':_0x12b53f,'locale':_0x3efb81,'cookie':_0x98834,'accessKey':_0x112710,'format':_0x2bd98d,'pageSize':_0x442f19,'riskLevel':_0x5b21d1,'verbose':_0x383443,'apiDir':_0xdfb32f,'apps':_0x43d805,'defaultApp':_0x42e86d,'currentApp':_0x5bfdb2?_0x5dd611:undefined,'explicitAppName':_0x4a6f79};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a284_0x3372(_0x48ad08,_0x174a43){_0x48ad08=_0x48ad08-0x8f;const _0x1af68c=a284_0x1af6();let _0x337237=_0x1af68c[_0x48ad08];return _0x337237;}(function(_0x515012,_0x483742){const _0x23b706=a284_0x3372,_0x37aba0=_0x515012();while(!![]){try{const _0x35a631=-parseInt(_0x23b706(0x96))/0x1*(-parseInt(_0x23b706(0x9a))/0x2)+parseInt(_0x23b706(0x95))/0x3+-parseInt(_0x23b706(0x9b))/0x4*(-parseInt(_0x23b706(0x98))/0x5)+parseInt(_0x23b706(0x94))/0x6+-parseInt(_0x23b706(0x92))/0x7+-parseInt(_0x23b706(0x99))/0x8*(-parseInt(_0x23b706(0x91))/0x9)+-parseInt(_0x23b706(0x97))/0xa*(parseInt(_0x23b706(0x90))/0xb);if(_0x35a631===_0x483742)break;else _0x37aba0['push'](_0x37aba0['shift']());}catch(_0x1116fd){_0x37aba0['push'](_0x37aba0['shift']());}}}(a284_0x1af6,0x2e39e));import{getIsSessionValid}from'../auth/is-session-valid.js';function a284_0x1af6(){const _0x2668d7=['326367YWTmNJ','33799TXBYWh','567010skGEwR','5iJilsY','1503016Hbadvd','18cWfsVh','864408gLhXLM','cookie','121LtrBAE','9wcxEsr','119350NEpqdB','../auth/get-cookie.js','78864ZNLKhA'];a284_0x1af6=function(){return _0x2668d7;};return a284_0x1af6();}import{CliErrors}from'../errors.js';export async function buildAuth(_0x509b67){const _0x1f93f9=a284_0x3372,{getCookie:_0x23da5d}=await import(_0x1f93f9(0x93)),_0x547bc6=_0x509b67[_0x1f93f9(0x8f)]||_0x23da5d(),_0x21a380=_0x547bc6?await getIsSessionValid():![];return{'cookie':_0x547bc6,'isLoggedIn':_0x21a380,async 'getOrLogin'(){if(_0x547bc6&&_0x21a380)return _0x547bc6;throw CliErrors['authRequired']();}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a285_0x468b(_0x1b12ac,_0x1c3e8d){_0x1b12ac=_0x1b12ac-0x1e2;const _0x44e44d=a285_0x44e4();let _0x468b32=_0x44e44d[_0x1b12ac];return _0x468b32;}const a285_0x2d38fd=a285_0x468b;(function(_0x21ff09,_0x21d192){const _0x1de854=a285_0x468b,_0xa02d26=_0x21ff09();while(!![]){try{const _0x39bf6f=-parseInt(_0x1de854(0x206))/0x1*(-parseInt(_0x1de854(0x218))/0x2)+parseInt(_0x1de854(0x203))/0x3*(-parseInt(_0x1de854(0x1f9))/0x4)+-parseInt(_0x1de854(0x20d))/0x5*(-parseInt(_0x1de854(0x1f2))/0x6)+-parseInt(_0x1de854(0x1e2))/0x7+-parseInt(_0x1de854(0x1fe))/0x8*(-parseInt(_0x1de854(0x1fd))/0x9)+parseInt(_0x1de854(0x1ff))/0xa*(parseInt(_0x1de854(0x211))/0xb)+-parseInt(_0x1de854(0x20e))/0xc*(parseInt(_0x1de854(0x215))/0xd);if(_0x39bf6f===_0x21d192)break;else _0xa02d26['push'](_0xa02d26['shift']());}catch(_0x3578d8){_0xa02d26['push'](_0xa02d26['shift']());}}}(a285_0x44e4,0x97f6e));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(_0x252b87){for(const _0x58a441 of CONFIG_NAMES){const _0x3fca01=resolve(_0x252b87,_0x58a441);if(existsSync(_0x3fca01))return _0x3fca01;}return undefined;}function a285_0x44e4(){const _0x4095e6=['runtimeDomain','project','keys','length','4vSzdvT','config','empty','inherit','2029419fnnuNh','16SCypoC','10QRaZRk','utf8','kbServiceDomain','kbDomain','69753hZbONx','object','status','326301RYeUDb','locale','message','certificateDomain','set','accessKey','migrated','65eptBNv','70932csEwaF','apiDir','localDomain','5431118bxsAqD','parse','format','routing','1651gddtWv','apps','skillDomain','2rdyryr','riskLevel','1785868TAmCSa','appDomain','string','env','app','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','pageSize','appcode','stringify','warn','Global','error','missing','cookie','defaultApp','silent','175614cPwjYt','Project','get'];a285_0x44e4=function(){return _0x4095e6;};return a285_0x44e4();}export function findProjectRootDirectory(_0x897435=process['cwd']()){let _0xb5e339=resolve(_0x897435);const {root:_0x19d3a2}=parse(_0xb5e339),_0x432a0f=homedir();while(!![]){if(resolveConfigPath(_0xb5e339)){if(_0xb5e339===_0x432a0f)break;return _0xb5e339;}if(_0xb5e339===_0x19d3a2||_0xb5e339===_0x432a0f)break;const _0x5e59dd=dirname(_0xb5e339);if(_0x5e59dd===_0xb5e339)break;_0xb5e339=_0x5e59dd;}return resolve(_0x897435);}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x2336ce){const _0x48f540=a285_0x468b;if(!existsSync(_0x2336ce))return{'status':_0x48f540(0x1ee)};try{const _0xdda51b=readFileSync(_0x2336ce,{'encoding':_0x48f540(0x200)});if(!_0xdda51b?.['trim']())return{'status':_0x48f540(0x1fb)};const _0xe847e9=JSON[_0x48f540(0x212)](_0xdda51b);return{'status':'ok','data':_0xe847e9};}catch(_0x2be1c2){return{'status':_0x48f540(0x1ed),'message':_0x2be1c2 instanceof Error?_0x2be1c2[_0x48f540(0x208)]:String(_0x2be1c2)};}}function parseCliConfigJsonFile(_0x2aaf91,_0x2e5114,_0x260419){const _0x3d00e2=a285_0x468b,_0x12c07e=inspectCliConfigJsonFile(_0x2aaf91);if(_0x12c07e[_0x3d00e2(0x205)]===_0x3d00e2(0x1ee)||_0x12c07e[_0x3d00e2(0x205)]===_0x3d00e2(0x1fb))return{};if(_0x12c07e[_0x3d00e2(0x205)]==='ok')return _0x12c07e['data'];return _0x2e5114==='warn'&&_0x260419&&console[_0x3d00e2(0x1ed)](CLI_BIN_NAME+':\x20'+_0x260419+_0x3d00e2(0x1e7)+_0x2aaf91+'\x0a\x20\x20'+_0x12c07e[_0x3d00e2(0x208)]),{};}function normalizeLegacyConfigShape(_0x17f679){const _0x5b7f53=a285_0x468b;if(!_0x17f679||typeof _0x17f679!==_0x5b7f53(0x204))return{'config':{},'migrated':![]};const _0x2f5e86={..._0x17f679},_0x2565bf=_0x2f5e86[_0x5b7f53(0x216)]&&typeof _0x2f5e86[_0x5b7f53(0x216)]===_0x5b7f53(0x204)?{..._0x2f5e86[_0x5b7f53(0x216)]}:{},_0x532701=Object[_0x5b7f53(0x1f7)](_0x2565bf)[_0x5b7f53(0x1f8)],_0x4d4c89=_0x2f5e86['appcode']||_0x2f5e86['app'];let _0x2e0ad6=![];if(_0x4d4c89&&_0x532701===0x0){const _0x538876=typeof _0x2f5e86[_0x5b7f53(0x1f0)]===_0x5b7f53(0x1e4)&&_0x2f5e86[_0x5b7f53(0x1f0)]['trim']()?_0x2f5e86['defaultApp']:String(_0x4d4c89)['trim']();_0x2565bf[_0x538876]={'appcode':String(_0x4d4c89)['trim'](),..._0x2f5e86[_0x5b7f53(0x1e5)]!=null?{'env':_0x2f5e86['env']}:{},..._0x2f5e86[_0x5b7f53(0x20f)]!=null?{'apiDir':_0x2f5e86[_0x5b7f53(0x20f)]}:{},..._0x2f5e86[_0x5b7f53(0x1ef)]!=null?{'cookie':_0x2f5e86['cookie']}:{},..._0x2f5e86[_0x5b7f53(0x20b)]!=null?{'accessKey':_0x2f5e86[_0x5b7f53(0x20b)]}:{},..._0x2f5e86[_0x5b7f53(0x213)]!=null?{'format':_0x2f5e86[_0x5b7f53(0x213)]}:{},..._0x2f5e86[_0x5b7f53(0x1e8)]!=null?{'pageSize':_0x2f5e86['pageSize']}:{},..._0x2f5e86[_0x5b7f53(0x219)]!=null?{'riskLevel':_0x2f5e86[_0x5b7f53(0x219)]}:{},..._0x2f5e86[_0x5b7f53(0x207)]!=null?{'locale':_0x2f5e86[_0x5b7f53(0x207)]}:{}},_0x2f5e86['apps']=_0x2565bf,delete _0x2f5e86['defaultApp'],_0x2e0ad6=!![];}return(_0x5b7f53(0x1e9)in _0x2f5e86||'app'in _0x2f5e86)&&(delete _0x2f5e86[_0x5b7f53(0x1e9)],delete _0x2f5e86[_0x5b7f53(0x1e6)],_0x2e0ad6=!![]),{'config':_0x2f5e86,'migrated':_0x2e0ad6};}function writeNormalizedConfigIfNeeded(_0x36d692,_0x45c0dd){const _0x56b13c=a285_0x468b,_0x13ebf1=JSON[_0x56b13c(0x1ea)](normalizeConfigForWrite(_0x45c0dd),null,0x2)+'\x0a';if(normalizedWriteCache[_0x56b13c(0x1f4)](_0x36d692)===_0x13ebf1)return;writeConfigFile(_0x36d692,_0x45c0dd),normalizedWriteCache[_0x56b13c(0x20a)](_0x36d692,_0x13ebf1);}function parseAndNormalizeConfig(_0x56ac53,_0x5f4d02,_0x3934a9){const _0x408a59=a285_0x468b,_0x5de2d1=parseCliConfigJsonFile(_0x56ac53,_0x5f4d02,_0x3934a9),_0x513fa6=normalizeLegacyConfigShape(_0x5de2d1);if(_0x513fa6[_0x408a59(0x20c)])try{writeNormalizedConfigIfNeeded(_0x56ac53,_0x513fa6['config']);}catch{}return _0x513fa6[_0x408a59(0x1fa)];}export function loadRawConfigLayers(_0x38d63f){const _0x2b5ccd=a285_0x468b;let _0x32e53d={},_0x3141be={};const _0x5681c1=resolveConfigPath(homedir());_0x5681c1&&(_0x32e53d=parseAndNormalizeConfig(_0x5681c1,_0x2b5ccd(0x1eb),_0x2b5ccd(0x1ec)));const _0x563335=_0x38d63f??findProjectRootDirectory(),_0x265b04=resolveConfigPath(_0x563335);return _0x265b04&&(_0x3141be=parseAndNormalizeConfig(_0x265b04,_0x2b5ccd(0x1eb),_0x2b5ccd(0x1f3))),{'globalPath':_0x5681c1,'projectPath':_0x265b04,'globalConfig':_0x32e53d,'projectConfig':_0x3141be};}const INHERIT_WHITELIST=[a285_0x2d38fd(0x1ef),'accessKey',a285_0x2d38fd(0x207),a285_0x2d38fd(0x213),'riskLevel',a285_0x2d38fd(0x1e8),'region',a285_0x2d38fd(0x214),'userDomain','apiDomain',a285_0x2d38fd(0x1f5),a285_0x2d38fd(0x217),a285_0x2d38fd(0x202),a285_0x2d38fd(0x201),a285_0x2d38fd(0x1e3),a285_0x2d38fd(0x210),a285_0x2d38fd(0x209)];export function mergeRawConfigLayers(_0x254d59){const _0xc52b11=a285_0x2d38fd,{globalConfig:_0x11e3ce,projectConfig:_0x149b78}=_0x254d59,_0x2394b3=!!_0x254d59['projectPath']||Object[_0xc52b11(0x1f7)](_0x149b78)[_0xc52b11(0x1f8)]>0x0;if(!_0x2394b3)return mergeGlobalOnly(_0x11e3ce);return mergeProjectFirst(_0x11e3ce,_0x149b78);}function mergeGlobalOnly(_0x1c4eba){const _0x44fcad=a285_0x2d38fd,_0x12139e={..._0x1c4eba};delete _0x12139e['inherit'];const _0x49983a=_0x1c4eba[_0x44fcad(0x216)]&&typeof _0x1c4eba[_0x44fcad(0x216)]===_0x44fcad(0x204)?_0x1c4eba['apps']:{};if(Object[_0x44fcad(0x1f7)](_0x49983a)[_0x44fcad(0x1f8)]>0x0)_0x12139e[_0x44fcad(0x216)]=_0x49983a;if(_0x1c4eba[_0x44fcad(0x1f0)])_0x12139e[_0x44fcad(0x1f0)]=_0x1c4eba[_0x44fcad(0x1f0)];return _0x12139e;}function mergeProjectFirst(_0x1ccd37,_0x40add1){const _0x160c9b=a285_0x2d38fd,_0x5db36e={..._0x40add1};delete _0x5db36e[_0x160c9b(0x1fc)];for(const _0x1e3604 of INHERIT_WHITELIST){!(_0x1e3604 in _0x5db36e)&&_0x1e3604 in _0x1ccd37&&(_0x5db36e[_0x1e3604]=_0x1ccd37[_0x1e3604]);}const _0xec590b=_0x40add1[_0x160c9b(0x216)]&&typeof _0x40add1['apps']===_0x160c9b(0x204)?_0x40add1['apps']:{};return Object[_0x160c9b(0x1f7)](_0xec590b)[_0x160c9b(0x1f8)]>0x0?_0x5db36e['apps']=_0xec590b:delete _0x5db36e[_0x160c9b(0x216)],'defaultApp'in _0x40add1?_0x5db36e['defaultApp']=_0x40add1[_0x160c9b(0x1f0)]:delete _0x5db36e[_0x160c9b(0x1f0)],_0x5db36e;}export function readRawConfigWithLayers(_0x3739b0){const _0x5171be=loadRawConfigLayers(_0x3739b0);return{'config':mergeRawConfigLayers(_0x5171be),'layers':_0x5171be};}export function readRawConfig(_0x429a9a){return mergeRawConfigLayers(loadRawConfigLayers(_0x429a9a));}export function readConfigFile(_0x3e40a7){const _0xedf196=a285_0x2d38fd;return parseAndNormalizeConfig(_0x3e40a7,_0xedf196(0x1f1));}export function writeConfigFile(_0x24a873,_0x55a348){const _0x26c1ee=a285_0x2d38fd,_0x5ac76d=dirname(_0x24a873);!existsSync(_0x5ac76d)&&mkdirSync(_0x5ac76d,{'recursive':!![]});const _0x1429ec=_0x24a873+'.tmp';try{const _0x3c5f6d=normalizeConfigForWrite(_0x55a348);writeFileSync(_0x1429ec,JSON['stringify'](_0x3c5f6d,null,0x2)+'\x0a',{'encoding':_0x26c1ee(0x200),'mode':0x180}),renameSync(_0x1429ec,_0x24a873);}catch(_0x14ab70){try{unlinkSync(_0x1429ec);}catch{}throw _0x14ab70;}}export function resolveWriteConfigPath(_0x302b02){const _0x494249=a285_0x2d38fd,_0x112698=_0x302b02===_0x494249(0x1f6)?process['cwd']():homedir(),_0x1f25c4=resolveConfigPath(_0x112698);return _0x1f25c4??resolve(_0x112698,NEW_CONFIG_NAME);}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a286_0x105408=a286_0x4c26;(function(_0x5aea62,_0x553b1c){const _0x48ee18=a286_0x4c26,_0x5917a5=_0x5aea62();while(!![]){try{const _0x564fd6=-parseInt(_0x48ee18(0x1c2))/0x1+-parseInt(_0x48ee18(0x1a8))/0x2+-parseInt(_0x48ee18(0x1aa))/0x3*(parseInt(_0x48ee18(0x1bc))/0x4)+-parseInt(_0x48ee18(0x1c6))/0x5+parseInt(_0x48ee18(0x1a1))/0x6*(-parseInt(_0x48ee18(0x19b))/0x7)+-parseInt(_0x48ee18(0x1de))/0x8*(parseInt(_0x48ee18(0x1b4))/0x9)+parseInt(_0x48ee18(0x1d2))/0xa*(parseInt(_0x48ee18(0x1c7))/0xb);if(_0x564fd6===_0x553b1c)break;else _0x5917a5['push'](_0x5917a5['shift']());}catch(_0x1838df){_0x5917a5['push'](_0x5917a5['shift']());}}}(a286_0x4498,0xdd020));import{CLI_BIN_NAME}from'./constant/cli.js';function a286_0x4498(){const _0x4c8c7a=['trim','hasOwnProperty','some','app\x20profile\x20\x22','daily','projectConfig','337400JoMocS','merged','currentApp','global\x20Rabetbase\x20configuration','userDomain','apps','object','setRawCommand','template_base_url','project','apiDomain','map','1907520Qdlavd','source','1357972GeiGKc','cdn','keys','defaultApp','appDomain','kbServiceDomain','24Dytjvy','raw','./constant/domain.js','./utils/is-non-interactive.js','regionLocation','certificateDomain','apiGroup','676564wMOuhJ','config','4404489HevLvg','agentDomain','length','regionSource','string','./constant/env.js','global','project\x20Rabetbase\x20configuration','apiDir','globalConfig','54QwzIrg','localDomain','appcode','prototype','region','https://g.lovrabet.com/dist/lovrabet-skill','runtimeDomain','routingConfig','4eXjnLu','filter','call','cookie','platformDomain','domains','387694huJcob','kbDomain','env','skillDomain','1305445pbvmsa','1815esrHmv','skillHubDomain','values','join','production'];a286_0x4498=function(){return _0x4c8c7a;};return a286_0x4498();}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';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(_0x2f7575){return process.env[`RABETBASE_${_0x2f7575}`]||process.env[`LOVRABET_${_0x2f7575}`]||undefined;}function optionalString(_0x13f6d9){const _0x4cd81d=a286_0x4c26;return typeof _0x13f6d9===_0x4cd81d(0x1ae)&&_0x13f6d9[_0x4cd81d(0x1cc)]()?_0x13f6d9['trim']():undefined;}export function isRoutingRecoveryService(_0x26d1d0){const _0xd326ee=a286_0x4c26;return _0x26d1d0===_0xd326ee(0x1a9)||_0x26d1d0==='doctor';}export async function createContext(_0x2bc18d){const _0xb46ec6=a286_0x4c26,{config:_0x3ffc2c,layers:_0xadd7eb}=readRawConfigWithLayers(),_0x2050a1=buildConfig(_0x3ffc2c,_0x2bc18d,_0xadd7eb);await initGlobalEnvironment(_0x2050a1);const {getUserDomain:_0x39485e,getApiDomain:_0x52ba64}=await import('./constant/domain.js'),_0x3f7a00={'apiDomain':_0x52ba64(),'userDomain':_0x39485e()},_0x2f57f0=await buildAuth(_0x2050a1);logger['setLogPath'](process['cwd']());const _0x1c0798=(CLI_BIN_NAME+'\x20'+process['argv']['slice'](0x2)[_0xb46ec6(0x1ca)]('\x20'))[_0xb46ec6(0x1cc)]();logger[_0xb46ec6(0x1d9)](_0x1c0798);const {isNonInteractive:_0x360ccb}=await import(_0xb46ec6(0x1a4)),_0xf22a0b=_0x360ccb(_0x2bc18d);return{'config':_0x2050a1,'auth':_0x2f57f0,'logger':logger,'env':_0x3f7a00,'nonInteractive':_0xf22a0b};}export function buildConfigFromFlags(_0x79200f){const {config:_0x47f8ef,layers:_0x2b2cbb}=readRawConfigWithLayers();return buildConfig(_0x47f8ef,_0x79200f,_0x2b2cbb);}export async function initGlobalEnvironment(_0xb52211){const _0x59133f=a286_0x4c26,_0x3930ee=_0xb52211['regionSource']==='app'&&_0xb52211[_0x59133f(0x1d4)]?_0x59133f(0x1cf)+_0xb52211['currentApp']+'\x22':_0xb52211[_0x59133f(0x1ad)]==='project'?_0x59133f(0x1b1):_0xb52211[_0x59133f(0x1ad)]===_0x59133f(0x1b0)?_0x59133f(0x1d5):'Rabetbase\x20configuration';await initConfiguredEnvironment({'raw':_0xb52211['raw'],'configuredRegion':_0xb52211['regionConfiguredValue']??_0xb52211[_0x59133f(0x1a2)]?.[_0x59133f(0x1b8)]??_0xb52211[_0x59133f(0x1b8)],'regionLocation':_0x3930ee,'targetEnv':_0xb52211['env']});}async function initConfiguredEnvironment(_0x17740d){const _0x374f1a=a286_0x4c26,_0x5a636e=resolveConfiguredRegion(_0x17740d['configuredRegion'],_0x17740d[_0x374f1a(0x1a5)]),_0x3fcea9=resolveEnterpriseRoutingManifest(_0x17740d['raw']?.['routing']),_0x4b821f={'region':_0x5a636e,'apiDomain':_0x3fcea9?_0x3fcea9[_0x374f1a(0x1c1)][_0x374f1a(0x1dc)]:optionalString(_0x17740d[_0x374f1a(0x1a2)]?.[_0x374f1a(0x1dc)]),'userDomain':_0x3fcea9?_0x3fcea9['domains']['userDomain']:optionalString(_0x17740d[_0x374f1a(0x1a2)]?.[_0x374f1a(0x1d6)]),'runtimeDomain':_0x3fcea9?_0x3fcea9[_0x374f1a(0x1c1)][_0x374f1a(0x1ba)]:optionalString(_0x17740d['raw']?.['runtimeDomain']),'skillDomain':_0x3fcea9?_0x3fcea9['domains'][_0x374f1a(0x1c5)]:optionalString(_0x17740d[_0x374f1a(0x1a2)]?.['skillDomain'])||optionalString(_0x17740d[_0x374f1a(0x1a2)]?.[_0x374f1a(0x1c8)])||optionalString(_0x17740d[_0x374f1a(0x1a2)]?.[_0x374f1a(0x1ab)])||optionalString(_0x17740d[_0x374f1a(0x1a2)]?.[_0x374f1a(0x1c0)]),'kbDomain':_0x3fcea9?_0x3fcea9[_0x374f1a(0x1c1)][_0x374f1a(0x1c3)]:optionalString(_0x17740d[_0x374f1a(0x1a2)]?.[_0x374f1a(0x1c3)])||optionalString(_0x17740d[_0x374f1a(0x1a2)]?.['agentDomain'])||optionalString(_0x17740d[_0x374f1a(0x1a2)]?.[_0x374f1a(0x1c0)]),'kbServiceDomain':_0x3fcea9?_0x3fcea9[_0x374f1a(0x1c1)][_0x374f1a(0x1a0)]:optionalString(_0x17740d[_0x374f1a(0x1a2)]?.['kbServiceDomain']),'appDomain':_0x3fcea9?_0x3fcea9[_0x374f1a(0x1c1)][_0x374f1a(0x19f)]:optionalString(_0x17740d[_0x374f1a(0x1a2)]?.[_0x374f1a(0x19f)]),'localDomain':_0x3fcea9?_0x3fcea9[_0x374f1a(0x1c1)][_0x374f1a(0x1b5)]:optionalString(_0x17740d['raw']?.[_0x374f1a(0x1b5)]),'certificateDomain':_0x3fcea9?_0x3fcea9[_0x374f1a(0x1c1)][_0x374f1a(0x1a6)]:optionalString(_0x17740d[_0x374f1a(0x1a2)]?.[_0x374f1a(0x1a6)]),'cdn':_0x3fcea9?.[_0x374f1a(0x19c)],'allowOfficialKbServiceDefault':!(_0x3fcea9!==undefined||[_0x374f1a(0x1dc),'userDomain',_0x374f1a(0x1ba),_0x374f1a(0x1c5),_0x374f1a(0x1c8),'kbDomain',_0x374f1a(0x1a0),'agentDomain',_0x374f1a(0x1c0),_0x374f1a(0x19f),_0x374f1a(0x1b5),_0x374f1a(0x1a6)][_0x374f1a(0x1ce)](_0x2be3a0=>Object[_0x374f1a(0x1b7)]['hasOwnProperty'][_0x374f1a(0x1be)](_0x17740d[_0x374f1a(0x1a2)]??{},_0x2be3a0)))},{initEnv:_0x3cb64a}=await import(_0x374f1a(0x1af)),{initDomains:_0x62ee30}=await import(_0x374f1a(0x1a3));_0x3cb64a(_0x17740d['targetEnv']),_0x62ee30(_0x4b821f);}export async function initMultiAppEnvironment(_0x4692e2){const _0x1f1ec3=a286_0x4c26;await initConfiguredEnvironment({'raw':_0x4692e2[_0x1f1ec3(0x1bb)],'configuredRegion':_0x4692e2[_0x1f1ec3(0x1b8)],'regionLocation':'app\x20profile\x20\x22'+_0x4692e2['name']+'\x22','targetEnv':_0x4692e2[_0x1f1ec3(0x1c4)]===_0x1f1ec3(0x1d0)?'daily':_0x1f1ec3(0x1cb)});}function a286_0x4c26(_0x5cb52f,_0x3ed8d9){_0x5cb52f=_0x5cb52f-0x19a;const _0x449879=a286_0x4498();let _0x4c2612=_0x449879[_0x5cb52f];return _0x4c2612;}export function getConfigAppCode(_0x4f8d77){const _0x5dd443=a286_0x4c26,_0x120622=readRawConfig(_0x4f8d77);if(_0x120622[_0x5dd443(0x1d7)]&&typeof _0x120622['apps']==='object'){const _0x42764f=_0x120622['defaultApp'];if(_0x42764f)return _0x120622['apps'][_0x42764f]?.[_0x5dd443(0x1b6)]?String(_0x120622[_0x5dd443(0x1d7)][_0x42764f]['appcode'])['trim']():undefined;const _0x4c346f=Object[_0x5dd443(0x1c9)](_0x120622[_0x5dd443(0x1d7)]);if(_0x4c346f[_0x5dd443(0x1ac)]===0x1&&_0x4c346f[0x0]?.[_0x5dd443(0x1b6)])return String(_0x4c346f[0x0][_0x5dd443(0x1b6)])['trim']();}const _0x1ff509=_0x120622[_0x5dd443(0x1b6)]||_0x120622['app'];if(typeof _0x1ff509!==_0x5dd443(0x1ae)||_0x1ff509['trim']()==='')return undefined;return _0x1ff509[_0x5dd443(0x1cc)]();}const CONNECTION_ROUTING_KEYS=['routing',a286_0x105408(0x1dc),'userDomain','runtimeDomain',a286_0x105408(0x1c5),a286_0x105408(0x1c8),a286_0x105408(0x1c3),'kbServiceDomain','agentDomain','platformDomain','appDomain',a286_0x105408(0x1b5),a286_0x105408(0x1a6)];function withAppProfileRouting(_0xec9f5a,_0x1b129a){const _0x4fdff3=a286_0x105408;if(!_0x1b129a||_0x1b129a[_0x4fdff3(0x1a0)]===undefined)return _0xec9f5a;return{..._0xec9f5a,'kbServiceDomain':_0x1b129a[_0x4fdff3(0x1a0)]};}function pickConnectionRoutingConfig(_0x2cff78,_0x33d7d4){const _0x248365={'region':_0x33d7d4};for(const _0x109935 of CONNECTION_ROUTING_KEYS){if(_0x2cff78[_0x109935]!==undefined)_0x248365[_0x109935]=_0x2cff78[_0x109935];}return _0x248365;}export function getMultiAppConfigs(_0x23e88b=a286_0x105408(0x1db),_0x22fe3e){const _0x9332cc=a286_0x105408,_0x240cb8=loadRawConfigLayers(_0x22fe3e);let _0x41f49a,_0x310abd;const _0x4a9c3b=mergeRawConfigLayers(_0x240cb8),_0x36f9ca=_0x240cb8[_0x9332cc(0x1b3)][_0x9332cc(0x1d7)]&&typeof _0x240cb8[_0x9332cc(0x1b3)][_0x9332cc(0x1d7)]==='object'?_0x240cb8[_0x9332cc(0x1b3)]['apps']:{},_0x8f8ae8=_0x240cb8[_0x9332cc(0x1d1)]['apps']&&typeof _0x240cb8['projectConfig']['apps']===_0x9332cc(0x1d8)?_0x240cb8[_0x9332cc(0x1d1)]['apps']:{};_0x23e88b===_0x9332cc(0x1d3)?(_0x41f49a={..._0x36f9ca,..._0x8f8ae8},_0x310abd=_0x4a9c3b[_0x9332cc(0x19e)]):(_0x41f49a=_0x240cb8[_0x9332cc(0x1d1)][_0x9332cc(0x1d7)],_0x310abd=_0x240cb8[_0x9332cc(0x1d1)][_0x9332cc(0x19e)]);!_0x310abd&&_0x41f49a&&typeof _0x41f49a===_0x9332cc(0x1d8)&&Object['keys'](_0x41f49a)['length']===0x1&&(_0x310abd=Object[_0x9332cc(0x19d)](_0x41f49a)[0x0]);if(!_0x41f49a||typeof _0x41f49a!==_0x9332cc(0x1d8)||Object[_0x9332cc(0x19d)](_0x41f49a)[_0x9332cc(0x1ac)]===0x0)return null;return Object['entries'](_0x41f49a)[_0x9332cc(0x1dd)](([_0x572ba1,_0x5832e9])=>{const _0x229985=_0x9332cc,_0x4991b8=_0x23e88b===_0x229985(0x1db)||Object[_0x229985(0x1b7)][_0x229985(0x1cd)]['call'](_0x8f8ae8,_0x572ba1),_0x13e544=withAppProfileRouting(_0x4991b8?_0x4a9c3b:_0x240cb8[_0x229985(0x1b3)],_0x5832e9),_0x1a4e76=resolveEffectiveRegion({'appRegion':_0x5832e9?.['region'],'projectRegion':_0x4991b8?_0x240cb8[_0x229985(0x1d1)][_0x229985(0x1b8)]:undefined,'globalRegion':_0x240cb8[_0x229985(0x1b3)][_0x229985(0x1b8)],'mergedRegion':_0x13e544[_0x229985(0x1b8)],'appName':_0x572ba1});return{'name':_0x572ba1,'appcode':_0x5832e9?.[_0x229985(0x1b6)]||'','apiGroup':optionalString(_0x5832e9?.[_0x229985(0x1a7)]),'isDefault':_0x572ba1===_0x310abd,'region':_0x1a4e76[_0x229985(0x1b8)],'regionSource':_0x1a4e76[_0x229985(0x19a)],'env':_0x5832e9?.[_0x229985(0x1c4)],'apiDir':optionalString(_0x5832e9?.['apiDir'])||optionalString(_0x13e544[_0x229985(0x1b2)]),'cookie':_0x5832e9?.[_0x229985(0x1bf)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0x13e544,_0x1a4e76['region'])};})[_0x9332cc(0x1bd)](_0x165975=>_0x165975['appcode']);}export function getTemplateBaseUrl(_0x372393){const _0x35cc67=a286_0x105408,_0x424251=readRawConfig(_0x372393);if(_0x424251['template_base_url']&&typeof _0x424251[_0x35cc67(0x1da)]===_0x35cc67(0x1ae))return _0x424251['template_base_url']['replace'](/\/$/,'');return _0x35cc67(0x1b9);}function buildConfig(_0x8882d8,_0x21b65a,_0xa3be55){const _0x7fb1ca=a286_0x105408,_0x3060ce=resolveAppConfig({'raw':_0x8882d8,'flags':_0x21b65a,'layers':_0xa3be55,'readEnv':env}),_0x2eb779=_0x3060ce[_0x7fb1ca(0x1d4)]?_0x3060ce[_0x7fb1ca(0x1d7)][_0x3060ce[_0x7fb1ca(0x1d4)]]:undefined;return{..._0x3060ce,'raw':withAppProfileRouting(_0x8882d8,_0x2eb779)};}export function resolveApiFilePath(_0x39283f,_0x4b1240,_0xcce24c){return resolveApiModelSource(_0x39283f,_0x4b1240,_0xcce24c)['filePath'];}
|
|
1
|
+
const a286_0x34879f=a286_0x219b;(function(_0x54e396,_0x3fa354){const _0x9d1494=a286_0x219b,_0x5779a5=_0x54e396();while(!![]){try{const _0x238207=parseInt(_0x9d1494(0x1f3))/0x1*(-parseInt(_0x9d1494(0x1ed))/0x2)+parseInt(_0x9d1494(0x206))/0x3*(-parseInt(_0x9d1494(0x227))/0x4)+parseInt(_0x9d1494(0x224))/0x5*(parseInt(_0x9d1494(0x205))/0x6)+parseInt(_0x9d1494(0x229))/0x7*(-parseInt(_0x9d1494(0x21a))/0x8)+-parseInt(_0x9d1494(0x22a))/0x9*(parseInt(_0x9d1494(0x1fc))/0xa)+parseInt(_0x9d1494(0x204))/0xb+-parseInt(_0x9d1494(0x1f4))/0xc*(-parseInt(_0x9d1494(0x1e3))/0xd);if(_0x238207===_0x3fa354)break;else _0x5779a5['push'](_0x5779a5['shift']());}catch(_0x431d41){_0x5779a5['push'](_0x5779a5['shift']());}}}(a286_0x10b7,0x1efbf));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{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(_0x8ef37e){return process.env[`RABETBASE_${_0x8ef37e}`]||process.env[`LOVRABET_${_0x8ef37e}`]||undefined;}function optionalString(_0x4ee163){const _0x5ed9e5=a286_0x219b;return typeof _0x4ee163===_0x5ed9e5(0x1e6)&&_0x4ee163[_0x5ed9e5(0x1e0)]()?_0x4ee163['trim']():undefined;}export function isRoutingRecoveryService(_0x589b29){const _0x16436c=a286_0x219b;return _0x589b29===_0x16436c(0x213)||_0x589b29===_0x16436c(0x222);}export async function createContext(_0x491a79){const _0x3082d3=a286_0x219b,{config:_0x4d9a98,layers:_0x5b89e0}=readRawConfigWithLayers(),_0x2f6f3b=buildConfig(_0x4d9a98,_0x491a79,_0x5b89e0);await initGlobalEnvironment(_0x2f6f3b);const {getUserDomain:_0x5b6d68,getApiDomain:_0x2c76d1}=await import('./constant/domain.js'),_0x526482={'apiDomain':_0x2c76d1(),'userDomain':_0x5b6d68()},_0x546b0e=await buildAuth(_0x2f6f3b);logger['setLogPath'](process[_0x3082d3(0x1f2)]());const _0x53a73d=(CLI_BIN_NAME+'\x20'+process[_0x3082d3(0x20e)][_0x3082d3(0x1f6)](0x2)[_0x3082d3(0x22b)]('\x20'))[_0x3082d3(0x1e0)]();logger[_0x3082d3(0x1e4)](_0x53a73d);const {isNonInteractive:_0x4d2df4}=await import(_0x3082d3(0x21c)),_0x141b94=_0x4d2df4(_0x491a79);return{'config':_0x2f6f3b,'auth':_0x546b0e,'logger':logger,'env':_0x526482,'nonInteractive':_0x141b94};}export function buildConfigFromFlags(_0x2902f8){const {config:_0x1d2365,layers:_0x5ce039}=readRawConfigWithLayers();return buildConfig(_0x1d2365,_0x2902f8,_0x5ce039);}export async function initGlobalEnvironment(_0x3a3239){const _0x2edaec=a286_0x219b,_0x453144=_0x3a3239[_0x2edaec(0x215)]==='app'&&_0x3a3239[_0x2edaec(0x1e5)]?_0x2edaec(0x216)+_0x3a3239[_0x2edaec(0x1e5)]+'\x22':_0x3a3239[_0x2edaec(0x215)]===_0x2edaec(0x1ff)?_0x2edaec(0x1eb):_0x3a3239[_0x2edaec(0x215)]===_0x2edaec(0x1f9)?_0x2edaec(0x217):_0x2edaec(0x1e7);await initConfiguredEnvironment({'raw':_0x3a3239[_0x2edaec(0x1fb)],'configuredRegion':_0x3a3239[_0x2edaec(0x223)]??_0x3a3239[_0x2edaec(0x1fb)]?.[_0x2edaec(0x1e1)]??_0x3a3239[_0x2edaec(0x1e1)],'regionLocation':_0x453144,'targetEnv':_0x3a3239[_0x2edaec(0x1e8)]});}function a286_0x10b7(){const _0x3330a8=['routingConfig','agentDomain','project','appDomain','defaultApp','template_base_url','production','1861145ZHnymT','22938XLlXwO','75SGsgCi','keys','skillHubDomain','hasOwnProperty','./constant/domain.js','merged','app','regionLocation','argv','certificateDomain','cdn','runtimeDomain','kbDomain','config','map','regionSource','app\x20profile\x20\x22','global\x20Rabetbase\x20configuration','platformDomain','globalConfig','1529648VAuHdF','name','./utils/is-non-interactive.js','prototype','source','values','object','filePath','doctor','regionConfiguredValue','305ARptRy','skillDomain','apps','7484dqVufx','domains','7zNAWSq','1030284kjyoWc','join','projectConfig','filter','trim','region','localDomain','1079bEXrEs','setRawCommand','currentApp','string','Rabetbase\x20configuration','env','cookie','routing','project\x20Rabetbase\x20configuration','appcode','23612AXmemi','daily','configuredRegion','length','userDomain','cwd','11DknPRf','29904roPRtF','call','slice','apiDomain','apiDir','global','kbServiceDomain','raw','10ryVGqb'];a286_0x10b7=function(){return _0x3330a8;};return a286_0x10b7();}async function initConfiguredEnvironment(_0x1adbd4){const _0x1e92df=a286_0x219b,_0x43377f=resolveConfiguredRegion(_0x1adbd4[_0x1e92df(0x1ef)],_0x1adbd4[_0x1e92df(0x20d)]),_0x43ef67=resolveEnterpriseRoutingManifest(_0x1adbd4[_0x1e92df(0x1fb)]?.[_0x1e92df(0x1ea)]),_0x3fe6c7={'region':_0x43377f,'apiDomain':_0x43ef67?_0x43ef67['domains'][_0x1e92df(0x1f7)]:optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.[_0x1e92df(0x1f7)]),'userDomain':_0x43ef67?_0x43ef67[_0x1e92df(0x228)][_0x1e92df(0x1f1)]:optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.[_0x1e92df(0x1f1)]),'runtimeDomain':_0x43ef67?_0x43ef67['domains'][_0x1e92df(0x211)]:optionalString(_0x1adbd4['raw']?.[_0x1e92df(0x211)]),'skillDomain':_0x43ef67?_0x43ef67[_0x1e92df(0x228)][_0x1e92df(0x225)]:optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.[_0x1e92df(0x225)])||optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.['skillHubDomain'])||optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.[_0x1e92df(0x1fe)])||optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.['platformDomain']),'kbDomain':_0x43ef67?_0x43ef67[_0x1e92df(0x228)]['kbDomain']:optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.[_0x1e92df(0x212)])||optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.[_0x1e92df(0x1fe)])||optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.[_0x1e92df(0x218)]),'kbServiceDomain':_0x43ef67?_0x43ef67['domains'][_0x1e92df(0x1fa)]:optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.['kbServiceDomain']),'appDomain':_0x43ef67?_0x43ef67[_0x1e92df(0x228)][_0x1e92df(0x200)]:optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.['appDomain']),'localDomain':_0x43ef67?_0x43ef67[_0x1e92df(0x228)][_0x1e92df(0x1e2)]:optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.[_0x1e92df(0x1e2)]),'certificateDomain':_0x43ef67?_0x43ef67[_0x1e92df(0x228)]['certificateDomain']:optionalString(_0x1adbd4[_0x1e92df(0x1fb)]?.[_0x1e92df(0x20f)]),'cdn':_0x43ef67?.[_0x1e92df(0x210)],'allowOfficialKbServiceDefault':!(_0x43ef67!==undefined||[_0x1e92df(0x1f7),_0x1e92df(0x1f1),_0x1e92df(0x211),'skillDomain',_0x1e92df(0x208),_0x1e92df(0x212),_0x1e92df(0x1fa),'agentDomain',_0x1e92df(0x218),_0x1e92df(0x200),_0x1e92df(0x1e2),'certificateDomain']['some'](_0x3e0a94=>Object[_0x1e92df(0x21d)][_0x1e92df(0x209)][_0x1e92df(0x1f5)](_0x1adbd4[_0x1e92df(0x1fb)]??{},_0x3e0a94)))},{initEnv:_0x205c08}=await import('./constant/env.js'),{initDomains:_0x5ba5f2}=await import(_0x1e92df(0x20a));_0x205c08(_0x1adbd4['targetEnv']),_0x5ba5f2(_0x3fe6c7);}export async function initMultiAppEnvironment(_0x4efef7){const _0xf5d2d6=a286_0x219b;await initConfiguredEnvironment({'raw':_0x4efef7[_0xf5d2d6(0x1fd)],'configuredRegion':_0x4efef7[_0xf5d2d6(0x1e1)],'regionLocation':_0xf5d2d6(0x216)+_0x4efef7[_0xf5d2d6(0x21b)]+'\x22','targetEnv':_0x4efef7[_0xf5d2d6(0x1e8)]===_0xf5d2d6(0x1ee)?_0xf5d2d6(0x1ee):_0xf5d2d6(0x203)});}export function getConfigAppCode(_0x4b3921){const _0x30c57c=a286_0x219b,_0x4033bd=readRawConfig(_0x4b3921);if(_0x4033bd[_0x30c57c(0x226)]&&typeof _0x4033bd['apps']===_0x30c57c(0x220)){const _0x368f4=_0x4033bd[_0x30c57c(0x201)];if(_0x368f4)return _0x4033bd[_0x30c57c(0x226)][_0x368f4]?.[_0x30c57c(0x1ec)]?String(_0x4033bd[_0x30c57c(0x226)][_0x368f4][_0x30c57c(0x1ec)])[_0x30c57c(0x1e0)]():undefined;const _0x3af197=Object[_0x30c57c(0x21f)](_0x4033bd[_0x30c57c(0x226)]);if(_0x3af197[_0x30c57c(0x1f0)]===0x1&&_0x3af197[0x0]?.[_0x30c57c(0x1ec)])return String(_0x3af197[0x0][_0x30c57c(0x1ec)])[_0x30c57c(0x1e0)]();}const _0x394948=_0x4033bd['appcode']||_0x4033bd[_0x30c57c(0x20c)];if(typeof _0x394948!==_0x30c57c(0x1e6)||_0x394948[_0x30c57c(0x1e0)]()==='')return undefined;return _0x394948[_0x30c57c(0x1e0)]();}const CONNECTION_ROUTING_KEYS=[a286_0x34879f(0x1ea),a286_0x34879f(0x1f7),a286_0x34879f(0x1f1),a286_0x34879f(0x211),'skillDomain','skillHubDomain',a286_0x34879f(0x212),a286_0x34879f(0x1fa),a286_0x34879f(0x1fe),a286_0x34879f(0x218),a286_0x34879f(0x200),'localDomain',a286_0x34879f(0x20f)];function withAppProfileRouting(_0x156f0a,_0x3e15c0){const _0x4fc9fe=a286_0x34879f;if(!_0x3e15c0||_0x3e15c0[_0x4fc9fe(0x1fa)]===undefined)return _0x156f0a;return{..._0x156f0a,'kbServiceDomain':_0x3e15c0[_0x4fc9fe(0x1fa)]};}function a286_0x219b(_0x49939b,_0x1b0c39){_0x49939b=_0x49939b-0x1e0;const _0x10b715=a286_0x10b7();let _0x219b16=_0x10b715[_0x49939b];return _0x219b16;}function pickConnectionRoutingConfig(_0x1457e2,_0xa94c83){const _0x24a4a2={'region':_0xa94c83};for(const _0x4c2cff of CONNECTION_ROUTING_KEYS){if(_0x1457e2[_0x4c2cff]!==undefined)_0x24a4a2[_0x4c2cff]=_0x1457e2[_0x4c2cff];}return _0x24a4a2;}export function getMultiAppConfigs(_0x5e2fea=a286_0x34879f(0x1ff),_0x48f6f6){const _0x403c99=a286_0x34879f,_0xa0b2b1=loadRawConfigLayers(_0x48f6f6);let _0x53a35f,_0x5cd13c;const _0x2b1c5b=mergeRawConfigLayers(_0xa0b2b1),_0x28e7ca=_0xa0b2b1[_0x403c99(0x219)][_0x403c99(0x226)]&&typeof _0xa0b2b1[_0x403c99(0x219)][_0x403c99(0x226)]===_0x403c99(0x220)?_0xa0b2b1[_0x403c99(0x219)][_0x403c99(0x226)]:{},_0x535bde=_0xa0b2b1[_0x403c99(0x22c)]['apps']&&typeof _0xa0b2b1[_0x403c99(0x22c)][_0x403c99(0x226)]===_0x403c99(0x220)?_0xa0b2b1[_0x403c99(0x22c)][_0x403c99(0x226)]:{};_0x5e2fea===_0x403c99(0x20b)?(_0x53a35f={..._0x28e7ca,..._0x535bde},_0x5cd13c=_0x2b1c5b[_0x403c99(0x201)]):(_0x53a35f=_0xa0b2b1[_0x403c99(0x22c)][_0x403c99(0x226)],_0x5cd13c=_0xa0b2b1[_0x403c99(0x22c)][_0x403c99(0x201)]);!_0x5cd13c&&_0x53a35f&&typeof _0x53a35f===_0x403c99(0x220)&&Object[_0x403c99(0x207)](_0x53a35f)[_0x403c99(0x1f0)]===0x1&&(_0x5cd13c=Object[_0x403c99(0x207)](_0x53a35f)[0x0]);if(!_0x53a35f||typeof _0x53a35f!=='object'||Object['keys'](_0x53a35f)['length']===0x0)return null;return Object['entries'](_0x53a35f)[_0x403c99(0x214)](([_0x2d5369,_0x29e4dd])=>{const _0x4f6449=_0x403c99,_0x1549f0=_0x5e2fea===_0x4f6449(0x1ff)||Object[_0x4f6449(0x21d)][_0x4f6449(0x209)]['call'](_0x535bde,_0x2d5369),_0x4a0170=withAppProfileRouting(_0x1549f0?_0x2b1c5b:_0xa0b2b1[_0x4f6449(0x219)],_0x29e4dd),_0x515f9a=resolveEffectiveRegion({'appRegion':_0x29e4dd?.[_0x4f6449(0x1e1)],'projectRegion':_0x1549f0?_0xa0b2b1['projectConfig'][_0x4f6449(0x1e1)]:undefined,'globalRegion':_0xa0b2b1[_0x4f6449(0x219)]['region'],'mergedRegion':_0x4a0170[_0x4f6449(0x1e1)],'appName':_0x2d5369});return{'name':_0x2d5369,'appcode':_0x29e4dd?.[_0x4f6449(0x1ec)]||'','apiGroup':optionalString(_0x29e4dd?.['apiGroup']),'isDefault':_0x2d5369===_0x5cd13c,'region':_0x515f9a['region'],'regionSource':_0x515f9a[_0x4f6449(0x21e)],'env':_0x29e4dd?.[_0x4f6449(0x1e8)],'apiDir':optionalString(_0x29e4dd?.[_0x4f6449(0x1f8)])||optionalString(_0x4a0170['apiDir']),'cookie':_0x29e4dd?.[_0x4f6449(0x1e9)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0x4a0170,_0x515f9a[_0x4f6449(0x1e1)])};})[_0x403c99(0x22d)](_0x5f2b8f=>_0x5f2b8f[_0x403c99(0x1ec)]);}export function getTemplateBaseUrl(_0x3221e6){const _0x5d1a70=a286_0x34879f,_0x3e4f11=readRawConfig(_0x3221e6);if(_0x3e4f11[_0x5d1a70(0x202)]&&typeof _0x3e4f11[_0x5d1a70(0x202)]===_0x5d1a70(0x1e6))return _0x3e4f11[_0x5d1a70(0x202)]['replace'](/\/$/,'');return'https://g.lovrabet.com/dist/lovrabet-skill';}function buildConfig(_0xbb5b9a,_0x177c5e,_0x4f59e6){const _0x1ce304=a286_0x34879f,_0x11c7a2=resolveAppConfig({'raw':_0xbb5b9a,'flags':_0x177c5e,'layers':_0x4f59e6,'readEnv':env}),_0x3ab5fc=_0x11c7a2[_0x1ce304(0x1e5)]?_0x11c7a2['apps'][_0x11c7a2[_0x1ce304(0x1e5)]]:undefined;return{..._0x11c7a2,'raw':withAppProfileRouting(_0xbb5b9a,_0x3ab5fc)};}export function resolveApiFilePath(_0x1367e9,_0x4592e1,_0x588c8b){const _0x966dd9=a286_0x34879f;return resolveApiModelSource(_0x1367e9,_0x4592e1,_0x588c8b)[_0x966dd9(0x221)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a287_0x2dc0f3=a287_0x2aa9;function a287_0x3db0(){const _0x51586c=['14QnNeiR','1104340tkhBBj','set','1csENJg','alias','slice','.mjs','size','name','../','3374380xudnwE','defaultProfile','10649529IBRltU','.ts','utf-8','1672074nEqXCx','index','exec','.tsx','datasetCode','flatMap','map','.cts','startsWith','9917104crscHR','461726gVOCNO','push','endsWith','.mts','4MTLoOo','source','stringify','flags','filter','1865166HAxggL','.js','.jsx','isFile','22HzDWOp','.cjs','get','tableName','add'];a287_0x3db0=function(){return _0x51586c;};return a287_0x3db0();}(function(_0x205d0c,_0x1458d7){const _0x12eb47=a287_0x2aa9,_0x3a0b24=_0x205d0c();while(!![]){try{const _0x2a3a94=-parseInt(_0x12eb47(0xf9))/0x1*(parseInt(_0x12eb47(0xe4))/0x2)+parseInt(_0x12eb47(0xed))/0x3+parseInt(_0x12eb47(0xe8))/0x4*(parseInt(_0x12eb47(0xf7))/0x5)+-parseInt(_0x12eb47(0x105))/0x6*(parseInt(_0x12eb47(0xf6))/0x7)+-parseInt(_0x12eb47(0xe3))/0x8+parseInt(_0x12eb47(0x102))/0x9+-parseInt(_0x12eb47(0x100))/0xa*(-parseInt(_0x12eb47(0xf1))/0xb);if(_0x2a3a94===_0x1458d7)break;else _0x3a0b24['push'](_0x3a0b24['shift']());}catch(_0x7e0ad1){_0x3a0b24['push'](_0x3a0b24['shift']());}}}(a287_0x3db0,0xa4478));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';import{findProjectRootDirectory}from'../context/config-loader.js';const cache=new Map(),MAX_LOCAL_REEXPORT_DEPTH=0x8,SOURCE_FILE_EXTENSIONS=[a287_0x2dc0f3(0x103),'.tsx','.mts',a287_0x2dc0f3(0xe1),a287_0x2dc0f3(0xee),a287_0x2dc0f3(0xef),a287_0x2dc0f3(0xfc),a287_0x2dc0f3(0xf2)],LOCAL_REEXPORT_RE=/\bexport\s+(?:type\s+)?(?:\{[\s\S]*?\}|\*)\s+from\s*["']([^"']+)["']/g,SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION={'.js':['.ts','.tsx'],'.jsx':[a287_0x2dc0f3(0xdd)],'.mjs':[a287_0x2dc0f3(0xe7)],'.cjs':[a287_0x2dc0f3(0xe1)]};function parseApiFile(_0x4d86a8){const _0x62d774=a287_0x2dc0f3;return parseLegacyApiModels(_0x4d86a8)[_0x62d774(0xdf)](_0x5a65c8=>_0x5a65c8[_0x62d774(0xfa)]?[{'alias':_0x5a65c8[_0x62d774(0xfa)],'datasetCode':_0x5a65c8[_0x62d774(0xde)],'tableName':_0x5a65c8[_0x62d774(0xf4)],'name':_0x5a65c8[_0x62d774(0xfe)]}]:[]);}function isWithinRoot(_0x249345,_0x585451){const _0x419913=a287_0x2dc0f3,_0x479d17=relative(_0x249345,_0x585451);return _0x479d17===''||!_0x479d17[_0x419913(0xe2)]('..')&&!isAbsolute(_0x479d17);}function resolveExistingFile(_0x3e5e71){const _0x109a9a=a287_0x2dc0f3;if(!existsSync(_0x3e5e71))return undefined;try{return statSync(_0x3e5e71)[_0x109a9a(0xf0)]()?realpathSync(_0x3e5e71):undefined;}catch{return undefined;}}function a287_0x2aa9(_0x33178c,_0x173662){_0x33178c=_0x33178c-0xdb;const _0x3db096=a287_0x3db0();let _0x2aa991=_0x3db096[_0x33178c];return _0x2aa991;}function reexportCandidatePaths(_0x4e8ff1){const _0x73feb3=a287_0x2dc0f3,_0x311176=extname(_0x4e8ff1);if(!_0x311176)return[...SOURCE_FILE_EXTENSIONS[_0x73feb3(0xe0)](_0x3ae2da=>''+_0x4e8ff1+_0x3ae2da),...SOURCE_FILE_EXTENSIONS['map'](_0x5bd9de=>resolve(_0x4e8ff1,_0x73feb3(0xdb)+_0x5bd9de))];const _0x1579f9=SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION[_0x311176];if(!_0x1579f9)return[_0x4e8ff1];const _0x50fd41=_0x4e8ff1[_0x73feb3(0xfb)](0x0,-_0x311176['length']);return[..._0x1579f9['map'](_0x1ac8b7=>''+_0x50fd41+_0x1ac8b7),_0x4e8ff1];}function resolveLocalReexport(_0x502699,_0x451b06,_0x140e41){const _0xb8e632=a287_0x2dc0f3;if(!_0x451b06[_0xb8e632(0xe2)]('./')&&!_0x451b06[_0xb8e632(0xe2)](_0xb8e632(0xff)))return undefined;const _0x11febb=resolve(dirname(_0x502699),_0x451b06);if(!isWithinRoot(_0x140e41,_0x11febb))return undefined;for(const _0x52fc66 of reexportCandidatePaths(_0x11febb)){const _0x581a51=resolveExistingFile(_0x52fc66);if(_0x581a51&&isWithinRoot(_0x140e41,_0x581a51))return _0x581a51;}return undefined;}function parseApiFileTree(_0x535d36,_0x3e374d,_0x293363,_0x28a648){const _0x4e658f=a287_0x2dc0f3,_0xce28fa=resolveExistingFile(_0x535d36);if(!_0xce28fa)return[];const _0x1ecd14=_0x293363['get'](_0xce28fa);if(_0x1ecd14!==undefined&&_0x1ecd14<=_0x28a648)return[];_0x293363['set'](_0xce28fa,_0x28a648);const _0x57f9c4=readFileSync(_0xce28fa,_0x4e658f(0x104)),_0x237e94=parseApiFile(_0x57f9c4);if(_0x28a648>=MAX_LOCAL_REEXPORT_DEPTH)return _0x237e94;const _0x42e0ff=new RegExp(LOCAL_REEXPORT_RE[_0x4e658f(0xe9)],LOCAL_REEXPORT_RE[_0x4e658f(0xeb)]);let _0x308954;while((_0x308954=_0x42e0ff[_0x4e658f(0xdc)](_0x57f9c4))!==null){const _0x1b88f9=resolveLocalReexport(_0xce28fa,_0x308954[0x1],_0x3e374d);_0x1b88f9&&_0x237e94[_0x4e658f(0xe5)](...parseApiFileTree(_0x1b88f9,_0x3e374d,_0x293363,_0x28a648+0x1));}return _0x237e94;}function aliasProjectRoot(_0x177172){const _0x573ef8=findProjectRootDirectory(dirname(_0x177172));try{return realpathSync(_0x573ef8);}catch{return _0x573ef8;}}function uniqueAliasEntries(_0x1eadb1){const _0x9b4398=a287_0x2dc0f3,_0x79f1e6=new Set();return _0x1eadb1[_0x9b4398(0xec)](_0x1f76f9=>{const _0x3080f0=_0x9b4398,_0x3da8e0=JSON[_0x3080f0(0xea)](_0x1f76f9);if(_0x79f1e6['has'](_0x3da8e0))return![];return _0x79f1e6[_0x3080f0(0xf5)](_0x3da8e0),!![];});}export function loadAliasMap(_0x52d2bd,_0x116d9b,_0x2971cc,_0x2793d0){const _0x394951=a287_0x2dc0f3,_0x501270=resolve(_0x2971cc??resolve(process['cwd'](),_0x52d2bd,'api.ts')),_0x5329f7=_0x2793d0?_0x501270+'#'+_0x2793d0:_0x501270;if(cache['has'](_0x5329f7))return cache[_0x394951(0xf3)](_0x5329f7);if(!existsSync(_0x501270))return cache[_0x394951(0xf8)](_0x5329f7,[]),[];try{if(_0x501270[_0x394951(0xe6)](MODEL_REGISTRY_FILE_NAME)){const _0x1ee683=readModelRegistry(_0x501270),_0x2de1a8=_0x2793d0??_0x1ee683?.[_0x394951(0x101)],_0x46e749=_0x2de1a8&&_0x1ee683?getProfileModels(_0x1ee683,_0x2de1a8):[],_0x4205ca=uniqueAliasEntries(_0x46e749[_0x394951(0xdf)](_0x2601fc=>_0x2601fc[_0x394951(0xfa)]?[{'alias':_0x2601fc['alias'],'datasetCode':_0x2601fc[_0x394951(0xde)],'tableName':_0x2601fc[_0x394951(0xf4)],'name':_0x2601fc[_0x394951(0xfe)]}]:[]));return cache['set'](_0x5329f7,_0x4205ca),_0x4205ca;}const _0xf71b79=uniqueAliasEntries(parseApiFileTree(_0x501270,aliasProjectRoot(_0x501270),new Map(),0x0));return cache['set'](_0x5329f7,_0xf71b79),_0xf71b79;}catch{return cache['set'](_0x5329f7,[]),[];}}export function resolveAlias(_0x4d1138,_0x2df92f,_0xbf99a,_0x535942,_0x1bae91){const _0xeb8b85=a287_0x2dc0f3;if(!_0x2df92f)return undefined;const _0x383f29=loadAliasMap(_0x4d1138,_0xbf99a,_0x535942,_0x1bae91),_0x6de70=new Set(_0x383f29[_0xeb8b85(0xec)](_0x23b55b=>_0x23b55b['alias']===_0x2df92f)[_0xeb8b85(0xe0)](_0x286d3c=>_0x286d3c['datasetCode']));return _0x6de70[_0xeb8b85(0xfd)]===0x1?[..._0x6de70][0x0]:undefined;}export function listAliases(_0x2ef672,_0x2934b2,_0xcad86e,_0x35584b){return loadAliasMap(_0x2ef672,_0x2934b2,_0xcad86e,_0x35584b);}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 分域 API 客户端
|
|
3
|
-
*
|
|
4
|
-
* 按业务域组织(bff / sql / dataset / dblink / db-analysis),与研发态 OpenAPI 路径前缀自然对齐。
|
|
5
|
-
* 统一认证、超时、错误处理;命令层通过导出函数调用。
|
|
6
|
-
*/
|
|
7
1
|
import type { Paging } from "../framework/response.js";
|
|
8
2
|
import { type CrossDbRelationDetail, type CrossDbRelationMutation, type CrossDbRelationQuery, type CrossDbRelationSource } from "../core/cross-db-relation.js";
|
|
9
3
|
import { type CrossDbAnalysisStatus } from "../core/cross-db-analysis.js";
|
|
@@ -404,28 +398,6 @@ export declare function saveSqlQuery(params: {
|
|
|
404
398
|
description?: string;
|
|
405
399
|
}): Promise<SqlSaveResult>;
|
|
406
400
|
export declare function executeSql(appCode: string, sqlCode: string, params?: Record<string, string | number>): Promise<any>;
|
|
407
|
-
/**
|
|
408
|
-
* Read-only runtime data operations supported by rabetbase-cli.
|
|
409
|
-
*
|
|
410
|
-
* The command surface intentionally stays narrow for now: users mainly need
|
|
411
|
-
* `filter` and `getOne` to inspect real records while designing pages.
|
|
412
|
-
*/
|
|
413
|
-
export type DatasetDataReadOperation = "filter" | "getOne";
|
|
414
|
-
/**
|
|
415
|
-
* Executes a read-only dataset data operation against the runtime WebAPI.
|
|
416
|
-
*
|
|
417
|
-
* The runtime dataset metadata already exposes concrete paths such as
|
|
418
|
-
* `/api/{appCode}/{datasetCode}/filter` and `/getOne`. Calling those paths
|
|
419
|
-
* directly keeps rabetbase aligned with the platform's cookie-authenticated
|
|
420
|
-
* runtime behavior without pulling in the runtime CLI's SDK stack.
|
|
421
|
-
*
|
|
422
|
-
* @param appCode - Resolved app code.
|
|
423
|
-
* @param datasetCode - Target dataset code.
|
|
424
|
-
* @param operation - Read-only operation name.
|
|
425
|
-
* @param params - Request body sent to the runtime API.
|
|
426
|
-
* @returns Raw runtime response payload.
|
|
427
|
-
*/
|
|
428
|
-
export declare function executeDatasetDataOperation(appCode: string, datasetCode: string, operation: DatasetDataReadOperation, params?: Record<string, any>): Promise<any>;
|
|
429
401
|
export interface DatasetItem {
|
|
430
402
|
id: number;
|
|
431
403
|
name: string;
|