nexus-framework 0.2.5__tar.gz → 0.2.7__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.
Files changed (221) hide show
  1. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/PKG-INFO +1 -1
  2. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/pyproject.toml +1 -1
  3. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/__init__.py +1 -1
  4. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/cli.py +5 -1
  5. nexus_framework-0.2.7/src/nexus/console/commands/new_command.py +266 -0
  6. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/commands/serve.py +14 -0
  7. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/foundation/application.py +3 -0
  8. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/routing/router.py +23 -0
  9. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/starters/standard.py +13 -19
  10. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/view/factory.py +15 -9
  11. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus_framework.egg-info/PKG-INFO +1 -1
  12. nexus_framework-0.2.5/src/nexus/console/commands/new_command.py +0 -132
  13. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/README.md +0 -0
  14. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/setup.cfg +0 -0
  15. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/application.py +0 -0
  16. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/__init__.py +0 -0
  17. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/access/gate.py +0 -0
  18. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/auth_service_provider.py +0 -0
  19. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/authenticatable.py +0 -0
  20. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/guard.py +0 -0
  21. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/hashing.py +0 -0
  22. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/manager.py +0 -0
  23. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/middleware.py +0 -0
  24. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/sanctum/__init__.py +0 -0
  25. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/sanctum/guard.py +0 -0
  26. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/sanctum/has_api_tokens.py +0 -0
  27. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/sanctum/middleware.py +0 -0
  28. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/sanctum/migration.py +0 -0
  29. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/sanctum/new_access_token.py +0 -0
  30. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/sanctum/personal_access_token.py +0 -0
  31. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/auth/user_provider.py +0 -0
  32. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/cache/__init__.py +0 -0
  33. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/cache/cache_service_provider.py +0 -0
  34. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/cache/driver.py +0 -0
  35. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/cache/manager.py +0 -0
  36. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/cache/store.py +0 -0
  37. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/config/__init__.py +0 -0
  38. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/config/repository.py +0 -0
  39. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/__init__.py +0 -0
  40. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/command.py +0 -0
  41. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/commands/__init__.py +0 -0
  42. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/commands/clear.py +0 -0
  43. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/commands/config.py +0 -0
  44. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/commands/database.py +0 -0
  45. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/commands/key_generate.py +0 -0
  46. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/commands/make.py +0 -0
  47. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/commands/queue.py +0 -0
  48. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/commands/route_list.py +0 -0
  49. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/commands/schedule.py +0 -0
  50. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/commands/starter.py +0 -0
  51. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/commands/tinker.py +0 -0
  52. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/console_service_provider.py +0 -0
  53. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/generators/__init__.py +0 -0
  54. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/generators/stubs.py +0 -0
  55. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/console/kernel.py +0 -0
  56. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/container/__init__.py +0 -0
  57. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/container/container.py +0 -0
  58. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/container/exceptions.py +0 -0
  59. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/__init__.py +0 -0
  60. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/connection.py +0 -0
  61. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/database_service_provider.py +0 -0
  62. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/factory.py +0 -0
  63. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/migrations/__init__.py +0 -0
  64. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/migrations/migration.py +0 -0
  65. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/migrations/migrator.py +0 -0
  66. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/models/__init__.py +0 -0
  67. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/models/exceptions.py +0 -0
  68. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/models/model.py +0 -0
  69. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/models/relations/__init__.py +0 -0
  70. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/models/relations/base.py +0 -0
  71. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/models/relations/belongs_to.py +0 -0
  72. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/models/relations/belongs_to_many.py +0 -0
  73. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/models/relations/has_many.py +0 -0
  74. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/models/relations/has_one.py +0 -0
  75. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/models/soft_deletes.py +0 -0
  76. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/query/builder.py +0 -0
  77. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/schema/__init__.py +0 -0
  78. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/schema/blueprint.py +0 -0
  79. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/schema/schema.py +0 -0
  80. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/database/seeder.py +0 -0
  81. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/events/__init__.py +0 -0
  82. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/events/dispatcher.py +0 -0
  83. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/events/event_service_provider.py +0 -0
  84. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/exceptions/__init__.py +0 -0
  85. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/exceptions/exception_service_provider.py +0 -0
  86. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/exceptions/handler.py +0 -0
  87. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/__init__.py +0 -0
  88. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/app.py +0 -0
  89. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/artisan.py +0 -0
  90. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/auth.py +0 -0
  91. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/cache.py +0 -0
  92. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/config.py +0 -0
  93. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/date.py +0 -0
  94. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/db.py +0 -0
  95. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/event.py +0 -0
  96. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/facade.py +0 -0
  97. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/gate.py +0 -0
  98. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/hash.py +0 -0
  99. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/inertia.py +0 -0
  100. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/log.py +0 -0
  101. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/mail.py +0 -0
  102. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/notification.py +0 -0
  103. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/queue.py +0 -0
  104. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/rate_limiter.py +0 -0
  105. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/request.py +0 -0
  106. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/route.py +0 -0
  107. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/schedule.py +0 -0
  108. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/schema.py +0 -0
  109. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/session.py +0 -0
  110. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/storage.py +0 -0
  111. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/telescope.py +0 -0
  112. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/url.py +0 -0
  113. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/validator.py +0 -0
  114. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/facades/view.py +0 -0
  115. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/filesystem/__init__.py +0 -0
  116. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/filesystem/driver.py +0 -0
  117. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/filesystem/filesystem_service_provider.py +0 -0
  118. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/filesystem/manager.py +0 -0
  119. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/foundation/__init__.py +0 -0
  120. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/foundation/provider.py +0 -0
  121. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/foundation/runner.py +0 -0
  122. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/foundation/service_provider.py +0 -0
  123. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/http/__init__.py +0 -0
  124. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/http/exceptions.py +0 -0
  125. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/http/middleware.py +0 -0
  126. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/http/request.py +0 -0
  127. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/http/requests/__init__.py +0 -0
  128. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/http/requests/form_request.py +0 -0
  129. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/http/resources/__init__.py +0 -0
  130. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/http/resources/json_resource.py +0 -0
  131. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/http/resources/resource_collection.py +0 -0
  132. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/http/response.py +0 -0
  133. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/http/uploaded_file.py +0 -0
  134. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/inertia/__init__.py +0 -0
  135. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/inertia/helpers.py +0 -0
  136. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/inertia/inertia.py +0 -0
  137. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/inertia/inertia_service_provider.py +0 -0
  138. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/inertia/lazy.py +0 -0
  139. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/inertia/middleware.py +0 -0
  140. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/inertia/response.py +0 -0
  141. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/logging/__init__.py +0 -0
  142. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/logging/logging_service_provider.py +0 -0
  143. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/logging/manager.py +0 -0
  144. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/mail/__init__.py +0 -0
  145. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/mail/mail_service_provider.py +0 -0
  146. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/mail/mailable.py +0 -0
  147. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/mail/manager.py +0 -0
  148. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/mail/transport.py +0 -0
  149. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/notifications/__init__.py +0 -0
  150. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/notifications/manager.py +0 -0
  151. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/notifications/notification.py +0 -0
  152. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/notifications/notification_service_provider.py +0 -0
  153. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/py.typed +0 -0
  154. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/queue/__init__.py +0 -0
  155. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/queue/driver.py +0 -0
  156. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/queue/job.py +0 -0
  157. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/queue/manager.py +0 -0
  158. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/queue/queue_service_provider.py +0 -0
  159. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/queue/worker.py +0 -0
  160. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/routing/__init__.py +0 -0
  161. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/routing/limiter.py +0 -0
  162. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/routing/route.py +0 -0
  163. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/routing/throttle.py +0 -0
  164. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/routing/url.py +0 -0
  165. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/schedule/__init__.py +0 -0
  166. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/schedule/event.py +0 -0
  167. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/schedule/schedule.py +0 -0
  168. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/schedule/schedule_service_provider.py +0 -0
  169. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/security/__init__.py +0 -0
  170. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/security/cors.py +0 -0
  171. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/security/csrf.py +0 -0
  172. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/security/headers.py +0 -0
  173. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/session/__init__.py +0 -0
  174. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/session/driver.py +0 -0
  175. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/session/manager.py +0 -0
  176. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/session/middleware.py +0 -0
  177. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/session/session.py +0 -0
  178. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/session/session_service_provider.py +0 -0
  179. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/starters/__init__.py +0 -0
  180. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/starters/api.py +0 -0
  181. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/starters/inertia.py +0 -0
  182. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/starters/openapi.py +0 -0
  183. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/starters/web.py +0 -0
  184. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/support/__init__.py +0 -0
  185. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/support/arr.py +0 -0
  186. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/support/carbon.py +0 -0
  187. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/support/collection.py +0 -0
  188. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/support/env.py +0 -0
  189. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/support/helpers.py +0 -0
  190. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/support/str.py +0 -0
  191. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/telescope/__init__.py +0 -0
  192. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/telescope/debugbar.py +0 -0
  193. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/telescope/entry.py +0 -0
  194. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/telescope/middleware.py +0 -0
  195. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/telescope/telescope.py +0 -0
  196. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/telescope/telescope_service_provider.py +0 -0
  197. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/__init__.py +0 -0
  198. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/client.py +0 -0
  199. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/database.py +0 -0
  200. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/fakes/__init__.py +0 -0
  201. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/fakes/event_fake.py +0 -0
  202. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/fakes/log_fake.py +0 -0
  203. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/fakes/mail_fake.py +0 -0
  204. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/fakes/notification_fake.py +0 -0
  205. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/fakes/queue_fake.py +0 -0
  206. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/fakes/storage_fake.py +0 -0
  207. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/response.py +0 -0
  208. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/test_case.py +0 -0
  209. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/testing/time.py +0 -0
  210. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/validation/__init__.py +0 -0
  211. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/validation/rule.py +0 -0
  212. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/validation/validation_service_provider.py +0 -0
  213. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/validation/validator.py +0 -0
  214. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/view/__init__.py +0 -0
  215. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/view/compiler.py +0 -0
  216. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus/view/view_service_provider.py +0 -0
  217. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus_framework.egg-info/SOURCES.txt +0 -0
  218. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus_framework.egg-info/dependency_links.txt +0 -0
  219. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus_framework.egg-info/entry_points.txt +0 -0
  220. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/src/nexus_framework.egg-info/requires.txt +0 -0
  221. {nexus_framework-0.2.5 → nexus_framework-0.2.7}/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.5
