@valkyrjaio/valkyrja 26.0.0 → 26.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -88
- package/package.json +9 -6
- package/src/Valkyrja/Application/Constant/ApplicationInfo.ts +2 -2
- package/src/Valkyrja/Application/Data/CliConfig.ts +9 -9
- package/src/Valkyrja/Application/Data/Config.ts +5 -5
- package/src/Valkyrja/Application/Data/Contract/CliConfigContract.ts +2 -2
- package/src/Valkyrja/Application/Data/Contract/ConfigContract.ts +2 -2
- package/src/Valkyrja/Application/Data/Contract/HttpConfigContract.ts +2 -2
- package/src/Valkyrja/Application/Data/HttpConfig.ts +7 -7
- package/src/Valkyrja/Application/Entry/Abstract/App.ts +14 -14
- package/src/Valkyrja/Application/Entry/Abstract/WorkerHttp.ts +15 -15
- package/src/Valkyrja/Application/Entry/Cli.ts +6 -6
- package/src/Valkyrja/Application/Entry/Http.ts +6 -6
- package/src/Valkyrja/Application/Kernel/ChildApplication.ts +7 -7
- package/src/Valkyrja/Application/Kernel/Contract/ApplicationContract.ts +6 -6
- package/src/Valkyrja/Application/Kernel/Valkyrja.ts +10 -10
- package/src/Valkyrja/Application/Provider/ApplicationComponentProvider.ts +7 -7
- package/src/Valkyrja/Application/Provider/CliApplicationComponentProvider.ts +8 -8
- package/src/Valkyrja/Application/Provider/CliWithHttpApplicationComponentProvider.ts +9 -9
- package/src/Valkyrja/Application/Provider/Contract/ComponentProviderContract.ts +5 -5
- package/src/Valkyrja/Application/Provider/Contract/PublishableComponentProviderContract.ts +1 -1
- package/src/Valkyrja/Application/Provider/HttpApplicationComponentProvider.ts +4 -4
- package/src/Valkyrja/Application/Throwable/Contract/ApplicationThrowable.ts +1 -1
- package/src/Valkyrja/Application/Throwable/Exception/Abstract/ApplicationInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Application/Throwable/Exception/Abstract/ApplicationRuntimeException.ts +2 -2
- package/src/Valkyrja/Cli/Interaction/Argument/Argument.ts +2 -2
- package/src/Valkyrja/Cli/Interaction/Argument/Factory/ArgumentFactory.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Data/CliInteractionConfig.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Enum/BackgroundColor.ts +2 -4
- package/src/Valkyrja/Cli/Interaction/Enum/Style.ts +12 -14
- package/src/Valkyrja/Cli/Interaction/Enum/TextColor.ts +2 -4
- package/src/Valkyrja/Cli/Interaction/Format/BackgroundColorFormat.ts +3 -3
- package/src/Valkyrja/Cli/Interaction/Format/Format.ts +2 -2
- package/src/Valkyrja/Cli/Interaction/Format/StyleFormat.ts +3 -3
- package/src/Valkyrja/Cli/Interaction/Format/TextColorFormat.ts +3 -3
- package/src/Valkyrja/Cli/Interaction/Formatter/Contract/FormatterContract.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Formatter/ErrorFormatter.ts +5 -5
- package/src/Valkyrja/Cli/Interaction/Formatter/Formatter.ts +3 -3
- package/src/Valkyrja/Cli/Interaction/Formatter/HighlightedTextFormatter.ts +3 -3
- package/src/Valkyrja/Cli/Interaction/Formatter/QuestionFormatter.ts +3 -3
- package/src/Valkyrja/Cli/Interaction/Formatter/SuccessFormatter.ts +5 -5
- package/src/Valkyrja/Cli/Interaction/Formatter/WarningFormatter.ts +5 -5
- package/src/Valkyrja/Cli/Interaction/Input/Contract/InputContract.ts +2 -2
- package/src/Valkyrja/Cli/Interaction/Input/Factory/InputFactory.ts +4 -4
- package/src/Valkyrja/Cli/Interaction/Input/Input.ts +4 -4
- package/src/Valkyrja/Cli/Interaction/Message/Answer.ts +5 -5
- package/src/Valkyrja/Cli/Interaction/Message/Banner.ts +3 -3
- package/src/Valkyrja/Cli/Interaction/Message/Contract/AnswerContract.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Message/Contract/MessageContract.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Message/Contract/ProgressContract.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Message/Contract/QuestionContract.ts +3 -3
- package/src/Valkyrja/Cli/Interaction/Message/ErrorMessage.ts +2 -2
- package/src/Valkyrja/Cli/Interaction/Message/Header.ts +4 -4
- package/src/Valkyrja/Cli/Interaction/Message/Message.ts +4 -4
- package/src/Valkyrja/Cli/Interaction/Message/Messages.ts +2 -2
- package/src/Valkyrja/Cli/Interaction/Message/NewLine.ts +2 -2
- package/src/Valkyrja/Cli/Interaction/Message/Progress.ts +4 -4
- package/src/Valkyrja/Cli/Interaction/Message/Question.ts +7 -7
- package/src/Valkyrja/Cli/Interaction/Message/SuccessMessage.ts +2 -2
- package/src/Valkyrja/Cli/Interaction/Message/WarningMessage.ts +2 -2
- package/src/Valkyrja/Cli/Interaction/Option/Contract/OptionContract.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Option/Factory/OptionFactory.ts +11 -8
- package/src/Valkyrja/Cli/Interaction/Option/Option.ts +3 -3
- package/src/Valkyrja/Cli/Interaction/Output/Contract/EmptyOutputContract.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Output/Contract/FileOutputContract.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Output/Contract/OutputContract.ts +3 -3
- package/src/Valkyrja/Cli/Interaction/Output/Contract/PlainOutputContract.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Output/Contract/StreamOutputContract.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Output/EmptyOutput.ts +3 -3
- package/src/Valkyrja/Cli/Interaction/Output/Factory/Contract/OutputFactoryContract.ts +7 -7
- package/src/Valkyrja/Cli/Interaction/Output/Factory/OutputFactory.ts +15 -15
- package/src/Valkyrja/Cli/Interaction/Output/FileOutput.ts +5 -5
- package/src/Valkyrja/Cli/Interaction/Output/Output.ts +6 -6
- package/src/Valkyrja/Cli/Interaction/Output/PlainOutput.ts +3 -3
- package/src/Valkyrja/Cli/Interaction/Output/StreamOutput.ts +5 -5
- package/src/Valkyrja/Cli/Interaction/Provider/CliInteractionComponentProvider.ts +7 -7
- package/src/Valkyrja/Cli/Interaction/Provider/CliInteractionServiceProvider.ts +9 -9
- package/src/Valkyrja/Cli/Interaction/Throwable/Contract/CliInteractionThrowable.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Throwable/Exception/Abstract/CliInteractionInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Cli/Interaction/Throwable/Exception/Abstract/CliInteractionRuntimeException.ts +2 -2
- package/src/Valkyrja/Cli/Interaction/Throwable/Exception/CliInteractionExpectedQuestionOutputException.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Throwable/Exception/CliInteractionInvalidEmptyValueException.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Throwable/Exception/CliInteractionInvalidNonEmptyValueException.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Throwable/Exception/CliInteractionInvalidOptionNameException.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Throwable/Exception/CliInteractionNoFormatterException.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Throwable/Exception/CliInteractionNoValidationCallableException.ts +1 -1
- package/src/Valkyrja/Cli/Interaction/Writer/Contract/WriterContract.ts +2 -2
- package/src/Valkyrja/Cli/Interaction/Writer/QuestionWriter.ts +9 -9
- package/src/Valkyrja/Cli/Middleware/Constant/CliMiddlewareServiceId.ts +2 -1
- package/src/Valkyrja/Cli/Middleware/Contract/InputReceivedMiddlewareContract.ts +3 -3
- package/src/Valkyrja/Cli/Middleware/Contract/ProcessExitingMiddlewareContract.ts +22 -0
- package/src/Valkyrja/Cli/Middleware/Contract/RouteDispatchedMiddlewareContract.ts +4 -4
- package/src/Valkyrja/Cli/Middleware/Contract/RouteMatchedMiddlewareContract.ts +4 -4
- package/src/Valkyrja/Cli/Middleware/Contract/RouteNotMatchedMiddlewareContract.ts +3 -3
- package/src/Valkyrja/Cli/Middleware/Contract/ThrowableCaughtMiddlewareContract.ts +3 -3
- package/src/Valkyrja/Cli/Middleware/Handler/Abstract/Handler.ts +3 -3
- package/src/Valkyrja/Cli/Middleware/Handler/Contract/HandlerContract.ts +7 -7
- package/src/Valkyrja/Cli/Middleware/Handler/Contract/InputReceivedHandlerContract.ts +3 -3
- package/src/Valkyrja/Cli/Middleware/Handler/Contract/ProcessExitingHandlerContract.ts +22 -0
- package/src/Valkyrja/Cli/Middleware/Handler/Contract/RouteDispatchedHandlerContract.ts +4 -4
- package/src/Valkyrja/Cli/Middleware/Handler/Contract/RouteMatchedHandlerContract.ts +4 -4
- package/src/Valkyrja/Cli/Middleware/Handler/Contract/RouteNotMatchedHandlerContract.ts +3 -3
- package/src/Valkyrja/Cli/Middleware/Handler/Contract/ThrowableCaughtHandlerContract.ts +3 -3
- package/src/Valkyrja/Cli/Middleware/Handler/InputReceivedHandler.ts +5 -5
- package/src/Valkyrja/Cli/Middleware/Handler/ProcessExitingHandler.ts +24 -0
- package/src/Valkyrja/Cli/Middleware/Handler/RouteDispatchedHandler.ts +6 -6
- package/src/Valkyrja/Cli/Middleware/Handler/RouteMatchedHandler.ts +6 -6
- package/src/Valkyrja/Cli/Middleware/Handler/RouteNotMatchedHandler.ts +5 -5
- package/src/Valkyrja/Cli/Middleware/Handler/ThrowableCaughtHandler.ts +5 -5
- package/src/Valkyrja/Cli/Middleware/Provider/CliMiddlewareComponentProvider.ts +7 -7
- package/src/Valkyrja/Cli/Middleware/Provider/CliMiddlewareServiceProvider.ts +26 -22
- package/src/Valkyrja/Cli/Middleware/Throwable/Contract/CliMiddlewareThrowable.ts +1 -1
- package/src/Valkyrja/Cli/Middleware/Throwable/Exception/Abstract/CliMiddlewareInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Cli/Middleware/Throwable/Exception/Abstract/CliMiddlewareRuntimeException.ts +2 -2
- package/src/Valkyrja/Cli/Routing/Collection/Contract/RouteCollectionContract.ts +2 -2
- package/src/Valkyrja/Cli/Routing/Collection/RouteCollection.ts +4 -4
- package/src/Valkyrja/Cli/Routing/Collector/Contract/RouteCollectorContract.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Controller/Controller.ts +2 -2
- package/src/Valkyrja/Cli/Routing/Data/Abstract/Parameter.ts +6 -6
- package/src/Valkyrja/Cli/Routing/Data/ArgumentParameter.ts +8 -8
- package/src/Valkyrja/Cli/Routing/Data/CliRoutingData.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Data/Contract/ArgumentParameterContract.ts +4 -4
- package/src/Valkyrja/Cli/Routing/Data/Contract/OptionParameterContract.ts +4 -4
- package/src/Valkyrja/Cli/Routing/Data/Contract/ParameterContract.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Data/Contract/RouteContract.ts +8 -8
- package/src/Valkyrja/Cli/Routing/Data/Option/HelpOptionParameter.ts +4 -4
- package/src/Valkyrja/Cli/Routing/Data/Option/NoInteractionOptionParameter.ts +4 -4
- package/src/Valkyrja/Cli/Routing/Data/Option/QuietOptionParameter.ts +4 -4
- package/src/Valkyrja/Cli/Routing/Data/Option/SilentOptionParameter.ts +4 -4
- package/src/Valkyrja/Cli/Routing/Data/Option/VersionOptionParameter.ts +4 -4
- package/src/Valkyrja/Cli/Routing/Data/OptionParameter.ts +9 -9
- package/src/Valkyrja/Cli/Routing/Data/Route.ts +17 -17
- package/src/Valkyrja/Cli/Routing/Dispatcher/Contract/RouterContract.ts +3 -3
- package/src/Valkyrja/Cli/Routing/Dispatcher/Router.ts +30 -36
- package/src/Valkyrja/Cli/Routing/Provider/CliRoutingCliRouteProvider.ts +14 -14
- package/src/Valkyrja/Cli/Routing/Provider/CliRoutingComponentProvider.ts +8 -8
- package/src/Valkyrja/Cli/Routing/Provider/CliRoutingServiceProvider.ts +21 -19
- package/src/Valkyrja/Cli/Routing/Provider/Contract/CliRouteProviderContract.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Throwable/Contract/CliRoutingThrowable.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Throwable/Exception/Abstract/CliRoutingInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Cli/Routing/Throwable/Exception/Abstract/CliRoutingRuntimeException.ts +2 -2
- package/src/Valkyrja/Cli/Routing/Throwable/Exception/CliRoutingArgumentValuesValidationException.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Throwable/Exception/CliRoutingInvalidArgumentNameException.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Throwable/Exception/CliRoutingInvalidHelpTextCallableException.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Throwable/Exception/CliRoutingInvalidOptionNameException.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Throwable/Exception/CliRoutingInvalidOptionWithValueException.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Throwable/Exception/CliRoutingInvalidRouteNameException.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Throwable/Exception/CliRoutingNoCastException.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Throwable/Exception/CliRoutingNoHelpTextException.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Throwable/Exception/CliRoutingNoOutputDispatchException.ts +1 -1
- package/src/Valkyrja/Cli/Routing/Throwable/Exception/CliRoutingOptionValuesValidationException.ts +1 -1
- package/src/Valkyrja/Cli/Server/Command/HelpCommand.ts +27 -27
- package/src/Valkyrja/Cli/Server/Command/ListBashCommand.ts +6 -6
- package/src/Valkyrja/Cli/Server/Command/ListCommand.ts +16 -16
- package/src/Valkyrja/Cli/Server/Command/VersionCommand.ts +7 -7
- package/src/Valkyrja/Cli/Server/Handler/Contract/InputHandlerContract.ts +2 -2
- package/src/Valkyrja/Cli/Server/Handler/InputHandler.ts +26 -26
- package/src/Valkyrja/Cli/Server/Middleware/InputReceived/CheckForHelpOptionsMiddleware.ts +5 -5
- package/src/Valkyrja/Cli/Server/Middleware/InputReceived/CheckForVersionOptionsMiddleware.ts +4 -4
- package/src/Valkyrja/Cli/Server/Middleware/InputReceived/CheckGlobalInteractionOptionsMiddleware.ts +5 -5
- package/src/Valkyrja/Cli/Server/Middleware/RouteNotMatched/CheckCommandForTypoMiddleware.ts +11 -11
- package/src/Valkyrja/Cli/Server/Middleware/ThrowableCaught/LogThrowableCaughtMiddleware.ts +5 -5
- package/src/Valkyrja/Cli/Server/Middleware/ThrowableCaught/OutputThrowableCaughtMiddleware.ts +9 -9
- package/src/Valkyrja/Cli/Server/Provider/CliServerComponentProvider.ts +7 -7
- package/src/Valkyrja/Cli/Server/Provider/CliServerServiceProvider.ts +42 -40
- package/src/Valkyrja/Cli/Server/Throwable/Contract/CliServerThrowable.ts +1 -1
- package/src/Valkyrja/Cli/Server/Throwable/Exception/Abstract/CliServerInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Cli/Server/Throwable/Exception/Abstract/CliServerRuntimeException.ts +2 -2
- package/src/Valkyrja/Cli/Throwable/Contract/CliThrowable.ts +1 -1
- package/src/Valkyrja/Cli/Throwable/Exception/Abstract/CliInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Cli/Throwable/Exception/Abstract/CliRuntimeException.ts +2 -2
- package/src/Valkyrja/Container/Data/ContainerData.ts +1 -1
- package/src/Valkyrja/Container/Manager/ChildContainer.ts +3 -3
- package/src/Valkyrja/Container/Manager/Container.ts +6 -6
- package/src/Valkyrja/Container/Manager/Contract/ContainerContract.ts +3 -3
- package/src/Valkyrja/Container/Manager/Contract/ProvidersAwareContract.ts +1 -1
- package/src/Valkyrja/Container/Provider/ContainerComponentProvider.ts +7 -7
- package/src/Valkyrja/Container/Provider/ContainerServiceProvider.ts +5 -5
- package/src/Valkyrja/Container/Provider/Contract/ServiceProviderContract.ts +1 -1
- package/src/Valkyrja/Container/Throwable/Contract/ContainerThrowable.ts +1 -1
- package/src/Valkyrja/Container/Throwable/Exception/Abstract/ContainerInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Container/Throwable/Exception/Abstract/ContainerRuntimeException.ts +2 -2
- package/src/Valkyrja/Container/Throwable/Exception/ContainerInvalidPublishCallbackException.ts +1 -1
- package/src/Valkyrja/Container/Throwable/Exception/ContainerInvalidReferenceException.ts +1 -1
- package/src/Valkyrja/Event/Data/Contract/ListenerContract.ts +1 -1
- package/src/Valkyrja/Event/Provider/Contract/ListenerProviderContract.ts +1 -1
- package/src/Valkyrja/Http/Client/Manager/Contract/ClientContract.ts +2 -2
- package/src/Valkyrja/Http/Client/Manager/LogClient.ts +5 -5
- package/src/Valkyrja/Http/Client/Manager/NullClient.ts +4 -4
- package/src/Valkyrja/Http/Client/Throwable/Contract/HttpClientThrowable.ts +1 -1
- package/src/Valkyrja/Http/Client/Throwable/Exception/Abstract/HttpClientInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Client/Throwable/Exception/Abstract/HttpClientRuntimeException.ts +2 -2
- package/src/Valkyrja/Http/Message/Contract/MessageContract.ts +3 -3
- package/src/Valkyrja/Http/Message/Enum/StatusCode.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Collection/Contract/UploadedFileCollectionContract.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Collection/UploadedFileCollection.ts +5 -5
- package/src/Valkyrja/Http/Message/File/Contract/UploadedFileContract.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Factory/UploadedFileFactory.ts +3 -3
- package/src/Valkyrja/Http/Message/File/Throwable/Contract/UploadedFileThrowable.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/Abstract/UploadedFileInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/Abstract/UploadedFileRuntimeException.ts +2 -2
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/UploadedFileAlreadyMovedException.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/UploadedFileInvalidDirectoryException.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/UploadedFileInvalidFilesArrayStructureException.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/UploadedFileInvalidKeyException.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/UploadedFileInvalidParamException.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/UploadedFileInvalidTmpNameException.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/UploadedFileInvalidUploadErrorException.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/UploadedFileInvalidUploadedFileException.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/UploadedFileInvalidValueException.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/UploadedFileMoveFailureException.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/UploadedFileUnableToWriteFileException.ts +1 -1
- package/src/Valkyrja/Http/Message/File/Throwable/Exception/UploadedFileUploadErrorException.ts +5 -5
- package/src/Valkyrja/Http/Message/File/UploadedFile.ts +8 -8
- package/src/Valkyrja/Http/Message/Header/Collection/Contract/HeaderCollectionContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Header/Collection/HeaderCollection.ts +5 -5
- package/src/Valkyrja/Http/Message/Header/ContentType.ts +3 -3
- package/src/Valkyrja/Http/Message/Header/Contract/HeaderContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Header/Factory/CookieFactory.ts +4 -5
- package/src/Valkyrja/Http/Message/Header/Factory/HeaderFactory.ts +4 -4
- package/src/Valkyrja/Http/Message/Header/Header.ts +12 -6
- package/src/Valkyrja/Http/Message/Header/Location.ts +3 -3
- package/src/Valkyrja/Http/Message/Header/Referer.ts +3 -3
- package/src/Valkyrja/Http/Message/Header/SetCookie.ts +3 -3
- package/src/Valkyrja/Http/Message/Header/Throwable/Contract/HttpHeaderThrowable.ts +1 -1
- package/src/Valkyrja/Http/Message/Header/Throwable/Exception/Abstract/HttpHeaderInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Message/Header/Throwable/Exception/Abstract/HttpHeaderRuntimeException.ts +2 -2
- package/src/Valkyrja/Http/Message/Header/Throwable/Exception/HttpHeaderInvalidHeaderNameException.ts +1 -1
- package/src/Valkyrja/Http/Message/Header/Throwable/Exception/HttpHeaderInvalidHeaderParamException.ts +1 -1
- package/src/Valkyrja/Http/Message/Header/Throwable/Exception/HttpHeaderInvalidNameException.ts +1 -1
- package/src/Valkyrja/Http/Message/Header/Throwable/Exception/HttpHeaderInvalidValueException.ts +1 -1
- package/src/Valkyrja/Http/Message/Header/Throwable/Exception/HttpHeaderUnsupportedMethodException.ts +1 -1
- package/src/Valkyrja/Http/Message/Header/Throwable/Exception/HttpHeaderUnsupportedOffsetSetException.ts +1 -1
- package/src/Valkyrja/Http/Message/Header/Throwable/Exception/HttpHeaderUnsupportedOffsetUnsetException.ts +1 -1
- package/src/Valkyrja/Http/Message/Header/Value/Component/Component.ts +5 -5
- package/src/Valkyrja/Http/Message/Header/Value/Contract/CookieContract.ts +2 -2
- package/src/Valkyrja/Http/Message/Header/Value/Contract/ValueContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Header/Value/Cookie.ts +4 -4
- package/src/Valkyrja/Http/Message/Header/Value/Value.ts +3 -3
- package/src/Valkyrja/Http/Message/Param/Abstract/ParamCollection.ts +2 -2
- package/src/Valkyrja/Http/Message/Param/AttributeParamCollection.ts +2 -2
- package/src/Valkyrja/Http/Message/Param/Contract/AttributeParamCollectionContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Param/Contract/CookieParamCollectionContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Param/Contract/ParsedBodyParamCollectionContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Param/Contract/ParsedJsonParamCollectionContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Param/Contract/QueryParamCollectionContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Param/Contract/ServerParamCollectionContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Param/CookieParamCollection.ts +2 -2
- package/src/Valkyrja/Http/Message/Param/ParsedBodyParamCollection.ts +2 -2
- package/src/Valkyrja/Http/Message/Param/ParsedJsonParamCollection.ts +2 -2
- package/src/Valkyrja/Http/Message/Param/QueryParamCollection.ts +2 -2
- package/src/Valkyrja/Http/Message/Param/ServerParamCollection.ts +2 -2
- package/src/Valkyrja/Http/Message/Provider/HttpMessageServiceProvider.ts +5 -5
- package/src/Valkyrja/Http/Message/Request/Contract/JsonServerRequestContract.ts +2 -2
- package/src/Valkyrja/Http/Message/Request/Contract/RequestContract.ts +3 -3
- package/src/Valkyrja/Http/Message/Request/Contract/ServerRequestContract.ts +7 -7
- package/src/Valkyrja/Http/Message/Request/Factory/RequestFactory.ts +14 -14
- package/src/Valkyrja/Http/Message/Request/JsonServerRequest.ts +25 -25
- package/src/Valkyrja/Http/Message/Request/Request.ts +13 -13
- package/src/Valkyrja/Http/Message/Request/ServerRequest.ts +24 -24
- package/src/Valkyrja/Http/Message/Request/Throwable/Contract/HttpRequestThrowable.ts +1 -1
- package/src/Valkyrja/Http/Message/Request/Throwable/Exception/Abstract/HttpRequestInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Message/Request/Throwable/Exception/Abstract/HttpRequestRuntimeException.ts +2 -2
- package/src/Valkyrja/Http/Message/Request/Throwable/Exception/HttpRequestInvalidMethodException.ts +1 -1
- package/src/Valkyrja/Http/Message/Request/Throwable/Exception/HttpRequestInvalidRequestTargetException.ts +1 -1
- package/src/Valkyrja/Http/Message/Response/Contract/EmptyResponseContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Response/Contract/HtmlResponseContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Response/Contract/JsonResponseContract.ts +3 -3
- package/src/Valkyrja/Http/Message/Response/Contract/RedirectResponseContract.ts +5 -5
- package/src/Valkyrja/Http/Message/Response/Contract/ResponseContract.ts +4 -4
- package/src/Valkyrja/Http/Message/Response/Contract/TextResponseContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Response/EmptyResponse.ts +7 -7
- package/src/Valkyrja/Http/Message/Response/Factory/Contract/ResponseFactoryContract.ts +6 -6
- package/src/Valkyrja/Http/Message/Response/Factory/ResponseFactory.ts +12 -12
- package/src/Valkyrja/Http/Message/Response/HtmlResponse.ts +10 -10
- package/src/Valkyrja/Http/Message/Response/JsonResponse.ts +12 -12
- package/src/Valkyrja/Http/Message/Response/RedirectResponse.ts +14 -14
- package/src/Valkyrja/Http/Message/Response/Response.ts +10 -10
- package/src/Valkyrja/Http/Message/Response/TextResponse.ts +10 -10
- package/src/Valkyrja/Http/Message/Response/Throwable/Contract/HttpResponseThrowable.ts +1 -1
- package/src/Valkyrja/Http/Message/Response/Throwable/Exception/Abstract/HttpResponseInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Message/Response/Throwable/Exception/Abstract/HttpResponseRuntimeException.ts +2 -2
- package/src/Valkyrja/Http/Message/Response/Throwable/Exception/HttpRequestInvalidJsonCallbackException.ts +1 -1
- package/src/Valkyrja/Http/Message/Response/Throwable/Exception/HttpRequestInvalidRedirectStatusCodeException.ts +1 -1
- package/src/Valkyrja/Http/Message/Response/XmlResponse.ts +10 -10
- package/src/Valkyrja/Http/Message/Stream/Factory/StreamFactory.ts +8 -8
- package/src/Valkyrja/Http/Message/Stream/Stream.ts +4 -4
- package/src/Valkyrja/Http/Message/Stream/Throwable/Contract/HttpStreamThrowable.ts +1 -1
- package/src/Valkyrja/Http/Message/Stream/Throwable/Exception/Abstract/HttpStreamInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Message/Stream/Throwable/Exception/Abstract/HttpStreamRuntimeException.ts +2 -2
- package/src/Valkyrja/Http/Message/Stream/Throwable/Exception/HttpStreamInvalidLengthException.ts +1 -1
- package/src/Valkyrja/Http/Message/Stream/Throwable/Exception/HttpStreamInvalidStreamException.ts +1 -1
- package/src/Valkyrja/Http/Message/Stream/Throwable/Exception/HttpStreamNoStreamAvailableException.ts +1 -1
- package/src/Valkyrja/Http/Message/Stream/Throwable/Exception/HttpStreamStreamReadException.ts +1 -1
- package/src/Valkyrja/Http/Message/Stream/Throwable/Exception/HttpStreamStreamSeekException.ts +1 -1
- package/src/Valkyrja/Http/Message/Stream/Throwable/Exception/HttpStreamStreamTellException.ts +1 -1
- package/src/Valkyrja/Http/Message/Stream/Throwable/Exception/HttpStreamStreamWriteException.ts +1 -1
- package/src/Valkyrja/Http/Message/Stream/Throwable/Exception/HttpStreamUnreadableStreamException.ts +1 -1
- package/src/Valkyrja/Http/Message/Stream/Throwable/Exception/HttpStreamUnseekableStreamException.ts +1 -1
- package/src/Valkyrja/Http/Message/Stream/Throwable/Exception/HttpStreamUnwritableStreamException.ts +1 -1
- package/src/Valkyrja/Http/Message/Throwable/Contract/HttpMessageThrowable.ts +1 -1
- package/src/Valkyrja/Http/Message/Throwable/Exception/Abstract/HttpMessageInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Message/Throwable/Exception/Abstract/HttpMessageRuntimeException.ts +2 -2
- package/src/Valkyrja/Http/Message/Throwable/Exception/HttpNotFoundResponseException.ts +3 -3
- package/src/Valkyrja/Http/Message/Throwable/Exception/HttpRedirectResponseException.ts +9 -9
- package/src/Valkyrja/Http/Message/Throwable/Exception/HttpResponseException.ts +5 -5
- package/src/Valkyrja/Http/Message/Trait/Message.ts +6 -6
- package/src/Valkyrja/Http/Message/Uri/Contract/UriContract.ts +1 -1
- package/src/Valkyrja/Http/Message/Uri/Factory/UriFactory.ts +9 -9
- package/src/Valkyrja/Http/Message/Uri/Throwable/Contract/HttpUriThrowable.ts +1 -1
- package/src/Valkyrja/Http/Message/Uri/Throwable/Exception/Abstract/HttpUriInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Message/Uri/Throwable/Exception/Abstract/HttpUriRuntimeException.ts +2 -2
- package/src/Valkyrja/Http/Message/Uri/Throwable/Exception/HttpUriInvalidFromStringException.ts +1 -1
- package/src/Valkyrja/Http/Message/Uri/Throwable/Exception/HttpUriInvalidPathException.ts +1 -1
- package/src/Valkyrja/Http/Message/Uri/Throwable/Exception/HttpUriInvalidPortException.ts +1 -1
- package/src/Valkyrja/Http/Message/Uri/Throwable/Exception/HttpUriInvalidQueryException.ts +1 -1
- package/src/Valkyrja/Http/Message/Uri/Throwable/Exception/NoPortExceptionHttpUri.ts +1 -1
- package/src/Valkyrja/Http/Message/Uri/Type/Port.ts +1 -1
- package/src/Valkyrja/Http/Message/Uri/Uri.ts +4 -4
- package/src/Valkyrja/Http/Middleware/Constant/HttpMiddlewareServiceId.ts +2 -1
- package/src/Valkyrja/Http/Middleware/Contract/RequestReceivedMiddlewareContract.ts +3 -3
- package/src/Valkyrja/Http/Middleware/Contract/ResponseSentMiddlewareContract.ts +20 -0
- package/src/Valkyrja/Http/Middleware/Contract/RouteDispatchedMiddlewareContract.ts +4 -4
- package/src/Valkyrja/Http/Middleware/Contract/RouteMatchedMiddlewareContract.ts +4 -4
- package/src/Valkyrja/Http/Middleware/Contract/RouteNotMatchedMiddlewareContract.ts +3 -3
- package/src/Valkyrja/Http/Middleware/Contract/SendingResponseMiddlewareContract.ts +3 -3
- package/src/Valkyrja/Http/Middleware/Contract/ThrowableCaughtMiddlewareContract.ts +3 -3
- package/src/Valkyrja/Http/Middleware/Handler/Abstract/Handler.ts +3 -3
- package/src/Valkyrja/Http/Middleware/Handler/Contract/HandlerContract.ts +8 -8
- package/src/Valkyrja/Http/Middleware/Handler/Contract/RequestReceivedHandlerContract.ts +4 -4
- package/src/Valkyrja/Http/Middleware/Handler/Contract/ResponseSentHandlerContract.ts +17 -0
- package/src/Valkyrja/Http/Middleware/Handler/Contract/RouteDispatchedHandlerContract.ts +5 -5
- package/src/Valkyrja/Http/Middleware/Handler/Contract/RouteMatchedHandlerContract.ts +5 -5
- package/src/Valkyrja/Http/Middleware/Handler/Contract/RouteNotMatchedHandlerContract.ts +4 -4
- package/src/Valkyrja/Http/Middleware/Handler/Contract/SendingResponseHandlerContract.ts +4 -4
- package/src/Valkyrja/Http/Middleware/Handler/Contract/ThrowableCaughtHandlerContract.ts +4 -4
- package/src/Valkyrja/Http/Middleware/Handler/RequestReceivedHandler.ts +5 -5
- package/src/Valkyrja/Http/Middleware/Handler/ResponseSentHandler.ts +27 -0
- package/src/Valkyrja/Http/Middleware/Handler/RouteDispatchedHandler.ts +6 -6
- package/src/Valkyrja/Http/Middleware/Handler/RouteMatchedHandler.ts +6 -6
- package/src/Valkyrja/Http/Middleware/Handler/RouteNotMatchedHandler.ts +5 -5
- package/src/Valkyrja/Http/Middleware/Handler/SendingResponseHandler.ts +5 -5
- package/src/Valkyrja/Http/Middleware/Handler/ThrowableCaughtHandler.ts +5 -5
- package/src/Valkyrja/Http/Middleware/Throwable/Contract/HttpMiddlewareThrowable.ts +1 -1
- package/src/Valkyrja/Http/Middleware/Throwable/Exception/Abstract/HttpMiddlewareInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Middleware/Throwable/Exception/Abstract/HttpMiddlewareRuntimeException.ts +2 -2
- package/src/Valkyrja/Http/Routing/Cli/Command/ListCommand.ts +19 -19
- package/src/Valkyrja/Http/Routing/Collection/Contract/RouteCollectionContract.ts +4 -4
- package/src/Valkyrja/Http/Routing/Collection/RouteCollection.ts +11 -11
- package/src/Valkyrja/Http/Routing/Collector/Contract/RouteCollectorContract.ts +1 -1
- package/src/Valkyrja/Http/Routing/Controller/Controller.ts +2 -2
- package/src/Valkyrja/Http/Routing/Data/Contract/DynamicRouteContract.ts +2 -2
- package/src/Valkyrja/Http/Routing/Data/Contract/ParameterContract.ts +1 -1
- package/src/Valkyrja/Http/Routing/Data/Contract/RouteContract.ts +15 -13
- package/src/Valkyrja/Http/Routing/Data/DynamicRoute.ts +17 -17
- package/src/Valkyrja/Http/Routing/Data/HttpRoutingData.ts +2 -2
- package/src/Valkyrja/Http/Routing/Data/Parameter.ts +4 -4
- package/src/Valkyrja/Http/Routing/Data/Route.ts +23 -23
- package/src/Valkyrja/Http/Routing/Dispatcher/Contract/RouterContract.ts +3 -3
- package/src/Valkyrja/Http/Routing/Dispatcher/Router.ts +27 -27
- package/src/Valkyrja/Http/Routing/Factory/Contract/RoutingResponseFactoryContract.ts +3 -3
- package/src/Valkyrja/Http/Routing/Factory/RoutingResponseFactory.ts +6 -6
- package/src/Valkyrja/Http/Routing/Matcher/Contract/MatcherContract.ts +2 -2
- package/src/Valkyrja/Http/Routing/Matcher/Matcher.ts +9 -9
- package/src/Valkyrja/Http/Routing/Processor/Contract/ProcessorContract.ts +1 -1
- package/src/Valkyrja/Http/Routing/Processor/Processor.ts +6 -6
- package/src/Valkyrja/Http/Routing/Provider/Contract/HttpRouteProviderContract.ts +2 -2
- package/src/Valkyrja/Http/Routing/Provider/HttpRoutingCliComponentProvider.ts +7 -7
- package/src/Valkyrja/Http/Routing/Provider/HttpRoutingCliRouteProvider.ts +13 -13
- package/src/Valkyrja/Http/Routing/Throwable/Contract/HttpRoutingThrowable.ts +1 -1
- package/src/Valkyrja/Http/Routing/Throwable/Exception/Abstract/HttpRoutingInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Routing/Throwable/Exception/Abstract/HttpRoutingRuntimeException.ts +2 -2
- package/src/Valkyrja/Http/Routing/Throwable/Exception/HttpRoutingInvalidDynamicRouteNameException.ts +1 -1
- package/src/Valkyrja/Http/Routing/Throwable/Exception/HttpRoutingInvalidMethodTypeException.ts +1 -1
- package/src/Valkyrja/Http/Routing/Throwable/Exception/HttpRoutingInvalidParameterRegexException.ts +1 -1
- package/src/Valkyrja/Http/Routing/Throwable/Exception/HttpRoutingInvalidRouteNameException.ts +1 -1
- package/src/Valkyrja/Http/Routing/Throwable/Exception/HttpRoutingInvalidRouteParameterException.ts +1 -1
- package/src/Valkyrja/Http/Routing/Throwable/Exception/HttpRoutingInvalidRoutePathException.ts +1 -1
- package/src/Valkyrja/Http/Routing/Throwable/Exception/HttpRoutingInvalidRouteRegexException.ts +1 -1
- package/src/Valkyrja/Http/Routing/Throwable/Exception/HttpRoutingNoCastException.ts +1 -1
- package/src/Valkyrja/Http/Routing/Throwable/Exception/HttpRoutingNoRequestStructException.ts +1 -1
- package/src/Valkyrja/Http/Routing/Throwable/Exception/HttpRoutingNoResponseStructException.ts +1 -1
- package/src/Valkyrja/Http/Routing/Url/Url.ts +2 -2
- package/src/Valkyrja/Http/Server/Handler/Contract/ExceptionResponseRequestHandlerContract.ts +2 -2
- package/src/Valkyrja/Http/Server/Handler/Contract/RequestHandlerContract.ts +2 -2
- package/src/Valkyrja/Http/Server/Handler/RequestHandler.ts +23 -23
- package/src/Valkyrja/Http/Server/Middleware/RequestReceived/RedirectTrailingSlashMiddleware.ts +8 -8
- package/src/Valkyrja/Http/Server/Middleware/RouteMatched/ResponseStructMiddleware.ts +7 -7
- package/src/Valkyrja/Http/Server/Middleware/SendingResponse/NoCacheResponseMiddleware.ts +6 -6
- package/src/Valkyrja/Http/Server/Middleware/ThrowableCaught/LogThrowableCaughtMiddleware.ts +5 -5
- package/src/Valkyrja/Http/Server/Throwable/Contract/HttpServerThrowable.ts +1 -1
- package/src/Valkyrja/Http/Server/Throwable/Exception/Abstract/HttpServerInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Server/Throwable/Exception/Abstract/HttpServerRuntimeException.ts +2 -2
- package/src/Valkyrja/Http/Struct/Request/Abstract/JsonRequestStruct.ts +4 -4
- package/src/Valkyrja/Http/Struct/Request/Abstract/ParsedBodyRequestStruct.ts +2 -2
- package/src/Valkyrja/Http/Struct/Request/Abstract/QueryRequestStruct.ts +2 -2
- package/src/Valkyrja/Http/Struct/Request/Abstract/RequestStruct.ts +2 -2
- package/src/Valkyrja/Http/Struct/Request/Contract/RequestStructContract.ts +2 -2
- package/src/Valkyrja/Http/Struct/Response/Abstract/ResponseStruct.ts +1 -1
- package/src/Valkyrja/Http/Struct/Response/Contract/ResponseStructContract.ts +1 -1
- package/src/Valkyrja/Http/Struct/Throwable/Contract/HttpStructThrowable.ts +1 -1
- package/src/Valkyrja/Http/Struct/Throwable/Exception/Abstract/HttpStructInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Struct/Throwable/Exception/Abstract/HttpStructRuntimeException.ts +2 -2
- package/src/Valkyrja/Http/Struct/Throwable/Exception/HttpStructJsonServerRequestExpectedException.ts +1 -1
- package/src/Valkyrja/Http/Throwable/Contract/HttpThrowable.ts +1 -1
- package/src/Valkyrja/Http/Throwable/Exception/Abstract/HttpInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Http/Throwable/Exception/Abstract/HttpRuntimeException.ts +2 -2
- package/src/Valkyrja/Throwable/Exception/Abstract/ValkyrjaInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Throwable/Exception/Abstract/ValkyrjaRuntimeException.ts +2 -2
- package/src/Valkyrja/Throwable/Handler/Abstract/ThrowableHandler.ts +1 -1
- package/src/Valkyrja/Validation/Rule/Abstract/Rule.ts +2 -2
- package/src/Valkyrja/Validation/Rule/Int/GreaterThan.ts +1 -1
- package/src/Valkyrja/Validation/Rule/Int/LessThan.ts +1 -1
- package/src/Valkyrja/Validation/Rule/Is/Email.ts +1 -1
- package/src/Valkyrja/Validation/Rule/Is/Equal.ts +1 -1
- package/src/Valkyrja/Validation/Rule/Is/IsBool.ts +1 -1
- package/src/Valkyrja/Validation/Rule/Is/IsEmpty.ts +1 -1
- package/src/Valkyrja/Validation/Rule/Is/IsNumeric.ts +1 -1
- package/src/Valkyrja/Validation/Rule/Is/IsString.ts +1 -1
- package/src/Valkyrja/Validation/Rule/Is/NotEmpty.ts +1 -1
- package/src/Valkyrja/Validation/Rule/Is/NotEqual.ts +1 -1
- package/src/Valkyrja/Validation/Rule/Is/Required.ts +1 -1
- package/src/Valkyrja/Validation/Rule/String/Alpha.ts +1 -1
- package/src/Valkyrja/Validation/Rule/String/Contains.ts +1 -1
- package/src/Valkyrja/Validation/Rule/String/EndsWith.ts +1 -1
- package/src/Valkyrja/Validation/Rule/String/Lowercase.ts +1 -1
- package/src/Valkyrja/Validation/Rule/String/Max.ts +1 -1
- package/src/Valkyrja/Validation/Rule/String/Min.ts +1 -1
- package/src/Valkyrja/Validation/Rule/String/Regex.ts +1 -1
- package/src/Valkyrja/Validation/Rule/String/StartsWith.ts +1 -1
- package/src/Valkyrja/Validation/Rule/String/Uppercase.ts +1 -1
- package/src/Valkyrja/Validation/Throwable/Contract/ValidationThrowable.ts +1 -1
- package/src/Valkyrja/Validation/Throwable/Exception/Abstract/ValidationInvalidArgumentException.ts +2 -2
- package/src/Valkyrja/Validation/Throwable/Exception/Abstract/ValidationRuntimeException.ts +2 -2
- package/src/Valkyrja/Validation/Throwable/Exception/ValidationRuleFailureException.ts +1 -1
- package/src/Valkyrja/Validation/Validator/Contract/ValidatorContract.ts +1 -1
- package/src/Valkyrja/Validation/Validator/Validator.ts +4 -7
- package/src/Valkyrja/Cli/Middleware/Contract/ExitedMiddlewareContract.ts +0 -22
- package/src/Valkyrja/Cli/Middleware/Handler/Contract/ExitedHandlerContract.ts +0 -22
- package/src/Valkyrja/Cli/Middleware/Handler/ExitedHandler.ts +0 -24
- package/src/Valkyrja/Http/Middleware/Contract/TerminatedMiddlewareContract.ts +0 -16
- package/src/Valkyrja/Http/Middleware/Handler/Contract/TerminatedHandlerContract.ts +0 -17
- package/src/Valkyrja/Http/Middleware/Handler/TerminatedHandler.ts +0 -24
package/README.md
CHANGED
|
@@ -1,116 +1,101 @@
|
|
|
1
1
|
<p align="center"><a href="https://valkyrja.io" target="_blank">
|
|
2
|
-
<img src="https://raw.githubusercontent.com/valkyrjaio/art/refs/heads/master/
|
|
2
|
+
<img src="https://raw.githubusercontent.com/valkyrjaio/art/refs/heads/master/long-banner/orange/typescript.png" width="100%">
|
|
3
3
|
</a></p>
|
|
4
4
|
|
|
5
5
|
# Valkyrja
|
|
6
6
|
|
|
7
|
-
[Valkyrja][Valkyrja url] is a
|
|
8
|
-
|
|
9
|
-
## About Valkyrja
|
|
10
|
-
|
|
11
|
-
> This repository contains the core code of the Valkyrja framework.
|
|
7
|
+
[Valkyrja][Valkyrja url] is a TypeScript framework for web and console applications.
|
|
12
8
|
|
|
13
9
|
Valkyrja (pronounced "Valk-ear-ya") is the Old Norse spelling for Valkyrie, a
|
|
14
10
|
mythical creature that would guide warriors to Valhalla (the afterlife and a
|
|
15
11
|
better place) after death. In a similar sense, the Valkyrja framework guides
|
|
16
|
-
your application to be in a better state.
|
|
17
|
-
|
|
12
|
+
your application to be in a better state. Fast, light, and robust, Valkyrja
|
|
13
|
+
does the heavy lifting so you can focus on your application.
|
|
18
14
|
|
|
19
15
|
<p>
|
|
20
|
-
<a href="https://
|
|
21
|
-
<a href="https://
|
|
22
|
-
<a href="https://
|
|
23
|
-
|
|
24
|
-
<a href="https://scrutinizer-ci.com/g/valkyrjaio/valkyrja/?branch=26.x"><img src="https://scrutinizer-ci.com/g/valkyrjaio/valkyrja-java/badges/quality-score.png?b=26.x" alt="Scrutinizer"></a>
|
|
25
|
-
<a href="https://coveralls.io/github/valkyrjaio/valkyrja?branch=26.x"><img src="https://coveralls.io/repos/github/valkyrjaio/valkyrja-java/badge.svg?branch=26.x" alt="Coverage Status" /></a>
|
|
26
|
-
<a href="https://shepherd.dev/github/valkyrjaio/valkyrja"><img src="https://shepherd.dev/github/valkyrjaio/valkyrja-java/coverage.svg" alt="Psalm Shepherd" /></a>
|
|
27
|
-
<a href="https://sonarcloud.io/summary/new_code?id=valkyrjaio_valkyrja-java"><img src="https://sonarcloud.io/api/project_badges/measure?project=valkyrjaio_valkyrja-java&metric=sqale_rating" alt="Maintainability Rating" /></a>
|
|
16
|
+
<a href="https://www.npmjs.com/package/@valkyrjaio/valkyrja"><img src="https://img.shields.io/npm/v/@valkyrjaio/valkyrja.svg" alt="Latest Version on npm"></a>
|
|
17
|
+
<a href="https://www.npmjs.com/package/@valkyrjaio/valkyrja"><img src="https://img.shields.io/node/v/@valkyrjaio/valkyrja.svg" alt="Supported Node.js Version"></a>
|
|
18
|
+
<a href="https://github.com/valkyrjaio/valkyrja-ts/blob/26.x/LICENSE.md"><img src="https://img.shields.io/github/license/valkyrjaio/valkyrja-ts.svg" alt="License"></a>
|
|
19
|
+
<a href="https://github.com/valkyrjaio/valkyrja-ts/actions/workflows/ci.yml?query=branch%3A26.x"><img src="https://github.com/valkyrjaio/valkyrja-ts/actions/workflows/ci.yml/badge.svg?branch=26.x" alt="CI Status"></a>
|
|
28
20
|
</p>
|
|
29
21
|
|
|
30
|
-
##
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
</tbody>
|
|
68
|
-
</table>
|
|
22
|
+
## What's Included
|
|
23
|
+
|
|
24
|
+
- **HTTP and CLI kernels** — unified application architecture serving both
|
|
25
|
+
web requests and command-line invocations
|
|
26
|
+
- **Dependency injection container** — deferred bindings, contextual
|
|
27
|
+
resolution, and child containers for fast resolution at runtime
|
|
28
|
+
- **Routing** — expressive HTTP and CLI route definitions with middleware,
|
|
29
|
+
constraints, and reverse URL resolution
|
|
30
|
+
- **HTTP messages** — PSR-style requests, responses, streams, URIs, uploaded
|
|
31
|
+
files, and headers
|
|
32
|
+
- **Event dispatcher** — decoupled event handling with typed listeners
|
|
33
|
+
- **Validation** — rule-based validation for input data
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
### Start a New Application
|
|
38
|
+
|
|
39
|
+
The fastest way to start a new Valkyrja application is with the starter app or
|
|
40
|
+
the Sindri build tool:
|
|
41
|
+
|
|
42
|
+
- Use the [`valkyrja-starter-app-ts`][starter url] GitHub template ("Use this
|
|
43
|
+
template" button on the repository page)
|
|
44
|
+
- Or use [Sindri][sindri url] to scaffold and build your project
|
|
45
|
+
|
|
46
|
+
### Add to an Existing Project
|
|
47
|
+
|
|
48
|
+
To install the framework as a dependency:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
npm install @valkyrjaio/valkyrja
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Import only what you need, by path:
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { Application } from '@valkyrjaio/valkyrja/Application/Kernel/Application.js';
|
|
58
|
+
```
|
|
69
59
|
|
|
70
60
|
## Documentation
|
|
71
61
|
|
|
72
|
-
|
|
73
|
-
access it even when working offline.
|
|
62
|
+
Full [documentation][docs url] is available on the Valkyrja website.
|
|
74
63
|
|
|
75
|
-
##
|
|
64
|
+
## Ecosystem
|
|
76
65
|
|
|
77
|
-
|
|
66
|
+
Valkyrja is the core framework. Surrounding it is an ecosystem of related
|
|
67
|
+
projects in the Valkyrjaio organization:
|
|
78
68
|
|
|
79
|
-
|
|
69
|
+
- [**Sindri**][sindri url] — build tool and application creator
|
|
70
|
+
- [**Starter (App)**][starter url] — starter application for new projects
|
|
80
71
|
|
|
81
|
-
|
|
72
|
+
See the [Valkyrjaio organization page][org url] for the complete listing.
|
|
82
73
|
|
|
83
74
|
## Versioning and Release Process
|
|
84
75
|
|
|
85
|
-
Valkyrja
|
|
76
|
+
Valkyrja follows [semantic versioning][semantic versioning url] with a major
|
|
86
77
|
release every year, and support for each major version for 2 years from the
|
|
87
78
|
date of release.
|
|
88
79
|
|
|
89
|
-
For more information
|
|
80
|
+
For more information see our
|
|
90
81
|
[Versioning and Release Process documentation][Versioning and Release Process url].
|
|
91
82
|
|
|
92
83
|
### Supported Versions
|
|
93
84
|
|
|
94
|
-
Bug fixes
|
|
95
|
-
fixes
|
|
85
|
+
Bug fixes are provided until 3 months after the next major release. Security
|
|
86
|
+
fixes are provided for 2 years after the initial release.
|
|
96
87
|
|
|
97
|
-
| Version |
|
|
98
|
-
| :------ |
|
|
99
|
-
| 26 |
|
|
100
|
-
| 27 | 8.5 - 8.6 | Q1 2027 | Q2 2028 | Q1 2029 |
|
|
101
|
-
| 28 | 8.6+ | Q1 2028 | Q2 2029 | Q1 2030 |
|
|
102
|
-
|
|
103
|
-
(\*) Supported PHP versions
|
|
88
|
+
| Version | Node | Release | Bug Fixes Until | Security Fixes Until |
|
|
89
|
+
| :------ | :--- | :------------- | :-------------- | :------------------- |
|
|
90
|
+
| 26 | 22+ | March 31, 2026 | Q2 2027 | Q1 2028 |
|
|
104
91
|
|
|
105
92
|
## Contributing
|
|
106
93
|
|
|
107
|
-
Valkyrja is an
|
|
108
|
-
|
|
109
|
-
Thank you for your interest in helping us develop, maintain, and release the
|
|
110
|
-
Valkyrja framework!
|
|
94
|
+
Valkyrja is an open-source, community-driven project. Thank you for your
|
|
95
|
+
interest in helping develop, maintain, and release it.
|
|
111
96
|
|
|
112
|
-
|
|
113
|
-
[
|
|
97
|
+
See [`CONTRIBUTING.md`][contributing url] for the submission process and
|
|
98
|
+
[`VOCABULARY.md`][vocabulary url] for the terminology used across Valkyrja.
|
|
114
99
|
|
|
115
100
|
## Security Issues
|
|
116
101
|
|
|
@@ -119,18 +104,18 @@ If you discover a security vulnerability within Valkyrja, please follow our
|
|
|
119
104
|
|
|
120
105
|
## License
|
|
121
106
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
[Valkyrja License here][license url].
|
|
107
|
+
Valkyrja is open-source software licensed under the
|
|
108
|
+
[MIT license][MIT license url]. See [`LICENSE.md`](./LICENSE.md).
|
|
125
109
|
|
|
126
110
|
[Valkyrja url]: https://valkyrja.io
|
|
127
|
-
[
|
|
128
|
-
[
|
|
129
|
-
[
|
|
130
|
-
[
|
|
131
|
-
[Versioning and Release Process url]:
|
|
132
|
-
[
|
|
111
|
+
[org url]: https://github.com/valkyrjaio
|
|
112
|
+
[sindri url]: https://github.com/valkyrjaio/sindri-ts
|
|
113
|
+
[starter url]: https://github.com/valkyrjaio/valkyrja-starter-app-ts
|
|
114
|
+
[docs url]: https://valkyrja.io
|
|
115
|
+
[Versioning and Release Process url]: https://github.com/valkyrjaio/.github/blob/master/VERSIONING_AND_RELEASE_PROCESS.md
|
|
116
|
+
[contributing url]: https://github.com/valkyrjaio/.github/blob/master/CONTRIBUTING.md
|
|
117
|
+
[vocabulary url]: https://github.com/valkyrjaio/.github/blob/master/VOCABULARY.md
|
|
118
|
+
[security vulnerabilities url]: https://github.com/valkyrjaio/.github/blob/master/SECURITY.md
|
|
133
119
|
[semantic versioning url]: https://semver.org/
|
|
134
120
|
[MIT license url]: https://opensource.org/licenses/MIT
|
|
135
121
|
[license url]: ./LICENSE.md
|
|
136
|
-
[contributing url]: ./CONTRIBUTING.md
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valkyrjaio/valkyrja",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.2.0",
|
|
4
4
|
"description": "The Valkyrja Framework.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -18,20 +18,23 @@
|
|
|
18
18
|
"author": "Melech Mizrachi <melechmizrachi@gmail.com>",
|
|
19
19
|
"type": "module",
|
|
20
20
|
"exports": {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
21
|
+
"./*.ts": {
|
|
22
|
+
"types": "./src/Valkyrja/*.ts",
|
|
23
|
+
"import": "./src/Valkyrja/*.ts"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
"main": "index.js",
|
|
27
26
|
"directories": {
|
|
28
27
|
"test": "tests"
|
|
29
28
|
},
|
|
30
29
|
"files": [
|
|
31
|
-
"dist",
|
|
32
30
|
"src"
|
|
33
31
|
],
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public",
|
|
34
|
+
"provenance": true
|
|
35
|
+
},
|
|
34
36
|
"scripts": {
|
|
37
|
+
"build": "cd .github/ci/typescript && npm run build",
|
|
35
38
|
"typescript": "cd .github/ci/typescript && npm run check",
|
|
36
39
|
"typescript-outdated-check": "cd .github/ci/typescript && npm install && npm outdated",
|
|
37
40
|
"typescript-outdated-check-major-release": "cd .github/ci/typescript && npm install && npm outdated",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
export class ApplicationInfo {
|
|
11
|
-
static readonly VERSION = '26.
|
|
12
|
-
static readonly VERSION_BUILD_DATE_TIME = '
|
|
11
|
+
static readonly VERSION = '26.2.0' as const;
|
|
12
|
+
static readonly VERSION_BUILD_DATE_TIME = 'July 24 2026 23:49:19 MST' as const;
|
|
13
13
|
static readonly ASCII = `
|
|
14
14
|
_ _ _
|
|
15
15
|
/\\ /\\__ _| | | ___ _ _ __(_) __ _
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { ApplicationInfo } from '../Constant/ApplicationInfo.
|
|
11
|
-
import { ApplicationServiceId } from '../Constant/ApplicationServiceId.
|
|
12
|
-
import { CliWithHttpApplicationComponentProvider } from '../Provider/CliWithHttpApplicationComponentProvider.
|
|
13
|
-
import { CliServerServiceId } from '../../Cli/Server/Constant/CliServerServiceId.
|
|
14
|
-
import { CliCommandName } from '../../Cli/Server/Constant/CommandName.
|
|
10
|
+
import { ApplicationInfo } from '../Constant/ApplicationInfo.ts';
|
|
11
|
+
import { ApplicationServiceId } from '../Constant/ApplicationServiceId.ts';
|
|
12
|
+
import { CliWithHttpApplicationComponentProvider } from '../Provider/CliWithHttpApplicationComponentProvider.ts';
|
|
13
|
+
import { CliServerServiceId } from '../../Cli/Server/Constant/CliServerServiceId.ts';
|
|
14
|
+
import { CliCommandName } from '../../Cli/Server/Constant/CommandName.ts';
|
|
15
15
|
|
|
16
|
-
import type { ApplicationContract } from '../Kernel/Contract/ApplicationContract.
|
|
17
|
-
import type { ComponentProviderContract } from '../Provider/Contract/ComponentProviderContract.
|
|
18
|
-
import type { CliConfigContract } from './Contract/CliConfigContract.
|
|
16
|
+
import type { ApplicationContract } from '../Kernel/Contract/ApplicationContract.ts';
|
|
17
|
+
import type { ComponentProviderContract } from '../Provider/Contract/ComponentProviderContract.ts';
|
|
18
|
+
import type { CliConfigContract } from './Contract/CliConfigContract.ts';
|
|
19
19
|
|
|
20
20
|
export class CliConfig implements CliConfigContract {
|
|
21
21
|
static readonly id = ApplicationServiceId.CliConfigContract;
|
|
@@ -46,6 +46,6 @@ export class CliConfig implements CliConfigContract {
|
|
|
46
46
|
CliServerServiceId.LogThrowableCaughtMiddleware,
|
|
47
47
|
CliServerServiceId.OutputThrowableCaughtMiddleware,
|
|
48
48
|
],
|
|
49
|
-
public readonly
|
|
49
|
+
public readonly processExitingMiddleware: string[] = [],
|
|
50
50
|
) {}
|
|
51
51
|
}
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { ApplicationInfo } from '../Constant/ApplicationInfo.
|
|
11
|
-
import { ApplicationComponentProvider } from '../Provider/ApplicationComponentProvider.
|
|
10
|
+
import { ApplicationInfo } from '../Constant/ApplicationInfo.ts';
|
|
11
|
+
import { ApplicationComponentProvider } from '../Provider/ApplicationComponentProvider.ts';
|
|
12
12
|
|
|
13
|
-
import type { ApplicationContract } from '../Kernel/Contract/ApplicationContract.
|
|
14
|
-
import type { ComponentProviderContract } from '../Provider/Contract/ComponentProviderContract.
|
|
15
|
-
import type { ConfigContract } from './Contract/ConfigContract.
|
|
13
|
+
import type { ApplicationContract } from '../Kernel/Contract/ApplicationContract.ts';
|
|
14
|
+
import type { ComponentProviderContract } from '../Provider/Contract/ComponentProviderContract.ts';
|
|
15
|
+
import type { ConfigContract } from './Contract/ConfigContract.ts';
|
|
16
16
|
|
|
17
17
|
export class Config implements ConfigContract {
|
|
18
18
|
constructor(
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ConfigContract } from './ConfigContract.
|
|
10
|
+
import type { ConfigContract } from './ConfigContract.ts';
|
|
11
11
|
|
|
12
12
|
export interface CliConfigContract extends ConfigContract {
|
|
13
13
|
readonly applicationName: string;
|
|
@@ -17,7 +17,7 @@ export interface CliConfigContract extends ConfigContract {
|
|
|
17
17
|
readonly routeNotMatchedMiddleware: string[];
|
|
18
18
|
readonly routeDispatchedMiddleware: string[];
|
|
19
19
|
readonly throwableCaughtMiddleware: string[];
|
|
20
|
-
readonly
|
|
20
|
+
readonly processExitingMiddleware: string[];
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export namespace CliConfigContract {
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ApplicationContract } from '../../Kernel/Contract/ApplicationContract.
|
|
11
|
-
import type { ComponentProviderContract } from '../../Provider/Contract/ComponentProviderContract.
|
|
10
|
+
import type { ApplicationContract } from '../../Kernel/Contract/ApplicationContract.ts';
|
|
11
|
+
import type { ComponentProviderContract } from '../../Provider/Contract/ComponentProviderContract.ts';
|
|
12
12
|
|
|
13
13
|
export interface ConfigContract {
|
|
14
14
|
readonly namespace: string;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ConfigContract } from './ConfigContract.
|
|
10
|
+
import type { ConfigContract } from './ConfigContract.ts';
|
|
11
11
|
|
|
12
12
|
export interface HttpConfigContract extends ConfigContract {
|
|
13
13
|
readonly requestReceivedMiddleware: string[];
|
|
@@ -16,7 +16,7 @@ export interface HttpConfigContract extends ConfigContract {
|
|
|
16
16
|
readonly routeDispatchedMiddleware: string[];
|
|
17
17
|
readonly throwableCaughtMiddleware: string[];
|
|
18
18
|
readonly sendingResponseMiddleware: string[];
|
|
19
|
-
readonly
|
|
19
|
+
readonly responseSentMiddleware: string[];
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export namespace HttpConfigContract {
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { ApplicationInfo } from '../Constant/ApplicationInfo.
|
|
11
|
-
import { ApplicationServiceId } from '../Constant/ApplicationServiceId.
|
|
12
|
-
import { HttpApplicationComponentProvider } from '../Provider/HttpApplicationComponentProvider.
|
|
10
|
+
import { ApplicationInfo } from '../Constant/ApplicationInfo.ts';
|
|
11
|
+
import { ApplicationServiceId } from '../Constant/ApplicationServiceId.ts';
|
|
12
|
+
import { HttpApplicationComponentProvider } from '../Provider/HttpApplicationComponentProvider.ts';
|
|
13
13
|
|
|
14
|
-
import type { ApplicationContract } from '../Kernel/Contract/ApplicationContract.
|
|
15
|
-
import type { ComponentProviderContract } from '../Provider/Contract/ComponentProviderContract.
|
|
16
|
-
import type { HttpConfigContract } from './Contract/HttpConfigContract.
|
|
14
|
+
import type { ApplicationContract } from '../Kernel/Contract/ApplicationContract.ts';
|
|
15
|
+
import type { ComponentProviderContract } from '../Provider/Contract/ComponentProviderContract.ts';
|
|
16
|
+
import type { HttpConfigContract } from './Contract/HttpConfigContract.ts';
|
|
17
17
|
|
|
18
18
|
export class HttpConfig implements HttpConfigContract {
|
|
19
19
|
static readonly id = ApplicationServiceId.HttpConfigContract;
|
|
@@ -36,6 +36,6 @@ export class HttpConfig implements HttpConfigContract {
|
|
|
36
36
|
public readonly routeDispatchedMiddleware: string[] = [],
|
|
37
37
|
public readonly throwableCaughtMiddleware: string[] = [],
|
|
38
38
|
public readonly sendingResponseMiddleware: string[] = [],
|
|
39
|
-
public readonly
|
|
39
|
+
public readonly responseSentMiddleware: string[] = [],
|
|
40
40
|
) {}
|
|
41
41
|
}
|
|
@@ -7,20 +7,20 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { Valkyrja } from '../../Kernel/Valkyrja.
|
|
11
|
-
import { Directory } from '../../Directory/Directory.
|
|
12
|
-
import { Config } from '../../Data/Config.
|
|
13
|
-
import { ContainerServiceProvider } from '../../../Container/Provider/ContainerServiceProvider.
|
|
14
|
-
import { Container } from '../../../Container/Manager/Container.
|
|
15
|
-
import { ApplicationServiceId } from '../../Constant/ApplicationServiceId.
|
|
16
|
-
import { ContainerServiceId } from '../../../Container/Constant/ContainerServiceId.
|
|
17
|
-
import { ThrowableServiceId } from '../../../Throwable/Constant/ThrowableServiceId.
|
|
18
|
-
|
|
19
|
-
import type { ApplicationContract } from '../../Kernel/Contract/ApplicationContract.
|
|
20
|
-
import type { ConfigContract } from '../../Data/Contract/ConfigContract.
|
|
21
|
-
import type { ContainerContract } from '../../../Container/Manager/Contract/ContainerContract.
|
|
22
|
-
import type { ContainerData } from '../../../Container/Data/ContainerData.
|
|
23
|
-
import type { ThrowableHandlerContract } from '../../../Throwable/Handler/Contract/ThrowableHandlerContract.
|
|
10
|
+
import { Valkyrja } from '../../Kernel/Valkyrja.ts';
|
|
11
|
+
import { Directory } from '../../Directory/Directory.ts';
|
|
12
|
+
import { Config } from '../../Data/Config.ts';
|
|
13
|
+
import { ContainerServiceProvider } from '../../../Container/Provider/ContainerServiceProvider.ts';
|
|
14
|
+
import { Container } from '../../../Container/Manager/Container.ts';
|
|
15
|
+
import { ApplicationServiceId } from '../../Constant/ApplicationServiceId.ts';
|
|
16
|
+
import { ContainerServiceId } from '../../../Container/Constant/ContainerServiceId.ts';
|
|
17
|
+
import { ThrowableServiceId } from '../../../Throwable/Constant/ThrowableServiceId.ts';
|
|
18
|
+
|
|
19
|
+
import type { ApplicationContract } from '../../Kernel/Contract/ApplicationContract.ts';
|
|
20
|
+
import type { ConfigContract } from '../../Data/Contract/ConfigContract.ts';
|
|
21
|
+
import type { ContainerContract } from '../../../Container/Manager/Contract/ContainerContract.ts';
|
|
22
|
+
import type { ContainerData } from '../../../Container/Data/ContainerData.ts';
|
|
23
|
+
import type { ThrowableHandlerContract } from '../../../Throwable/Handler/Contract/ThrowableHandlerContract.ts';
|
|
24
24
|
|
|
25
25
|
let appStartTime: number | undefined;
|
|
26
26
|
|
|
@@ -9,22 +9,22 @@
|
|
|
9
9
|
|
|
10
10
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
11
11
|
|
|
12
|
-
import { ChildApplication } from '../../Kernel/ChildApplication.
|
|
13
|
-
import { ChildContainer } from '../../../Container/Manager/ChildContainer.
|
|
14
|
-
import { ApplicationServiceId } from '../../Constant/ApplicationServiceId.
|
|
15
|
-
import { ContainerServiceId } from '../../../Container/Constant/ContainerServiceId.
|
|
16
|
-
import { HttpServerServiceId } from '../../../Http/Server/Constant/HttpServerServiceId.
|
|
17
|
-
import { HttpRoutingServiceId } from '../../../Http/Routing/Constant/HttpRoutingServiceId.
|
|
18
|
-
import { RequestFactory } from '../../../Http/Message/Request/Factory/RequestFactory.
|
|
19
|
-
import { App } from './App.
|
|
12
|
+
import { ChildApplication } from '../../Kernel/ChildApplication.ts';
|
|
13
|
+
import { ChildContainer } from '../../../Container/Manager/ChildContainer.ts';
|
|
14
|
+
import { ApplicationServiceId } from '../../Constant/ApplicationServiceId.ts';
|
|
15
|
+
import { ContainerServiceId } from '../../../Container/Constant/ContainerServiceId.ts';
|
|
16
|
+
import { HttpServerServiceId } from '../../../Http/Server/Constant/HttpServerServiceId.ts';
|
|
17
|
+
import { HttpRoutingServiceId } from '../../../Http/Routing/Constant/HttpRoutingServiceId.ts';
|
|
18
|
+
import { RequestFactory } from '../../../Http/Message/Request/Factory/RequestFactory.ts';
|
|
19
|
+
import { App } from './App.ts';
|
|
20
20
|
|
|
21
|
-
import type { ApplicationContract } from '../../Kernel/Contract/ApplicationContract.
|
|
22
|
-
import type { ContainerContract } from '../../../Container/Manager/Contract/ContainerContract.
|
|
23
|
-
import type { ContainerData } from '../../../Container/Data/ContainerData.
|
|
24
|
-
import type { HttpConfigContract } from '../../Data/Contract/HttpConfigContract.
|
|
25
|
-
import type { ServerRequestContract } from '../../../Http/Message/Request/Contract/ServerRequestContract.
|
|
26
|
-
import type { RequestHandlerContract } from '../../../Http/Server/Handler/Contract/RequestHandlerContract.
|
|
27
|
-
import type { RouteCollectionContract } from '../../../Http/Routing/Collection/Contract/RouteCollectionContract.
|
|
21
|
+
import type { ApplicationContract } from '../../Kernel/Contract/ApplicationContract.ts';
|
|
22
|
+
import type { ContainerContract } from '../../../Container/Manager/Contract/ContainerContract.ts';
|
|
23
|
+
import type { ContainerData } from '../../../Container/Data/ContainerData.ts';
|
|
24
|
+
import type { HttpConfigContract } from '../../Data/Contract/HttpConfigContract.ts';
|
|
25
|
+
import type { ServerRequestContract } from '../../../Http/Message/Request/Contract/ServerRequestContract.ts';
|
|
26
|
+
import type { RequestHandlerContract } from '../../../Http/Server/Handler/Contract/RequestHandlerContract.ts';
|
|
27
|
+
import type { RouteCollectionContract } from '../../../Http/Routing/Collection/Contract/RouteCollectionContract.ts';
|
|
28
28
|
|
|
29
29
|
export abstract class WorkerHttp extends App {
|
|
30
30
|
static bootstrap(config: HttpConfigContract): ApplicationContract {
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { App } from './Abstract/App.
|
|
11
|
-
import { InputFactory } from '../../Cli/Interaction/Input/Factory/InputFactory.
|
|
12
|
-
import { CliServerServiceId } from '../../Cli/Server/Constant/CliServerServiceId.
|
|
10
|
+
import { App } from './Abstract/App.ts';
|
|
11
|
+
import { InputFactory } from '../../Cli/Interaction/Input/Factory/InputFactory.ts';
|
|
12
|
+
import { CliServerServiceId } from '../../Cli/Server/Constant/CliServerServiceId.ts';
|
|
13
13
|
|
|
14
|
-
import type { CliConfigContract } from '../Data/Contract/CliConfigContract.
|
|
15
|
-
import type { InputContract } from '../../Cli/Interaction/Input/Contract/InputContract.
|
|
16
|
-
import type { InputHandlerContract } from '../../Cli/Server/Handler/Contract/InputHandlerContract.
|
|
14
|
+
import type { CliConfigContract } from '../Data/Contract/CliConfigContract.ts';
|
|
15
|
+
import type { InputContract } from '../../Cli/Interaction/Input/Contract/InputContract.ts';
|
|
16
|
+
import type { InputHandlerContract } from '../../Cli/Server/Handler/Contract/InputHandlerContract.ts';
|
|
17
17
|
|
|
18
18
|
export class Cli extends App {
|
|
19
19
|
static run(config: CliConfigContract): void {
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
import { createServer } from 'node:http';
|
|
11
11
|
import type { IncomingMessage } from 'node:http';
|
|
12
12
|
|
|
13
|
-
import { App } from './Abstract/App.
|
|
14
|
-
import { HttpServerServiceId } from '../../Http/Server/Constant/HttpServerServiceId.
|
|
15
|
-
import { RequestFactory } from '../../Http/Message/Request/Factory/RequestFactory.
|
|
13
|
+
import { App } from './Abstract/App.ts';
|
|
14
|
+
import { HttpServerServiceId } from '../../Http/Server/Constant/HttpServerServiceId.ts';
|
|
15
|
+
import { RequestFactory } from '../../Http/Message/Request/Factory/RequestFactory.ts';
|
|
16
16
|
|
|
17
|
-
import type { HttpConfigContract } from '../Data/Contract/HttpConfigContract.
|
|
18
|
-
import type { ServerRequestContract } from '../../Http/Message/Request/Contract/ServerRequestContract.
|
|
19
|
-
import type { RequestHandlerContract } from '../../Http/Server/Handler/Contract/RequestHandlerContract.
|
|
17
|
+
import type { HttpConfigContract } from '../Data/Contract/HttpConfigContract.ts';
|
|
18
|
+
import type { ServerRequestContract } from '../../Http/Message/Request/Contract/ServerRequestContract.ts';
|
|
19
|
+
import type { RequestHandlerContract } from '../../Http/Server/Handler/Contract/RequestHandlerContract.ts';
|
|
20
20
|
|
|
21
21
|
export class Http extends App {
|
|
22
22
|
static run(config: HttpConfigContract, port: number = 3000): void {
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ApplicationContract } from './Contract/ApplicationContract.
|
|
11
|
-
import type { ComponentProviderContract } from '../Provider/Contract/ComponentProviderContract.
|
|
12
|
-
import type { ContainerContract } from '../../Container/Manager/Contract/ContainerContract.
|
|
13
|
-
import type { ServiceProviderContract } from '../../Container/Provider/Contract/ServiceProviderContract.
|
|
14
|
-
import type { ListenerProviderContract } from '../../Event/Provider/Contract/ListenerProviderContract.
|
|
15
|
-
import type { CliRouteProviderContract } from '../../Cli/Routing/Provider/Contract/CliRouteProviderContract.
|
|
16
|
-
import type { HttpRouteProviderContract } from '../../Http/Routing/Provider/Contract/HttpRouteProviderContract.
|
|
10
|
+
import type { ApplicationContract } from './Contract/ApplicationContract.ts';
|
|
11
|
+
import type { ComponentProviderContract } from '../Provider/Contract/ComponentProviderContract.ts';
|
|
12
|
+
import type { ContainerContract } from '../../Container/Manager/Contract/ContainerContract.ts';
|
|
13
|
+
import type { ServiceProviderContract } from '../../Container/Provider/Contract/ServiceProviderContract.ts';
|
|
14
|
+
import type { ListenerProviderContract } from '../../Event/Provider/Contract/ListenerProviderContract.ts';
|
|
15
|
+
import type { CliRouteProviderContract } from '../../Cli/Routing/Provider/Contract/CliRouteProviderContract.ts';
|
|
16
|
+
import type { HttpRouteProviderContract } from '../../Http/Routing/Provider/Contract/HttpRouteProviderContract.ts';
|
|
17
17
|
|
|
18
18
|
export class ChildApplication implements ApplicationContract {
|
|
19
19
|
constructor(
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { CliRouteProviderContract } from '../../../Cli/Routing/Provider/Contract/CliRouteProviderContract.
|
|
11
|
-
import type { ListenerProviderContract } from '../../../Event/Provider/Contract/ListenerProviderContract.
|
|
12
|
-
import type { HttpRouteProviderContract } from '../../../Http/Routing/Provider/Contract/HttpRouteProviderContract.
|
|
13
|
-
import type { ContainerContract } from '../../../Container/Manager/Contract/ContainerContract.
|
|
14
|
-
import type { ServiceProviderContract } from '../../../Container/Provider/Contract/ServiceProviderContract.
|
|
15
|
-
import type { ComponentProviderContract } from '../../Provider/Contract/ComponentProviderContract.
|
|
10
|
+
import type { CliRouteProviderContract } from '../../../Cli/Routing/Provider/Contract/CliRouteProviderContract.ts';
|
|
11
|
+
import type { ListenerProviderContract } from '../../../Event/Provider/Contract/ListenerProviderContract.ts';
|
|
12
|
+
import type { HttpRouteProviderContract } from '../../../Http/Routing/Provider/Contract/HttpRouteProviderContract.ts';
|
|
13
|
+
import type { ContainerContract } from '../../../Container/Manager/Contract/ContainerContract.ts';
|
|
14
|
+
import type { ServiceProviderContract } from '../../../Container/Provider/Contract/ServiceProviderContract.ts';
|
|
15
|
+
import type { ComponentProviderContract } from '../../Provider/Contract/ComponentProviderContract.ts';
|
|
16
16
|
|
|
17
17
|
export interface ApplicationContract {
|
|
18
18
|
getContainer(): ContainerContract;
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { Config } from '../Data/Config.
|
|
11
|
-
|
|
12
|
-
import type { ApplicationContract } from './Contract/ApplicationContract.
|
|
13
|
-
import type { ConfigContract } from '../Data/Contract/ConfigContract.
|
|
14
|
-
import type { ComponentProviderContract } from '../Provider/Contract/ComponentProviderContract.
|
|
15
|
-
import type { ContainerContract } from '../../Container/Manager/Contract/ContainerContract.
|
|
16
|
-
import type { ServiceProviderContract } from '../../Container/Provider/Contract/ServiceProviderContract.
|
|
17
|
-
import type { ListenerProviderContract } from '../../Event/Provider/Contract/ListenerProviderContract.
|
|
18
|
-
import type { CliRouteProviderContract } from '../../Cli/Routing/Provider/Contract/CliRouteProviderContract.
|
|
19
|
-
import type { HttpRouteProviderContract } from '../../Http/Routing/Provider/Contract/HttpRouteProviderContract.
|
|
10
|
+
import { Config } from '../Data/Config.ts';
|
|
11
|
+
|
|
12
|
+
import type { ApplicationContract } from './Contract/ApplicationContract.ts';
|
|
13
|
+
import type { ConfigContract } from '../Data/Contract/ConfigContract.ts';
|
|
14
|
+
import type { ComponentProviderContract } from '../Provider/Contract/ComponentProviderContract.ts';
|
|
15
|
+
import type { ContainerContract } from '../../Container/Manager/Contract/ContainerContract.ts';
|
|
16
|
+
import type { ServiceProviderContract } from '../../Container/Provider/Contract/ServiceProviderContract.ts';
|
|
17
|
+
import type { ListenerProviderContract } from '../../Event/Provider/Contract/ListenerProviderContract.ts';
|
|
18
|
+
import type { CliRouteProviderContract } from '../../Cli/Routing/Provider/Contract/CliRouteProviderContract.ts';
|
|
19
|
+
import type { HttpRouteProviderContract } from '../../Http/Routing/Provider/Contract/HttpRouteProviderContract.ts';
|
|
20
20
|
|
|
21
21
|
export class Valkyrja implements ApplicationContract {
|
|
22
22
|
protected providers: ComponentProviderContract[] = [];
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { ContainerComponentProvider } from '../../Container/Provider/ContainerComponentProvider.
|
|
10
|
+
import { ContainerComponentProvider } from '../../Container/Provider/ContainerComponentProvider.ts';
|
|
11
11
|
|
|
12
|
-
import type { ApplicationContract } from '../Kernel/Contract/ApplicationContract.
|
|
13
|
-
import type { ComponentProviderContract } from './Contract/ComponentProviderContract.
|
|
14
|
-
import type { ServiceProviderContract } from '../../Container/Provider/Contract/ServiceProviderContract.
|
|
15
|
-
import type { ListenerProviderContract } from '../../Event/Provider/Contract/ListenerProviderContract.
|
|
16
|
-
import type { CliRouteProviderContract } from '../../Cli/Routing/Provider/Contract/CliRouteProviderContract.
|
|
17
|
-
import type { HttpRouteProviderContract } from '../../Http/Routing/Provider/Contract/HttpRouteProviderContract.
|
|
12
|
+
import type { ApplicationContract } from '../Kernel/Contract/ApplicationContract.ts';
|
|
13
|
+
import type { ComponentProviderContract } from './Contract/ComponentProviderContract.ts';
|
|
14
|
+
import type { ServiceProviderContract } from '../../Container/Provider/Contract/ServiceProviderContract.ts';
|
|
15
|
+
import type { ListenerProviderContract } from '../../Event/Provider/Contract/ListenerProviderContract.ts';
|
|
16
|
+
import type { CliRouteProviderContract } from '../../Cli/Routing/Provider/Contract/CliRouteProviderContract.ts';
|
|
17
|
+
import type { HttpRouteProviderContract } from '../../Http/Routing/Provider/Contract/HttpRouteProviderContract.ts';
|
|
18
18
|
|
|
19
19
|
export class ApplicationComponentProvider implements ComponentProviderContract {
|
|
20
20
|
getComponentProviders(_app: ApplicationContract): ComponentProviderContract[] {
|