@lovrabet/rabetbase-cli 2.3.16-beta.4 → 2.3.16-beta.5
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/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a196_0x156f69=a196_0xf7e3;function a196_0xf7e3(_0x39f8df,_0x408968){_0x39f8df=_0x39f8df-0x14e;const _0x145d9d=a196_0x145d();let _0xf7e3a9=_0x145d9d[_0x39f8df];return _0xf7e3a9;}(function(_0x320e2a,_0x4717b4){const _0x33002f=a196_0xf7e3,_0x3720bd=_0x320e2a();while(!![]){try{const _0x1dff03=-parseInt(_0x33002f(0x170))/0x1+parseInt(_0x33002f(0x174))/0x2*(-parseInt(_0x33002f(0x15b))/0x3)+parseInt(_0x33002f(0x1b0))/0x4+parseInt(_0x33002f(0x1bf))/0x5*(parseInt(_0x33002f(0x166))/0x6)+parseInt(_0x33002f(0x196))/0x7+-parseInt(_0x33002f(0x1bd))/0x8+-parseInt(_0x33002f(0x16c))/0x9*(-parseInt(_0x33002f(0x163))/0xa);if(_0x1dff03===_0x4717b4)break;else _0x3720bd['push'](_0x3720bd['shift']());}catch(_0x1c4533){_0x3720bd['push'](_0x3720bd['shift']());}}}(a196_0x145d,0x52632));export const CLI_BIN_NAME=a196_0x156f69(0x1b6);export const CLI_DISPLAY_NAME=a196_0x156f69(0x1a5);function a196_0x145d(){const _0x5e4404=['clear','name','title','Verbose\x20output','menuIds','dry-run','parentId','Code\x20filter','production\x20|\x20daily','972153UAYVKJ','non-interactive','expect-parent-id','sql','Output\x20path','functionNode','SQL\x20string','env','Operation\x20type','Comma-separated\x20menu\x20IDs','menu-ids','type','Record\x20ID','Page\x20size','global','Rabetbase\x20CLI','sqlcode','operation-type','string','key','yes','datasetcode','expect-path','fromEnv','Apply\x20to\x20all','Menu\x20label','2601116FTYExX','taskId','output','dbid','Expected\x20current\x20menu\x20path','file','rabetbase','Config\x20key','fromEntries','Target\x20path','Alias\x20for\x20--non-interactive','json\x20|\x20pretty\x20|\x20compress','stdin','2573984fnZpYE','descriptionFile','8425vGoOQu','operation','enable-bff-save','expected-children-count','description-file','label','Title','tags','File\x20path','target','expectPath','from-env','Page\x20number','Schemas','<name>','sqlName','SQL\x20name','Expected\x20affected\x20count','Keyword\x20filter','Use\x20project\x20config\x20scope','Force\x20overwrite','params','expectParentId','confirm','nonInteractive','operationType','reveal','watch','dryRun','Select\x20app\x20profile\x20by\x20name','Enable\x20BFF\x20save','skipImports','Use\x20global\x20config\x20scope','expectedChildrenCount','task-id','Asynchronous\x20task\x20ID','1057074odUcXq','function-node','skip-imports','verbose','Dataset\x20code','Override\x20appcode','Watch\x20mode','format','132520IrOYHf','Expected\x20current\x20child\x20count','value','1698RmOqqt','Environment','Read\x20value\x20from\x20stdin','Read\x20value\x20from\x20environment\x20variable','Menu\x20sort\x20value','boolean','171utDUvy','sqlname','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Use\x20remote','506237SuYnvR','enableBffSave','Output\x20format','keyword','2eNTKzT','sql-name','Parent\x20menu\x20id','help','project','schemas','Show\x20help','pagesize','JSON\x20params','DB\x20ID','Config\x20value','app','map','Description','all','Description\x20file','code','SQL\x20code','page','sort','remote','force','Clear','appcode','<code>'];a196_0x145d=function(){return _0x5e4404;};return a196_0x145d();}export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':a196_0x156f69(0x18b),'meowKey':a196_0x156f69(0x18b),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x160),'hint':a196_0x156f69(0x18c)},{'name':a196_0x156f69(0x17f),'meowKey':a196_0x156f69(0x17f),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x154),'hint':a196_0x156f69(0x1cd)},{'name':a196_0x156f69(0x19d),'meowKey':'env','type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x167),'hint':a196_0x156f69(0x195)},{'name':'format','meowKey':a196_0x156f69(0x162),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x172),'hint':a196_0x156f69(0x1bb)},{'name':'jq','meowKey':'jq','type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x16e),'hint':'<expr>'},{'name':'dry-run','meowKey':a196_0x156f69(0x153),'type':a196_0x156f69(0x16b),'description':'Preview\x20operation\x20without\x20executing'},{'name':'yes','meowKey':a196_0x156f69(0x1aa),'type':a196_0x156f69(0x16b),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':'non-interactive','meowKey':a196_0x156f69(0x14f),'type':a196_0x156f69(0x16b),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a196_0x156f69(0x1a4),'meowKey':a196_0x156f69(0x1a4),'type':'boolean','description':a196_0x156f69(0x157)},{'name':a196_0x156f69(0x178),'meowKey':a196_0x156f69(0x178),'type':'boolean','description':a196_0x156f69(0x1d2)},{'name':'ci','meowKey':'ci','type':a196_0x156f69(0x16b),'description':a196_0x156f69(0x1ba),'hidden':!![]},{'name':'help','meowKey':a196_0x156f69(0x177),'type':a196_0x156f69(0x16b),'description':a196_0x156f69(0x17a)},{'name':a196_0x156f69(0x18e),'meowKey':'name','type':a196_0x156f69(0x1a8),'description':'Name','hidden':!![]},{'name':a196_0x156f69(0x18f),'meowKey':a196_0x156f69(0x18f),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x1c5),'hidden':!![]},{'name':a196_0x156f69(0x18d),'meowKey':a196_0x156f69(0x18d),'type':a196_0x156f69(0x16b),'description':a196_0x156f69(0x18a),'hidden':!![]},{'name':a196_0x156f69(0x152),'meowKey':a196_0x156f69(0x152),'type':a196_0x156f69(0x16b),'description':a196_0x156f69(0x161),'hidden':!![]},{'name':a196_0x156f69(0x1b2),'meowKey':'output','type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x19a),'hidden':!![]},{'name':a196_0x156f69(0x1d4),'meowKey':'params','type':'string','description':a196_0x156f69(0x17c),'hidden':!![]},{'name':a196_0x156f69(0x1ab),'meowKey':'datasetcode','type':'string','description':a196_0x156f69(0x15f),'hidden':!![]},{'name':a196_0x156f69(0x182),'meowKey':a196_0x156f69(0x182),'type':a196_0x156f69(0x16b),'description':a196_0x156f69(0x1ae),'hidden':!![]},{'name':a196_0x156f69(0x1c1),'meowKey':a196_0x156f69(0x171),'type':'boolean','description':a196_0x156f69(0x155),'hidden':!![]},{'name':'id','meowKey':'id','type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x1a2),'hidden':!![]},{'name':a196_0x156f69(0x1a1),'meowKey':'type','type':a196_0x156f69(0x1a8),'description':'Type\x20filter','hidden':!![]},{'name':'file','meowKey':a196_0x156f69(0x1b5),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x1c7),'hidden':!![]},{'name':'sqlcode','meowKey':a196_0x156f69(0x1a6),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x185),'hidden':!![]},{'name':a196_0x156f69(0x175),'meowKey':a196_0x156f69(0x1ce),'type':'string','description':'SQL\x20name','hidden':!![]},{'name':a196_0x156f69(0x16d),'meowKey':a196_0x156f69(0x16d),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x1cf),'hidden':!![]},{'name':'db-id','meowKey':'dbId','type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x17d),'hidden':!![]},{'name':a196_0x156f69(0x1b3),'meowKey':a196_0x156f69(0x1b3),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x17d),'hidden':!![]},{'name':'description','meowKey':'description','type':'string','description':a196_0x156f69(0x181),'hidden':!![]},{'name':a196_0x156f69(0x1c3),'meowKey':a196_0x156f69(0x1be),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x183),'hidden':!![]},{'name':a196_0x156f69(0x186),'meowKey':a196_0x156f69(0x186),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x1cb),'hidden':!![]},{'name':a196_0x156f69(0x17b),'meowKey':a196_0x156f69(0x17b),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x1a3),'hidden':!![]},{'name':a196_0x156f69(0x173),'meowKey':a196_0x156f69(0x173),'type':'string','description':a196_0x156f69(0x1d1),'hidden':!![]},{'name':a196_0x156f69(0x184),'meowKey':'code','type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x194),'hidden':!![]},{'name':a196_0x156f69(0x199),'meowKey':a196_0x156f69(0x199),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x19c),'hidden':!![]},{'name':'schemas','meowKey':a196_0x156f69(0x179),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x1cc),'hidden':!![]},{'name':a196_0x156f69(0x1c0),'meowKey':a196_0x156f69(0x1c0),'type':'string','description':'Operation\x20type','hidden':!![]},{'name':a196_0x156f69(0x1c8),'meowKey':a196_0x156f69(0x1c8),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x1b9),'hidden':!![]},{'name':a196_0x156f69(0x15d),'meowKey':a196_0x156f69(0x156),'type':'boolean','description':'Skip\x20import\x20generation','hidden':!![]},{'name':a196_0x156f69(0x1a9),'meowKey':a196_0x156f69(0x1a9),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x1b7),'hidden':!![]},{'name':a196_0x156f69(0x165),'meowKey':a196_0x156f69(0x165),'type':'string','description':a196_0x156f69(0x17e),'hidden':!![]},{'name':a196_0x156f69(0x1c6),'meowKey':a196_0x156f69(0x1c6),'type':'string','description':'Tags','hidden':!![]},{'name':'stdin','meowKey':a196_0x156f69(0x1bc),'type':a196_0x156f69(0x16b),'description':a196_0x156f69(0x168),'hidden':!![]},{'name':a196_0x156f69(0x1ca),'meowKey':a196_0x156f69(0x1ad),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x169),'hidden':!![]},{'name':'reveal','meowKey':a196_0x156f69(0x151),'type':a196_0x156f69(0x16b),'description':'Reveal\x20sensitive\x20value','hidden':!![]},{'name':a196_0x156f69(0x189),'meowKey':a196_0x156f69(0x189),'type':a196_0x156f69(0x16b),'description':a196_0x156f69(0x1d3),'hidden':!![]},{'name':a196_0x156f69(0x14e),'meowKey':a196_0x156f69(0x14e),'type':a196_0x156f69(0x16b),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':a196_0x156f69(0x188),'meowKey':a196_0x156f69(0x188),'type':'boolean','description':a196_0x156f69(0x16f),'hidden':!![]},{'name':a196_0x156f69(0x15e),'meowKey':a196_0x156f69(0x15e),'type':'boolean','description':a196_0x156f69(0x190),'hidden':!![]},{'name':'expected-count','meowKey':'expectedCount','type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x1d0),'hidden':!![]},{'name':a196_0x156f69(0x1c4),'meowKey':a196_0x156f69(0x1c4),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x1af),'hidden':!![]},{'name':'parent-id','meowKey':a196_0x156f69(0x193),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x176),'hidden':!![]},{'name':a196_0x156f69(0x187),'meowKey':a196_0x156f69(0x187),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x16a),'hidden':!![]},{'name':a196_0x156f69(0x198),'meowKey':a196_0x156f69(0x1d5),'type':a196_0x156f69(0x1a8),'description':'Expected\x20current\x20parent\x20menu\x20id','hidden':!![]},{'name':a196_0x156f69(0x1ac),'meowKey':a196_0x156f69(0x1c9),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x1b4),'hidden':!![]},{'name':a196_0x156f69(0x1c2),'meowKey':a196_0x156f69(0x158),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x164),'hidden':!![]},{'name':a196_0x156f69(0x1a0),'meowKey':a196_0x156f69(0x191),'type':'string','description':a196_0x156f69(0x19f),'hidden':!![]},{'name':a196_0x156f69(0x159),'meowKey':a196_0x156f69(0x1b1),'type':a196_0x156f69(0x1a8),'description':a196_0x156f69(0x15a),'hidden':!![]},{'name':a196_0x156f69(0x1a7),'meowKey':a196_0x156f69(0x150),'type':'string','description':a196_0x156f69(0x19e),'hidden':!![]},{'name':a196_0x156f69(0x15c),'meowKey':a196_0x156f69(0x19b),'type':a196_0x156f69(0x1a8),'description':'Function\x20node','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a196_0x156f69(0x17f),a196_0x156f69(0x19d),a196_0x156f69(0x162),'jq',a196_0x156f69(0x192),a196_0x156f69(0x1aa),a196_0x156f69(0x197),'ci']);export function buildMeowFlags(){const _0xf71c09=a196_0x156f69;return Object[_0xf71c09(0x1b8)](GLOBAL_FLAGS[_0xf71c09(0x180)](_0x421af9=>[_0x421af9['meowKey'],{'type':_0x421af9['type']}]));}
|
|
1
|
+
const a196_0x37c696=a196_0x3f0f;(function(_0x5d6335,_0x256b67){const _0xd76e75=a196_0x3f0f,_0x5b8fa7=_0x5d6335();while(!![]){try{const _0x1f0a81=parseInt(_0xd76e75(0x1b3))/0x1+parseInt(_0xd76e75(0x225))/0x2*(parseInt(_0xd76e75(0x203))/0x3)+-parseInt(_0xd76e75(0x1e6))/0x4*(parseInt(_0xd76e75(0x1e2))/0x5)+parseInt(_0xd76e75(0x205))/0x6+parseInt(_0xd76e75(0x1ba))/0x7+-parseInt(_0xd76e75(0x1ee))/0x8*(parseInt(_0xd76e75(0x220))/0x9)+parseInt(_0xd76e75(0x1f5))/0xa*(-parseInt(_0xd76e75(0x1ed))/0xb);if(_0x1f0a81===_0x256b67)break;else _0x5b8fa7['push'](_0x5b8fa7['shift']());}catch(_0x175aca){_0x5b8fa7['push'](_0x5b8fa7['shift']());}}}(a196_0x5b62,0xc963c));function a196_0x5b62(){const _0x49427d=['Target\x20path','type','operation','task-id','expect-parent-id','skipImports','Read\x20value\x20from\x20stdin','descriptionFile','Clear','fromEnv','functionNode','format','Watch\x20mode','schemas','Reveal\x20sensitive\x20value','non-interactive','json\x20|\x20pretty\x20|\x20compress','clear','meowKey','Confirm\x20destructive\x20action','281583CWWsqZ','sqlname','enableBffSave','parentId','output','434YscRUj','force','confirm','taskId','enable-bff-save','Description','global','Name','stdin','Operation\x20type','boolean','Read\x20value\x20from\x20environment\x20variable','pagesize','349169zWBZlH','Rabetbase\x20CLI','key','page','Tags','sort','Expected\x20current\x20parent\x20menu\x20id','7424263MZsYSh','Apply\x20to\x20all','title','fromEntries','production\x20|\x20daily','sqlName','value','Show\x20help','expectPath','Page\x20number','env','menu-ids','JSON\x20params','SQL\x20name','<code>','project','yes','Schemas','DB\x20ID','Config\x20value','Force\x20non-interactive\x20mode\x20(CI)','File\x20path','appcode','Comma-separated\x20menu\x20IDs','SQL\x20string','string','Menu\x20label','keyword','target','expected-children-count','map','name','expectedChildrenCount','watch','db-id','Skip\x20confirmation\x20for\x20high-risk\x20writes','<name>','Override\x20appcode','<expr>','expectedCount','122815OhMIsP','Config\x20key','help','SQL\x20code','8YuJGdw','code','Dataset\x20code','Force\x20overwrite','Menu\x20sort\x20value','from-env','Enable\x20BFF\x20save','715wASyvx','56sujdiG','remote','datasetcode','Expected\x20affected\x20count','dry-run','params','Title','382030kEltuI','Expected\x20current\x20menu\x20path','reveal','label','expectParentId','app','description-file','Environment','Record\x20ID','sqlcode','Page\x20size','Use\x20remote','dbId','verbose','12963lQAzpW','tags','7372722bxPacK','Skip\x20import\x20generation','Asynchronous\x20task\x20ID','parent-id','Description\x20file','Output\x20path','dbid'];a196_0x5b62=function(){return _0x49427d;};return a196_0x5b62();}export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME=a196_0x37c696(0x1b4);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':a196_0x37c696(0x1d0),'meowKey':a196_0x37c696(0x1d0),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1df),'hint':a196_0x37c696(0x1c8)},{'name':'app','meowKey':'app','type':a196_0x37c696(0x1d3),'description':'Select\x20app\x20profile\x20by\x20name','hint':a196_0x37c696(0x1de)},{'name':'env','meowKey':a196_0x37c696(0x1c4),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1fc),'hint':a196_0x37c696(0x1be)},{'name':a196_0x37c696(0x217),'meowKey':a196_0x37c696(0x217),'type':'string','description':'Output\x20format','hint':a196_0x37c696(0x21c)},{'name':'jq','meowKey':'jq','type':'string','description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':a196_0x37c696(0x1e0)},{'name':a196_0x37c696(0x1f2),'meowKey':'dryRun','type':a196_0x37c696(0x1b0),'description':'Preview\x20operation\x20without\x20executing'},{'name':a196_0x37c696(0x1ca),'meowKey':a196_0x37c696(0x1ca),'type':'boolean','description':a196_0x37c696(0x1dd)},{'name':a196_0x37c696(0x21b),'meowKey':'nonInteractive','type':a196_0x37c696(0x1b0),'description':a196_0x37c696(0x1ce)},{'name':a196_0x37c696(0x1ac),'meowKey':a196_0x37c696(0x1ac),'type':a196_0x37c696(0x1b0),'description':'Use\x20global\x20config\x20scope'},{'name':'project','meowKey':a196_0x37c696(0x1c9),'type':a196_0x37c696(0x1b0),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a196_0x37c696(0x1b0),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a196_0x37c696(0x1e4),'meowKey':a196_0x37c696(0x1e4),'type':'boolean','description':a196_0x37c696(0x1c1)},{'name':a196_0x37c696(0x1d9),'meowKey':a196_0x37c696(0x1d9),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1ad),'hidden':!![]},{'name':a196_0x37c696(0x1bc),'meowKey':a196_0x37c696(0x1bc),'type':'string','description':a196_0x37c696(0x1f4),'hidden':!![]},{'name':a196_0x37c696(0x21d),'meowKey':a196_0x37c696(0x21d),'type':'boolean','description':a196_0x37c696(0x214),'hidden':!![]},{'name':a196_0x37c696(0x1db),'meowKey':'watch','type':a196_0x37c696(0x1b0),'description':a196_0x37c696(0x218),'hidden':!![]},{'name':a196_0x37c696(0x224),'meowKey':a196_0x37c696(0x224),'type':'string','description':a196_0x37c696(0x20a),'hidden':!![]},{'name':a196_0x37c696(0x1f3),'meowKey':'params','type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1c6),'hidden':!![]},{'name':'datasetcode','meowKey':a196_0x37c696(0x1f0),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1e8),'hidden':!![]},{'name':'all','meowKey':'all','type':a196_0x37c696(0x1b0),'description':a196_0x37c696(0x1bb),'hidden':!![]},{'name':a196_0x37c696(0x1aa),'meowKey':a196_0x37c696(0x222),'type':a196_0x37c696(0x1b0),'description':a196_0x37c696(0x1ec),'hidden':!![]},{'name':'id','meowKey':'id','type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1fd),'hidden':!![]},{'name':a196_0x37c696(0x20d),'meowKey':a196_0x37c696(0x20d),'type':a196_0x37c696(0x1d3),'description':'Type\x20filter','hidden':!![]},{'name':'file','meowKey':'file','type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1cf),'hidden':!![]},{'name':a196_0x37c696(0x1fe),'meowKey':a196_0x37c696(0x1fe),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1e5),'hidden':!![]},{'name':'sql-name','meowKey':a196_0x37c696(0x1bf),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1c7),'hidden':!![]},{'name':a196_0x37c696(0x221),'meowKey':a196_0x37c696(0x221),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1c7),'hidden':!![]},{'name':a196_0x37c696(0x1dc),'meowKey':a196_0x37c696(0x201),'type':'string','description':a196_0x37c696(0x1cc),'hidden':!![]},{'name':'dbid','meowKey':a196_0x37c696(0x20b),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1cc),'hidden':!![]},{'name':'description','meowKey':'description','type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1ab),'hidden':!![]},{'name':a196_0x37c696(0x1fb),'meowKey':a196_0x37c696(0x213),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x209),'hidden':!![]},{'name':a196_0x37c696(0x1b6),'meowKey':a196_0x37c696(0x1b6),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1c3),'hidden':!![]},{'name':a196_0x37c696(0x1b2),'meowKey':'pagesize','type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1ff),'hidden':!![]},{'name':a196_0x37c696(0x1d5),'meowKey':a196_0x37c696(0x1d5),'type':a196_0x37c696(0x1d3),'description':'Keyword\x20filter','hidden':!![]},{'name':a196_0x37c696(0x1e7),'meowKey':a196_0x37c696(0x1e7),'type':a196_0x37c696(0x1d3),'description':'Code\x20filter','hidden':!![]},{'name':'sql','meowKey':'sql','type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1d2),'hidden':!![]},{'name':a196_0x37c696(0x219),'meowKey':a196_0x37c696(0x219),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1cb),'hidden':!![]},{'name':'operation','meowKey':a196_0x37c696(0x20e),'type':'string','description':a196_0x37c696(0x1af),'hidden':!![]},{'name':a196_0x37c696(0x1d6),'meowKey':a196_0x37c696(0x1d6),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x20c),'hidden':!![]},{'name':'skip-imports','meowKey':a196_0x37c696(0x211),'type':a196_0x37c696(0x1b0),'description':a196_0x37c696(0x206),'hidden':!![]},{'name':a196_0x37c696(0x1b5),'meowKey':'key','type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1e3),'hidden':!![]},{'name':a196_0x37c696(0x1c0),'meowKey':a196_0x37c696(0x1c0),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1cd),'hidden':!![]},{'name':a196_0x37c696(0x204),'meowKey':a196_0x37c696(0x204),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1b7),'hidden':!![]},{'name':a196_0x37c696(0x1ae),'meowKey':a196_0x37c696(0x1ae),'type':a196_0x37c696(0x1b0),'description':a196_0x37c696(0x212),'hidden':!![]},{'name':a196_0x37c696(0x1eb),'meowKey':a196_0x37c696(0x215),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1b1),'hidden':!![]},{'name':a196_0x37c696(0x1f7),'meowKey':a196_0x37c696(0x1f7),'type':a196_0x37c696(0x1b0),'description':a196_0x37c696(0x21a),'hidden':!![]},{'name':'force','meowKey':a196_0x37c696(0x226),'type':a196_0x37c696(0x1b0),'description':a196_0x37c696(0x1e9),'hidden':!![]},{'name':a196_0x37c696(0x1a8),'meowKey':a196_0x37c696(0x1a8),'type':a196_0x37c696(0x1b0),'description':a196_0x37c696(0x21f),'hidden':!![]},{'name':a196_0x37c696(0x1ef),'meowKey':a196_0x37c696(0x1ef),'type':a196_0x37c696(0x1b0),'description':a196_0x37c696(0x200),'hidden':!![]},{'name':a196_0x37c696(0x202),'meowKey':a196_0x37c696(0x202),'type':a196_0x37c696(0x1b0),'description':'Verbose\x20output','hidden':!![]},{'name':'expected-count','meowKey':a196_0x37c696(0x1e1),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1f1),'hidden':!![]},{'name':a196_0x37c696(0x1f8),'meowKey':'label','type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1d4),'hidden':!![]},{'name':a196_0x37c696(0x208),'meowKey':a196_0x37c696(0x223),'type':'string','description':'Parent\x20menu\x20id','hidden':!![]},{'name':a196_0x37c696(0x1b8),'meowKey':a196_0x37c696(0x1b8),'type':'string','description':a196_0x37c696(0x1ea),'hidden':!![]},{'name':a196_0x37c696(0x210),'meowKey':a196_0x37c696(0x1f9),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1b9),'hidden':!![]},{'name':'expect-path','meowKey':a196_0x37c696(0x1c2),'type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1f6),'hidden':!![]},{'name':a196_0x37c696(0x1d7),'meowKey':a196_0x37c696(0x1da),'type':a196_0x37c696(0x1d3),'description':'Expected\x20current\x20child\x20count','hidden':!![]},{'name':a196_0x37c696(0x1c5),'meowKey':'menuIds','type':'string','description':a196_0x37c696(0x1d1),'hidden':!![]},{'name':a196_0x37c696(0x20f),'meowKey':a196_0x37c696(0x1a9),'type':'string','description':a196_0x37c696(0x207),'hidden':!![]},{'name':'operation-type','meowKey':'operationType','type':a196_0x37c696(0x1d3),'description':a196_0x37c696(0x1af),'hidden':!![]},{'name':'function-node','meowKey':a196_0x37c696(0x216),'type':a196_0x37c696(0x1d3),'description':'Function\x20node','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a196_0x37c696(0x1d0),a196_0x37c696(0x1fa),a196_0x37c696(0x1c4),a196_0x37c696(0x217),'jq',a196_0x37c696(0x1f2),a196_0x37c696(0x1ca),a196_0x37c696(0x21b),'ci']);function a196_0x3f0f(_0x395bc2,_0x2b478c){_0x395bc2=_0x395bc2-0x1a8;const _0x5b62a8=a196_0x5b62();let _0x3f0f5d=_0x5b62a8[_0x395bc2];return _0x3f0f5d;}export function buildMeowFlags(){const _0xc250=a196_0x37c696;return Object[_0xc250(0x1bd)](GLOBAL_FLAGS[_0xc250(0x1d8)](_0x3d42a8=>[_0x3d42a8[_0xc250(0x21e)],{'type':_0x3d42a8[_0xc250(0x20d)]}]));}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RABETBASE_ENV_VALUES } from "../constant/env.js";
|
|
2
|
+
import type { OutputFormat, Risk } from "../framework/types.js";
|
|
3
|
+
export declare const DEFAULT_CONFIG_VALUES: {
|
|
4
|
+
env: (typeof RABETBASE_ENV_VALUES)[number];
|
|
5
|
+
format: OutputFormat;
|
|
6
|
+
locale: string;
|
|
7
|
+
riskLevel: Risk;
|
|
8
|
+
apiDir: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const DEFAULT_COMMAND_OUTPUT_FORMAT: OutputFormat;
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a197_0x167fe6=a197_0x5b17;function a197_0x5b17(_0x4dab6f,_0xdb1c9a){_0x4dab6f=_0x4dab6f-0x64;const _0x19c9da=a197_0x19c9();let _0x5b1761=_0x19c9da[_0x4dab6f];return _0x5b1761;}function a197_0x19c9(){const _0x33da8a=['73808IXRNjs','746072VEPokF','3845172wJuSIG','41881180SBAuDx','1655745nKBumM','13176vugNfv','compress','high-risk-write','656ffOiax','3250ccTBMa','54KRTGyO','421895QluVto','5fBqOaE','production'];a197_0x19c9=function(){return _0x33da8a;};return a197_0x19c9();}(function(_0x264973,_0x4d0358){const _0x53587b=a197_0x5b17,_0x29bbdb=_0x264973();while(!![]){try{const _0x38795f=-parseInt(_0x53587b(0x68))/0x1*(parseInt(_0x53587b(0x6b))/0x2)+parseInt(_0x53587b(0x6e))/0x3+-parseInt(_0x53587b(0x6c))/0x4+-parseInt(_0x53587b(0x67))/0x5*(-parseInt(_0x53587b(0x66))/0x6)+-parseInt(_0x53587b(0x6a))/0x7*(parseInt(_0x53587b(0x64))/0x8)+-parseInt(_0x53587b(0x6f))/0x9*(parseInt(_0x53587b(0x65))/0xa)+parseInt(_0x53587b(0x6d))/0xb;if(_0x38795f===_0x4d0358)break;else _0x29bbdb['push'](_0x29bbdb['shift']());}catch(_0x289248){_0x29bbdb['push'](_0x29bbdb['shift']());}}}(a197_0x19c9,0xe8611));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a197_0x167fe6(0x69),'format':a197_0x167fe6(0x70),'locale':'en-US','riskLevel':a197_0x167fe6(0x71),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a197_0x167fe6(0x70);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 初始化自定义域名(从 .rabetbase.json 合并配置中读取)。
|
|
3
|
+
* 未配置的字段传 undefined,回退到默认域名。
|
|
4
|
+
*/
|
|
5
|
+
export declare function initDomains(domains?: {
|
|
6
|
+
apiDomain?: string;
|
|
7
|
+
userDomain?: string;
|
|
8
|
+
runtimeDomain?: string;
|
|
9
|
+
}): void;
|
|
10
|
+
export declare const getUserDomain: () => string;
|
|
11
|
+
export declare const getApiDomain: () => string;
|
|
12
|
+
export declare const getRuntimeDomain: () => string;
|
|
13
|
+
export declare const getAppDomain: () => "https://app.lovrabet.com" | "https://daily.lovrabet.com";
|
|
14
|
+
export declare const getAppBaseUrl: (appCode: string) => string;
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x1d9da1=a198_0x3a55;function a198_0x3a55(_0x583df2,_0x3c9dae){_0x583df2=_0x583df2-0x1a7;const _0x17db7f=a198_0x17db();let _0x3a5505=_0x17db7f[_0x583df2];return _0x3a5505;}(function(_0x115a27,_0x2d2be1){const _0x44c595=a198_0x3a55,_0x3670b1=_0x115a27();while(!![]){try{const _0x3fed9b=-parseInt(_0x44c595(0x1b5))/0x1*(-parseInt(_0x44c595(0x1b1))/0x2)+-parseInt(_0x44c595(0x1b9))/0x3*(parseInt(_0x44c595(0x1ad))/0x4)+parseInt(_0x44c595(0x1b8))/0x5*(-parseInt(_0x44c595(0x1be))/0x6)+-parseInt(_0x44c595(0x1b7))/0x7*(-parseInt(_0x44c595(0x1ac))/0x8)+parseInt(_0x44c595(0x1ba))/0x9*(parseInt(_0x44c595(0x1bc))/0xa)+parseInt(_0x44c595(0x1a9))/0xb+parseInt(_0x44c595(0x1ab))/0xc*(-parseInt(_0x44c595(0x1b0))/0xd);if(_0x3fed9b===_0x2d2be1)break;else _0x3670b1['push'](_0x3670b1['shift']());}catch(_0x1099b9){_0x3670b1['push'](_0x3670b1['shift']());}}}(a198_0x17db,0x9c28a));import{getEnv,isProduction}from'../constant/env.js';function a198_0x17db(){const _0x5884ed=['https://user-daily.lovrabet.com','90996ZexDwR','200UvCvdr','279204WjONox','https://daily-runtime.lovrabet.com','userDomain','1742zBvhjF','1825872YmUqED','/web-app/app/','https://daily.lovrabet.com','https://runtime.lovrabet.com','1syKyHQ','https://daily-api.lovrabet.com','76104TbYlcv','292295qyNYAy','33qCwlua','13446YfxkLr','https://user.lovrabet.com','6680kkUePp','/app/','6IioLGS','https://api.lovrabet.com','https://app.lovrabet.com','apiDomain','trim','3292190TLKPJs'];a198_0x17db=function(){return _0x5884ed;};return a198_0x17db();}let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x270460){const _0x5cfc72=a198_0x3a55;customApiDomain=_0x270460?.[_0x5cfc72(0x1a7)],customUserDomain=_0x270460?.[_0x5cfc72(0x1af)],customRuntimeDomain=_0x270460?.['runtimeDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a198_0x1d9da1(0x1bb):a198_0x1d9da1(0x1aa));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a198_0x1d9da1(0x1bf):a198_0x1d9da1(0x1b6));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a198_0x1d9da1(0x1b4):a198_0x1d9da1(0x1ae));export const getAppDomain=()=>isProduction(getEnv())?a198_0x1d9da1(0x1c0):a198_0x1d9da1(0x1b3);export const getAppBaseUrl=_0x1d4c02=>{const _0x109b2a=a198_0x1d9da1,_0x54b5b9=encodeURIComponent(_0x1d4c02[_0x109b2a(0x1a8)]());return isProduction(getEnv())?getAppDomain()+_0x109b2a(0x1bd)+_0x54b5b9:getAppDomain()+_0x109b2a(0x1b2)+_0x54b5b9;};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const RABETBASE_ENV_VALUES: readonly ["production", "daily"];
|
|
2
|
+
/** 将旧的 "online" 别名统一规范为 "production" */
|
|
3
|
+
export declare function normalizeEnv(e: string): string;
|
|
4
|
+
/** 是否生产(线上)环境(含旧别名 `online`) */
|
|
5
|
+
export declare function isProduction(e: string): boolean;
|
|
6
|
+
/** 是否 daily 环境 */
|
|
7
|
+
export declare function isDaily(e: string): boolean;
|
|
8
|
+
/** 是否开发环境(与 @lovrabet/sdk 的 development 常见写法对齐) */
|
|
9
|
+
export declare function isDev(e: string): boolean;
|
|
10
|
+
export declare function getEnv(): string;
|
|
11
|
+
export declare function initEnv(_env: string): void;
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a199_0x133c0c=a199_0x4e74;(function(_0x2cba46,_0x254321){const _0x209407=a199_0x4e74,_0x323d82=_0x2cba46();while(!![]){try{const _0x1de5bd=parseInt(_0x209407(0x1f4))/0x1*(-parseInt(_0x209407(0x1f1))/0x2)+-parseInt(_0x209407(0x1eb))/0x3+-parseInt(_0x209407(0x1f9))/0x4*(parseInt(_0x209407(0x1f6))/0x5)+-parseInt(_0x209407(0x1f2))/0x6+parseInt(_0x209407(0x1ed))/0x7+-parseInt(_0x209407(0x1ef))/0x8*(-parseInt(_0x209407(0x1f3))/0x9)+parseInt(_0x209407(0x1ee))/0xa;if(_0x1de5bd===_0x254321)break;else _0x323d82['push'](_0x323d82['shift']());}catch(_0x1909f4){_0x323d82['push'](_0x323d82['shift']());}}}(a199_0x29a3,0xd5c0d));export const RABETBASE_ENV_VALUES=[a199_0x133c0c(0x1ec),a199_0x133c0c(0x1f0)];export function normalizeEnv(_0x16b4b3){const _0x27bc27=a199_0x133c0c;return _0x16b4b3===_0x27bc27(0x1f8)?_0x27bc27(0x1ec):_0x16b4b3;}export function isProduction(_0xa1c4c7){const _0x1d687e=a199_0x133c0c;return normalizeEnv(_0xa1c4c7)===_0x1d687e(0x1ec);}export function isDaily(_0x1cded0){const _0x477f94=a199_0x133c0c;return normalizeEnv(_0x1cded0)===_0x477f94(0x1f0);}export function isDev(_0x837eaa){const _0x508f7c=a199_0x133c0c,_0x4266bc=normalizeEnv(_0x837eaa);return _0x4266bc===_0x508f7c(0x1f7)||_0x4266bc===_0x508f7c(0x1f5);}function a199_0x4e74(_0x2514b1,_0x151368){_0x2514b1=_0x2514b1-0x1eb;const _0x29a305=a199_0x29a3();let _0x4e7423=_0x29a305[_0x2514b1];return _0x4e7423;}function a199_0x29a3(){const _0x25a1e3=['2683062yEDrsQ','2565378WkmdyT','1gnXZbx','dev','2117620nMQUrl','development','online','4pXBTBG','860253bazHRh','production','43274QNbvGT','21340600dVomko','8ZioGak','daily','784598hstaoJ'];a199_0x29a3=function(){return _0x25a1e3;};return a199_0x29a3();}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a199_0x133c0c(0x1ec));export function getEnv(){return env;}export function initEnv(_0x3f3f6f){env=normalizeEnv(_0x3f3f6f);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RABETBASE_OUTPUT_FORMAT_VALUES: readonly ["json", "pretty", "compress"];
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0x1c9657=a200_0x362d;(function(_0x438949,_0x38358e){const _0x26b4ac=a200_0x362d,_0x236f3d=_0x438949();while(!![]){try{const _0x30185a=parseInt(_0x26b4ac(0x1b8))/0x1*(-parseInt(_0x26b4ac(0x1bc))/0x2)+parseInt(_0x26b4ac(0x1c0))/0x3+parseInt(_0x26b4ac(0x1b9))/0x4+-parseInt(_0x26b4ac(0x1c2))/0x5+parseInt(_0x26b4ac(0x1c3))/0x6*(-parseInt(_0x26b4ac(0x1bf))/0x7)+-parseInt(_0x26b4ac(0x1bd))/0x8*(-parseInt(_0x26b4ac(0x1c1))/0x9)+-parseInt(_0x26b4ac(0x1b7))/0xa*(-parseInt(_0x26b4ac(0x1be))/0xb);if(_0x30185a===_0x38358e)break;else _0x236f3d['push'](_0x236f3d['shift']());}catch(_0x1de1c7){_0x236f3d['push'](_0x236f3d['shift']());}}}(a200_0x246e,0x9ec0e));function a200_0x362d(_0x1da899,_0x27b48c){_0x1da899=_0x1da899-0x1b7;const _0x246e72=a200_0x246e();let _0x362dba=_0x246e72[_0x1da899];return _0x362dba;}function a200_0x246e(){const _0x3b3712=['json','163558FqUOGi','8hzXGhD','55AFgxlH','10577cYsrYm','1868142WeZssy','8673012cVehwc','3045705AzANth','5118migtIa','2560420aWAHXg','7LCbssp','1016556YWKSOJ','compress'];a200_0x246e=function(){return _0x3b3712;};return a200_0x246e();}export const RABETBASE_OUTPUT_FORMAT_VALUES=[a200_0x1c9657(0x1bb),'pretty',a200_0x1c9657(0x1ba)];
|
package/lib/constant/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a201_0x219168=a201_0x4cf3;(function(_0x3172fc,_0xf779af){const _0x5a4b16=a201_0x4cf3,_0x4a4cf8=_0x3172fc();while(!![]){try{const _0x413a5b=parseInt(_0x5a4b16(0x114))/0x1+parseInt(_0x5a4b16(0x10e))/0x2*(-parseInt(_0x5a4b16(0x111))/0x3)+-parseInt(_0x5a4b16(0x112))/0x4+parseInt(_0x5a4b16(0x10c))/0x5+parseInt(_0x5a4b16(0x10f))/0x6*(-parseInt(_0x5a4b16(0x10d))/0x7)+parseInt(_0x5a4b16(0x10b))/0x8+-parseInt(_0x5a4b16(0x115))/0x9*(-parseInt(_0x5a4b16(0x110))/0xa);if(_0x413a5b===_0xf779af)break;else _0x4a4cf8['push'](_0x4a4cf8['shift']());}catch(_0x1d106f){_0x4a4cf8['push'](_0x4a4cf8['shift']());}}}(a201_0xc258,0x6b89c));function a201_0x4cf3(_0x4de474,_0x7afea4){_0x4de474=_0x4de474-0x10b;const _0xc258b2=a201_0xc258();let _0x4cf3f2=_0xc258b2[_0x4de474];return _0x4cf3f2;}function a201_0xc258(){const _0x26834e=['100gxIqmx','33wPureE','2340332rCkiBQ','./src/api','823141qPkdTK','959112KrUVOG','1584328gKKmwU','370795oRfpJC','3283WBWYDd','120578ORBAKf','6042BIaFhT'];a201_0xc258=function(){return _0x26834e;};return a201_0xc258();}export const DEFAULT_API_DIR=a201_0x219168(0x113);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RISK_LEVEL_VALUES: readonly ["read", "write", "high-risk-write"];
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a202_0x8822fc=a202_0x4f6e;function a202_0x54b7(){const _0x3aad8b=['7663411BMyHfp','45AxyZvZ','6491960Oudtje','76100AgXsRk','34610022GPFTmf','8192670HFpknv','high-risk-write','226731cTbLrA','read','1343138NuDzoZ','write','36lDqREt'];a202_0x54b7=function(){return _0x3aad8b;};return a202_0x54b7();}function a202_0x4f6e(_0x398fef,_0x4214e9){_0x398fef=_0x398fef-0x1d4;const _0x54b75b=a202_0x54b7();let _0x4f6e09=_0x54b75b[_0x398fef];return _0x4f6e09;}(function(_0x56de12,_0x1a7754){const _0x1653f2=a202_0x4f6e,_0x3f9f96=_0x56de12();while(!![]){try{const _0x77f4eb=-parseInt(_0x1653f2(0x1dc))/0x1+parseInt(_0x1653f2(0x1de))/0x2*(-parseInt(_0x1653f2(0x1da))/0x3)+parseInt(_0x1653f2(0x1d6))/0x4*(parseInt(_0x1653f2(0x1d4))/0x5)+parseInt(_0x1653f2(0x1d8))/0x6+-parseInt(_0x1653f2(0x1df))/0x7+-parseInt(_0x1653f2(0x1d5))/0x8+parseInt(_0x1653f2(0x1d7))/0x9;if(_0x77f4eb===_0x1a7754)break;else _0x3f9f96['push'](_0x3f9f96['shift']());}catch(_0x34f277){_0x3f9f96['push'](_0x3f9f96['shift']());}}}(a202_0x54b7,0xbc954));export const RISK_LEVEL_VALUES=[a202_0x8822fc(0x1db),a202_0x8822fc(0x1dd),a202_0x8822fc(0x1d9)];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type OutputFormat, type Risk } from "../framework/types.js";
|
|
2
|
+
import type { RawConfigLayers } from "../context/config-loader.js";
|
|
3
|
+
export interface AppProfile {
|
|
4
|
+
appcode: string;
|
|
5
|
+
env?: "production" | "daily";
|
|
6
|
+
apiDir?: string;
|
|
7
|
+
cookie?: string;
|
|
8
|
+
accessKey?: string;
|
|
9
|
+
format?: OutputFormat;
|
|
10
|
+
pageSize?: number;
|
|
11
|
+
riskLevel?: Risk;
|
|
12
|
+
locale?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ResolvedAppConfig {
|
|
15
|
+
appCode: string | undefined;
|
|
16
|
+
env: "production" | "daily";
|
|
17
|
+
locale: string;
|
|
18
|
+
cookie: string | undefined;
|
|
19
|
+
accessKey: string | undefined;
|
|
20
|
+
format: OutputFormat | undefined;
|
|
21
|
+
pageSize: number | undefined;
|
|
22
|
+
riskLevel: Risk;
|
|
23
|
+
verbose: boolean;
|
|
24
|
+
apiDir: string;
|
|
25
|
+
apps: Record<string, AppProfile>;
|
|
26
|
+
defaultApp: string | undefined;
|
|
27
|
+
currentApp: string | undefined;
|
|
28
|
+
explicitAppName: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
export interface ResolveAppConfigOptions {
|
|
31
|
+
raw: Record<string, any>;
|
|
32
|
+
flags: Record<string, any>;
|
|
33
|
+
layers?: RawConfigLayers;
|
|
34
|
+
readEnv: (name: string) => string | undefined;
|
|
35
|
+
}
|
|
36
|
+
export declare function resolveAppConfig({ raw, flags, layers, readEnv, }: ResolveAppConfigOptions): ResolvedAppConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1e86a8,_0x4254b2){const _0x38bdd2=a203_0x2a23,_0x27c67b=_0x1e86a8();while(!![]){try{const _0x5e2a34=-parseInt(_0x38bdd2(0x8e))/0x1*(parseInt(_0x38bdd2(0x91))/0x2)+-parseInt(_0x38bdd2(0x8d))/0x3+parseInt(_0x38bdd2(0x8c))/0x4*(parseInt(_0x38bdd2(0x87))/0x5)+parseInt(_0x38bdd2(0x86))/0x6*(parseInt(_0x38bdd2(0x6b))/0x7)+-parseInt(_0x38bdd2(0x94))/0x8+parseInt(_0x38bdd2(0x7c))/0x9*(parseInt(_0x38bdd2(0x85))/0xa)+parseInt(_0x38bdd2(0x6e))/0xb;if(_0x5e2a34===_0x4254b2)break;else _0x27c67b['push'](_0x27c67b['shift']());}catch(_0x133333){_0x27c67b['push'](_0x27c67b['shift']());}}}(a203_0x30ad,0x65f3e));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a203_0x2a23(_0x5033be,_0x44eb4e){_0x5033be=_0x5033be-0x6b;const _0x30adff=a203_0x30ad();let _0x2a2346=_0x30adff[_0x5033be];return _0x2a2346;}import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';function a203_0x30ad(){const _0x27c0d5=['280ycdUSs','1413963AnXMkL','407791efHCCd','projectConfig','call','2SrNron','VERBOSE','keys','3369000SKIRbh','format','production','entries','1386469gFAUNE','globalConfig','apiDir','8461838oemLdL','apps','app','trim','string','accessKey','riskLevel','RISK_LEVEL','ENV','prototype','cookie','read','hasOwnProperty','write','1395KgrHMM','length','locale','appcode','env','daily','object','COOKIE','high-risk-write','3200ZxRImM','6oYJqSo','50065jodRPU','PAGE_SIZE','true','defaultApp','maxRisk'];a203_0x30ad=function(){return _0x27c0d5;};return a203_0x30ad();}function stringConfigValue(_0x2b5e97){const _0x2bc124=a203_0x2a23;return typeof _0x2b5e97===_0x2bc124(0x72)&&_0x2b5e97['trim']()?_0x2b5e97[_0x2bc124(0x71)]():undefined;}function appProfiles(_0x219a49){const _0x10cdcf=a203_0x2a23;return _0x219a49[_0x10cdcf(0x6f)]&&typeof _0x219a49['apps']===_0x10cdcf(0x82)?_0x219a49[_0x10cdcf(0x6f)]:{};}function resolveDefaultAppName(_0x491e61){const _0x645f41=a203_0x2a23,_0x5259db=stringConfigValue(_0x491e61[_0x645f41(0x8a)]);if(_0x5259db)return _0x5259db;return Object[_0x645f41(0x93)](appProfiles(_0x491e61))[0x0];}function resolveTopLevelAppCode(_0x33d7ac){const _0x4d026e=a203_0x2a23;return stringConfigValue(_0x33d7ac[_0x4d026e(0x7f)])||stringConfigValue(_0x33d7ac[_0x4d026e(0x70)]);}function normalizeRiskCeiling(_0x58fc8d){const _0x4d6bac=a203_0x2a23;if(_0x58fc8d===undefined||_0x58fc8d===null)return undefined;if(_0x58fc8d===_0x4d6bac(0x79)||_0x58fc8d===_0x4d6bac(0x7b)||_0x58fc8d===_0x4d6bac(0x84))return _0x58fc8d;return _0x4d6bac(0x79);}function resolveRiskCeiling(..._0x59d50d){const _0x1ca00d=a203_0x2a23;let _0x496cbd=DEFAULT_CONFIG_VALUES[_0x1ca00d(0x74)];for(const _0x1f93ad of _0x59d50d){const _0x97ae31=normalizeRiskCeiling(_0x1f93ad);_0x97ae31&&riskLevelOrder(_0x97ae31)<riskLevelOrder(_0x496cbd)&&(_0x496cbd=_0x97ae31);}return _0x496cbd;}function configuredRiskCeilings(_0x9001d5){const _0x1cbcee=a203_0x2a23;return[...Object[_0x1cbcee(0x77)][_0x1cbcee(0x7a)][_0x1cbcee(0x90)](_0x9001d5,_0x1cbcee(0x8b))?[_0x9001d5[_0x1cbcee(0x8b)]]:[],...Object[_0x1cbcee(0x77)][_0x1cbcee(0x7a)][_0x1cbcee(0x90)](_0x9001d5,'riskLevel')?[_0x9001d5[_0x1cbcee(0x74)]]:[]];}export function resolveAppConfig({raw:_0x4a011a,flags:_0xcdf84f,layers:_0x3b06bf,readEnv:_0xb96291}){const _0x31c825=a203_0x2a23,_0xa4d5e2=_0x3b06bf?.[_0x31c825(0x8f)]??{},_0x292544=_0x3b06bf?.[_0x31c825(0x6c)]??{},_0x20a156=Object['keys'](_0xa4d5e2)[_0x31c825(0x7d)]>0x0,_0x5cd729=!_0x20a156||_0xa4d5e2['inherit']===!![],_0x1d4f7c=_0x20a156?resolveDefaultAppName(_0xa4d5e2):undefined,_0x59312d=_0x5cd729?resolveDefaultAppName(_0x292544):undefined,_0x56e481=stringConfigValue(_0xcdf84f[_0x31c825(0x70)]),_0x3e560c=_0xb96291('APP'),_0x46d551={};if(_0x4a011a['apps']&&typeof _0x4a011a[_0x31c825(0x6f)]===_0x31c825(0x82))for(const [_0xc86c57,_0x2fb544]of Object[_0x31c825(0x97)](_0x4a011a[_0x31c825(0x6f)])){_0x2fb544&&typeof _0x2fb544===_0x31c825(0x82)&&_0x2fb544[_0x31c825(0x7f)]&&(_0x46d551[_0xc86c57]=_0x2fb544);}const _0x44189b=_0x4a011a[_0x31c825(0x8a)]||undefined,_0x4adb8a=Object['keys'](_0x46d551)['length']>0x0,_0x4d1578=_0x56e481||_0x1d4f7c||_0x3e560c||_0x59312d||_0x44189b||undefined,_0x441c30=stringConfigValue(_0xcdf84f['appcode']),_0x4553c4=_0x441c30?Object['entries'](_0x46d551)['find'](([,_0x3293dc])=>_0x3293dc?.[_0x31c825(0x7f)]===_0x441c30):undefined,_0x4fce7f=_0x4553c4?.[0x0],_0x79017=_0x4553c4?.[0x1],_0x4a8a70=_0x441c30?_0x4fce7f:_0x4d1578;let _0x3165ad=_0x4a8a70&&_0x46d551[_0x4a8a70]?_0x46d551[_0x4a8a70]:undefined;_0x441c30&&_0x79017&&(_0x3165ad=_0x79017);const _0x2c5d1f=_0x441c30?_0x79017??_0x3165ad:_0x3165ad,_0x24637e=!_0x56e481&&!_0x1d4f7c&&_0x3e560c&&_0x4a8a70===_0x3e560c,_0x577e85=_0x56e481||(_0x24637e?_0x3e560c:undefined)||(_0x441c30?_0x4fce7f:undefined),_0x56ad73=_0x2c5d1f?.['appcode'],_0x360a58=_0x20a156?resolveTopLevelAppCode(_0xa4d5e2):undefined,_0xe80f49=_0x5cd729?resolveTopLevelAppCode(_0x292544):undefined,_0x435ea4=_0x56e481||_0x1d4f7c?_0x56ad73:undefined,_0x18ec65=!_0x56e481&&!_0x1d4f7c?_0x56ad73:undefined,_0x2df837=_0x441c30||_0x435ea4||_0x360a58||_0x18ec65||_0xe80f49||undefined,_0xd2f9ec=_0x20a156?stringConfigValue(_0xa4d5e2[_0x31c825(0x80)]):undefined,_0xf444d4=_0x5cd729?stringConfigValue(_0x292544['env']):undefined,_0x428b9d=_0xcdf84f['env']||_0x2c5d1f?.[_0x31c825(0x80)]||_0xd2f9ec||_0xb96291(_0x31c825(0x76))||_0xf444d4||_0x4a011a[_0x31c825(0x80)]||DEFAULT_CONFIG_VALUES[_0x31c825(0x80)],_0xd96027=_0x2c5d1f?.[_0x31c825(0x7e)]||_0x4a011a[_0x31c825(0x7e)]||DEFAULT_CONFIG_VALUES[_0x31c825(0x7e)],_0x5894c5=_0xb96291(_0x31c825(0x83))||_0x2c5d1f?.['cookie']||_0x4a011a[_0x31c825(0x78)]||undefined,_0x45a79f=_0xb96291('ACCESS_KEY')||_0x2c5d1f?.['accessKey']||_0x4a011a[_0x31c825(0x73)]||undefined,_0x2ee3c0=_0xcdf84f[_0x31c825(0x95)]||_0xb96291('FORMAT')||_0x2c5d1f?.[_0x31c825(0x95)]||_0x4a011a[_0x31c825(0x95)],_0x35deca=normalizeLegacyOutputFormat(_0x2ee3c0),_0x2d60e4=_0xb96291(_0x31c825(0x88))||_0x2c5d1f?.['pageSize']||_0x4a011a['pageSize'],_0x3fdec3=_0x2d60e4?Number(_0x2d60e4)||undefined:undefined,_0x25f429=_0x3b06bf?[...configuredRiskCeilings(_0x3b06bf['globalConfig']),...configuredRiskCeilings(_0x3b06bf['projectConfig'])]:configuredRiskCeilings(_0x4a011a),_0x5c97af=resolveRiskCeiling(..._0x25f429,_0x2c5d1f?.[_0x31c825(0x74)],_0xb96291(_0x31c825(0x75)),_0xb96291('MAX_RISK')),_0x17953b=_0xb96291(_0x31c825(0x92)),_0x45152d=_0x17953b==='1'||_0x17953b===_0x31c825(0x89),_0x35fc47=_0x2c5d1f?.['apiDir']||_0x4a011a[_0x31c825(0x6d)]||DEFAULT_CONFIG_VALUES[_0x31c825(0x6d)],_0x469c0b=isDaily(normalizeEnv(String(_0x428b9d)))?_0x31c825(0x81):_0x31c825(0x96);return{'appCode':typeof _0x2df837===_0x31c825(0x72)&&_0x2df837[_0x31c825(0x71)]()?_0x2df837[_0x31c825(0x71)]():undefined,'env':_0x469c0b,'locale':_0xd96027,'cookie':_0x5894c5,'accessKey':_0x45a79f,'format':_0x35deca,'pageSize':_0x3fdec3,'riskLevel':_0x5c97af,'verbose':_0x45152d,'apiDir':_0x35fc47,'apps':_0x46d551,'defaultApp':_0x44189b,'currentApp':_0x4adb8a?_0x4a8a70:undefined,'explicitAppName':_0x577e85};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a204_0x5e40(_0x2ab4f4,_0x3f5d47){_0x2ab4f4=_0x2ab4f4-0x181;const _0x3ceff0=a204_0x3cef();let _0x5e40ef=_0x3ceff0[_0x2ab4f4];return _0x5e40ef;}(function(_0x3ec541,_0x31b5b2){const _0x5a1415=a204_0x5e40,_0x53959d=_0x3ec541();while(!![]){try{const _0x30a1a4=-parseInt(_0x5a1415(0x182))/0x1*(-parseInt(_0x5a1415(0x189))/0x2)+parseInt(_0x5a1415(0x18a))/0x3+-parseInt(_0x5a1415(0x184))/0x4+-parseInt(_0x5a1415(0x187))/0x5+-parseInt(_0x5a1415(0x186))/0x6+-parseInt(_0x5a1415(0x185))/0x7*(-parseInt(_0x5a1415(0x183))/0x8)+parseInt(_0x5a1415(0x18b))/0x9;if(_0x30a1a4===_0x31b5b2)break;else _0x53959d['push'](_0x53959d['shift']());}catch(_0x18dfcb){_0x53959d['push'](_0x53959d['shift']());}}}(a204_0x3cef,0xd731a));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';function a204_0x3cef(){const _0x4a125f=['190Xhikah','4113657prHVLC','16874676dmhRPi','../auth/get-cookie.js','authRequired','10418bToRyi','1752YbasRG','5455756avsLqt','777nVNUcv','7166214qCauMn','4102300YpLHJu','cookie'];a204_0x3cef=function(){return _0x4a125f;};return a204_0x3cef();}export async function buildAuth(_0x41d2e5){const _0x54c877=a204_0x5e40,{getCookie:_0x5655dd}=await import(_0x54c877(0x18c)),_0x3f0b82=_0x41d2e5[_0x54c877(0x188)]||_0x5655dd(),_0x4d45b5=_0x3f0b82?await getIsSessionValid():![];return{'cookie':_0x3f0b82,'isLoggedIn':_0x4d45b5,async 'getOrLogin'(){const _0xd8a159=_0x54c877;if(_0x3f0b82&&_0x4d45b5)return _0x3f0b82;throw CliErrors[_0xd8a159(0x181)]();}};}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** 新建配置文件时使用的文件名 */
|
|
2
|
+
export declare const NEW_CONFIG_NAME = ".rabetbase.json";
|
|
3
|
+
/** 按优先级排列的配置文件名:新名 > 旧名 > 更旧的名 */
|
|
4
|
+
export declare const CONFIG_NAMES: readonly [".rabetbase.json", ".lovrabet.json", ".lovrabetrc"];
|
|
5
|
+
/** 旧配置文件名(用于升级检测),不含新名 */
|
|
6
|
+
export declare const LEGACY_CONFIG_NAMES: (".lovrabet.json" | ".lovrabetrc")[];
|
|
7
|
+
/** 全局 / 项目各一份原始 JSON(未合并),供 readRawConfig 与 app list 来源标注共用 */
|
|
8
|
+
export interface RawConfigLayers {
|
|
9
|
+
globalPath: string | undefined;
|
|
10
|
+
projectPath: string | undefined;
|
|
11
|
+
globalConfig: Record<string, any>;
|
|
12
|
+
projectConfig: Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
export type CliConfigJsonInspect = {
|
|
15
|
+
status: "missing";
|
|
16
|
+
} | {
|
|
17
|
+
status: "empty";
|
|
18
|
+
} | {
|
|
19
|
+
status: "ok";
|
|
20
|
+
data: Record<string, any>;
|
|
21
|
+
} | {
|
|
22
|
+
status: "error";
|
|
23
|
+
message: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 在指定目录下按优先级查找第一个存在的配置文件。
|
|
27
|
+
* 返回完整路径,找不到返回 undefined。
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveConfigPath(base: string): string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* 从 startDir 起向父目录查找,直到出现项目配置文件(CONFIG_NAMES 任一)。
|
|
32
|
+
* 找不到则回退为 startDir。
|
|
33
|
+
*/
|
|
34
|
+
export declare function findProjectRootDirectory(startDir?: string): string;
|
|
35
|
+
/** 项目级配置文件路径(cwd 下首个匹配) */
|
|
36
|
+
export declare function getProjectConfigPath(): string | undefined;
|
|
37
|
+
/** 全局配置文件路径(~ 下首个匹配) */
|
|
38
|
+
export declare function getGlobalConfigPath(): string | undefined;
|
|
39
|
+
/** 当前目录是否处于一个已有配置文件的项目中 */
|
|
40
|
+
export declare function isInProject(): boolean;
|
|
41
|
+
export declare function inspectCliConfigJsonFile(filePath: string): CliConfigJsonInspect;
|
|
42
|
+
/**
|
|
43
|
+
* 只读磁盘:解析全局与项目配置文件,不做合并。
|
|
44
|
+
*/
|
|
45
|
+
export declare function loadRawConfigLayers(projectRoot?: string): RawConfigLayers;
|
|
46
|
+
export declare function mergeRawConfigLayers(layers: RawConfigLayers): Record<string, any>;
|
|
47
|
+
export declare function readRawConfigWithLayers(projectRoot?: string): {
|
|
48
|
+
config: Record<string, any>;
|
|
49
|
+
layers: RawConfigLayers;
|
|
50
|
+
};
|
|
51
|
+
export declare function readRawConfig(projectRoot?: string): Record<string, any>;
|
|
52
|
+
export declare function readConfigFile(filePath: string): Record<string, any>;
|
|
53
|
+
/**
|
|
54
|
+
* 原子写入配置文件(先写临时文件再 rename,防止写一半崩溃)。
|
|
55
|
+
*/
|
|
56
|
+
export declare function writeConfigFile(filePath: string, data: Record<string, any>): void;
|
|
57
|
+
/**
|
|
58
|
+
* 确定应写入的配置文件路径。
|
|
59
|
+
* 如果已存在旧文件则原地更新;否则用新名 .rabetbase.json。
|
|
60
|
+
*/
|
|
61
|
+
export declare function resolveWriteConfigPath(scope: "project" | "global"): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a205_0x106879=a205_0x4223;(function(_0x393d03,_0x20fbf7){const _0x409896=a205_0x4223,_0x33c026=_0x393d03();while(!![]){try{const _0x5b90b1=parseInt(_0x409896(0x117))/0x1*(parseInt(_0x409896(0x112))/0x2)+parseInt(_0x409896(0xf3))/0x3*(parseInt(_0x409896(0x115))/0x4)+parseInt(_0x409896(0x103))/0x5*(parseInt(_0x409896(0x100))/0x6)+-parseInt(_0x409896(0xf8))/0x7+-parseInt(_0x409896(0xff))/0x8*(-parseInt(_0x409896(0x114))/0x9)+parseInt(_0x409896(0x127))/0xa*(parseInt(_0x409896(0x11d))/0xb)+-parseInt(_0x409896(0x106))/0xc*(parseInt(_0x409896(0x123))/0xd);if(_0x5b90b1===_0x20fbf7)break;else _0x33c026['push'](_0x33c026['shift']());}catch(_0x708cf7){_0x33c026['push'](_0x33c026['shift']());}}}(a205_0x5671,0xaddcc));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';export const NEW_CONFIG_NAME='.rabetbase.json';function a205_0x5671(){const _0x48acff=['cookie','parse','project','20FVwPsm','3HwVkRk','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','apiDir','inherit','app','6156108FiDYRT','\x0a\x20\x20','defaultApp','warn','riskLevel','data','.rabetbase.json','80536BMBqvM','8335698rquubV','utf8','pageSize','5DXlyNY','filter','length','168684nnworm','get','cwd','.lovrabet.json','string','missing','env','empty','object','config','stringify','appcode','1174AFaohb','keys','414ujfCKI','1473596NsRsQy','format','859qijsLB','error','apps','message','Project','migrated','1265638zbGUJH','silent','.tmp','status','trim','accessKey','1261ovlnwl'];a205_0x5671=function(){return _0x48acff;};return a205_0x5671();}export const CONFIG_NAMES=[a205_0x106879(0xfe),a205_0x106879(0x109),'.lovrabetrc'];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a205_0x106879(0x104)](_0x485e10=>_0x485e10!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x49689f){for(const _0x5e97a6 of CONFIG_NAMES){const _0x560a81=resolve(_0x49689f,_0x5e97a6);if(existsSync(_0x560a81))return _0x560a81;}return undefined;}export function findProjectRootDirectory(_0x4f91a1=process[a205_0x106879(0x108)]()){let _0x2aa068=resolve(_0x4f91a1);const {root:_0x418680}=parse(_0x2aa068),_0x5a8889=homedir();while(!![]){if(resolveConfigPath(_0x2aa068)){if(_0x2aa068===_0x5a8889)break;return _0x2aa068;}if(_0x2aa068===_0x418680||_0x2aa068===_0x5a8889)break;const _0x12c6ec=dirname(_0x2aa068);if(_0x12c6ec===_0x2aa068)break;_0x2aa068=_0x12c6ec;}return resolve(_0x4f91a1);}export function getProjectConfigPath(){const _0x3fe3e6=a205_0x106879;return resolveConfigPath(process[_0x3fe3e6(0x108)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x59b23d){const _0x346c1c=a205_0x106879;if(!existsSync(_0x59b23d))return{'status':_0x346c1c(0x10b)};try{const _0x422e12=readFileSync(_0x59b23d,{'encoding':_0x346c1c(0x101)});if(!_0x422e12?.['trim']())return{'status':_0x346c1c(0x10d)};const _0x44242b=JSON[_0x346c1c(0x125)](_0x422e12);return{'status':'ok','data':_0x44242b};}catch(_0x227c43){return{'status':_0x346c1c(0x118),'message':_0x227c43 instanceof Error?_0x227c43[_0x346c1c(0x11a)]:String(_0x227c43)};}}function parseCliConfigJsonFile(_0x334106,_0x597145,_0x14714f){const _0x42dc80=a205_0x106879,_0x4ac39e=inspectCliConfigJsonFile(_0x334106);if(_0x4ac39e[_0x42dc80(0x120)]===_0x42dc80(0x10b)||_0x4ac39e[_0x42dc80(0x120)]===_0x42dc80(0x10d))return{};if(_0x4ac39e[_0x42dc80(0x120)]==='ok')return _0x4ac39e[_0x42dc80(0xfd)];return _0x597145===_0x42dc80(0xfb)&&_0x14714f&&console[_0x42dc80(0x118)](CLI_BIN_NAME+':\x20'+_0x14714f+_0x42dc80(0xf4)+_0x334106+_0x42dc80(0xf9)+_0x4ac39e[_0x42dc80(0x11a)]),{};}function normalizeLegacyConfigShape(_0x4e2157){const _0x39333b=a205_0x106879;if(!_0x4e2157||typeof _0x4e2157!==_0x39333b(0x10e))return{'config':{},'migrated':![]};const _0x58e79a={..._0x4e2157},_0x3f3dbc=_0x58e79a[_0x39333b(0x119)]&&typeof _0x58e79a[_0x39333b(0x119)]===_0x39333b(0x10e)?{..._0x58e79a['apps']}:{},_0x1d4a54=Object[_0x39333b(0x113)](_0x3f3dbc)[_0x39333b(0x105)],_0x453681=_0x58e79a[_0x39333b(0x111)]||_0x58e79a[_0x39333b(0xf7)];let _0x42fb3a=![];if(_0x453681&&_0x1d4a54===0x0){const _0x26bb53=typeof _0x58e79a['defaultApp']===_0x39333b(0x10a)&&_0x58e79a[_0x39333b(0xfa)][_0x39333b(0x121)]()?_0x58e79a[_0x39333b(0xfa)]:String(_0x453681)[_0x39333b(0x121)]();_0x3f3dbc[_0x26bb53]={'appcode':String(_0x453681)[_0x39333b(0x121)](),..._0x58e79a[_0x39333b(0x10c)]!=null?{'env':_0x58e79a[_0x39333b(0x10c)]}:{},..._0x58e79a[_0x39333b(0xf5)]!=null?{'apiDir':_0x58e79a[_0x39333b(0xf5)]}:{},..._0x58e79a[_0x39333b(0x124)]!=null?{'cookie':_0x58e79a[_0x39333b(0x124)]}:{},..._0x58e79a[_0x39333b(0x122)]!=null?{'accessKey':_0x58e79a[_0x39333b(0x122)]}:{},..._0x58e79a['format']!=null?{'format':_0x58e79a[_0x39333b(0x116)]}:{},..._0x58e79a['pageSize']!=null?{'pageSize':_0x58e79a['pageSize']}:{},..._0x58e79a[_0x39333b(0xfc)]!=null?{'riskLevel':_0x58e79a[_0x39333b(0xfc)]}:{},..._0x58e79a['locale']!=null?{'locale':_0x58e79a['locale']}:{}},_0x58e79a[_0x39333b(0x119)]=_0x3f3dbc;if(!_0x58e79a[_0x39333b(0xfa)])_0x58e79a['defaultApp']=_0x26bb53;_0x42fb3a=!![];}return(_0x39333b(0x111)in _0x58e79a||'app'in _0x58e79a)&&(delete _0x58e79a[_0x39333b(0x111)],delete _0x58e79a[_0x39333b(0xf7)],_0x42fb3a=!![]),{'config':_0x58e79a,'migrated':_0x42fb3a};}function writeNormalizedConfigIfNeeded(_0x4d325c,_0x8cf8e4){const _0x3fb761=a205_0x106879,_0x4fea30=JSON['stringify'](_0x8cf8e4,null,0x2)+'\x0a';if(normalizedWriteCache[_0x3fb761(0x107)](_0x4d325c)===_0x4fea30)return;writeConfigFile(_0x4d325c,_0x8cf8e4),normalizedWriteCache['set'](_0x4d325c,_0x4fea30);}function parseAndNormalizeConfig(_0x2902a0,_0x51d9e8,_0x487027){const _0x123198=a205_0x106879,_0xdec449=parseCliConfigJsonFile(_0x2902a0,_0x51d9e8,_0x487027),_0x20ff02=normalizeLegacyConfigShape(_0xdec449);if(_0x20ff02[_0x123198(0x11c)])try{writeNormalizedConfigIfNeeded(_0x2902a0,_0x20ff02[_0x123198(0x10f)]);}catch{}return _0x20ff02[_0x123198(0x10f)];}export function loadRawConfigLayers(_0x3aa60f){const _0x4f16ed=a205_0x106879;let _0x35aa2e={},_0x1fca07={};const _0xd1169e=resolveConfigPath(homedir());_0xd1169e&&(_0x35aa2e=parseAndNormalizeConfig(_0xd1169e,_0x4f16ed(0xfb),'Global'));const _0x156168=_0x3aa60f??findProjectRootDirectory(),_0x2b9ea6=resolveConfigPath(_0x156168);return _0x2b9ea6&&(_0x1fca07=parseAndNormalizeConfig(_0x2b9ea6,_0x4f16ed(0xfb),_0x4f16ed(0x11b))),{'globalPath':_0xd1169e,'projectPath':_0x2b9ea6,'globalConfig':_0x35aa2e,'projectConfig':_0x1fca07};}const INHERIT_WHITELIST=['cookie',a205_0x106879(0x122),'locale','format',a205_0x106879(0xfc),a205_0x106879(0x102)];export function mergeRawConfigLayers(_0x3f348f){const _0x25b6e4=a205_0x106879,{globalConfig:_0x26248b,projectConfig:_0x55e23e}=_0x3f348f,_0x3f0326=Object[_0x25b6e4(0x113)](_0x55e23e)['length']>0x0;if(!_0x3f0326)return mergeGlobalOnly(_0x26248b);if(_0x55e23e[_0x25b6e4(0xf6)]===!![])return mergeFullInherit(_0x26248b,_0x55e23e);if(_0x55e23e[_0x25b6e4(0xf6)]===![])return mergeIsolated(_0x55e23e);return mergeProjectFirst(_0x26248b,_0x55e23e);}function mergeGlobalOnly(_0xd9ed7d){const _0x39c2f7=a205_0x106879,_0xa8017a={..._0xd9ed7d},_0x37b166=_0xd9ed7d[_0x39c2f7(0x119)]&&typeof _0xd9ed7d['apps']==='object'?_0xd9ed7d[_0x39c2f7(0x119)]:{};if(Object[_0x39c2f7(0x113)](_0x37b166)[_0x39c2f7(0x105)]>0x0)_0xa8017a['apps']=_0x37b166;if(_0xd9ed7d[_0x39c2f7(0xfa)])_0xa8017a['defaultApp']=_0xd9ed7d[_0x39c2f7(0xfa)];else{const _0x4fdefd=Object[_0x39c2f7(0x113)](_0x37b166);if(_0x4fdefd[_0x39c2f7(0x105)]>0x0)_0xa8017a[_0x39c2f7(0xfa)]=_0x4fdefd[0x0];}return _0xa8017a;}function mergeIsolated(_0x55af25){const _0x30fd93=a205_0x106879,_0x334344={..._0x55af25};delete _0x334344['inherit'];const _0x429595=_0x55af25[_0x30fd93(0x119)]&&typeof _0x55af25['apps']===_0x30fd93(0x10e)?_0x55af25[_0x30fd93(0x119)]:{};Object[_0x30fd93(0x113)](_0x429595)[_0x30fd93(0x105)]>0x0?_0x334344[_0x30fd93(0x119)]=_0x429595:delete _0x334344[_0x30fd93(0x119)];if(_0x30fd93(0xfa)in _0x55af25)_0x334344[_0x30fd93(0xfa)]=_0x55af25[_0x30fd93(0xfa)];else Object['keys'](_0x429595)[_0x30fd93(0x105)]>0x0?_0x334344['defaultApp']=Object[_0x30fd93(0x113)](_0x429595)[0x0]:delete _0x334344['defaultApp'];return _0x334344;}function mergeProjectFirst(_0x4e4e4b,_0x28af64){const _0x3d267c=a205_0x106879,_0x1f9c80={..._0x28af64};delete _0x1f9c80[_0x3d267c(0xf6)];for(const _0x3557ea of INHERIT_WHITELIST){!(_0x3557ea in _0x1f9c80)&&_0x3557ea in _0x4e4e4b&&(_0x1f9c80[_0x3557ea]=_0x4e4e4b[_0x3557ea]);}const _0x327fa6=_0x28af64[_0x3d267c(0x119)]&&typeof _0x28af64[_0x3d267c(0x119)]===_0x3d267c(0x10e)?_0x28af64[_0x3d267c(0x119)]:{};Object['keys'](_0x327fa6)[_0x3d267c(0x105)]>0x0?_0x1f9c80[_0x3d267c(0x119)]=_0x327fa6:delete _0x1f9c80['apps'];if(_0x3d267c(0xfa)in _0x28af64)_0x1f9c80[_0x3d267c(0xfa)]=_0x28af64[_0x3d267c(0xfa)];else Object[_0x3d267c(0x113)](_0x327fa6)['length']>0x0?_0x1f9c80[_0x3d267c(0xfa)]=Object[_0x3d267c(0x113)](_0x327fa6)[0x0]:delete _0x1f9c80[_0x3d267c(0xfa)];return _0x1f9c80;}function mergeFullInherit(_0x12958f,_0x40ae73){const _0x77d042=a205_0x106879,_0x4c3041=_0x12958f[_0x77d042(0x119)]&&typeof _0x12958f[_0x77d042(0x119)]===_0x77d042(0x10e)?_0x12958f[_0x77d042(0x119)]:{},_0x43627f=_0x40ae73[_0x77d042(0x119)]&&typeof _0x40ae73[_0x77d042(0x119)]==='object'?_0x40ae73[_0x77d042(0x119)]:{},_0x825c66={..._0x4c3041,..._0x43627f},_0x5e4222={..._0x12958f,..._0x40ae73};delete _0x5e4222[_0x77d042(0xf6)];if(Object[_0x77d042(0x113)](_0x825c66)[_0x77d042(0x105)]>0x0)_0x5e4222[_0x77d042(0x119)]=_0x825c66;if(_0x77d042(0xfa)in _0x40ae73)_0x5e4222[_0x77d042(0xfa)]=_0x40ae73['defaultApp'];else{if(Object[_0x77d042(0x113)](_0x43627f)['length']>0x0)_0x5e4222[_0x77d042(0xfa)]=Object['keys'](_0x43627f)[0x0];else{if(_0x12958f[_0x77d042(0xfa)])_0x5e4222['defaultApp']=_0x12958f['defaultApp'];else{const _0x545cf5=Object[_0x77d042(0x113)](_0x4c3041);if(_0x545cf5[_0x77d042(0x105)]>0x0)_0x5e4222[_0x77d042(0xfa)]=_0x545cf5[0x0];}}}return _0x5e4222;}function a205_0x4223(_0x329105,_0x1ca7e5){_0x329105=_0x329105-0xf3;const _0x56717c=a205_0x5671();let _0x42230b=_0x56717c[_0x329105];return _0x42230b;}export function readRawConfigWithLayers(_0x3bd22f){const _0x360ab4=loadRawConfigLayers(_0x3bd22f);return{'config':mergeRawConfigLayers(_0x360ab4),'layers':_0x360ab4};}export function readRawConfig(_0x3593b9){return mergeRawConfigLayers(loadRawConfigLayers(_0x3593b9));}export function readConfigFile(_0x2a36b3){const _0x464f5c=a205_0x106879;return parseAndNormalizeConfig(_0x2a36b3,_0x464f5c(0x11e));}export function writeConfigFile(_0x202e69,_0x5793e3){const _0x305af9=a205_0x106879,_0x108c7c=dirname(_0x202e69);!existsSync(_0x108c7c)&&mkdirSync(_0x108c7c,{'recursive':!![]});const _0x4e6542=_0x202e69+_0x305af9(0x11f);try{writeFileSync(_0x4e6542,JSON[_0x305af9(0x110)](_0x5793e3,null,0x2)+'\x0a',{'encoding':_0x305af9(0x101),'mode':0x180}),renameSync(_0x4e6542,_0x202e69);}catch(_0x5a845f){try{unlinkSync(_0x4e6542);}catch{}throw _0x5a845f;}}export function resolveWriteConfigPath(_0x2ca015){const _0x1b80ed=a205_0x106879,_0x4e8446=_0x2ca015===_0x1b80ed(0x126)?process[_0x1b80ed(0x108)]():homedir(),_0xb4864d=resolveConfigPath(_0x4e8446);return _0xb4864d??resolve(_0x4e8446,NEW_CONFIG_NAME);}
|
|
1
|
+
function a205_0x49ef(_0xc0c8c6,_0x4c0376){_0xc0c8c6=_0xc0c8c6-0xf0;const _0x5d788b=a205_0x5d78();let _0x49ef6e=_0x5d788b[_0xc0c8c6];return _0x49ef6e;}const a205_0x2055cb=a205_0x49ef;(function(_0x33a48d,_0xb5e9cd){const _0x439b38=a205_0x49ef,_0x5cb0c6=_0x33a48d();while(!![]){try{const _0x23b936=-parseInt(_0x439b38(0x11f))/0x1+parseInt(_0x439b38(0x11a))/0x2*(-parseInt(_0x439b38(0xf3))/0x3)+parseInt(_0x439b38(0xf5))/0x4*(-parseInt(_0x439b38(0x11c))/0x5)+parseInt(_0x439b38(0x124))/0x6*(-parseInt(_0x439b38(0x107))/0x7)+-parseInt(_0x439b38(0xf2))/0x8*(parseInt(_0x439b38(0x10d))/0x9)+parseInt(_0x439b38(0xfd))/0xa+parseInt(_0x439b38(0x10c))/0xb*(parseInt(_0x439b38(0x10a))/0xc);if(_0x23b936===_0xb5e9cd)break;else _0x5cb0c6['push'](_0x5cb0c6['shift']());}catch(_0x4a8851){_0x5cb0c6['push'](_0x5cb0c6['shift']());}}}(a205_0x5d78,0x7ff71));function a205_0x5d78(){const _0x2754f5=['env','empty','288QXVlBd','102ZZWgaS','defaultApp','63268iDrKKY','config','appcode','apps','object','accessKey','error','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','1449660OnCEMd','locale','utf8','keys','cwd','app','.lovrabet.json','pageSize','\x0a\x20\x20','warn','14GiXvuz','parse','cookie','2088yUhJvk','stringify','124839TAumrJ','67176pwGZdx','migrated','filter','string','trim','Global','.lovrabetrc','silent','status','message','missing','apiDir','.rabetbase.json','1014uNdiAC','inherit','155vPUCjX','get','set','379530JKNWij','length','Project','.tmp','riskLevel','1319244UEmeim','format'];a205_0x5d78=function(){return _0x2754f5;};return a205_0x5d78();}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';export const NEW_CONFIG_NAME=a205_0x2055cb(0x119);export const CONFIG_NAMES=[a205_0x2055cb(0x119),a205_0x2055cb(0x103),a205_0x2055cb(0x113)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a205_0x2055cb(0x10f)](_0x2a29f9=>_0x2a29f9!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x51997d){for(const _0x3a2496 of CONFIG_NAMES){const _0x339dce=resolve(_0x51997d,_0x3a2496);if(existsSync(_0x339dce))return _0x339dce;}return undefined;}export function findProjectRootDirectory(_0x873e93=process['cwd']()){let _0xcff974=resolve(_0x873e93);const {root:_0x18eff2}=parse(_0xcff974),_0x1577f0=homedir();while(!![]){if(resolveConfigPath(_0xcff974)){if(_0xcff974===_0x1577f0)break;return _0xcff974;}if(_0xcff974===_0x18eff2||_0xcff974===_0x1577f0)break;const _0x4adf3b=dirname(_0xcff974);if(_0x4adf3b===_0xcff974)break;_0xcff974=_0x4adf3b;}return resolve(_0x873e93);}export function getProjectConfigPath(){const _0x26395f=a205_0x2055cb;return resolveConfigPath(process[_0x26395f(0x101)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x574725){const _0x28e596=a205_0x2055cb;if(!existsSync(_0x574725))return{'status':_0x28e596(0x117)};try{const _0x1c5b61=readFileSync(_0x574725,{'encoding':_0x28e596(0xff)});if(!_0x1c5b61?.['trim']())return{'status':'empty'};const _0x1dca1c=JSON[_0x28e596(0x108)](_0x1c5b61);return{'status':'ok','data':_0x1dca1c};}catch(_0x57a5a5){return{'status':'error','message':_0x57a5a5 instanceof Error?_0x57a5a5['message']:String(_0x57a5a5)};}}function parseCliConfigJsonFile(_0x1a35cc,_0x59e2ba,_0x1d1ff3){const _0x5cb08a=a205_0x2055cb,_0x59b99b=inspectCliConfigJsonFile(_0x1a35cc);if(_0x59b99b['status']==='missing'||_0x59b99b[_0x5cb08a(0x115)]===_0x5cb08a(0xf1))return{};if(_0x59b99b[_0x5cb08a(0x115)]==='ok')return _0x59b99b['data'];return _0x59e2ba===_0x5cb08a(0x106)&&_0x1d1ff3&&console[_0x5cb08a(0xfb)](CLI_BIN_NAME+':\x20'+_0x1d1ff3+_0x5cb08a(0xfc)+_0x1a35cc+_0x5cb08a(0x105)+_0x59b99b[_0x5cb08a(0x116)]),{};}function normalizeLegacyConfigShape(_0x1f8de5){const _0x589293=a205_0x2055cb;if(!_0x1f8de5||typeof _0x1f8de5!=='object')return{'config':{},'migrated':![]};const _0x1fde8c={..._0x1f8de5},_0x2da462=_0x1fde8c[_0x589293(0xf8)]&&typeof _0x1fde8c[_0x589293(0xf8)]===_0x589293(0xf9)?{..._0x1fde8c[_0x589293(0xf8)]}:{},_0x3e3988=Object[_0x589293(0x100)](_0x2da462)[_0x589293(0x120)],_0x545099=_0x1fde8c[_0x589293(0xf7)]||_0x1fde8c[_0x589293(0x102)];let _0x24d8fe=![];if(_0x545099&&_0x3e3988===0x0){const _0x4439c3=typeof _0x1fde8c[_0x589293(0xf4)]===_0x589293(0x110)&&_0x1fde8c[_0x589293(0xf4)][_0x589293(0x111)]()?_0x1fde8c[_0x589293(0xf4)]:String(_0x545099)[_0x589293(0x111)]();_0x2da462[_0x4439c3]={'appcode':String(_0x545099)[_0x589293(0x111)](),..._0x1fde8c[_0x589293(0xf0)]!=null?{'env':_0x1fde8c[_0x589293(0xf0)]}:{},..._0x1fde8c[_0x589293(0x118)]!=null?{'apiDir':_0x1fde8c['apiDir']}:{},..._0x1fde8c['cookie']!=null?{'cookie':_0x1fde8c[_0x589293(0x109)]}:{},..._0x1fde8c['accessKey']!=null?{'accessKey':_0x1fde8c[_0x589293(0xfa)]}:{},..._0x1fde8c[_0x589293(0x125)]!=null?{'format':_0x1fde8c[_0x589293(0x125)]}:{},..._0x1fde8c['pageSize']!=null?{'pageSize':_0x1fde8c[_0x589293(0x104)]}:{},..._0x1fde8c[_0x589293(0x123)]!=null?{'riskLevel':_0x1fde8c[_0x589293(0x123)]}:{},..._0x1fde8c[_0x589293(0xfe)]!=null?{'locale':_0x1fde8c[_0x589293(0xfe)]}:{}},_0x1fde8c[_0x589293(0xf8)]=_0x2da462;if(!_0x1fde8c[_0x589293(0xf4)])_0x1fde8c[_0x589293(0xf4)]=_0x4439c3;_0x24d8fe=!![];}return(_0x589293(0xf7)in _0x1fde8c||'app'in _0x1fde8c)&&(delete _0x1fde8c[_0x589293(0xf7)],delete _0x1fde8c['app'],_0x24d8fe=!![]),{'config':_0x1fde8c,'migrated':_0x24d8fe};}function writeNormalizedConfigIfNeeded(_0xdf6dfd,_0x2e6b3a){const _0x4797af=a205_0x2055cb,_0xfde3ab=JSON['stringify'](_0x2e6b3a,null,0x2)+'\x0a';if(normalizedWriteCache[_0x4797af(0x11d)](_0xdf6dfd)===_0xfde3ab)return;writeConfigFile(_0xdf6dfd,_0x2e6b3a),normalizedWriteCache[_0x4797af(0x11e)](_0xdf6dfd,_0xfde3ab);}function parseAndNormalizeConfig(_0x24d3c6,_0x26f723,_0x570992){const _0x1a19d6=a205_0x2055cb,_0x44b95e=parseCliConfigJsonFile(_0x24d3c6,_0x26f723,_0x570992),_0x20f187=normalizeLegacyConfigShape(_0x44b95e);if(_0x20f187[_0x1a19d6(0x10e)])try{writeNormalizedConfigIfNeeded(_0x24d3c6,_0x20f187[_0x1a19d6(0xf6)]);}catch{}return _0x20f187[_0x1a19d6(0xf6)];}export function loadRawConfigLayers(_0x137122){const _0x780df3=a205_0x2055cb;let _0x26973c={},_0xebc94a={};const _0x5e647e=resolveConfigPath(homedir());_0x5e647e&&(_0x26973c=parseAndNormalizeConfig(_0x5e647e,'warn',_0x780df3(0x112)));const _0x87c5e7=_0x137122??findProjectRootDirectory(),_0x55c6c6=resolveConfigPath(_0x87c5e7);return _0x55c6c6&&(_0xebc94a=parseAndNormalizeConfig(_0x55c6c6,_0x780df3(0x106),_0x780df3(0x121))),{'globalPath':_0x5e647e,'projectPath':_0x55c6c6,'globalConfig':_0x26973c,'projectConfig':_0xebc94a};}const INHERIT_WHITELIST=[a205_0x2055cb(0x109),'accessKey',a205_0x2055cb(0xfe),'format',a205_0x2055cb(0x123),a205_0x2055cb(0x104)];export function mergeRawConfigLayers(_0x32da1e){const _0x3204e0=a205_0x2055cb,{globalConfig:_0x85dbbd,projectConfig:_0x581dcd}=_0x32da1e,_0x936a8f=Object[_0x3204e0(0x100)](_0x581dcd)[_0x3204e0(0x120)]>0x0;if(!_0x936a8f)return mergeGlobalOnly(_0x85dbbd);if(_0x581dcd['inherit']===!![])return mergeFullInherit(_0x85dbbd,_0x581dcd);if(_0x581dcd[_0x3204e0(0x11b)]===![])return mergeIsolated(_0x581dcd);return mergeProjectFirst(_0x85dbbd,_0x581dcd);}function mergeGlobalOnly(_0x3cf53b){const _0x5c2d54=a205_0x2055cb,_0x17fd07={..._0x3cf53b},_0x5e515a=_0x3cf53b['apps']&&typeof _0x3cf53b[_0x5c2d54(0xf8)]===_0x5c2d54(0xf9)?_0x3cf53b['apps']:{};if(Object['keys'](_0x5e515a)[_0x5c2d54(0x120)]>0x0)_0x17fd07['apps']=_0x5e515a;if(_0x3cf53b[_0x5c2d54(0xf4)])_0x17fd07[_0x5c2d54(0xf4)]=_0x3cf53b[_0x5c2d54(0xf4)];else{const _0x295673=Object[_0x5c2d54(0x100)](_0x5e515a);if(_0x295673[_0x5c2d54(0x120)]>0x0)_0x17fd07[_0x5c2d54(0xf4)]=_0x295673[0x0];}return _0x17fd07;}function mergeIsolated(_0xb78d86){const _0x7dd932=a205_0x2055cb,_0x567f5b={..._0xb78d86};delete _0x567f5b[_0x7dd932(0x11b)];const _0x5770df=_0xb78d86[_0x7dd932(0xf8)]&&typeof _0xb78d86['apps']==='object'?_0xb78d86[_0x7dd932(0xf8)]:{};Object[_0x7dd932(0x100)](_0x5770df)[_0x7dd932(0x120)]>0x0?_0x567f5b['apps']=_0x5770df:delete _0x567f5b[_0x7dd932(0xf8)];if(_0x7dd932(0xf4)in _0xb78d86)_0x567f5b['defaultApp']=_0xb78d86['defaultApp'];else Object[_0x7dd932(0x100)](_0x5770df)['length']>0x0?_0x567f5b[_0x7dd932(0xf4)]=Object['keys'](_0x5770df)[0x0]:delete _0x567f5b[_0x7dd932(0xf4)];return _0x567f5b;}function mergeProjectFirst(_0x511b4b,_0x4328ac){const _0x599cd3=a205_0x2055cb,_0x48529d={..._0x4328ac};delete _0x48529d[_0x599cd3(0x11b)];for(const _0xc9ae73 of INHERIT_WHITELIST){!(_0xc9ae73 in _0x48529d)&&_0xc9ae73 in _0x511b4b&&(_0x48529d[_0xc9ae73]=_0x511b4b[_0xc9ae73]);}const _0x1f2050=_0x4328ac[_0x599cd3(0xf8)]&&typeof _0x4328ac[_0x599cd3(0xf8)]==='object'?_0x4328ac[_0x599cd3(0xf8)]:{};Object[_0x599cd3(0x100)](_0x1f2050)[_0x599cd3(0x120)]>0x0?_0x48529d[_0x599cd3(0xf8)]=_0x1f2050:delete _0x48529d[_0x599cd3(0xf8)];if(_0x599cd3(0xf4)in _0x4328ac)_0x48529d[_0x599cd3(0xf4)]=_0x4328ac[_0x599cd3(0xf4)];else Object[_0x599cd3(0x100)](_0x1f2050)['length']>0x0?_0x48529d['defaultApp']=Object['keys'](_0x1f2050)[0x0]:delete _0x48529d[_0x599cd3(0xf4)];return _0x48529d;}function mergeFullInherit(_0x4e5900,_0x924e6e){const _0x155048=a205_0x2055cb,_0x51f8d8=_0x4e5900[_0x155048(0xf8)]&&typeof _0x4e5900[_0x155048(0xf8)]===_0x155048(0xf9)?_0x4e5900[_0x155048(0xf8)]:{},_0x32737a=_0x924e6e[_0x155048(0xf8)]&&typeof _0x924e6e[_0x155048(0xf8)]===_0x155048(0xf9)?_0x924e6e[_0x155048(0xf8)]:{},_0x1d247b={..._0x51f8d8,..._0x32737a},_0xfd540e={..._0x4e5900,..._0x924e6e};delete _0xfd540e[_0x155048(0x11b)];if(Object[_0x155048(0x100)](_0x1d247b)[_0x155048(0x120)]>0x0)_0xfd540e[_0x155048(0xf8)]=_0x1d247b;if('defaultApp'in _0x924e6e)_0xfd540e['defaultApp']=_0x924e6e[_0x155048(0xf4)];else{if(Object[_0x155048(0x100)](_0x32737a)[_0x155048(0x120)]>0x0)_0xfd540e['defaultApp']=Object[_0x155048(0x100)](_0x32737a)[0x0];else{if(_0x4e5900[_0x155048(0xf4)])_0xfd540e[_0x155048(0xf4)]=_0x4e5900['defaultApp'];else{const _0x5f30a5=Object['keys'](_0x51f8d8);if(_0x5f30a5['length']>0x0)_0xfd540e[_0x155048(0xf4)]=_0x5f30a5[0x0];}}}return _0xfd540e;}export function readRawConfigWithLayers(_0x46ae17){const _0x30280c=loadRawConfigLayers(_0x46ae17);return{'config':mergeRawConfigLayers(_0x30280c),'layers':_0x30280c};}export function readRawConfig(_0x8146){return mergeRawConfigLayers(loadRawConfigLayers(_0x8146));}export function readConfigFile(_0x1e3178){const _0xf26b95=a205_0x2055cb;return parseAndNormalizeConfig(_0x1e3178,_0xf26b95(0x114));}export function writeConfigFile(_0x26c456,_0x2e4310){const _0x47924f=a205_0x2055cb,_0x1f164e=dirname(_0x26c456);!existsSync(_0x1f164e)&&mkdirSync(_0x1f164e,{'recursive':!![]});const _0x3734c2=_0x26c456+_0x47924f(0x122);try{writeFileSync(_0x3734c2,JSON[_0x47924f(0x10b)](_0x2e4310,null,0x2)+'\x0a',{'encoding':_0x47924f(0xff),'mode':0x180}),renameSync(_0x3734c2,_0x26c456);}catch(_0x429090){try{unlinkSync(_0x3734c2);}catch{}throw _0x429090;}}export function resolveWriteConfigPath(_0x9c7c72){const _0x2fe62d=_0x9c7c72==='project'?process['cwd']():homedir(),_0x101c55=resolveConfigPath(_0x2fe62d);return _0x101c55??resolve(_0x2fe62d,NEW_CONFIG_NAME);}
|
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(默认 high-risk-write,即不限制)
|
|
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;
|