3
+ Version: 0.2.7
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.5"
7
+ version = "0.2.7"
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"
@@ -1,3 +1,3 @@
1
1
  """Nexus Framework - The Elegant Full-Stack Python Web Framework."""
2
2
 
3
- __version__ = "0.2.5"
3
+ __version__ = "0.2.7"
@@ -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
+ )
@@ -41,6 +41,20 @@ def register_serve_command(cli: typer.Typer, app: Application) -> None:
41
41
  )
42
42
  )
43
43
 
44
+ shadow_file = app.base_path("nexus.py")
45
+ if shadow_file.is_file():
46
+ artisan_file = app.base_path("artisan.py")
47
+ try:
48
+ if not artisan_file.exists():
49
+ shadow_file.rename(artisan_file)
50
+ else:
51
+ shadow_file.unlink()
52
+ console.print(
53
+ "[dim]Auto-cleaned 'nexus.py' from project root to prevent Python module shadowing.[/dim]"
54
+ )
55
+ except Exception: # noqa: BLE001, S110
56
+ pass
57
+
44
58
  target = "public.index:app" if app.base_path("public", "index.py").exists() else "bootstrap.app:app"
45
59
  uvicorn.run(
46
60
  target,
@@ -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.5 Released</span>
504
+ <span>🚀 Version 0.2.7 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">
@@ -807,7 +807,7 @@ CONFIG = {
807
807
  for fname, content in config_files.items():
808
808
  created_files.append(self._write_file(self.base_path / "config" / fname, content, force=force))
809
809
 
810
- # 10. Root Files: nexus.py / artisan.py launchers, package.json, vite.config.js, tailwind.config.js, .gitignore, .env.example, .env
810
+ # 10. Root Files: artisan.py launcher, package.json, vite.config.js, tailwind.config.js, .gitignore, .env.example, .env
811
811
  runner_content = '''#!/usr/bin/env python
812
812
  """Nexus Artisan CLI Runner."""
813
813
 
@@ -816,25 +816,16 @@ from __future__ import annotations
816
816
  import sys
817
817
  from pathlib import Path
818
818
 
819
+ # Ensure project root is in sys.path
819
820
  _root_dir = Path(__file__).resolve().parent
820
- _cur = str(_root_dir)
821
+ if str(_root_dir) not in sys.path:
822
+ sys.path.insert(0, str(_root_dir))
821
823
 
822
- # Ensure this script file does not shadow the installed 'nexus' package
823
- _removed_from_path = False
824
- if _cur in sys.path:
825
- sys.path.remove(_cur)
826
- _removed_from_path = True
827
-
828
- import nexus # noqa: F401
829
824
  from nexus.console.cli import main
830
825
 
831
- if _removed_from_path and _cur not in sys.path:
832
- sys.path.insert(0, _cur)
833
-
834
826
  if __name__ == "__main__":
835
827
  main()
836
828
  '''
837
- created_files.append(self._write_file(self.base_path / "nexus.py", runner_content, force=force))
838
829
  created_files.append(self._write_file(self.base_path / "artisan.py", runner_content, force=force))
839
830
 
840
831
  created_files.append(self._write_file(
@@ -1002,7 +993,7 @@ description = "A Nexus web application"
1002
993
  readme = "README.md"
1003
994
  requires-python = ">=3.11"
1004
995
  dependencies = [
1005
- "nexus-framework>=0.2.5",
996
+ "nexus-framework>=0.2.0",
1006
997
  ]
1007
998
 
1008
999
  [project.optional-dependencies]
@@ -1024,26 +1015,29 @@ include = ["app*", "bootstrap*", "config*", "routes*"]
1024
1015
  An expressive, modern web application built with [Nexus Framework](https://github.com/nexus-framework/nexus).
1025
1016
 
1026
1017
  ## Getting Started
1018
+ You can run commands directly using `nexus <command>` or via `python artisan.py <command>`.
1027
1019
 
1028
1020
  ### 1. Database Migrations
1029
1021
  ```bash
1030
- python nexus.py migrate
1022
+ nexus migrate
1023
+ # Or: python artisan.py migrate
1031
1024
  ```
1032
1025
 
1033
1026
  ### 2. Seed Initial Data (Optional)
1034
1027
  ```bash
1035
- python nexus.py db:seed
1028
+ nexus db:seed
1029
+ # Or: python artisan.py db:seed
1036
1030
  ```
1037
1031
 
1038
1032
  ### 3. Start Development Server
1039
1033
  ```bash
1040
- python nexus.py serve
1034
+ nexus serve
1035
+ # Or: python artisan.py serve
1041
1036
  ```
1042
1037
  Open [http://localhost:8000](http://localhost:8000) in your browser.
1043
1038
 
1044
1039
  ### 4. Compile Frontend Assets (Tailwind CSS v4 & Alpine.js)
1045
1040
  ```bash
1046
- npm install
1047
1041
  npm run dev
1048
1042
  ```
1049
1043
  '''
@@ -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 fallback
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
- for asset in asset_list:
156
- chunk = manifest.get(asset, {})
157
- file_url = f"/build/{chunk.get('file', asset)}"
158
- if asset.endswith(".css"):
159
- tags.append(f'<link rel="stylesheet" href="{file_url}">')
160
- else:
161
- tags.append(f'<script type="module" src="{file_url}"></script>')
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.5
3
+ Version: 0.2.7
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
- )