@lovrabet/rabetbase-cli 2.3.16-beta.4 → 2.3.16-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.d.ts +9 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.d.ts +2 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +8 -0
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.d.ts +13 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.d.ts +25 -0
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.d.ts +2 -0
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.d.ts +1 -0
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.d.ts +51 -0
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.d.ts +1 -0
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.d.ts +5 -0
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.d.ts +1 -0
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.d.ts +12 -0
- package/lib/cli-flags.js +1 -1
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.d.ts +2 -0
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.d.ts +2 -0
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.d.ts +2 -0
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.d.ts +2 -0
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.d.ts +18 -0
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.d.ts +5 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.d.ts +10 -0
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.d.ts +2 -0
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.d.ts +11 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.d.ts +46 -0
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.d.ts +2 -0
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.d.ts +2 -0
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.d.ts +2 -0
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.d.ts +2 -0
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.d.ts +2 -0
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.d.ts +105 -0
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.d.ts +2 -0
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.d.ts +4 -0
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.d.ts +2 -0
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.d.ts +2 -0
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.d.ts +5 -0
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.d.ts +2 -0
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.d.ts +2 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.d.ts +2 -0
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.d.ts +2 -0
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.d.ts +8 -0
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.d.ts +2 -0
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.d.ts +2 -0
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.d.ts +2 -0
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.d.ts +2 -0
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.d.ts +17 -0
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.d.ts +17 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.d.ts +11 -0
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.d.ts +12 -0
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +26 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.d.ts +6 -0
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.d.ts +13 -0
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.d.ts +5 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.d.ts +5 -0
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.d.ts +5 -0
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.d.ts +5 -0
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.d.ts +16 -0
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.d.ts +7 -0
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.d.ts +7 -0
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.d.ts +8 -0
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.d.ts +33 -0
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.d.ts +18 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.d.ts +11 -0
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.d.ts +2 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.d.ts +2 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.d.ts +26 -0
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.d.ts +27 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.d.ts +3 -0
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.d.ts +2 -0
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.d.ts +2 -0
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.d.ts +2 -0
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.d.ts +2 -0
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.d.ts +2 -0
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.d.ts +2 -0
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.d.ts +128 -0
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.d.ts +2 -0
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.d.ts +53 -0
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.d.ts +17 -0
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.d.ts +2 -0
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.d.ts +30 -0
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.d.ts +2 -0
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.d.ts +2 -0
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.d.ts +2 -0
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.d.ts +2 -0
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.d.ts +2 -0
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.d.ts +2 -0
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.d.ts +2 -0
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.d.ts +5 -0
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.d.ts +2 -0
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.d.ts +15 -0
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.d.ts +2 -0
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.d.ts +2 -0
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.d.ts +2 -0
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.d.ts +2 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.d.ts +2 -0
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.d.ts +11 -0
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.d.ts +2 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.d.ts +23 -0
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.d.ts +2 -0
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.d.ts +32 -0
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.d.ts +2 -0
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.d.ts +2 -0
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.d.ts +2 -0
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.d.ts +2 -0
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.d.ts +2 -0
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.d.ts +33 -0
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.d.ts +2 -0
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.d.ts +5 -0
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.d.ts +2 -0
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.d.ts +2 -0
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.d.ts +3 -0
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.d.ts +2 -0
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.d.ts +2 -0
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.d.ts +2 -0
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.d.ts +17 -0
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.d.ts +2 -0
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.d.ts +2 -0
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.d.ts +2 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.d.ts +2 -0
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.d.ts +27 -0
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.d.ts +12 -0
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.d.ts +12 -0
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.d.ts +10 -0
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +12 -0
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +28 -0
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.d.ts +69 -0
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.d.ts +17 -0
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.d.ts +7 -0
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +162 -0
- package/lib/commands/menu/shared/update-core.d.ts +11 -0
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.d.ts +6 -0
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.d.ts +2 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.d.ts +2 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.d.ts +2 -0
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.d.ts +2 -0
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.d.ts +2 -0
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.d.ts +2 -0
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.d.ts +2 -0
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.d.ts +2 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.d.ts +2 -0
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +105 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.d.ts +2 -0
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.d.ts +2 -0
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.d.ts +2 -0
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.d.ts +74 -0
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.d.ts +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +6 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.d.ts +9 -0
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.d.ts +4 -0
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.d.ts +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.d.ts +2 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.d.ts +1 -0
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.d.ts +66 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +107 -0
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.d.ts +2 -0
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.d.ts +2 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.d.ts +5 -0
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.d.ts +10 -0
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.d.ts +5 -0
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.d.ts +2 -0
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.d.ts +2 -0
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.d.ts +5 -0
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.d.ts +2 -0
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.d.ts +5 -0
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.d.ts +5 -0
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.d.ts +23 -0
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.d.ts +5 -0
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.d.ts +2 -0
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.d.ts +2 -0
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.d.ts +2 -0
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.d.ts +2 -0
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.d.ts +2 -0
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.d.ts +10 -0
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/workspace/add.d.ts +6 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.d.ts +11 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.d.ts +6 -0
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.d.ts +50 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +1 -0
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.d.ts +34 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.d.ts +10 -0
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +14 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.d.ts +11 -0
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.d.ts +1 -0
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.d.ts +5 -0
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.d.ts +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.d.ts +36 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.d.ts +5 -0
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.d.ts +61 -0
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +102 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +31 -0
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1018 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +8 -0
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +28 -0
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +7 -0
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +25 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +92 -0
- package/lib/core/bff/utils.d.ts +25 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.d.ts +43 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.d.ts +6 -0
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.d.ts +4 -0
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.d.ts +8 -0
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/types.d.ts +22 -0
- package/lib/core/sql-index-auditor.d.ts +33 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.d.ts +7 -0
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.d.ts +7 -0
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.d.ts +5 -0
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.d.ts +14 -0
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/types.d.ts +43 -0
- package/lib/core/sql-sync/utils.d.ts +10 -0
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.d.ts +34 -0
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.d.ts +3 -0
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.d.ts +2 -0
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.d.ts +9 -0
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.d.ts +3 -0
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.d.ts +3 -0
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.d.ts +4 -0
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.d.ts +11 -0
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.d.ts +15 -0
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.d.ts +2 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.d.ts +14 -0
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.d.ts +36 -0
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.d.ts +3 -0
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.d.ts +63 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -0
- package/lib/generated/build-info.js +1 -1
- package/lib/help.d.ts +1 -0
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.d.ts +4 -0
- package/lib/runtime/confirmation.js +1 -0
- package/lib/runtime/event.d.ts +5 -0
- package/lib/runtime/event.js +1 -0
- package/lib/runtime/index.d.ts +7 -0
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/queue.d.ts +5 -0
- package/lib/runtime/queue.js +1 -0
- package/lib/runtime/resolve.d.ts +8 -0
- package/lib/runtime/resolve.js +1 -0
- package/lib/runtime/types.d.ts +50 -0
- package/lib/runtime/types.js +1 -0
- package/lib/skills/main.d.ts +41 -0
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +99 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.d.ts +44 -0
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.d.ts +12 -0
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.d.ts +8 -0
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +93 -0
- package/lib/utils/ai_config.d.ts +47 -0
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.d.ts +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.d.ts +42 -0
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.d.ts +23 -0
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.d.ts +37 -0
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +9 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.d.ts +42 -0
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.d.ts +1 -0
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.d.ts +30 -0
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.d.ts +25 -0
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.d.ts +80 -0
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.d.ts +30 -0
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.d.ts +7 -0
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.d.ts +62 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.d.ts +15 -0
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.d.ts +21 -0
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.d.ts +38 -0
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.d.ts +1 -0
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.d.ts +55 -0
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.d.ts +10 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.d.ts +1 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.d.ts +1 -0
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.d.ts +6 -0
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a253_0x3622(){var _0x1106da=['10873422Icwtvl','8wQglUL','cli.help','18AUQLXU','service','1128210LSMqlg','693420aLhElT','Failed\x20to\x20report\x20CLI\x20help\x20trace:','135584ftHTnj','1873220WmKowK','243726nMgrYE','95845dwJCCm','error'];a253_0x3622=function(){return _0x1106da;};return a253_0x3622();}function a253_0x42ad(_0x3fde08,_0x29430e){_0x3fde08=_0x3fde08-0x8d;var _0x362249=a253_0x3622();var _0x42ad11=_0x362249[_0x3fde08];return _0x42ad11;}(function(_0x1cc186,_0x2e2f5a){var _0x31e439=a253_0x42ad,_0x887cea=_0x1cc186();while(!![]){try{var _0x32bf40=parseInt(_0x31e439(0x90))/0x1+-parseInt(_0x31e439(0x8e))/0x2+-parseInt(_0x31e439(0x8d))/0x3+-parseInt(_0x31e439(0x91))/0x4+-parseInt(_0x31e439(0x93))/0x5+-parseInt(_0x31e439(0x98))/0x6*(-parseInt(_0x31e439(0x92))/0x7)+parseInt(_0x31e439(0x96))/0x8*(parseInt(_0x31e439(0x95))/0x9);if(_0x32bf40===_0x2e2f5a)break;else _0x887cea['push'](_0x887cea['shift']());}catch(_0x5e4a6f){_0x887cea['push'](_0x887cea['shift']());}}}(a253_0x3622,0x3a176));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x221ee2,_0x5784c5){var _0x5b47cd=a253_0x42ad;try{await sendCliTraceLog({'spanName':_0x5b47cd(0x97),'logData':{'rabetbase.help.kind':_0x221ee2,..._0x5784c5?.['service']&&{'rabetbase.help.service':_0x5784c5[_0x5b47cd(0x99)]}}});}catch(_0x5a341b){console[_0x5b47cd(0x94)](_0x5b47cd(0x8f),_0x5a341b);}}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 拉取当前会话;仅在进程内首次写入 service/user context,后续 `sendTraceLog` 复用同一进程级上下文。
|
|
3
|
+
* 每次仍会请求 get-session(用于 span 上的 userid 等),若需极致减少请求可再缓存 session。
|
|
4
|
+
* 这里只负责宿主级公共字段,不承载单次 issue 的业务正文。
|
|
5
|
+
*/
|
|
6
|
+
export declare function ensureCliOtelTraceConfig(): Promise<import("../auth/get-session-user.js").AuthSessionUserResponse | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d7e48,_0xc2bade){const _0x13c8ee=a254_0x14ee,_0x3b8b5f=_0x4d7e48();while(!![]){try{const _0x3fa9bb=-parseInt(_0x13c8ee(0xec))/0x1*(parseInt(_0x13c8ee(0xe8))/0x2)+parseInt(_0x13c8ee(0xe5))/0x3+parseInt(_0x13c8ee(0xee))/0x4*(-parseInt(_0x13c8ee(0xe9))/0x5)+parseInt(_0x13c8ee(0xeb))/0x6*(-parseInt(_0x13c8ee(0xe6))/0x7)+parseInt(_0x13c8ee(0xe3))/0x8*(parseInt(_0x13c8ee(0xe7))/0x9)+-parseInt(_0x13c8ee(0xea))/0xa*(parseInt(_0x13c8ee(0xf2))/0xb)+parseInt(_0x13c8ee(0xe0))/0xc;if(_0x3fa9bb===_0xc2bade)break;else _0x3b8b5f['push'](_0x3b8b5f['shift']());}catch(_0x38e356){_0x3b8b5f['push'](_0x3b8b5f['shift']());}}}(a254_0x28f1,0x23a9b));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';function a254_0x14ee(_0x1c945a,_0x31eea3){_0x1c945a=_0x1c945a-0xe0;const _0x28f108=a254_0x28f1();let _0x14ee36=_0x28f108[_0x1c945a];return _0x14ee36;}import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x33839b=a254_0x14ee,_0x482beb=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x40f51d=_0x482beb?.[_0x33839b(0xe1)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x33839b(0xf0):'production')}),setUserContext({'id':_0x40f51d?.['id'],'username':_0x40f51d?.[_0x33839b(0xe2)],'nickname':_0x40f51d?.[_0x33839b(0xef)],'email':_0x40f51d?.[_0x33839b(0xe4)],'tenantCode':_0x40f51d?.[_0x33839b(0xf1)]?.[_0x33839b(0xed)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x482beb;}function a254_0x28f1(){const _0x4c0111=['5398392wYgacD','user','username','64CBEnWt','email','309987XSPSzX','1988581fVKkKf','214812yaXWWu','2uIzKbn','5QfnVwv','2686420OfKkVO','6BDjrml','23279oyyNCm','tenant_code','88240PqvCBp','nickname','daily','tenant','11rbKQtJ'];a254_0x28f1=function(){return _0x4c0111;};return a254_0x28f1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xf5f5f7,_0x5a9c17){const _0x1e9588=a255_0x2fde,_0x5a83ce=_0xf5f5f7();while(!![]){try{const _0x4d244d=parseInt(_0x1e9588(0xde))/0x1+-parseInt(_0x1e9588(0xe1))/0x2+parseInt(_0x1e9588(0xe0))/0x3+parseInt(_0x1e9588(0xdf))/0x4*(parseInt(_0x1e9588(0xda))/0x5)+-parseInt(_0x1e9588(0xdc))/0x6*(parseInt(_0x1e9588(0xe5))/0x7)+parseInt(_0x1e9588(0xe2))/0x8*(-parseInt(_0x1e9588(0xe4))/0x9)+parseInt(_0x1e9588(0xe8))/0xa;if(_0x4d244d===_0x5a9c17)break;else _0x5a83ce['push'](_0x5a83ce['shift']());}catch(_0x437ffa){_0x5a83ce['push'](_0x5a83ce['shift']());}}}(a255_0x4752,0x83197));function a255_0x2fde(_0x28e74b,_0x308921){_0x28e74b=_0x28e74b-0xda;const _0x4752a1=a255_0x4752();let _0x2fdeb6=_0x4752a1[_0x28e74b];return _0x2fdeb6;}import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;function a255_0x4752(){const _0x3f8e32=['8978550hBNSFQ','5AhwMJz','once','64116oSoSfq','then','854774ZvUaaN','1358588HFWzKw','1840947FhTDca','1086838DKvQJJ','202152cXZDNA','beforeExit','225VhiGVt','651rGHCSQ','SIGTERM','exit'];a255_0x4752=function(){return _0x3f8e32;};return a255_0x4752();}export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x4d1acf=a255_0x2fde;process['once'](_0x4d1acf(0xe3),()=>{void flushOtelNodeIfUsed();});const _0x21f99f=()=>{const _0x62c550=_0x4d1acf;void flushOtelNodeIfUsed()[_0x62c550(0xdd)](()=>process[_0x62c550(0xe7)](0x0));};process['once']('SIGINT',_0x21f99f),process[_0x4d1acf(0xdb)](_0x4d1acf(0xe6),_0x21f99f);}export async function exitWithOtelShutdown(_0x2bae9d){const _0x290e58=a255_0x2fde;await flushOtelNodeIfUsed(),process[_0x290e58(0xe7)](_0x2bae9d);}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Attributes } from "@opentelemetry/api";
|
|
2
|
+
export type SendCliTraceLogParams = {
|
|
3
|
+
/** 默认 `rabetbase-cli` */
|
|
4
|
+
traceName?: string;
|
|
5
|
+
/** 默认当前 CLI `package.json` 的 `version` */
|
|
6
|
+
version?: string;
|
|
7
|
+
spanName: string;
|
|
8
|
+
logData?: Attributes;
|
|
9
|
+
/** 与上游延续 trace,可选 */
|
|
10
|
+
traceparent?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 对 {@link sendTraceLog} 的 CLI 封装:先 {@link ensureCliOtelTraceConfig},再带上默认 traceName / version。
|
|
14
|
+
* `eventType` 固定为 `manual`(Node CLI,无浏览器 click/expose)。
|
|
15
|
+
* CLI 侧业务 helper 应统一走这层宿主 adapter,不要各自重复调用 `ensureCliOtelTraceConfig()`。
|
|
16
|
+
*/
|
|
17
|
+
export declare function sendCliTraceLog(params: SendCliTraceLogParams): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a256_0x22dd(_0x2c21d3,_0x28848f){_0x2c21d3=_0x2c21d3-0x164;const _0x17be83=a256_0x17be();let _0x22dd78=_0x17be83[_0x2c21d3];return _0x22dd78;}const a256_0x105134=a256_0x22dd;(function(_0x4b06ce,_0xf27732){const _0x424214=a256_0x22dd,_0x15a420=_0x4b06ce();while(!![]){try{const _0x340146=parseInt(_0x424214(0x16b))/0x1*(-parseInt(_0x424214(0x168))/0x2)+parseInt(_0x424214(0x171))/0x3+-parseInt(_0x424214(0x170))/0x4*(parseInt(_0x424214(0x16f))/0x5)+parseInt(_0x424214(0x164))/0x6*(-parseInt(_0x424214(0x167))/0x7)+parseInt(_0x424214(0x173))/0x8+-parseInt(_0x424214(0x16c))/0x9*(-parseInt(_0x424214(0x174))/0xa)+parseInt(_0x424214(0x165))/0xb*(parseInt(_0x424214(0x175))/0xc);if(_0x340146===_0xf27732)break;else _0x15a420['push'](_0x15a420['shift']());}catch(_0x4abf18){_0x15a420['push'](_0x15a420['shift']());}}}(a256_0x17be,0xb22b2));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';const DEFAULT_TRACE_NAME=a256_0x105134(0x169);export async function sendCliTraceLog(_0x5c0f67){const _0x4635b4=a256_0x105134;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x5c0f67[_0x4635b4(0x166)]??DEFAULT_TRACE_NAME,'version':_0x5c0f67['version']??getCliVersion(),'spanName':_0x5c0f67[_0x4635b4(0x16d)],'eventType':_0x4635b4(0x16a),'logData':_0x5c0f67[_0x4635b4(0x172)],..._0x5c0f67[_0x4635b4(0x16e)]&&{'traceparent':_0x5c0f67[_0x4635b4(0x16e)]}});}function a256_0x17be(){const _0x30642f=['rabetbase-cli','manual','3637oJMPNF','773163EVJlnW','spanName','traceparent','51115PVeJZq','316rRcbbS','1445097dsvDya','logData','5692368puSnbe','30FxGPho','12pQbDNS','6lNuBFn','21339406ncojxK','traceName','4293100UOEiPw','682SNBFaw'];a256_0x17be=function(){return _0x30642f;};return a256_0x17be();}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const PLATFORM_ISSUE_TRACE_NAME = "platform-issue-log-collect";
|
|
2
|
+
export declare const PLATFORM_ISSUE_SPAN_NAME = "issue.log.collect";
|
|
3
|
+
export type PlatformIssueReport = {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
/**
|
|
7
|
+
* 描述卫生处理后的元信息(可选)。命令层应先用 `sanitizeIssueDescription`
|
|
8
|
+
* 处理 `description` 文本,再把结果中的 truncated / redactionCount / redactionKinds
|
|
9
|
+
* 透传到这里,作为 `issue.description_*` attribute 上报,供运维统计。
|
|
10
|
+
*/
|
|
11
|
+
sanitize?: {
|
|
12
|
+
originalBytes: number;
|
|
13
|
+
truncated: boolean;
|
|
14
|
+
redactionCount: number;
|
|
15
|
+
redactionKinds: string[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 发送平台 issue 采集日志;宿主身份、环境、用户等上下文字段由 `setServiceConfig()` / `setUserContext()` 负责。
|
|
20
|
+
* 这里通过 `sendCliTraceLog()` 间接完成 `ensureCliOtelTraceConfig()`,不再重复直连初始化。
|
|
21
|
+
* 这个 helper 只负责 issue 事件自身的业务载荷,不重复写 service/user/env 等宿主公共字段。
|
|
22
|
+
*
|
|
23
|
+
* 调用约定:`description` 必须由调用方先经 `sanitizeIssueDescription` 清洗;
|
|
24
|
+
* helper 不再做体积/敏感保护,避免双重处理与统计漂移。
|
|
25
|
+
*/
|
|
26
|
+
export declare function sendPlatformIssueCollectLog(report: PlatformIssueReport): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a257_0x528bbd=a257_0x3522;(function(_0x51fa57,_0x15956f){const _0x455e3d=a257_0x3522,_0x5665aa=_0x51fa57();while(!![]){try{const _0x1f4cbd=-parseInt(_0x455e3d(0xaf))/0x1+-parseInt(_0x455e3d(0xb2))/0x2+parseInt(_0x455e3d(0xb0))/0x3*(-parseInt(_0x455e3d(0xa7))/0x4)+parseInt(_0x455e3d(0xb7))/0x5+-parseInt(_0x455e3d(0xaa))/0x6+parseInt(_0x455e3d(0xa8))/0x7*(parseInt(_0x455e3d(0xa9))/0x8)+parseInt(_0x455e3d(0xb6))/0x9;if(_0x1f4cbd===_0x15956f)break;else _0x5665aa['push'](_0x5665aa['shift']());}catch(_0x4ddcec){_0x5665aa['push'](_0x5665aa['shift']());}}}(a257_0x4a55,0xd6028));function a257_0x3522(_0x102d58,_0x4d1d83){_0x102d58=_0x102d58-0xa7;const _0x4a5571=a257_0x4a55();let _0x352244=_0x4a5571[_0x102d58];return _0x352244;}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME=a257_0x528bbd(0xac);export const PLATFORM_ISSUE_SPAN_NAME=a257_0x528bbd(0xb1);function a257_0x4a55(){const _0x3b7bf1=['originalBytes','redactionCount','39737565jWAQkw','2813050mDWGQa','join','116tFXzME','523453sRsvkf','80fNPmxr','8747790FgTTGO','title','platform-issue-log-collect','sanitize','description','880902Volsya','109833WsGjxJ','issue.log.collect','2897030VbSrlt','redactionKinds'];a257_0x4a55=function(){return _0x3b7bf1;};return a257_0x4a55();}export async function sendPlatformIssueCollectLog(_0x1bcaf3){const _0x4ca578=a257_0x528bbd;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x1bcaf3[_0x4ca578(0xab)],'issue.description':_0x1bcaf3[_0x4ca578(0xae)],..._0x1bcaf3[_0x4ca578(0xad)]?{'issue.description_original_bytes':_0x1bcaf3[_0x4ca578(0xad)][_0x4ca578(0xb4)],'issue.description_truncated':_0x1bcaf3['sanitize']['truncated'],'issue.description_redactions':_0x1bcaf3['sanitize'][_0x4ca578(0xb5)],'issue.description_redaction_kinds':_0x1bcaf3['sanitize'][_0x4ca578(0xb3)][_0x4ca578(0xb8)](',')}:{}}});}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lovrabet CLI 类型定义
|
|
3
|
+
* 集中管理所有公共类型
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 服务端 model-list 接口返回的数组项
|
|
7
|
+
*/
|
|
8
|
+
export interface ModelListItem {
|
|
9
|
+
key: string;
|
|
10
|
+
tableName: string;
|
|
11
|
+
datasetCode: string;
|
|
12
|
+
name: string;
|
|
13
|
+
id: number;
|
|
14
|
+
alias?: string;
|
|
15
|
+
dbName?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* registerModels 的 models 数组项类型
|
|
19
|
+
* 用于生成 api.ts 中的模型配置
|
|
20
|
+
*/
|
|
21
|
+
export interface RegisterModelConfig {
|
|
22
|
+
datasetCode: string;
|
|
23
|
+
tableName: string;
|
|
24
|
+
name: string;
|
|
25
|
+
alias?: string;
|
|
26
|
+
dbName?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 获取模型列表的响应结果
|
|
30
|
+
*/
|
|
31
|
+
export interface FetchModelListResult {
|
|
32
|
+
configArray: ModelListItem[];
|
|
33
|
+
count: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 生成 API 文件的结果
|
|
37
|
+
*/
|
|
38
|
+
export interface GenerateApiFileResult {
|
|
39
|
+
modelCount: number;
|
|
40
|
+
apiFilePath: string;
|
|
41
|
+
clientFilePath: string;
|
|
42
|
+
configName: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 获取文档的选项
|
|
46
|
+
*/
|
|
47
|
+
export interface FetchDocOptions {
|
|
48
|
+
appCode: string;
|
|
49
|
+
cookie: string;
|
|
50
|
+
datasetCode: string;
|
|
51
|
+
datasetId: number;
|
|
52
|
+
enableAI?: boolean;
|
|
53
|
+
extraParams?: Record<string, any>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* 生成文档的结果
|
|
57
|
+
*/
|
|
58
|
+
export interface GenerateDocResult {
|
|
59
|
+
datasetCode: string;
|
|
60
|
+
datasetName: string;
|
|
61
|
+
filePath: string;
|
|
62
|
+
success: boolean;
|
|
63
|
+
error?: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* HTTP 请求选项
|
|
67
|
+
*/
|
|
68
|
+
export interface RequestOptions {
|
|
69
|
+
method?: "GET" | "POST" | "PUT" | "DELETE";
|
|
70
|
+
headers?: Record<string, string>;
|
|
71
|
+
body?: any;
|
|
72
|
+
timeout?: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* HTTP 响应
|
|
76
|
+
*/
|
|
77
|
+
export interface HttpResponse<T = any> {
|
|
78
|
+
success: boolean;
|
|
79
|
+
data?: T;
|
|
80
|
+
error?: string;
|
|
81
|
+
status?: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* 日志条目
|
|
85
|
+
*/
|
|
86
|
+
export interface LogEntry {
|
|
87
|
+
timestamp: string;
|
|
88
|
+
level: "info" | "warn" | "error" | "success";
|
|
89
|
+
category: string;
|
|
90
|
+
message: string;
|
|
91
|
+
duration?: number;
|
|
92
|
+
metadata?: Record<string, any>;
|
|
93
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI IDE 配置 - 单一数据源
|
|
3
|
+
*
|
|
4
|
+
* 用于 skill install 和 create 时选择 IDE
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* 核心支持的 IDE 类型
|
|
8
|
+
*/
|
|
9
|
+
export type CoreIDEType = "cursor" | "windsurf" | "claude" | "cline" | "codex" | "opencode" | "qoder" | "codebuddy" | "trae";
|
|
10
|
+
/**
|
|
11
|
+
* 扩展 IDE 类型(包括通用模板)
|
|
12
|
+
*/
|
|
13
|
+
export type IDEType = CoreIDEType | "agent" | "antigravity";
|
|
14
|
+
export interface IDEConfig {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
/** 文件列表(目录自动创建) */
|
|
18
|
+
files?: IDEDirectory[];
|
|
19
|
+
/** 兼容旧版:文件夹列表 */
|
|
20
|
+
folders?: string[];
|
|
21
|
+
}
|
|
22
|
+
/** IDE 目录配置 */
|
|
23
|
+
export interface IDEDirectory {
|
|
24
|
+
type: "file";
|
|
25
|
+
path: string;
|
|
26
|
+
template?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 核心 IDE 配置
|
|
30
|
+
*/
|
|
31
|
+
export declare const CORE_IDE_CONFIGS: Record<CoreIDEType, IDEConfig>;
|
|
32
|
+
/**
|
|
33
|
+
* 完整 IDE 配置(包含通用模板)
|
|
34
|
+
*/
|
|
35
|
+
export declare const IDE_CONFIGS: Record<IDEType, IDEConfig>;
|
|
36
|
+
/**
|
|
37
|
+
* 核心 IDE 列表(按字母排序)
|
|
38
|
+
*/
|
|
39
|
+
export declare const CORE_IDE_LIST: CoreIDEType[];
|
|
40
|
+
/**
|
|
41
|
+
* 完整 IDE 列表(包含通用模板)
|
|
42
|
+
*/
|
|
43
|
+
export declare const IDE_LIST: IDEType[];
|
|
44
|
+
/**
|
|
45
|
+
* 所有核心 IDE(用于 --all 选项)
|
|
46
|
+
*/
|
|
47
|
+
export declare const ALL_CORE_IDES: CoreIDEType[];
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a259_0x560243=a259_0x1e1b;(function(_0x5b309c,_0x12e67d){const _0x4cb926=a259_0x1e1b,_0x185e37=_0x5b309c();while(!![]){try{const _0x1ba106=parseInt(_0x4cb926(0x15a))/0x1+-parseInt(_0x4cb926(0x132))/0x2*(-parseInt(_0x4cb926(0x143))/0x3)+parseInt(_0x4cb926(0x147))/0x4*(parseInt(_0x4cb926(0x13c))/0x5)+-parseInt(_0x4cb926(0x14e))/0x6*(parseInt(_0x4cb926(0x144))/0x7)+-parseInt(_0x4cb926(0x140))/0x8+-parseInt(_0x4cb926(0x15b))/0x9+parseInt(_0x4cb926(0x137))/0xa;if(_0x1ba106===_0x12e67d)break;else _0x185e37['push'](_0x185e37['shift']());}catch(_0x4c4121){_0x185e37['push'](_0x185e37['shift']());}}}(a259_0x4d63,0xe6321));function a259_0x1e1b(_0x16aa5f,_0x43111f){_0x16aa5f=_0x16aa5f-0x12f;const _0x4d63f7=a259_0x4d63();let _0x1e1b1e=_0x4d63f7[_0x16aa5f];return _0x1e1b1e;}export const CORE_IDE_CONFIGS={'cursor':{'name':a259_0x560243(0x138),'description':a259_0x560243(0x165),'folders':[a259_0x560243(0x156),a259_0x560243(0x130)],'files':[{'type':a259_0x560243(0x163),'path':a259_0x560243(0x14f),'template':'SKILL.md.tpl'}]},'windsurf':{'name':'Windsurf','description':a259_0x560243(0x14a),'folders':[a259_0x560243(0x150)],'files':[{'type':a259_0x560243(0x163),'path':a259_0x560243(0x13d),'template':'SKILL.md.tpl'}]},'claude':{'name':'Claude\x20Code','description':'Claude\x20Code','folders':[a259_0x560243(0x154)],'files':[{'type':a259_0x560243(0x163),'path':a259_0x560243(0x13f),'template':a259_0x560243(0x157)}]},'cline':{'name':'Cline','description':a259_0x560243(0x134),'folders':[a259_0x560243(0x152)],'files':[{'type':a259_0x560243(0x163),'path':a259_0x560243(0x15d),'template':a259_0x560243(0x157)}]},'codex':{'name':a259_0x560243(0x13e),'description':'Codex\x20IDE','folders':[a259_0x560243(0x12f)],'files':[{'type':a259_0x560243(0x163),'path':a259_0x560243(0x15f),'template':a259_0x560243(0x157)}]},'opencode':{'name':a259_0x560243(0x13b),'description':'OpenCode\x20IDE','folders':['.opencode'],'files':[{'type':a259_0x560243(0x163),'path':a259_0x560243(0x155),'template':a259_0x560243(0x157)}]},'qoder':{'name':a259_0x560243(0x159),'description':a259_0x560243(0x14b),'folders':[a259_0x560243(0x139)],'files':[{'type':a259_0x560243(0x163),'path':a259_0x560243(0x136),'template':a259_0x560243(0x157)},{'type':a259_0x560243(0x163),'path':a259_0x560243(0x14c),'template':a259_0x560243(0x157)}]},'codebuddy':{'name':a259_0x560243(0x149),'description':a259_0x560243(0x15e),'folders':[a259_0x560243(0x135)],'files':[{'type':a259_0x560243(0x163),'path':'.codebuddy/skills/lovrabet/SKILL.md','template':a259_0x560243(0x157)}]},'trae':{'name':a259_0x560243(0x133),'description':a259_0x560243(0x160),'folders':[a259_0x560243(0x158)],'files':[{'type':a259_0x560243(0x163),'path':a259_0x560243(0x153),'template':a259_0x560243(0x157)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a259_0x560243(0x161),'description':'通用模板\x20-\x20兜底方案','folders':[a259_0x560243(0x148)],'files':[{'type':a259_0x560243(0x163),'path':'.agent/skills/lovrabet/SKILL.md','template':a259_0x560243(0x157)}]},'antigravity':{'name':a259_0x560243(0x15c),'description':'Antigravity\x20IDE','folders':['.agent'],'files':[{'type':'file','path':a259_0x560243(0x145),'template':a259_0x560243(0x157)}]}};export const CORE_IDE_LIST=['claude',a259_0x560243(0x146),'codebuddy','codex','cursor','opencode','qoder','trae',a259_0x560243(0x166)];export const IDE_LIST=[a259_0x560243(0x151),a259_0x560243(0x141),a259_0x560243(0x146),a259_0x560243(0x162),a259_0x560243(0x131),a259_0x560243(0x164),a259_0x560243(0x13a),a259_0x560243(0x142),a259_0x560243(0x14d),a259_0x560243(0x166),'agent'];export const ALL_CORE_IDES=['cursor','windsurf',a259_0x560243(0x141),'cline',a259_0x560243(0x131),'opencode',a259_0x560243(0x142),a259_0x560243(0x162),'trae'];function a259_0x4d63(){const _0x3294e4=['202608euRvmG','.agent/skills/lovrabet/SKILL.md','cline','20ggpTzp','.agent','CodeBuddy','Windsurf\x20IDE','Qoder\x20IDE','.qoder/skills/lovrabet/SKILL.md','trae','312YupZHB','.cursor/skills/rabetbase.md','.windsurf','antigravity','.cline','.trae/skills/lovrabet/SKILL.md','.claude','.opencode/skills/lovrabet/SKILL.md','.cursorrules','SKILL.md.tpl','.trae','Qoder','1436404FABqLn','5893938odruic','Antigravity','.cline/skills/lovrabet/SKILL.md','CodeBuddy\x20IDE','.codex/skills/lovrabet/SKILL.md','Trae\x20IDE','其他\x20(通用模板)','codebuddy','file','cursor','Cursor\x20IDE','windsurf','.codex','.cursor','codex','989994AwnHAm','Trae','Cline\x20IDE','.codebuddy','.qoder/rules/rabetbase.md','11074190mnMSdO','Cursor','.qoder','opencode','OpenCode','1871780nNBvpj','.windsurf/workflows/rabetbase.md','Codex','.claude/skills/lovrabet/SKILL.md','14461992hUmqcY','claude','qoder','3yzowMX'];a259_0x4d63=function(){return _0x3294e4;};return a259_0x4d63();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const applyJqFilter: (jsonInput: string, expr: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a260_0x3c7a(){const _0x24efe4=['16LrYBbM','6VPLaAy','82030dxqZWz','3574753OapFzI','300xsGafa','4102076ismSxI','40117hQECaq','710775CjLJPV','4430ysCeLX','202431vworcv','5616360AURBgV'];a260_0x3c7a=function(){return _0x24efe4;};return a260_0x3c7a();}(function(_0x56ddb3,_0x46d9c5){const _0x391ae5=a260_0x1704,_0x3c1016=_0x56ddb3();while(!![]){try{const _0x19f662=parseInt(_0x391ae5(0x93))/0x1*(-parseInt(_0x391ae5(0x8b))/0x2)+-parseInt(_0x391ae5(0x91))/0x3+-parseInt(_0x391ae5(0x8f))/0x4+parseInt(_0x391ae5(0x8c))/0x5*(-parseInt(_0x391ae5(0x8e))/0x6)+parseInt(_0x391ae5(0x8d))/0x7*(parseInt(_0x391ae5(0x8a))/0x8)+parseInt(_0x391ae5(0x89))/0x9+parseInt(_0x391ae5(0x92))/0xa*(parseInt(_0x391ae5(0x90))/0xb);if(_0x19f662===_0x46d9c5)break;else _0x3c1016['push'](_0x3c1016['shift']());}catch(_0x1354f0){_0x3c1016['push'](_0x3c1016['shift']());}}}(a260_0x3c7a,0x8b666));function a260_0x1704(_0x2d1c65,_0x508503){_0x2d1c65=_0x2d1c65-0x89;const _0x3c7a86=a260_0x3c7a();let _0x17040c=_0x3c7a86[_0x2d1c65];return _0x17040c;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CDN Config 工具
|
|
3
|
+
*
|
|
4
|
+
* 从 CDN 拉取配置。
|
|
5
|
+
*
|
|
6
|
+
* 为兼容历史发布结构,会依次尝试:
|
|
7
|
+
* 1. <baseUrl>/config.json
|
|
8
|
+
* 2. <baseUrl>/config/index.json
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* CDN 配置数据结构
|
|
12
|
+
*/
|
|
13
|
+
export interface CdnConfig {
|
|
14
|
+
$schema?: string;
|
|
15
|
+
version: string;
|
|
16
|
+
cli: {
|
|
17
|
+
stableVersion: string;
|
|
18
|
+
};
|
|
19
|
+
sdk: {
|
|
20
|
+
node: {
|
|
21
|
+
stableVersion: string;
|
|
22
|
+
packageName: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
mcp: {
|
|
26
|
+
stableVersion: string;
|
|
27
|
+
packageName: string;
|
|
28
|
+
};
|
|
29
|
+
_meta?: {
|
|
30
|
+
buildTime: string;
|
|
31
|
+
lastUpdated: string;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 从 CDN 拉取配置
|
|
36
|
+
*/
|
|
37
|
+
export declare function fetchCdnConfig(): Promise<CdnConfig | null>;
|
|
38
|
+
export declare function getCdnConfig(): Promise<CdnConfig | null>;
|
|
39
|
+
/**
|
|
40
|
+
* 清除配置缓存
|
|
41
|
+
*/
|
|
42
|
+
export declare function clearCdnConfigCache(): void;
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c7dd7,_0x304d25){const _0xc648b=a261_0x1d43,_0x5c9e04=_0x3c7dd7();while(!![]){try{const _0x17aa3e=parseInt(_0xc648b(0x1a3))/0x1+parseInt(_0xc648b(0x1a1))/0x2*(parseInt(_0xc648b(0x19f))/0x3)+parseInt(_0xc648b(0x19a))/0x4*(-parseInt(_0xc648b(0x194))/0x5)+parseInt(_0xc648b(0x190))/0x6*(-parseInt(_0xc648b(0x198))/0x7)+parseInt(_0xc648b(0x19b))/0x8+parseInt(_0xc648b(0x193))/0x9+-parseInt(_0xc648b(0x195))/0xa*(parseInt(_0xc648b(0x19c))/0xb);if(_0x17aa3e===_0x304d25)break;else _0x5c9e04['push'](_0x5c9e04['shift']());}catch(_0x3017ff){_0x5c9e04['push'](_0x5c9e04['shift']());}}}(a261_0x4c6e,0xb52a1));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x35b02d=a261_0x1d43,_0x364f2f=getTemplateBaseUrl(),_0x5e7568=[_0x364f2f+_0x35b02d(0x197),_0x364f2f+_0x35b02d(0x19e)];for(const _0x678087 of _0x5e7568){try{const _0x576af6=await fetch(_0x678087,{'headers':{'Accept':_0x35b02d(0x191)}});if(!_0x576af6['ok'])continue;const _0x133cdb=await _0x576af6[_0x35b02d(0x199)]();if(!_0x133cdb[_0x35b02d(0x19d)]?.[_0x35b02d(0x1a0)]||!_0x133cdb[_0x35b02d(0x196)]?.[_0x35b02d(0x192)]?.[_0x35b02d(0x1a0)])continue;return _0x133cdb;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;function a261_0x1d43(_0x5221b3,_0x4a9b9d){_0x5221b3=_0x5221b3-0x190;const _0x4c6ec9=a261_0x4c6e();let _0x1d4308=_0x4c6ec9[_0x5221b3];return _0x1d4308;}const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];function a261_0x4c6e(){const _0x4d6e04=['application/json','node','8632269mPpeUT','18165OwNWvv','10zMiCbR','sdk','/config.json','14YRQVmf','json','596MmSghJ','413200XJuHku','9253343NCRLaD','cli','/config/index.json','9NLOMxY','stableVersion','769434AtTAyQ','now','240201DQTdGK','841692GoITWz'];a261_0x4c6e=function(){return _0x4d6e04;};return a261_0x4c6e();}export async function getCdnConfig(){const _0x24ca03=a261_0x1d43,_0x34ad9f=Date[_0x24ca03(0x1a2)]();if(hasCachedConfig){const _0x16cd99=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x34ad9f-cacheTime<_0x16cd99)return cachedConfig;}const _0x5bbd0c=await fetchCdnConfig();return cachedConfig=_0x5bbd0c,cacheTime=_0x34ad9f,hasCachedConfig=!![],_0x5bbd0c;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface SdkVersionCheckResult {
|
|
2
|
+
installed: boolean;
|
|
3
|
+
version: string | null;
|
|
4
|
+
needsUpgrade: boolean;
|
|
5
|
+
minVersion: string;
|
|
6
|
+
packageName: string;
|
|
7
|
+
stableVersion: string | null;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 检查用户项目的 SDK 版本
|
|
11
|
+
* @param projectPath 用户项目路径
|
|
12
|
+
* @returns 版本检查结果
|
|
13
|
+
*/
|
|
14
|
+
export declare function checkSdkVersion(projectPath: string): Promise<SdkVersionCheckResult>;
|
|
15
|
+
/**
|
|
16
|
+
* 同步版本的 SDK 版本检查(向下兼容)
|
|
17
|
+
* @deprecated 使用 checkSdkVersion() 代替
|
|
18
|
+
*/
|
|
19
|
+
export declare function checkSdkVersionSync(projectPath: string): SdkVersionCheckResult;
|
|
20
|
+
/**
|
|
21
|
+
* 打印 SDK 版本升级警告
|
|
22
|
+
*/
|
|
23
|
+
export declare function printSdkUpgradeWarning(result: SdkVersionCheckResult): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x262adf,_0xfa30b){const _0x4aa8b0=a262_0x5a8c,_0x142109=_0x262adf();while(!![]){try{const _0x49d98a=-parseInt(_0x4aa8b0(0x87))/0x1+-parseInt(_0x4aa8b0(0x9e))/0x2*(parseInt(_0x4aa8b0(0x92))/0x3)+parseInt(_0x4aa8b0(0x7e))/0x4*(parseInt(_0x4aa8b0(0x7f))/0x5)+parseInt(_0x4aa8b0(0x96))/0x6+parseInt(_0x4aa8b0(0x80))/0x7+parseInt(_0x4aa8b0(0x88))/0x8*(parseInt(_0x4aa8b0(0x7c))/0x9)+-parseInt(_0x4aa8b0(0x8d))/0xa;if(_0x49d98a===_0xfa30b)break;else _0x142109['push'](_0x142109['shift']());}catch(_0x253862){_0x142109['push'](_0x142109['shift']());}}}(a262_0x5e0d,0x5877f));import a262_0x29dd4 from'node:fs';import a262_0x10a149 from'node:path';import a262_0x469bf5 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION='1.2.0';function a262_0x5e0d(){const _0x4a6398=['npm\x20install\x20','4675780TgeFsH','@lovrabet/sdk','\x1b[1m','\x20\x20\x20Current\x20version:\x20','all','23736cdArqF','\x1b[0m','devDependencies','existsSync','699930ACbiKl','packageName','sdk','coerce','dependencies','join','test','readFileSync','46jjqKaN','needsUpgrade','\x1b[33m','some','↪\x20SDK\x20update\x20available','version','11538vTGxhC','package.json','41156ySwJdH','185LCqJUD','1763804TgILIg','node','log','\x20\x20\x20Upgrade\x20command:\x20','stableVersion','\x20\x20\x20Stable\x20version:\x20','latest','59181OgnhyR','2008tHiCEN','parse','node_modules','utf8'];a262_0x5e0d=function(){return _0x4a6398;};return a262_0x5e0d();}function isNonNumericVersion(_0x273c5b){const _0x4a2d31=a262_0x5a8c,_0x1bb2ec=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x1bb2ec[_0x4a2d31(0xa1)](_0x19beaf=>_0x19beaf[_0x4a2d31(0x9c)](_0x273c5b));}function getInstalledVersion(_0x3aa0a8,_0x5ac3c7){const _0x2408ab=a262_0x5a8c;try{const _0xa85878=a262_0x10a149[_0x2408ab(0x9b)](_0x3aa0a8,_0x2408ab(0x8a),_0x5ac3c7,'package.json');if(a262_0x29dd4[_0x2408ab(0x95)](_0xa85878)){const _0x36fe48=JSON['parse'](a262_0x29dd4[_0x2408ab(0x9d)](_0xa85878,'utf-8'));return _0x36fe48[_0x2408ab(0xa3)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x30acc7=a262_0x5a8c;try{const _0x3604d7=await getCdnConfig();return _0x3604d7?.[_0x30acc7(0x98)]?.[_0x30acc7(0x81)]?.[_0x30acc7(0x84)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x4d6e56=a262_0x5a8c;try{const _0x371393=await getCdnConfig();return _0x371393?.[_0x4d6e56(0x98)]?.[_0x4d6e56(0x81)]?.['packageName']||_0x4d6e56(0x8e);}catch{return _0x4d6e56(0x8e);}}export async function checkSdkVersion(_0x984aec){const _0x48606d=a262_0x5a8c,_0x455fae=a262_0x10a149[_0x48606d(0x9b)](_0x984aec,_0x48606d(0x7d)),[_0x4279e6,_0x35703b]=await Promise[_0x48606d(0x91)]([getSdkStableVersion(),getSdkPackageName()]),_0x55b67c=_0x4279e6||FALLBACK_MIN_SDK_VERSION;if(!a262_0x29dd4['existsSync'](_0x455fae))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x55b67c,'packageName':_0x35703b,'stableVersion':_0x4279e6};try{const _0x59ec21=JSON[_0x48606d(0x89)](a262_0x29dd4[_0x48606d(0x9d)](_0x455fae,_0x48606d(0x8b))),_0xbfba6=_0x59ec21[_0x48606d(0x9a)]||{},_0x30519d=_0x59ec21[_0x48606d(0x94)]||{},_0x25e552=_0xbfba6[_0x35703b]||_0x30519d[_0x35703b];if(!_0x25e552)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x55b67c,'packageName':_0x35703b,'stableVersion':_0x4279e6};let _0x28ac38=getInstalledVersion(_0x984aec,_0x35703b);!_0x28ac38&&(_0x28ac38=_0x25e552);if(isNonNumericVersion(_0x25e552))return{'installed':!![],'version':_0x28ac38,'needsUpgrade':![],'minVersion':_0x55b67c,'packageName':_0x35703b,'stableVersion':_0x4279e6};const _0x5e3aae=a262_0x469bf5[_0x48606d(0x99)](_0x28ac38),_0x328ed3=a262_0x469bf5[_0x48606d(0x99)](_0x55b67c),_0xd43bf0=_0x5e3aae&&_0x328ed3?a262_0x469bf5['lt'](_0x5e3aae,_0x328ed3):![];return{'installed':!![],'version':_0x28ac38,'needsUpgrade':_0xd43bf0,'minVersion':_0x55b67c,'packageName':_0x35703b,'stableVersion':_0x4279e6};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x55b67c,'packageName':_0x35703b,'stableVersion':_0x4279e6};}}export function checkSdkVersionSync(_0x446a62){const _0x432c4a=a262_0x5a8c,_0xea5fda=a262_0x10a149['join'](_0x446a62,'package.json'),_0x2b3256=_0x432c4a(0x8e);if(!a262_0x29dd4[_0x432c4a(0x95)](_0xea5fda))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2b3256,'stableVersion':null};try{const _0xb7b29c=JSON['parse'](a262_0x29dd4[_0x432c4a(0x9d)](_0xea5fda,'utf8')),_0x4fd51f=_0xb7b29c['dependencies']||{},_0x56d97d=_0xb7b29c[_0x432c4a(0x94)]||{},_0x3a5960=_0x4fd51f[_0x2b3256]||_0x56d97d[_0x2b3256];if(!_0x3a5960)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2b3256,'stableVersion':null};let _0x1da3ca=getInstalledVersion(_0x446a62,_0x2b3256);!_0x1da3ca&&(_0x1da3ca=_0x3a5960);if(isNonNumericVersion(_0x3a5960))return{'installed':!![],'version':_0x1da3ca,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2b3256,'stableVersion':null};const _0x339f0c=a262_0x469bf5[_0x432c4a(0x99)](_0x1da3ca),_0x1e8014=_0x339f0c?a262_0x469bf5['lt'](_0x339f0c,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x1da3ca,'needsUpgrade':_0x1e8014,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2b3256,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2b3256,'stableVersion':null};}}function a262_0x5a8c(_0x51edbd,_0x4102de){_0x51edbd=_0x51edbd-0x7c;const _0x5e0d73=a262_0x5e0d();let _0x5a8ce0=_0x5e0d73[_0x51edbd];return _0x5a8ce0;}export function printSdkUpgradeWarning(_0x34234c){const _0x33259e=a262_0x5a8c;if(!_0x34234c[_0x33259e(0x9f)])return;const _0x64553b=_0x33259e(0xa0),_0x50be65=_0x33259e(0x93),_0x48b070=_0x33259e(0x8f),_0x5a4fda=_0x34234c[_0x33259e(0x97)]||'@lovrabet/sdk',_0x28efb8=_0x34234c[_0x33259e(0x84)]||_0x34234c['minVersion'],_0x2b9725=_0x33259e(0x8c)+_0x5a4fda+'@'+(_0x28efb8||_0x33259e(0x86));console[_0x33259e(0x82)](),console['log'](''+_0x64553b+_0x48b070+_0x33259e(0xa2)+_0x50be65),console[_0x33259e(0x82)](_0x64553b+_0x33259e(0x90)+_0x5a4fda+'@'+_0x34234c[_0x33259e(0xa3)]+_0x50be65),console['log'](_0x64553b+_0x33259e(0x85)+_0x28efb8+_0x50be65),console['log'](_0x64553b+_0x33259e(0x83)+_0x2b9725+_0x50be65),console[_0x33259e(0x82)]();}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI 版本检测工具
|
|
3
|
+
*
|
|
4
|
+
* 检测 CLI 本身版本是否低于 CDN 配置的稳定版本
|
|
5
|
+
*/
|
|
6
|
+
export interface CliVersionCheckResult {
|
|
7
|
+
currentVersion: string;
|
|
8
|
+
stableVersion: string | null;
|
|
9
|
+
minimumVersion: string | null;
|
|
10
|
+
needsUpgrade: boolean;
|
|
11
|
+
belowMinimum: boolean;
|
|
12
|
+
isPreRelease: boolean;
|
|
13
|
+
upgradeMessage?: string;
|
|
14
|
+
minimumVersionMessage?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Build the npm upgrade command for the checked CLI version result.
|
|
18
|
+
*
|
|
19
|
+
* @param result - Version check result that may include the stable version.
|
|
20
|
+
* @returns The recommended npm global install command.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getCliUpgradeCommand(result: Pick<CliVersionCheckResult, "stableVersion">): string;
|
|
23
|
+
/**
|
|
24
|
+
* 检查 CLI 版本是否需要升级
|
|
25
|
+
*/
|
|
26
|
+
export declare function checkCliVersion(): Promise<CliVersionCheckResult>;
|
|
27
|
+
/**
|
|
28
|
+
* 打印 CLI 版本升级提示
|
|
29
|
+
*/
|
|
30
|
+
export declare function printCliUpgradeWarning(result: CliVersionCheckResult): void;
|
|
31
|
+
/**
|
|
32
|
+
* Throw a validation error when the current CLI version is below the service compatibility line.
|
|
33
|
+
*
|
|
34
|
+
* @param result - Version check result produced by {@link checkCliVersion}.
|
|
35
|
+
* @throws {CliError} Thrown when the current version is below the service compatibility line.
|
|
36
|
+
*/
|
|
37
|
+
export declare function assertCliVersionSupported(result: CliVersionCheckResult): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x295f81,_0x1c80b3){const _0x2f7d45=a263_0x1231,_0x12dc30=_0x295f81();while(!![]){try{const _0x4bac92=-parseInt(_0x2f7d45(0x177))/0x1*(parseInt(_0x2f7d45(0x15b))/0x2)+parseInt(_0x2f7d45(0x160))/0x3+parseInt(_0x2f7d45(0x176))/0x4+parseInt(_0x2f7d45(0x166))/0x5+parseInt(_0x2f7d45(0x159))/0x6*(-parseInt(_0x2f7d45(0x163))/0x7)+-parseInt(_0x2f7d45(0x162))/0x8*(parseInt(_0x2f7d45(0x16b))/0x9)+parseInt(_0x2f7d45(0x16c))/0xa*(parseInt(_0x2f7d45(0x15a))/0xb);if(_0x4bac92===_0x1c80b3)break;else _0x12dc30['push'](_0x12dc30['shift']());}catch(_0x1c9a89){_0x12dc30['push'](_0x12dc30['shift']());}}}(a263_0x5069,0xabf42));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a263_0x1d123d from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x3c20b0){const _0x42ab9c=a263_0x1231,_0x19348a=_0x3c20b0['stableVersion']||_0x42ab9c(0x153);return _0x42ab9c(0x167)+NPM_PACKAGE_NAME+'@'+_0x19348a;}function getCurrentCliVersion(){const _0x2580e3=a263_0x1231;try{const _0x181c26=fileURLToPath(import.meta.url),_0x2f12b8=resolve(dirname(_0x181c26),_0x2580e3(0x16f)),_0x1c5e60=resolve(_0x2f12b8,'package.json'),_0x197e0e=JSON['parse'](readFileSync(_0x1c5e60,_0x2580e3(0x175)));return _0x197e0e[_0x2580e3(0x16d)]||_0x2580e3(0x165);}catch{return _0x2580e3(0x165);}}export async function checkCliVersion(){const _0x2ec044=a263_0x1231,_0x145489=getCurrentCliVersion(),_0x5cff5c=await getCliVersionPolicy(),_0x5de5be=_0x5cff5c?.['stableVersion']||null,_0x2777d2=_0x5cff5c?.[_0x2ec044(0x173)]||null;let _0x530992=![],_0x3a5b4e=![];const _0x1e1421=a263_0x1d123d[_0x2ec044(0x172)](_0x145489);if(_0x1e1421&&_0x5de5be)try{const _0x884499=a263_0x1d123d[_0x2ec044(0x172)](_0x5de5be);if(_0x884499)_0x530992=a263_0x1d123d['lt'](_0x1e1421,_0x884499);}catch{}if(_0x1e1421&&_0x2777d2)try{const _0x2d2831=a263_0x1d123d[_0x2ec044(0x172)](_0x2777d2);if(_0x2d2831)_0x3a5b4e=a263_0x1d123d['lt'](_0x1e1421,_0x2d2831);}catch{}return _0x3a5b4e&&(_0x530992=!![]),{'currentVersion':_0x145489,'stableVersion':_0x5de5be,'minimumVersion':_0x2777d2,'needsUpgrade':_0x530992,'belowMinimum':_0x3a5b4e,'isPreRelease':![],'upgradeMessage':_0x5cff5c?.['upgradeMessage'],'minimumVersionMessage':_0x5cff5c?.[_0x2ec044(0x155)]};}function a263_0x1231(_0x11c64e,_0x3aea71){_0x11c64e=_0x11c64e-0x151;const _0x506956=a263_0x5069();let _0x123122=_0x506956[_0x11c64e];return _0x123122;}export function printCliUpgradeWarning(_0x355f52){const _0x1b6c0c=a263_0x1231;if(!_0x355f52[_0x1b6c0c(0x151)]&&!_0x355f52[_0x1b6c0c(0x15f)])return;const _0x191fa9=_0x1b6c0c(0x171),_0x2a7511=_0x1b6c0c(0x178),_0x813a0d=_0x1b6c0c(0x179),_0x434258='\x1b[1m',_0x103915=getCliUpgradeCommand(_0x355f52);console[_0x1b6c0c(0x169)](),_0x355f52['belowMinimum']?(console[_0x1b6c0c(0x169)](''+_0x191fa9+_0x434258+_0x1b6c0c(0x154)+_0x813a0d),console['log'](_0x191fa9+_0x1b6c0c(0x15e)+_0x355f52[_0x1b6c0c(0x156)]+_0x813a0d),_0x355f52[_0x1b6c0c(0x173)]&&console[_0x1b6c0c(0x169)](_0x191fa9+_0x1b6c0c(0x15d)+_0x355f52['minimumVersion']+_0x813a0d),_0x355f52[_0x1b6c0c(0x164)]&&_0x355f52[_0x1b6c0c(0x164)]!==_0x355f52['minimumVersion']&&console[_0x1b6c0c(0x169)](_0x191fa9+_0x1b6c0c(0x152)+_0x355f52[_0x1b6c0c(0x164)]+_0x813a0d),_0x355f52['minimumVersionMessage']&&console['log'](_0x191fa9+_0x1b6c0c(0x174)+_0x355f52[_0x1b6c0c(0x155)]+_0x813a0d),console[_0x1b6c0c(0x169)](_0x191fa9+_0x1b6c0c(0x16e)+_0x103915+_0x813a0d)):(console[_0x1b6c0c(0x169)](''+_0x2a7511+_0x434258+'↪\x20New\x20version\x20available'+_0x813a0d),console[_0x1b6c0c(0x169)](_0x2a7511+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x355f52[_0x1b6c0c(0x156)]+_0x813a0d),console['log'](_0x2a7511+_0x1b6c0c(0x170)+_0x355f52[_0x1b6c0c(0x164)]+_0x813a0d),_0x355f52[_0x1b6c0c(0x158)]&&console[_0x1b6c0c(0x169)](_0x2a7511+_0x1b6c0c(0x174)+_0x355f52[_0x1b6c0c(0x158)]+_0x813a0d),console[_0x1b6c0c(0x169)](_0x2a7511+_0x1b6c0c(0x16e)+_0x103915+_0x813a0d)),console[_0x1b6c0c(0x169)]();}export function assertCliVersionSupported(_0x28c2a6){const _0xf25af8=a263_0x1231;if(!_0x28c2a6[_0xf25af8(0x15f)])return;const _0x514a18=[_0x28c2a6[_0xf25af8(0x155)],_0xf25af8(0x16a)+_0x28c2a6[_0xf25af8(0x156)],_0x28c2a6[_0xf25af8(0x173)]?'Minimum\x20supported:\x20'+_0x28c2a6['minimumVersion']:null,'Upgrade\x20command:\x20'+getCliUpgradeCommand(_0x28c2a6)][_0xf25af8(0x161)](Boolean)[_0xf25af8(0x157)]('\x0a');throw CliErrors[_0xf25af8(0x15c)](_0xf25af8(0x168),_0x514a18);}function a263_0x5069(){const _0x532914=['minimumVersion','\x20\x20\x20','utf-8','4325224ygwlNW','1sRRrvA','\x1b[33m','\x1b[0m','needsUpgrade','\x20\x20\x20Recommended\x20stable:\x20','latest','↪\x20Critical\x20CLI\x20upgrade\x20required','minimumVersionMessage','currentVersion','join','upgradeMessage','6EVcePM','917213VlUAgt','2471754XyCldF','validation','\x20\x20\x20Minimum\x20supported:\x20','\x20\x20\x20Current\x20CLI\x20version:\x20','belowMinimum','1118523BggZbQ','filter','8906312lpwGcX','2892414leUDSZ','stableVersion','1.0.0','2975160ANaMhG','npm\x20install\x20-g\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','log','Current\x20version:\x20','9EtmpIi','170MqZcEy','version','\x20\x20\x20Upgrade\x20command:\x20','../..','\x20\x20\x20Stable\x20version:\x20','\x1b[31m','coerce'];a263_0x5069=function(){return _0x532914;};return a263_0x5069();}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface CliVersionPolicy {
|
|
2
|
+
stableVersion: string | null;
|
|
3
|
+
minimumVersion: string | null;
|
|
4
|
+
upgradeMessage?: string;
|
|
5
|
+
minimumVersionMessage?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function fetchCliVersionPolicy(): Promise<CliVersionPolicy | null>;
|
|
8
|
+
export declare function getCliVersionPolicy(): Promise<CliVersionPolicy | null>;
|
|
9
|
+
export declare function clearCliVersionPolicyCache(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a264_0x5000(){const _0x40ed6b=['2VMbqXg','signal','upgradeMessage','application/json','object','2087561oiOLJw','5856KMoxkT','latestVersion','8WzCvQi','70759oUrJPV','157845rUSGGL','json','3505020FepcPD','minimumVersionMessage','cli','length','stableVersion','minimumVersion','970CQDAeR','trim','1108324PtFELV','minVersion','recommendedVersion','428436ACOPgu'];a264_0x5000=function(){return _0x40ed6b;};return a264_0x5000();}(function(_0x486298,_0x145fbe){const _0x1cf677=a264_0x15d1,_0x30e2ef=_0x486298();while(!![]){try{const _0x23dd73=-parseInt(_0x1cf677(0x139))/0x1*(-parseInt(_0x1cf677(0x130))/0x2)+-parseInt(_0x1cf677(0x13a))/0x3+parseInt(_0x1cf677(0x12c))/0x4+-parseInt(_0x1cf677(0x12a))/0x5*(parseInt(_0x1cf677(0x136))/0x6)+parseInt(_0x1cf677(0x135))/0x7*(-parseInt(_0x1cf677(0x138))/0x8)+parseInt(_0x1cf677(0x12f))/0x9+parseInt(_0x1cf677(0x13c))/0xa;if(_0x23dd73===_0x145fbe)break;else _0x30e2ef['push'](_0x30e2ef['shift']());}catch(_0x1d32c2){_0x30e2ef['push'](_0x30e2ef['shift']());}}}(a264_0x5000,0x323c4));import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;function pickString(_0x79910a){const _0xc579b=a264_0x15d1;return typeof _0x79910a==='string'&&_0x79910a[_0xc579b(0x12b)]()[_0xc579b(0x13f)]>0x0?_0x79910a['trim']():null;}function normalizeCliVersionPolicy(_0x375346){const _0x5d9b19=a264_0x15d1;if(!_0x375346||typeof _0x375346!=='object')return null;const _0x2f2566=_0x375346,_0x2dde86=_0x2f2566[_0x5d9b19(0x13e)]&&typeof _0x2f2566[_0x5d9b19(0x13e)]===_0x5d9b19(0x134)?_0x2f2566[_0x5d9b19(0x13e)]:_0x2f2566,_0x3cb3df=pickString(_0x2dde86[_0x5d9b19(0x140)])||pickString(_0x2dde86[_0x5d9b19(0x137)])||pickString(_0x2dde86[_0x5d9b19(0x12e)]),_0x102d0d=pickString(_0x2dde86[_0x5d9b19(0x141)])||pickString(_0x2dde86[_0x5d9b19(0x12d)]);if(!_0x3cb3df&&!_0x102d0d)return null;return{'stableVersion':_0x3cb3df,'minimumVersion':_0x102d0d,'upgradeMessage':pickString(_0x2dde86[_0x5d9b19(0x132)])||undefined,'minimumVersionMessage':pickString(_0x2dde86[_0x5d9b19(0x13d)])||undefined};}export async function fetchCliVersionPolicy(){const _0x4283cf=a264_0x15d1,_0x36580d=new AbortController(),_0x548ec4=setTimeout(()=>_0x36580d['abort'](),FETCH_TIMEOUT_MS);try{const _0x15d882=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x4283cf(0x133)},'signal':_0x36580d[_0x4283cf(0x131)]});if(!_0x15d882['ok'])return null;const _0x24672d=await _0x15d882[_0x4283cf(0x13b)]();return normalizeCliVersionPolicy(_0x24672d);}catch{return null;}finally{clearTimeout(_0x548ec4);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];function a264_0x15d1(_0x55fd32,_0x3d4283){_0x55fd32=_0x55fd32-0x12a;const _0x5000b5=a264_0x5000();let _0x15d1f5=_0x5000b5[_0x55fd32];return _0x15d1f5;}export async function getCliVersionPolicy(){const _0x2d0530=Date['now']();if(hasCachedPolicy){const _0x4a7d84=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2d0530-cacheTime<_0x4a7d84)return cachedPolicy;}const _0x1338ed=await fetchCliVersionPolicy();return cachedPolicy=_0x1338ed,cacheTime=_0x2d0530,hasCachedPolicy=!![],_0x1338ed;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|