@lovrabet/rabetbase-cli 2.3.16-beta.4 → 2.3.16-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.d.ts +9 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.d.ts +2 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +8 -0
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.d.ts +13 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.d.ts +25 -0
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.d.ts +2 -0
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.d.ts +1 -0
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.d.ts +51 -0
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.d.ts +1 -0
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.d.ts +5 -0
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.d.ts +1 -0
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.d.ts +12 -0
- package/lib/cli-flags.js +1 -1
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.d.ts +2 -0
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.d.ts +2 -0
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.d.ts +2 -0
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.d.ts +2 -0
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.d.ts +18 -0
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.d.ts +5 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.d.ts +10 -0
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.d.ts +2 -0
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.d.ts +11 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.d.ts +46 -0
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.d.ts +2 -0
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.d.ts +2 -0
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.d.ts +2 -0
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.d.ts +2 -0
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.d.ts +2 -0
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.d.ts +105 -0
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.d.ts +2 -0
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.d.ts +4 -0
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.d.ts +2 -0
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.d.ts +2 -0
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.d.ts +5 -0
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.d.ts +2 -0
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.d.ts +2 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.d.ts +2 -0
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.d.ts +2 -0
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.d.ts +8 -0
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.d.ts +2 -0
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.d.ts +2 -0
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.d.ts +2 -0
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.d.ts +2 -0
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.d.ts +17 -0
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.d.ts +17 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.d.ts +11 -0
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.d.ts +12 -0
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +26 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.d.ts +6 -0
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.d.ts +13 -0
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.d.ts +5 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.d.ts +5 -0
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.d.ts +5 -0
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.d.ts +5 -0
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.d.ts +16 -0
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.d.ts +7 -0
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.d.ts +7 -0
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.d.ts +8 -0
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.d.ts +33 -0
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.d.ts +18 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.d.ts +11 -0
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.d.ts +2 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.d.ts +2 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.d.ts +26 -0
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.d.ts +27 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.d.ts +3 -0
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.d.ts +2 -0
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.d.ts +2 -0
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.d.ts +2 -0
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.d.ts +2 -0
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.d.ts +2 -0
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.d.ts +2 -0
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.d.ts +128 -0
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.d.ts +2 -0
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.d.ts +53 -0
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.d.ts +17 -0
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.d.ts +2 -0
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.d.ts +30 -0
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.d.ts +2 -0
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.d.ts +2 -0
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.d.ts +2 -0
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.d.ts +2 -0
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.d.ts +2 -0
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.d.ts +2 -0
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.d.ts +2 -0
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.d.ts +5 -0
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.d.ts +2 -0
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.d.ts +15 -0
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.d.ts +2 -0
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.d.ts +2 -0
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.d.ts +2 -0
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.d.ts +2 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.d.ts +2 -0
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.d.ts +11 -0
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.d.ts +2 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.d.ts +23 -0
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.d.ts +2 -0
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.d.ts +32 -0
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.d.ts +2 -0
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.d.ts +2 -0
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.d.ts +2 -0
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.d.ts +2 -0
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.d.ts +2 -0
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.d.ts +33 -0
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.d.ts +2 -0
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.d.ts +5 -0
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.d.ts +2 -0
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.d.ts +2 -0
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.d.ts +3 -0
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.d.ts +2 -0
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.d.ts +2 -0
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.d.ts +2 -0
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.d.ts +17 -0
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.d.ts +2 -0
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.d.ts +2 -0
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.d.ts +2 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.d.ts +2 -0
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.d.ts +27 -0
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.d.ts +12 -0
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.d.ts +12 -0
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.d.ts +10 -0
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +12 -0
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +28 -0
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.d.ts +69 -0
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.d.ts +17 -0
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.d.ts +7 -0
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +162 -0
- package/lib/commands/menu/shared/update-core.d.ts +11 -0
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.d.ts +6 -0
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.d.ts +2 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.d.ts +2 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.d.ts +2 -0
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.d.ts +2 -0
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.d.ts +2 -0
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.d.ts +2 -0
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.d.ts +2 -0
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.d.ts +2 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.d.ts +2 -0
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +105 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.d.ts +2 -0
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.d.ts +2 -0
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.d.ts +2 -0
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.d.ts +74 -0
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.d.ts +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +6 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.d.ts +9 -0
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.d.ts +4 -0
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.d.ts +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.d.ts +2 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.d.ts +1 -0
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.d.ts +66 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +107 -0
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.d.ts +2 -0
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.d.ts +2 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.d.ts +5 -0
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.d.ts +10 -0
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.d.ts +5 -0
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.d.ts +2 -0
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.d.ts +2 -0
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.d.ts +5 -0
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.d.ts +2 -0
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.d.ts +5 -0
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.d.ts +5 -0
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.d.ts +23 -0
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.d.ts +5 -0
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.d.ts +2 -0
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.d.ts +2 -0
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.d.ts +2 -0
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.d.ts +2 -0
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.d.ts +2 -0
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.d.ts +10 -0
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/workspace/add.d.ts +6 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.d.ts +11 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.d.ts +6 -0
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.d.ts +50 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +1 -0
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.d.ts +34 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.d.ts +10 -0
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +14 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.d.ts +11 -0
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.d.ts +1 -0
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.d.ts +5 -0
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.d.ts +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.d.ts +36 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.d.ts +5 -0
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.d.ts +61 -0
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +102 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +31 -0
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1018 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +8 -0
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +28 -0
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +7 -0
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +25 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +92 -0
- package/lib/core/bff/utils.d.ts +25 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.d.ts +43 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.d.ts +6 -0
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.d.ts +4 -0
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.d.ts +8 -0
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/types.d.ts +22 -0
- package/lib/core/sql-index-auditor.d.ts +33 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.d.ts +7 -0
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.d.ts +7 -0
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.d.ts +5 -0
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.d.ts +14 -0
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/types.d.ts +43 -0
- package/lib/core/sql-sync/utils.d.ts +10 -0
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.d.ts +34 -0
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.d.ts +3 -0
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.d.ts +2 -0
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.d.ts +9 -0
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.d.ts +3 -0
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.d.ts +3 -0
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.d.ts +4 -0
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.d.ts +11 -0
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.d.ts +15 -0
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.d.ts +2 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.d.ts +14 -0
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.d.ts +36 -0
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.d.ts +3 -0
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.d.ts +63 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -0
- package/lib/generated/build-info.js +1 -1
- package/lib/help.d.ts +1 -0
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.d.ts +4 -0
- package/lib/runtime/confirmation.js +1 -0
- package/lib/runtime/event.d.ts +5 -0
- package/lib/runtime/event.js +1 -0
- package/lib/runtime/index.d.ts +7 -0
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/queue.d.ts +5 -0
- package/lib/runtime/queue.js +1 -0
- package/lib/runtime/resolve.d.ts +8 -0
- package/lib/runtime/resolve.js +1 -0
- package/lib/runtime/types.d.ts +50 -0
- package/lib/runtime/types.js +1 -0
- package/lib/skills/main.d.ts +41 -0
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +99 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.d.ts +44 -0
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.d.ts +12 -0
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.d.ts +8 -0
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +93 -0
- package/lib/utils/ai_config.d.ts +47 -0
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.d.ts +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.d.ts +42 -0
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.d.ts +23 -0
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.d.ts +37 -0
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +9 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.d.ts +42 -0
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.d.ts +1 -0
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.d.ts +30 -0
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.d.ts +25 -0
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.d.ts +80 -0
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.d.ts +30 -0
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.d.ts +7 -0
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.d.ts +62 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.d.ts +15 -0
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.d.ts +21 -0
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.d.ts +38 -0
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.d.ts +1 -0
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.d.ts +55 -0
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.d.ts +10 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.d.ts +1 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.d.ts +1 -0
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.d.ts +6 -0
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x3735ce=a151_0x22a1;(function(_0x50301b,_0x32d046){const _0x1761b0=a151_0x22a1,_0x18cc8e=_0x50301b();while(!![]){try{const _0x4208f9=parseInt(_0x1761b0(0x1ec))/0x1+parseInt(_0x1761b0(0x220))/0x2+parseInt(_0x1761b0(0x1e9))/0x3+parseInt(_0x1761b0(0x21c))/0x4*(-parseInt(_0x1761b0(0x21a))/0x5)+-parseInt(_0x1761b0(0x22c))/0x6*(parseInt(_0x1761b0(0x225))/0x7)+-parseInt(_0x1761b0(0x212))/0x8*(-parseInt(_0x1761b0(0x1f4))/0x9)+parseInt(_0x1761b0(0x22e))/0xa*(-parseInt(_0x1761b0(0x1e8))/0xb);if(_0x4208f9===_0x32d046)break;else _0x18cc8e['push'](_0x18cc8e['shift']());}catch(_0x35e811){_0x18cc8e['push'](_0x18cc8e['shift']());}}}(a151_0x1332,0x4dbd4));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a151_0x3735ce(0x213),'type':a151_0x3735ce(0x1f6),'required':!![],'description':a151_0x3735ce(0x228)};function a151_0x22a1(_0x530b62,_0x2bc342){_0x530b62=_0x530b62-0x1e5;const _0x133211=a151_0x1332();let _0x22a1d3=_0x133211[_0x530b62];return _0x22a1d3;}export const ROLE_REF_FLAG={'name':'role','type':'string','required':!![],'description':a151_0x3735ce(0x201)};export const GRANT_FLAG={'name':a151_0x3735ce(0x1fa),'type':a151_0x3735ce(0x1e5),'required':![],'description':a151_0x3735ce(0x202)};export const REVOKE_FLAG={'name':a151_0x3735ce(0x230),'type':'boolean','required':![],'description':'Revoke\x20access\x20to\x20the\x20listed\x20resources'};export const MENUS_FLAG={'name':'menus','type':a151_0x3735ce(0x222),'required':!![],'description':'Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke'};export const DATASETS_FLAG={'name':a151_0x3735ce(0x20a),'type':a151_0x3735ce(0x222),'required':!![],'description':'Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for'};export const PAGE_SLOT_SPECS=[{'flag':a151_0x3735ce(0x231),'key':a151_0x3735ce(0x20d),'allowSelf':![],'label':a151_0x3735ce(0x22f)},{'flag':'create-roles','key':'dataCreate','allowSelf':![],'label':'data\x20create'},{'flag':a151_0x3735ce(0x1ee),'key':'dataUpdate','allowSelf':![],'label':a151_0x3735ce(0x238)},{'flag':a151_0x3735ce(0x1e6),'key':a151_0x3735ce(0x1f5),'allowSelf':![],'label':a151_0x3735ce(0x237)},{'flag':a151_0x3735ce(0x1f7),'key':a151_0x3735ce(0x1ed),'allowSelf':![],'label':a151_0x3735ce(0x22a)},{'flag':a151_0x3735ce(0x226),'key':a151_0x3735ce(0x235),'allowSelf':![],'label':a151_0x3735ce(0x20f)},{'flag':a151_0x3735ce(0x22d),'key':a151_0x3735ce(0x20e),'allowSelf':!![],'label':a151_0x3735ce(0x1fb)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x3d03c8=>({'name':_0x3d03c8['flag'],'type':a151_0x3735ce(0x222),'required':![],'description':a151_0x3735ce(0x21d)+_0x3d03c8[a151_0x3735ce(0x223)]+a151_0x3735ce(0x219)+(_0x3d03c8[a151_0x3735ce(0x206)]?a151_0x3735ce(0x1ea):'')}));export function splitList(_0xa7855b){const _0x25e192=a151_0x3735ce;return _0xa7855b[_0x25e192(0x203)](',')[_0x25e192(0x20b)](_0x1812a7=>_0x1812a7['trim']())[_0x25e192(0x233)](Boolean);}export function projectRoleRef(_0x116201){const _0x53a49d=a151_0x3735ce;return{'id':_0x116201['id'],'roleName':_0x116201[_0x53a49d(0x208)],'roleType':_0x116201[_0x53a49d(0x234)]};}export async function resolvePermitRoles(_0x348d0e,_0x19d023,_0x183bcd){const _0x3343b1=a151_0x3735ce,_0x977777=await listPermitRoles(_0x348d0e,{'needSelf':!![],'needPublic':!![]}),_0x75eab4=[];for(const _0x5ced18 of _0x19d023){const _0x53585d=resolveOnePermitRole(_0x977777,_0x5ced18);if(!_0x183bcd[_0x3343b1(0x206)]&&_0x53585d[_0x3343b1(0x234)]===_0x3343b1(0x229))throw CliErrors['validation'](_0x3343b1(0x1f2)+_0x183bcd['label']+'.',_0x3343b1(0x216));if(!_0x75eab4[_0x3343b1(0x1fe)](_0xab5a23=>_0xab5a23['id']===_0x53585d['id']))_0x75eab4[_0x3343b1(0x221)](_0x53585d);}return _0x75eab4;}function resolveOnePermitRole(_0x1e618c,_0x4ce6cd){const _0x515005=a151_0x3735ce,_0x1cb112=_0x4ce6cd[_0x515005(0x23a)](),_0x5d2fe2=_0x1cb112[_0x515005(0x1f1)]();if(_0x5d2fe2===_0x515005(0x229)||_0x5d2fe2===_0x515005(0x1e7)){const _0x5b7c26=_0x1e618c['find'](_0x33b4b4=>_0x33b4b4[_0x515005(0x234)]===_0x5d2fe2);if(!_0x5b7c26)throw CliErrors['validation'](_0x515005(0x1f3)+_0x5d2fe2+'\x20is\x20not\x20available\x20for\x20this\x20app.');return _0x5b7c26;}if(/^-?\d+$/[_0x515005(0x217)](_0x1cb112)){const _0x602681=Number(_0x1cb112),_0x289b0d=_0x1e618c[_0x515005(0x21e)](_0x221996=>_0x221996['id']===_0x602681);if(!_0x289b0d)throw CliErrors['validation'](_0x515005(0x200)+_0x602681+_0x515005(0x211),'Run\x20`role\x20list`.');return _0x289b0d;}const _0x7d535=_0x1e618c[_0x515005(0x233)](_0x3db82c=>_0x3db82c[_0x515005(0x208)]===_0x1cb112);if(_0x7d535[_0x515005(0x232)]===0x0)throw CliErrors[_0x515005(0x218)]('Role\x20\x22'+_0x1cb112+'\x22\x20not\x20found.',_0x515005(0x239));if(_0x7d535[_0x515005(0x232)]>0x1)throw CliErrors[_0x515005(0x218)](_0x515005(0x214)+_0x1cb112+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x7d535['map'](_0x4245dc=>_0x4245dc['id'])['join'](',\x20')+').','Disambiguate\x20with\x20an\x20id.');return _0x7d535[0x0];}function a151_0x1332(){const _0x4a0901=['791095mLtvjU','datasetCode','8NKNAUf','Roles\x20for\x20','find','str','794240bpTPIv','push','string','label','Missing\x20action.','42RToBKt','export-roles','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','Menu\x20id\x20(from\x20`menu\x20list`)','SELF','data\x20detail','get','21786blWYOy','row-roles','50MJvlhk','menu\x20visibility','revoke','menu-roles','length','filter','roleType','dataExport','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','data\x20delete','data\x20update','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','trim','boolean','delete-roles','ALL','1301135VdlOor','799032ZQhezq',';\x20SELF\x20=\x20only\x20own\x20rows','allowedActions','558611fCQFHB','dataDetail','update-roles','rolePermit','appCode','toUpperCase','SELF\x20is\x20not\x20allowed\x20for\x20','Special\x20role\x20','18bFkYBf','dataDelete','number','detail-roles','resourceName','Pass\x20--role\x20<id|name>.','grant','row\x20visibility','set','role','some','bool','Role\x20id\x20','Role\x20id\x20or\x20role\x20name','Grant\x20access\x20to\x20the\x20listed\x20resources','split','resourceCode','menuId','allowSelf','key','roleName','pageNodeList','datasets','map','apiList','menuPermit','dataPermit','data\x20export','entries','\x20not\x20found.','103976DihuPW','menu-id','Role\x20\x22','action','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','test','validation','\x20(comma-separated\x20SELF/ALL/id/name)'];a151_0x1332=function(){return _0x4a0901;};return a151_0x1332();}export function projectPageSlot(_0x423209){const _0x2d9ece=a151_0x3735ce;if(!_0x423209)return null;return{'resourceCode':_0x423209[_0x2d9ece(0x204)],'roles':(_0x423209[_0x2d9ece(0x1ef)]??[])[_0x2d9ece(0x20b)](projectRoleRef)};}export function projectPagePermit(_0x57471a){const _0x5564b4=a151_0x3735ce,_0x362b0b={'menuId':_0x57471a[_0x5564b4(0x205)],'appCode':_0x57471a[_0x5564b4(0x1f0)],'menuPermit':projectPageSlot(_0x57471a[_0x5564b4(0x20d)])};for(const _0x402f80 of PAGE_SLOT_SPECS){if(_0x402f80['key']===_0x5564b4(0x20d))continue;_0x362b0b[_0x402f80[_0x5564b4(0x207)]]=projectPageSlot(_0x57471a[_0x402f80['key']]);}return _0x362b0b;}export function flattenMenuResources(_0x3c4e09){const _0x1a8774=new Map(),_0x32979e=_0xadc3d4=>{const _0x5f32cf=a151_0x22a1;for(const _0x5920f1 of _0xadc3d4??[]){_0x1a8774[_0x5f32cf(0x1fc)](_0x5920f1[_0x5f32cf(0x204)],{'resourceCode':_0x5920f1[_0x5f32cf(0x204)],'resourceName':_0x5920f1[_0x5f32cf(0x1f8)],'action':_0x5920f1[_0x5f32cf(0x1eb)]?.[0x0]??'0'});if(_0x5920f1[_0x5f32cf(0x209)])_0x32979e(_0x5920f1[_0x5f32cf(0x209)]);}};return _0x32979e(_0x3c4e09),_0x1a8774;}export function flattenApiResources(_0x125d55){const _0x596a9c=a151_0x3735ce,_0x35ef78=new Map(),_0x13b19d=new Map();for(const _0x478b27 of _0x125d55){const _0x5d7777=_0x478b27[_0x596a9c(0x20c)]??{};for(const [_0x1c3542,_0x3c10b7]of Object[_0x596a9c(0x210)](_0x5d7777)){_0x35ef78[_0x596a9c(0x1fc)](_0x1c3542,{'resourceCode':_0x1c3542,'resourceName':_0x478b27[_0x596a9c(0x1f8)],'datasetCode':_0x478b27[_0x596a9c(0x21b)],'action':_0x3c10b7?.[0x0]??'0'});const _0x4f0b3b=_0x13b19d[_0x596a9c(0x22b)](_0x478b27[_0x596a9c(0x21b)])??[];_0x4f0b3b[_0x596a9c(0x221)](_0x1c3542),_0x13b19d[_0x596a9c(0x1fc)](_0x478b27[_0x596a9c(0x21b)],_0x4f0b3b);}}return{'byCode':_0x35ef78,'byDataset':_0x13b19d};}export function buildPermits(_0x3cf96e,_0x27f6e9){const _0x38f4f0=a151_0x3735ce,_0xef4c78={};for(const [_0x344daa,_0x30a031]of _0x3cf96e){const _0xdf092=_0x27f6e9[_0x38f4f0(0x22b)](_0x344daa)??_0x30a031[_0x38f4f0(0x215)];_0xef4c78[_0x344daa]=[_0xdf092];}return _0xef4c78;}export function readRoleRef(_0x2303d3){const _0x1734c8=a151_0x3735ce,_0x2453ce=_0x2303d3[_0x1734c8(0x21f)]('role')[_0x1734c8(0x23a)]();if(!_0x2453ce)throw CliErrors['flagMissing'](_0x1734c8(0x1fd),_0x1734c8(0x1f9));return _0x2453ce;}export function readGrantRevoke(_0x4b8be4){const _0x3c2179=a151_0x3735ce,_0x438457=_0x4b8be4[_0x3c2179(0x1ff)](_0x3c2179(0x1fa)),_0x5bf688=_0x4b8be4[_0x3c2179(0x1ff)](_0x3c2179(0x230));if(_0x438457&&_0x5bf688)throw CliErrors[_0x3c2179(0x218)](_0x3c2179(0x236));if(!_0x438457&&!_0x5bf688)throw CliErrors[_0x3c2179(0x218)](_0x3c2179(0x224),_0x3c2179(0x227));return _0x438457?'access':'0';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b8e13,_0x2ca79f){const _0x4b6c7d=a152_0x229c,_0x598905=_0x5b8e13();while(!![]){try{const _0x2b6421=parseInt(_0x4b6c7d(0x1bc))/0x1*(parseInt(_0x4b6c7d(0x1b2))/0x2)+parseInt(_0x4b6c7d(0x1af))/0x3*(parseInt(_0x4b6c7d(0x1a0))/0x4)+-parseInt(_0x4b6c7d(0x1bd))/0x5+-parseInt(_0x4b6c7d(0x1b0))/0x6+-parseInt(_0x4b6c7d(0x1a1))/0x7*(parseInt(_0x4b6c7d(0x1a6))/0x8)+parseInt(_0x4b6c7d(0x19c))/0x9*(parseInt(_0x4b6c7d(0x1a8))/0xa)+parseInt(_0x4b6c7d(0x1ab))/0xb*(parseInt(_0x4b6c7d(0x1a4))/0xc);if(_0x2b6421===_0x2ca79f)break;else _0x598905['push'](_0x598905['shift']());}catch(_0x110239){_0x598905['push'](_0x598905['shift']());}}}(a152_0x21ed,0x7514d));import{existsSync}from'node:fs';import a152_0x5ef929 from'node:path';import a152_0x141ae0 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';function a152_0x21ed(){const _0x7bbfff=['my-app','777212DrLcwf','91mRzPFa','Logged\x20in','env','75012pIgMBk','test','223144ibYOfd','green','1036580mRzdao','\x22\x20already\x20exists','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','1661tstTME','length','Project\x20name\x20cannot\x20exceed\x2050\x20characters','Skipped','3ubPOjj','3491340WEKMpP','√\x20App\x20Code:\x20','486052fojsWt','Not\x20set','Directory\x20\x22','Project\x20name:','cyan','Login\x20failed','resolve','production','log','trim','1bdbGUJ','2895570VvwQKB','cwd','√\x20Login\x20status:\x20','54uaqzoq','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','string'];a152_0x21ed=function(){return _0x7bbfff;};return a152_0x21ed();}function a152_0x229c(_0x12e91a,_0xdf972d){_0x12e91a=_0x12e91a-0x19a;const _0x21edc7=a152_0x21ed();let _0x229c4c=_0x21edc7[_0x12e91a];return _0x229c4c;}export async function guidedCreateProject(_0x3a51b1,_0x236ecd,_0xa12f70){const _0x196e0d=a152_0x229c,_0x2dea6c=_0x196e0d(0x19f),_0xb51189=readConfig(),_0x3416c8=typeof _0xb51189[_0x196e0d(0x1a3)]===_0x196e0d(0x19e)?_0xb51189[_0x196e0d(0x1a3)]:undefined,_0x3a3e75=await input({'message':_0x196e0d(0x1b5),'default':_0x2dea6c,'validate':_0x3c852c=>{const _0x2d0fde=_0x196e0d,_0x47a651=_0x3c852c[_0x2d0fde(0x1bb)]()||_0x2dea6c;if(_0x47a651[_0x2d0fde(0x1ac)]>0x32)return _0x2d0fde(0x1ad);const _0x119615=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x47a651&&!_0x119615[_0x2d0fde(0x1a5)](_0x47a651))return _0x2d0fde(0x19d);const _0x4c4a5a=a152_0x5ef929[_0x2d0fde(0x1b8)](process[_0x2d0fde(0x19a)](),_0x47a651);if(existsSync(_0x4c4a5a))return _0x2d0fde(0x1b4)+_0x47a651+_0x2d0fde(0x1a9);return!![];}});console[_0x196e0d(0x1ba)](a152_0x141ae0[_0x196e0d(0x1a7)]('√\x20Project\x20Name:\x20'+a152_0x141ae0[_0x196e0d(0x1b6)](_0x3a3e75)));const _0x1ffc2f=await selectSingleAppcode(_0xa12f70);console[_0x196e0d(0x1ba)](a152_0x141ae0[_0x196e0d(0x1a7)](_0x196e0d(0x1b1)+a152_0x141ae0[_0x196e0d(0x1b6)](_0x1ffc2f||_0x196e0d(0x1b3))));if(_0x1ffc2f){const _0x8bb32a=await getIsSessionValid();if(!_0x8bb32a){const _0x114f18=await confirm({'message':_0x196e0d(0x1aa),'default':!![]});if(_0x114f18){const _0xea8fc8=await authServer({'silent':!![]});console['log'](a152_0x141ae0[_0x196e0d(0x1a7)](_0x196e0d(0x19b)+a152_0x141ae0[_0x196e0d(0x1b6)](_0xea8fc8?_0x196e0d(0x1a2):_0x196e0d(0x1b7))));}else console[_0x196e0d(0x1ba)](a152_0x141ae0[_0x196e0d(0x1a7)]('√\x20Login\x20status:\x20'+a152_0x141ae0[_0x196e0d(0x1b6)](_0x196e0d(0x1ae))));}await _0x3a51b1({'projectName':_0x3a3e75,'appCode':_0x1ffc2f,'env':_0x236ecd||_0x3416c8||_0x196e0d(0x1b9)});}else await _0x3a51b1({'projectName':_0x3a3e75,'env':_0x236ecd||_0x3416c8||_0x196e0d(0x1b9)});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatElapsed(start: number): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x261ebf,_0x4be1c6){const _0x3b6b25=a153_0x202f,_0x22981f=_0x261ebf();while(!![]){try{const _0x176b56=parseInt(_0x3b6b25(0x15e))/0x1*(parseInt(_0x3b6b25(0x162))/0x2)+-parseInt(_0x3b6b25(0x168))/0x3*(-parseInt(_0x3b6b25(0x165))/0x4)+parseInt(_0x3b6b25(0x161))/0x5*(-parseInt(_0x3b6b25(0x15f))/0x6)+-parseInt(_0x3b6b25(0x164))/0x7+parseInt(_0x3b6b25(0x163))/0x8*(-parseInt(_0x3b6b25(0x166))/0x9)+-parseInt(_0x3b6b25(0x167))/0xa+parseInt(_0x3b6b25(0x169))/0xb*(parseInt(_0x3b6b25(0x160))/0xc);if(_0x176b56===_0x4be1c6)break;else _0x22981f['push'](_0x22981f['shift']());}catch(_0x31b950){_0x22981f['push'](_0x22981f['shift']());}}}(a153_0x13a0,0xb23b1));function a153_0x202f(_0x45bf2f,_0x3beb81){_0x45bf2f=_0x45bf2f-0x15d;const _0x13a0ea=a153_0x13a0();let _0x202f7d=_0x13a0ea[_0x45bf2f];return _0x202f7d;}export function formatElapsed(_0x5e608b){const _0x4e8e04=a153_0x202f,_0x5ac916=Date[_0x4e8e04(0x15d)]()-_0x5e608b;if(_0x5ac916<0x3e8)return _0x5ac916+'ms';const _0x5c32f3=(_0x5ac916/0x3e8)['toFixed'](0x2),_0x3b5642=_0x5c32f3['replace'](/\.?0+$/u,'');return _0x3b5642+'s';}function a153_0x13a0(){const _0x4f5de6=['480oBQCXI','156BxmgCR','5085VekAaP','2NspBnE','1819784InIrZe','7969843cFZUJu','8ULcJGr','27SueHvT','7140210vWRtrL','1556493WcWTWq','1071466RLVqIA','now','1042442AsgcDQ'];a153_0x13a0=function(){return _0x4f5de6;};return a153_0x13a0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x35f8c3,_0x21ac80){const _0x40715b=a154_0x127c,_0x8dbf17=_0x35f8c3();while(!![]){try{const _0x5afe27=-parseInt(_0x40715b(0x174))/0x1+parseInt(_0x40715b(0x193))/0x2+-parseInt(_0x40715b(0x1bc))/0x3+-parseInt(_0x40715b(0x1a7))/0x4+parseInt(_0x40715b(0x1cf))/0x5*(parseInt(_0x40715b(0x195))/0x6)+-parseInt(_0x40715b(0x1c4))/0x7*(-parseInt(_0x40715b(0x1bf))/0x8)+parseInt(_0x40715b(0x196))/0x9*(parseInt(_0x40715b(0x1ba))/0xa);if(_0x5afe27===_0x21ac80)break;else _0x8dbf17['push'](_0x8dbf17['shift']());}catch(_0x16625b){_0x8dbf17['push'](_0x8dbf17['shift']());}}}(a154_0x46f4,0x4d9cc));import a154_0x359673 from'path';import a154_0x2ebb38 from'fs';import a154_0x25b015 from'chalk';import a154_0xc62288 from'ora';function a154_0x127c(_0x3e6afd,_0x59a31a){_0x3e6afd=_0x3e6afd-0x16f;const _0x46f401=a154_0x46f4();let _0x127c1b=_0x46f401[_0x3e6afd];return _0x127c1b;}import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x57b57d){const _0x5563f8=a154_0x127c,_0x1c029f=await checkCliVersion();(_0x1c029f[_0x5563f8(0x175)]||_0x1c029f[_0x5563f8(0x176)])&&(printCliUpgradeWarning(_0x1c029f),assertCliVersionSupported(_0x1c029f),logger['info'](_0x5563f8(0x192),_0x5563f8(0x1c0),{'currentVersion':_0x1c029f[_0x5563f8(0x1b6)],'stableVersion':_0x1c029f[_0x5563f8(0x1b8)],'minimumVersion':_0x1c029f[_0x5563f8(0x1ae)],'needsUpgrade':_0x1c029f[_0x5563f8(0x175)],'belowMinimum':_0x1c029f[_0x5563f8(0x176)]}));if(_0x57b57d[_0x5563f8(0x180)]&&_0x57b57d['appCode'])await runCreate({'projectName':_0x57b57d[_0x5563f8(0x180)],'appCode':_0x57b57d[_0x5563f8(0x191)],'env':_0x57b57d[_0x5563f8(0x1c3)]},_0x57b57d);else{if(_0x57b57d['projectCode']){const _0xbff859=await selectSingleAppcode(_0x57b57d[_0x5563f8(0x19a)]);await runCreate({'projectName':_0x57b57d[_0x5563f8(0x180)],'appCode':_0xbff859||undefined,'env':_0x57b57d['env']},_0x57b57d);}else await guidedCreateProject(_0x46d48c=>runCreate(_0x46d48c,_0x57b57d),_0x57b57d[_0x5563f8(0x1c3)],_0x57b57d[_0x5563f8(0x19a)]);}}async function runCreate(_0x25012a,_0x45c374){const _0x238db5=a154_0x127c;if(!_0x25012a[_0x238db5(0x1c6)]||_0x25012a[_0x238db5(0x1c6)][_0x238db5(0x1a1)]()==='')throw new Error(_0x238db5(0x1b4));const _0x1deaaa=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1deaaa[_0x238db5(0x1c1)](_0x25012a[_0x238db5(0x1c6)]))throw new Error(_0x238db5(0x18c));if(_0x25012a[_0x238db5(0x1c6)][_0x238db5(0x183)]>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x290371=a154_0x359673[_0x238db5(0x1ac)](process[_0x238db5(0x197)](),_0x25012a[_0x238db5(0x1c6)]);if(a154_0x2ebb38[_0x238db5(0x190)](_0x290371))throw new Error(_0x238db5(0x1bb)+_0x25012a[_0x238db5(0x1c6)]+_0x238db5(0x17d));try{a154_0x2ebb38[_0x238db5(0x1c2)](a154_0x359673[_0x238db5(0x1c7)](_0x290371),a154_0x2ebb38[_0x238db5(0x1a5)][_0x238db5(0x1d2)]);}catch{throw new Error(_0x238db5(0x181));}logger[_0x238db5(0x1b2)](_0x290371),logger[_0x238db5(0x172)](_0x238db5(0x192),_0x238db5(0x178)+_0x25012a[_0x238db5(0x1c6)],{'projectDir':_0x290371,'appCode':_0x25012a[_0x238db5(0x191)]}),console[_0x238db5(0x19b)](),console[_0x238db5(0x19b)](a154_0x25b015[_0x238db5(0x1ca)](_0x238db5(0x173))+_0x238db5(0x19d)+a154_0x25b015[_0x238db5(0x1ca)](_0x25012a['projectName'])+(_0x25012a[_0x238db5(0x191)]?_0x238db5(0x1cb)+a154_0x25b015[_0x238db5(0x186)](_0x25012a['appCode']):''));try{await runTask(_0x238db5(0x1b1),()=>copyProjectTemplate(_0x25012a[_0x238db5(0x1c6)])),await updatePackageJsonName(_0x25012a['projectName']),await runTask(_0x238db5(0x1cc),()=>installDependencies(_0x25012a[_0x238db5(0x1c6)])),await runTask(_0x238db5(0x1b3),()=>formatProjectCode(_0x25012a[_0x238db5(0x1c6)])),await configureAppCode(_0x25012a['projectName'],_0x25012a['appCode']||'',_0x25012a[_0x238db5(0x1c3)]);let _0x1222d8=![];if(_0x25012a[_0x238db5(0x191)]){console['log'](_0x238db5(0x1a6));const _0x3f41c7=process[_0x238db5(0x197)]();try{process[_0x238db5(0x1a9)](_0x290371);const _0x2698ec=_0x25012a[_0x238db5(0x1c3)]||_0x238db5(0x1d1);initEnv(_0x2698ec);const {configArray:_0x1fae43}=await fetchModelList(_0x25012a[_0x238db5(0x191)],_0x45c374[_0x238db5(0x19a)]||''),_0x106d1e=DEFAULT_API_DIR,_0x21ed1e=await generateApiFile(_0x1fae43,'',_0x25012a[_0x238db5(0x191)],!![],_0x2698ec,_0x106d1e);console[_0x238db5(0x19b)](_0x238db5(0x184)+_0x1fae43['length']+'\x20dataset(s),\x20generated\x20'+_0x21ed1e['modelCount']+_0x238db5(0x1d3)),logger[_0x238db5(0x172)](_0x238db5(0x192),_0x238db5(0x17e)+_0x25012a[_0x238db5(0x191)]);}catch(_0x14514e){_0x1222d8=!![],console[_0x238db5(0x19b)](_0x238db5(0x189)),logger[_0x238db5(0x170)](_0x238db5(0x192),_0x238db5(0x17a),{'error':_0x14514e instanceof Error?_0x14514e[_0x238db5(0x1c8)]:String(_0x14514e)});}finally{process['chdir'](_0x3f41c7);}}logger[_0x238db5(0x1b7)](_0x238db5(0x192),_0x238db5(0x1d4)+_0x25012a[_0x238db5(0x1c6)]),console[_0x238db5(0x19b)](),console[_0x238db5(0x19b)](a154_0x25b015[_0x238db5(0x1ca)]('─'[_0x238db5(0x1aa)](0x3c))),console['log'](a154_0x25b015[_0x238db5(0x186)][_0x238db5(0x194)](_0x238db5(0x1a0))),console[_0x238db5(0x19b)](),console[_0x238db5(0x19b)](_0x238db5(0x199)+a154_0x25b015[_0x238db5(0x186)]['bold'](_0x238db5(0x182)+_0x25012a[_0x238db5(0x1c6)]+_0x238db5(0x1af)+CLI_BIN_NAME+_0x238db5(0x1a3))),_0x1222d8&&console[_0x238db5(0x19b)](_0x238db5(0x1ad)+a154_0x25b015['cyan'][_0x238db5(0x194)](CLI_BIN_NAME+'\x20api\x20pull')),console['log'](a154_0x25b015[_0x238db5(0x1ca)]('─'['repeat'](0x3c)));}catch(_0x33c5e8){logger[_0x238db5(0x18b)](_0x238db5(0x192),'项目创建失败:\x20'+_0x25012a[_0x238db5(0x1c6)],{'error':_0x33c5e8 instanceof Error?_0x33c5e8['message']:String(_0x33c5e8)});try{a154_0x2ebb38[_0x238db5(0x190)](_0x290371)&&(console['log'](_0x238db5(0x1ce)+_0x290371),a154_0x2ebb38[_0x238db5(0x177)](_0x290371,{'recursive':!![],'force':!![]}));}catch{logger[_0x238db5(0x170)](_0x238db5(0x192),_0x238db5(0x16f)+_0x290371);}throw _0x33c5e8;}}async function runTask(_0x48a47b,_0x2f6b98){const _0x1f9dee=a154_0x127c,_0x18367c=a154_0xc62288(_0x48a47b+_0x1f9dee(0x1c9))[_0x1f9dee(0x179)]();try{const _0xaf4697=await _0x2f6b98();_0x18367c['stop'](),console['log'](''+a154_0x25b015[_0x1f9dee(0x1ca)](_0x1f9dee(0x173))+_0x48a47b+'\x20'+a154_0x25b015[_0x1f9dee(0x1c5)]('['+_0xaf4697+']'));}catch(_0x5c7e1d){_0x18367c[_0x1f9dee(0x1ab)](_0x48a47b);throw _0x5c7e1d;}}async function updatePackageJsonName(_0x4a9714){const _0x37042b=a154_0x127c,_0x265968=a154_0x359673[_0x37042b(0x1ac)](process['cwd'](),_0x4a9714),_0x106a6b=a154_0x359673[_0x37042b(0x18e)](_0x265968,_0x37042b(0x1bd));try{console[_0x37042b(0x19b)](_0x37042b(0x1be));const _0x533453=getRabetbaseCliPackageRoot(),_0x2c0ca1=a154_0x359673[_0x37042b(0x18e)](_0x533453,'package.json');let _0x4416b8='1.0.0';try{const _0x5821dd=JSON[_0x37042b(0x171)](a154_0x2ebb38[_0x37042b(0x1a8)](_0x2c0ca1,_0x37042b(0x198)));_0x4416b8=_0x5821dd['version']||_0x37042b(0x18d);}catch{}const _0x105f9d=a154_0x2ebb38[_0x37042b(0x1a8)](_0x106a6b,_0x37042b(0x198)),_0x6bdac4=JSON[_0x37042b(0x171)](_0x105f9d);_0x6bdac4[_0x37042b(0x1b0)]=_0x4a9714,_0x6bdac4[_0x37042b(0x18a)]=_0x4a9714+_0x37042b(0x1cd)+_0x4416b8,a154_0x2ebb38[_0x37042b(0x1a4)](_0x106a6b,JSON[_0x37042b(0x17f)](_0x6bdac4,null,0x2)+'\x0a','utf8'),console[_0x37042b(0x19b)](_0x37042b(0x1b5)+_0x4a9714),logger[_0x37042b(0x172)](_0x37042b(0x192),'更新\x20package.json\x20name');}catch(_0x47b698){logger[_0x37042b(0x18b)]('create',_0x37042b(0x19c));throw _0x47b698;}}async function configureAppCode(_0x55537b,_0x3663cf,_0x104e8c){const _0x2496d3=a154_0x127c,_0x477b88=a154_0x359673['resolve'](process[_0x2496d3(0x197)](),_0x55537b),_0x525348=a154_0x359673['join'](_0x477b88,NEW_CONFIG_NAME);try{_0x3663cf?console[_0x2496d3(0x19b)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x55537b+':\x20'+_0x3663cf):console['log'](_0x2496d3(0x187)+_0x55537b);const _0x2c0c1f=getRabetbaseCliPackageRoot(),_0x520cc1=a154_0x359673[_0x2496d3(0x18e)](_0x2c0c1f,'package.json');let _0x2749ca=_0x2496d3(0x18d);try{const _0x5da8a8=JSON[_0x2496d3(0x171)](a154_0x2ebb38[_0x2496d3(0x1a8)](_0x520cc1,'utf8'));_0x2749ca=_0x5da8a8[_0x2496d3(0x19f)]||_0x2496d3(0x18d);}catch{}const _0x9ab26b=readConfig(),_0x31963f=typeof _0x9ab26b[_0x2496d3(0x1c3)]===_0x2496d3(0x17b)?_0x9ab26b['env']:undefined,_0x50ae48={};for(const _0xb26ec6 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x9ab26b[_0xb26ec6]!=null)_0x50ae48[_0xb26ec6]=_0x9ab26b[_0xb26ec6];}const _0x492654=buildCanonicalProjectConfig(_0x50ae48,{'appCodes':_0x3663cf?[_0x3663cf]:[],'env':_0x104e8c||_0x31963f||_0x2496d3(0x1d1),'metadata':{'createdAt':new Date()[_0x2496d3(0x17c)](),'version':_0x2749ca}});writeConfigFile(_0x525348,_0x492654),_0x3663cf?console[_0x2496d3(0x19b)](_0x2496d3(0x188)+Object[_0x2496d3(0x19e)](_0x492654[_0x2496d3(0x1b9)]||{})['join'](',\x20')+_0x2496d3(0x185)+_0x492654[_0x2496d3(0x1d0)]):console[_0x2496d3(0x19b)](_0x2496d3(0x1a2)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger['info'](_0x2496d3(0x192),'配置应用AppCode:\x20'+_0x3663cf);}catch(_0x548e00){logger[_0x2496d3(0x18b)](_0x2496d3(0x192),_0x2496d3(0x18f));}}function a154_0x46f4(){const _0x521fb8=['trim','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','\x20run\x20start','writeFileSync','constants','*\x20Pulling\x20API\x20configuration...','721536IdZMSw','readFileSync','chdir','repeat','fail','resolve','\x20\x202.\x20Pull\x20API\x20configuration:\x20','minimumVersion','\x20&&\x20','name','Copy\x20project\x20files','setLogPath','Format\x20code','Project\x20name\x20cannot\x20be\x20empty','√\x20package.json\x20updated:\x20name=','currentVersion','success','stableVersion','apps','80YhsEkU','Project\x20directory\x20','1421976zsRARG','package.json','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','8QmQozE','CLI\x20版本检查','test','accessSync','env','3224431dLpbUq','gray','projectName','dirname','message','...','green','\x20|\x20AppCode:\x20','Install\x20dependencies','\x20Generated\x20by\x20rabetbase\x20cli\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','30mIzwXS','defaultApp','production','W_OK','\x20model(s)','项目创建完成:\x20','清理项目目录失败:\x20','warn','parse','info','\x20√\x20','499036OLSZQU','needsUpgrade','belowMinimum','rmSync','开始创建项目:\x20','start','API\x20配置拉取异常','string','toLocaleString','\x20already\x20exists','API\x20configuration\x20pulled:\x20','stringify','projectCode','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','cd\x20','length','√\x20Pulled\x20','\x20|\x20Default:\x20','cyan','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','√\x20Configuration\x20file\x20created,\x20Apps:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','description','error','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','1.0.0','join','配置应用AppCode失败','existsSync','appCode','create','229270UCjtNg','bold','609972MuuSSv','321831dkysEt','cwd','utf8','\x20\x201.\x20Start\x20project:\x20','cookie','log','更新\x20package.json\x20失败','Project\x20name:\x20','keys','version','🚀\x20Next\x20Steps:'];a154_0x46f4=function(){return _0x521fb8;};return a154_0x46f4();}
|
|
1
|
+
(function(_0x4449b9,_0x58cf80){const _0x3f5322=a154_0x4eec,_0x32c246=_0x4449b9();while(!![]){try{const _0x472397=parseInt(_0x3f5322(0x1e0))/0x1*(parseInt(_0x3f5322(0x1d2))/0x2)+-parseInt(_0x3f5322(0x1c8))/0x3*(-parseInt(_0x3f5322(0x1b4))/0x4)+-parseInt(_0x3f5322(0x1d8))/0x5+parseInt(_0x3f5322(0x1a1))/0x6+-parseInt(_0x3f5322(0x19d))/0x7+parseInt(_0x3f5322(0x1bd))/0x8+-parseInt(_0x3f5322(0x185))/0x9;if(_0x472397===_0x58cf80)break;else _0x32c246['push'](_0x32c246['shift']());}catch(_0x166864){_0x32c246['push'](_0x32c246['shift']());}}}(a154_0x166b,0x1cd51));import a154_0x30488c from'path';import a154_0x208f02 from'fs';import a154_0x271594 from'chalk';function a154_0x166b(){const _0x5105a1=['green','配置应用AppCode:\x20','resolve','39248gfDFHg','defaultApp','info','\x20Generated\x20by\x20rabetbase\x20cli\x20','production','580086QtbRqJ','gray','projectCode','更新\x20package.json\x20失败','cyan','accessSync','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','currentVersion','existsSync','constants','fail','API\x20配置拉取异常','env','更新\x20package.json\x20name','parse','error','length','√\x20package.json\x20updated:\x20name=','Project\x20directory\x20','1.0.0','log','项目创建完成:\x20','version','projectName','282499JqPbvX','W_OK','🚀\x20Next\x20Steps:','dirname','62016kjqkyy','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','\x20api\x20pull','join','\x20\x201.\x20Start\x20project:\x20','name','apps','repeat','modelCount','CLI\x20版本检查','appCode','\x20√\x20','stableVersion','description','...','cd\x20','\x20|\x20Default:\x20','message','*\x20Pulling\x20API\x20configuration...','8hfNdhC','\x20dataset(s),\x20generated\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','needsUpgrade','cookie','minimumVersion','utf8','string','create','44696yUiqwq','rmSync','Copy\x20project\x20files','√\x20Pulled\x20','\x20already\x20exists','Project\x20name\x20cannot\x20be\x20empty','setLogPath','stop','清理项目目录失败:\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','test','270939XqArCq','stringify','readFileSync','success','chdir','bold','trim','keys','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','package.json','6KDsAhF','\x20run\x20start','belowMinimum','开始创建项目:\x20','cwd','\x20model(s)','456925VJcraB','Project\x20name:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','warn'];a154_0x166b=function(){return _0x5105a1;};return a154_0x166b();}import a154_0x536b75 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x552237){const _0x4140e8=a154_0x4eec,_0x468f3f=await checkCliVersion();(_0x468f3f[_0x4140e8(0x1b7)]||_0x468f3f[_0x4140e8(0x1d4)])&&(printCliUpgradeWarning(_0x468f3f),assertCliVersionSupported(_0x468f3f),logger[_0x4140e8(0x1e2)](_0x4140e8(0x1bc),_0x4140e8(0x1aa),{'currentVersion':_0x468f3f[_0x4140e8(0x18c)],'stableVersion':_0x468f3f[_0x4140e8(0x1ad)],'minimumVersion':_0x468f3f[_0x4140e8(0x1b9)],'needsUpgrade':_0x468f3f[_0x4140e8(0x1b7)],'belowMinimum':_0x468f3f[_0x4140e8(0x1d4)]}));if(_0x552237['projectCode']&&_0x552237['appCode'])await runCreate({'projectName':_0x552237[_0x4140e8(0x187)],'appCode':_0x552237[_0x4140e8(0x1ab)],'env':_0x552237['env']},_0x552237);else{if(_0x552237[_0x4140e8(0x187)]){const _0x5bc8da=await selectSingleAppcode(_0x552237[_0x4140e8(0x1b8)]);await runCreate({'projectName':_0x552237[_0x4140e8(0x187)],'appCode':_0x5bc8da||undefined,'env':_0x552237['env']},_0x552237);}else await guidedCreateProject(_0x3eb6f5=>runCreate(_0x3eb6f5,_0x552237),_0x552237[_0x4140e8(0x191)],_0x552237[_0x4140e8(0x1b8)]);}}async function runCreate(_0x2cb40c,_0x36efdf){const _0x159e98=a154_0x4eec;if(!_0x2cb40c[_0x159e98(0x19c)]||_0x2cb40c[_0x159e98(0x19c)][_0x159e98(0x1ce)]()==='')throw new Error(_0x159e98(0x1c2));const _0x1904d1=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1904d1[_0x159e98(0x1c7)](_0x2cb40c['projectName']))throw new Error(_0x159e98(0x1d0));if(_0x2cb40c['projectName'][_0x159e98(0x195)]>0x64)throw new Error(_0x159e98(0x1b6));const _0x14c173=a154_0x30488c[_0x159e98(0x1df)](process[_0x159e98(0x1d6)](),_0x2cb40c[_0x159e98(0x19c)]);if(a154_0x208f02[_0x159e98(0x18d)](_0x14c173))throw new Error(_0x159e98(0x197)+_0x2cb40c[_0x159e98(0x19c)]+_0x159e98(0x1c1));try{a154_0x208f02[_0x159e98(0x18a)](a154_0x30488c[_0x159e98(0x1a0)](_0x14c173),a154_0x208f02[_0x159e98(0x18e)][_0x159e98(0x19e)]);}catch{throw new Error(_0x159e98(0x1db));}logger[_0x159e98(0x1c3)](_0x14c173),logger[_0x159e98(0x1e2)](_0x159e98(0x1bc),_0x159e98(0x1d5)+_0x2cb40c[_0x159e98(0x19c)],{'projectDir':_0x14c173,'appCode':_0x2cb40c[_0x159e98(0x1ab)]}),console[_0x159e98(0x199)](),console['log'](a154_0x271594['green']('\x20√\x20')+_0x159e98(0x1d9)+a154_0x271594[_0x159e98(0x1dd)](_0x2cb40c[_0x159e98(0x19c)])+(_0x2cb40c[_0x159e98(0x1ab)]?'\x20|\x20AppCode:\x20'+a154_0x271594['cyan'](_0x2cb40c[_0x159e98(0x1ab)]):''));try{await runTask(_0x159e98(0x1bf),()=>copyProjectTemplate(_0x2cb40c[_0x159e98(0x19c)])),await updatePackageJsonName(_0x2cb40c[_0x159e98(0x19c)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x2cb40c[_0x159e98(0x19c)])),await runTask('Format\x20code',()=>formatProjectCode(_0x2cb40c['projectName'])),await configureAppCode(_0x2cb40c[_0x159e98(0x19c)],_0x2cb40c[_0x159e98(0x1ab)]||'',_0x2cb40c[_0x159e98(0x191)]);let _0x3038ea=![];if(_0x2cb40c[_0x159e98(0x1ab)]){console[_0x159e98(0x199)](_0x159e98(0x1b3));const _0x2d87d3=process[_0x159e98(0x1d6)]();try{process[_0x159e98(0x1cc)](_0x14c173);const _0x3200f7=_0x2cb40c[_0x159e98(0x191)]||_0x159e98(0x1e4);initEnv(_0x3200f7);const {configArray:_0x1b314f}=await fetchModelList(_0x2cb40c[_0x159e98(0x1ab)],_0x36efdf[_0x159e98(0x1b8)]||''),_0x1db400=DEFAULT_API_DIR,_0x256abb=await generateApiFile(_0x1b314f,'',_0x2cb40c[_0x159e98(0x1ab)],!![],_0x3200f7,_0x1db400);console['log'](_0x159e98(0x1c0)+_0x1b314f[_0x159e98(0x195)]+_0x159e98(0x1b5)+_0x256abb[_0x159e98(0x1a9)]+_0x159e98(0x1d7)),logger['info']('create','API\x20configuration\x20pulled:\x20'+_0x2cb40c[_0x159e98(0x1ab)]);}catch(_0x5879f5){_0x3038ea=!![],console['log'](_0x159e98(0x1da)),logger[_0x159e98(0x1dc)](_0x159e98(0x1bc),_0x159e98(0x190),{'error':_0x5879f5 instanceof Error?_0x5879f5['message']:String(_0x5879f5)});}finally{process[_0x159e98(0x1cc)](_0x2d87d3);}}logger[_0x159e98(0x1cb)]('create',_0x159e98(0x19a)+_0x2cb40c['projectName']),console[_0x159e98(0x199)](),console[_0x159e98(0x199)](a154_0x271594[_0x159e98(0x1dd)]('─'[_0x159e98(0x1a8)](0x3c))),console[_0x159e98(0x199)](a154_0x271594['cyan'][_0x159e98(0x1cd)](_0x159e98(0x19f))),console[_0x159e98(0x199)](),console[_0x159e98(0x199)](_0x159e98(0x1a5)+a154_0x271594['cyan']['bold'](_0x159e98(0x1b0)+_0x2cb40c[_0x159e98(0x19c)]+'\x20&&\x20'+CLI_BIN_NAME+_0x159e98(0x1d3))),_0x3038ea&&console[_0x159e98(0x199)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a154_0x271594[_0x159e98(0x189)][_0x159e98(0x1cd)](CLI_BIN_NAME+_0x159e98(0x1a3))),console[_0x159e98(0x199)](a154_0x271594[_0x159e98(0x1dd)]('─'[_0x159e98(0x1a8)](0x3c)));}catch(_0x5b726e){logger[_0x159e98(0x194)](_0x159e98(0x1bc),'项目创建失败:\x20'+_0x2cb40c[_0x159e98(0x19c)],{'error':_0x5b726e instanceof Error?_0x5b726e[_0x159e98(0x1b2)]:String(_0x5b726e)});try{a154_0x208f02['existsSync'](_0x14c173)&&(console[_0x159e98(0x199)](_0x159e98(0x18b)+_0x14c173),a154_0x208f02[_0x159e98(0x1be)](_0x14c173,{'recursive':!![],'force':!![]}));}catch{logger[_0x159e98(0x1dc)](_0x159e98(0x1bc),_0x159e98(0x1c5)+_0x14c173);}throw _0x5b726e;}}function a154_0x4eec(_0xeef159,_0xf4ba95){_0xeef159=_0xeef159-0x185;const _0x166bf1=a154_0x166b();let _0x4eec19=_0x166bf1[_0xeef159];return _0x4eec19;}async function runTask(_0x13762b,_0x1dbcea){const _0x2ed032=a154_0x4eec,_0x3ad87d=a154_0x536b75(_0x13762b+_0x2ed032(0x1af))['start']();try{const _0x3967fb=await _0x1dbcea();_0x3ad87d[_0x2ed032(0x1c4)](),console['log'](''+a154_0x271594['green'](_0x2ed032(0x1ac))+_0x13762b+'\x20'+a154_0x271594[_0x2ed032(0x186)]('['+_0x3967fb+']'));}catch(_0x5cabe1){_0x3ad87d[_0x2ed032(0x18f)](_0x13762b);throw _0x5cabe1;}}async function updatePackageJsonName(_0x5889d0){const _0x37b5d8=a154_0x4eec,_0x30698f=a154_0x30488c['resolve'](process['cwd'](),_0x5889d0),_0x2c3f7a=a154_0x30488c[_0x37b5d8(0x1a4)](_0x30698f,_0x37b5d8(0x1d1));try{console[_0x37b5d8(0x199)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x13b868=getRabetbaseCliPackageRoot(),_0x30d60b=a154_0x30488c['join'](_0x13b868,_0x37b5d8(0x1d1));let _0x11e31b='1.0.0';try{const _0x145960=JSON['parse'](a154_0x208f02[_0x37b5d8(0x1ca)](_0x30d60b,'utf8'));_0x11e31b=_0x145960[_0x37b5d8(0x19b)]||_0x37b5d8(0x198);}catch{}const _0x3dad00=a154_0x208f02[_0x37b5d8(0x1ca)](_0x2c3f7a,_0x37b5d8(0x1ba)),_0x7e385=JSON[_0x37b5d8(0x193)](_0x3dad00);_0x7e385[_0x37b5d8(0x1a6)]=_0x5889d0,_0x7e385[_0x37b5d8(0x1ae)]=_0x5889d0+_0x37b5d8(0x1e3)+_0x11e31b,a154_0x208f02['writeFileSync'](_0x2c3f7a,JSON[_0x37b5d8(0x1c9)](_0x7e385,null,0x2)+'\x0a',_0x37b5d8(0x1ba)),console[_0x37b5d8(0x199)](_0x37b5d8(0x196)+_0x5889d0),logger[_0x37b5d8(0x1e2)](_0x37b5d8(0x1bc),_0x37b5d8(0x192));}catch(_0x43158d){logger[_0x37b5d8(0x194)](_0x37b5d8(0x1bc),_0x37b5d8(0x188));throw _0x43158d;}}async function configureAppCode(_0x39a160,_0x2ba484,_0x2f3981){const _0x4fda52=a154_0x4eec,_0x2397d9=a154_0x30488c[_0x4fda52(0x1df)](process[_0x4fda52(0x1d6)](),_0x39a160),_0x22d55e=a154_0x30488c[_0x4fda52(0x1a4)](_0x2397d9,NEW_CONFIG_NAME);try{_0x2ba484?console[_0x4fda52(0x199)](_0x4fda52(0x1c6)+_0x39a160+':\x20'+_0x2ba484):console['log'](_0x4fda52(0x1a2)+_0x39a160);const _0x4aaf4d=getRabetbaseCliPackageRoot(),_0x4b4b1d=a154_0x30488c[_0x4fda52(0x1a4)](_0x4aaf4d,_0x4fda52(0x1d1));let _0x32f097=_0x4fda52(0x198);try{const _0x4dfa6b=JSON[_0x4fda52(0x193)](a154_0x208f02[_0x4fda52(0x1ca)](_0x4b4b1d,'utf8'));_0x32f097=_0x4dfa6b['version']||_0x4fda52(0x198);}catch{}const _0x304b86=readConfig(),_0x379b82=typeof _0x304b86['env']===_0x4fda52(0x1bb)?_0x304b86['env']:undefined,_0x11a379={};for(const _0x533e47 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x304b86[_0x533e47]!=null)_0x11a379[_0x533e47]=_0x304b86[_0x533e47];}const _0x4eec22=buildCanonicalProjectConfig(_0x11a379,{'appCodes':_0x2ba484?[_0x2ba484]:[],'env':_0x2f3981||_0x379b82||_0x4fda52(0x1e4),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x32f097}});writeConfigFile(_0x22d55e,_0x4eec22),_0x2ba484?console[_0x4fda52(0x199)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x4fda52(0x1cf)](_0x4eec22[_0x4fda52(0x1a7)]||{})[_0x4fda52(0x1a4)](',\x20')+_0x4fda52(0x1b1)+_0x4eec22[_0x4fda52(0x1e1)]):console[_0x4fda52(0x199)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0x4fda52(0x1e2)](_0x4fda52(0x1bc),_0x4fda52(0x1de)+_0x2ba484);}catch(_0x2165ca){logger['error'](_0x4fda52(0x1bc),'配置应用AppCode失败');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a155_0x3e28(_0x2ec4d7,_0x533f3b){_0x2ec4d7=_0x2ec4d7-0x177;const _0x58e535=a155_0x58e5();let _0x3e28c0=_0x58e535[_0x2ec4d7];return _0x3e28c0;}(function(_0x39a243,_0x1966dc){const _0x40209e=a155_0x3e28,_0x2cbf96=_0x39a243();while(!![]){try{const _0x1ccba2=parseInt(_0x40209e(0x19f))/0x1*(-parseInt(_0x40209e(0x17c))/0x2)+parseInt(_0x40209e(0x17b))/0x3+parseInt(_0x40209e(0x1a1))/0x4+parseInt(_0x40209e(0x1a9))/0x5+parseInt(_0x40209e(0x187))/0x6*(parseInt(_0x40209e(0x19d))/0x7)+parseInt(_0x40209e(0x1af))/0x8*(-parseInt(_0x40209e(0x198))/0x9)+-parseInt(_0x40209e(0x192))/0xa;if(_0x1ccba2===_0x1966dc)break;else _0x2cbf96['push'](_0x2cbf96['shift']());}catch(_0x355f75){_0x2cbf96['push'](_0x2cbf96['shift']());}}}(a155_0x58e5,0xc03eb));import a155_0x5cc30f from'path';import a155_0x27ee9a from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x592b06,_0x1c57d1,_0x315614,_0x1bbd73){const _0x15c4ea=a155_0x3e28,_0x2a5f95=await checkCliVersion();(_0x2a5f95[_0x15c4ea(0x1ad)]||_0x2a5f95[_0x15c4ea(0x18b)])&&(printCliUpgradeWarning(_0x2a5f95),assertCliVersionSupported(_0x2a5f95));if(!_0x592b06||_0x592b06[_0x15c4ea(0x1aa)]()==='')throw CliErrors[_0x15c4ea(0x17e)](_0x15c4ea(0x1b1));const _0x475fae=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x475fae['test'](_0x592b06))throw CliErrors[_0x15c4ea(0x17e)](_0x15c4ea(0x1a3),_0x15c4ea(0x183));if(_0x592b06[_0x15c4ea(0x181)]>0x64)throw CliErrors[_0x15c4ea(0x17e)](_0x15c4ea(0x177));const _0x41d8f2=a155_0x5cc30f[_0x15c4ea(0x179)](process[_0x15c4ea(0x195)](),_0x592b06);if(existsSync(_0x41d8f2))throw CliErrors[_0x15c4ea(0x17e)](_0x15c4ea(0x191)+_0x592b06+_0x15c4ea(0x1a8),_0x15c4ea(0x186));try{const _0x1a3fb8=a155_0x5cc30f[_0x15c4ea(0x1ac)](_0x41d8f2);await a155_0x27ee9a[_0x15c4ea(0x19e)](_0x1a3fb8,a155_0x27ee9a[_0x15c4ea(0x18f)][_0x15c4ea(0x19b)]);}catch{throw CliErrors['validation'](_0x15c4ea(0x1a2),'Check\x20directory\x20permissions.');}try{console[_0x15c4ea(0x17a)]('*\x20Creating\x20project\x20'+_0x592b06+_0x15c4ea(0x18e));const _0x19cabd=getSubAppReactDemoTemplateDir();await copyDirectory(_0x19cabd,_0x41d8f2),console[_0x15c4ea(0x17a)](_0x15c4ea(0x1a6)),await updatePackageJsonName(_0x592b06),console['log'](_0x15c4ea(0x19a)),console[_0x15c4ea(0x17a)](_0x15c4ea(0x189)),console[_0x15c4ea(0x17a)](_0x15c4ea(0x194)),await formatCode(_0x41d8f2),console['log']('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x592b06,_0x315614,_0x1c57d1),console[_0x15c4ea(0x17a)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x315614&&await pullApiConfig(_0x41d8f2,_0x315614,_0x1c57d1,_0x1bbd73),console[_0x15c4ea(0x17a)](_0x15c4ea(0x1ae)+_0x592b06+_0x15c4ea(0x18a)),console[_0x15c4ea(0x17a)]('\x0a\x20\x20cd\x20'+_0x592b06),console['log'](_0x15c4ea(0x1a5));}catch(_0x503127){try{existsSync(_0x41d8f2)&&await a155_0x27ee9a['rm'](_0x41d8f2,{'recursive':!![],'force':!![]});}catch{}throw _0x503127;}}async function updatePackageJsonName(_0x1a031d){const _0x378eb3=a155_0x3e28,_0x3b9ce7=a155_0x5cc30f[_0x378eb3(0x179)](process[_0x378eb3(0x195)](),_0x1a031d),_0x32f73d=a155_0x5cc30f[_0x378eb3(0x185)](_0x3b9ce7,_0x378eb3(0x180)),_0x4c7a87=await a155_0x27ee9a[_0x378eb3(0x184)](_0x32f73d,_0x378eb3(0x178)),_0x5099bb=JSON['parse'](_0x4c7a87);_0x5099bb[_0x378eb3(0x18d)]=_0x1a031d,_0x5099bb[_0x378eb3(0x193)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a155_0x27ee9a[_0x378eb3(0x17d)](_0x32f73d,JSON[_0x378eb3(0x17f)](_0x5099bb,null,0x2)+'\x0a');}function detectPackageManager(){const _0xa1f524=a155_0x3e28;try{return execSync(_0xa1f524(0x18c),{'stdio':'ignore'}),_0xa1f524(0x1ab);}catch{return _0xa1f524(0x19c);}}async function formatCode(_0x1fe4a6){const _0x41ebb=a155_0x3e28;try{await execAsync(_0x41ebb(0x196),{'cwd':_0x1fe4a6});}catch{}}async function configureProject(_0x8be27f,_0xd7fbf8,_0x17310a){const _0x45d729=a155_0x3e28,_0x3fb0a0=a155_0x5cc30f[_0x45d729(0x179)](process[_0x45d729(0x195)](),_0x8be27f),_0x248bcf=a155_0x5cc30f[_0x45d729(0x185)](_0x3fb0a0,NEW_CONFIG_NAME),_0x5cc7ad=readConfig(),_0x45f063=typeof _0x5cc7ad['env']===_0x45d729(0x1a4)?_0x5cc7ad['env']:undefined,_0x52bf8e={};for(const _0x37d7ba of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x5cc7ad[_0x37d7ba]!=null)_0x52bf8e[_0x37d7ba]=_0x5cc7ad[_0x37d7ba];}const _0x3469c7=buildCanonicalProjectConfig(_0x52bf8e,{'appCodes':_0xd7fbf8?[_0xd7fbf8]:[],'env':_0x17310a||_0x45f063||_0x45d729(0x190),'metadata':{'createdAt':new Date()[_0x45d729(0x1a0)](),'version':getCliVersion()}});writeConfigFile(_0x248bcf,_0x3469c7);}async function pullApiConfig(_0x2fa054,_0x3845e7,_0x44b466,_0x5183e3){const _0xd89003=a155_0x3e28,_0x1a7fdc=process[_0xd89003(0x195)]();try{process['chdir'](_0x2fa054);const _0x13da94=_0x44b466||_0xd89003(0x190);initEnv(_0x13da94),console[_0xd89003(0x17a)](_0xd89003(0x1a7));const {configArray:_0x1c3173}=await fetchModelList(_0x3845e7,_0x5183e3||''),_0x3a4fe3=await generateApiFile(_0x1c3173,'',_0x3845e7,!![],_0x13da94,DEFAULT_API_DIR);console[_0xd89003(0x17a)](_0xd89003(0x199)+_0x1c3173[_0xd89003(0x181)]+'\x20dataset(s),\x20generated\x20'+_0x3a4fe3[_0xd89003(0x197)]+'\x20model(s)');}catch(_0x2028f4){console[_0xd89003(0x17a)](_0xd89003(0x1b0)+CLI_BIN_NAME+_0xd89003(0x182));}finally{process[_0xd89003(0x188)](_0x1a7fdc);}}function a155_0x58e5(){const _0x4be5e6=['needsUpgrade','\x0a√\x20Project\x20','24CqBdTv','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','Project\x20name\x20cannot\x20be\x20empty.','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','utf-8','resolve','log','2771292BTAXwr','2aSDFPa','writeFile','validation','stringify','package.json','length','\x20api\x20pull`\x20manually\x20later.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','readFile','join','Use\x20a\x20different\x20project\x20name.','18azHtuf','chdir','\x20\x20Installing\x20dependencies...','\x20created\x20successfully!','belowMinimum','bun\x20--version','name','...','constants','production','Project\x20directory\x20\x22','4028450envbRX','description','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','cwd','bun\x20run\x20format','modelCount','4448403XGJYaz','\x20\x20√\x20Pulled\x20','\x20\x20√\x20package.json\x20updated','W_OK','npm','1944607IBWbEF','access','558758exxHjZ','toLocaleString','5270476foGRHC','Cannot\x20create\x20project\x20in\x20current\x20directory.','Project\x20name\x20contains\x20invalid\x20characters.','string','\x20\x20rabetbase\x20run\x20start\x0a','\x20\x20√\x20Project\x20template\x20created','\x20\x20Pulling\x20API\x20configuration...','\x22\x20already\x20exists.','785265btEwVk','trim','bun','dirname'];a155_0x58e5=function(){return _0x4be5e6;};return a155_0x58e5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x127d3d,_0x4ccb3b){const _0x1bb594=a156_0x5110,_0x1b6ed7=_0x127d3d();while(!![]){try{const _0x3bd001=parseInt(_0x1bb594(0xdd))/0x1+parseInt(_0x1bb594(0xdf))/0x2+parseInt(_0x1bb594(0xdc))/0x3+-parseInt(_0x1bb594(0xde))/0x4*(-parseInt(_0x1bb594(0xe3))/0x5)+-parseInt(_0x1bb594(0xe0))/0x6+-parseInt(_0x1bb594(0xdb))/0x7*(parseInt(_0x1bb594(0xd9))/0x8)+-parseInt(_0x1bb594(0xda))/0x9;if(_0x3bd001===_0x4ccb3b)break;else _0x1b6ed7['push'](_0x1b6ed7['shift']());}catch(_0x8ddea6){_0x1b6ed7['push'](_0x1b6ed7['shift']());}}}(a156_0x139a,0x780d5));import a156_0x17b0df from'node:path';function a156_0x5110(_0x143ebc,_0x1e3d0d){_0x143ebc=_0x143ebc-0xd9;const _0x139ae1=a156_0x139a();let _0x511026=_0x139ae1[_0x143ebc];return _0x511026;}function a156_0x139a(){const _0x17f5ab=['sub-app-react-demo','../../../../','639550JQNxEW','projects','resolve','5128hdETvK','7726644hQpzdZ','8701AorMSn','1642572LXzHzU','879029oXkxss','28CqwJjV','762044xFyipI','3335598GMKYQw'];a156_0x139a=function(){return _0x17f5ab;};return a156_0x139a();}import{fileURLToPath}from'node:url';const __dirname=a156_0x17b0df['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x123257=a156_0x5110;return a156_0x17b0df[_0x123257(0xe5)](__dirname,_0x123257(0xe2));}export function getSubAppReactDemoTemplateDir(){const _0x48667e=a156_0x5110;return a156_0x17b0df['join'](getRabetbaseCliPackageRoot(),'templates',_0x48667e(0xe4),_0x48667e(0xe1));}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copyProjectTemplate(projectCode: string): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xe9205a,_0x3675ae){const _0x65e7e5=a157_0x479b,_0x181ef2=_0xe9205a();while(!![]){try{const _0x128f47=-parseInt(_0x65e7e5(0x8f))/0x1*(-parseInt(_0x65e7e5(0x88))/0x2)+-parseInt(_0x65e7e5(0x90))/0x3*(-parseInt(_0x65e7e5(0x94))/0x4)+parseInt(_0x65e7e5(0x86))/0x5+parseInt(_0x65e7e5(0x91))/0x6+parseInt(_0x65e7e5(0x8a))/0x7+parseInt(_0x65e7e5(0x93))/0x8+parseInt(_0x65e7e5(0x82))/0x9*(-parseInt(_0x65e7e5(0x85))/0xa);if(_0x128f47===_0x3675ae)break;else _0x181ef2['push'](_0x181ef2['shift']());}catch(_0x12c08f){_0x181ef2['push'](_0x181ef2['shift']());}}}(a157_0x379b,0x2468f));import a157_0x173cbd from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x3f676e){const _0x4d5258=a157_0x479b,_0x4344b5=Date[_0x4d5258(0x84)](),_0x323125=a157_0x173cbd[_0x4d5258(0x92)](process[_0x4d5258(0x95)](),_0x3f676e);try{logger[_0x4d5258(0x8b)]('copy',_0x4d5258(0x87),{'projectCode':_0x3f676e,'templateDir':templateDir}),await copyDirectory(templateDir,_0x323125);const _0x56aad8=Date[_0x4d5258(0x84)]()-_0x4344b5;logger[_0x4d5258(0x83)](_0x4d5258(0x8c),_0x4d5258(0x81),_0x56aad8,{'projectCode':_0x3f676e});}catch(_0x23e353){const _0x1bebf6=Date['now']()-_0x4344b5;logger[_0x4d5258(0x89)](_0x4d5258(0x8c),_0x4d5258(0x8d),{'projectCode':_0x3f676e,'error':_0x23e353 instanceof Error?_0x23e353[_0x4d5258(0x8e)]:String(_0x23e353),'duration':_0x1bebf6});throw _0x23e353;}return formatElapsed(_0x4344b5);}function a157_0x479b(_0x784afd,_0xd14afd){_0x784afd=_0x784afd-0x81;const _0x379b75=a157_0x379b();let _0x479bf9=_0x379b75[_0x784afd];return _0x479bf9;}function a157_0x379b(){const _0xde4dd1=['项目模板复制失败','message','337nvbOCc','2637Tmjcjt','161526wPrimj','resolve','348968AJHRLV','1092fqaqCl','cwd','项目模板复制完成','333qFJVTY','success','now','86740QDEMzs','400680KLfvwU','开始复制项目模板','120pqJAzj','error','414456ofmAzR','info','copy'];a157_0x379b=function(){return _0xde4dd1;};return a157_0x379b();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatProjectCode(projectCode: string): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ea891,_0x397131){const _0x131870=a158_0x14f8,_0x49fb96=_0x3ea891();while(!![]){try{const _0x5c5f24=parseInt(_0x131870(0x145))/0x1+-parseInt(_0x131870(0x143))/0x2+-parseInt(_0x131870(0x142))/0x3*(parseInt(_0x131870(0x140))/0x4)+parseInt(_0x131870(0x14a))/0x5*(-parseInt(_0x131870(0x146))/0x6)+parseInt(_0x131870(0x148))/0x7+parseInt(_0x131870(0x149))/0x8*(-parseInt(_0x131870(0x13d))/0x9)+parseInt(_0x131870(0x13e))/0xa;if(_0x5c5f24===_0x397131)break;else _0x49fb96['push'](_0x49fb96['shift']());}catch(_0x1fda4f){_0x49fb96['push'](_0x49fb96['shift']());}}}(a158_0x4a81,0xe4d08));import a158_0x1abb12 from'node:path';import{execa}from'execa';function a158_0x14f8(_0x2676be,_0xc692a2){_0x2676be=_0x2676be-0x13c;const _0x4a81ea=a158_0x4a81();let _0x14f82a=_0x4a81ea[_0x2676be];return _0x14f82a;}function a158_0x4a81(){const _0x4e299c=['format','resolve','cwd','npx','代码格式化完成','13643739nsXBCd','39574150pLCvgr','now','65948AjUeKG','info','303wMmIWM','3625870KDIFcr','开始格式化代码','1413254RaUden','31644IHzdgW','message','10052924qlLuCS','8OODTwS','830GvULSn'];a158_0x4a81=function(){return _0x4e299c;};return a158_0x4a81();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x3c44a8){const _0x570603=a158_0x14f8,_0x528b19=Date[_0x570603(0x13f)](),_0x18a2e3=a158_0x1abb12[_0x570603(0x14c)](process[_0x570603(0x14d)](),_0x3c44a8);try{logger[_0x570603(0x141)](_0x570603(0x14b),_0x570603(0x144),{'projectCode':_0x3c44a8}),await execa(resolveNpmBin(_0x570603(0x14e)),['prettier','--write','.'],{'cwd':_0x18a2e3});const _0x4b61e3=Date['now']()-_0x528b19;logger['success']('format',_0x570603(0x13c),_0x4b61e3,{'projectCode':_0x3c44a8});}catch(_0x526b33){const _0x4c76f3=Date['now']()-_0x528b19;logger['error'](_0x570603(0x14b),'代码格式化失败',{'projectCode':_0x3c44a8,'error':_0x526b33 instanceof Error?_0x526b33[_0x570603(0x147)]:String(_0x526b33),'duration':_0x4c76f3});throw _0x526b33;}return formatElapsed(_0x528b19);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function installDependencies(projectCode: string): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x378a3e,_0x4e86fe){const _0x4d368f=a159_0x3c35,_0x549233=_0x378a3e();while(!![]){try{const _0x3f0361=-parseInt(_0x4d368f(0x138))/0x1+-parseInt(_0x4d368f(0x13e))/0x2*(parseInt(_0x4d368f(0x13c))/0x3)+parseInt(_0x4d368f(0x13f))/0x4+-parseInt(_0x4d368f(0x135))/0x5+-parseInt(_0x4d368f(0x13d))/0x6+parseInt(_0x4d368f(0x134))/0x7+parseInt(_0x4d368f(0x140))/0x8;if(_0x3f0361===_0x4e86fe)break;else _0x549233['push'](_0x549233['shift']());}catch(_0x4556e4){_0x549233['push'](_0x549233['shift']());}}}(a159_0x7071,0xd2677));import a159_0xeaca24 from'node:path';import{execa}from'execa';function a159_0x3c35(_0x1904b2,_0x5c1497){_0x1904b2=_0x1904b2-0x134;const _0x7071e5=a159_0x7071();let _0x3c35e6=_0x7071e5[_0x1904b2];return _0x3c35e6;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x4b5886){const _0x45cd5a=a159_0x3c35,_0x3773ea=Date[_0x45cd5a(0x143)](),_0x19b1c1=a159_0xeaca24[_0x45cd5a(0x136)](process['cwd'](),_0x4b5886);try{logger[_0x45cd5a(0x139)](_0x45cd5a(0x141),_0x45cd5a(0x13a),{'projectCode':_0x4b5886,'registry':_0x45cd5a(0x13b)}),await execa(resolveNpmBin('npm'),[_0x45cd5a(0x141),'--registry',_0x45cd5a(0x13b)],{'cwd':_0x19b1c1});const _0x11f171=Date[_0x45cd5a(0x143)]()-_0x3773ea;logger['success'](_0x45cd5a(0x141),_0x45cd5a(0x142),_0x11f171,{'projectCode':_0x4b5886});}catch(_0x33c27e){const _0x90a18a=Date[_0x45cd5a(0x143)]()-_0x3773ea;logger['error'](_0x45cd5a(0x141),'依赖安装失败',{'projectCode':_0x4b5886,'error':_0x33c27e instanceof Error?_0x33c27e[_0x45cd5a(0x137)]:String(_0x33c27e),'duration':_0x90a18a});throw _0x33c27e;}return formatElapsed(_0x3773ea);}function a159_0x7071(){const _0x18ce74=['resolve','message','1264852gfZEeu','info','开始安装依赖','https://registry.npmmirror.com','3evuKxP','1070142ZLlGKD','2528910epZVYp','4624796TImOfG','20987816vKXBiP','install','依赖安装完成','now','4707101WbtLze','4413200JKQxCu'];a159_0x7071=function(){return _0x18ce74;};return a159_0x7071();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a160_0x3030fa=a160_0x2f2f;(function(_0x1e5374,_0x20a8ef){const _0x187586=a160_0x2f2f,_0x109e94=_0x1e5374();while(!![]){try{const _0x352cac=parseInt(_0x187586(0x19e))/0x1*(parseInt(_0x187586(0x19a))/0x2)+parseInt(_0x187586(0x198))/0x3*(parseInt(_0x187586(0x1b0))/0x4)+-parseInt(_0x187586(0x1a9))/0x5+-parseInt(_0x187586(0x197))/0x6+-parseInt(_0x187586(0x1b3))/0x7*(-parseInt(_0x187586(0x1a4))/0x8)+parseInt(_0x187586(0x1a8))/0x9*(parseInt(_0x187586(0x1a0))/0xa)+parseInt(_0x187586(0x1af))/0xb*(parseInt(_0x187586(0x1ac))/0xc);if(_0x352cac===_0x20a8ef)break;else _0x109e94['push'](_0x109e94['shift']());}catch(_0x184e55){_0x109e94['push'](_0x109e94['shift']());}}}(a160_0x11c9,0x6d9ac));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a160_0x2f2f(_0x116c2a,_0x10f23d){_0x116c2a=_0x116c2a-0x195;const _0x11c9d8=a160_0x11c9();let _0x2f2fd4=_0x11c9d8[_0x116c2a];return _0x2f2fd4;}const createFlags=[{'name':a160_0x3030fa(0x1b9),'type':'string','description':a160_0x3030fa(0x1b2)},{'name':a160_0x3030fa(0x1a2),'type':a160_0x3030fa(0x1a3),'description':a160_0x3030fa(0x199)},{'name':a160_0x3030fa(0x19c),'type':'string','description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a160_0x3030fa(0x1ad),'type':'boolean','description':a160_0x3030fa(0x1a7),'default':![]}];export const projectDefinitions=[{'service':'project','command':a160_0x3030fa(0x1a5),'description':'Create\x20a\x20new\x20project','risk':a160_0x3030fa(0x1b4),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a160_0x3030fa(0x1ab),'description':a160_0x3030fa(0x1b5),'required':![]}],'flags':createFlags,async 'execute'(_0x5079ed){const _0x49a604=a160_0x3030fa,{createApp:_0x38374c}=await import(_0x49a604(0x1a1)),{createProjectNonInteractive:_0x56d023}=await import(_0x49a604(0x1a6)),_0x41fb32=_0x5079ed[_0x49a604(0x1ae)](_0x49a604(0x1b9))[_0x49a604(0x19d)]()||_0x5079ed[_0x49a604(0x1b8)][0x0]?.[_0x49a604(0x19d)](),_0x2fb792=_0x5079ed['str'](_0x49a604(0x1a2))||undefined,_0x5856ae=_0x5079ed[_0x49a604(0x1ae)](_0x49a604(0x19c))||undefined;if(_0x5079ed[_0x49a604(0x195)]){if(!_0x41fb32)throw CliErrors['validation'](_0x49a604(0x196),_0x49a604(0x19f)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x56d023(_0x41fb32,_0x2fb792,_0x5856ae,_0x5079ed[_0x49a604(0x19b)]);}else await _0x38374c({'projectCode':_0x41fb32,'appCode':_0x5856ae,'env':_0x2fb792,'cookie':_0x5079ed['cookie']});return{'ok':!![]};}},{'service':a160_0x3030fa(0x1b7),'command':a160_0x3030fa(0x1aa),'description':a160_0x3030fa(0x1b1),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5d5a71){const _0xa165ff=a160_0x3030fa;return await upgradeApp(_0x5d5a71[_0xa165ff(0x195)],{'yes':_0x5d5a71[_0xa165ff(0x1b6)](_0xa165ff(0x1ad))}),{'ok':!![]};}}];function a160_0x11c9(){const _0x1e246f=['6092YIUmkh','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Project\x20name','458255UurCYR','write','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','bool','project','args','name','nonInteractive','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','2852766DMybGb','321MSaIwV','Target\x20environment','28942wETYOj','cookie','appcode','trim','1eeaeEL','Usage:\x20','1110UCfgQI','../../commands/project/create/main.js','env','string','40fbzBfl','create','../../commands/project/create/non-interactive.js','Skip\x20confirmation\x20prompt','15264yglgqG','3961600cFUtnU','upgrade','project-name','62676XYqDbs','yes','str','2156cHdvLN'];a160_0x11c9=function(){return _0x1e246f;};return a160_0x11c9();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function upgradeApp(nonInteractive: boolean, flags: Record<string, any>): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x327969,_0x348e92){const _0x37ed14=a161_0x6f84,_0x4f41ba=_0x327969();while(!![]){try{const _0x3901c4=parseInt(_0x37ed14(0x1fc))/0x1*(-parseInt(_0x37ed14(0x1a2))/0x2)+parseInt(_0x37ed14(0x1ac))/0x3*(parseInt(_0x37ed14(0x1d8))/0x4)+parseInt(_0x37ed14(0x19f))/0x5+parseInt(_0x37ed14(0x1f4))/0x6+parseInt(_0x37ed14(0x213))/0x7+parseInt(_0x37ed14(0x1a1))/0x8*(parseInt(_0x37ed14(0x1f3))/0x9)+parseInt(_0x37ed14(0x1cc))/0xa*(-parseInt(_0x37ed14(0x214))/0xb);if(_0x3901c4===_0x348e92)break;else _0x4f41ba['push'](_0x4f41ba['shift']());}catch(_0x2a1d55){_0x4f41ba['push'](_0x4f41ba['shift']());}}}(a161_0x63d9,0x62ec4));import a161_0xac24f8 from'chalk';import a161_0x4414e5 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';function a161_0x63d9(){const _0x2bdac7=['Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','error','Skill\x20swap:','no\x20legacy\x20config\x20found','\x20\x20Fields\x20to\x20migrate:\x20','fail','message','[\x22@lovrabet/sdk\x22]:\x20','\x20\x20npm\x20install','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','object','\x20\x20Step\x20','oldMcpConfig','\x20→\x20latest','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','inherit','none\x20found','\x20→\x20','stringify','undefined','skipped','files','1067101EGRswu','99hdFKsD','Config\x20migration','\x20\x20\x20\x20\x20\x20\x20','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','3073180GkaKzI','succeed','904ZWjeQp','182sdYnQO','Legacy\x20artifacts:','done','FAIL','white','.bak','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','Remove\x20.lovrabet/','Step\x204/7:\x20MCP\x20config\x20—\x20','string','57927HYUSnO','latest','Step\x205/7:\x20Removing\x20old\x20skill...','sdkUpgrade','Upgrade\x20cancelled.','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','Step\x201/7:\x20Migrating\x20config...','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','oldPath','Clean\x20MCP\x20config','devDependencies','isArray','start','path','length','log','Remove\x20old\x20skill','no\x20legacy\x20entry','keys','\x20\x20#\x20or','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','failed','no\x20matching\x20entry\x20found','bold','dependencies','needed','\x20\x20New\x20config\x20(.rabetbase.json):\x20','\x20removed','Upgrade\x20@lovrabet/sdk','cwd','.cursor/mcp.json','info','432750HceoqJ','utf8','mcpServers','@lovrabet/sdk','\x20removed\x20(','MCP\x20config:','FOUND','detail','already\x20exists\x20(will\x20merge)','args','needsSkillSwap','gray','4iBTxzH','entries','fields','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','CANCEL','label','not\x20needed','cyan','Step\x206/7:\x20Installing\x20new\x20skill...','Config\x20file:','\x20→\x20keys:\x20','join','parse','oldArtifacts','\x20\x20bun\x20install','red','@lovrabet/dataset-mcp-server','.lovrabet','push','step','\x20\x20Current\x20version\x20in\x20','exit\x20','yellow','green','hasNewConfig','includes','@lovrabet/sdk:','15885GIeCkw','3510906dvUiTr','isDirectory','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Install\x20new\x20skill','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Upgrade\x20completed\x20successfully!','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','.claude/skills/lovrabet','8531moyqcw'];a161_0x63d9=function(){return _0x2bdac7;};return a161_0x63d9();}import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x399470=>_0x399470!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x6fd3d){const _0x11977d=a161_0x6f84,_0x3a0e7d=[];for(const _0x49d0b6 of Object['values'](CORE_IDE_CONFIGS)){if(_0x49d0b6[_0x11977d(0x212)])for(const _0x53049a of _0x49d0b6[_0x11977d(0x212)]){_0x3a0e7d['push'](resolve(_0x6fd3d,_0x53049a[_0x11977d(0x1b9)]));}}return _0x3a0e7d;}function analyse(_0x2f659b){const _0x2616f0=a161_0x6f84;let _0x14dae3=null;const _0x2b0a96=resolve(_0x2f659b,NEW_CONFIG_NAME),_0x4072ab=existsSync(_0x2b0a96);for(const _0x492f4a of LEGACY_CONFIG_NAMES){const _0x591c19=resolve(_0x2f659b,_0x492f4a);if(existsSync(_0x591c19)){const _0x566155=readConfigFile(_0x591c19),_0x53b97e=Object[_0x2616f0(0x1be)](_0x566155)['filter'](_0x4b5bb0=>typeof _0x566155[_0x4b5bb0]!==_0x2616f0(0x210));_0x14dae3={'oldPath':_0x591c19,'hasNewConfig':_0x4072ab,'fields':_0x53b97e};break;}}const _0x54b026=[],_0x2f397c=resolve(_0x2f659b,_0x2616f0(0x1e9));if(existsSync(_0x2f397c))_0x54b026[_0x2616f0(0x1ea)](_0x2f397c);const _0x4b368f=resolve(_0x2f659b,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x4b368f))_0x54b026['push'](_0x4b368f);const _0x16cdac=resolve(_0x2f659b,_0x2616f0(0x1fb));if(existsSync(_0x16cdac))_0x54b026[_0x2616f0(0x1ea)](_0x16cdac);for(const _0x434fbb of collectIdeSkillFiles(_0x2f659b)){if(existsSync(_0x434fbb))_0x54b026['push'](_0x434fbb);}let _0x29fba9=null;const _0x369cb8=resolve(_0x2f659b,_0x2616f0(0x1ca));if(existsSync(_0x369cb8))try{const _0x8cd2a5=JSON[_0x2616f0(0x1e4)](readFileSync(_0x369cb8,'utf8'));if(_0x8cd2a5?.[_0x2616f0(0x1ce)]&&typeof _0x8cd2a5[_0x2616f0(0x1ce)]===_0x2616f0(0x207)){const _0x12d27b=[];for(const [_0x5702a2,_0x20c003]of Object[_0x2616f0(0x1d9)](_0x8cd2a5[_0x2616f0(0x1ce)])){const _0x29fde1=_0x20c003;_0x29fde1?.[_0x2616f0(0x1d5)]&&Array[_0x2616f0(0x1b7)](_0x29fde1[_0x2616f0(0x1d5)])&&_0x29fde1[_0x2616f0(0x1d5)]['some'](_0x266f26=>typeof _0x266f26===_0x2616f0(0x1ab)&&_0x266f26[_0x2616f0(0x1f1)](_0x2616f0(0x1e8)))&&_0x12d27b[_0x2616f0(0x1ea)](_0x5702a2);}_0x12d27b['length']>0x0&&(_0x29fba9={'path':_0x369cb8,'keys':_0x12d27b});}}catch{}const _0x72d114=_0x54b026[_0x2616f0(0x1ba)]>0x0||_0x14dae3!==null;let _0x1373a8=null;const _0x40cbd9=resolve(_0x2f659b,'package.json');if(existsSync(_0x40cbd9))try{const _0x4c0111=JSON[_0x2616f0(0x1e4)](readFileSync(_0x40cbd9,_0x2616f0(0x1cd)));for(const _0x200c3c of[_0x2616f0(0x1c4),_0x2616f0(0x1b6)]){const _0x3940b0=_0x4c0111?.[_0x200c3c]?.[_0x2616f0(0x1cf)];if(typeof _0x3940b0===_0x2616f0(0x1ab)){_0x3940b0!==_0x2616f0(0x1ad)&&(_0x1373a8={'pkgPath':_0x40cbd9,'currentVersion':_0x3940b0,'field':_0x200c3c});break;}}}catch{}return{'configMigration':_0x14dae3,'oldArtifacts':_0x54b026,'oldMcpConfig':_0x29fba9,'needsSkillSwap':_0x72d114,'sdkUpgrade':_0x1373a8};}function printReport(_0x3a1294){const _0x268fed=a161_0x6f84,{configMigration:_0x5489ee,oldArtifacts:_0x548d0b,oldMcpConfig:_0x205023,needsSkillSwap:_0x245ed5}=_0x3a1294;console[_0x268fed(0x1bb)](''),console['log'](a161_0xac24f8[_0x268fed(0x1c3)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x268fed(0x1bb)]('');_0x5489ee?(console[_0x268fed(0x1bb)](a161_0xac24f8[_0x268fed(0x1df)](_0x268fed(0x1e1))+('\x20\x20'+a161_0xac24f8[_0x268fed(0x1ee)](_0x5489ee['oldPath']))),console['log'](_0x268fed(0x1c6)+(_0x5489ee['hasNewConfig']?a161_0xac24f8[_0x268fed(0x1ef)](_0x268fed(0x1d4)):a161_0xac24f8[_0x268fed(0x1d7)]('not\x20found\x20(will\x20create)'))),console[_0x268fed(0x1bb)](_0x268fed(0x201)+_0x5489ee[_0x268fed(0x1da)][_0x268fed(0x1e3)](',\x20')),console[_0x268fed(0x1bb)](_0x268fed(0x1f8))):console['log'](a161_0xac24f8[_0x268fed(0x1df)]('Config\x20file:')+'\x20\x20'+a161_0xac24f8[_0x268fed(0x1d7)](_0x268fed(0x200)));console[_0x268fed(0x1bb)]('');if(_0x548d0b[_0x268fed(0x1ba)]>0x0){console[_0x268fed(0x1bb)](a161_0xac24f8[_0x268fed(0x1df)]('Legacy\x20artifacts:'));for(const _0x1060a7 of _0x548d0b){console['log']('\x20\x20'+a161_0xac24f8['red'](_0x268fed(0x1d2))+'\x20\x20'+_0x1060a7);}console[_0x268fed(0x1bb)]('\x20\x20Action:\x20delete');}else console['log'](a161_0xac24f8[_0x268fed(0x1df)](_0x268fed(0x1a3))+'\x20\x20'+a161_0xac24f8['gray'](_0x268fed(0x20d)));console['log']('');_0x205023?(console['log'](a161_0xac24f8[_0x268fed(0x1df)](_0x268fed(0x1d1))+('\x20\x20'+a161_0xac24f8[_0x268fed(0x1ee)](_0x205023[_0x268fed(0x1b9)])+_0x268fed(0x1e2)+_0x205023[_0x268fed(0x1be)][_0x268fed(0x1e3)](',\x20'))),console['log']('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console[_0x268fed(0x1bb)](a161_0xac24f8['cyan'](_0x268fed(0x1d1))+'\x20\x20'+a161_0xac24f8[_0x268fed(0x1d7)](_0x268fed(0x1bd)));console[_0x268fed(0x1bb)](''),console[_0x268fed(0x1bb)](a161_0xac24f8[_0x268fed(0x1df)](_0x268fed(0x1ff))+('\x20\x20'+(_0x245ed5?a161_0xac24f8['yellow'](_0x268fed(0x1c5)):a161_0xac24f8[_0x268fed(0x1ef)](_0x268fed(0x1de)))));_0x245ed5&&console['log'](_0x268fed(0x1f6)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x268fed(0x1bb)]('');if(_0x3a1294[_0x268fed(0x1af)]){const {currentVersion:_0x20fabc,field:_0x48fa5f,pkgPath:_0x166cea}=_0x3a1294[_0x268fed(0x1af)];console[_0x268fed(0x1bb)](a161_0xac24f8[_0x268fed(0x1df)](_0x268fed(0x1f2))+('\x20\x20'+a161_0xac24f8[_0x268fed(0x1ee)](_0x166cea))),console['log'](_0x268fed(0x1ec)+_0x48fa5f+':\x20'+a161_0xac24f8['yellow'](_0x20fabc)+_0x268fed(0x20e)+a161_0xac24f8[_0x268fed(0x1ef)](_0x268fed(0x1ad))),console[_0x268fed(0x1bb)](_0x268fed(0x1b1));}else console[_0x268fed(0x1bb)](a161_0xac24f8[_0x268fed(0x1df)](_0x268fed(0x1f2))+'\x20\x20'+a161_0xac24f8['gray']('not\x20found\x20or\x20already\x20at\x20latest'));console[_0x268fed(0x1bb)]('');}function execConfigMigration(_0x57f886,_0x441c2d){const _0x5418d2=a161_0x6f84,{configMigration:_0x121b7d}=_0x57f886;if(!_0x121b7d?.[_0x5418d2(0x1b4)])return{'step':0x1,'label':_0x5418d2(0x215),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0xbdf590=readConfigFile(_0x121b7d['oldPath']),_0x19d9b9=resolve(_0x441c2d,NEW_CONFIG_NAME),_0x87be9b=_0x121b7d[_0x5418d2(0x1f0)]?readConfigFile(_0x19d9b9):{};for(const [_0x453681,_0x218fd4]of Object[_0x5418d2(0x1d9)](_0xbdf590)){!(_0x453681 in _0x87be9b)&&(_0x87be9b[_0x453681]=_0x218fd4);}writeConfigFile(_0x19d9b9,_0x87be9b);const _0x1830b7=_0x121b7d[_0x5418d2(0x1b4)]+_0x5418d2(0x1a7);return renameSync(_0x121b7d[_0x5418d2(0x1b4)],_0x1830b7),{'step':0x1,'label':_0x5418d2(0x215),'ok':!![],'detail':_0x121b7d[_0x5418d2(0x1b4)]+_0x5418d2(0x20e)+_0x19d9b9+'\x20(backup:\x20'+_0x1830b7+')'};}function execRemoveOldArtifacts(_0x3cf023){const _0x2aa4e2=a161_0x6f84,_0x4ae6ca=[];for(const _0x2e2a37 of _0x3cf023){try{if(!existsSync(_0x2e2a37))continue;const _0x341541=tryStat(_0x2e2a37);_0x341541?.[_0x2aa4e2(0x1f5)]()?rmSync(_0x2e2a37,{'recursive':!![],'force':!![]}):unlinkSync(_0x2e2a37);}catch(_0xb31ca){_0x4ae6ca[_0x2aa4e2(0x1ea)](_0x2e2a37+':\x20'+_0xb31ca[_0x2aa4e2(0x203)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x4ae6ca['length']===0x0,'detail':_0x4ae6ca['length']>0x0?_0x3cf023[_0x2aa4e2(0x1ba)]-_0x4ae6ca[_0x2aa4e2(0x1ba)]+'/'+_0x3cf023[_0x2aa4e2(0x1ba)]+_0x2aa4e2(0x1d0)+_0x4ae6ca[_0x2aa4e2(0x1e3)](';\x20')+')':_0x3cf023[_0x2aa4e2(0x1ba)]+_0x2aa4e2(0x1c7)};}function execCleanMcp(_0xa2bc24){const _0x5b61df=a161_0x6f84;if(!_0xa2bc24[_0x5b61df(0x209)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x5b61df(0x211)};try{const _0x55a701=readFileSync(_0xa2bc24['oldMcpConfig'][_0x5b61df(0x1b9)],_0x5b61df(0x1cd)),_0x165786=JSON['parse'](_0x55a701);if(_0x165786?.[_0x5b61df(0x1ce)]&&typeof _0x165786['mcpServers']==='object'){const _0x10df5d=[];for(const [_0x480036,_0x4af82e]of Object[_0x5b61df(0x1d9)](_0x165786['mcpServers'])){_0x4af82e?.['args']&&Array[_0x5b61df(0x1b7)](_0x4af82e[_0x5b61df(0x1d5)])&&_0x4af82e['args']['some'](_0x55608c=>typeof _0x55608c===_0x5b61df(0x1ab)&&_0x55608c[_0x5b61df(0x1f1)](_0x5b61df(0x1e8)))&&_0x10df5d[_0x5b61df(0x1ea)](_0x480036);}for(const _0x37f5da of _0x10df5d){delete _0x165786[_0x5b61df(0x1ce)][_0x37f5da];}return _0x10df5d[_0x5b61df(0x1ba)]>0x0&&writeFileSync(_0xa2bc24[_0x5b61df(0x209)]['path'],JSON[_0x5b61df(0x20f)](_0x165786,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'removed\x20'+_0x10df5d[_0x5b61df(0x1e3)](',\x20')+'\x20from\x20'+_0xa2bc24[_0x5b61df(0x209)][_0x5b61df(0x1b9)]};}return{'step':0x4,'label':_0x5b61df(0x1b5),'ok':!![],'detail':_0x5b61df(0x1c2)};}catch(_0x3239f6){return{'step':0x4,'label':_0x5b61df(0x1b5),'ok':![],'detail':_0x3239f6['message']};}}function execSkillsRemove(_0x45698a,_0x2aff06){const _0xe0e751=a161_0x6f84,_0x4c719a=runNpxSkillsRemove(_0x45698a,{'stdio':_0xe0e751(0x20c),'yes':_0x2aff06});return{'step':0x5,'label':_0xe0e751(0x1bc),'ok':_0x4c719a['ok'],'detail':_0x4c719a['ok']?'lovrabet/lovrabet-skill\x20removed':_0x4c719a[_0xe0e751(0x1fe)]??'exit\x20'+_0x4c719a['status']};}function execSkillsAdd(_0x6ecbb0,_0xb247c9){const _0x5c6f14=a161_0x6f84,_0x15eb84=runNpxSkillsAddGlobal(_0x6ecbb0,'lovrabet/rabetbase',{'stdio':'inherit','yes':_0xb247c9});return{'step':0x6,'label':_0x5c6f14(0x1f7),'ok':_0x15eb84['ok'],'detail':_0x15eb84['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x15eb84[_0x5c6f14(0x1fe)]??_0x5c6f14(0x1ed)+_0x15eb84['status']};}function execUpgradeSdk(_0x201085){const _0x40ab95=a161_0x6f84;if(!_0x201085['sdkUpgrade'])return{'step':0x7,'label':_0x40ab95(0x1c8),'ok':!![],'detail':_0x40ab95(0x1a8)};const {pkgPath:_0x9302fd,currentVersion:_0x137124,field:_0x2c76a5}=_0x201085[_0x40ab95(0x1af)];try{const _0x5758f8=readFileSync(_0x9302fd,_0x40ab95(0x1cd)),_0x362d3b=JSON['parse'](_0x5758f8);return _0x362d3b[_0x2c76a5][_0x40ab95(0x1cf)]=_0x40ab95(0x1ad),writeFileSync(_0x9302fd,JSON[_0x40ab95(0x20f)](_0x362d3b,null,0x2)+'\x0a',_0x40ab95(0x1cd)),{'step':0x7,'label':_0x40ab95(0x1c8),'ok':!![],'detail':_0x2c76a5+_0x40ab95(0x204)+_0x137124+_0x40ab95(0x20a)};}catch(_0x462642){return{'step':0x7,'label':_0x40ab95(0x1c8),'ok':![],'detail':_0x462642[_0x40ab95(0x203)]};}}function tryStat(_0x17d977){try{return statSync(_0x17d977);}catch{return undefined;}}function printSummary(_0x383683){const _0x1ad0db=a161_0x6f84;console[_0x1ad0db(0x1bb)](''),console[_0x1ad0db(0x1bb)](a161_0xac24f8[_0x1ad0db(0x1c3)]('===\x20Upgrade\x20Summary\x20===')),console[_0x1ad0db(0x1bb)]('');for(const _0x5c0c88 of _0x383683){const _0x3aa382=_0x5c0c88['ok']?a161_0xac24f8[_0x1ad0db(0x1ef)]('OK'):a161_0xac24f8[_0x1ad0db(0x1e7)](_0x1ad0db(0x1a5));console[_0x1ad0db(0x1bb)]('\x20\x20'+_0x3aa382+_0x1ad0db(0x208)+_0x5c0c88[_0x1ad0db(0x1eb)]+':\x20'+_0x5c0c88[_0x1ad0db(0x1dd)]);if(_0x5c0c88[_0x1ad0db(0x1d3)])console[_0x1ad0db(0x1bb)](_0x1ad0db(0x216)+a161_0xac24f8[_0x1ad0db(0x1d7)](_0x5c0c88[_0x1ad0db(0x1d3)]));}console[_0x1ad0db(0x1bb)]('');}function a161_0x6f84(_0x2cc931,_0x50da2b){_0x2cc931=_0x2cc931-0x19e;const _0x63d9b3=a161_0x63d9();let _0x6f84c6=_0x63d9b3[_0x2cc931];return _0x6f84c6;}export async function upgradeApp(_0x1b5e7b,_0x429971){const _0x191de4=a161_0x6f84,_0x31d328=process[_0x191de4(0x1c9)](),_0x3d9aad=analyse(_0x31d328),_0xd6fa22=!_0x3d9aad['configMigration']&&_0x3d9aad['oldArtifacts']['length']===0x0&&!_0x3d9aad['oldMcpConfig']&&!_0x3d9aad[_0x191de4(0x1d6)]&&!_0x3d9aad[_0x191de4(0x1af)];if(_0xd6fa22){console[_0x191de4(0x1bb)](a161_0xac24f8[_0x191de4(0x1ef)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x3d9aad);const _0xde892=!!(_0x429971['yes']||_0x429971['Y']||_0x1b5e7b);if(!_0xde892)try{const _0xcf552a=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0xcf552a){console[_0x191de4(0x1bb)](a161_0xac24f8[_0x191de4(0x1d7)]('Upgrade\x20cancelled.'));return;}}catch(_0x55f1ab){if(_0x55f1ab?.['message']===_0x191de4(0x1dc)){console['log'](a161_0xac24f8[_0x191de4(0x1d7)](_0x191de4(0x1b0)));return;}throw _0x55f1ab;}const _0xdce02=[],_0x13d885=a161_0x4414e5({'text':_0x191de4(0x1b2),'color':_0x191de4(0x1df)})[_0x191de4(0x1b8)](),_0x5b4c79=execConfigMigration(_0x3d9aad,_0x31d328);_0xdce02['push'](_0x5b4c79),_0x13d885[_0x5b4c79['ok']?_0x191de4(0x1a0):_0x191de4(0x202)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x5b4c79[_0x191de4(0x1d3)]??(_0x5b4c79['ok']?_0x191de4(0x1a4):_0x191de4(0x1c1))));const _0x50af96=resolve(_0x31d328,_0x191de4(0x1e9)),_0x1fd1fc=a161_0x4414e5({'text':_0x191de4(0x206),'color':_0x191de4(0x1df)})[_0x191de4(0x1b8)]();if(existsSync(_0x50af96))try{rmSync(_0x50af96,{'recursive':!![],'force':!![]}),_0x1fd1fc[_0x191de4(0x1a0)](_0x191de4(0x217)),_0xdce02[_0x191de4(0x1ea)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x2ea41b){_0x1fd1fc['fail']('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x2ea41b[_0x191de4(0x203)]),_0xdce02[_0x191de4(0x1ea)]({'step':0x2,'label':_0x191de4(0x1a9),'ok':![],'detail':_0x2ea41b[_0x191de4(0x203)]});}else _0x1fd1fc[_0x191de4(0x1cb)](_0x191de4(0x1c0)),_0xdce02[_0x191de4(0x1ea)]({'step':0x2,'label':_0x191de4(0x1a9),'ok':!![],'detail':_0x191de4(0x211)});const _0x240ef7=a161_0x4414e5({'text':_0x191de4(0x1fa),'color':'cyan'})['start'](),_0x3ed434=execRemoveOldArtifacts(_0x3d9aad[_0x191de4(0x1e5)]);_0xdce02[_0x191de4(0x1ea)](_0x3ed434),_0x240ef7[_0x3ed434['ok']?_0x191de4(0x1a0):'fail'](_0x191de4(0x1fd)+(_0x3ed434['detail']??(_0x3ed434['ok']?_0x191de4(0x1a4):'failed')));const _0x5ccefd=a161_0x4414e5({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':'cyan'})[_0x191de4(0x1b8)](),_0x416ce2=execCleanMcp(_0x3d9aad);_0xdce02[_0x191de4(0x1ea)](_0x416ce2),_0x5ccefd[_0x416ce2['ok']?_0x191de4(0x1a0):_0x191de4(0x202)](_0x191de4(0x1aa)+(_0x416ce2[_0x191de4(0x1d3)]??(_0x416ce2['ok']?'done':_0x191de4(0x1c1))));const _0x8239d=a161_0x4414e5({'text':_0x191de4(0x1ae),'color':_0x191de4(0x1df)})[_0x191de4(0x1b8)](),_0x3b7391=execSkillsRemove(_0x31d328,_0xde892);_0xdce02[_0x191de4(0x1ea)](_0x3b7391),_0x8239d[_0x3b7391['ok']?_0x191de4(0x1a0):'fail']('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x3b7391[_0x191de4(0x1d3)]??(_0x3b7391['ok']?_0x191de4(0x1a4):'failed')));const _0xcce3f9=a161_0x4414e5({'text':_0x191de4(0x1e0),'color':'cyan'})[_0x191de4(0x1b8)](),_0x4efae1=execSkillsAdd(_0x31d328,_0xde892);_0xdce02[_0x191de4(0x1ea)](_0x4efae1),_0xcce3f9[_0x4efae1['ok']?_0x191de4(0x1a0):_0x191de4(0x202)](_0x191de4(0x1b3)+(_0x4efae1[_0x191de4(0x1d3)]??(_0x4efae1['ok']?_0x191de4(0x1a4):_0x191de4(0x1c1))));const _0x10dc48=a161_0x4414e5({'text':_0x191de4(0x20b),'color':_0x191de4(0x1df)})[_0x191de4(0x1b8)](),_0x3431d6=execUpgradeSdk(_0x3d9aad);_0xdce02['push'](_0x3431d6),_0x10dc48[_0x3431d6['ok']?_0x191de4(0x1a0):_0x191de4(0x202)](_0x191de4(0x1db)+(_0x3431d6['detail']??(_0x3431d6['ok']?'done':_0x191de4(0x1c1)))),printSummary(_0xdce02);const _0x57e72d=_0xdce02['some'](_0x3736cc=>!_0x3736cc['ok']);_0x57e72d?console[_0x191de4(0x1bb)](a161_0xac24f8[_0x191de4(0x1ee)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console['log'](a161_0xac24f8[_0x191de4(0x1ef)](_0x191de4(0x1f9))),_0x3431d6['ok']&&_0x3d9aad[_0x191de4(0x1af)]&&(console[_0x191de4(0x1bb)](''),console[_0x191de4(0x1bb)](a161_0xac24f8['bold'][_0x191de4(0x1df)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x191de4(0x1bb)](a161_0xac24f8['cyan'](_0x191de4(0x19e))),console[_0x191de4(0x1bb)](''),console[_0x191de4(0x1bb)](a161_0xac24f8['white'](_0x191de4(0x205))),console['log'](a161_0xac24f8['white'](_0x191de4(0x1bf))),console['log'](a161_0xac24f8[_0x191de4(0x1a6)](_0x191de4(0x1e6))),console[_0x191de4(0x1bb)](''));}
|
|
1
|
+
const a161_0x5e2746=a161_0x24d0;(function(_0x19955a,_0x39f4bc){const _0x4626=a161_0x24d0,_0x381231=_0x19955a();while(!![]){try{const _0x18ceb1=-parseInt(_0x4626(0x19f))/0x1+-parseInt(_0x4626(0x17f))/0x2+-parseInt(_0x4626(0x1f4))/0x3*(parseInt(_0x4626(0x1dc))/0x4)+parseInt(_0x4626(0x192))/0x5+-parseInt(_0x4626(0x1eb))/0x6+-parseInt(_0x4626(0x18b))/0x7+parseInt(_0x4626(0x1c3))/0x8;if(_0x18ceb1===_0x39f4bc)break;else _0x381231['push'](_0x381231['shift']());}catch(_0x4105ef){_0x381231['push'](_0x381231['shift']());}}}(a161_0x5216,0x58892));import a161_0x5d44b4 from'chalk';function a161_0x5216(){const _0x12de62=['white','.cursor/rules/lovrabet_rules.mdc','yes','\x20\x20Action:\x20delete','\x20→\x20latest','Install\x20new\x20skill','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','not\x20found\x20(will\x20create)','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','[\x22@lovrabet/sdk\x22]:\x20','fail','\x20removed','Step\x201/7:\x20Config\x20migration\x20—\x20','\x20removed\x20(','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Skill\x20swap:','push','length','object','\x20\x20bun\x20install','\x20\x20Fields\x20to\x20migrate:\x20','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Clean\x20MCP\x20config','log','\x20\x20npm\x20install','includes','\x20\x20Current\x20version\x20in\x20','16998304ArHjDc','oldPath','keys','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','FOUND','detail','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','oldMcpConfig','error','done','green','exit\x20','.bak','gray','Legacy\x20artifacts:','\x20→\x20keys:\x20','no\x20legacy\x20entry','Upgrade\x20completed\x20successfully!','label','inherit','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20(backup:\x20','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','none\x20found','utf8','8Pauihd','skipped\x20(no\x20legacy\x20config)','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','@lovrabet/sdk:','Config\x20file:','Step\x206/7:\x20Installing\x20new\x20skill...','no\x20legacy\x20config\x20found','hasNewConfig','bold','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','path','start','Step\x201/7:\x20Migrating\x20config...','\x20\x20New\x20config\x20(.rabetbase.json):\x20','skipped','2249148fIjryF','Upgrade\x20cancelled.','red','isDirectory','yellow','Remove\x20.lovrabet/','values','MCP\x20config:','mcpServers','763629FwtoDb','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','.cursor/mcp.json','step','===\x20Upgrade\x20Analysis\x20===','configMigration','failed','info','not\x20found\x20or\x20already\x20at\x20latest','isArray','cyan','sdkUpgrade','1309028JRoHWn','needsSkillSwap','@lovrabet/sdk','parse','.lovrabet','undefined','@lovrabet/dataset-mcp-server','Proceed\x20with\x20upgrade?','\x20\x20\x20\x20\x20\x20\x20','args','lovrabet/lovrabet-skill\x20removed','Remove\x20old\x20skill','5008542dSgfRn','message','join','Config\x20migration','===\x20Upgrade\x20Summary\x20===','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','entries','2555550VNOoFK','Upgrade\x20@lovrabet/sdk','\x20from\x20','\x20\x20#\x20or','oldArtifacts','some','Remove\x20legacy\x20artifacts','FAIL','latest','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','dependencies','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Step\x204/7:\x20Cleaning\x20MCP\x20config...','19292NxRicV','succeed','\x20→\x20','lovrabet/rabetbase','needed','already\x20exists\x20(will\x20merge)','filter','string','not\x20needed'];a161_0x5216=function(){return _0x12de62;};return a161_0x5216();}import a161_0x37604d from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';function a161_0x24d0(_0x1e2c4e,_0x8b6c27){_0x1e2c4e=_0x1e2c4e-0x17b;const _0x521612=a161_0x5216();let _0x24d0cc=_0x521612[_0x1e2c4e];return _0x24d0cc;}import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a161_0x5e2746(0x1a5)](_0x5db05c=>_0x5db05c!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0xce1e51){const _0x5a1bf5=a161_0x5e2746,_0x498d53=[];for(const _0x29c9a1 of Object[_0x5a1bf5(0x1f1)](CORE_IDE_CONFIGS)){if(_0x29c9a1['files'])for(const _0x5d2962 of _0x29c9a1['files']){_0x498d53[_0x5a1bf5(0x1b8)](resolve(_0xce1e51,_0x5d2962['path']));}}return _0x498d53;}function analyse(_0x367247){const _0x2ab20b=a161_0x5e2746;let _0x5d9b01=null;const _0x17eebf=resolve(_0x367247,NEW_CONFIG_NAME),_0x332641=existsSync(_0x17eebf);for(const _0x36d6c8 of LEGACY_CONFIG_NAMES){const _0x20b1ff=resolve(_0x367247,_0x36d6c8);if(existsSync(_0x20b1ff)){const _0x3098c9=readConfigFile(_0x20b1ff),_0x587ef6=Object[_0x2ab20b(0x1c5)](_0x3098c9)[_0x2ab20b(0x1a5)](_0x4061df=>typeof _0x3098c9[_0x4061df]!==_0x2ab20b(0x184));_0x5d9b01={'oldPath':_0x20b1ff,'hasNewConfig':_0x332641,'fields':_0x587ef6};break;}}const _0x354c61=[],_0x2545a7=resolve(_0x367247,_0x2ab20b(0x183));if(existsSync(_0x2545a7))_0x354c61[_0x2ab20b(0x1b8)](_0x2545a7);const _0x4d9202=resolve(_0x367247,_0x2ab20b(0x1a9));if(existsSync(_0x4d9202))_0x354c61[_0x2ab20b(0x1b8)](_0x4d9202);const _0x832cfd=resolve(_0x367247,'.claude/skills/lovrabet');if(existsSync(_0x832cfd))_0x354c61[_0x2ab20b(0x1b8)](_0x832cfd);for(const _0x54e9b1 of collectIdeSkillFiles(_0x367247)){if(existsSync(_0x54e9b1))_0x354c61[_0x2ab20b(0x1b8)](_0x54e9b1);}let _0x4c9993=null;const _0x2d9378=resolve(_0x367247,_0x2ab20b(0x1f6));if(existsSync(_0x2d9378))try{const _0x584164=JSON[_0x2ab20b(0x182)](readFileSync(_0x2d9378,'utf8'));if(_0x584164?.[_0x2ab20b(0x1f3)]&&typeof _0x584164[_0x2ab20b(0x1f3)]===_0x2ab20b(0x1ba)){const _0x14ed79=[];for(const [_0x5983b0,_0xcc698e]of Object[_0x2ab20b(0x191)](_0x584164[_0x2ab20b(0x1f3)])){const _0x4e3dd2=_0xcc698e;_0x4e3dd2?.['args']&&Array[_0x2ab20b(0x17c)](_0x4e3dd2[_0x2ab20b(0x188)])&&_0x4e3dd2[_0x2ab20b(0x188)]['some'](_0x33ed62=>typeof _0x33ed62==='string'&&_0x33ed62[_0x2ab20b(0x1c1)](_0x2ab20b(0x185)))&&_0x14ed79['push'](_0x5983b0);}_0x14ed79[_0x2ab20b(0x1b9)]>0x0&&(_0x4c9993={'path':_0x2d9378,'keys':_0x14ed79});}}catch{}const _0x45f32b=_0x354c61[_0x2ab20b(0x1b9)]>0x0||_0x5d9b01!==null;let _0x7cdc77=null;const _0x55ee6d=resolve(_0x367247,'package.json');if(existsSync(_0x55ee6d))try{const _0x45d64f=JSON[_0x2ab20b(0x182)](readFileSync(_0x55ee6d,'utf8'));for(const _0x1cb3ee of[_0x2ab20b(0x19c),'devDependencies']){const _0x2a8c43=_0x45d64f?.[_0x1cb3ee]?.[_0x2ab20b(0x181)];if(typeof _0x2a8c43===_0x2ab20b(0x1a6)){_0x2a8c43!==_0x2ab20b(0x19a)&&(_0x7cdc77={'pkgPath':_0x55ee6d,'currentVersion':_0x2a8c43,'field':_0x1cb3ee});break;}}}catch{}return{'configMigration':_0x5d9b01,'oldArtifacts':_0x354c61,'oldMcpConfig':_0x4c9993,'needsSkillSwap':_0x45f32b,'sdkUpgrade':_0x7cdc77};}function printReport(_0x3fdc85){const _0x7d98ad=a161_0x5e2746,{configMigration:_0x19a294,oldArtifacts:_0x37f799,oldMcpConfig:_0x37dda7,needsSkillSwap:_0x309740}=_0x3fdc85;console[_0x7d98ad(0x1bf)](''),console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x1e4)](_0x7d98ad(0x1f8))),console[_0x7d98ad(0x1bf)]('');_0x19a294?(console['log'](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1e0))+('\x20\x20'+a161_0x5d44b4[_0x7d98ad(0x1ef)](_0x19a294[_0x7d98ad(0x1c4)]))),console[_0x7d98ad(0x1bf)](_0x7d98ad(0x1e9)+(_0x19a294[_0x7d98ad(0x1e3)]?a161_0x5d44b4[_0x7d98ad(0x1cd)](_0x7d98ad(0x1a4)):a161_0x5d44b4['gray'](_0x7d98ad(0x1af)))),console[_0x7d98ad(0x1bf)](_0x7d98ad(0x1bc)+_0x19a294['fields'][_0x7d98ad(0x18d)](',\x20')),console['log']('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x17d)]('Config\x20file:')+'\x20\x20'+a161_0x5d44b4[_0x7d98ad(0x1d0)](_0x7d98ad(0x1e2)));console[_0x7d98ad(0x1bf)]('');if(_0x37f799['length']>0x0){console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1d1)));for(const _0x124bdc of _0x37f799){console[_0x7d98ad(0x1bf)]('\x20\x20'+a161_0x5d44b4[_0x7d98ad(0x1ed)](_0x7d98ad(0x1c7))+'\x20\x20'+_0x124bdc);}console[_0x7d98ad(0x1bf)](_0x7d98ad(0x1ab));}else console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1d1))+'\x20\x20'+a161_0x5d44b4[_0x7d98ad(0x1d0)](_0x7d98ad(0x1da)));console[_0x7d98ad(0x1bf)]('');_0x37dda7?(console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1f2))+('\x20\x20'+a161_0x5d44b4[_0x7d98ad(0x1ef)](_0x37dda7[_0x7d98ad(0x1e6)])+_0x7d98ad(0x1d2)+_0x37dda7['keys'][_0x7d98ad(0x18d)](',\x20'))),console[_0x7d98ad(0x1bf)](_0x7d98ad(0x19d))):console[_0x7d98ad(0x1bf)](a161_0x5d44b4['cyan'](_0x7d98ad(0x1f2))+'\x20\x20'+a161_0x5d44b4[_0x7d98ad(0x1d0)](_0x7d98ad(0x1d3)));console['log'](''),console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1b7))+('\x20\x20'+(_0x309740?a161_0x5d44b4['yellow'](_0x7d98ad(0x1a3)):a161_0x5d44b4['green'](_0x7d98ad(0x1a7)))));_0x309740&&console[_0x7d98ad(0x1bf)](_0x7d98ad(0x1b6)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x7d98ad(0x1bf)]('');if(_0x3fdc85[_0x7d98ad(0x17e)]){const {currentVersion:_0x4f61c3,field:_0x42cbfe,pkgPath:_0x141674}=_0x3fdc85[_0x7d98ad(0x17e)];console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1df))+('\x20\x20'+a161_0x5d44b4['yellow'](_0x141674))),console[_0x7d98ad(0x1bf)](_0x7d98ad(0x1c2)+_0x42cbfe+':\x20'+a161_0x5d44b4[_0x7d98ad(0x1ef)](_0x4f61c3)+_0x7d98ad(0x1a1)+a161_0x5d44b4[_0x7d98ad(0x1cd)](_0x7d98ad(0x19a))),console[_0x7d98ad(0x1bf)](_0x7d98ad(0x1d7));}else console['log'](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1df))+'\x20\x20'+a161_0x5d44b4['gray'](_0x7d98ad(0x17b)));console[_0x7d98ad(0x1bf)]('');}function execConfigMigration(_0x7f00a6,_0x332bbe){const _0x1d8feb=a161_0x5e2746,{configMigration:_0x5cfd24}=_0x7f00a6;if(!_0x5cfd24?.['oldPath'])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x1d8feb(0x1dd)};const _0x47d35e=readConfigFile(_0x5cfd24[_0x1d8feb(0x1c4)]),_0x30c171=resolve(_0x332bbe,NEW_CONFIG_NAME),_0x671295=_0x5cfd24[_0x1d8feb(0x1e3)]?readConfigFile(_0x30c171):{};for(const [_0x1ef765,_0x555167]of Object[_0x1d8feb(0x191)](_0x47d35e)){!(_0x1ef765 in _0x671295)&&(_0x671295[_0x1ef765]=_0x555167);}writeConfigFile(_0x30c171,_0x671295);const _0x2e2cfb=_0x5cfd24[_0x1d8feb(0x1c4)]+_0x1d8feb(0x1cf);return renameSync(_0x5cfd24['oldPath'],_0x2e2cfb),{'step':0x1,'label':_0x1d8feb(0x18e),'ok':!![],'detail':_0x5cfd24[_0x1d8feb(0x1c4)]+_0x1d8feb(0x1a1)+_0x30c171+_0x1d8feb(0x1d8)+_0x2e2cfb+')'};}function execRemoveOldArtifacts(_0xdf9d6b){const _0x1db979=a161_0x5e2746,_0x2a16fb=[];for(const _0x4add9a of _0xdf9d6b){try{if(!existsSync(_0x4add9a))continue;const _0x46c9ee=tryStat(_0x4add9a);_0x46c9ee?.[_0x1db979(0x1ee)]()?rmSync(_0x4add9a,{'recursive':!![],'force':!![]}):unlinkSync(_0x4add9a);}catch(_0x5c77f1){_0x2a16fb['push'](_0x4add9a+':\x20'+_0x5c77f1[_0x1db979(0x18c)]);}}return{'step':0x3,'label':_0x1db979(0x198),'ok':_0x2a16fb[_0x1db979(0x1b9)]===0x0,'detail':_0x2a16fb[_0x1db979(0x1b9)]>0x0?_0xdf9d6b[_0x1db979(0x1b9)]-_0x2a16fb[_0x1db979(0x1b9)]+'/'+_0xdf9d6b[_0x1db979(0x1b9)]+_0x1db979(0x1b5)+_0x2a16fb[_0x1db979(0x18d)](';\x20')+')':_0xdf9d6b[_0x1db979(0x1b9)]+_0x1db979(0x1b3)};}function execCleanMcp(_0x1e78a3){const _0x2d8f5f=a161_0x5e2746;if(!_0x1e78a3[_0x2d8f5f(0x1ca)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x2d8f5f(0x1ea)};try{const _0x10d37e=readFileSync(_0x1e78a3[_0x2d8f5f(0x1ca)][_0x2d8f5f(0x1e6)],_0x2d8f5f(0x1db)),_0x4fb701=JSON['parse'](_0x10d37e);if(_0x4fb701?.[_0x2d8f5f(0x1f3)]&&typeof _0x4fb701[_0x2d8f5f(0x1f3)]===_0x2d8f5f(0x1ba)){const _0x175fee=[];for(const [_0x1cdfb2,_0x187357]of Object[_0x2d8f5f(0x191)](_0x4fb701[_0x2d8f5f(0x1f3)])){_0x187357?.[_0x2d8f5f(0x188)]&&Array['isArray'](_0x187357[_0x2d8f5f(0x188)])&&_0x187357['args'][_0x2d8f5f(0x197)](_0x16b10a=>typeof _0x16b10a===_0x2d8f5f(0x1a6)&&_0x16b10a[_0x2d8f5f(0x1c1)](_0x2d8f5f(0x185)))&&_0x175fee[_0x2d8f5f(0x1b8)](_0x1cdfb2);}for(const _0x3f4b38 of _0x175fee){delete _0x4fb701[_0x2d8f5f(0x1f3)][_0x3f4b38];}return _0x175fee[_0x2d8f5f(0x1b9)]>0x0&&writeFileSync(_0x1e78a3[_0x2d8f5f(0x1ca)][_0x2d8f5f(0x1e6)],JSON['stringify'](_0x4fb701,null,0x2)+'\x0a',_0x2d8f5f(0x1db)),{'step':0x4,'label':_0x2d8f5f(0x1be),'ok':!![],'detail':'removed\x20'+_0x175fee[_0x2d8f5f(0x18d)](',\x20')+_0x2d8f5f(0x194)+_0x1e78a3['oldMcpConfig'][_0x2d8f5f(0x1e6)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x50c61a){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x50c61a[_0x2d8f5f(0x18c)]};}}function execSkillsRemove(_0x2855d9,_0x380d88){const _0x1a552d=a161_0x5e2746,_0x300b47=runNpxSkillsRemove(_0x2855d9,{'stdio':'inherit','yes':_0x380d88});return{'step':0x5,'label':_0x1a552d(0x18a),'ok':_0x300b47['ok'],'detail':_0x300b47['ok']?_0x1a552d(0x189):_0x300b47[_0x1a552d(0x1cb)]??_0x1a552d(0x1ce)+_0x300b47['status']};}function execSkillsAdd(_0x21e9fb,_0x1d1fb5){const _0x2951ba=a161_0x5e2746,_0x77fd27=runNpxSkillsAddGlobal(_0x21e9fb,_0x2951ba(0x1a2),{'stdio':_0x2951ba(0x1d6),'yes':_0x1d1fb5});return{'step':0x6,'label':_0x2951ba(0x1ad),'ok':_0x77fd27['ok'],'detail':_0x77fd27['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x77fd27[_0x2951ba(0x1cb)]??_0x2951ba(0x1ce)+_0x77fd27['status']};}function execUpgradeSdk(_0x3f9f8f){const _0x20080a=a161_0x5e2746;if(!_0x3f9f8f[_0x20080a(0x17e)])return{'step':0x7,'label':_0x20080a(0x193),'ok':!![],'detail':_0x20080a(0x1d9)};const {pkgPath:_0x48b32c,currentVersion:_0x30d151,field:_0x4f936d}=_0x3f9f8f['sdkUpgrade'];try{const _0x100c37=readFileSync(_0x48b32c,_0x20080a(0x1db)),_0x362b82=JSON[_0x20080a(0x182)](_0x100c37);return _0x362b82[_0x4f936d]['@lovrabet/sdk']='latest',writeFileSync(_0x48b32c,JSON['stringify'](_0x362b82,null,0x2)+'\x0a',_0x20080a(0x1db)),{'step':0x7,'label':_0x20080a(0x193),'ok':!![],'detail':_0x4f936d+_0x20080a(0x1b1)+_0x30d151+_0x20080a(0x1ac)};}catch(_0x7be355){return{'step':0x7,'label':_0x20080a(0x193),'ok':![],'detail':_0x7be355['message']};}}function tryStat(_0x4452be){try{return statSync(_0x4452be);}catch{return undefined;}}function printSummary(_0x351859){const _0x2f9405=a161_0x5e2746;console[_0x2f9405(0x1bf)](''),console[_0x2f9405(0x1bf)](a161_0x5d44b4[_0x2f9405(0x1e4)](_0x2f9405(0x18f))),console[_0x2f9405(0x1bf)]('');for(const _0xd4debe of _0x351859){const _0x7c1b6e=_0xd4debe['ok']?a161_0x5d44b4[_0x2f9405(0x1cd)]('OK'):a161_0x5d44b4[_0x2f9405(0x1ed)](_0x2f9405(0x199));console[_0x2f9405(0x1bf)]('\x20\x20'+_0x7c1b6e+'\x20\x20Step\x20'+_0xd4debe[_0x2f9405(0x1f7)]+':\x20'+_0xd4debe[_0x2f9405(0x1d5)]);if(_0xd4debe['detail'])console[_0x2f9405(0x1bf)](_0x2f9405(0x187)+a161_0x5d44b4[_0x2f9405(0x1d0)](_0xd4debe['detail']));}console[_0x2f9405(0x1bf)]('');}export async function upgradeApp(_0x1f1f16,_0x882959){const _0xda1423=a161_0x5e2746,_0x1091bf=process['cwd'](),_0x3161d0=analyse(_0x1091bf),_0x2276b6=!_0x3161d0[_0xda1423(0x1f9)]&&_0x3161d0[_0xda1423(0x196)][_0xda1423(0x1b9)]===0x0&&!_0x3161d0[_0xda1423(0x1ca)]&&!_0x3161d0[_0xda1423(0x180)]&&!_0x3161d0[_0xda1423(0x17e)];if(_0x2276b6){console[_0xda1423(0x1bf)](a161_0x5d44b4[_0xda1423(0x1cd)](_0xda1423(0x1de)));return;}printReport(_0x3161d0);const _0x44fada=!!(_0x882959[_0xda1423(0x1aa)]||_0x882959['Y']||_0x1f1f16);if(!_0x44fada)try{const _0x3e44e5=await askConfirm(_0xda1423(0x186));if(!_0x3e44e5){console['log'](a161_0x5d44b4[_0xda1423(0x1d0)](_0xda1423(0x1ec)));return;}}catch(_0x3a2359){if(_0x3a2359?.[_0xda1423(0x18c)]==='CANCEL'){console[_0xda1423(0x1bf)](a161_0x5d44b4[_0xda1423(0x1d0)](_0xda1423(0x1ec)));return;}throw _0x3a2359;}const _0x58c857=[],_0x573a66=a161_0x37604d({'text':_0xda1423(0x1e8),'color':_0xda1423(0x17d)})[_0xda1423(0x1e7)](),_0x3c5297=execConfigMigration(_0x3161d0,_0x1091bf);_0x58c857[_0xda1423(0x1b8)](_0x3c5297),_0x573a66[_0x3c5297['ok']?_0xda1423(0x1a0):_0xda1423(0x1b2)](_0xda1423(0x1b4)+(_0x3c5297[_0xda1423(0x1c8)]??(_0x3c5297['ok']?_0xda1423(0x1cc):'failed')));const _0x4df075=resolve(_0x1091bf,'.lovrabet'),_0x293877=a161_0x37604d({'text':_0xda1423(0x1b0),'color':'cyan'})[_0xda1423(0x1e7)]();if(existsSync(_0x4df075))try{rmSync(_0x4df075,{'recursive':!![],'force':!![]}),_0x293877[_0xda1423(0x1a0)](_0xda1423(0x19b)),_0x58c857[_0xda1423(0x1b8)]({'step':0x2,'label':_0xda1423(0x1f0),'ok':!![]});}catch(_0x2dc6c3){_0x293877[_0xda1423(0x1b2)](_0xda1423(0x1ae)+_0x2dc6c3[_0xda1423(0x18c)]),_0x58c857[_0xda1423(0x1b8)]({'step':0x2,'label':_0xda1423(0x1f0),'ok':![],'detail':_0x2dc6c3[_0xda1423(0x18c)]});}else _0x293877[_0xda1423(0x1fb)](_0xda1423(0x1c6)),_0x58c857['push']({'step':0x2,'label':_0xda1423(0x1f0),'ok':!![],'detail':'skipped'});const _0x170576=a161_0x37604d({'text':_0xda1423(0x1e5),'color':_0xda1423(0x17d)})[_0xda1423(0x1e7)](),_0x304594=execRemoveOldArtifacts(_0x3161d0[_0xda1423(0x196)]);_0x58c857['push'](_0x304594),_0x170576[_0x304594['ok']?_0xda1423(0x1a0):_0xda1423(0x1b2)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x304594[_0xda1423(0x1c8)]??(_0x304594['ok']?_0xda1423(0x1cc):'failed')));const _0x309d5e=a161_0x37604d({'text':_0xda1423(0x19e),'color':'cyan'})['start'](),_0x29f61e=execCleanMcp(_0x3161d0);_0x58c857[_0xda1423(0x1b8)](_0x29f61e),_0x309d5e[_0x29f61e['ok']?_0xda1423(0x1a0):_0xda1423(0x1b2)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x29f61e[_0xda1423(0x1c8)]??(_0x29f61e['ok']?_0xda1423(0x1cc):'failed')));const _0x20eeab=a161_0x37604d({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0xda1423(0x17d)})[_0xda1423(0x1e7)](),_0x2ad0a4=execSkillsRemove(_0x1091bf,_0x44fada);_0x58c857['push'](_0x2ad0a4),_0x20eeab[_0x2ad0a4['ok']?_0xda1423(0x1a0):_0xda1423(0x1b2)](_0xda1423(0x1f5)+(_0x2ad0a4[_0xda1423(0x1c8)]??(_0x2ad0a4['ok']?_0xda1423(0x1cc):_0xda1423(0x1fa))));const _0x214160=a161_0x37604d({'text':_0xda1423(0x1e1),'color':_0xda1423(0x17d)})[_0xda1423(0x1e7)](),_0x182cb0=execSkillsAdd(_0x1091bf,_0x44fada);_0x58c857[_0xda1423(0x1b8)](_0x182cb0),_0x214160[_0x182cb0['ok']?'succeed':_0xda1423(0x1b2)](_0xda1423(0x1c9)+(_0x182cb0['detail']??(_0x182cb0['ok']?_0xda1423(0x1cc):'failed')));const _0x6971c0=a161_0x37604d({'text':'Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0xda1423(0x17d)})[_0xda1423(0x1e7)](),_0x185e10=execUpgradeSdk(_0x3161d0);_0x58c857[_0xda1423(0x1b8)](_0x185e10),_0x6971c0[_0x185e10['ok']?'succeed':'fail'](_0xda1423(0x190)+(_0x185e10[_0xda1423(0x1c8)]??(_0x185e10['ok']?_0xda1423(0x1cc):'failed'))),printSummary(_0x58c857);const _0x305375=_0x58c857[_0xda1423(0x197)](_0x4fba2b=>!_0x4fba2b['ok']);_0x305375?console[_0xda1423(0x1bf)](a161_0x5d44b4['yellow']('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0xda1423(0x1bf)](a161_0x5d44b4['green'](_0xda1423(0x1d4))),_0x185e10['ok']&&_0x3161d0[_0xda1423(0x17e)]&&(console[_0xda1423(0x1bf)](''),console[_0xda1423(0x1bf)](a161_0x5d44b4[_0xda1423(0x1e4)][_0xda1423(0x17d)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0xda1423(0x1bf)](a161_0x5d44b4[_0xda1423(0x17d)](_0xda1423(0x1bd))),console[_0xda1423(0x1bf)](''),console[_0xda1423(0x1bf)](a161_0x5d44b4['white'](_0xda1423(0x1c0))),console['log'](a161_0x5d44b4[_0xda1423(0x1a8)](_0xda1423(0x195))),console[_0xda1423(0x1bf)](a161_0x5d44b4['white'](_0xda1423(0x1bb))),console[_0xda1423(0x1bf)](''));}
|