raiton 6.6.0-beta.14 → 6.7.0-beta.15

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 (155) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +16 -9
  3. package/build/bin/index.mjs +8170 -3997
  4. package/deno.json +4 -1
  5. package/docs/contributors/framework/README.md +2 -0
  6. package/docs/contributors/framework/cache/README.md +55 -0
  7. package/docs/contributors/framework/cache/cache.md +86 -0
  8. package/docs/contributors/framework/cache/etag.md +82 -0
  9. package/docs/contributors/framework/decorators/README.md +1 -0
  10. package/docs/contributors/framework/runtime.md +13 -3
  11. package/docs/user-guide/README.md +1 -0
  12. package/docs/user-guide/cache.md +79 -0
  13. package/docs/user-guide/cli.md +35 -3
  14. package/docs/user-guide/decorators/README.md +1 -0
  15. package/docs/user-guide/decorators/cache.md +79 -0
  16. package/docs/user-guide/runtime.md +2 -1
  17. package/package.json +8 -3
  18. package/source/bin/bootstrapper.ts +4 -4
  19. package/source/bin/cli-tools.ts +27 -3
  20. package/source/bin/cli.ts +2 -2
  21. package/source/bin/commands.registry.ts +17 -0
  22. package/source/bin/constants.ts +1 -0
  23. package/source/bin/index.ts +2 -2
  24. package/source/commands/artifact.command.ts +2 -2
  25. package/source/commands/build.command.ts +2 -2
  26. package/source/commands/develop.command.ts +4 -5
  27. package/source/commands/grafts.command.ts +1 -1
  28. package/source/commands/start.command.ts +2 -2
  29. package/source/core/application.ts +10 -10
  30. package/source/core/artifacts/artifact.ts +1 -1
  31. package/source/core/artifacts/index.ts +1 -1
  32. package/source/core/builder.ts +69 -15
  33. package/source/core/bytes.util.ts +1 -1
  34. package/source/core/commands.ts +24 -14
  35. package/source/core/config/config.ts +2 -2
  36. package/source/core/config/define.ts +2 -2
  37. package/source/core/config/index.ts +2 -2
  38. package/source/core/context.ts +1 -1
  39. package/source/core/controller/builder.ts +9 -9
  40. package/source/core/controller/compiler.ts +6 -6
  41. package/source/core/controller/index.ts +4 -4
  42. package/source/core/controller/metadata.ts +2 -2
  43. package/source/core/controller/tracker.ts +1 -1
  44. package/source/core/directories.ts +3 -2
  45. package/source/core/guards.ts +1 -1
  46. package/source/core/helpers/index.ts +1 -1
  47. package/source/core/hooks.ts +1 -1
  48. package/source/core/index.ts +16 -16
  49. package/source/core/injection/index.ts +1 -1
  50. package/source/core/injection/injection.ts +3 -3
  51. package/source/core/mcp/builder.ts +8 -8
  52. package/source/core/mcp/index.ts +3 -3
  53. package/source/core/mcp/metadata.ts +2 -2
  54. package/source/core/mcp/tracker.ts +1 -1
  55. package/source/core/middleware/compose.ts +2 -2
  56. package/source/core/middleware/index.ts +2 -2
  57. package/source/core/middleware/pipeline.ts +2 -2
  58. package/source/core/plugins/index.ts +2 -2
  59. package/source/core/plugins/plugin.ts +1 -1
  60. package/source/core/plugins/scope.ts +4 -4
  61. package/source/core/raiton.ts +1 -1
  62. package/source/core/router/handler.ts +30 -6
  63. package/source/core/router/handler.utils.ts +3 -3
  64. package/source/core/router/index.ts +4 -4
  65. package/source/core/router/matcher.ts +1 -1
  66. package/source/core/router/route.ts +1 -1
  67. package/source/core/router/router.ts +4 -4
  68. package/source/core/server.ts +1 -1
  69. package/source/core/socket/builder.ts +2 -2
  70. package/source/core/socket/index.ts +2 -2
  71. package/source/core/socket/metadata.ts +2 -2
  72. package/source/core/thread.ts +51 -22
  73. package/source/framework/artifacts.ts +5 -5
  74. package/source/framework/cache/cache.decorator.ts +35 -0
  75. package/source/framework/cache/cache.ts +197 -0
  76. package/source/framework/cache/etag.ts +174 -0
  77. package/source/framework/cache/index.ts +4 -0
  78. package/source/framework/cache/types.ts +111 -0
  79. package/source/framework/constants/decorators.constant.ts +2 -0
  80. package/source/framework/constants/index.ts +2 -2
  81. package/source/framework/decorators/access-guard.decorator.ts +2 -2
  82. package/source/framework/decorators/api-response.decorator.ts +1 -1
  83. package/source/framework/decorators/api.decorator.ts +1 -1
  84. package/source/framework/decorators/controllable.decorator.ts +3 -3
  85. package/source/framework/decorators/csrf-guard.decorator.ts +4 -4
  86. package/source/framework/decorators/csrf-token.decorator.ts +1 -1
  87. package/source/framework/decorators/guard.decorator.ts +4 -4
  88. package/source/framework/decorators/health-check.decorator.ts +3 -3
  89. package/source/framework/decorators/index.ts +14 -14
  90. package/source/framework/decorators/injection.decorator.ts +3 -3
  91. package/source/framework/decorators/mcp.decorator.ts +4 -4
  92. package/source/framework/decorators/middleware.decorator.ts +2 -2
  93. package/source/framework/decorators/parametrable.decorator.ts +2 -2
  94. package/source/framework/decorators/routable.decorator.ts +3 -3
  95. package/source/framework/decorators/route-interaction.decorator.ts +4 -4
  96. package/source/framework/decorators/socket.decorator.ts +3 -3
  97. package/source/framework/encryption.ts +2 -2
  98. package/source/framework/enums/index.ts +8 -8
  99. package/source/framework/enums/runtime.enum.ts +1 -2
  100. package/source/framework/env.ts +2 -2
  101. package/source/framework/exceptions/http-exception.ts +3 -3
  102. package/source/framework/exceptions/index.ts +2 -2
  103. package/source/framework/health-check.ts +4 -4
  104. package/source/framework/index.ts +18 -17
  105. package/source/framework/mcp/handler.ts +3 -3
  106. package/source/framework/mcp/index.ts +3 -3
  107. package/source/framework/mcp/protocol.ts +1 -1
  108. package/source/framework/mcp/streamable-http.ts +3 -3
  109. package/source/framework/parameter-bag.ts +2 -2
  110. package/source/framework/plugins/body-parser.plugin.ts +3 -3
  111. package/source/framework/plugins/index.ts +4 -4
  112. package/source/framework/plugins/mcp.plugin.ts +5 -5
  113. package/source/framework/plugins/openapi.plugin.ts +4 -4
  114. package/source/framework/plugins/security/body-limit.ts +3 -3
  115. package/source/framework/plugins/security/cors.ts +2 -2
  116. package/source/framework/plugins/security/csrf.ts +6 -6
  117. package/source/framework/plugins/security/headers.ts +2 -2
  118. package/source/framework/plugins/security/index.ts +6 -6
  119. package/source/framework/plugins/security/method-guard.ts +3 -3
  120. package/source/framework/plugins/security/rate-limit.ts +3 -3
  121. package/source/framework/repositories.ts +1 -1
  122. package/source/framework/responses/error.ts +2 -2
  123. package/source/framework/responses/helpers.ts +3 -3
  124. package/source/framework/responses/http-throwable.ts +3 -3
  125. package/source/framework/responses/http.ts +3 -3
  126. package/source/framework/responses/index.ts +4 -4
  127. package/source/framework/runtime/bun/server.ts +5 -5
  128. package/source/framework/runtime/deno/server.ts +156 -96
  129. package/source/framework/runtime/index.ts +11 -17
  130. package/source/framework/runtime/node/reply.ts +1 -1
  131. package/source/framework/runtime/node/request.ts +2 -2
  132. package/source/framework/runtime/node/server.ts +3 -3
  133. package/source/framework/runtime/web/server.ts +2 -2
  134. package/source/framework/services.ts +1 -1
  135. package/source/framework/utilities/csrf.util.ts +1 -1
  136. package/source/framework/utilities/index.ts +10 -10
  137. package/source/framework/utilities/openapi.utils.ts +7 -7
  138. package/source/framework/utilities/utilities.util.ts +1 -1
  139. package/source/types/application.ts +2 -2
  140. package/source/types/builder.ts +1 -1
  141. package/source/types/config.ts +1 -1
  142. package/source/types/controller.ts +3 -3
  143. package/source/types/core.ts +1 -1
  144. package/source/types/csrf.ts +1 -1
  145. package/source/types/guard.ts +1 -1
  146. package/source/types/http-responses.ts +1 -1
  147. package/source/types/index.ts +26 -26
  148. package/source/types/injection.ts +1 -1
  149. package/source/types/middleware.ts +1 -1
  150. package/source/types/plugin.ts +1 -1
  151. package/source/types/raiton.ts +1 -1
  152. package/source/types/responses.ts +2 -2
  153. package/source/types/router.ts +2 -2
  154. package/source/types/runtime.ts +3 -5
  155. package/source/types/thread.ts +4 -4
