@lovrabet/rabetbase-cli 2.3.16-beta.3 → 2.3.16-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.d.ts +9 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.d.ts +2 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +8 -0
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.d.ts +13 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.d.ts +25 -0
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.d.ts +2 -0
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.d.ts +1 -0
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.d.ts +51 -0
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.d.ts +1 -0
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.d.ts +5 -0
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.d.ts +1 -0
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.d.ts +12 -0
- package/lib/cli-flags.js +1 -1
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.d.ts +2 -0
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.d.ts +2 -0
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.d.ts +2 -0
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.d.ts +2 -0
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.d.ts +18 -0
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.d.ts +5 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.d.ts +10 -0
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.d.ts +2 -0
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.d.ts +11 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.d.ts +46 -0
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.d.ts +2 -0
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.d.ts +2 -0
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.d.ts +2 -0
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.d.ts +2 -0
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.d.ts +2 -0
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.d.ts +105 -0
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.d.ts +2 -0
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.d.ts +4 -0
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.d.ts +2 -0
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.d.ts +2 -0
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.d.ts +5 -0
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.d.ts +2 -0
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.d.ts +2 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.d.ts +2 -0
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.d.ts +2 -0
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.d.ts +8 -0
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.d.ts +2 -0
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.d.ts +2 -0
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.d.ts +2 -0
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.d.ts +2 -0
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.d.ts +17 -0
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.d.ts +17 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.d.ts +11 -0
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.d.ts +12 -0
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +26 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.d.ts +6 -0
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.d.ts +13 -0
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.d.ts +5 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.d.ts +5 -0
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.d.ts +5 -0
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.d.ts +5 -0
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.d.ts +16 -0
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.d.ts +7 -0
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.d.ts +7 -0
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.d.ts +8 -0
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.d.ts +33 -0
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.d.ts +18 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.d.ts +11 -0
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.d.ts +2 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.d.ts +2 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.d.ts +26 -0
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.d.ts +27 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.d.ts +3 -0
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.d.ts +2 -0
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.d.ts +2 -0
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.d.ts +2 -0
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.d.ts +2 -0
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.d.ts +2 -0
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.d.ts +2 -0
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.d.ts +128 -0
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.d.ts +2 -0
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.d.ts +53 -0
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.d.ts +17 -0
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.d.ts +2 -0
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.d.ts +30 -0
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.d.ts +2 -0
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.d.ts +2 -0
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.d.ts +2 -0
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.d.ts +2 -0
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.d.ts +2 -0
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.d.ts +2 -0
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.d.ts +2 -0
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.d.ts +5 -0
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.d.ts +2 -0
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.d.ts +15 -0
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.d.ts +2 -0
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.d.ts +2 -0
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.d.ts +2 -0
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.d.ts +2 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.d.ts +2 -0
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.d.ts +11 -0
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.d.ts +2 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.d.ts +23 -0
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.d.ts +2 -0
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.d.ts +32 -0
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.d.ts +2 -0
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.d.ts +2 -0
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.d.ts +2 -0
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.d.ts +2 -0
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.d.ts +2 -0
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.d.ts +33 -0
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.d.ts +2 -0
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.d.ts +5 -0
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.d.ts +2 -0
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.d.ts +2 -0
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.d.ts +3 -0
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.d.ts +2 -0
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.d.ts +2 -0
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.d.ts +2 -0
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.d.ts +17 -0
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.d.ts +2 -0
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.d.ts +2 -0
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.d.ts +2 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.d.ts +2 -0
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.d.ts +27 -0
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.d.ts +12 -0
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.d.ts +12 -0
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.d.ts +10 -0
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +12 -0
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +28 -0
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.d.ts +69 -0
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.d.ts +17 -0
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.d.ts +7 -0
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +162 -0
- package/lib/commands/menu/shared/update-core.d.ts +11 -0
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.d.ts +6 -0
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.d.ts +2 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.d.ts +2 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.d.ts +2 -0
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.d.ts +2 -0
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.d.ts +2 -0
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.d.ts +2 -0
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.d.ts +2 -0
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.d.ts +2 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.d.ts +2 -0
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +105 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.d.ts +2 -0
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.d.ts +2 -0
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.d.ts +2 -0
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.d.ts +74 -0
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.d.ts +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +6 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.d.ts +9 -0
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.d.ts +4 -0
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.d.ts +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.d.ts +2 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.d.ts +1 -0
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.d.ts +66 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +107 -0
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.d.ts +2 -0
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.d.ts +2 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.d.ts +5 -0
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.d.ts +10 -0
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.d.ts +5 -0
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.d.ts +2 -0
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.d.ts +2 -0
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.d.ts +5 -0
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.d.ts +2 -0
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.d.ts +5 -0
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.d.ts +5 -0
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.d.ts +23 -0
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.d.ts +5 -0
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.d.ts +2 -0
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.d.ts +2 -0
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.d.ts +2 -0
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.d.ts +2 -0
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.d.ts +2 -0
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.d.ts +10 -0
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/workspace/add.d.ts +6 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.d.ts +11 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.d.ts +6 -0
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.d.ts +50 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +1 -0
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.d.ts +34 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.d.ts +10 -0
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +14 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.d.ts +11 -0
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.d.ts +1 -0
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.d.ts +5 -0
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.d.ts +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.d.ts +36 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.d.ts +5 -0
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.d.ts +61 -0
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +102 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +31 -0
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1018 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +8 -0
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +28 -0
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +7 -0
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +25 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +92 -0
- package/lib/core/bff/utils.d.ts +25 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.d.ts +43 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.d.ts +6 -0
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.d.ts +4 -0
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.d.ts +8 -0
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/types.d.ts +22 -0
- package/lib/core/sql-index-auditor.d.ts +33 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.d.ts +7 -0
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.d.ts +7 -0
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.d.ts +5 -0
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.d.ts +14 -0
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/types.d.ts +43 -0
- package/lib/core/sql-sync/utils.d.ts +10 -0
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.d.ts +34 -0
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.d.ts +3 -0
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.d.ts +2 -0
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.d.ts +9 -0
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.d.ts +3 -0
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.d.ts +3 -0
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.d.ts +4 -0
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.d.ts +11 -0
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.d.ts +15 -0
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.d.ts +2 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.d.ts +14 -0
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.d.ts +36 -0
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.d.ts +3 -0
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.d.ts +63 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -0
- package/lib/generated/build-info.js +1 -1
- package/lib/help.d.ts +1 -0
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.d.ts +4 -0
- package/lib/runtime/confirmation.js +1 -0
- package/lib/runtime/event.d.ts +5 -0
- package/lib/runtime/event.js +1 -0
- package/lib/runtime/index.d.ts +7 -0
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/queue.d.ts +5 -0
- package/lib/runtime/queue.js +1 -0
- package/lib/runtime/resolve.d.ts +8 -0
- package/lib/runtime/resolve.js +1 -0
- package/lib/runtime/types.d.ts +50 -0
- package/lib/runtime/types.js +1 -0
- package/lib/skills/main.d.ts +41 -0
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +99 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.d.ts +44 -0
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.d.ts +12 -0
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.d.ts +8 -0
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +93 -0
- package/lib/utils/ai_config.d.ts +47 -0
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.d.ts +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.d.ts +42 -0
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.d.ts +23 -0
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.d.ts +37 -0
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +9 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.d.ts +42 -0
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.d.ts +1 -0
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.d.ts +30 -0
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.d.ts +25 -0
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.d.ts +80 -0
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.d.ts +30 -0
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.d.ts +7 -0
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.d.ts +62 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.d.ts +15 -0
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.d.ts +21 -0
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.d.ts +38 -0
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.d.ts +1 -0
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.d.ts +55 -0
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.d.ts +10 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.d.ts +1 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.d.ts +1 -0
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.d.ts +6 -0
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -1
- package/lib/commands/page/react/create.js +0 -1
- package/lib/commands/page/react/detail.js +0 -1
- package/lib/commands/page/react/list.js +0 -1
- package/lib/commands/page/react/publish.js +0 -1
- package/lib/commands/page/react/shared.js +0 -1
- package/lib/commands/page/react/syntax.js +0 -1
- package/lib/commands/page/react/template.js +0 -1
- package/lib/commands/page/react/update.js +0 -1
|
@@ -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(_0x55412b,_0x2506fc){const _0x25e040=a162_0x6d33,_0x3642df=_0x55412b();while(!![]){try{const _0x4fb0a1=parseInt(_0x25e040(0x1dd))/0x1+-parseInt(_0x25e040(0x201))/0x2*(parseInt(_0x25e040(0x1bb))/0x3)+-parseInt(_0x25e040(0x1da))/0x4*(parseInt(_0x25e040(0x1f7))/0x5)+-parseInt(_0x25e040(0x1e5))/0x6*(parseInt(_0x25e040(0x1cb))/0x7)+parseInt(_0x25e040(0x1f2))/0x8+parseInt(_0x25e040(0x1f6))/0x9*(-parseInt(_0x25e040(0x1e9))/0xa)+parseInt(_0x25e040(0x1c4))/0xb;if(_0x4fb0a1===_0x2506fc)break;else _0x3642df['push'](_0x3642df['shift']());}catch(_0x45575a){_0x3642df['push'](_0x3642df['shift']());}}}(a162_0x1a8f,0xeb2be));import a162_0x2c1426 from'path';import a162_0x2c3aaa from'fs';import a162_0x25e2fd from'chalk';import a162_0x70df4a 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';function a162_0x6d33(_0x36d4df,_0x9c829d){_0x36d4df=_0x36d4df-0x1af;const _0x1a8f97=a162_0x1a8f();let _0x6d337a=_0x1a8f97[_0x36d4df];return _0x6d337a;}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(_0x3e3405){const _0x3c64a7=a162_0x6d33,_0x4aae32=await checkCliVersion();(_0x4aae32[_0x3c64a7(0x1d8)]||_0x4aae32[_0x3c64a7(0x1ed)])&&(printCliUpgradeWarning(_0x4aae32),assertCliVersionSupported(_0x4aae32),logger['info'](_0x3c64a7(0x1de),'CLI\x20版本检查',{'currentVersion':_0x4aae32['currentVersion'],'stableVersion':_0x4aae32[_0x3c64a7(0x1b1)],'minimumVersion':_0x4aae32['minimumVersion'],'needsUpgrade':_0x4aae32[_0x3c64a7(0x1d8)],'belowMinimum':_0x4aae32[_0x3c64a7(0x1ed)]}));if(_0x3e3405['projectCode']&&_0x3e3405[_0x3c64a7(0x1e1)])await runCreate({'projectName':_0x3e3405[_0x3c64a7(0x1ce)],'appCode':_0x3e3405['appCode'],'env':_0x3e3405[_0x3c64a7(0x1d3)]},_0x3e3405);else{if(_0x3e3405['projectCode']){const _0x31fa64=await selectSingleAppcode(_0x3e3405[_0x3c64a7(0x1fc)]);await runCreate({'projectName':_0x3e3405['projectCode'],'appCode':_0x31fa64||undefined,'env':_0x3e3405[_0x3c64a7(0x1d3)]},_0x3e3405);}else await guidedCreateProject(_0x351f3c=>runCreate(_0x351f3c,_0x3e3405),_0x3e3405[_0x3c64a7(0x1d3)],_0x3e3405['cookie']);}}async function runCreate(_0x2b3329,_0xfe3ca1){const _0x116611=a162_0x6d33;if(!_0x2b3329[_0x116611(0x1d5)]||_0x2b3329[_0x116611(0x1d5)][_0x116611(0x202)]()==='')throw new Error(_0x116611(0x1c2));const _0x2bc350=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2bc350['test'](_0x2b3329[_0x116611(0x1d5)]))throw new Error(_0x116611(0x1c9));if(_0x2b3329[_0x116611(0x1d5)]['length']>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x415830=a162_0x2c1426[_0x116611(0x200)](process[_0x116611(0x1d0)](),_0x2b3329[_0x116611(0x1d5)]);if(a162_0x2c3aaa['existsSync'](_0x415830))throw new Error(_0x116611(0x1f9)+_0x2b3329['projectName']+'\x20already\x20exists');try{a162_0x2c3aaa[_0x116611(0x1e2)](a162_0x2c1426[_0x116611(0x1e6)](_0x415830),a162_0x2c3aaa['constants']['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x116611(0x1b8)](_0x415830),logger[_0x116611(0x1b7)](_0x116611(0x1de),_0x116611(0x1c7)+_0x2b3329[_0x116611(0x1d5)],{'projectDir':_0x415830,'appCode':_0x2b3329['appCode']}),console[_0x116611(0x1c3)](),console['log'](a162_0x25e2fd[_0x116611(0x1b4)](_0x116611(0x1b3))+_0x116611(0x1f3)+a162_0x25e2fd['green'](_0x2b3329[_0x116611(0x1d5)])+(_0x2b3329[_0x116611(0x1e1)]?_0x116611(0x1cd)+a162_0x25e2fd[_0x116611(0x1bf)](_0x2b3329['appCode']):''));try{await runTask(_0x116611(0x1bc),()=>copyProjectTemplate(_0x2b3329['projectName'])),await updatePackageJsonName(_0x2b3329['projectName']),await runTask('Install\x20dependencies',()=>installDependencies(_0x2b3329[_0x116611(0x1d5)])),await runTask('Format\x20code',()=>formatProjectCode(_0x2b3329[_0x116611(0x1d5)])),await configureAppCode(_0x2b3329[_0x116611(0x1d5)],_0x2b3329[_0x116611(0x1e1)]||'',_0x2b3329[_0x116611(0x1d3)]);let _0x374881=![];if(_0x2b3329[_0x116611(0x1e1)]){console['log'](_0x116611(0x1ff));const _0x3e1393=process[_0x116611(0x1d0)]();try{process[_0x116611(0x1c1)](_0x415830);const _0x206991=_0x2b3329[_0x116611(0x1d3)]||_0x116611(0x1ef);initEnv(_0x206991);const {configArray:_0x7f7326}=await fetchModelList(_0x2b3329[_0x116611(0x1e1)],_0xfe3ca1['cookie']||''),_0x6ba37f=DEFAULT_API_DIR,_0x3b0517=await generateApiFile(_0x7f7326,'',_0x2b3329[_0x116611(0x1e1)],!![],_0x206991,_0x6ba37f);console[_0x116611(0x1c3)]('√\x20Pulled\x20'+_0x7f7326[_0x116611(0x1fb)]+'\x20dataset(s),\x20generated\x20'+_0x3b0517[_0x116611(0x1f5)]+_0x116611(0x1d1)),logger['info']('create','API\x20configuration\x20pulled:\x20'+_0x2b3329[_0x116611(0x1e1)]);}catch(_0x2d5f37){_0x374881=!![],console[_0x116611(0x1c3)](_0x116611(0x1fe)),logger[_0x116611(0x1e4)](_0x116611(0x1de),_0x116611(0x1ca),{'error':_0x2d5f37 instanceof Error?_0x2d5f37['message']:String(_0x2d5f37)});}finally{process[_0x116611(0x1c1)](_0x3e1393);}}logger['success']('create',_0x116611(0x1eb)+_0x2b3329[_0x116611(0x1d5)]),console[_0x116611(0x1c3)](),console['log'](a162_0x25e2fd[_0x116611(0x1b4)]('─'[_0x116611(0x1e3)](0x3c))),console[_0x116611(0x1c3)](a162_0x25e2fd[_0x116611(0x1bf)][_0x116611(0x1b6)](_0x116611(0x1f8))),console['log'](),console[_0x116611(0x1c3)](_0x116611(0x1b0)+a162_0x25e2fd[_0x116611(0x1bf)][_0x116611(0x1b6)](_0x116611(0x1f0)+_0x2b3329['projectName']+_0x116611(0x1b5)+CLI_BIN_NAME+_0x116611(0x1d2))),_0x374881&&console[_0x116611(0x1c3)](_0x116611(0x1c6)+a162_0x25e2fd[_0x116611(0x1bf)][_0x116611(0x1b6)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x116611(0x1c3)](a162_0x25e2fd[_0x116611(0x1b4)]('─'[_0x116611(0x1e3)](0x3c)));}catch(_0x36a896){logger[_0x116611(0x1d6)](_0x116611(0x1de),_0x116611(0x1f1)+_0x2b3329[_0x116611(0x1d5)],{'error':_0x36a896 instanceof Error?_0x36a896[_0x116611(0x1d7)]:String(_0x36a896)});try{a162_0x2c3aaa[_0x116611(0x1b2)](_0x415830)&&(console['log'](_0x116611(0x1c0)+_0x415830),a162_0x2c3aaa['rmSync'](_0x415830,{'recursive':!![],'force':!![]}));}catch{logger[_0x116611(0x1e4)](_0x116611(0x1de),'清理项目目录失败:\x20'+_0x415830);}throw _0x36a896;}}async function runTask(_0x1bc032,_0x2036e6){const _0x3ee246=a162_0x6d33,_0x1ae4d0=a162_0x70df4a(_0x1bc032+_0x3ee246(0x1e8))[_0x3ee246(0x1e7)]();try{const _0x3bbafe=await _0x2036e6();_0x1ae4d0[_0x3ee246(0x1af)](),console[_0x3ee246(0x1c3)](''+a162_0x25e2fd[_0x3ee246(0x1b4)](_0x3ee246(0x1b3))+_0x1bc032+'\x20'+a162_0x25e2fd[_0x3ee246(0x1bd)]('['+_0x3bbafe+']'));}catch(_0x56dca1){_0x1ae4d0['fail'](_0x1bc032);throw _0x56dca1;}}function a162_0x1a8f(){const _0x2c3c12=['配置应用AppCode:\x20','modelCount','702TKWznp','240325fiIWoi','🚀\x20Next\x20Steps:','Project\x20directory\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','length','cookie','toLocaleString','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','*\x20Pulling\x20API\x20configuration...','resolve','28BGfJsT','trim','stringify','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','stop','\x20\x201.\x20Start\x20project:\x20','stableVersion','existsSync','\x20√\x20','green','\x20&&\x20','bold','info','setLogPath','readFileSync','√\x20package.json\x20updated:\x20name=','184779MpAfYZ','Copy\x20project\x20files','gray','√\x20Configuration\x20file\x20created,\x20Apps:\x20','cyan','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','chdir','Project\x20name\x20cannot\x20be\x20empty','log','54421356tDDaDB','version','\x20\x202.\x20Pull\x20API\x20configuration:\x20','开始创建项目:\x20','description','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','API\x20配置拉取异常','3046183rrqAkU','1.0.0','\x20|\x20AppCode:\x20','projectCode','name','cwd','\x20model(s)','\x20run\x20start','env','parse','projectName','error','message','needsUpgrade','package.json','40davWDC','join','keys','706811dZZiiH','create','defaultApp','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','appCode','accessSync','repeat','warn','24ZzwySj','dirname','start','...','232640LuyNGD','更新\x20package.json\x20name','项目创建完成:\x20','更新\x20package.json\x20失败','belowMinimum','utf8','production','cd\x20','项目创建失败:\x20','1658200RaeQMP','Project\x20name:\x20'];a162_0x1a8f=function(){return _0x2c3c12;};return a162_0x1a8f();}async function updatePackageJsonName(_0x9a33e1){const _0x224d4a=a162_0x6d33,_0x59816e=a162_0x2c1426['resolve'](process[_0x224d4a(0x1d0)](),_0x9a33e1),_0x17ac73=a162_0x2c1426[_0x224d4a(0x1db)](_0x59816e,_0x224d4a(0x1d9));try{console[_0x224d4a(0x1c3)](_0x224d4a(0x204));const _0x104644=getRabetbaseCliPackageRoot(),_0x26e58a=a162_0x2c1426[_0x224d4a(0x1db)](_0x104644,_0x224d4a(0x1d9));let _0xd9c5b5=_0x224d4a(0x1cc);try{const _0x2181c5=JSON['parse'](a162_0x2c3aaa[_0x224d4a(0x1b9)](_0x26e58a,_0x224d4a(0x1ee)));_0xd9c5b5=_0x2181c5[_0x224d4a(0x1c5)]||_0x224d4a(0x1cc);}catch{}const _0x17945c=a162_0x2c3aaa['readFileSync'](_0x17ac73,_0x224d4a(0x1ee)),_0x53700e=JSON[_0x224d4a(0x1d4)](_0x17945c);_0x53700e[_0x224d4a(0x1cf)]=_0x9a33e1,_0x53700e[_0x224d4a(0x1c8)]=_0x9a33e1+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0xd9c5b5,a162_0x2c3aaa['writeFileSync'](_0x17ac73,JSON[_0x224d4a(0x203)](_0x53700e,null,0x2)+'\x0a','utf8'),console[_0x224d4a(0x1c3)](_0x224d4a(0x1ba)+_0x9a33e1),logger[_0x224d4a(0x1b7)](_0x224d4a(0x1de),_0x224d4a(0x1ea));}catch(_0x50a80c){logger[_0x224d4a(0x1d6)](_0x224d4a(0x1de),_0x224d4a(0x1ec));throw _0x50a80c;}}async function configureAppCode(_0x5be3ef,_0x1693ab,_0x1060f8){const _0x52c165=a162_0x6d33,_0x5e4a31=a162_0x2c1426['resolve'](process[_0x52c165(0x1d0)](),_0x5be3ef),_0x39bd69=a162_0x2c1426['join'](_0x5e4a31,NEW_CONFIG_NAME);try{_0x1693ab?console[_0x52c165(0x1c3)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x5be3ef+':\x20'+_0x1693ab):console['log']('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x5be3ef);const _0x331b5f=getRabetbaseCliPackageRoot(),_0x18bd03=a162_0x2c1426[_0x52c165(0x1db)](_0x331b5f,_0x52c165(0x1d9));let _0x37c64f=_0x52c165(0x1cc);try{const _0x126a6b=JSON['parse'](a162_0x2c3aaa[_0x52c165(0x1b9)](_0x18bd03,_0x52c165(0x1ee)));_0x37c64f=_0x126a6b['version']||_0x52c165(0x1cc);}catch{}const _0x24e871=readConfig(),_0x5fe16c=typeof _0x24e871[_0x52c165(0x1d3)]==='string'?_0x24e871['env']:undefined,_0x5d3520={};for(const _0x323ead of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x24e871[_0x323ead]!=null)_0x5d3520[_0x323ead]=_0x24e871[_0x323ead];}const _0x2c4f48=buildCanonicalProjectConfig(_0x5d3520,{'appCodes':_0x1693ab?[_0x1693ab]:[],'env':_0x1060f8||_0x5fe16c||_0x52c165(0x1ef),'metadata':{'createdAt':new Date()[_0x52c165(0x1fd)](),'version':_0x37c64f}});writeConfigFile(_0x39bd69,_0x2c4f48),_0x1693ab?console[_0x52c165(0x1c3)](_0x52c165(0x1be)+Object[_0x52c165(0x1dc)](_0x2c4f48['apps']||{})['join'](',\x20')+'\x20|\x20Default:\x20'+_0x2c4f48[_0x52c165(0x1df)]):console[_0x52c165(0x1c3)](_0x52c165(0x1e0)+CLI_BIN_NAME+_0x52c165(0x1fa)),logger[_0x52c165(0x1b7)](_0x52c165(0x1de),_0x52c165(0x1f4)+_0x1693ab);}catch(_0x2caff9){logger[_0x52c165(0x1d6)](_0x52c165(0x1de),'配置应用AppCode失败');}}
|
|
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
|
-
(function(
|
|
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
|
-
(function(
|
|
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
|
-
|
|
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
|
-
const a169_0x3ad34d=a169_0x40c0;(function(_0x5a4709,_0x24a4f2){const _0x2fd8ce=a169_0x40c0,_0x32a8d4=_0x5a4709();while(!![]){try{const _0x3e0add=parseInt(_0x2fd8ce(0xd3))/0x1*(parseInt(_0x2fd8ce(0xed))/0x2)+-parseInt(_0x2fd8ce(0x111))/0x3+-parseInt(_0x2fd8ce(0x12f))/0x4+-parseInt(_0x2fd8ce(0x10a))/0x5*(parseInt(_0x2fd8ce(0xfc))/0x6)+-parseInt(_0x2fd8ce(0x129))/0x7*(parseInt(_0x2fd8ce(0x13a))/0x8)+parseInt(_0x2fd8ce(0xf7))/0x9*(-parseInt(_0x2fd8ce(0xcb))/0xa)+parseInt(_0x2fd8ce(0xc6))/0xb;if(_0x3e0add===_0x24a4f2)break;else _0x32a8d4['push'](_0x32a8d4['shift']());}catch(_0x5e8fab){_0x32a8d4['push'](_0x32a8d4['shift']());}}}(a169_0x311a,0x29173));import a169_0x5ea9a7 from'chalk';import a169_0x5f128a 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';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a169_0x3ad34d(0x126)](_0x3940df=>_0x3940df!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x46c863){const _0xb1e108=a169_0x3ad34d,_0x39d9f6=[];for(const _0x1330d1 of Object['values'](CORE_IDE_CONFIGS)){if(_0x1330d1[_0xb1e108(0x10b)])for(const _0x27433c of _0x1330d1[_0xb1e108(0x10b)]){_0x39d9f6[_0xb1e108(0xfa)](resolve(_0x46c863,_0x27433c[_0xb1e108(0xf1)]));}}return _0x39d9f6;}function analyse(_0x1f8077){const _0xe7667=a169_0x3ad34d;let _0x35dff4=null;const _0x5dd41b=resolve(_0x1f8077,NEW_CONFIG_NAME),_0x1184c7=existsSync(_0x5dd41b);for(const _0x5aa12c of LEGACY_CONFIG_NAMES){const _0x2c6df9=resolve(_0x1f8077,_0x5aa12c);if(existsSync(_0x2c6df9)){const _0xdbd6e6=readConfigFile(_0x2c6df9),_0x3790da=Object[_0xe7667(0x12c)](_0xdbd6e6)[_0xe7667(0x126)](_0x1f17eb=>typeof _0xdbd6e6[_0x1f17eb]!=='undefined');_0x35dff4={'oldPath':_0x2c6df9,'hasNewConfig':_0x1184c7,'fields':_0x3790da};break;}}const _0x40c812=[],_0x12fcc7=resolve(_0x1f8077,_0xe7667(0xf9));if(existsSync(_0x12fcc7))_0x40c812[_0xe7667(0xfa)](_0x12fcc7);const _0x30a688=resolve(_0x1f8077,_0xe7667(0x138));if(existsSync(_0x30a688))_0x40c812['push'](_0x30a688);const _0x23bbf4=resolve(_0x1f8077,_0xe7667(0xcc));if(existsSync(_0x23bbf4))_0x40c812['push'](_0x23bbf4);for(const _0x10d43d of collectIdeSkillFiles(_0x1f8077)){if(existsSync(_0x10d43d))_0x40c812['push'](_0x10d43d);}let _0x5dbbdc=null;const _0x3bd58c=resolve(_0x1f8077,_0xe7667(0x100));if(existsSync(_0x3bd58c))try{const _0x905a56=JSON[_0xe7667(0x137)](readFileSync(_0x3bd58c,'utf8'));if(_0x905a56?.[_0xe7667(0xd2)]&&typeof _0x905a56['mcpServers']===_0xe7667(0x11b)){const _0xeb4bf8=[];for(const [_0x578c96,_0x46b534]of Object[_0xe7667(0x12e)](_0x905a56[_0xe7667(0xd2)])){const _0x4dc6dd=_0x46b534;_0x4dc6dd?.[_0xe7667(0x118)]&&Array['isArray'](_0x4dc6dd[_0xe7667(0x118)])&&_0x4dc6dd[_0xe7667(0x118)][_0xe7667(0x104)](_0x6133a3=>typeof _0x6133a3==='string'&&_0x6133a3[_0xe7667(0x117)](_0xe7667(0x110)))&&_0xeb4bf8[_0xe7667(0xfa)](_0x578c96);}_0xeb4bf8[_0xe7667(0x11f)]>0x0&&(_0x5dbbdc={'path':_0x3bd58c,'keys':_0xeb4bf8});}}catch{}const _0x145e4d=_0x40c812[_0xe7667(0x11f)]>0x0||_0x35dff4!==null;let _0x306ff3=null;const _0x8ec355=resolve(_0x1f8077,'package.json');if(existsSync(_0x8ec355))try{const _0x3d5c5a=JSON[_0xe7667(0x137)](readFileSync(_0x8ec355,'utf8'));for(const _0x3fd350 of[_0xe7667(0xe6),_0xe7667(0x11a)]){const _0x211916=_0x3d5c5a?.[_0x3fd350]?.[_0xe7667(0x122)];if(typeof _0x211916===_0xe7667(0x114)){_0x211916!==_0xe7667(0x131)&&(_0x306ff3={'pkgPath':_0x8ec355,'currentVersion':_0x211916,'field':_0x3fd350});break;}}}catch{}return{'configMigration':_0x35dff4,'oldArtifacts':_0x40c812,'oldMcpConfig':_0x5dbbdc,'needsSkillSwap':_0x145e4d,'sdkUpgrade':_0x306ff3};}function printReport(_0x3129af){const _0x3943ee=a169_0x3ad34d,{configMigration:_0x1d30e1,oldArtifacts:_0xc08b34,oldMcpConfig:_0x5b74b4,needsSkillSwap:_0x2df657}=_0x3129af;console[_0x3943ee(0xe7)](''),console[_0x3943ee(0xe7)](a169_0x5ea9a7[_0x3943ee(0xf0)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x3943ee(0xe7)]('');_0x1d30e1?(console['log'](a169_0x5ea9a7['cyan'](_0x3943ee(0xf3))+('\x20\x20'+a169_0x5ea9a7['yellow'](_0x1d30e1['oldPath']))),console[_0x3943ee(0xe7)](_0x3943ee(0x134)+(_0x1d30e1[_0x3943ee(0x107)]?a169_0x5ea9a7[_0x3943ee(0xd6)](_0x3943ee(0xdf)):a169_0x5ea9a7[_0x3943ee(0xc4)](_0x3943ee(0xc5)))),console[_0x3943ee(0xe7)](_0x3943ee(0xbf)+_0x1d30e1[_0x3943ee(0xe9)]['join'](',\x20')),console[_0x3943ee(0xe7)](_0x3943ee(0xd0))):console[_0x3943ee(0xe7)](a169_0x5ea9a7[_0x3943ee(0x108)](_0x3943ee(0xf3))+'\x20\x20'+a169_0x5ea9a7[_0x3943ee(0xc4)](_0x3943ee(0x130)));console['log']('');if(_0xc08b34[_0x3943ee(0x11f)]>0x0){console[_0x3943ee(0xe7)](a169_0x5ea9a7['cyan'](_0x3943ee(0xf6)));for(const _0x5a2dd6 of _0xc08b34){console['log']('\x20\x20'+a169_0x5ea9a7['red'](_0x3943ee(0x139))+'\x20\x20'+_0x5a2dd6);}console[_0x3943ee(0xe7)](_0x3943ee(0x128));}else console['log'](a169_0x5ea9a7[_0x3943ee(0x108)](_0x3943ee(0xf6))+'\x20\x20'+a169_0x5ea9a7[_0x3943ee(0xc4)](_0x3943ee(0xef)));console[_0x3943ee(0xe7)]('');_0x5b74b4?(console[_0x3943ee(0xe7)](a169_0x5ea9a7['cyan'](_0x3943ee(0xd7))+('\x20\x20'+a169_0x5ea9a7['yellow'](_0x5b74b4[_0x3943ee(0xf1)])+'\x20→\x20keys:\x20'+_0x5b74b4[_0x3943ee(0x12c)]['join'](',\x20'))),console['log'](_0x3943ee(0x132))):console[_0x3943ee(0xe7)](a169_0x5ea9a7['cyan']('MCP\x20config:')+'\x20\x20'+a169_0x5ea9a7[_0x3943ee(0xc4)](_0x3943ee(0xe5)));console[_0x3943ee(0xe7)](''),console[_0x3943ee(0xe7)](a169_0x5ea9a7[_0x3943ee(0x108)](_0x3943ee(0xce))+('\x20\x20'+(_0x2df657?a169_0x5ea9a7[_0x3943ee(0x112)](_0x3943ee(0xe3)):a169_0x5ea9a7[_0x3943ee(0xd6)]('not\x20needed'))));_0x2df657&&console[_0x3943ee(0xe7)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x3943ee(0xe7)]('');if(_0x3129af[_0x3943ee(0xde)]){const {currentVersion:_0x58c613,field:_0x52a6c0,pkgPath:_0x1aa92c}=_0x3129af[_0x3943ee(0xde)];console[_0x3943ee(0xe7)](a169_0x5ea9a7[_0x3943ee(0x108)](_0x3943ee(0x133))+('\x20\x20'+a169_0x5ea9a7['yellow'](_0x1aa92c))),console[_0x3943ee(0xe7)](_0x3943ee(0x125)+_0x52a6c0+':\x20'+a169_0x5ea9a7['yellow'](_0x58c613)+_0x3943ee(0xea)+a169_0x5ea9a7[_0x3943ee(0xd6)]('latest')),console[_0x3943ee(0xe7)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0x3943ee(0xe7)](a169_0x5ea9a7[_0x3943ee(0x108)](_0x3943ee(0x133))+'\x20\x20'+a169_0x5ea9a7[_0x3943ee(0xc4)](_0x3943ee(0xe4)));console['log']('');}function execConfigMigration(_0xf0775a,_0x4fc354){const _0x270cec=a169_0x3ad34d,{configMigration:_0x542bcf}=_0xf0775a;if(!_0x542bcf?.[_0x270cec(0x121)])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x270cec(0xc1)};const _0xf084c3=readConfigFile(_0x542bcf[_0x270cec(0x121)]),_0x1d5d69=resolve(_0x4fc354,NEW_CONFIG_NAME),_0x3fbf64=_0x542bcf[_0x270cec(0x107)]?readConfigFile(_0x1d5d69):{};for(const [_0x5b2f41,_0x28ba05]of Object['entries'](_0xf084c3)){!(_0x5b2f41 in _0x3fbf64)&&(_0x3fbf64[_0x5b2f41]=_0x28ba05);}writeConfigFile(_0x1d5d69,_0x3fbf64);const _0x22939e=_0x542bcf[_0x270cec(0x121)]+_0x270cec(0xc7);return renameSync(_0x542bcf[_0x270cec(0x121)],_0x22939e),{'step':0x1,'label':_0x270cec(0xfb),'ok':!![],'detail':_0x542bcf[_0x270cec(0x121)]+_0x270cec(0xea)+_0x1d5d69+_0x270cec(0xbb)+_0x22939e+')'};}function execRemoveOldArtifacts(_0x52d9e8){const _0x5f1976=a169_0x3ad34d,_0x441cbf=[];for(const _0x39721e of _0x52d9e8){try{if(!existsSync(_0x39721e))continue;const _0x54be9f=tryStat(_0x39721e);_0x54be9f?.['isDirectory']()?rmSync(_0x39721e,{'recursive':!![],'force':!![]}):unlinkSync(_0x39721e);}catch(_0x282b0f){_0x441cbf[_0x5f1976(0xfa)](_0x39721e+':\x20'+_0x282b0f['message']);}}return{'step':0x3,'label':_0x5f1976(0xe8),'ok':_0x441cbf['length']===0x0,'detail':_0x441cbf[_0x5f1976(0x11f)]>0x0?_0x52d9e8[_0x5f1976(0x11f)]-_0x441cbf[_0x5f1976(0x11f)]+'/'+_0x52d9e8[_0x5f1976(0x11f)]+_0x5f1976(0xda)+_0x441cbf[_0x5f1976(0xd9)](';\x20')+')':_0x52d9e8[_0x5f1976(0x11f)]+'\x20removed'};}function a169_0x40c0(_0x1ae9c7,_0x16e694){_0x1ae9c7=_0x1ae9c7-0xbb;const _0x311ad7=a169_0x311a();let _0x40c01e=_0x311ad7[_0x1ae9c7];return _0x40c01e;}function execCleanMcp(_0x3c813d){const _0xf0890=a169_0x3ad34d;if(!_0x3c813d[_0xf0890(0x115)])return{'step':0x4,'label':_0xf0890(0x113),'ok':!![],'detail':_0xf0890(0xc9)};try{const _0x5af279=readFileSync(_0x3c813d['oldMcpConfig'][_0xf0890(0xf1)],_0xf0890(0xdb)),_0x44538d=JSON[_0xf0890(0x137)](_0x5af279);if(_0x44538d?.['mcpServers']&&typeof _0x44538d['mcpServers']===_0xf0890(0x11b)){const _0x58bca2=[];for(const [_0x411ba8,_0x443ca4]of Object[_0xf0890(0x12e)](_0x44538d[_0xf0890(0xd2)])){_0x443ca4?.[_0xf0890(0x118)]&&Array['isArray'](_0x443ca4[_0xf0890(0x118)])&&_0x443ca4[_0xf0890(0x118)][_0xf0890(0x104)](_0x19bb0d=>typeof _0x19bb0d===_0xf0890(0x114)&&_0x19bb0d[_0xf0890(0x117)](_0xf0890(0x110)))&&_0x58bca2[_0xf0890(0xfa)](_0x411ba8);}for(const _0x2b3609 of _0x58bca2){delete _0x44538d['mcpServers'][_0x2b3609];}return _0x58bca2[_0xf0890(0x11f)]>0x0&&writeFileSync(_0x3c813d[_0xf0890(0x115)][_0xf0890(0xf1)],JSON[_0xf0890(0xff)](_0x44538d,null,0x2)+'\x0a',_0xf0890(0xdb)),{'step':0x4,'label':_0xf0890(0x113),'ok':!![],'detail':'removed\x20'+_0x58bca2['join'](',\x20')+'\x20from\x20'+_0x3c813d[_0xf0890(0x115)]['path']};}return{'step':0x4,'label':_0xf0890(0x113),'ok':!![],'detail':_0xf0890(0x136)};}catch(_0x4f0e00){return{'step':0x4,'label':_0xf0890(0x113),'ok':![],'detail':_0x4f0e00[_0xf0890(0xca)]};}}function execSkillsRemove(_0x1ebdb7,_0x15985b){const _0x229186=a169_0x3ad34d,_0x669871=runNpxSkillsRemove(_0x1ebdb7,{'stdio':'inherit','yes':_0x15985b});return{'step':0x5,'label':_0x229186(0x127),'ok':_0x669871['ok'],'detail':_0x669871['ok']?'lovrabet/lovrabet-skill\x20removed':_0x669871[_0x229186(0x11d)]??_0x229186(0xeb)+_0x669871['status']};}function execSkillsAdd(_0x5c8649,_0x4dcc56){const _0x3b494c=a169_0x3ad34d,_0x36b37d=runNpxSkillsAddGlobal(_0x5c8649,_0x3b494c(0xfd),{'stdio':_0x3b494c(0x103),'yes':_0x4dcc56});return{'step':0x6,'label':_0x3b494c(0x12a),'ok':_0x36b37d['ok'],'detail':_0x36b37d['ok']?_0x3b494c(0x12b):_0x36b37d[_0x3b494c(0x11d)]??'exit\x20'+_0x36b37d[_0x3b494c(0xfe)]};}function execUpgradeSdk(_0x1df9e9){const _0x504d9c=a169_0x3ad34d;if(!_0x1df9e9[_0x504d9c(0xde)])return{'step':0x7,'label':_0x504d9c(0xbc),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x246ca9,currentVersion:_0x5ca9d8,field:_0x6f9929}=_0x1df9e9['sdkUpgrade'];try{const _0x21361f=readFileSync(_0x246ca9,_0x504d9c(0xdb)),_0x44c052=JSON[_0x504d9c(0x137)](_0x21361f);return _0x44c052[_0x6f9929][_0x504d9c(0x122)]=_0x504d9c(0x131),writeFileSync(_0x246ca9,JSON[_0x504d9c(0xff)](_0x44c052,null,0x2)+'\x0a',_0x504d9c(0xdb)),{'step':0x7,'label':_0x504d9c(0xbc),'ok':!![],'detail':_0x6f9929+_0x504d9c(0x106)+_0x5ca9d8+_0x504d9c(0xcf)};}catch(_0x389e01){return{'step':0x7,'label':_0x504d9c(0xbc),'ok':![],'detail':_0x389e01[_0x504d9c(0xca)]};}}function tryStat(_0x2c4751){try{return statSync(_0x2c4751);}catch{return undefined;}}function printSummary(_0x157631){const _0x539a99=a169_0x3ad34d;console[_0x539a99(0xe7)](''),console[_0x539a99(0xe7)](a169_0x5ea9a7[_0x539a99(0xf0)]('===\x20Upgrade\x20Summary\x20===')),console['log']('');for(const _0x291b69 of _0x157631){const _0x4e2989=_0x291b69['ok']?a169_0x5ea9a7[_0x539a99(0xd6)]('OK'):a169_0x5ea9a7['red'](_0x539a99(0xd5));console[_0x539a99(0xe7)]('\x20\x20'+_0x4e2989+_0x539a99(0xc0)+_0x291b69[_0x539a99(0xe1)]+':\x20'+_0x291b69[_0x539a99(0xec)]);if(_0x291b69['detail'])console[_0x539a99(0xe7)](_0x539a99(0xdd)+a169_0x5ea9a7['gray'](_0x291b69[_0x539a99(0x12d)]));}console[_0x539a99(0xe7)]('');}function a169_0x311a(){const _0x23e722=['hasNewConfig','cyan','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','37130BBpyFe','files','start','Step\x201/7:\x20Migrating\x20config...','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Step\x204/7:\x20Cleaning\x20MCP\x20config...','@lovrabet/dataset-mcp-server','605955MmnDiH','yellow','Clean\x20MCP\x20config','string','oldMcpConfig','Remove\x20.lovrabet/','includes','args','fail','devDependencies','object','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','error','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','length','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','oldPath','@lovrabet/sdk','\x20\x20bun\x20install','Proceed\x20with\x20upgrade?','\x20\x20Current\x20version\x20in\x20','filter','Remove\x20old\x20skill','\x20\x20Action:\x20delete','14fGSvxC','Install\x20new\x20skill','lovrabet/rabetbase\x20installed\x20globally','keys','detail','entries','684980cBuQWX','no\x20legacy\x20config\x20found','latest','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','@lovrabet/sdk:','\x20\x20New\x20config\x20(.rabetbase.json):\x20','failed','no\x20matching\x20entry\x20found','parse','.cursor/rules/lovrabet_rules.mdc','FOUND','32288gdiSLZ','\x20(backup:\x20','Upgrade\x20@lovrabet/sdk','white','needsSkillSwap','\x20\x20Fields\x20to\x20migrate:\x20','\x20\x20Step\x20','skipped\x20(no\x20legacy\x20config)','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','gray','not\x20found\x20(will\x20create)','7724860UYpdkj','.bak','Step\x205/7:\x20Removing\x20old\x20skill...','skipped','message','40UvQbJY','.claude/skills/lovrabet','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','Skill\x20swap:','\x20→\x20latest','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','mcpServers','643oHEuyn','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','FAIL','green','MCP\x20config:','done','join','\x20removed\x20(','utf8','\x20\x20#\x20or','\x20\x20\x20\x20\x20\x20\x20','sdkUpgrade','already\x20exists\x20(will\x20merge)','Upgrade\x20completed\x20successfully!','step','info','needed','not\x20found\x20or\x20already\x20at\x20latest','no\x20legacy\x20entry','dependencies','log','Remove\x20legacy\x20artifacts','fields','\x20→\x20','exit\x20','label','542NjWYuV','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','none\x20found','bold','path','succeed','Config\x20file:','Step\x201/7:\x20Config\x20migration\x20—\x20','oldArtifacts','Legacy\x20artifacts:','200862vtjqcR','Step\x206/7:\x20Installing\x20new\x20skill...','.lovrabet','push','Config\x20migration','192WCHYoJ','lovrabet/rabetbase','status','stringify','.cursor/mcp.json','\x20\x20npm\x20install','Upgrade\x20cancelled.','inherit','some','yes','[\x22@lovrabet/sdk\x22]:\x20'];a169_0x311a=function(){return _0x23e722;};return a169_0x311a();}export async function upgradeApp(_0x3f189f,_0x694ec0){const _0x59258e=a169_0x3ad34d,_0x346d58=process['cwd'](),_0x302414=analyse(_0x346d58),_0x306650=!_0x302414['configMigration']&&_0x302414[_0x59258e(0xf5)]['length']===0x0&&!_0x302414[_0x59258e(0x115)]&&!_0x302414[_0x59258e(0xbe)]&&!_0x302414[_0x59258e(0xde)];if(_0x306650){console[_0x59258e(0xe7)](a169_0x5ea9a7[_0x59258e(0xd6)](_0x59258e(0x120)));return;}printReport(_0x302414);const _0x46ac43=!!(_0x694ec0[_0x59258e(0x105)]||_0x694ec0['Y']||_0x3f189f);if(!_0x46ac43)try{const _0x124725=await askConfirm(_0x59258e(0x124));if(!_0x124725){console[_0x59258e(0xe7)](a169_0x5ea9a7[_0x59258e(0xc4)](_0x59258e(0x102)));return;}}catch(_0x440630){if(_0x440630?.[_0x59258e(0xca)]==='CANCEL'){console['log'](a169_0x5ea9a7[_0x59258e(0xc4)](_0x59258e(0x102)));return;}throw _0x440630;}const _0x1197f0=[],_0x1b154f=a169_0x5f128a({'text':_0x59258e(0x10d),'color':_0x59258e(0x108)})['start'](),_0xfe1f08=execConfigMigration(_0x302414,_0x346d58);_0x1197f0[_0x59258e(0xfa)](_0xfe1f08),_0x1b154f[_0xfe1f08['ok']?_0x59258e(0xf2):_0x59258e(0x119)](_0x59258e(0xf4)+(_0xfe1f08[_0x59258e(0x12d)]??(_0xfe1f08['ok']?_0x59258e(0xd8):_0x59258e(0x135))));const _0x4441a8=resolve(_0x346d58,_0x59258e(0xf9)),_0x4e1b29=a169_0x5f128a({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':'cyan'})[_0x59258e(0x10c)]();if(existsSync(_0x4441a8))try{rmSync(_0x4441a8,{'recursive':!![],'force':!![]}),_0x4e1b29[_0x59258e(0xf2)](_0x59258e(0xc3)),_0x1197f0[_0x59258e(0xfa)]({'step':0x2,'label':_0x59258e(0x116),'ok':!![]});}catch(_0x17fc96){_0x4e1b29[_0x59258e(0x119)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x17fc96['message']),_0x1197f0[_0x59258e(0xfa)]({'step':0x2,'label':_0x59258e(0x116),'ok':![],'detail':_0x17fc96[_0x59258e(0xca)]});}else _0x4e1b29[_0x59258e(0xe2)](_0x59258e(0xc2)),_0x1197f0[_0x59258e(0xfa)]({'step':0x2,'label':_0x59258e(0x116),'ok':!![],'detail':_0x59258e(0xc9)});const _0x20bb81=a169_0x5f128a({'text':_0x59258e(0x11e),'color':_0x59258e(0x108)})[_0x59258e(0x10c)](),_0x281de8=execRemoveOldArtifacts(_0x302414[_0x59258e(0xf5)]);_0x1197f0[_0x59258e(0xfa)](_0x281de8),_0x20bb81[_0x281de8['ok']?_0x59258e(0xf2):_0x59258e(0x119)](_0x59258e(0xd4)+(_0x281de8[_0x59258e(0x12d)]??(_0x281de8['ok']?'done':_0x59258e(0x135))));const _0x10c5d8=a169_0x5f128a({'text':_0x59258e(0x10f),'color':_0x59258e(0x108)})[_0x59258e(0x10c)](),_0x6aad80=execCleanMcp(_0x302414);_0x1197f0[_0x59258e(0xfa)](_0x6aad80),_0x10c5d8[_0x6aad80['ok']?_0x59258e(0xf2):'fail']('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x6aad80[_0x59258e(0x12d)]??(_0x6aad80['ok']?_0x59258e(0xd8):_0x59258e(0x135))));const _0x1c6fc8=a169_0x5f128a({'text':_0x59258e(0xc8),'color':_0x59258e(0x108)})[_0x59258e(0x10c)](),_0x3cf296=execSkillsRemove(_0x346d58,_0x46ac43);_0x1197f0[_0x59258e(0xfa)](_0x3cf296),_0x1c6fc8[_0x3cf296['ok']?_0x59258e(0xf2):_0x59258e(0x119)](_0x59258e(0xcd)+(_0x3cf296['detail']??(_0x3cf296['ok']?'done':_0x59258e(0x135))));const _0x1a3ea0=a169_0x5f128a({'text':_0x59258e(0xf8),'color':_0x59258e(0x108)})['start'](),_0x108ae9=execSkillsAdd(_0x346d58,_0x46ac43);_0x1197f0['push'](_0x108ae9),_0x1a3ea0[_0x108ae9['ok']?'succeed':'fail'](_0x59258e(0x10e)+(_0x108ae9['detail']??(_0x108ae9['ok']?'done':'failed')));const _0x3ef299=a169_0x5f128a({'text':_0x59258e(0xd1),'color':_0x59258e(0x108)})[_0x59258e(0x10c)](),_0x327c38=execUpgradeSdk(_0x302414);_0x1197f0[_0x59258e(0xfa)](_0x327c38),_0x3ef299[_0x327c38['ok']?_0x59258e(0xf2):_0x59258e(0x119)](_0x59258e(0xee)+(_0x327c38[_0x59258e(0x12d)]??(_0x327c38['ok']?_0x59258e(0xd8):_0x59258e(0x135)))),printSummary(_0x1197f0);const _0x4950ba=_0x1197f0[_0x59258e(0x104)](_0x4f2aa8=>!_0x4f2aa8['ok']);_0x4950ba?console[_0x59258e(0xe7)](a169_0x5ea9a7[_0x59258e(0x112)](_0x59258e(0x109))):console[_0x59258e(0xe7)](a169_0x5ea9a7['green'](_0x59258e(0xe0))),_0x327c38['ok']&&_0x302414[_0x59258e(0xde)]&&(console[_0x59258e(0xe7)](''),console[_0x59258e(0xe7)](a169_0x5ea9a7[_0x59258e(0xf0)]['cyan'](_0x59258e(0x11c))),console[_0x59258e(0xe7)](a169_0x5ea9a7[_0x59258e(0x108)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x59258e(0xe7)](''),console['log'](a169_0x5ea9a7['white'](_0x59258e(0x101))),console['log'](a169_0x5ea9a7[_0x59258e(0xbd)](_0x59258e(0xdc))),console[_0x59258e(0xe7)](a169_0x5ea9a7['white'](_0x59258e(0x123))),console[_0x59258e(0xe7)](''));}
|
|
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)](''));}
|