@nitrostack/core 1.0.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.
Files changed (239) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +80 -0
  3. package/dist/auth/api-key.d.ts +118 -0
  4. package/dist/auth/api-key.d.ts.map +1 -0
  5. package/dist/auth/api-key.js +168 -0
  6. package/dist/auth/api-key.js.map +1 -0
  7. package/dist/auth/client.d.ts +151 -0
  8. package/dist/auth/client.d.ts.map +1 -0
  9. package/dist/auth/client.js +330 -0
  10. package/dist/auth/client.js.map +1 -0
  11. package/dist/auth/index.d.ts +31 -0
  12. package/dist/auth/index.d.ts.map +1 -0
  13. package/dist/auth/index.js +46 -0
  14. package/dist/auth/index.js.map +1 -0
  15. package/dist/auth/middleware.d.ts +95 -0
  16. package/dist/auth/middleware.d.ts.map +1 -0
  17. package/dist/auth/middleware.js +260 -0
  18. package/dist/auth/middleware.js.map +1 -0
  19. package/dist/auth/pkce.d.ts +53 -0
  20. package/dist/auth/pkce.d.ts.map +1 -0
  21. package/dist/auth/pkce.js +105 -0
  22. package/dist/auth/pkce.js.map +1 -0
  23. package/dist/auth/quick-setup.d.ts +94 -0
  24. package/dist/auth/quick-setup.d.ts.map +1 -0
  25. package/dist/auth/quick-setup.js +210 -0
  26. package/dist/auth/quick-setup.js.map +1 -0
  27. package/dist/auth/secure-secret.d.ts +136 -0
  28. package/dist/auth/secure-secret.d.ts.map +1 -0
  29. package/dist/auth/secure-secret.js +182 -0
  30. package/dist/auth/secure-secret.js.map +1 -0
  31. package/dist/auth/server-integration.d.ts +97 -0
  32. package/dist/auth/server-integration.d.ts.map +1 -0
  33. package/dist/auth/server-integration.js +182 -0
  34. package/dist/auth/server-integration.js.map +1 -0
  35. package/dist/auth/server-metadata.d.ts +51 -0
  36. package/dist/auth/server-metadata.d.ts.map +1 -0
  37. package/dist/auth/server-metadata.js +106 -0
  38. package/dist/auth/server-metadata.js.map +1 -0
  39. package/dist/auth/simple-jwt.d.ts +174 -0
  40. package/dist/auth/simple-jwt.d.ts.map +1 -0
  41. package/dist/auth/simple-jwt.js +162 -0
  42. package/dist/auth/simple-jwt.js.map +1 -0
  43. package/dist/auth/token-store.d.ts +104 -0
  44. package/dist/auth/token-store.d.ts.map +1 -0
  45. package/dist/auth/token-store.js +205 -0
  46. package/dist/auth/token-store.js.map +1 -0
  47. package/dist/auth/token-validation.d.ts +59 -0
  48. package/dist/auth/token-validation.d.ts.map +1 -0
  49. package/dist/auth/token-validation.js +241 -0
  50. package/dist/auth/token-validation.js.map +1 -0
  51. package/dist/auth/types.d.ts +215 -0
  52. package/dist/auth/types.d.ts.map +1 -0
  53. package/dist/auth/types.js +6 -0
  54. package/dist/auth/types.js.map +1 -0
  55. package/dist/core/apikey-module.d.ts +69 -0
  56. package/dist/core/apikey-module.d.ts.map +1 -0
  57. package/dist/core/apikey-module.js +114 -0
  58. package/dist/core/apikey-module.js.map +1 -0
  59. package/dist/core/app-decorator.d.ts +59 -0
  60. package/dist/core/app-decorator.d.ts.map +1 -0
  61. package/dist/core/app-decorator.js +322 -0
  62. package/dist/core/app-decorator.js.map +1 -0
  63. package/dist/core/builders.d.ts +50 -0
  64. package/dist/core/builders.d.ts.map +1 -0
  65. package/dist/core/builders.js +139 -0
  66. package/dist/core/builders.js.map +1 -0
  67. package/dist/core/component.d.ts +111 -0
  68. package/dist/core/component.d.ts.map +1 -0
  69. package/dist/core/component.js +228 -0
  70. package/dist/core/component.js.map +1 -0
  71. package/dist/core/config-module.d.ts +62 -0
  72. package/dist/core/config-module.d.ts.map +1 -0
  73. package/dist/core/config-module.js +94 -0
  74. package/dist/core/config-module.js.map +1 -0
  75. package/dist/core/decorators/cache.decorator.d.ts +61 -0
  76. package/dist/core/decorators/cache.decorator.d.ts.map +1 -0
  77. package/dist/core/decorators/cache.decorator.js +115 -0
  78. package/dist/core/decorators/cache.decorator.js.map +1 -0
  79. package/dist/core/decorators/health-check.decorator.d.ts +80 -0
  80. package/dist/core/decorators/health-check.decorator.d.ts.map +1 -0
  81. package/dist/core/decorators/health-check.decorator.js +153 -0
  82. package/dist/core/decorators/health-check.decorator.js.map +1 -0
  83. package/dist/core/decorators/rate-limit.decorator.d.ts +63 -0
  84. package/dist/core/decorators/rate-limit.decorator.d.ts.map +1 -0
  85. package/dist/core/decorators/rate-limit.decorator.js +129 -0
  86. package/dist/core/decorators/rate-limit.decorator.js.map +1 -0
  87. package/dist/core/decorators.d.ts +190 -0
  88. package/dist/core/decorators.d.ts.map +1 -0
  89. package/dist/core/decorators.js +170 -0
  90. package/dist/core/decorators.js.map +1 -0
  91. package/dist/core/di/container.d.ts +64 -0
  92. package/dist/core/di/container.d.ts.map +1 -0
  93. package/dist/core/di/container.js +105 -0
  94. package/dist/core/di/container.js.map +1 -0
  95. package/dist/core/di/injectable.decorator.d.ts +62 -0
  96. package/dist/core/di/injectable.decorator.d.ts.map +1 -0
  97. package/dist/core/di/injectable.decorator.js +66 -0
  98. package/dist/core/di/injectable.decorator.js.map +1 -0
  99. package/dist/core/errors.d.ts +54 -0
  100. package/dist/core/errors.d.ts.map +1 -0
  101. package/dist/core/errors.js +87 -0
  102. package/dist/core/errors.js.map +1 -0
  103. package/dist/core/events/event-emitter.d.ts +50 -0
  104. package/dist/core/events/event-emitter.d.ts.map +1 -0
  105. package/dist/core/events/event-emitter.js +94 -0
  106. package/dist/core/events/event-emitter.js.map +1 -0
  107. package/dist/core/events/event.decorator.d.ts +48 -0
  108. package/dist/core/events/event.decorator.d.ts.map +1 -0
  109. package/dist/core/events/event.decorator.js +72 -0
  110. package/dist/core/events/event.decorator.js.map +1 -0
  111. package/dist/core/events/log-emitter.d.ts +14 -0
  112. package/dist/core/events/log-emitter.d.ts.map +1 -0
  113. package/dist/core/events/log-emitter.js +20 -0
  114. package/dist/core/events/log-emitter.js.map +1 -0
  115. package/dist/core/filters/exception-filter.decorator.d.ts +40 -0
  116. package/dist/core/filters/exception-filter.decorator.d.ts.map +1 -0
  117. package/dist/core/filters/exception-filter.decorator.js +54 -0
  118. package/dist/core/filters/exception-filter.decorator.js.map +1 -0
  119. package/dist/core/filters/exception-filter.interface.d.ts +39 -0
  120. package/dist/core/filters/exception-filter.interface.d.ts.map +1 -0
  121. package/dist/core/filters/exception-filter.interface.js +2 -0
  122. package/dist/core/filters/exception-filter.interface.js.map +1 -0
  123. package/dist/core/guards/apikey.guard.d.ts +22 -0
  124. package/dist/core/guards/apikey.guard.d.ts.map +1 -0
  125. package/dist/core/guards/apikey.guard.js +11 -0
  126. package/dist/core/guards/apikey.guard.js.map +1 -0
  127. package/dist/core/guards/guard.interface.d.ts +18 -0
  128. package/dist/core/guards/guard.interface.d.ts.map +1 -0
  129. package/dist/core/guards/guard.interface.js +2 -0
  130. package/dist/core/guards/guard.interface.js.map +1 -0
  131. package/dist/core/guards/jwt.guard.d.ts +18 -0
  132. package/dist/core/guards/jwt.guard.d.ts.map +1 -0
  133. package/dist/core/guards/jwt.guard.js +2 -0
  134. package/dist/core/guards/jwt.guard.js.map +1 -0
  135. package/dist/core/guards/oauth.guard.d.ts +35 -0
  136. package/dist/core/guards/oauth.guard.d.ts.map +1 -0
  137. package/dist/core/guards/oauth.guard.js +2 -0
  138. package/dist/core/guards/oauth.guard.js.map +1 -0
  139. package/dist/core/guards/use-guards.decorator.d.ts +25 -0
  140. package/dist/core/guards/use-guards.decorator.d.ts.map +1 -0
  141. package/dist/core/guards/use-guards.decorator.js +32 -0
  142. package/dist/core/guards/use-guards.decorator.js.map +1 -0
  143. package/dist/core/health/health-checks.resource.d.ts +14 -0
  144. package/dist/core/health/health-checks.resource.d.ts.map +1 -0
  145. package/dist/core/health/health-checks.resource.js +29 -0
  146. package/dist/core/health/health-checks.resource.js.map +1 -0
  147. package/dist/core/index.d.ts +57 -0
  148. package/dist/core/index.d.ts.map +1 -0
  149. package/dist/core/index.js +59 -0
  150. package/dist/core/index.js.map +1 -0
  151. package/dist/core/interceptors/interceptor.decorator.d.ts +37 -0
  152. package/dist/core/interceptors/interceptor.decorator.d.ts.map +1 -0
  153. package/dist/core/interceptors/interceptor.decorator.js +51 -0
  154. package/dist/core/interceptors/interceptor.decorator.js.map +1 -0
  155. package/dist/core/interceptors/interceptor.interface.d.ts +31 -0
  156. package/dist/core/interceptors/interceptor.interface.d.ts.map +1 -0
  157. package/dist/core/interceptors/interceptor.interface.js +2 -0
  158. package/dist/core/interceptors/interceptor.interface.js.map +1 -0
  159. package/dist/core/jwt-module.d.ts +51 -0
  160. package/dist/core/jwt-module.d.ts.map +1 -0
  161. package/dist/core/jwt-module.js +52 -0
  162. package/dist/core/jwt-module.js.map +1 -0
  163. package/dist/core/logger.d.ts +18 -0
  164. package/dist/core/logger.d.ts.map +1 -0
  165. package/dist/core/logger.js +53 -0
  166. package/dist/core/logger.js.map +1 -0
  167. package/dist/core/middleware/middleware.decorator.d.ts +39 -0
  168. package/dist/core/middleware/middleware.decorator.d.ts.map +1 -0
  169. package/dist/core/middleware/middleware.decorator.js +53 -0
  170. package/dist/core/middleware/middleware.decorator.js.map +1 -0
  171. package/dist/core/middleware/middleware.interface.d.ts +29 -0
  172. package/dist/core/middleware/middleware.interface.d.ts.map +1 -0
  173. package/dist/core/middleware/middleware.interface.js +2 -0
  174. package/dist/core/middleware/middleware.interface.js.map +1 -0
  175. package/dist/core/module.d.ts +93 -0
  176. package/dist/core/module.d.ts.map +1 -0
  177. package/dist/core/module.js +87 -0
  178. package/dist/core/module.js.map +1 -0
  179. package/dist/core/oauth-module.d.ts +123 -0
  180. package/dist/core/oauth-module.d.ts.map +1 -0
  181. package/dist/core/oauth-module.js +324 -0
  182. package/dist/core/oauth-module.js.map +1 -0
  183. package/dist/core/pipes/pipe.decorator.d.ts +64 -0
  184. package/dist/core/pipes/pipe.decorator.d.ts.map +1 -0
  185. package/dist/core/pipes/pipe.decorator.js +85 -0
  186. package/dist/core/pipes/pipe.decorator.js.map +1 -0
  187. package/dist/core/pipes/pipe.interface.d.ts +41 -0
  188. package/dist/core/pipes/pipe.interface.d.ts.map +1 -0
  189. package/dist/core/pipes/pipe.interface.js +2 -0
  190. package/dist/core/pipes/pipe.interface.js.map +1 -0
  191. package/dist/core/prompt.d.ts +46 -0
  192. package/dist/core/prompt.d.ts.map +1 -0
  193. package/dist/core/prompt.js +76 -0
  194. package/dist/core/prompt.js.map +1 -0
  195. package/dist/core/resource.d.ts +47 -0
  196. package/dist/core/resource.d.ts.map +1 -0
  197. package/dist/core/resource.js +90 -0
  198. package/dist/core/resource.js.map +1 -0
  199. package/dist/core/server.d.ts +129 -0
  200. package/dist/core/server.d.ts.map +1 -0
  201. package/dist/core/server.js +617 -0
  202. package/dist/core/server.js.map +1 -0
  203. package/dist/core/tool.d.ts +108 -0
  204. package/dist/core/tool.d.ts.map +1 -0
  205. package/dist/core/tool.js +241 -0
  206. package/dist/core/tool.js.map +1 -0
  207. package/dist/core/transports/discovery-http-server.d.ts +19 -0
  208. package/dist/core/transports/discovery-http-server.d.ts.map +1 -0
  209. package/dist/core/transports/discovery-http-server.js +54 -0
  210. package/dist/core/transports/discovery-http-server.js.map +1 -0
  211. package/dist/core/transports/http-server.d.ts +108 -0
  212. package/dist/core/transports/http-server.d.ts.map +1 -0
  213. package/dist/core/transports/http-server.js +293 -0
  214. package/dist/core/transports/http-server.js.map +1 -0
  215. package/dist/core/transports/streamable-http.d.ts +177 -0
  216. package/dist/core/transports/streamable-http.d.ts.map +1 -0
  217. package/dist/core/transports/streamable-http.js +1287 -0
  218. package/dist/core/transports/streamable-http.js.map +1 -0
  219. package/dist/core/types.d.ts +195 -0
  220. package/dist/core/types.d.ts.map +1 -0
  221. package/dist/core/types.js +2 -0
  222. package/dist/core/types.js.map +1 -0
  223. package/dist/core/widgets/widget-examples.resource.d.ts +17 -0
  224. package/dist/core/widgets/widget-examples.resource.d.ts.map +1 -0
  225. package/dist/core/widgets/widget-examples.resource.js +28 -0
  226. package/dist/core/widgets/widget-examples.resource.js.map +1 -0
  227. package/dist/core/widgets/widget-registry.d.ts +56 -0
  228. package/dist/core/widgets/widget-registry.d.ts.map +1 -0
  229. package/dist/core/widgets/widget-registry.js +75 -0
  230. package/dist/core/widgets/widget-registry.js.map +1 -0
  231. package/dist/testing/index.d.ts +103 -0
  232. package/dist/testing/index.d.ts.map +1 -0
  233. package/dist/testing/index.js +161 -0
  234. package/dist/testing/index.js.map +1 -0
  235. package/dist/ui-next/index.d.ts +31 -0
  236. package/dist/ui-next/index.d.ts.map +1 -0
  237. package/dist/ui-next/index.js +687 -0
  238. package/dist/ui-next/index.js.map +1 -0
  239. package/package.json +89 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2025 Abhishek Pandit
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # @nitrostack/core
2
+
3
+ Core package for NitroStack - Build powerful MCP (Model Context Protocol) servers with TypeScript using a NestJS-inspired decorator-based approach.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @nitrostack/core
9
+ ```
10
+
11
+ ## Features
12
+
13
+ - **Decorator-based API**: Use familiar patterns from NestJS to define tools, resources, and prompts
14
+ - **Full MCP Support**: Complete implementation of the Model Context Protocol
15
+ - **Type Safety**: Full TypeScript support with Zod schema validation
16
+ - **Modular Architecture**: Organize your server into modules for better code organization
17
+ - **Authentication**: Built-in support for JWT, API Keys, and OAuth 2.1
18
+ - **Dependency Injection**: Powerful DI container for managing dependencies
19
+ - **Guards, Interceptors, Pipes**: Extensible middleware system
20
+ - **Health Checks**: Built-in health check infrastructure
21
+ - **Event System**: Publish and subscribe to events across your application
22
+
23
+ ## Quick Start
24
+
25
+ ```typescript
26
+ import { Module, Tool, McpApp, McpApplicationFactory, z } from '@nitrostack/core';
27
+
28
+ class CalculatorTools {
29
+ @Tool({
30
+ name: 'add',
31
+ description: 'Add two numbers',
32
+ parameters: z.object({
33
+ a: z.number(),
34
+ b: z.number(),
35
+ }),
36
+ })
37
+ add({ a, b }: { a: number; b: number }) {
38
+ return { result: a + b };
39
+ }
40
+ }
41
+
42
+ @Module({
43
+ tools: [CalculatorTools],
44
+ })
45
+ class AppModule {}
46
+
47
+ @McpApp({
48
+ name: 'Calculator Server',
49
+ version: '1.0.0',
50
+ imports: [AppModule],
51
+ })
52
+ class App {}
53
+
54
+ // Start the server
55
+ const app = await McpApplicationFactory.create(App);
56
+ await app.listen();
57
+ ```
58
+
59
+ ## Testing
60
+
61
+ The package includes testing utilities for unit testing your MCP servers:
62
+
63
+ ```typescript
64
+ import { TestingModule, createMockContext, MockLogger } from '@nitrostack/core/testing';
65
+
66
+ const module = TestingModule.create()
67
+ .addProvider(MyService)
68
+ .compile();
69
+
70
+ const service = module.get(MyService);
71
+ const context = createMockContext();
72
+ ```
73
+
74
+ ## Documentation
75
+
76
+ For full documentation, visit [https://nitrostack.ai](https://nitrostack.ai)
77
+
78
+ ## License
79
+
80
+ Apache-2.0
@@ -0,0 +1,118 @@
1
+ import { RequestHandler } from 'express';
2
+ /**
3
+ * API Key Authentication
4
+ *
5
+ * Simple authentication for basic scenarios.
6
+ * Perfect for service-to-service communication or development.
7
+ */
8
+ export interface APIKeyConfig {
9
+ /**
10
+ * Array of valid API keys
11
+ * Can be plain strings or hashed values
12
+ */
13
+ keys: string[];
14
+ /**
15
+ * If true, keys are stored as SHA-256 hashes (recommended)
16
+ */
17
+ hashed?: boolean;
18
+ /**
19
+ * Header name to extract API key from
20
+ * Default: 'X-API-Key'
21
+ */
22
+ headerName?: string;
23
+ /**
24
+ * Also accept API key in query parameter?
25
+ * Default: false (not recommended for production)
26
+ */
27
+ allowQueryParam?: boolean;
28
+ /**
29
+ * Query parameter name
30
+ * Default: 'api_key'
31
+ */
32
+ queryParamName?: string;
33
+ /**
34
+ * Custom key validation
35
+ */
36
+ customValidation?: (key: string) => Promise<boolean> | boolean;
37
+ }
38
+ /**
39
+ * Create API Key authentication middleware
40
+ *
41
+ * @example
42
+ * ```typescript
43
+ * const server = createServer({...});
44
+ *
45
+ * // Simple API key auth
46
+ * server.app.use('/mcp', createAPIKeyAuth({
47
+ * keys: [
48
+ * process.env.API_KEY_1!,
49
+ * process.env.API_KEY_2!,
50
+ * ],
51
+ * headerName: 'X-API-Key',
52
+ * }));
53
+ *
54
+ * server.start();
55
+ *
56
+ * // Client usage:
57
+ * // curl -H "X-API-Key: your-api-key" https://mcp.example.com/mcp/tools
58
+ * ```
59
+ */
60
+ export declare function createAPIKeyAuth(config: APIKeyConfig): RequestHandler;
61
+ /**
62
+ * Generate a secure API key
63
+ *
64
+ * @example
65
+ * ```typescript
66
+ * const apiKey = generateAPIKey();
67
+ * console.log('API Key:', apiKey);
68
+ * // Save to .env: API_KEY_1=sk_...
69
+ * ```
70
+ */
71
+ export declare function generateAPIKey(prefix?: string): string;
72
+ /**
73
+ * Hash an API key (SHA-256)
74
+ * Use this to store hashed keys instead of plain text
75
+ *
76
+ * @example
77
+ * ```typescript
78
+ * const apiKey = 'sk_abc123...';
79
+ * const hashed = hashAPIKey(apiKey);
80
+ * // Store hashed in database
81
+ *
82
+ * // In config:
83
+ * createAPIKeyAuth({
84
+ * keys: [hashed],
85
+ * hashed: true,
86
+ * });
87
+ * ```
88
+ */
89
+ export declare function hashAPIKey(key: string): string;
90
+ /**
91
+ * Validate API key format
92
+ */
93
+ export declare function isValidAPIKeyFormat(key: string, prefix?: string): boolean;
94
+ /**
95
+ * Create API key with metadata (advanced)
96
+ */
97
+ export interface APIKeyWithMetadata {
98
+ key: string;
99
+ hashed: string;
100
+ name: string;
101
+ createdAt: Date;
102
+ expiresAt?: Date;
103
+ scopes?: string[];
104
+ }
105
+ export declare function generateAPIKeyWithMetadata(options: {
106
+ name: string;
107
+ prefix?: string;
108
+ expiresIn?: number;
109
+ scopes?: string[];
110
+ }): APIKeyWithMetadata;
111
+ /**
112
+ * Validate API key with metadata (expiration, scopes)
113
+ */
114
+ export declare function validateAPIKeyWithMetadata(key: string, metadata: Omit<APIKeyWithMetadata, 'key'>, requiredScopes?: string[]): {
115
+ valid: boolean;
116
+ reason?: string;
117
+ };
118
+ //# sourceMappingURL=api-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-key.d.ts","sourceRoot":"","sources":["../../src/auth/api-key.ts"],"names":[],"mappings":"AACA,OAAO,EAAmC,cAAc,EAAE,MAAM,SAAS,CAAC;AAE1E;;;;;GAKG;AAEH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;CAChE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,cAAc,CA2ErE;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM,CAI5D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAKzE;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,GAAG,kBAAkB,CAmBrB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC,EACzC,cAAc,CAAC,EAAE,MAAM,EAAE,GACxB;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAiBrC"}
@@ -0,0 +1,168 @@
1
+ import crypto from 'crypto';
2
+ /**
3
+ * Create API Key authentication middleware
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * const server = createServer({...});
8
+ *
9
+ * // Simple API key auth
10
+ * server.app.use('/mcp', createAPIKeyAuth({
11
+ * keys: [
12
+ * process.env.API_KEY_1!,
13
+ * process.env.API_KEY_2!,
14
+ * ],
15
+ * headerName: 'X-API-Key',
16
+ * }));
17
+ *
18
+ * server.start();
19
+ *
20
+ * // Client usage:
21
+ * // curl -H "X-API-Key: your-api-key" https://mcp.example.com/mcp/tools
22
+ * ```
23
+ */
24
+ export function createAPIKeyAuth(config) {
25
+ const headerName = config.headerName || 'x-api-key';
26
+ const queryParamName = config.queryParamName || 'api_key';
27
+ // Validate config
28
+ if (!config.keys || config.keys.length === 0) {
29
+ throw new Error('API key auth requires at least one key');
30
+ }
31
+ return async (req, res, next) => {
32
+ try {
33
+ // 1. Extract API key from header or query
34
+ let apiKey;
35
+ // Try header first (recommended)
36
+ apiKey = req.headers[headerName.toLowerCase()];
37
+ // Try query parameter (if allowed)
38
+ if (!apiKey && config.allowQueryParam) {
39
+ apiKey = req.query[queryParamName];
40
+ }
41
+ if (!apiKey) {
42
+ return res.status(401).json({
43
+ error: 'unauthorized',
44
+ message: `Missing API key. Provide in ${headerName} header${config.allowQueryParam ? ` or ${queryParamName} query parameter` : ''}`,
45
+ });
46
+ }
47
+ // 2. Validate API key
48
+ let isValid = false;
49
+ if (config.hashed) {
50
+ // Compare hashed values
51
+ const hashedKey = hashAPIKey(apiKey);
52
+ isValid = config.keys.includes(hashedKey);
53
+ }
54
+ else {
55
+ // Direct comparison
56
+ isValid = config.keys.includes(apiKey);
57
+ }
58
+ // 3. Custom validation
59
+ if (config.customValidation) {
60
+ const customValid = await config.customValidation(apiKey);
61
+ isValid = isValid && customValid;
62
+ }
63
+ if (!isValid) {
64
+ return res.status(401).json({
65
+ error: 'unauthorized',
66
+ message: 'Invalid API key',
67
+ });
68
+ }
69
+ // 4. Attach to request
70
+ req.auth = {
71
+ authenticated: true,
72
+ tokenInfo: {
73
+ active: true,
74
+ },
75
+ scopes: ['*'], // API keys typically have full access
76
+ clientId: `apikey_${hashAPIKey(apiKey).substring(0, 8)}`,
77
+ subject: undefined,
78
+ };
79
+ next();
80
+ }
81
+ catch (error) {
82
+ return res.status(500).json({
83
+ error: 'server_error',
84
+ message: 'API key validation failed',
85
+ });
86
+ }
87
+ };
88
+ }
89
+ /**
90
+ * Generate a secure API key
91
+ *
92
+ * @example
93
+ * ```typescript
94
+ * const apiKey = generateAPIKey();
95
+ * console.log('API Key:', apiKey);
96
+ * // Save to .env: API_KEY_1=sk_...
97
+ * ```
98
+ */
99
+ export function generateAPIKey(prefix = 'sk') {
100
+ const randomBytes = crypto.randomBytes(32);
101
+ const key = randomBytes.toString('base64url');
102
+ return `${prefix}_${key}`;
103
+ }
104
+ /**
105
+ * Hash an API key (SHA-256)
106
+ * Use this to store hashed keys instead of plain text
107
+ *
108
+ * @example
109
+ * ```typescript
110
+ * const apiKey = 'sk_abc123...';
111
+ * const hashed = hashAPIKey(apiKey);
112
+ * // Store hashed in database
113
+ *
114
+ * // In config:
115
+ * createAPIKeyAuth({
116
+ * keys: [hashed],
117
+ * hashed: true,
118
+ * });
119
+ * ```
120
+ */
121
+ export function hashAPIKey(key) {
122
+ return crypto.createHash('sha256').update(key).digest('hex');
123
+ }
124
+ /**
125
+ * Validate API key format
126
+ */
127
+ export function isValidAPIKeyFormat(key, prefix) {
128
+ if (prefix) {
129
+ return key.startsWith(`${prefix}_`) && key.length > prefix.length + 10;
130
+ }
131
+ return key.length >= 32;
132
+ }
133
+ export function generateAPIKeyWithMetadata(options) {
134
+ const key = generateAPIKey(options.prefix);
135
+ const hashed = hashAPIKey(key);
136
+ const createdAt = new Date();
137
+ let expiresAt;
138
+ if (options.expiresIn) {
139
+ expiresAt = new Date();
140
+ expiresAt.setDate(expiresAt.getDate() + options.expiresIn);
141
+ }
142
+ return {
143
+ key,
144
+ hashed,
145
+ name: options.name,
146
+ createdAt,
147
+ expiresAt,
148
+ scopes: options.scopes,
149
+ };
150
+ }
151
+ /**
152
+ * Validate API key with metadata (expiration, scopes)
153
+ */
154
+ export function validateAPIKeyWithMetadata(key, metadata, requiredScopes) {
155
+ // Check expiration
156
+ if (metadata.expiresAt && new Date() > metadata.expiresAt) {
157
+ return { valid: false, reason: 'API key has expired' };
158
+ }
159
+ // Check scopes
160
+ if (requiredScopes && metadata.scopes) {
161
+ const hasAllScopes = requiredScopes.every(scope => metadata.scopes.includes(scope) || metadata.scopes.includes('*'));
162
+ if (!hasAllScopes) {
163
+ return { valid: false, reason: 'API key does not have required scopes' };
164
+ }
165
+ }
166
+ return { valid: true };
167
+ }
168
+ //# sourceMappingURL=api-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-key.js","sourceRoot":"","sources":["../../src/auth/api-key.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AA8C5B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAoB;IACnD,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,WAAW,CAAC;IACpD,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,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