@@ -1,26 +1,26 @@
1
- export type * from "./config"
2
- export type * from "./builder"
3
- export type * from "./thread"
4
- export type * from "./guard"
5
- export type * from "./contruct"
6
- export type * from "./directory"
7
- export type * from "./encryption"
8
- export type * from "./generic"
9
- export type * from "./parseable"
10
- export type * from "./values"
11
- export type * from "./utilities"
12
- export type * from "./artifact"
13
- export type * from "./middleware"
14
- export type * from "./core"
15
- export type * from "./plugin"
16
- export type * from "./runtime"
17
- export type * from "./router"
18
- export type * from "./controller"
19
- export type * from "./socket"
20
- export type * from "./injection"
21
- export type * from "./responses"
22
- export type * from "./server"
23
- export type * from "./raiton"
24
- export type * from "./lifecycle"
25
- export type * from "./mcp"
26
- export type * from "./csrf"
1
+ export type * from "./config.ts"
2
+ export type * from "./builder.ts"
3
+ export type * from "./thread.ts"
4
+ export type * from "./guard.ts"
5
+ export type * from "./contruct.ts"
6
+ export type * from "./directory.ts"
7
+ export type * from "./encryption.ts"
8
+ export type * from "./generic.ts"
9
+ export type * from "./parseable.ts"
10
+ export type * from "./values.ts"
11
+ export type * from "./utilities.ts"
12
+ export type * from "./artifact.ts"
13
+ export type * from "./middleware.ts"
14
+ export type * from "./core.ts"
15
+ export type * from "./plugin.ts"
16
+ export type * from "./runtime.ts"
17
+ export type * from "./router.ts"
18
+ export type * from "./controller.ts"
19
+ export type * from "./socket.ts"
20
+ export type * from "./injection.ts"
21
+ export type * from "./responses.ts"
22
+ export type * from "./server.ts"
23
+ export type * from "./raiton.ts"
24
+ export type * from "./lifecycle.ts"
25
+ export type * from "./mcp.ts"
26
+ export type * from "./csrf.ts"
@@ -1,4 +1,4 @@
1
- import {ConstructorType} from "./contruct";
1
+ import {ConstructorType} from "./contruct.ts";
2
2
  import {LifetimeEnum} from "@protorians/core";
