nexus-framework 0.2.5__tar.gz → 0.2.6__tar.gz
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.
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/PKG-INFO +1 -1
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/pyproject.toml +1 -1
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/__init__.py +1 -1
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/cli.py +5 -1
- nexus_framework-0.2.6/src/nexus/console/commands/new_command.py +266 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/foundation/application.py +3 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/routing/router.py +23 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/starters/standard.py +9 -6
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/view/factory.py +15 -9
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus_framework.egg-info/PKG-INFO +1 -1
- nexus_framework-0.2.5/src/nexus/console/commands/new_command.py +0 -132
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/README.md +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/setup.cfg +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/application.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/access/gate.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/auth_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/authenticatable.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/guard.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/hashing.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/manager.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/middleware.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/sanctum/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/sanctum/guard.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/sanctum/has_api_tokens.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/sanctum/middleware.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/sanctum/migration.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/sanctum/new_access_token.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/sanctum/personal_access_token.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/user_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/cache/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/cache/cache_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/cache/driver.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/cache/manager.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/cache/store.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/config/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/config/repository.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/command.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/commands/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/commands/clear.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/commands/config.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/commands/database.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/commands/key_generate.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/commands/make.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/commands/queue.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/commands/route_list.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/commands/schedule.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/commands/serve.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/commands/starter.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/commands/tinker.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/console_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/generators/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/generators/stubs.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/console/kernel.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/container/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/container/container.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/container/exceptions.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/connection.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/database_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/factory.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/migrations/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/migrations/migration.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/migrations/migrator.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/models/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/models/exceptions.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/models/model.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/models/relations/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/models/relations/base.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/models/relations/belongs_to.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/models/relations/belongs_to_many.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/models/relations/has_many.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/models/relations/has_one.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/models/soft_deletes.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/query/builder.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/schema/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/schema/blueprint.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/schema/schema.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/database/seeder.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/events/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/events/dispatcher.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/events/event_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/exceptions/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/exceptions/exception_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/exceptions/handler.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/app.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/artisan.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/auth.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/cache.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/config.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/date.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/db.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/event.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/facade.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/gate.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/hash.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/inertia.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/log.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/mail.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/notification.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/queue.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/rate_limiter.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/request.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/route.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/schedule.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/schema.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/session.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/storage.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/telescope.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/url.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/validator.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/facades/view.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/filesystem/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/filesystem/driver.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/filesystem/filesystem_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/filesystem/manager.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/foundation/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/foundation/provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/foundation/runner.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/foundation/service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/http/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/http/exceptions.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/http/middleware.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/http/request.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/http/requests/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/http/requests/form_request.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/http/resources/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/http/resources/json_resource.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/http/resources/resource_collection.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/http/response.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/http/uploaded_file.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/inertia/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/inertia/helpers.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/inertia/inertia.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/inertia/inertia_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/inertia/lazy.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/inertia/middleware.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/inertia/response.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/logging/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/logging/logging_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/logging/manager.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/mail/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/mail/mail_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/mail/mailable.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/mail/manager.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/mail/transport.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/notifications/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/notifications/manager.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/notifications/notification.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/notifications/notification_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/py.typed +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/queue/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/queue/driver.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/queue/job.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/queue/manager.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/queue/queue_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/queue/worker.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/routing/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/routing/limiter.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/routing/route.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/routing/throttle.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/routing/url.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/schedule/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/schedule/event.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/schedule/schedule.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/schedule/schedule_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/security/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/security/cors.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/security/csrf.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/security/headers.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/session/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/session/driver.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/session/manager.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/session/middleware.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/session/session.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/session/session_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/starters/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/starters/api.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/starters/inertia.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/starters/openapi.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/starters/web.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/support/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/support/arr.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/support/carbon.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/support/collection.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/support/env.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/support/helpers.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/support/str.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/telescope/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/telescope/debugbar.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/telescope/entry.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/telescope/middleware.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/telescope/telescope.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/telescope/telescope_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/client.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/database.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/fakes/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/fakes/event_fake.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/fakes/log_fake.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/fakes/mail_fake.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/fakes/notification_fake.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/fakes/queue_fake.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/fakes/storage_fake.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/response.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/test_case.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/testing/time.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/validation/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/validation/rule.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/validation/validation_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/validation/validator.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/view/__init__.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/view/compiler.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/view/view_service_provider.py +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus_framework.egg-info/SOURCES.txt +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus_framework.egg-info/dependency_links.txt +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus_framework.egg-info/entry_points.txt +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus_framework.egg-info/requires.txt +0 -0
- {nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus_framework.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nexus-framework
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: An expressive, batteries-included asynchronous web framework for Python inspired by Laravel.
|
|
5
5
|
Author-email: Nexus Core Team <core@nexus-framework.org>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "nexus-framework"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.6"
|
|
8
8
|
description = "An expressive, batteries-included asynchronous web framework for Python inspired by Laravel."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -15,7 +15,11 @@ if TYPE_CHECKING:
|
|
|
15
15
|
|
|
16
16
|
def main() -> None:
|
|
17
17
|
"""Main CLI entrypoint for the `nexus` command."""
|
|
18
|
-
cwd = Path(os.getcwd())
|
|
18
|
+
cwd = Path(os.getcwd()).resolve()
|
|
19
|
+
cwd_str = str(cwd)
|
|
20
|
+
if cwd_str not in sys.path:
|
|
21
|
+
sys.path.insert(0, cwd_str)
|
|
22
|
+
|
|
19
23
|
app = Application(base_path=cwd)
|
|
20
24
|
kernel: ConsoleKernel = app.make("console.kernel")
|
|
21
25
|
exit_code = kernel.handle(sys.argv[1:])
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
"""Nexus New Project Scaffolding CLI Command."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import shutil
|
|
6
|
+
import subprocess
|
|
7
|
+
import sys
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
from typing import TYPE_CHECKING
|
|
10
|
+
|
|
11
|
+
import typer
|
|
12
|
+
from rich.console import Console
|
|
13
|
+
from rich.panel import Panel
|
|
14
|
+
from rich.prompt import Confirm, Prompt
|
|
15
|
+
|
|
16
|
+
from nexus.console.commands.key_generate import set_app_key_in_env
|
|
17
|
+
from nexus.starters.api import ApiStarter
|
|
18
|
+
from nexus.starters.inertia import InertiaStarter
|
|
19
|
+
from nexus.starters.standard import StandardStarter
|
|
20
|
+
from nexus.starters.web import WebStarter
|
|
21
|
+
|
|
22
|
+
if TYPE_CHECKING:
|
|
23
|
+
from nexus.foundation.application import Application
|
|
24
|
+
|
|
25
|
+
console = Console()
|
|
26
|
+
|
|
27
|
+
BANNER = r"""
|
|
28
|
+
_ __
|
|
29
|
+
/ |/ /__ __ __ __ ___
|
|
30
|
+
/ // -_)\ \ // // _ \
|
|
31
|
+
/_/|_/ \__//_\_\ \_,_/_//_/
|
|
32
|
+
Nexus Framework - Python 3.12+
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
IGNORED_EXISTING_NAMES = {
|
|
37
|
+
".venv",
|
|
38
|
+
"venv",
|
|
39
|
+
"ENV",
|
|
40
|
+
"env",
|
|
41
|
+
".git",
|
|
42
|
+
".idea",
|
|
43
|
+
".vscode",
|
|
44
|
+
".DS_Store",
|
|
45
|
+
"Thumbs.db",
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def register_new_command(cli: typer.Typer, app: Application) -> None:
|
|
50
|
+
"""Register 'new' project creation command."""
|
|
51
|
+
|
|
52
|
+
@cli.command("new", help="Create a brand-new Nexus application skeleton (Laravel style)")
|
|
53
|
+
def new_project(
|
|
54
|
+
name: str | None = typer.Argument(None, help="The project name or directory (use '.' for current directory)"),
|
|
55
|
+
starter: str | None = typer.Option(None, "--starter", "-s", help="Starter kit template ('standard', 'api', 'web', 'inertia')"),
|
|
56
|
+
database: str | None = typer.Option(None, "--database", "-d", help="Database driver ('sqlite', 'pgsql', 'mysql')"),
|
|
57
|
+
force: bool = typer.Option(False, "--force", "-f", help="Overwrite existing files in target directory"),
|
|
58
|
+
git: bool | None = typer.Option(None, "--git/--no-git", help="Initialize a fresh Git repository"),
|
|
59
|
+
install: bool | None = typer.Option(None, "--install/--no-install", help="Automatically install Python and NPM dependencies"),
|
|
60
|
+
no_interaction: bool = typer.Option(False, "--no-interaction", "-n", help="Do not ask any interactive questions"),
|
|
61
|
+
) -> None:
|
|
62
|
+
console.print(f"[bold cyan]{BANNER}[/bold cyan]")
|
|
63
|
+
|
|
64
|
+
# Check if interactive prompts should be presented
|
|
65
|
+
is_interactive = sys.stdin.isatty() and not no_interaction
|
|
66
|
+
|
|
67
|
+
# 1. Project name prompt
|
|
68
|
+
if not name:
|
|
69
|
+
if is_interactive:
|
|
70
|
+
name = Prompt.ask(
|
|
71
|
+
"[bold cyan]What is your project name or directory?[/bold cyan]",
|
|
72
|
+
default="nexus-app",
|
|
73
|
+
)
|
|
74
|
+
else:
|
|
75
|
+
name = "nexus-app"
|
|
76
|
+
|
|
77
|
+
# 2. Starter kit prompt
|
|
78
|
+
starter_choice = (starter or "standard").lower().strip()
|
|
79
|
+
if is_interactive and starter is None:
|
|
80
|
+
console.print("\n[bold cyan]Which starter kit would you like to install?[/bold cyan]")
|
|
81
|
+
console.print(" [bold green]1) standard[/bold green] - Full-Stack Blade Directives + Tailwind CSS v4 + Alpine.js [dim](Recommended)[/dim]")
|
|
82
|
+
console.print(" [bold blue]2) api[/bold blue] - High-Performance REST API + Swagger & Sanctum")
|
|
83
|
+
console.print(" [bold magenta]3) inertia[/bold magenta] - Modern SPA Monolith with Inertia.js (React / Vue)")
|
|
84
|
+
console.print(" [bold yellow]4) web[/bold yellow] - Minimal Web Starter")
|
|
85
|
+
choice_map = {
|
|
86
|
+
"1": "standard", "standard": "standard",
|
|
87
|
+
"2": "api", "api": "api",
|
|
88
|
+
"3": "inertia", "inertia": "inertia",
|
|
89
|
+
"4": "web", "web": "web",
|
|
90
|
+
}
|
|
91
|
+
raw_choice = Prompt.ask("Choose starter kit", choices=list(choice_map.keys()), default="1")
|
|
92
|
+
starter_choice = choice_map[raw_choice]
|
|
93
|
+
|
|
94
|
+
# 3. Database prompt
|
|
95
|
+
db_choice = (database or "sqlite").lower().strip()
|
|
96
|
+
if is_interactive and database is None:
|
|
97
|
+
console.print("\n[bold cyan]Which database will your application use?[/bold cyan]")
|
|
98
|
+
console.print(" [bold green]1) sqlite[/bold green] - Zero-configuration local database [dim](Recommended)[/dim]")
|
|
99
|
+
console.print(" [bold blue]2) postgresql[/bold blue] - Production PostgreSQL database")
|
|
100
|
+
console.print(" [bold yellow]3) mysql[/bold yellow] - MySQL / MariaDB database")
|
|
101
|
+
db_map = {
|
|
102
|
+
"1": "sqlite", "sqlite": "sqlite",
|
|
103
|
+
"2": "pgsql", "pgsql": "pgsql", "postgresql": "pgsql", "postgres": "pgsql",
|
|
104
|
+
"3": "mysql", "mysql": "mysql",
|
|
105
|
+
}
|
|
106
|
+
raw_db = Prompt.ask("Choose database engine", choices=list(db_map.keys()), default="1")
|
|
107
|
+
db_choice = db_map[raw_db]
|
|
108
|
+
|
|
109
|
+
# 4. Git repository prompt
|
|
110
|
+
use_git = git if git is not None else True
|
|
111
|
+
if is_interactive and git is None:
|
|
112
|
+
use_git = Confirm.ask("\nInitialize a fresh Git repository?", default=True)
|
|
113
|
+
|
|
114
|
+
# 5. Dependency installation prompt
|
|
115
|
+
should_install = install if install is not None else True
|
|
116
|
+
if is_interactive and install is None:
|
|
117
|
+
should_install = Confirm.ask("Automatically install Python & NPM dependencies now?", default=True)
|
|
118
|
+
|
|
119
|
+
target = Path(name).resolve()
|
|
120
|
+
is_current_dir = name.strip() == "."
|
|
121
|
+
app_name = target.name if target.name else "NexusApp"
|
|
122
|
+
|
|
123
|
+
if target.exists() and not force:
|
|
124
|
+
existing_items = [
|
|
125
|
+
item for item in target.iterdir()
|
|
126
|
+
if item.name not in IGNORED_EXISTING_NAMES
|
|
127
|
+
]
|
|
128
|
+
if existing_items:
|
|
129
|
+
try:
|
|
130
|
+
should_continue = typer.confirm(
|
|
131
|
+
f"Target directory [{target}] contains {len(existing_items)} existing file(s). Scaffold anyway?",
|
|
132
|
+
default=False,
|
|
133
|
+
)
|
|
134
|
+
except Exception: # noqa: BLE001
|
|
135
|
+
should_continue = False
|
|
136
|
+
|
|
137
|
+
if not should_continue:
|
|
138
|
+
console.print(f"[bold yellow]Warning:[/bold yellow] Target directory [{target}] is not empty. Use [bold]--force[/bold] to overwrite.")
|
|
139
|
+
raise typer.Exit(code=1)
|
|
140
|
+
force = True
|
|
141
|
+
|
|
142
|
+
target.mkdir(parents=True, exist_ok=True)
|
|
143
|
+
|
|
144
|
+
console.print(f"\n[bold blue]Scaffolding Nexus application:[/bold blue] [cyan]{app_name}[/cyan] in [dim]{target}[/dim]")
|
|
145
|
+
console.print(f"[dim]Starter preset: [bold cyan]{starter_choice}[/bold cyan] | Database: [bold cyan]{db_choice}[/bold cyan][/dim]\n")
|
|
146
|
+
|
|
147
|
+
created_files: list[Path] = []
|
|
148
|
+
if starter_choice == "standard":
|
|
149
|
+
scaffolder = StandardStarter(target, app_name=app_name)
|
|
150
|
+
created_files = scaffolder.install(force=force)
|
|
151
|
+
elif starter_choice == "web":
|
|
152
|
+
# Start with standard and overlay web starter
|
|
153
|
+
StandardStarter(target, app_name=app_name).install(force=force)
|
|
154
|
+
created_files = WebStarter(target).install(force=force)
|
|
155
|
+
elif starter_choice == "api":
|
|
156
|
+
StandardStarter(target, app_name=app_name).install(force=force)
|
|
157
|
+
created_files = ApiStarter(target).install(force=force)
|
|
158
|
+
elif starter_choice == "inertia":
|
|
159
|
+
StandardStarter(target, app_name=app_name).install(force=force)
|
|
160
|
+
created_files = InertiaStarter(target).install(force=force)
|
|
161
|
+
else:
|
|
162
|
+
console.print(f"[bold red]Error:[/bold red] Unknown starter preset [{starter_choice}]. Options: 'standard', 'web', 'api', 'inertia'")
|
|
163
|
+
raise typer.Exit(code=1)
|
|
164
|
+
|
|
165
|
+
console.print(f"[dim]Generated {len(created_files)} project files.[/dim]")
|
|
166
|
+
|
|
167
|
+
# Automatically generate and persist unique application encryption key in .env
|
|
168
|
+
app_key, _ = set_app_key_in_env(target)
|
|
169
|
+
console.print(f"[bold green]Application key set successfully:[/bold green] [cyan]{app_key}[/cyan]")
|
|
170
|
+
|
|
171
|
+
# Configure selected database in .env if not sqlite
|
|
172
|
+
if db_choice != "sqlite":
|
|
173
|
+
env_file = target / ".env"
|
|
174
|
+
if env_file.exists():
|
|
175
|
+
txt = env_file.read_text(encoding="utf-8")
|
|
176
|
+
txt = txt.replace("DB_CONNECTION=sqlite", f"DB_CONNECTION={db_choice}")
|
|
177
|
+
env_file.write_text(txt, encoding="utf-8")
|
|
178
|
+
console.print(f"[bold green]✓[/bold green] Database configured in .env: [cyan]{db_choice}[/cyan]")
|
|
179
|
+
|
|
180
|
+
# Auto-install Python and NPM dependencies if requested
|
|
181
|
+
if should_install:
|
|
182
|
+
# 1. Python package installation
|
|
183
|
+
pyproject_file = target / "pyproject.toml"
|
|
184
|
+
if pyproject_file.exists():
|
|
185
|
+
with console.status("[bold cyan]Installing Python package dependencies (pip install -e .)...[/bold cyan]"):
|
|
186
|
+
try:
|
|
187
|
+
res = subprocess.run(
|
|
188
|
+
[sys.executable, "-m", "pip", "install", "-e", "."],
|
|
189
|
+
cwd=str(target),
|
|
190
|
+
capture_output=True,
|
|
191
|
+
text=True,
|
|
192
|
+
check=False,
|
|
193
|
+
)
|
|
194
|
+
if res.returncode == 0:
|
|
195
|
+
console.print("[bold green]✓[/bold green] Python package dependencies installed.")
|
|
196
|
+
else:
|
|
197
|
+
console.print("[yellow]Notice:[/yellow] pip install completed with warnings.")
|
|
198
|
+
except Exception as e: # noqa: BLE001
|
|
199
|
+
console.print(f"[yellow]Notice:[/yellow] Could not auto-install Python dependencies: {e}")
|
|
200
|
+
|
|
201
|
+
# 2. NPM frontend dependencies installation
|
|
202
|
+
package_json = target / "package.json"
|
|
203
|
+
if package_json.exists():
|
|
204
|
+
npm_bin = shutil.which("npm")
|
|
205
|
+
if npm_bin:
|
|
206
|
+
with console.status("[bold cyan]Installing frontend dependencies (npm install)...[/bold cyan]"):
|
|
207
|
+
try:
|
|
208
|
+
res = subprocess.run(
|
|
209
|
+
[npm_bin, "install"],
|
|
210
|
+
cwd=str(target),
|
|
211
|
+
shell=True,
|
|
212
|
+
capture_output=True,
|
|
213
|
+
text=True,
|
|
214
|
+
check=False,
|
|
215
|
+
)
|
|
216
|
+
if res.returncode == 0:
|
|
217
|
+
console.print("[bold green]✓[/bold green] NPM dependencies installed (Tailwind CSS v4 & Alpine.js).")
|
|
218
|
+
else:
|
|
219
|
+
console.print("[yellow]Notice:[/yellow] npm install completed with warnings.")
|
|
220
|
+
except Exception as e: # noqa: BLE001
|
|
221
|
+
console.print(f"[yellow]Notice:[/yellow] Could not auto-install NPM dependencies: {e}")
|
|
222
|
+
else:
|
|
223
|
+
console.print("[dim]Node.js/npm not detected in PATH. Run 'npm install' once Node.js is installed.[/dim]")
|
|
224
|
+
|
|
225
|
+
# 3. Optional interactive migration execution
|
|
226
|
+
if is_interactive and db_choice == "sqlite" and Confirm.ask("\nRun initial database migrations now?", default=True):
|
|
227
|
+
with console.status("[bold cyan]Running initial database migrations...[/bold cyan]"):
|
|
228
|
+
try:
|
|
229
|
+
res = subprocess.run(
|
|
230
|
+
[sys.executable, "artisan.py", "migrate"],
|
|
231
|
+
cwd=str(target),
|
|
232
|
+
capture_output=True,
|
|
233
|
+
text=True,
|
|
234
|
+
check=False,
|
|
235
|
+
)
|
|
236
|
+
if res.returncode == 0:
|
|
237
|
+
console.print("[bold green]✓[/bold green] Initial database migrations executed.")
|
|
238
|
+
else:
|
|
239
|
+
console.print(f"[yellow]Notice:[/yellow] Migration notice: {res.stdout or res.stderr}")
|
|
240
|
+
except Exception as e: # noqa: BLE001
|
|
241
|
+
console.print(f"[yellow]Notice:[/yellow] Could not auto-run migrations: {e}")
|
|
242
|
+
|
|
243
|
+
# Initialize git repository if requested
|
|
244
|
+
if use_git and not (target / ".git").exists():
|
|
245
|
+
try:
|
|
246
|
+
subprocess.run(["git", "init"], cwd=str(target), capture_output=True, check=False)
|
|
247
|
+
console.print("[dim]Initialized Git repository in project directory.[/dim]")
|
|
248
|
+
except Exception: # noqa: BLE001, S110
|
|
249
|
+
pass
|
|
250
|
+
|
|
251
|
+
cd_step = f" [white]cd {name}[/white]\n" if not is_current_dir else ""
|
|
252
|
+
console.print(
|
|
253
|
+
Panel(
|
|
254
|
+
f"[bold green]Application [{app_name}] created successfully![/bold green]\n\n"
|
|
255
|
+
f"[bold cyan]Run commands using either direct CLI or Artisan script:[/bold cyan]\n"
|
|
256
|
+
+ cd_step
|
|
257
|
+
+ " [bold green]nexus serve[/bold green] [dim]# Start local dev server (http://localhost:8000)[/dim]\n"
|
|
258
|
+
" [bold green]nexus migrate[/bold green] [dim]# Run database migrations[/dim]\n"
|
|
259
|
+
" [bold green]nexus route:list[/bold green] [dim]# View all registered routes[/dim]\n\n"
|
|
260
|
+
" [dim]Or Laravel style:[/dim] [white]python artisan.py serve[/white] [dim]/[/dim] [white]python artisan.py migrate[/white]\n"
|
|
261
|
+
" [dim]Compile assets:[/dim] [white]npm run dev[/white]\n\n"
|
|
262
|
+
"[dim]Happy coding with Nexus! Built with speed, elegance, and developer joy.[/dim]",
|
|
263
|
+
title="⚡ Nexus Ready",
|
|
264
|
+
border_style="green",
|
|
265
|
+
)
|
|
266
|
+
)
|
|
@@ -24,6 +24,9 @@ class Application(Container):
|
|
|
24
24
|
def __init__(self, base_path: str | Path = ".") -> None:
|
|
25
25
|
super().__init__()
|
|
26
26
|
self._base_path = Path(base_path).resolve()
|
|
27
|
+
base_path_str = str(self._base_path)
|
|
28
|
+
if base_path_str not in sys.path:
|
|
29
|
+
sys.path.insert(0, base_path_str)
|
|
27
30
|
self._booted: bool = False
|
|
28
31
|
self._providers: list[ServiceProvider] = []
|
|
29
32
|
self._deferred_providers: dict[Any, type[ServiceProvider]] = {}
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import inspect
|
|
4
4
|
from collections.abc import Callable
|
|
5
|
+
from pathlib import Path
|
|
5
6
|
from typing import Any, get_type_hints
|
|
6
7
|
|
|
7
8
|
from nexus.container.container import Container
|
|
@@ -208,8 +209,30 @@ class Router:
|
|
|
208
209
|
self._disabled_middleware.discard(m)
|
|
209
210
|
return self
|
|
210
211
|
|
|
212
|
+
def _resolve_public_file(self, path: str) -> Path | None:
|
|
213
|
+
"""Resolve a static file path from the application public directory."""
|
|
214
|
+
if not hasattr(self.container, "base_path"):
|
|
215
|
+
return None
|
|
216
|
+
public_dir = Path(self.container.base_path("public")).resolve()
|
|
217
|
+
if not public_dir.exists() or not public_dir.is_dir():
|
|
218
|
+
return None
|
|
219
|
+
clean_path = path.lstrip("/")
|
|
220
|
+
if not clean_path:
|
|
221
|
+
return None
|
|
222
|
+
candidate = (public_dir / clean_path).resolve()
|
|
223
|
+
if candidate.is_file() and candidate.is_relative_to(public_dir):
|
|
224
|
+
return candidate
|
|
225
|
+
return None
|
|
226
|
+
|
|
211
227
|
async def dispatch(self, request: Request) -> Response:
|
|
212
228
|
"""Match and dispatch the request through route middleware and handler."""
|
|
229
|
+
# 0. Serve static file from public/ directory for GET/HEAD requests
|
|
230
|
+
if request.method in ("GET", "HEAD"):
|
|
231
|
+
public_file = self._resolve_public_file(request.path)
|
|
232
|
+
if public_file is not None:
|
|
233
|
+
from nexus.http.response import FileResponse
|
|
234
|
+
return FileResponse(public_file)
|
|
235
|
+
|
|
213
236
|
# 1. Match route
|
|
214
237
|
route = self.find_route(request)
|
|
215
238
|
request.params = route.extract_parameters(request.path)
|
|
@@ -501,7 +501,7 @@ Alpine.start();
|
|
|
501
501
|
@section('content')
|
|
502
502
|
<div class="max-w-2xl text-center space-y-6" x-data="{ count: 0 }">
|
|
503
503
|
<div class="inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-indigo-500/10 border border-indigo-500/20 text-indigo-400 text-xs font-semibold">
|
|
504
|
-
<span>🚀 Version 0.2.
|
|
504
|
+
<span>🚀 Version 0.2.6 Released</span>
|
|
505
505
|
</div>
|
|
506
506
|
|
|
507
507
|
<h1 class="text-5xl font-black tracking-tight text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 via-indigo-400 to-purple-500">
|
|
@@ -1002,7 +1002,7 @@ description = "A Nexus web application"
|
|
|
1002
1002
|
readme = "README.md"
|
|
1003
1003
|
requires-python = ">=3.11"
|
|
1004
1004
|
dependencies = [
|
|
1005
|
-
"nexus-framework>=0.2.
|
|
1005
|
+
"nexus-framework>=0.2.0",
|
|
1006
1006
|
]
|
|
1007
1007
|
|
|
1008
1008
|
[project.optional-dependencies]
|
|
@@ -1024,26 +1024,29 @@ include = ["app*", "bootstrap*", "config*", "routes*"]
|
|
|
1024
1024
|
An expressive, modern web application built with [Nexus Framework](https://github.com/nexus-framework/nexus).
|
|
1025
1025
|
|
|
1026
1026
|
## Getting Started
|
|
1027
|
+
You can run commands directly using `nexus <command>` or via `python artisan.py <command>`.
|
|
1027
1028
|
|
|
1028
1029
|
### 1. Database Migrations
|
|
1029
1030
|
```bash
|
|
1030
|
-
|
|
1031
|
+
nexus migrate
|
|
1032
|
+
# Or: python artisan.py migrate
|
|
1031
1033
|
```
|
|
1032
1034
|
|
|
1033
1035
|
### 2. Seed Initial Data (Optional)
|
|
1034
1036
|
```bash
|
|
1035
|
-
|
|
1037
|
+
nexus db:seed
|
|
1038
|
+
# Or: python artisan.py db:seed
|
|
1036
1039
|
```
|
|
1037
1040
|
|
|
1038
1041
|
### 3. Start Development Server
|
|
1039
1042
|
```bash
|
|
1040
|
-
|
|
1043
|
+
nexus serve
|
|
1044
|
+
# Or: python artisan.py serve
|
|
1041
1045
|
```
|
|
1042
1046
|
Open [http://localhost:8000](http://localhost:8000) in your browser.
|
|
1043
1047
|
|
|
1044
1048
|
### 4. Compile Frontend Assets (Tailwind CSS v4 & Alpine.js)
|
|
1045
1049
|
```bash
|
|
1046
|
-
npm install
|
|
1047
1050
|
npm run dev
|
|
1048
1051
|
```
|
|
1049
1052
|
'''
|
|
@@ -143,23 +143,29 @@ class ViewFactory:
|
|
|
143
143
|
tags.append(f'<script type="module" src="{vite_url}/{asset}"></script>')
|
|
144
144
|
return "\n".join(tags)
|
|
145
145
|
|
|
146
|
-
# Production
|
|
146
|
+
# Production manifest (when npm run build has been executed)
|
|
147
147
|
manifest_path = self.app.base_path("public", "build", "manifest.json")
|
|
148
|
-
manifest: dict[str, Any] = {}
|
|
149
148
|
if manifest_path.exists():
|
|
149
|
+
manifest: dict[str, Any] = {}
|
|
150
150
|
try:
|
|
151
151
|
manifest = json.loads(manifest_path.read_text(encoding="utf-8"))
|
|
152
152
|
except (json.JSONDecodeError, OSError):
|
|
153
153
|
manifest = {}
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
155
|
+
for asset in asset_list:
|
|
156
|
+
chunk = manifest.get(asset, {})
|
|
157
|
+
file_name = chunk.get("file", asset)
|
|
158
|
+
file_url = f"/build/{file_name}"
|
|
159
|
+
if asset.endswith(".css") or str(file_name).endswith(".css"):
|
|
160
|
+
tags.append(f'<link rel="stylesheet" href="{file_url}">')
|
|
161
|
+
else:
|
|
162
|
+
tags.append(f'<script type="module" src="{file_url}"></script>')
|
|
163
|
+
return "\n".join(tags)
|
|
162
164
|
|
|
165
|
+
# Development Fallback (when neither Vite dev server nor build manifest exists):
|
|
166
|
+
# Gracefully inject Tailwind CSS & Alpine.js CDNs so views are immediately styled and reactive
|
|
167
|
+
tags.append('<script src="https://cdn.tailwindcss.com"></script>')
|
|
168
|
+
tags.append('<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>')
|
|
163
169
|
return "\n".join(tags)
|
|
164
170
|
|
|
165
171
|
def _inertia_root(self, page: Any = None) -> str:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nexus-framework
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: An expressive, batteries-included asynchronous web framework for Python inspired by Laravel.
|
|
5
5
|
Author-email: Nexus Core Team <core@nexus-framework.org>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"""Nexus New Project Scaffolding CLI Command."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import subprocess
|
|
6
|
-
from pathlib import Path
|
|
7
|
-
from typing import TYPE_CHECKING
|
|
8
|
-
|
|
9
|
-
import typer
|
|
10
|
-
from rich.console import Console
|
|
11
|
-
from rich.panel import Panel
|
|
12
|
-
|
|
13
|
-
from nexus.console.commands.key_generate import set_app_key_in_env
|
|
14
|
-
from nexus.starters.api import ApiStarter
|
|
15
|
-
from nexus.starters.inertia import InertiaStarter
|
|
16
|
-
from nexus.starters.standard import StandardStarter
|
|
17
|
-
from nexus.starters.web import WebStarter
|
|
18
|
-
|
|
19
|
-
if TYPE_CHECKING:
|
|
20
|
-
from nexus.foundation.application import Application
|
|
21
|
-
|
|
22
|
-
console = Console()
|
|
23
|
-
|
|
24
|
-
BANNER = r"""
|
|
25
|
-
_ __
|
|
26
|
-
/ |/ /__ __ __ __ ___
|
|
27
|
-
/ // -_)\ \ // // _ \
|
|
28
|
-
/_/|_/ \__//_\_\ \_,_/_//_/
|
|
29
|
-
Nexus Framework - Python 3.12+
|
|
30
|
-
"""
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
IGNORED_EXISTING_NAMES = {
|
|
34
|
-
".venv",
|
|
35
|
-
"venv",
|
|
36
|
-
"ENV",
|
|
37
|
-
"env",
|
|
38
|
-
".git",
|
|
39
|
-
".idea",
|
|
40
|
-
".vscode",
|
|
41
|
-
".DS_Store",
|
|
42
|
-
"Thumbs.db",
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def register_new_command(cli: typer.Typer, app: Application) -> None:
|
|
47
|
-
"""Register 'new' project creation command."""
|
|
48
|
-
|
|
49
|
-
@cli.command("new", help="Create a brand-new Nexus application skeleton (Laravel style)")
|
|
50
|
-
def new_project(
|
|
51
|
-
name: str = typer.Argument(..., help="The project name or directory (use '.' for current directory)"),
|
|
52
|
-
starter: str = typer.Option("standard", "--starter", "-s", help="Starter kit template ('standard', 'api', 'web', 'inertia')"),
|
|
53
|
-
force: bool = typer.Option(False, "--force", "-f", help="Overwrite existing files in target directory"),
|
|
54
|
-
git: bool = typer.Option(True, "--git/--no-git", help="Initialize a fresh Git repository"),
|
|
55
|
-
) -> None:
|
|
56
|
-
console.print(f"[bold cyan]{BANNER}[/bold cyan]")
|
|
57
|
-
|
|
58
|
-
target = Path(name).resolve()
|
|
59
|
-
is_current_dir = name.strip() == "."
|
|
60
|
-
app_name = target.name if target.name else "NexusApp"
|
|
61
|
-
|
|
62
|
-
if target.exists() and not force:
|
|
63
|
-
existing_items = [
|
|
64
|
-
item for item in target.iterdir()
|
|
65
|
-
if item.name not in IGNORED_EXISTING_NAMES
|
|
66
|
-
]
|
|
67
|
-
if existing_items:
|
|
68
|
-
try:
|
|
69
|
-
should_continue = typer.confirm(
|
|
70
|
-
f"Target directory [{target}] contains {len(existing_items)} existing file(s). Scaffold anyway?",
|
|
71
|
-
default=False,
|
|
72
|
-
)
|
|
73
|
-
except Exception: # noqa: BLE001
|
|
74
|
-
should_continue = False
|
|
75
|
-
|
|
76
|
-
if not should_continue:
|
|
77
|
-
console.print(f"[bold yellow]Warning:[/bold yellow] Target directory [{target}] is not empty. Use [bold]--force[/bold] to overwrite.")
|
|
78
|
-
raise typer.Exit(code=1)
|
|
79
|
-
force = True
|
|
80
|
-
|
|
81
|
-
target.mkdir(parents=True, exist_ok=True)
|
|
82
|
-
starter_choice = starter.lower().strip()
|
|
83
|
-
|
|
84
|
-
console.print(f"[bold blue]Creating a new Nexus application:[/bold blue] [cyan]{app_name}[/cyan] in [dim]{target}[/dim]")
|
|
85
|
-
console.print(f"[dim]Using starter preset: [bold cyan]{starter_choice}[/bold cyan][/dim]\n")
|
|
86
|
-
|
|
87
|
-
created_files: list[Path] = []
|
|
88
|
-
if starter_choice == "standard":
|
|
89
|
-
scaffolder = StandardStarter(target, app_name=app_name)
|
|
90
|
-
created_files = scaffolder.install(force=force)
|
|
91
|
-
elif starter_choice == "web":
|
|
92
|
-
# Start with standard and overlay web starter
|
|
93
|
-
StandardStarter(target, app_name=app_name).install(force=force)
|
|
94
|
-
created_files = WebStarter(target).install(force=force)
|
|
95
|
-
elif starter_choice == "api":
|
|
96
|
-
StandardStarter(target, app_name=app_name).install(force=force)
|
|
97
|
-
created_files = ApiStarter(target).install(force=force)
|
|
98
|
-
elif starter_choice == "inertia":
|
|
99
|
-
StandardStarter(target, app_name=app_name).install(force=force)
|
|
100
|
-
created_files = InertiaStarter(target).install(force=force)
|
|
101
|
-
else:
|
|
102
|
-
console.print(f"[bold red]Error:[/bold red] Unknown starter preset [{starter_choice}]. Options: 'standard', 'web', 'api', 'inertia'")
|
|
103
|
-
raise typer.Exit(code=1)
|
|
104
|
-
|
|
105
|
-
console.print(f"[dim]Generated {len(created_files)} project files.[/dim]")
|
|
106
|
-
|
|
107
|
-
# Automatically generate and persist unique application encryption key in .env
|
|
108
|
-
app_key, _ = set_app_key_in_env(target)
|
|
109
|
-
console.print(f"[bold green]Application key set successfully:[/bold green] [cyan]{app_key}[/cyan]")
|
|
110
|
-
|
|
111
|
-
# Initialize git repository if requested
|
|
112
|
-
if git and not (target / ".git").exists():
|
|
113
|
-
try:
|
|
114
|
-
subprocess.run(["git", "init"], cwd=str(target), capture_output=True, check=False)
|
|
115
|
-
console.print("[dim]Initialized Git repository in project directory.[/dim]")
|
|
116
|
-
except Exception: # noqa: BLE001, S110
|
|
117
|
-
pass
|
|
118
|
-
|
|
119
|
-
cd_step = f" [white]cd {name}[/white]\n" if not is_current_dir else ""
|
|
120
|
-
console.print(
|
|
121
|
-
Panel(
|
|
122
|
-
f"[bold green]Application [{app_name}] created successfully![/bold green]\n\n"
|
|
123
|
-
f"[bold cyan]Get started with:[/bold cyan]\n"
|
|
124
|
-
+ cd_step
|
|
125
|
-
+ " [white]python nexus.py migrate[/white] [dim]# Run initial migrations[/dim]\n"
|
|
126
|
-
" [white]python nexus.py serve[/white] [dim]# Start local dev server (http://localhost:8000)[/dim]\n"
|
|
127
|
-
" [white]npm install && npm run dev[/white] [dim]# Compile Vite & Tailwind v4 assets[/dim]\n\n"
|
|
128
|
-
"[dim]Happy coding with Nexus! Built with speed, elegance, and developer joy.[/dim]",
|
|
129
|
-
title="⚡ Nexus Ready",
|
|
130
|
-
border_style="green",
|
|
131
|
-
)
|
|
132
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nexus_framework-0.2.5 → nexus_framework-0.2.6}/src/nexus/auth/sanctum/personal_access_token.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|