@lovrabet/rabetbase-cli 2.3.16-beta.4 → 2.3.16-beta.6
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.d.ts +9 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.d.ts +2 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +8 -0
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.d.ts +13 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.d.ts +25 -0
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.d.ts +2 -0
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.d.ts +1 -0
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.d.ts +51 -0
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.d.ts +1 -0
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.d.ts +5 -0
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.d.ts +1 -0
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.d.ts +12 -0
- package/lib/cli-flags.js +1 -1
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.d.ts +2 -0
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.d.ts +2 -0
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.d.ts +2 -0
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.d.ts +2 -0
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.d.ts +18 -0
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.d.ts +5 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.d.ts +10 -0
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.d.ts +2 -0
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.d.ts +11 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.d.ts +46 -0
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.d.ts +2 -0
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.d.ts +2 -0
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.d.ts +2 -0
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.d.ts +2 -0
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.d.ts +2 -0
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.d.ts +105 -0
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.d.ts +2 -0
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.d.ts +4 -0
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.d.ts +2 -0
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.d.ts +2 -0
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.d.ts +5 -0
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.d.ts +2 -0
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.d.ts +2 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.d.ts +2 -0
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.d.ts +2 -0
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.d.ts +8 -0
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.d.ts +2 -0
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.d.ts +2 -0
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.d.ts +2 -0
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.d.ts +2 -0
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.d.ts +17 -0
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.d.ts +17 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.d.ts +11 -0
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.d.ts +12 -0
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +26 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.d.ts +6 -0
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.d.ts +13 -0
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.d.ts +5 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.d.ts +5 -0
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.d.ts +5 -0
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.d.ts +5 -0
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.d.ts +16 -0
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.d.ts +7 -0
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.d.ts +7 -0
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.d.ts +8 -0
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.d.ts +33 -0
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.d.ts +18 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.d.ts +11 -0
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.d.ts +2 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.d.ts +2 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.d.ts +26 -0
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.d.ts +27 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.d.ts +3 -0
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.d.ts +2 -0
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.d.ts +2 -0
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.d.ts +2 -0
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.d.ts +2 -0
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.d.ts +2 -0
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.d.ts +2 -0
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.d.ts +128 -0
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.d.ts +2 -0
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.d.ts +53 -0
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.d.ts +17 -0
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.d.ts +2 -0
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.d.ts +30 -0
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.d.ts +2 -0
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.d.ts +2 -0
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.d.ts +2 -0
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.d.ts +2 -0
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.d.ts +2 -0
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.d.ts +2 -0
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.d.ts +2 -0
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.d.ts +5 -0
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.d.ts +2 -0
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.d.ts +15 -0
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.d.ts +2 -0
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.d.ts +2 -0
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.d.ts +2 -0
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.d.ts +2 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.d.ts +2 -0
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.d.ts +11 -0
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.d.ts +2 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.d.ts +23 -0
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.d.ts +2 -0
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.d.ts +32 -0
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.d.ts +2 -0
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.d.ts +2 -0
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.d.ts +2 -0
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.d.ts +2 -0
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.d.ts +2 -0
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.d.ts +33 -0
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.d.ts +2 -0
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.d.ts +5 -0
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.d.ts +2 -0
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.d.ts +2 -0
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.d.ts +3 -0
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.d.ts +2 -0
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.d.ts +2 -0
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.d.ts +2 -0
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.d.ts +17 -0
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.d.ts +2 -0
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.d.ts +2 -0
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.d.ts +2 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.d.ts +2 -0
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.d.ts +27 -0
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.d.ts +12 -0
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.d.ts +12 -0
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.d.ts +10 -0
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +12 -0
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +28 -0
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.d.ts +69 -0
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.d.ts +17 -0
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.d.ts +7 -0
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +162 -0
- package/lib/commands/menu/shared/update-core.d.ts +11 -0
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.d.ts +6 -0
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.d.ts +2 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.d.ts +2 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.d.ts +2 -0
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.d.ts +2 -0
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.d.ts +2 -0
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.d.ts +2 -0
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.d.ts +2 -0
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.d.ts +2 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.d.ts +2 -0
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +105 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.d.ts +2 -0
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.d.ts +2 -0
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.d.ts +2 -0
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.d.ts +74 -0
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.d.ts +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +6 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.d.ts +9 -0
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.d.ts +4 -0
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.d.ts +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.d.ts +2 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.d.ts +1 -0
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.d.ts +66 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +107 -0
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.d.ts +2 -0
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.d.ts +2 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.d.ts +5 -0
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.d.ts +10 -0
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.d.ts +5 -0
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.d.ts +2 -0
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.d.ts +2 -0
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.d.ts +5 -0
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.d.ts +2 -0
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.d.ts +5 -0
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.d.ts +5 -0
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.d.ts +23 -0
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.d.ts +5 -0
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.d.ts +2 -0
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.d.ts +2 -0
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.d.ts +2 -0
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.d.ts +2 -0
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.d.ts +2 -0
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.d.ts +10 -0
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/workspace/add.d.ts +6 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.d.ts +11 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.d.ts +6 -0
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.d.ts +50 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +1 -0
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.d.ts +34 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.d.ts +10 -0
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +14 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.d.ts +11 -0
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.d.ts +1 -0
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.d.ts +5 -0
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.d.ts +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.d.ts +36 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.d.ts +5 -0
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.d.ts +61 -0
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +102 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +31 -0
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1018 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +8 -0
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +28 -0
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +7 -0
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +25 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +92 -0
- package/lib/core/bff/utils.d.ts +25 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.d.ts +43 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.d.ts +6 -0
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.d.ts +4 -0
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.d.ts +8 -0
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/types.d.ts +22 -0
- package/lib/core/sql-index-auditor.d.ts +33 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.d.ts +7 -0
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.d.ts +7 -0
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.d.ts +5 -0
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.d.ts +14 -0
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/types.d.ts +43 -0
- package/lib/core/sql-sync/utils.d.ts +10 -0
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.d.ts +34 -0
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.d.ts +3 -0
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.d.ts +2 -0
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.d.ts +9 -0
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.d.ts +3 -0
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.d.ts +3 -0
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.d.ts +4 -0
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.d.ts +11 -0
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.d.ts +15 -0
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.d.ts +2 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.d.ts +14 -0
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.d.ts +36 -0
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.d.ts +3 -0
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.d.ts +63 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -0
- package/lib/generated/build-info.js +1 -1
- package/lib/help.d.ts +1 -0
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.d.ts +4 -0
- package/lib/runtime/confirmation.js +1 -0
- package/lib/runtime/event.d.ts +5 -0
- package/lib/runtime/event.js +1 -0
- package/lib/runtime/index.d.ts +7 -0
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/queue.d.ts +5 -0
- package/lib/runtime/queue.js +1 -0
- package/lib/runtime/resolve.d.ts +8 -0
- package/lib/runtime/resolve.js +1 -0
- package/lib/runtime/types.d.ts +50 -0
- package/lib/runtime/types.js +1 -0
- package/lib/skills/main.d.ts +41 -0
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +99 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.d.ts +44 -0
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.d.ts +12 -0
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.d.ts +8 -0
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +93 -0
- package/lib/utils/ai_config.d.ts +47 -0
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.d.ts +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.d.ts +42 -0
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.d.ts +23 -0
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.d.ts +37 -0
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +9 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.d.ts +42 -0
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.d.ts +1 -0
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.d.ts +30 -0
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.d.ts +25 -0
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.d.ts +80 -0
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.d.ts +30 -0
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.d.ts +7 -0
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.d.ts +62 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.d.ts +15 -0
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.d.ts +21 -0
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.d.ts +38 -0
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.d.ts +1 -0
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.d.ts +55 -0
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.d.ts +10 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.d.ts +1 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.d.ts +1 -0
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.d.ts +6 -0
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -1
package/lib/context.d.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI 共享上下文
|
|
3
|
+
*
|
|
4
|
+
* 借鉴飞书 CLI 的 Factory 模式,统一注入 config / auth / logger / env。
|
|
5
|
+
* 所有命令函数签名统一为 (ctx, args, flags) => Promise<void>,
|
|
6
|
+
* 不再各自读取 config、cookie 等共享状态。
|
|
7
|
+
*/
|
|
8
|
+
import { type AppProfile } from "./context/app-resolver.js";
|
|
9
|
+
import { CONFIG_NAMES, LEGACY_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
|
+
import type { OutputFormat, Risk } from "./framework/types.js";
|
|
11
|
+
import { logger } from "./utils/logger.js";
|
|
12
|
+
export { CONFIG_NAMES, LEGACY_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
|
+
export interface CLIConfig {
|
|
14
|
+
appCode: string | undefined;
|
|
15
|
+
env: "production" | "daily";
|
|
16
|
+
locale: string;
|
|
17
|
+
/** 内联 cookie,优先于 ~/.lovrabet/cookie 文件 */
|
|
18
|
+
cookie: string | undefined;
|
|
19
|
+
/** Access Key,未来替代 cookie 的认证方式(预留) */
|
|
20
|
+
accessKey: string | undefined;
|
|
21
|
+
/** 默认输出格式,优先于内置默认值 pretty */
|
|
22
|
+
format: OutputFormat | undefined;
|
|
23
|
+
/** 默认分页大小,用于 sql list 等分页命令 */
|
|
24
|
+
pageSize: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* 允许执行的最高风险等级,超出则拒绝执行。
|
|
27
|
+
* read < write < high-risk-write(无显式顶层授权时默认 read)
|
|
28
|
+
*/
|
|
29
|
+
riskLevel: Risk;
|
|
30
|
+
/**
|
|
31
|
+
* 全局 verbose 开关,仅从 RABETBASE_VERBOSE 环境变量读取。
|
|
32
|
+
* 命令的 --verbose flag 未设时以此值为 fallback。
|
|
33
|
+
*/
|
|
34
|
+
verbose: boolean;
|
|
35
|
+
/** api pull 生成目录,默认 `./src/api`(`constant/paths` 的 DEFAULT_API_DIR) */
|
|
36
|
+
apiDir: string;
|
|
37
|
+
/** 多应用配置(name → profile),无 apps 时为空对象 */
|
|
38
|
+
apps: Record<string, AppProfile>;
|
|
39
|
+
/** 默认应用名称 */
|
|
40
|
+
defaultApp: string | undefined;
|
|
41
|
+
/** 运行时当前应用名称(--app flag 或 defaultApp) */
|
|
42
|
+
currentApp: string | undefined;
|
|
43
|
+
/** 用户通过 --app 或 --appcode 显式指定的应用名(未指定时为 undefined,用于多应用命令过滤) */
|
|
44
|
+
explicitAppName: string | undefined;
|
|
45
|
+
raw: Record<string, any>;
|
|
46
|
+
}
|
|
47
|
+
export interface CLIAuth {
|
|
48
|
+
cookie: string;
|
|
49
|
+
isLoggedIn: boolean;
|
|
50
|
+
/** 获取 cookie,未登录时抛出 CliError 提示登录 */
|
|
51
|
+
getOrLogin(): Promise<string>;
|
|
52
|
+
}
|
|
53
|
+
export interface CLIEnv {
|
|
54
|
+
apiDomain: string;
|
|
55
|
+
userDomain: string;
|
|
56
|
+
}
|
|
57
|
+
export interface MultiAppConfig {
|
|
58
|
+
name: string;
|
|
59
|
+
appcode: string;
|
|
60
|
+
isDefault: boolean;
|
|
61
|
+
env?: string;
|
|
62
|
+
apiDir?: string;
|
|
63
|
+
cookie?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface CLIContext {
|
|
66
|
+
config: CLIConfig;
|
|
67
|
+
auth: CLIAuth;
|
|
68
|
+
logger: typeof logger;
|
|
69
|
+
env: CLIEnv;
|
|
70
|
+
/** 是否为非交互模式 */
|
|
71
|
+
nonInteractive: boolean;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* 创建 CLI 共享上下文
|
|
75
|
+
*
|
|
76
|
+
* 在 cli.tsx 中调用一次,将返回值传入每个命令的 run() 方法。
|
|
77
|
+
*/
|
|
78
|
+
export declare function createContext(flags: Record<string, any>): Promise<CLIContext>;
|
|
79
|
+
/**
|
|
80
|
+
* 仅读取 CLIConfig,不初始化 env/auth(轻量用途,如 cli.tsx 中提前取 defaultFormat)
|
|
81
|
+
*/
|
|
82
|
+
export declare function buildConfigFromFlags(flags: Record<string, any>): CLIConfig;
|
|
83
|
+
/**
|
|
84
|
+
* 按已解析配置初始化一次命令所需的进程级环境。
|
|
85
|
+
* 终端 CLI 与嵌入式 runtime 共用该入口,避免 env/domain 初始化语义漂移。
|
|
86
|
+
*/
|
|
87
|
+
export declare function initGlobalEnvironment(config: CLIConfig): Promise<void>;
|
|
88
|
+
export declare function getConfigAppCode(projectRoot?: string): string | undefined;
|
|
89
|
+
export type MultiAppConfigScope = "project" | "merged";
|
|
90
|
+
export declare function getMultiAppConfigs(scope?: MultiAppConfigScope, projectRoot?: string): MultiAppConfig[] | null;
|
|
91
|
+
export declare function getTemplateBaseUrl(projectRoot?: string): string;
|
|
92
|
+
/**
|
|
93
|
+
* 根据多应用配置决定 alias 解析应读取哪个 api.ts 文件。
|
|
94
|
+
*
|
|
95
|
+
* 规则:
|
|
96
|
+
* - 无 appCode 或单应用 → <apiDir>/api.ts
|
|
97
|
+
* - 非默认应用且无独立 apiDir 配置 → <apiDir>/<appName>-api.ts
|
|
98
|
+
* - 默认应用 / 有独立 apiDir 配置 → <apiDir>/api.ts
|
|
99
|
+
*
|
|
100
|
+
* 放在 context.ts 而非 alias-resolver.ts,因为需要读取 .rabetbase.json。
|
|
101
|
+
*/
|
|
102
|
+
export declare function resolveApiFilePath(apiDir: string, appCode?: string): string;
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xf42588,_0x21fce7){const _0x22fc22=a206_0x5036,_0x39e6ee=_0xf42588();while(!![]){try{const _0x4c3fb5=parseInt(_0x22fc22(0xdb))/0x1*(-parseInt(_0x22fc22(0xba))/0x2)+parseInt(_0x22fc22(0xc7))/0x3+-parseInt(_0x22fc22(0xbb))/0x4*(-parseInt(_0x22fc22(0xc3))/0x5)+parseInt(_0x22fc22(0xdc))/0x6+-parseInt(_0x22fc22(0xbf))/0x7*(parseInt(_0x22fc22(0xc8))/0x8)+-parseInt(_0x22fc22(0xdf))/0x9+parseInt(_0x22fc22(0xd0))/0xa*(-parseInt(_0x22fc22(0xd6))/0xb);if(_0x4c3fb5===_0x21fce7)break;else _0x39e6ee['push'](_0x39e6ee['shift']());}catch(_0x40399d){_0x39e6ee['push'](_0x39e6ee['shift']());}}}(a206_0x5d2f,0x80a19));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,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x575eea){return process.env[`RABETBASE_${_0x575eea}`]||process.env[`LOVRABET_${_0x575eea}`]||undefined;}function optionalString(_0x3fab71){const _0x35111a=a206_0x5036;return typeof _0x3fab71===_0x35111a(0xc6)&&_0x3fab71[_0x35111a(0xc0)]()?_0x3fab71['trim']():undefined;}export async function createContext(_0x100b83){const _0x4cc707=a206_0x5036,{config:_0x25dfbc,layers:_0x34ef9b}=readRawConfigWithLayers(),_0x4aef48=buildConfig(_0x25dfbc,_0x100b83,_0x34ef9b);await initGlobalEnvironment(_0x4aef48);const {getUserDomain:_0xdaf11a,getApiDomain:_0x56c673}=await import('./constant/domain.js'),_0x96df08={'apiDomain':_0x56c673(),'userDomain':_0xdaf11a()},_0x3270c7=await buildAuth(_0x4aef48);logger[_0x4cc707(0xbe)](process['cwd']());const _0x34601e=(CLI_BIN_NAME+'\x20'+process[_0x4cc707(0xc1)][_0x4cc707(0xbc)](0x2)['join']('\x20'))[_0x4cc707(0xc0)]();logger[_0x4cc707(0xc4)](_0x34601e);const {isNonInteractive:_0x2917e3}=await import(_0x4cc707(0xe2)),_0x210390=_0x2917e3(_0x100b83);return{'config':_0x4aef48,'auth':_0x3270c7,'logger':logger,'env':_0x96df08,'nonInteractive':_0x210390};}export function buildConfigFromFlags(_0x29e6ca){const {config:_0x4e2038,layers:_0x1a6b5c}=readRawConfigWithLayers();return buildConfig(_0x4e2038,_0x29e6ca,_0x1a6b5c);}export async function initGlobalEnvironment(_0x41c741){const _0x15ceaf=a206_0x5036,{initEnv:_0x23ba6e}=await import(_0x15ceaf(0xcd));_0x23ba6e(_0x41c741['env']);const {initDomains:_0x3e6840}=await import('./constant/domain.js');_0x3e6840({'apiDomain':optionalString(_0x41c741[_0x15ceaf(0xda)]?.['apiDomain']),'userDomain':optionalString(_0x41c741[_0x15ceaf(0xda)]?.[_0x15ceaf(0xe3)]),'runtimeDomain':optionalString(_0x41c741['raw']?.['runtimeDomain'])});}export function getConfigAppCode(_0x52822f){const _0x23ee24=a206_0x5036,_0xf10936=readRawConfig(_0x52822f);if(_0xf10936['apps']&&typeof _0xf10936[_0x23ee24(0xe0)]==='object'){const _0x5d5d63=_0xf10936[_0x23ee24(0xe1)];if(_0x5d5d63&&_0xf10936[_0x23ee24(0xe0)][_0x5d5d63]?.[_0x23ee24(0xdd)])return String(_0xf10936['apps'][_0x5d5d63][_0x23ee24(0xdd)])['trim']();const _0x458b86=Object[_0x23ee24(0xd9)](_0xf10936[_0x23ee24(0xe0)])[0x0];if(_0x458b86?.[_0x23ee24(0xdd)])return String(_0x458b86[_0x23ee24(0xdd)])[_0x23ee24(0xc0)]();}const _0x593bc1=_0xf10936['appcode']||_0xf10936[_0x23ee24(0xc9)];if(typeof _0x593bc1!==_0x23ee24(0xc6)||_0x593bc1[_0x23ee24(0xc0)]()==='')return undefined;return _0x593bc1[_0x23ee24(0xc0)]();}export function getMultiAppConfigs(_0x284fec='project',_0x11ea0f){const _0x40d854=a206_0x5036,_0x26b72f=loadRawConfigLayers(_0x11ea0f);let _0x3e50d8,_0x548d51;if(_0x284fec===_0x40d854(0xc5)){const _0x538821=_0x26b72f[_0x40d854(0xd8)][_0x40d854(0xe0)]&&typeof _0x26b72f[_0x40d854(0xd8)][_0x40d854(0xe0)]===_0x40d854(0xd3)?_0x26b72f[_0x40d854(0xd8)]['apps']:{},_0x2ecd5f=_0x26b72f[_0x40d854(0xca)][_0x40d854(0xe0)]&&typeof _0x26b72f[_0x40d854(0xca)][_0x40d854(0xe0)]===_0x40d854(0xd3)?_0x26b72f[_0x40d854(0xca)]['apps']:{};_0x3e50d8={..._0x538821,..._0x2ecd5f};const _0x1ec6fb=readRawConfig(_0x11ea0f);_0x548d51=_0x1ec6fb[_0x40d854(0xe1)];}else _0x3e50d8=_0x26b72f[_0x40d854(0xca)]['apps'],_0x548d51=_0x26b72f[_0x40d854(0xca)][_0x40d854(0xe1)];if(!_0x3e50d8||typeof _0x3e50d8!==_0x40d854(0xd3)||Object[_0x40d854(0xcb)](_0x3e50d8)[_0x40d854(0xd1)]===0x0)return null;return Object[_0x40d854(0xd4)](_0x3e50d8)[_0x40d854(0xd2)](([_0x375476,_0x370975])=>({'name':_0x375476,'appcode':_0x370975?.[_0x40d854(0xdd)]||'','isDefault':_0x375476===_0x548d51,'env':_0x370975?.[_0x40d854(0xc2)],'apiDir':_0x370975?.['apiDir'],'cookie':_0x370975?.[_0x40d854(0xce)]||undefined}))['filter'](_0x42bb96=>_0x42bb96['appcode']);}function a206_0x5d2f(){const _0x178a9b=['raw','73WKCrMR','5446464sKhShB','appcode','template_base_url','6587919BQRzwF','apps','defaultApp','./utils/is-non-interactive.js','userDomain','19786SfUuBa','4AmYAuM','slice','cwd','setLogPath','7SOTSRU','trim','argv','env','4894780vyhutW','setRawCommand','merged','string','1789512zJvNxt','2372728SFxsTE','app','projectConfig','keys','-api.ts','./constant/env.js','cookie','https://g.lovrabet.com/dist/lovrabet-skill','900YTcWOY','length','map','object','entries','replace','25124dVNzQP','apiDir','globalConfig','values'];a206_0x5d2f=function(){return _0x178a9b;};return a206_0x5d2f();}export function getTemplateBaseUrl(_0x372f9b){const _0x2f93c4=a206_0x5036,_0x5e1d9b=readRawConfig(_0x372f9b);if(_0x5e1d9b[_0x2f93c4(0xde)]&&typeof _0x5e1d9b[_0x2f93c4(0xde)]===_0x2f93c4(0xc6))return _0x5e1d9b[_0x2f93c4(0xde)][_0x2f93c4(0xd5)](/\/$/,'');return _0x2f93c4(0xcf);}function buildConfig(_0x4ee4e7,_0x31ff5c,_0x2db239){return{...resolveAppConfig({'raw':_0x4ee4e7,'flags':_0x31ff5c,'layers':_0x2db239,'readEnv':env}),'raw':_0x4ee4e7};}function a206_0x5036(_0x38698a,_0x3f67c2){_0x38698a=_0x38698a-0xba;const _0x5d2f3f=a206_0x5d2f();let _0x503683=_0x5d2f3f[_0x38698a];return _0x503683;}export function resolveApiFilePath(_0x3b8606,_0x310130){const _0x411077=a206_0x5036,_0x13546e=resolve(process[_0x411077(0xbd)](),_0x3b8606),_0x51e071=resolve(_0x13546e,'api.ts');if(!_0x310130)return _0x51e071;const _0x370668=readRawConfig(),_0x2bda53=_0x370668['apps']&&typeof _0x370668[_0x411077(0xe0)]===_0x411077(0xd3)?_0x370668[_0x411077(0xe0)]:{},_0x5a2ea7=Object[_0x411077(0xd4)](_0x2bda53)['find'](([,_0x54d9db])=>_0x54d9db?.[_0x411077(0xdd)]===_0x310130);if(!_0x5a2ea7)return _0x51e071;const [_0x5bf382,_0x4544f5]=_0x5a2ea7,_0x172d32=typeof _0x370668[_0x411077(0xe1)]===_0x411077(0xc6)?_0x370668[_0x411077(0xe1)]:undefined;if(_0x4544f5?.[_0x411077(0xd7)])return _0x51e071;if(_0x172d32&&_0x5bf382!==_0x172d32)return resolve(_0x13546e,_0x5bf382+_0x411077(0xcc));return _0x51e071;}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 通用数据集别名解析层
|
|
3
|
+
*
|
|
4
|
+
* 从 `rabetbase api pull` 生成的 api.ts 中提取 alias → datasetCode 映射。
|
|
5
|
+
* --alias 参数接受 api.ts 中定义的 alias 名称,解析为对应的 datasetCode。
|
|
6
|
+
*
|
|
7
|
+
* 无 api.ts 时(CI 环境未 pull)返回 undefined,由调用方报错。
|
|
8
|
+
*/
|
|
9
|
+
export interface AliasEntry {
|
|
10
|
+
alias: string;
|
|
11
|
+
datasetCode: string;
|
|
12
|
+
tableName: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 加载并缓存指定 api 文件的别名映射。
|
|
17
|
+
*
|
|
18
|
+
* @param apiDir api 目录(用于默认路径兜底)
|
|
19
|
+
* @param appCode (已废弃,保留签名兼容)不再用于内部路径解析
|
|
20
|
+
* @param resolvedFilePath 已解析好的 api.ts 绝对/相对路径;
|
|
21
|
+
* 多应用场景由调用方通过 resolveApiFilePath() 传入
|
|
22
|
+
*/
|
|
23
|
+
export declare function loadAliasMap(apiDir: string, appCode?: string, resolvedFilePath?: string): AliasEntry[];
|
|
24
|
+
/**
|
|
25
|
+
* 通过 alias 名称解析 datasetCode。
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveAlias(apiDir: string, alias: string, appCode?: string, resolvedFilePath?: string): string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* 列出所有可用的别名(用于 help、补全、错误提示等场景)
|
|
30
|
+
*/
|
|
31
|
+
export declare function listAliases(apiDir: string, appCode?: string, resolvedFilePath?: string): AliasEntry[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x24bf44,_0x59a197){const _0x3aedfd=a207_0x3ec7,_0x20b48e=_0x24bf44();while(!![]){try{const _0x276bf2=-parseInt(_0x3aedfd(0xa5))/0x1+-parseInt(_0x3aedfd(0xaf))/0x2*(-parseInt(_0x3aedfd(0xac))/0x3)+-parseInt(_0x3aedfd(0xb3))/0x4+-parseInt(_0x3aedfd(0xad))/0x5+-parseInt(_0x3aedfd(0xa9))/0x6+-parseInt(_0x3aedfd(0xb0))/0x7*(-parseInt(_0x3aedfd(0xa7))/0x8)+parseInt(_0x3aedfd(0xa4))/0x9;if(_0x276bf2===_0x59a197)break;else _0x20b48e['push'](_0x20b48e['shift']());}catch(_0x83e7d4){_0x20b48e['push'](_0x20b48e['shift']());}}}(a207_0x5093,0x2a75c));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x26e700){const _0x44a672=a207_0x3ec7,_0x499d28=[],_0x23d8f5=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x6c373e;while((_0x6c373e=_0x23d8f5['exec'](_0x26e700))!==null){_0x499d28[_0x44a672(0xab)]({'datasetCode':_0x6c373e[0x1],'tableName':_0x6c373e[0x2],'name':_0x6c373e[0x3],'alias':_0x6c373e[0x4]});}return _0x499d28;}function a207_0x3ec7(_0x1ec3ba,_0xbc36d8){_0x1ec3ba=_0x1ec3ba-0xa3;const _0x509343=a207_0x5093();let _0x3ec701=_0x509343[_0x1ec3ba];return _0x3ec701;}export function loadAliasMap(_0x429308,_0x557c9f,_0x2dac39){const _0x481c13=a207_0x3ec7,_0x5a20af=_0x2dac39??resolve(process['cwd'](),_0x429308,_0x481c13(0xb2));if(cache[_0x481c13(0xaa)](_0x5a20af))return cache[_0x481c13(0xa6)](_0x5a20af);if(!existsSync(_0x5a20af))return cache[_0x481c13(0xa3)](_0x5a20af,[]),[];try{const _0x120306=readFileSync(_0x5a20af,_0x481c13(0xb1)),_0xee9760=parseApiFile(_0x120306);return cache[_0x481c13(0xa3)](_0x5a20af,_0xee9760),_0xee9760;}catch{return cache[_0x481c13(0xa3)](_0x5a20af,[]),[];}}export function resolveAlias(_0x20958a,_0x4097c6,_0x248202,_0x7f5ae7){const _0x291406=a207_0x3ec7;if(!_0x4097c6)return undefined;const _0x8bcead=loadAliasMap(_0x20958a,_0x248202,_0x7f5ae7),_0x5bba0a=_0x8bcead[_0x291406(0xae)](_0x5d2d4a=>_0x5d2d4a['alias']===_0x4097c6);return _0x5bba0a?.[_0x291406(0xa8)];}function a207_0x5093(){const _0x1d0e2f=['8RmaztP','5803XJvRwm','utf-8','api.ts','1107280wDWuCT','set','5054697pxvMwF','347792yaIxDR','get','872Kjvgok','datasetCode','85776lVupzF','has','push','134598shPapt','93170njqMWZ','find'];a207_0x5093=function(){return _0x1d0e2f;};return a207_0x5093();}export function listAliases(_0xd68588,_0x2578e5,_0x3a5013){return loadAliasMap(_0xd68588,_0x2578e5,_0x3a5013);}
|