3
3
 
4
4
 
@@ -1,4 +1,4 @@
1
- import {RequestContext} from "../core/context";
1
+ import {RequestContext} from "../core/context.ts";
2
2
 
3
3
 
4
4
  export type MiddlewareNextCallable = () => Promise<void>
@@ -1,4 +1,4 @@
1
- import {PluginScope} from "../core/plugins/scope";
1
+ import {PluginScope} from "../core/plugins/scope.ts";
2
2
 
3
3
  export type PluginCallable = (scope: PluginScope) => Promise<void> | void
4
4
 
@@ -1,4 +1,4 @@
1
- import {BuilderHMRDeclarationInterface} from "./builder";
1
+ import {BuilderHMRDeclarationInterface} from "./builder.ts";
2
2
 
3
3
  export interface RaitonSignalMapInterface {
4
4
  ready?: undefined;
@@ -1,5 +1,5 @@
1
- import {HttpStatus} from "../framework/enums/http-status.enum";
2
- import {ParseableEntriesType, ParseableType} from "./parseable";
1
+ import {HttpStatus} from "../framework/enums/http-status.enum.ts";
2
+ import {ParseableEntriesType, ParseableType} from "./parseable.ts";
3
3
 
4
4
  export interface HttpResponseBaseInterface {
5
5
  message: string;
@@ -1,5 +1,5 @@
1
- import {RequestContext} from "../core/context";
2
- import {HttpMethod} from "../framework";
1
+ import {RequestContext} from "../core/context.ts";
2
+ import {HttpMethod} from "../framework/index.ts";
3
3
 
4
4
  export type RouteHandlerCallable = (ctx: RequestContext) => Promise<any> | any
5
5
 
@@ -1,5 +1,5 @@
1
- import {RuntimeType} from "../framework/enums/runtime.enum";
2
- import {HttpsCertificateConfig, HttpsEnvironment} from "../framework/utilities/https.util";
1
+ import {RuntimeType} from "../framework/enums/runtime.enum.ts";
2
+ import {HttpsCertificateConfig, HttpsEnvironment} from "../framework/utilities/https.util.ts";
3
3
 
4
4
  export interface RuntimeServerInterface {
5
5
  listen(port: number, hostname?: string): Promise<void>
@@ -59,9 +59,7 @@ export interface RuntimeInterface {
59
59
 
60
60
  get isNode(): boolean;
61
61
 
62
- // get isDeno(): boolean;
63
-
64
- // get isWeb(): boolean;
62
+ get isDeno(): boolean;
65
63
 
66
64
  get isBun(): boolean
67
65
 
@@ -1,7 +1,7 @@
1
- import {BuilderInterface} from "./builder";
2
- import {RuntimeAdapterInterface, RuntimeServerInterface} from "./runtime";
3
- import {ApplicationInterface} from "./application";
4
- import {RuntimeType} from "../framework/enums/runtime.enum";
1
+ import {BuilderInterface} from "./builder.ts";
2
+ import {RuntimeAdapterInterface, RuntimeServerInterface} from "./runtime.ts";
3
+ import {ApplicationInterface} from "./application.ts";
4
+ import {RuntimeType} from "../framework/enums/runtime.enum.ts";
5
5
 
6
6
  export interface ThreadSetupOptionsInterface {
7
7
  application: ApplicationInterface;