@lovrabet/rabetbase-cli 2.3.16-beta.3 → 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/commands/page/react/create.js +0 -1
- package/lib/commands/page/react/detail.js +0 -1
- package/lib/commands/page/react/list.js +0 -1
- package/lib/commands/page/react/publish.js +0 -1
- package/lib/commands/page/react/shared.js +0 -1
- package/lib/commands/page/react/syntax.js +0 -1
- package/lib/commands/page/react/template.js +0 -1
- package/lib/commands/page/react/update.js +0 -1
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a92_0x39ba(){const _0x4f2a34=['arch','✗\x20Expired','appCode','log','5759448MPiBHV','repeat','status','length','defaultApp','12jaQXBJ','✓\x20Valid','locale','unknown','\x20doctor','cookie','verbose','\x20(default)','\x20←\x20current','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','1182611ndczcc','(set,\x20length=','22954725UZNOwV','Global','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','raw','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','explicitAppName','(not\x20set)','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','padEnd','\x20\x20Merged\x20Config','(none)','slice','apiDir','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','missing','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','source','(no\x20file)','env','green','(not\x20found)','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','168880MHoHLs','gray','version','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','pageSize','\x20\x20API\x20Endpoints','1682484CXyIeY','\x20\x20─','(missing)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','(default:\x20','doctor','\x20\x20runtimeDomain:\x20\x20\x20','bold','format','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','apps','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','(set\x20via\x20file,\x20length=','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Project','yellow','\x20\x20\x20\x20accessKey:\x20\x20','(default)','7XCfRPf','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Apps','value','1056890zyPDmD','194352iJZNGW','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','accessKey','✗\x20Not\x20logged\x20in','platform','red','empty','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','appcode','⚠\x20Empty\x20(treated\x20as\x20{})'];a92_0x39ba=function(){return _0x4f2a34;};return a92_0x39ba();}function a92_0x49e8(_0x416b06,_0x44215a){_0x416b06=_0x416b06-0xb7;const _0x39bacd=a92_0x39ba();let _0x49e878=_0x39bacd[_0x416b06];return _0x49e878;}const a92_0x23d4b5=a92_0x49e8;(function(_0x5457c2,_0xda7c56){const _0x38920e=a92_0x49e8,_0x5cdf14=_0x5457c2();while(!![]){try{const _0x2a8f31=-parseInt(_0x38920e(0xd7))/0x1+-parseInt(_0x38920e(0xb8))/0x2+parseInt(_0x38920e(0xf6))/0x3+parseInt(_0x38920e(0xb9))/0x4+-parseInt(_0x38920e(0xf0))/0x5*(parseInt(_0x38920e(0xcd))/0x6)+parseInt(_0x38920e(0x10b))/0x7*(-parseInt(_0x38920e(0xc8))/0x8)+parseInt(_0x38920e(0xd9))/0x9;if(_0x2a8f31===_0xda7c56)break;else _0x5cdf14['push'](_0x5cdf14['shift']());}catch(_0x30de54){_0x5cdf14['push'](_0x5cdf14['shift']());}}}(a92_0x39ba,0xa179a));import a92_0x497159 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x5bef95){const _0x539d8c=a92_0x49e8,_0x54841f=GIT_COMMIT!==_0x539d8c(0xd0)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x539d8c(0xe5)](0x0,0xa)+')':VERSION,_0x524c13=buildConfigFromFlags({}),_0x5b06df=getCookie();console[_0x539d8c(0xc7)](),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xff)](CLI_BIN_NAME+_0x539d8c(0xd1))),console['log'](a92_0x497159[_0x539d8c(0xf1)]('─'[_0x539d8c(0xc9)](0x32))),console[_0x539d8c(0xc7)](_0x539d8c(0x101)+_0x54841f),console['log'](_0x539d8c(0xe9)+process[_0x539d8c(0xf2)]),console[_0x539d8c(0xc7)](_0x539d8c(0xd6)+process[_0x539d8c(0xbd)]+'\x20'+process[_0x539d8c(0xc4)]),console['log'](),console[_0x539d8c(0xc7)](a92_0x497159['bold']('\x20\x20Config\x20Files')),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xf7)[_0x539d8c(0xc9)](0x1e)));const _0x66491=getGlobalConfigPath(),_0x45a291=getProjectConfigPath();console[_0x539d8c(0xc7)](_0x539d8c(0xfa)+(_0x66491||a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xee)))),console['log'](_0x539d8c(0x106)+(_0x45a291||a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xee)))),console[_0x539d8c(0xc7)](),console[_0x539d8c(0xc7)](a92_0x497159['bold']('\x20\x20Config\x20JSON')),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xf1)]('\x20\x20─'[_0x539d8c(0xc9)](0x1e)));const _0x4664dc=(_0x1de1be,_0x273f8a)=>{const _0x2bc5e4=_0x539d8c;if(!_0x273f8a){console[_0x2bc5e4(0xc7)]('\x20\x20'+_0x1de1be['padEnd'](0x11)+'\x20'+a92_0x497159[_0x2bc5e4(0xf1)](_0x2bc5e4(0xeb)));return;}const _0x4ec82b=inspectCliConfigJsonFile(_0x273f8a);if(_0x4ec82b[_0x2bc5e4(0xca)]==='ok')console[_0x2bc5e4(0xc7)]('\x20\x20'+_0x1de1be[_0x2bc5e4(0xe2)](0x11)+'\x20'+a92_0x497159[_0x2bc5e4(0xed)](_0x2bc5e4(0xfb)));else{if(_0x4ec82b[_0x2bc5e4(0xca)]===_0x2bc5e4(0xbf))console[_0x2bc5e4(0xc7)]('\x20\x20'+_0x1de1be[_0x2bc5e4(0xe2)](0x11)+'\x20'+a92_0x497159[_0x2bc5e4(0x108)](_0x2bc5e4(0xc3)));else _0x4ec82b[_0x2bc5e4(0xca)]===_0x2bc5e4(0xe8)?console['log']('\x20\x20'+_0x1de1be['padEnd'](0x11)+'\x20'+a92_0x497159[_0x2bc5e4(0xf1)](_0x2bc5e4(0xf8))):(console[_0x2bc5e4(0xc7)]('\x20\x20'+_0x1de1be[_0x2bc5e4(0xe2)](0x11)+'\x20'+a92_0x497159[_0x2bc5e4(0xbe)]('✗\x20Invalid\x20JSON')),console['log']('\x20\x20'+''[_0x2bc5e4(0xe2)](0x11)+'\x20'+a92_0x497159[_0x2bc5e4(0xbe)](_0x4ec82b['message'])));}};_0x4664dc(_0x539d8c(0xda),_0x66491),_0x4664dc(_0x539d8c(0x107),_0x45a291),console[_0x539d8c(0xc7)](),console['log'](a92_0x497159[_0x539d8c(0xff)](_0x539d8c(0xe3))),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xf7)[_0x539d8c(0xc9)](0x1e))),console['log'](_0x539d8c(0x10c)+(_0x524c13[_0x539d8c(0xc6)]||a92_0x497159[_0x539d8c(0xbe)](_0x539d8c(0xe0)))),console[_0x539d8c(0xc7)](_0x539d8c(0xc0)+_0x524c13[_0x539d8c(0xec)]),console[_0x539d8c(0xc7)](_0x539d8c(0xdb)+_0x524c13[_0x539d8c(0xcf)]),console[_0x539d8c(0xc7)]('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x524c13['apiDir']),console['log'](_0x539d8c(0xf3)+(_0x524c13[_0x539d8c(0xcc)]||a92_0x497159['gray']('(none)'))),console[_0x539d8c(0xc7)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x524c13[_0x539d8c(0xdc)]||a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xe4)))),console[_0x539d8c(0xc7)]('\x20\x20explicitAppName:\x20'+(_0x524c13[_0x539d8c(0xdf)]||a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xe4)))),console[_0x539d8c(0xc7)](_0x539d8c(0xf9)+(_0x524c13[_0x539d8c(0x100)]||a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xfc)+DEFAULT_CONFIG_VALUES[_0x539d8c(0x100)]+')'))),console[_0x539d8c(0xc7)](_0x539d8c(0xc1)+(_0x524c13[_0x539d8c(0xf4)]??a92_0x497159['gray'](_0x539d8c(0x10a)))),console[_0x539d8c(0xc7)](_0x539d8c(0xe1)+_0x524c13['riskLevel']),console[_0x539d8c(0xc7)](_0x539d8c(0xde)+_0x524c13[_0x539d8c(0xd3)]),console['log']('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x524c13[_0x539d8c(0xd2)]?a92_0x497159[_0x539d8c(0xed)]('(set,\x20length='+_0x524c13['cookie'][_0x539d8c(0xcb)]+')'):_0x5b06df?a92_0x497159[_0x539d8c(0xed)](_0x539d8c(0x105)+_0x5b06df['length']+')'):a92_0x497159['gray'](_0x539d8c(0xe4))));const _0x3d3d4e=Object['keys'](_0x524c13['apps']);if(_0x3d3d4e['length']>0x0){console[_0x539d8c(0xc7)](),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xff)](_0x539d8c(0x10d))),console[_0x539d8c(0xc7)](a92_0x497159['gray'](_0x539d8c(0xf7)[_0x539d8c(0xc9)](0x1e)));for(const _0x4e9218 of _0x3d3d4e){const _0x2d2479=_0x524c13[_0x539d8c(0x103)][_0x4e9218],_0x222805=_0x4e9218===_0x524c13['defaultApp'],_0xf7b4e9=_0x4e9218===_0x524c13[_0x539d8c(0xdc)],_0x3e8fd6=_0xf7b4e9?a92_0x497159[_0x539d8c(0xed)](_0x539d8c(0xd5)):'',_0x35382a=_0x222805?_0x539d8c(0xd4):'';console[_0x539d8c(0xc7)]('\x20\x20'+_0x4e9218+_0x35382a+_0x3e8fd6),console[_0x539d8c(0xc7)](_0x539d8c(0xba)+_0x2d2479[_0x539d8c(0xc2)]);const _0x58be59=buildAppDoctorFields(_0x2d2479,{'env':_0x524c13['env'],'apiDir':_0x524c13[_0x539d8c(0xdd)][_0x539d8c(0xe6)]||DEFAULT_CONFIG_VALUES[_0x539d8c(0xe6)],'cookie':_0x524c13[_0x539d8c(0xd2)]||_0x5b06df||undefined,'accessKey':_0x524c13[_0x539d8c(0xbb)]});console[_0x539d8c(0xc7)](_0x539d8c(0xef)+_0x58be59[_0x539d8c(0xec)]['value']+'\x20\x20'+a92_0x497159['gray']('('+_0x58be59[_0x539d8c(0xec)][_0x539d8c(0xea)]+')')),console['log']('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x58be59[_0x539d8c(0xe6)][_0x539d8c(0xb7)]+'\x20\x20'+a92_0x497159[_0x539d8c(0xf1)]('('+_0x58be59[_0x539d8c(0xe6)][_0x539d8c(0xea)]+')'));const _0x5185a1=_0x58be59[_0x539d8c(0xd2)]['value']?a92_0x497159[_0x539d8c(0xed)](_0x539d8c(0xd8)+_0x58be59['cookie'][_0x539d8c(0xb7)][_0x539d8c(0xcb)]+')'):a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xe4));console[_0x539d8c(0xc7)](_0x539d8c(0xe7)+_0x5185a1+'\x20\x20'+a92_0x497159[_0x539d8c(0xf1)]('('+_0x58be59[_0x539d8c(0xd2)][_0x539d8c(0xea)]+')'));const _0x5dcd19=_0x58be59[_0x539d8c(0xbb)][_0x539d8c(0xb7)]?a92_0x497159['green'](_0x539d8c(0xd8)+_0x58be59[_0x539d8c(0xbb)][_0x539d8c(0xb7)][_0x539d8c(0xcb)]+')'):a92_0x497159[_0x539d8c(0xf1)]('(none)');console[_0x539d8c(0xc7)](_0x539d8c(0x109)+_0x5dcd19+'\x20\x20'+a92_0x497159['gray']('('+_0x58be59['accessKey'][_0x539d8c(0xea)]+')'));}}console[_0x539d8c(0xc7)](),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xff)](_0x539d8c(0xf5))),console[_0x539d8c(0xc7)](a92_0x497159[_0x539d8c(0xf1)](_0x539d8c(0xf7)['repeat'](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x539d8c(0xc7)](_0x539d8c(0x102)+getUserDomain()),console['log'](_0x539d8c(0xfe)+getRuntimeDomain()),console[_0x539d8c(0xc7)](),console['log'](a92_0x497159['bold']('\x20\x20Auth')),console['log'](a92_0x497159['gray'](_0x539d8c(0xf7)['repeat'](0x1e)));if(_0x5b06df){const _0x3a2431=await getIsSessionValid();console[_0x539d8c(0xc7)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3a2431?a92_0x497159['green'](_0x539d8c(0xce)):a92_0x497159[_0x539d8c(0xbe)](_0x539d8c(0xc5))));}else console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a92_0x497159[_0x539d8c(0xbe)](_0x539d8c(0xbc)));return console[_0x539d8c(0xc7)](),{'ok':!![]};}export const doctorDefinition={'service':a92_0x23d4b5(0xfd),'command':'check','description':a92_0x23d4b5(0x104),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a92_0x445d71=a92_0x495f;(function(_0xd48dca,_0x2c62ae){const _0x302f09=a92_0x495f,_0x203af1=_0xd48dca();while(!![]){try{const _0x46718b=-parseInt(_0x302f09(0x9f))/0x1*(-parseInt(_0x302f09(0x8a))/0x2)+-parseInt(_0x302f09(0xaa))/0x3+parseInt(_0x302f09(0xb5))/0x4*(-parseInt(_0x302f09(0xad))/0x5)+-parseInt(_0x302f09(0xac))/0x6*(parseInt(_0x302f09(0xc1))/0x7)+parseInt(_0x302f09(0x98))/0x8*(parseInt(_0x302f09(0xcd))/0x9)+-parseInt(_0x302f09(0xae))/0xa+parseInt(_0x302f09(0xd8))/0xb;if(_0x46718b===_0x2c62ae)break;else _0x203af1['push'](_0x203af1['shift']());}catch(_0x4bd95c){_0x203af1['push'](_0x203af1['shift']());}}}(a92_0x409d,0xbdbd0));import a92_0x47be3c from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';function a92_0x409d(){const _0x25d23e=['gray','817008OcASIo','(set\x20via\x20file,\x20length=','repeat','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','(no\x20file)','(set,\x20length=','version','slice','(not\x20found)','✓\x20Valid\x20JSON','7DBqqAf','unknown','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','pageSize','source','bold','apiDir','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Config\x20Files','✓\x20Valid','9Sxdbiq','status','padEnd','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','platform','red','format','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','yellow','\x20\x20Apps','\x20\x20explicitAppName:\x20','9752622EhTuwo','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','(missing)','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','read','\x20\x20─','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','(default:\x20','11388JkrnEd','✗\x20Invalid\x20JSON','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','(none)','apps','riskLevel','check','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','log','green','\x20\x20API\x20Endpoints','(not\x20set)','366088pdEYzh','currentApp','missing','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','cookie','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','value','222fltJnb','keys','accessKey','message','\x20doctor','defaultApp','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','env','raw','arch','303936jsMwFF','Global','1788594ukGnjc','10CNjheN','6113480WxaFiQ','appcode','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20(default)'];a92_0x409d=function(){return _0x25d23e;};return a92_0x409d();}import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x43eaf5){const _0x3e053a=a92_0x495f,_0x24654f=GIT_COMMIT!==_0x3e053a(0xc2)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3e053a(0xbe)](0x0,0xa)+')':VERSION,_0x4e43f5=buildConfigFromFlags({}),_0x1ea742=getCookie();console[_0x3e053a(0x94)](),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xc7)](CLI_BIN_NAME+_0x3e053a(0xa3))),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xb4)]('─'[_0x3e053a(0xb7)](0x32))),console[_0x3e053a(0x94)](_0x3e053a(0x86)+_0x24654f),console[_0x3e053a(0x94)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x3e053a(0xbd)]),console['log'](_0x3e053a(0x9d)+process[_0x3e053a(0xd1)]+'\x20'+process[_0x3e053a(0xa9)]),console['log'](),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xc7)](_0x3e053a(0xcb))),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x85)[_0x3e053a(0xb7)](0x1e)));const _0x13f881=getGlobalConfigPath(),_0x3079c5=getProjectConfigPath();console[_0x3e053a(0x94)](_0x3e053a(0xb9)+(_0x13f881||a92_0x47be3c['gray'](_0x3e053a(0xbf)))),console['log'](_0x3e053a(0xa5)+(_0x3079c5||a92_0x47be3c['gray'](_0x3e053a(0xbf)))),console[_0x3e053a(0x94)](),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xc7)](_0x3e053a(0xba))),console[_0x3e053a(0x94)](a92_0x47be3c['gray']('\x20\x20─'[_0x3e053a(0xb7)](0x1e)));const _0x406f97=(_0xa12b6f,_0x259708)=>{const _0x712a23=_0x3e053a;if(!_0x259708){console['log']('\x20\x20'+_0xa12b6f[_0x712a23(0xcf)](0x11)+'\x20'+a92_0x47be3c[_0x712a23(0xb4)](_0x712a23(0xbb)));return;}const _0x504dea=inspectCliConfigJsonFile(_0x259708);if(_0x504dea['status']==='ok')console['log']('\x20\x20'+_0xa12b6f[_0x712a23(0xcf)](0x11)+'\x20'+a92_0x47be3c['green'](_0x712a23(0xc0)));else{if(_0x504dea[_0x712a23(0xce)]==='empty')console[_0x712a23(0x94)]('\x20\x20'+_0xa12b6f[_0x712a23(0xcf)](0x11)+'\x20'+a92_0x47be3c[_0x712a23(0xd5)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x504dea[_0x712a23(0xce)]===_0x712a23(0x9a)?console['log']('\x20\x20'+_0xa12b6f[_0x712a23(0xcf)](0x11)+'\x20'+a92_0x47be3c[_0x712a23(0xb4)](_0x712a23(0x81))):(console[_0x712a23(0x94)]('\x20\x20'+_0xa12b6f[_0x712a23(0xcf)](0x11)+'\x20'+a92_0x47be3c['red'](_0x712a23(0x8b))),console[_0x712a23(0x94)]('\x20\x20'+''[_0x712a23(0xcf)](0x11)+'\x20'+a92_0x47be3c['red'](_0x504dea[_0x712a23(0xa2)])));}};_0x406f97(_0x3e053a(0xab),_0x13f881),_0x406f97('Project',_0x3079c5),console[_0x3e053a(0x94)](),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xc7)]('\x20\x20Merged\x20Config')),console['log'](a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x85)[_0x3e053a(0xb7)](0x1e))),console[_0x3e053a(0x94)](_0x3e053a(0x93)+(_0x4e43f5['appCode']||a92_0x47be3c[_0x3e053a(0xd2)](_0x3e053a(0x97)))),console['log'](_0x3e053a(0x87)+_0x4e43f5[_0x3e053a(0xa7)]),console[_0x3e053a(0x94)](_0x3e053a(0xd0)+_0x4e43f5[_0x3e053a(0xa6)]),console[_0x3e053a(0x94)](_0x3e053a(0x82)+_0x4e43f5['apiDir']),console[_0x3e053a(0x94)](_0x3e053a(0xd9)+(_0x4e43f5[_0x3e053a(0xa4)]||a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x8d)))),console[_0x3e053a(0x94)](_0x3e053a(0xb0)+(_0x4e43f5['currentApp']||a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x8d)))),console[_0x3e053a(0x94)](_0x3e053a(0xd7)+(_0x4e43f5['explicitAppName']||a92_0x47be3c['gray'](_0x3e053a(0x8d)))),console[_0x3e053a(0x94)](_0x3e053a(0xc9)+(_0x4e43f5['format']||a92_0x47be3c['gray'](_0x3e053a(0x89)+DEFAULT_CONFIG_VALUES[_0x3e053a(0xd3)]+')'))),console[_0x3e053a(0x94)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4e43f5[_0x3e053a(0xc5)]??a92_0x47be3c['gray'](_0x3e053a(0x83)))),console[_0x3e053a(0x94)](_0x3e053a(0x91)+_0x4e43f5[_0x3e053a(0x8f)]),console[_0x3e053a(0x94)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4e43f5['verbose']),console[_0x3e053a(0x94)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4e43f5[_0x3e053a(0x9c)]?a92_0x47be3c['green'](_0x3e053a(0xbc)+_0x4e43f5['cookie'][_0x3e053a(0x88)]+')'):_0x1ea742?a92_0x47be3c[_0x3e053a(0x95)](_0x3e053a(0xb6)+_0x1ea742[_0x3e053a(0x88)]+')'):a92_0x47be3c['gray']('(none)')));const _0x3b26fb=Object[_0x3e053a(0xa0)](_0x4e43f5[_0x3e053a(0x8e)]);if(_0x3b26fb[_0x3e053a(0x88)]>0x0){console['log'](),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xc7)](_0x3e053a(0xd6))),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xb4)]('\x20\x20─'['repeat'](0x1e)));for(const _0x593f85 of _0x3b26fb){const _0x42d48a=_0x4e43f5[_0x3e053a(0x8e)][_0x593f85],_0xad71c5=_0x593f85===_0x4e43f5[_0x3e053a(0xa4)],_0x4a96be=_0x593f85===_0x4e43f5[_0x3e053a(0x99)],_0x349160=_0x4a96be?a92_0x47be3c[_0x3e053a(0x95)](_0x3e053a(0x92)):'',_0xb855a8=_0xad71c5?_0x3e053a(0xb3):'';console[_0x3e053a(0x94)]('\x20\x20'+_0x593f85+_0xb855a8+_0x349160),console['log'](_0x3e053a(0x8c)+_0x42d48a[_0x3e053a(0xaf)]);const _0x429e8f=buildAppDoctorFields(_0x42d48a,{'env':_0x4e43f5[_0x3e053a(0xa7)],'apiDir':_0x4e43f5[_0x3e053a(0xa8)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x3e053a(0xc8)],'cookie':_0x4e43f5[_0x3e053a(0x9c)]||_0x1ea742||undefined,'accessKey':_0x4e43f5[_0x3e053a(0xa1)]});console['log']('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x429e8f[_0x3e053a(0xa7)][_0x3e053a(0x9e)]+'\x20\x20'+a92_0x47be3c[_0x3e053a(0xb4)]('('+_0x429e8f[_0x3e053a(0xa7)][_0x3e053a(0xc6)]+')')),console[_0x3e053a(0x94)](_0x3e053a(0xb2)+_0x429e8f[_0x3e053a(0xc8)][_0x3e053a(0x9e)]+'\x20\x20'+a92_0x47be3c[_0x3e053a(0xb4)]('('+_0x429e8f[_0x3e053a(0xc8)]['source']+')'));const _0x5b18b4=_0x429e8f['cookie'][_0x3e053a(0x9e)]?a92_0x47be3c[_0x3e053a(0x95)](_0x3e053a(0xbc)+_0x429e8f[_0x3e053a(0x9c)]['value'][_0x3e053a(0x88)]+')'):a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x8d));console[_0x3e053a(0x94)](_0x3e053a(0xb8)+_0x5b18b4+'\x20\x20'+a92_0x47be3c[_0x3e053a(0xb4)]('('+_0x429e8f[_0x3e053a(0x9c)]['source']+')'));const _0x485075=_0x429e8f[_0x3e053a(0xa1)][_0x3e053a(0x9e)]?a92_0x47be3c['green'](_0x3e053a(0xbc)+_0x429e8f[_0x3e053a(0xa1)][_0x3e053a(0x9e)][_0x3e053a(0x88)]+')'):a92_0x47be3c[_0x3e053a(0xb4)]('(none)');console['log']('\x20\x20\x20\x20accessKey:\x20\x20'+_0x485075+'\x20\x20'+a92_0x47be3c[_0x3e053a(0xb4)]('('+_0x429e8f['accessKey'][_0x3e053a(0xc6)]+')'));}}console['log'](),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xc7)](_0x3e053a(0x96))),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x85)[_0x3e053a(0xb7)](0x1e))),console[_0x3e053a(0x94)](_0x3e053a(0xc4)+getApiDomain()),console[_0x3e053a(0x94)](_0x3e053a(0xc3)+getUserDomain()),console['log'](_0x3e053a(0xca)+getRuntimeDomain()),console[_0x3e053a(0x94)](),console[_0x3e053a(0x94)](a92_0x47be3c['bold']('\x20\x20Auth')),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x85)[_0x3e053a(0xb7)](0x1e)));if(_0x1ea742){const _0x14b838=await getIsSessionValid();console[_0x3e053a(0x94)](_0x3e053a(0x9b)+(_0x14b838?a92_0x47be3c[_0x3e053a(0x95)](_0x3e053a(0xcc)):a92_0x47be3c[_0x3e053a(0xd2)]('✗\x20Expired')));}else console['log'](_0x3e053a(0x9b)+a92_0x47be3c[_0x3e053a(0xd2)](_0x3e053a(0xb1)));return console[_0x3e053a(0x94)](),{'ok':!![]};}function a92_0x495f(_0x246b76,_0x2011bc){_0x246b76=_0x246b76-0x81;const _0x409df1=a92_0x409d();let _0x495f71=_0x409df1[_0x246b76];return _0x495f71;}export const doctorDefinition={'service':'doctor','command':a92_0x445d71(0x90),'description':a92_0x445d71(0xd4),'risk':a92_0x445d71(0x84),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a93_0x245e64=a93_0x1bc9;(function(_0x2a0e9b,_0x36912a){const _0x57a5be=a93_0x1bc9,_0x43af2d=_0x2a0e9b();while(!![]){try{const _0x56bafc=-parseInt(_0x57a5be(0x1fe))/0x1*(-parseInt(_0x57a5be(0x1e3))/0x2)+parseInt(_0x57a5be(0x1fb))/0x3+parseInt(_0x57a5be(0x1e7))/0x4+parseInt(_0x57a5be(0x1f9))/0x5*(parseInt(_0x57a5be(0x1ea))/0x6)+-parseInt(_0x57a5be(0x1e6))/0x7*(parseInt(_0x57a5be(0x1fd))/0x8)+-parseInt(_0x57a5be(0x1f0))/0x9*(parseInt(_0x57a5be(0x1ef))/0xa)+-parseInt(_0x57a5be(0x1e5))/0xb*(parseInt(_0x57a5be(0x1f5))/0xc);if(_0x56bafc===_0x36912a)break;else _0x43af2d['push'](_0x43af2d['shift']());}catch(_0xe5169){_0x43af2d['push'](_0x43af2d['shift']());}}}(a93_0x24df,0xca636));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';function a93_0x24df(){const _0x1a916c=['long-term','948098lwWYeE','boolean','77DsQzSJ','119NevMeH','4002144bVmEKP','str','appCode','11604srChGE','file','/smartapi/common/uploadFile','read','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','5140DlCVYl','17451QsZLUT','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','filepath','download','bool','796764qVKUBL','validation','\x20to\x20development\x20app\x20','filePath','2005jBorVB','string','1674018HwIghe','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','243632xTokbK','1IQCuvn','trim','query-url','File','path','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'];a93_0x24df=function(){return _0x1a916c;};return a93_0x24df();}function a93_0x1bc9(_0x534716,_0x3a6018){_0x534716=_0x534716-0x1dd;const _0x24df59=a93_0x24df();let _0x1bc940=_0x24df59[_0x534716];return _0x1bc940;}import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a93_0x245e64(0x1eb),'type':a93_0x245e64(0x1fa),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a93_0x245e64(0x1f2),'type':a93_0x245e64(0x1fa),'required':!![],'description':'Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a93_0x245e64(0x1f3),'type':a93_0x245e64(0x1e4),'description':a93_0x245e64(0x1e1)},LONG_TERM_FLAG={'name':a93_0x245e64(0x1e2),'type':a93_0x245e64(0x1e4),'description':a93_0x245e64(0x1fc)};function requireFilePath(_0x31d720){const _0x4a00b9=a93_0x245e64,_0x2a55af=_0x31d720[_0x4a00b9(0x1dd)]();if(!_0x2a55af)throw CliErrors[_0x4a00b9(0x1f6)]('filePath\x20is\x20required.');return _0x2a55af;}const fileUpload={'service':a93_0x245e64(0x1eb),'command':'upload','description':a93_0x245e64(0x1f1),'risk':a93_0x245e64(0x1ed),'flags':[FILE_FLAG],async 'dryRun'(_0x260f95){const _0xe7dd32=a93_0x245e64,_0x1622cc=requireDevelopmentUploadFile(_0x260f95['str'](_0xe7dd32(0x1eb)),_0xe7dd32(0x1df));return{'method':'POST','url':_0xe7dd32(0x1ec),'body':{'appCode':_0x260f95[_0xe7dd32(0x1e9)],'multipart':{'file':_0x1622cc}},'description':'Preview:\x20upload\x20'+_0x1622cc[_0xe7dd32(0x1e0)]+_0xe7dd32(0x1f7)+_0x260f95[_0xe7dd32(0x1e9)]};},async 'execute'(_0x2d3b6e){const _0x5aa5f6=a93_0x245e64,_0x4902e9=requireDevelopmentUploadFile(_0x2d3b6e[_0x5aa5f6(0x1e8)](_0x5aa5f6(0x1eb)),_0x5aa5f6(0x1df)),_0x5559c8=await uploadDevelopmentFile(_0x2d3b6e[_0x5aa5f6(0x1e9)],_0x4902e9['path']);return{'ok':!![],'data':_0x5559c8,'message':_0x5559c8[_0x5aa5f6(0x1f8)]?'Uploaded\x20file:\x20'+_0x5559c8[_0x5aa5f6(0x1f8)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':'file','command':a93_0x245e64(0x1de),'description':a93_0x245e64(0x1ee),'risk':a93_0x245e64(0x1ed),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x1202ff){const _0x53d018=a93_0x245e64,_0x11e39d=requireFilePath(_0x1202ff[_0x53d018(0x1e8)](_0x53d018(0x1f2))),_0x2004be=await queryDevelopmentFileUrl(_0x11e39d,{'download':_0x1202ff[_0x53d018(0x1f4)](_0x53d018(0x1f3)),'longTerm':_0x1202ff[_0x53d018(0x1f4)](_0x53d018(0x1e2))});return{'ok':!![],'data':_0x2004be};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* init —— 智能初始化(声明式)
|
|
3
|
+
*
|
|
4
|
+
* 一站式初始化:
|
|
5
|
+
* 1. 老项目自动升级(检测旧配置文件)
|
|
6
|
+
* 2. --appcode 直接写入配置
|
|
7
|
+
* 3. 交互模式:从平台拉取应用列表让用户选择
|
|
8
|
+
* 4. CI 模式:必须传 --appcode
|
|
9
|
+
*/
|
|
10
|
+
import type { CommandDefinition } from "../../framework/types.js";
|
|
11
|
+
export declare const initDefinitions: CommandDefinition[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x56b3e6=a94_0x1155;(function(_0x1000dc,_0x485142){const _0x39d27c=a94_0x1155,_0x4c1b12=_0x1000dc();while(!![]){try{const _0x4e7dab=-parseInt(_0x39d27c(0xe6))/0x1*(-parseInt(_0x39d27c(0xdd))/0x2)+-parseInt(_0x39d27c(0xd4))/0x3+parseInt(_0x39d27c(0xc2))/0x4*(parseInt(_0x39d27c(0xc6))/0x5)+-parseInt(_0x39d27c(0xce))/0x6*(parseInt(_0x39d27c(0xcd))/0x7)+parseInt(_0x39d27c(0xd1))/0x8*(parseInt(_0x39d27c(0xca))/0x9)+-parseInt(_0x39d27c(0xcc))/0xa+-parseInt(_0x39d27c(0xc1))/0xb;if(_0x4e7dab===_0x485142)break;else _0x4c1b12['push'](_0x4c1b12['shift']());}catch(_0x585d07){_0x4c1b12['push'](_0x4c1b12['shift']());}}}(a94_0x4f1b,0xeb9e9));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a94_0x4f1b(){const _0xb026f1=['yes','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','1662426WIlbZd','nonInteractive','16524330MOtxBZ','7UVuejh','587172HuIHiO','production','init','16QlQujp','str','\x20\x20Config:\x20','2438418QGsXea','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','Use\x20`','bool','log','defaultApp','boolean','validation','map','301802icXRjj','appcode','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','global','appCode','cwd','valid','\x20\x20Apps:\x20','\x0a✓\x20Successfully\x20initialized\x20','11tZAnsl','Usage:\x20','检测到旧配置文件,正在自动升级...\x0a','env','some','project','\x20\x20Default:\x20','Target\x20environment','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','843799xqaMCm','32zMjyBf','Write\x20to\x20global\x20config\x20instead\x20of\x20project','flagMissing','Auto-confirm\x20prompts','984730mzZCpL','run'];a94_0x4f1b=function(){return _0xb026f1;};return a94_0x4f1b();}import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';function a94_0x1155(_0x941c1b,_0x4b348b){_0x941c1b=_0x941c1b-0xbf;const _0x4f1baa=a94_0x4f1b();let _0x115548=_0x4f1baa[_0x941c1b];return _0x115548;}import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x5c9282){return{'appCode':_0x5c9282,'appName':_0x5c9282};}function writeInitConfig(_0x2218d4,_0x3b04ad,_0x3d737e){const _0x487801=a94_0x1155,_0x1de5f9=resolveWriteConfigPath(_0x2218d4),_0xb1779a=buildCanonicalProjectConfig({},{'appCodes':_0x3b04ad[_0x487801(0xdc)](_0x4d2a79=>_0x4d2a79[_0x487801(0xe1)]),'env':_0x3d737e,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x1de5f9,_0xb1779a);const _0x507fd6=_0x2218d4===_0x487801(0xe0)?_0x487801(0xe0):'project';console[_0x487801(0xd8)](_0x487801(0xe5)+_0x507fd6+'\x20config'),console[_0x487801(0xd8)](_0x487801(0xe4)+_0x3b04ad[_0x487801(0xdc)](_0x133530=>_0x133530['appCode'])['join'](',\x20')),console['log'](_0x487801(0xec)+_0xb1779a[_0x487801(0xd9)]),console[_0x487801(0xd8)]('\x20\x20Env:\x20'+_0xb1779a[_0x487801(0xe9)]),console[_0x487801(0xd8)](_0x487801(0xd3)+_0x1de5f9);}async function runSmartInit(_0x299702){const _0x44f878=a94_0x1155,_0x1eb48f=process[_0x44f878(0xe2)](),_0x41b1fb=_0x299702[_0x44f878(0xd7)]('global')?_0x44f878(0xe0):_0x44f878(0xeb),_0x3eeb29=_0x299702[_0x44f878(0xd2)]('env')||_0x44f878(0xcf),_0x87c338=_0x299702[_0x44f878(0xd2)](_0x44f878(0xde))||undefined;if(_0x41b1fb===_0x44f878(0xeb)){const _0x2a5c61=existsSync(resolve(_0x1eb48f,NEW_CONFIG_NAME)),_0x446830=LEGACY_CONFIG_NAMES[_0x44f878(0xea)](_0x226ca2=>existsSync(resolve(_0x1eb48f,_0x226ca2)));if(_0x446830&&!_0x2a5c61)return console['log'](_0x44f878(0xe8)),upgradeApp(_0x299702[_0x44f878(0xcb)],{'yes':_0x299702['bool']('yes')});if(_0x2a5c61)throw CliErrors[_0x44f878(0xdb)](_0x44f878(0xdf),_0x44f878(0xd6)+CLI_BIN_NAME+_0x44f878(0xc0));}if(_0x87c338){const _0x5c79dd=validateAppcode(_0x87c338);if(!_0x5c79dd[_0x44f878(0xe3)])throw CliErrors[_0x44f878(0xdb)](_0x5c79dd['message']);writeInitConfig(_0x41b1fb,[syntheticApp(_0x87c338)],_0x3eeb29);return;}if(_0x299702[_0x44f878(0xcb)])throw CliErrors[_0x44f878(0xc4)](_0x44f878(0xde),_0x44f878(0xe7)+CLI_BIN_NAME+_0x44f878(0xc9));const _0x577967=getCookie(),_0x289537=await selectMultipleApps(_0x577967),_0xf9b13f=_0x289537==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x289537;writeInitConfig(_0x41b1fb,_0xf9b13f,_0x3eeb29);}const initFlags=[{'name':a94_0x56b3e6(0xe0),'type':a94_0x56b3e6(0xda),'description':a94_0x56b3e6(0xc3),'default':![]},{'name':a94_0x56b3e6(0xe9),'type':'string','description':a94_0x56b3e6(0xbf),'default':a94_0x56b3e6(0xcf),'enum':[...RABETBASE_ENV_VALUES]},{'name':'appcode','type':'string','description':'App\x20code\x20to\x20initialize\x20with'},{'name':a94_0x56b3e6(0xc8),'type':'boolean','description':a94_0x56b3e6(0xc5),'default':![]}];export const initDefinitions=[{'service':a94_0x56b3e6(0xd0),'command':a94_0x56b3e6(0xc7),'description':a94_0x56b3e6(0xd5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x586b71){return await runSmartInit(_0x586b71),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2cd57a,_0x5da48e){const _0x32bc7f=a95_0x371c,_0x5a90f4=_0x2cd57a();while(!![]){try{const _0x29d5f3=parseInt(_0x32bc7f(0x14f))/0x1+-parseInt(_0x32bc7f(0x152))/0x2+-parseInt(_0x32bc7f(0x155))/0x3+parseInt(_0x32bc7f(0x151))/0x4+parseInt(_0x32bc7f(0x153))/0x5*(parseInt(_0x32bc7f(0x154))/0x6)+parseInt(_0x32bc7f(0x156))/0x7+-parseInt(_0x32bc7f(0x150))/0x8;if(_0x29d5f3===_0x5da48e)break;else _0x5a90f4['push'](_0x5a90f4['shift']());}catch(_0x5a27da){_0x5a90f4['push'](_0x5a90f4['shift']());}}}(a95_0x1863,0x60074));import{issueReport}from'../../commands/issue/report.js';function a95_0x1863(){const _0x4e8c79=['5423992FTXEHs','784392DkwaQy','1007376NQdPKN','31295QALiNH','750axbvXy','1270395QMnaAU','5239556QXjsqu','271503BFWExL'];a95_0x1863=function(){return _0x4e8c79;};return a95_0x1863();}function a95_0x371c(_0x125520,_0x216595){_0x125520=_0x125520-0x14f;const _0x1863a0=a95_0x1863();let _0x371c96=_0x1863a0[_0x125520];return _0x371c96;}export const issueDefinitions=[issueReport];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Issue Report Nudge:当一条命令在用户视角"非预期失败"时,向 stderr 打印一行可复制的
|
|
3
|
+
* `<bin> issue report` 命令,引导用户把这次错误上报到平台。
|
|
4
|
+
*
|
|
5
|
+
* 触发规则:
|
|
6
|
+
* - 不 nudge:用户主动取消、缺参/校验/未知命令/auth/config/notInProject/network 这些
|
|
7
|
+
* 归因到"用户输入或用户环境"的错误。
|
|
8
|
+
* - nudge:`api_error` 与一切非 CliError 的 catch-all unexpected error,这两类最可能
|
|
9
|
+
* 是平台或 CLI 自身缺陷,正是 issue report 的目标素材。
|
|
10
|
+
* - 当前命令本身是 `issue report` 时跳过,避免上报失败时还提示用户用 issue report 上报。
|
|
11
|
+
* - 通过 `RABETBASE_DISABLE_ISSUE_NUDGE=1` 关闭,用于脚本化场景避免刷屏。
|
|
12
|
+
*/
|
|
13
|
+
export declare const NUDGE_OPT_OUT_ENV = "RABETBASE_DISABLE_ISSUE_NUDGE";
|
|
14
|
+
export type NudgeCurrentCommand = {
|
|
15
|
+
service: string;
|
|
16
|
+
command: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 测试场景下也能注入自定义 writer,避免污染 stderr。
|
|
20
|
+
*/
|
|
21
|
+
export type NudgeWriter = (chunk: string) => void;
|
|
22
|
+
export declare function shouldNudgeForError(err: unknown, currentCommand: NudgeCurrentCommand): boolean;
|
|
23
|
+
export declare function printIssueReportNudgeForError(err: unknown, currentCommand: NudgeCurrentCommand, writer?: NudgeWriter): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a96_0x550062=a96_0x31fa;(function(_0x48008a,_0x173662){const _0x3d1edd=a96_0x31fa,_0x2787e2=_0x48008a();while(!![]){try{const _0x4fca54=-parseInt(_0x3d1edd(0x20b))/0x1+parseInt(_0x3d1edd(0x1fa))/0x2+-parseInt(_0x3d1edd(0x1ff))/0x3*(parseInt(_0x3d1edd(0x1f8))/0x4)+parseInt(_0x3d1edd(0x1fb))/0x5*(parseInt(_0x3d1edd(0x213))/0x6)+parseInt(_0x3d1edd(0x1fe))/0x7*(parseInt(_0x3d1edd(0x203))/0x8)+-parseInt(_0x3d1edd(0x20c))/0x9+parseInt(_0x3d1edd(0x207))/0xa*(parseInt(_0x3d1edd(0x20d))/0xb);if(_0x4fca54===_0x173662)break;else _0x2787e2['push'](_0x2787e2['shift']());}catch(_0xfe6dbc){_0x2787e2['push'](_0x2787e2['shift']());}}}(a96_0x5184,0x83476));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a96_0x550062(0x202);function a96_0x5184(){const _0x1b1af1=['320IIOvui','message','config_missing','31689PtNJXZ','4935lOVPqa','\x20\x20Set\x20','trim','RABETBASE_DISABLE_ISSUE_NUDGE','512GLCIKW','stderr','replace','cancelled','860QTMHtV','slice','length','Hit\x20a\x20','638224RhhFHk','533556fdWxZD','62579JfUmUd','\x20bug?\x20Help\x20us\x20fix\x20it:','\x22\x20\x5c','unknown_command','auth_required','validation_error','100272prcRql','\x20issue\x20report\x20\x5c','=1\x20to\x20silence\x20this\x20hint.','has','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','network_error','service','command','report','\x20\x20\x20\x20--title\x20\x22','2496vHCCVu','join','826312CicEFK'];a96_0x5184=function(){return _0x1b1af1;};return a96_0x5184();}const NUDGE_SUPPRESSED_CODES=new Set([a96_0x550062(0x206),a96_0x550062(0x211),a96_0x550062(0x1fd),'not_in_project',a96_0x550062(0x210),'flag_missing',a96_0x550062(0x212),a96_0x550062(0x1f3)]),defaultWriter=_0x3e3b25=>{const _0x4f2b9a=a96_0x550062;process[_0x4f2b9a(0x204)]['write'](_0x3e3b25);};export function shouldNudgeForError(_0x39d468,_0x269ad8){const _0x1d7b54=a96_0x550062;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x269ad8[_0x1d7b54(0x1f4)]==='issue'&&_0x269ad8[_0x1d7b54(0x1f5)]===_0x1d7b54(0x1f6))return![];if(_0x39d468 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x1d7b54(0x1f0)](_0x39d468['code']);return!![];}function a96_0x31fa(_0x225297,_0x1cbb3d){_0x225297=_0x225297-0x1f0;const _0x518495=a96_0x5184();let _0x31fab4=_0x518495[_0x225297];return _0x31fab4;}export function printIssueReportNudgeForError(_0x4fcf7c,_0x9af04f,_0x1e6bbc=defaultWriter){if(!shouldNudgeForError(_0x4fcf7c,_0x9af04f))return;const _0x3fe511=buildSuggestedTitle(_0x4fcf7c,_0x9af04f);_0x1e6bbc(formatNudge(_0x3fe511));}function buildSuggestedTitle(_0x26f0c6,_0x2f35fa){const _0x5c2b2d=a96_0x550062,_0x13f9a2=_0x26f0c6 instanceof Error?_0x26f0c6[_0x5c2b2d(0x1fc)]:String(_0x26f0c6),_0x532bb7=_0x13f9a2[_0x5c2b2d(0x205)](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x5c2b2d(0x201)]()[_0x5c2b2d(0x208)](0x0,0x78)[_0x5c2b2d(0x205)](/"/g,'\x5c\x22'),_0x11c053=CLI_BIN_NAME+'\x20'+_0x2f35fa[_0x5c2b2d(0x1f4)]+'\x20'+_0x2f35fa['command'];return _0x532bb7[_0x5c2b2d(0x209)]>0x0?_0x11c053+':\x20'+_0x532bb7:_0x11c053;}function formatNudge(_0x248d3b){const _0x3d5f60=a96_0x550062;return['',_0x3d5f60(0x20a)+CLI_BIN_NAME+_0x3d5f60(0x20e),'\x20\x20'+CLI_BIN_NAME+_0x3d5f60(0x214),_0x3d5f60(0x1f7)+_0x248d3b+_0x3d5f60(0x20f),_0x3d5f60(0x1f2),_0x3d5f60(0x1f1),_0x3d5f60(0x200)+NUDGE_OPT_OUT_ENV+_0x3d5f60(0x215),''][_0x3d5f60(0x1f9)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x1aa07d=a97_0x5837;(function(_0x543baa,_0x2238de){const _0xf61672=a97_0x5837,_0x18c384=_0x543baa();while(!![]){try{const _0x27d4a5=-parseInt(_0xf61672(0x139))/0x1*(parseInt(_0xf61672(0x15e))/0x2)+-parseInt(_0xf61672(0x130))/0x3+parseInt(_0xf61672(0x149))/0x4*(-parseInt(_0xf61672(0x15f))/0x5)+-parseInt(_0xf61672(0x12a))/0x6*(parseInt(_0xf61672(0x13d))/0x7)+-parseInt(_0xf61672(0x14a))/0x8*(-parseInt(_0xf61672(0x13a))/0x9)+-parseInt(_0xf61672(0x144))/0xa+parseInt(_0xf61672(0x126))/0xb;if(_0x27d4a5===_0x2238de)break;else _0x18c384['push'](_0x18c384['shift']());}catch(_0x35804a){_0x18c384['push'](_0x18c384['shift']());}}}(a97_0x2c4b,0xf3403));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a97_0x5837(_0x95ede4,_0x979553){_0x95ede4=_0x95ede4-0x124;const _0x2c4be7=a97_0x2c4b();let _0x58377e=_0x2c4be7[_0x95ede4];return _0x58377e;}import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';function a97_0x2c4b(){const _0x2b0527=['172948uQfrVP','48VPCHmI','Failed\x20to\x20report\x20platform\x20issue:\x20','report','utf8','issue','issue.description_redaction_kinds','redactionKinds','issue.description_redactions','issue.description','description','redacted\x20','trim','truncated','filter','originalBytes','write','File\x20not\x20found:\x20','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','Issue\x20description\x20file\x20is\x20empty:\x20','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','394krymsp','15wXkwiv','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','57296613xiGzjH','issue.title','descriptionSource:\x20','flagMissing','66774JMencd','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','inline','sanitize','truncated\x20from\x20','join','3084858hWIRiE','compress','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','file','issue.description_truncated','descriptionFilePath','redactionCount','\x20bytes','One-line\x20issue\x20summary','9643EfHPiC','782001tPJxbj','string','str','602SHUsmu','descriptionSource','length','title','issue.description_original_bytes','validation','apiError','7190000EPpJxU','cwd','message','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','Issue\x20description\x20cannot\x20be\x20empty.'];a97_0x2c4b=function(){return _0x2b0527;};return a97_0x2c4b();}import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG='description-file';export const issueReport={'service':a97_0x1aa07d(0x14e),'command':a97_0x1aa07d(0x14c),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a97_0x1aa07d(0x159),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a97_0x1aa07d(0x131),'flags':[{'name':'title','type':a97_0x1aa07d(0x13b),'required':!![],'description':a97_0x1aa07d(0x138)},{'name':a97_0x1aa07d(0x153),'type':a97_0x1aa07d(0x13b),'description':a97_0x1aa07d(0x132)},{'name':DESCRIPTION_FILE_FLAG,'type':a97_0x1aa07d(0x13b),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x372b07){const _0x4786dc=a97_0x1aa07d,_0xb946b3=_0x372b07[_0x4786dc(0x13c)]('title')[_0x4786dc(0x155)](),_0x38e534=_0x372b07[_0x4786dc(0x13c)]('description')[_0x4786dc(0x155)](),_0x24f223=_0x372b07[_0x4786dc(0x13c)](DESCRIPTION_FILE_FLAG)[_0x4786dc(0x155)]();if(!_0xb946b3)throw CliErrors[_0x4786dc(0x129)](_0x4786dc(0x140),_0x4786dc(0x125));const _0x5f5ade=_0x38e534['length']>0x0,_0x46ba04=_0x24f223['length']>0x0;if(_0x5f5ade===_0x46ba04)throw CliErrors[_0x4786dc(0x142)](_0x4786dc(0x124),_0x4786dc(0x147));if(_0x46ba04){const _0x19c576=resolve(process[_0x4786dc(0x145)](),_0x24f223);if(!existsSync(_0x19c576))throw CliErrors['validation'](_0x4786dc(0x15a)+_0x19c576);}},async 'dryRun'(_0xbd2873){const _0x551f29=a97_0x1aa07d,_0xc07142=await prepareIssueReport(_0xbd2873);return{'method':'POST','url':'otel://'+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0xc07142['title'],'issue.description':_0xc07142[_0x551f29(0x153)],'issue.description_original_bytes':_0xc07142[_0x551f29(0x12d)]['originalBytes'],'issue.description_truncated':_0xc07142[_0x551f29(0x12d)][_0x551f29(0x156)],'issue.description_redactions':_0xc07142[_0x551f29(0x12d)][_0x551f29(0x136)],'issue.description_redaction_kinds':_0xc07142[_0x551f29(0x12d)][_0x551f29(0x150)][_0x551f29(0x12f)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter',_0x551f29(0x128)+_0xc07142[_0x551f29(0x13e)],_0xc07142[_0x551f29(0x135)]?'descriptionFile:\x20'+_0xc07142[_0x551f29(0x135)]:null,_0xc07142[_0x551f29(0x12d)]['truncated']?'truncated:\x20original\x20'+_0xc07142[_0x551f29(0x12d)][_0x551f29(0x158)]+_0x551f29(0x137):null,_0xc07142[_0x551f29(0x12d)][_0x551f29(0x136)]>0x0?'redactions:\x20'+_0xc07142[_0x551f29(0x12d)][_0x551f29(0x136)]+'\x20('+_0xc07142[_0x551f29(0x12d)]['redactionKinds']['join'](',\x20')+')':null][_0x551f29(0x157)](Boolean)[_0x551f29(0x12f)]('\x0a')};},async 'execute'(_0x13c2b9){const _0x4f2b0d=a97_0x1aa07d,_0x480d6a=await prepareIssueReport(_0x13c2b9);try{await sendPlatformIssueCollectLog({'title':_0x480d6a[_0x4f2b0d(0x140)],'description':_0x480d6a['description'],'sanitize':{'originalBytes':_0x480d6a[_0x4f2b0d(0x12d)][_0x4f2b0d(0x158)],'truncated':_0x480d6a[_0x4f2b0d(0x12d)][_0x4f2b0d(0x156)],'redactionCount':_0x480d6a['sanitize'][_0x4f2b0d(0x136)],'redactionKinds':_0x480d6a['sanitize'][_0x4f2b0d(0x150)]}});}catch(_0x54c05b){throw CliErrors[_0x4f2b0d(0x143)](_0x4f2b0d(0x14b)+(_0x54c05b instanceof Error?_0x54c05b[_0x4f2b0d(0x146)]:String(_0x54c05b)),_0x4f2b0d(0x15b));}return{'ok':!![],'message':buildResultMessage(_0x480d6a['sanitize']),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x4f2b0d(0x127),_0x4f2b0d(0x152),_0x4f2b0d(0x141),_0x4f2b0d(0x134),_0x4f2b0d(0x151),_0x4f2b0d(0x14f)],'issue':{'title':_0x480d6a[_0x4f2b0d(0x140)],'descriptionLength':_0x480d6a[_0x4f2b0d(0x153)][_0x4f2b0d(0x13f)],'descriptionSource':_0x480d6a['descriptionSource'],..._0x480d6a['descriptionFilePath']?{'descriptionFile':_0x480d6a[_0x4f2b0d(0x135)]}:{},'sanitize':{'originalBytes':_0x480d6a['sanitize'][_0x4f2b0d(0x158)],'truncated':_0x480d6a['sanitize']['truncated'],'redactions':_0x480d6a[_0x4f2b0d(0x12d)][_0x4f2b0d(0x136)],'redactionKinds':_0x480d6a[_0x4f2b0d(0x12d)]['redactionKinds']}}}};}};function buildResultMessage(_0x349b74){const _0x3e515c=a97_0x1aa07d,_0x3dd1d0=[];return _0x349b74[_0x3e515c(0x156)]&&_0x3dd1d0['push'](_0x3e515c(0x12e)+_0x349b74[_0x3e515c(0x158)]+_0x3e515c(0x137)),_0x349b74['redactionCount']>0x0&&_0x3dd1d0['push'](_0x3e515c(0x154)+_0x349b74['redactionCount']+'\x20secret(s):\x20'+_0x349b74[_0x3e515c(0x150)][_0x3e515c(0x12f)](',\x20')),_0x3dd1d0[_0x3e515c(0x13f)]===0x0?'Platform\x20issue\x20reported':'Platform\x20issue\x20reported\x20('+_0x3dd1d0[_0x3e515c(0x12f)](';\x20')+')';}async function prepareIssueReport(_0xdb71d2){const _0xe06b98=a97_0x1aa07d,_0x5c113e=_0xdb71d2['str'](_0xe06b98(0x140))['trim'](),_0x519226=_0xdb71d2[_0xe06b98(0x13c)](_0xe06b98(0x153)),_0x37a8c3=_0xdb71d2[_0xe06b98(0x13c)](DESCRIPTION_FILE_FLAG)[_0xe06b98(0x155)]();if(!_0x37a8c3){const _0x220554=_0x519226;if(!_0x220554[_0xe06b98(0x155)]())throw CliErrors[_0xe06b98(0x142)](_0xe06b98(0x148),_0xe06b98(0x15d));const _0x18877d=sanitizeIssueDescription(_0x220554);return{'title':_0x5c113e,'description':_0x18877d['description'],'descriptionSource':_0xe06b98(0x12c),'sanitize':_0x18877d};}const _0x2c45f7=resolve(process[_0xe06b98(0x145)](),_0x37a8c3),_0x4e541b=await readFile(_0x2c45f7,_0xe06b98(0x14d));if(!_0x4e541b[_0xe06b98(0x155)]())throw CliErrors[_0xe06b98(0x142)](_0xe06b98(0x15c)+_0x2c45f7,_0xe06b98(0x12b));const _0x34a911=sanitizeIssueDescription(_0x4e541b);return{'title':_0x5c113e,'description':_0x34a911[_0xe06b98(0x153)],'descriptionSource':_0xe06b98(0x133),'descriptionFilePath':_0x2c45f7,'sanitize':_0x34a911};}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 对 `issue.description` 的卫生处理:截断超长 + 替换敏感片段,**永不拒绝**。
|
|
3
|
+
* 设计取向是“宁可 redact 也要让 issue 送达” —— issue 上报场景本身就是兜底通路,
|
|
4
|
+
* 用户在登录失败 / Cookie 过期等异常下提交错误日志的概率最高,敏感关键字命中率天然高,
|
|
5
|
+
* 若 reject 会让用户直接放弃上报,宿主侧也丢失观测。
|
|
6
|
+
*
|
|
7
|
+
* 卫生处理结果(截断与替换次数等)会作为 attribute 一并上报,方便运维侧统计与回放。
|
|
8
|
+
*/
|
|
9
|
+
export declare const ISSUE_DESCRIPTION_MAX_BYTES: number;
|
|
10
|
+
export type SanitizeIssueDescriptionResult = {
|
|
11
|
+
/** 已清洗、可直接上报的 description 文本 */
|
|
12
|
+
description: string;
|
|
13
|
+
/** 入参原始字节长度(UTF-8) */
|
|
14
|
+
originalBytes: number;
|
|
15
|
+
/** 是否因超过 {@link ISSUE_DESCRIPTION_MAX_BYTES} 被截断 */
|
|
16
|
+
truncated: boolean;
|
|
17
|
+
/** 命中的敏感片段总次数 */
|
|
18
|
+
redactionCount: number;
|
|
19
|
+
/** 命中过的敏感类别(去重、保持声明顺序) */
|
|
20
|
+
redactionKinds: string[];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* 对 issue description 做体积截断 + 敏感片段替换。
|
|
24
|
+
*
|
|
25
|
+
* - 永不抛错、永不拒绝;上层应直接使用返回的 `description`。
|
|
26
|
+
* - 卫生处理结果通过 `truncated` / `redactionCount` / `redactionKinds` 暴露,
|
|
27
|
+
* 建议作为 `issue.description_*` attribute 上报,以便运维统计。
|
|
28
|
+
*
|
|
29
|
+
* 旁路:若 `RABETBASE_ISSUE_RAW_DESCRIPTION=1`,跳过 redact 但仍执行 size 截断
|
|
30
|
+
* (体积保护是后端成本/截断风险,不允许绕过)。
|
|
31
|
+
*/
|
|
32
|
+
export declare function sanitizeIssueDescription(input: string): SanitizeIssueDescriptionResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a98_0xcfd5e3=a98_0x1bf6;(function(_0x4f2acf,_0x51272e){const _0x51701c=a98_0x1bf6,_0x34e459=_0x4f2acf();while(!![]){try{const _0x1c13fb=-parseInt(_0x51701c(0x13c))/0x1*(-parseInt(_0x51701c(0x136))/0x2)+parseInt(_0x51701c(0x12b))/0x3*(parseInt(_0x51701c(0x139))/0x4)+-parseInt(_0x51701c(0x141))/0x5+parseInt(_0x51701c(0x129))/0x6+parseInt(_0x51701c(0x13a))/0x7*(-parseInt(_0x51701c(0x13e))/0x8)+parseInt(_0x51701c(0x132))/0x9*(-parseInt(_0x51701c(0x12c))/0xa)+-parseInt(_0x51701c(0x128))/0xb*(parseInt(_0x51701c(0x138))/0xc);if(_0x1c13fb===_0x51272e)break;else _0x34e459['push'](_0x34e459['shift']());}catch(_0x8fe866){_0x34e459['push'](_0x34e459['shift']());}}}(a98_0x4bde,0x833c6));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a98_0xcfd5e3(0x12d),REDACTION_RULES=[{'kind':a98_0xcfd5e3(0x137),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':'REDACTED:cookie'},{'kind':a98_0xcfd5e3(0x131),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a98_0xcfd5e3(0x142),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a98_0xcfd5e3(0x125)},{'kind':a98_0xcfd5e3(0x13d),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a98_0xcfd5e3(0x130)},{'kind':a98_0xcfd5e3(0x13f),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a98_0xcfd5e3(0x12f)},{'kind':a98_0xcfd5e3(0x124),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a98_0xcfd5e3(0x127)}];function a98_0x1bf6(_0x43e346,_0x3de71d){_0x43e346=_0x43e346-0x124;const _0x4bdedd=a98_0x4bde();let _0x1bf622=_0x4bdedd[_0x43e346];return _0x1bf622;}export function sanitizeIssueDescription(_0x528571){const _0x2cc60a=a98_0xcfd5e3,_0x45a7b0=Buffer['byteLength'](_0x528571,'utf8'),_0x3a7f0a=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x3f4592=_0x528571,_0x3be0dd=0x0;const _0x517b6e=[];if(!_0x3a7f0a){const _0x3a4bff=protectOssAccessKeyIds(_0x3f4592);_0x3f4592=_0x3a4bff['description'];for(const _0x3ac7ff of REDACTION_RULES){let _0x5a2bd2=0x0;_0x3f4592=_0x3f4592[_0x2cc60a(0x135)](_0x3ac7ff['pattern'],(_0x515ba7,_0xca7a80)=>{const _0x78ad16=_0x2cc60a;_0x5a2bd2+=0x1;const _0x5d156a=typeof _0xca7a80===_0x78ad16(0x145)?_0xca7a80:'';return _0x5d156a+'['+_0x3ac7ff[_0x78ad16(0x13b)]+']';}),_0x5a2bd2>0x0&&(_0x3be0dd+=_0x5a2bd2,!_0x517b6e['includes'](_0x3ac7ff[_0x2cc60a(0x12a)])&&_0x517b6e['push'](_0x3ac7ff[_0x2cc60a(0x12a)]));}_0x3f4592=_0x3a4bff['restore'](_0x3f4592);}let _0x3e8c30=![];if(Buffer['byteLength'](_0x3f4592,_0x2cc60a(0x12e))>ISSUE_DESCRIPTION_MAX_BYTES){_0x3e8c30=!![];const _0xc5c245=Buffer['byteLength'](TRUNCATION_NOTICE,'utf8'),_0x22dc23=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0xc5c245);_0x3f4592=sliceUtf8Bytes(_0x3f4592,_0x22dc23)+TRUNCATION_NOTICE;}return{'description':_0x3f4592,'originalBytes':_0x45a7b0,'truncated':_0x3e8c30,'redactionCount':_0x3be0dd,'redactionKinds':_0x517b6e};}function protectOssAccessKeyIds(_0x2691fd){const _0x407d1c=a98_0xcfd5e3,_0xa5ab2=[],_0x223364=_0x2691fd[_0x407d1c(0x135)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x15645a,_0x466247)=>{const _0x419648=_0x407d1c,_0x2fced9=_0xa5ab2[_0x419648(0x134)](_0x15645a['slice'](_0x466247['length']))-0x1;return _0x466247+_0x419648(0x144)+_0x2fced9+'__';});return{'description':_0x223364,'restore':_0xc1989f=>_0xc1989f[_0x407d1c(0x135)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x607ce0,_0x41cf85,_0x4aa3f8)=>{const _0x1fb8bd=_0xa5ab2[Number(_0x4aa3f8)];return _0x1fb8bd===undefined?_0x607ce0:''+_0x41cf85+_0x1fb8bd;})};}function sliceUtf8Bytes(_0x55e5bf,_0x349135){const _0x1aeedd=a98_0xcfd5e3;if(_0x349135<=0x0)return'';const _0x2f617b=Buffer[_0x1aeedd(0x126)](_0x55e5bf,_0x1aeedd(0x12e));if(_0x2f617b[_0x1aeedd(0x140)]<=_0x349135)return _0x55e5bf;let _0x2957ec=_0x349135;while(_0x2957ec>0x0){const _0x587cbc=_0x2f617b[_0x2957ec];if(_0x587cbc===undefined||(_0x587cbc&0xc0)!==0x80)break;_0x2957ec-=0x1;}return _0x2f617b[_0x1aeedd(0x143)](0x0,_0x2957ec)[_0x1aeedd(0x133)]('utf8');}function a98_0x4bde(){const _0x4f7bb5=['string','bearer-jwt','REDACTED:private-key','from','REDACTED:bearer-jwt','111067amtaft','4252974AyOmtR','kind','413811NRTlUM','1030PMtiFj','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','utf8','REDACTED:password','REDACTED:access-key','authorization','3681fKXOjO','toString','push','replace','4BfWCHI','cookie','204umFWBV','20jDnIer','56TExPXJ','label','377873GezXvT','access-key','631096QYEVWV','password','byteLength','3859230KuYGJh','private-key','subarray','__RB_OSS_ID_'];a98_0x4bde=function(){return _0x4f7bb5;};return a98_0x4bde();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a99_0x26b3(){const _0x2cc7f7=['company','11627LBUHwE','cookie','verified','str','appCode','70676tBtFPT','8683641vxbtfA','length','Knowledge-base\x20title','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','1imzeKj','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','\x20--format\x20compress`\x20before\x20choosing\x20update.','1439500zKkGjY','kb_create_outcome_unknown','rabetbase\x20kb\x20list\x20--title\x20','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','content','2351530hSpnpI','trim','high-risk-write','stringify','\x20--format\x20compress','/admin/knowledge-base/create','kb_verification_failed','694404JULXMC','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','create','1370504THTiiW','\x20for\x20','string','Created\x20company\x20knowledge\x20base\x20','\x20with\x20title\x20','kb_file_required','file','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','1758LIWXia','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','POST','kb_title_required','rabetbase\x20kb\x20detail\x20--id\x20','byteSize','contentHash','title'];a99_0x26b3=function(){return _0x2cc7f7;};return a99_0x26b3();}const a99_0x1f921f=a99_0x1af3;(function(_0x164989,_0x185ec0){const _0x41c570=a99_0x1af3,_0x27bd6e=_0x164989();while(!![]){try{const _0x1fe2be=-parseInt(_0x41c570(0x20d))/0x1*(parseInt(_0x41c570(0x208))/0x2)+-parseInt(_0x41c570(0x1ef))/0x3+parseInt(_0x41c570(0x1e1))/0x4+-parseInt(_0x41c570(0x1e8))/0x5+parseInt(_0x41c570(0x1fa))/0x6*(-parseInt(_0x41c570(0x203))/0x7)+parseInt(_0x41c570(0x1f2))/0x8+parseInt(_0x41c570(0x209))/0x9;if(_0x1fe2be===_0x185ec0)break;else _0x27bd6e['push'](_0x27bd6e['shift']());}catch(_0x4b1478){_0x27bd6e['push'](_0x27bd6e['shift']());}}}(a99_0x26b3,0x4277c));import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH=a99_0x1f921f(0x1ed);function readCreateInput(_0x2a1d66){const _0x1f5702=a99_0x1f921f,_0x49cad0=_0x2a1d66[_0x1f5702(0x206)]('title')[_0x1f5702(0x1e9)]();if(!_0x49cad0)throw kbError(_0x1f5702(0x1fd),'--title\x20is\x20required.');const _0x46fbbf=_0x2a1d66['str'](_0x1f5702(0x1f8))['trim']();if(!_0x46fbbf)throw kbError(_0x1f5702(0x1f7),'--file\x20is\x20required.','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.');return{'title':_0x49cad0,'file':_0x46fbbf};}async function prepareCreate(_0x2818f7){const _0x49e1b4=a99_0x1f921f,_0x168840=readCreateInput(_0x2818f7),_0x4e3752=await readKbFile(_0x168840['file']),_0x43145b=await fetchAllCompanyKnowledgeBases(_0x2818f7,{'title':_0x168840[_0x49e1b4(0x201)]}),_0x1de5f5=findExactCompanyKnowledgeBases(_0x43145b,_0x2818f7[_0x49e1b4(0x207)],_0x168840['title']);if(_0x1de5f5[_0x49e1b4(0x20a)]>0x0)throw kbError('kb_already_exists','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20'+_0x2818f7[_0x49e1b4(0x207)]+_0x49e1b4(0x1f6)+_0x168840[_0x49e1b4(0x201)]+'.',_0x49e1b4(0x1e6)+_0x1de5f5[0x0]['id']+_0x49e1b4(0x1e0));return{..._0x168840,'content':_0x4e3752};}function plannedAfter(_0x3d7610,_0x3b9760){const _0x3ab6a3=a99_0x1f921f;return{'scope':_0x3ab6a3(0x202),'appCode':_0x3d7610[_0x3ab6a3(0x207)],'title':_0x3b9760[_0x3ab6a3(0x201)],'contentByteSize':_0x3b9760[_0x3ab6a3(0x1e7)][_0x3ab6a3(0x1ff)],'contentHash':_0x3b9760[_0x3ab6a3(0x1e7)][_0x3ab6a3(0x200)]};}function verifyCreatedState(_0x361e26,_0x1120af,_0x432d5b){const _0x28c8b5=a99_0x1f921f;assertCompanyKnowledgeBase(_0x432d5b,_0x361e26[_0x28c8b5(0x207)],_0x432d5b['id']);const _0x55d745=inspectKbContent(_0x432d5b[_0x28c8b5(0x1e7)]);if(_0x432d5b['title']!==_0x1120af[_0x28c8b5(0x201)]||_0x55d745[_0x28c8b5(0x200)]!==_0x1120af[_0x28c8b5(0x1e7)][_0x28c8b5(0x200)])throw kbError(_0x28c8b5(0x1ee),'Company\x20knowledge\x20base\x20'+_0x432d5b['id']+_0x28c8b5(0x1f9),_0x28c8b5(0x1f0)+_0x432d5b['id']+_0x28c8b5(0x20c));return projectKb(_0x432d5b);}function a99_0x1af3(_0x126629,_0x5490e0){_0x126629=_0x126629-0x1df;const _0x26b307=a99_0x26b3();let _0x1af311=_0x26b307[_0x126629];return _0x1af311;}export const kbCreate={'service':'kb','command':a99_0x1f921f(0x1f1),'description':a99_0x1f921f(0x1e4),'risk':a99_0x1f921f(0x1ea),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':a99_0x1f921f(0x1f4),'required':!![],'description':a99_0x1f921f(0x20b)},{'name':a99_0x1f921f(0x1f8),'type':'string','required':!![],'description':a99_0x1f921f(0x1e5)}],async 'validate'(_0x299948){readCreateInput(_0x299948),requireKbExplicitYes(_0x299948);},async 'dryRun'(_0x48fc6a){const _0x1abd4f=a99_0x1f921f,_0x40b917=await prepareCreate(_0x48fc6a);return asDryRunResult({'operation':_0x1abd4f(0x1f1),'selector':{'scope':_0x1abd4f(0x202),'appCode':_0x48fc6a[_0x1abd4f(0x207)],'title':_0x40b917[_0x1abd4f(0x201)]},'before':null,'after':plannedAfter(_0x48fc6a,_0x40b917),'dryRun':!![],'backend':{'method':_0x1abd4f(0x1fc),'path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x1abd4f(0x1e3)+JSON[_0x1abd4f(0x1eb)](_0x40b917[_0x1abd4f(0x201)])+'\x20--format\x20compress'}},{'method':_0x1abd4f(0x1fc),'url':CREATE_PATH});},async 'execute'(_0x40255){const _0x10a090=a99_0x1f921f;requireKbExplicitYes(_0x40255);const _0x3f56ff=await prepareCreate(_0x40255);let _0x5539f3,_0x314113=![];try{const _0xcef39a=await createEnterpriseKnowledgeBase(_0x40255[_0x10a090(0x204)],{'appCode':_0x40255[_0x10a090(0x207)],'title':_0x3f56ff[_0x10a090(0x201)],'content':_0x3f56ff['content'][_0x10a090(0x1e7)]});assertCompanyKnowledgeBase(_0xcef39a,_0x40255[_0x10a090(0x207)],_0xcef39a['id']),_0x5539f3=_0xcef39a['id'];}catch(_0x48c4a1){if(!isPlatformTransportFailure(_0x48c4a1))throw _0x48c4a1;_0x314113=!![];}if(_0x5539f3===undefined){const _0x2c9b68=await verifyKbMutationReadback('create',!![],()=>fetchAllCompanyKnowledgeBases(_0x40255,{'title':_0x3f56ff[_0x10a090(0x201)]})),_0xcd433e=findExactCompanyKnowledgeBases(_0x2c9b68,_0x40255['appCode'],_0x3f56ff[_0x10a090(0x201)]);if(_0xcd433e[_0x10a090(0x20a)]!==0x1)throw kbError(_0x10a090(0x1e2),_0x10a090(0x1df)+_0xcd433e[_0x10a090(0x20a)]+'.','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.');_0x5539f3=_0xcd433e[0x0]['id'];}const _0x17db20=await verifyKbMutationReadback('create',_0x314113,()=>requireKb(_0x40255,_0x5539f3)),_0x23a511=verifyCreatedState(_0x40255,_0x3f56ff,_0x17db20),_0x54f4f7=_0x314113?[_0x10a090(0x1fb)]:[];return{'ok':!![],'data':{'operation':_0x10a090(0x1f1),'selector':{'id':_0x23a511['id'],'scope':_0x10a090(0x202),'appCode':_0x23a511[_0x10a090(0x207)]},'before':null,'after':_0x23a511,'dryRun':![],'backend':{'method':_0x10a090(0x1fc),'path':CREATE_PATH},'warnings':_0x54f4f7,'verification':{'status':_0x10a090(0x205),'recoveredAfterUnknownResponse':_0x314113,'lookupCommand':_0x10a090(0x1fe)+_0x23a511['id']+_0x10a090(0x1ec)}},'message':_0x10a090(0x1f5)+_0x23a511['id']+_0x10a090(0x1f3)+_0x23a511[_0x10a090(0x207)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x112e80=a100_0x4e46;function a100_0x4e46(_0x8220a9,_0x1a501a){_0x8220a9=_0x8220a9-0x165;const _0xc6eee3=a100_0xc6ee();let _0x4e468c=_0xc6eee3[_0x8220a9];return _0x4e468c;}function a100_0xc6ee(){const _0x350572=['--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','number','27jtZomL','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','delete','48xKDzjI','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','3lNmyAq','1446000YhyqYR','3408508OGnrLc','high-risk-write','920898otUShs','2023462NawUuY','15OVUMho','24BxQuua','already_absent','8450340WvUYQD','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','appCode','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','kb_delete_outcome_unknown','POST','snapshotHash','company','4714758wYLlYd','expected-version','/admin/knowledge-base/delete','9028KMGgPl','flag','rabetbase\x20kb\x20detail\x20--id\x20','Company\x20knowledge-base\x20id','no_op','\x20remains\x20readable\x20after\x20delete.','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','unshift','Company\x20knowledge\x20base\x20','\x20--format\x20compress','verified'];a100_0xc6ee=function(){return _0x350572;};return a100_0xc6ee();}(function(_0x12b778,_0x56975c){const _0x2866d8=a100_0x4e46,_0x3308f0=_0x12b778();while(!![]){try{const _0xb2b176=-parseInt(_0x2866d8(0x187))/0x1*(parseInt(_0x2866d8(0x179))/0x2)+parseInt(_0x2866d8(0x165))/0x3*(parseInt(_0x2866d8(0x167))/0x4)+parseInt(_0x2866d8(0x16b))/0x5*(parseInt(_0x2866d8(0x166))/0x6)+-parseInt(_0x2866d8(0x16a))/0x7*(parseInt(_0x2866d8(0x16c))/0x8)+-parseInt(_0x2866d8(0x176))/0x9+parseInt(_0x2866d8(0x16e))/0xa+-parseInt(_0x2866d8(0x169))/0xb*(parseInt(_0x2866d8(0x18a))/0xc);if(_0xb2b176===_0x56975c)break;else _0x3308f0['push'](_0x3308f0['shift']());}catch(_0x3437f1){_0x3308f0['push'](_0x3308f0['shift']());}}}(a100_0xc6ee,0x8bbbf));import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const DELETE_PATH=a100_0x112e80(0x178),RAG_WARNING=a100_0x112e80(0x185),NON_ATOMIC_WARNING=a100_0x112e80(0x184);function readExpectedVersion(_0x4a0a15){const _0x59db70=a100_0x112e80,_0x236101=_0x4a0a15[_0x59db70(0x17a)](_0x59db70(0x177));if(_0x236101===undefined)return undefined;const _0x2f19f3=Number(_0x236101);if(!Number['isSafeInteger'](_0x2f19f3)||_0x2f19f3<0x0)throw kbError('kb_expected_version_invalid',_0x59db70(0x18b));return _0x2f19f3;}function noOpData(_0x5828a0,_0x1a525c,_0x11d1cf){const _0x20c190=a100_0x112e80;return{'operation':_0x20c190(0x17d),'selector':{'id':_0x1a525c,'scope':'company','appCode':_0x5828a0[_0x20c190(0x170)]},'before':null,'after':null,'dryRun':_0x11d1cf,'deleteCalled':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[],'verification':{'status':_0x20c190(0x16d),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a100_0x112e80(0x189),'description':'Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','risk':a100_0x112e80(0x168),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':'number','required':!![],'description':a100_0x112e80(0x17c)},{'name':'expected-version','type':a100_0x112e80(0x186),'required':![],'description':a100_0x112e80(0x171)}],async 'validate'(_0x5f46bf){readKbId(_0x5f46bf),readExpectedVersion(_0x5f46bf),requireKbExplicitYes(_0x5f46bf);},async 'dryRun'(_0x58eb39){const _0x1110b6=a100_0x112e80,_0xa89441=readKbId(_0x58eb39),_0x55bd3e=readExpectedVersion(_0x58eb39),_0x3d316e=await getKbOrNull(_0x58eb39,_0xa89441);if(!_0x3d316e)return asDryRunResult(noOpData(_0x58eb39,_0xa89441,!![]),{'method':_0x1110b6(0x173),'url':DELETE_PATH});assertExpectedKbVersion(_0x3d316e,_0x55bd3e);const _0xf690d6=projectKb(_0x3d316e),_0x437c82=[RAG_WARNING];if(_0x55bd3e!==undefined)_0x437c82[_0x1110b6(0x180)](NON_ATOMIC_WARNING);return asDryRunResult({'operation':_0x1110b6(0x189),'selector':{'id':_0xf690d6['id'],'scope':'company','appCode':_0xf690d6[_0x1110b6(0x170)]},'before':_0xf690d6,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x437c82,'verification':{'expectedVersion':_0x55bd3e??null,'atomicCompareAndSet':![],'snapshotHash':_0xf690d6[_0x1110b6(0x174)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x1110b6(0x17b)+_0xf690d6['id']+_0x1110b6(0x182)}},{'method':_0x1110b6(0x173),'url':DELETE_PATH});},async 'execute'(_0x1fb853){const _0x2ca02a=a100_0x112e80;requireKbExplicitYes(_0x1fb853);const _0x37a7b0=readKbId(_0x1fb853),_0x72f205=readExpectedVersion(_0x1fb853),_0x801a3a=await getKbOrNull(_0x1fb853,_0x37a7b0);if(!_0x801a3a)return{'ok':!![],'data':noOpData(_0x1fb853,_0x37a7b0,![]),'message':_0x2ca02a(0x181)+_0x37a7b0+_0x2ca02a(0x17f)};assertExpectedKbVersion(_0x801a3a,_0x72f205);const _0x52e294=projectKb(_0x801a3a);let _0x282c18=![];try{await deleteEnterpriseKnowledgeBase(_0x1fb853['cookie'],_0x37a7b0);}catch(_0xcdff70){if(!isPlatformTransportFailure(_0xcdff70))throw _0xcdff70;_0x282c18=!![];}const _0x1ebe2a=await verifyKbMutationReadback('delete',_0x282c18,()=>getKbOrNull(_0x1fb853,_0x37a7b0));if(_0x1ebe2a)throw kbError(_0x282c18?_0x2ca02a(0x172):'kb_verification_failed',_0x2ca02a(0x181)+_0x37a7b0+_0x2ca02a(0x17e),_0x2ca02a(0x188)+_0x37a7b0+_0x2ca02a(0x16f));const _0x550a81=[RAG_WARNING];if(_0x72f205!==undefined)_0x550a81['unshift'](NON_ATOMIC_WARNING);return _0x282c18&&_0x550a81[_0x2ca02a(0x180)](_0x2ca02a(0x18c)),{'ok':!![],'data':{'operation':_0x2ca02a(0x189),'selector':{'id':_0x52e294['id'],'scope':_0x2ca02a(0x175),'appCode':_0x52e294[_0x2ca02a(0x170)]},'before':_0x52e294,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x2ca02a(0x173),'path':DELETE_PATH},'warnings':_0x550a81,'verification':{'status':_0x2ca02a(0x183),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x282c18,'lookupCommand':_0x2ca02a(0x17b)+_0x52e294['id']+_0x2ca02a(0x182)}},'message':'Soft-deleted\x20company\x20knowledge\x20base\x20'+_0x52e294['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a101_0x2fc4e4=a101_0x125c;(function(_0x99229d,_0x42d0b0){const _0xa3982=a101_0x125c,_0x3036c8=_0x99229d();while(!![]){try{const _0x591553=parseInt(_0xa3982(0x1be))/0x1*(-parseInt(_0xa3982(0x1bb))/0x2)+-parseInt(_0xa3982(0x1b7))/0x3*(-parseInt(_0xa3982(0x1c0))/0x4)+parseInt(_0xa3982(0x1c4))/0x5*(-parseInt(_0xa3982(0x1c5))/0x6)+-parseInt(_0xa3982(0x1c2))/0x7+parseInt(_0xa3982(0x1bd))/0x8*(parseInt(_0xa3982(0x1b6))/0x9)+-parseInt(_0xa3982(0x1b5))/0xa*(-parseInt(_0xa3982(0x1c1))/0xb)+-parseInt(_0xa3982(0x1bc))/0xc*(-parseInt(_0xa3982(0x1b8))/0xd);if(_0x591553===_0x42d0b0)break;else _0x3036c8['push'](_0x3036c8['shift']());}catch(_0x51117a){_0x3036c8['push'](_0x3036c8['shift']());}}}(a101_0x46c2,0xb2c4b));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';function a101_0x46c2(){const _0x4c755c=['3414323cHhIEb','4765397IgPWxY','Loaded\x20company\x20knowledge\x20base\x20','145030FsCgxX','156wngVDN','20kSbpdw','26253sRfJJM','259323DkeQlG','91hACTGw','number','read','2069022pfUDuF','1959252rkRBSr','1336TeSBtf','1jxYYPC','Show\x20one\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','44JGVVVP'];a101_0x46c2=function(){return _0x4c755c;};return a101_0x46c2();}function a101_0x125c(_0x5a606b,_0x4d949a){_0x5a606b=_0x5a606b-0x1b5;const _0x46c2d7=a101_0x46c2();let _0x125c63=_0x46c2d7[_0x5a606b];return _0x125c63;}export const kbDetail={'service':'kb','command':'detail','description':a101_0x2fc4e4(0x1bf),'risk':a101_0x2fc4e4(0x1ba),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a101_0x2fc4e4(0x1b9),'required':!![],'description':'Company\x20knowledge-base\x20id'}],async 'validate'(_0x12fdc6){readKbId(_0x12fdc6);},async 'execute'(_0x5493cc){const _0x1fbb9c=a101_0x2fc4e4,_0x320311=readKbId(_0x5493cc),_0x38e3aa=await requireKb(_0x5493cc,_0x320311);return{'ok':!![],'data':{'knowledgeBase':projectKb(_0x38e3aa)},'message':_0x1fbb9c(0x1c3)+_0x320311};}};
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e2ea4,_0x2dd482){const _0x1a8873=a102_0x40f3,_0x17374f=_0x1e2ea4();while(!![]){try{const _0x1cadfe=-parseInt(_0x1a8873(0x18f))/0x1+-parseInt(_0x1a8873(0x195))/0x2*(-parseInt(_0x1a8873(0x190))/0x3)+parseInt(_0x1a8873(0x193))/0x4*(parseInt(_0x1a8873(0x18e))/0x5)+-parseInt(_0x1a8873(0x18b))/0x6*(parseInt(_0x1a8873(0x192))/0x7)+parseInt(_0x1a8873(0x18c))/0x8+-parseInt(_0x1a8873(0x18d))/0x9*(parseInt(_0x1a8873(0x191))/0xa)+parseInt(_0x1a8873(0x194))/0xb;if(_0x1cadfe===_0x2dd482)break;else _0x17374f['push'](_0x17374f['shift']());}catch(_0x579af4){_0x17374f['push'](_0x17374f['shift']());}}}(a102_0x5575,0xcb09b));function a102_0x40f3(_0x4b55de,_0x476571){_0x4b55de=_0x4b55de-0x18b;const _0x557541=a102_0x5575();let _0x40f3f4=_0x557541[_0x4b55de];return _0x40f3f4;}import{kbList}from'../../commands/kb/list.js';import{kbDetail}from'../../commands/kb/detail.js';import{kbCreate}from'../../commands/kb/create.js';import{kbUpdate}from'../../commands/kb/update.js';import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbDelete];function a102_0x5575(){const _0x44e202=['7234295UpVTzH','537569yAgqxS','204612FMHNqq','240iyvzhl','4912481QJVAVb','4KaIfwA','9083404sALAeQ','8DmOHPn','6OiysDM','704544AVIQDB','210942jONqkg'];a102_0x5575=function(){return _0x44e202;};return a102_0x5575();}
|
package/lib/commands/kb/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a103_0x561030=a103_0x14db;(function(_0x2b7d97,_0x262869){const _0x511def=a103_0x14db,_0x17c952=_0x2b7d97();while(!![]){try{const _0x4dd34c=-parseInt(_0x511def(0x14a))/0x1*(parseInt(_0x511def(0x148))/0x2)+parseInt(_0x511def(0x13f))/0x3+-parseInt(_0x511def(0x142))/0x4*(-parseInt(_0x511def(0x144))/0x5)+-parseInt(_0x511def(0x14c))/0x6*(parseInt(_0x511def(0x13a))/0x7)+parseInt(_0x511def(0x149))/0x8+parseInt(_0x511def(0x13b))/0x9*(parseInt(_0x511def(0x13e))/0xa)+-parseInt(_0x511def(0x146))/0xb;if(_0x4dd34c===_0x262869)break;else _0x17c952['push'](_0x17c952['shift']());}catch(_0x116c2d){_0x17c952['push'](_0x17c952['shift']());}}}(a103_0x543b,0x280f0));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':a103_0x561030(0x147),'description':a103_0x561030(0x140),'risk':a103_0x561030(0x138),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a103_0x561030(0x13c),'type':'string','required':![],'description':a103_0x561030(0x141)}],async 'execute'(_0x40ccc){const _0x118df1=a103_0x561030,_0x6f0e08=_0x40ccc[_0x118df1(0x14b)](_0x118df1(0x13c))[_0x118df1(0x145)](),_0x47c388=await fetchAllCompanyKnowledgeBases(_0x40ccc,{..._0x6f0e08?{'title':_0x6f0e08}:{}}),_0x216dab=_0x47c388[_0x118df1(0x139)](projectKb);return{'ok':!![],'data':{'total':_0x216dab[_0x118df1(0x13d)],'knowledgeBases':_0x216dab},'message':_0x118df1(0x137)+_0x216dab[_0x118df1(0x13d)]+'\x20company\x20knowledge\x20base(s)\x20for\x20'+_0x40ccc[_0x118df1(0x143)]};}};function a103_0x14db(_0x1e9e40,_0x453b12){_0x1e9e40=_0x1e9e40-0x137;const _0x543b49=a103_0x543b();let _0x14db2c=_0x543b49[_0x1e9e40];return _0x14db2c;}function a103_0x543b(){const _0x5e4b55=['list','134ymVTmv','1524056bmKMDJ','3579blveRL','str','111876YqSncP','Found\x20','read','map','14bmALid','9kGHdka','title','length','412450fPoCVT','115794IavKou','List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','Filter\x20by\x20knowledge-base\x20title','4UCdhvH','appCode','1327715AsYawt','trim','1042008UZFuYo'];a103_0x543b=function(){return _0x5e4b55;};return a103_0x543b();}
|