nitrostack 1.0.14 → 1.0.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  # Changelog
3
2
 
4
3
  All notable changes to NitroStack will be documented in this file.
@@ -6,310 +5,45 @@ All notable changes to NitroStack will be documented in this file.
6
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
7
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
7
 
9
- ## [Unreleased]
10
-
11
- ## [1.0.7] - 2025-10-27
12
-
13
- ### Fixed
14
- - **Critical**: Fixed webpack loader configuration error for Studio
15
- - Switched from manual `next-swc-loader` configuration to Next.js's `defaultLoaders.babel`
16
- - Resolves "TypeError [ERR_INVALID_ARG_TYPE]: The 'from' argument must be of type string" error
17
- - Uses Next.js's pre-configured loader with all correct options
18
-
19
- ### Technical Details
20
- - Previous manual loader configuration was passing incorrect options to `next-swc-loader`
21
- - New approach: use `defaultLoaders.babel` provided by Next.js webpack context
22
- - This ensures all TypeScript/JSX files in `lib/` and `components/` are processed with the correct Babel/SWC configuration
23
-
24
- ## [1.0.6] - 2025-10-27
25
-
26
- ### Fixed
27
- - **Critical**: Added explicit webpack rule for Studio TypeScript compilation
28
- - Created dedicated webpack rule with `next-swc-loader` for `lib/` and `components/` directories
29
- - Uses `include` directive to explicitly process TypeScript files in these directories
30
- - Resolves "Module parse failed: Unexpected token" by ensuring proper TypeScript compilation
31
- - Works correctly when Studio is installed from npm in `node_modules`
32
-
33
- ### Technical Details
34
- - Previous approach of modifying `exclude` patterns wasn't working consistently
35
- - New approach: explicitly `push` a new webpack rule that includes our directories
36
- - Uses Next.js's internal `next-swc-loader` with proper configuration for both client and server builds
37
-
38
- ## [1.0.5] - 2025-10-27
39
-
40
- ### Fixed
41
- - **Critical**: Fixed webpack TypeScript loader for Studio `lib` and `components` directories
42
- - Modified webpack exclude patterns to ensure TypeScript files in `lib/` and `components/` are processed
43
- - Webpack now correctly applies the TypeScript/Babel loader to aliased paths
44
- - Resolves "Module parse failed: Unexpected token" error for TypeScript syntax
45
-
46
- ## [1.0.4] - 2025-10-27
47
-
48
- ### Fixed
49
- - **Critical**: Fixed Studio webpack module resolution for `@/*` path aliases
50
- - Added explicit webpack configuration in `src/studio/next.config.js`
51
- - Webpack now correctly resolves `@/lib/*` and `@/components/*` imports
52
- - Resolves "Module not found: Can't resolve '@/lib/store'" error definitively
53
- - Studio now works correctly when installed from npm
54
-
55
- ### Technical Details
56
- - The issue was that while TypeScript's `tsconfig.json` had `"paths": { "@/*": ["./"] }`, webpack (used by Next.js) wasn't respecting it
57
- - Added explicit `config.resolve.alias = { '@': __dirname }` to webpack configuration
58
- - This ensures webpack resolves `@/` to the Studio's root directory
59
-
60
- ## [1.0.3] - 2025-10-27
61
-
62
- ### Fixed
63
- - **Critical**: Fixed Studio TypeScript path resolution in Next.js webpack
64
- - Changed `moduleResolution` from `"bundler"` to `"node"` in `src/studio/tsconfig.json`
65
- - Added `"baseUrl": "."` to enable proper `@/*` path mapping
66
- - Resolves "Module not found: Can't resolve '@/lib/store'" error when running `nitrostack dev`
67
-
68
- ## [1.0.2] - 2025-10-27
8
+ ## [1.0.15] - 2025-10-28
69
9
 
70
10
  ### Fixed
71
- - **Critical**: Fixed CLI `--version` command to read version dynamically from `package.json`
72
- - Was showing hardcoded `1.0.0` instead of actual package version
73
- - Now correctly displays the installed version
74
- - **Critical**: Fixed `src/studio` not being included in npm package
75
- - Studio files are now properly included (47 files)
76
- - Users can now run `nitrostack dev` without Studio installation errors
77
- - Changed `.npmignore` to exclude specific `/src/` subdirectories while keeping `/src/studio/`
78
-
79
- ### Changed
80
- - Updated `.npmignore` to specifically exclude `/src/auth/`, `/src/cli/`, `/src/core/`, etc. instead of blanket `/src/` exclusion
81
- - CLI now uses `createRequire` to load `package.json` for dynamic version reading
82
-
83
- ## [1.0.1] - 2025-10-27
84
-
85
- ### Fixed
86
- - **Critical**: Fixed `.npmignore` to include template `src/` folders
87
- - Changed `src/` to `/src/` to only exclude root source files
88
- - Template source files are now properly included in the package
89
- - Users can now successfully generate projects with all necessary files
90
-
91
- ### Changed
92
- - Updated `.npmignore` patterns to use leading slashes for root-only exclusions
93
- - Keep template `.env.example` files by excluding only root `.env` files
94
-
95
- ## [1.0.0] - 2025-10-27
96
-
97
- ### Changed
98
- - **License**: Changed from MIT to Apache License 2.0
99
- - **Copyright**: Copyright holder is Abhishek Pandit
100
- - **Author**: Updated author to Abhishek Pandit
101
- - **Package Name**: Renamed from hypermcp to nitrostack
102
- - Updated all documentation links to official website (https://nitrostack.vercel.app/) and docs (https://nitrostack-docs.vercel.app/)
103
- - Added NOTICE file for Apache 2.0 compliance with dependency attributions
104
- - Updated CONTRIBUTING.md with Apache 2.0 license headers and contributor agreement
105
-
106
- ## [3.1.0] - 2025-01-XX
107
-
108
- ### 🎉 Major Release - Production Features
109
-
110
- This release transforms NitroStack into a production-grade, enterprise-ready framework with 11 major features inspired by NestJS.
11
+ - **Node.js Compatibility**: Fixed compatibility issues with Node.js versions 18.x and 20.x (< 20.10.0)
12
+ - Downgraded `ora` from v9.0.0 to v8.1.1 to avoid `import ... with {type: 'json'}` syntax
13
+ - Downgraded `inquirer` from v12.10.0 to v9.3.7 for broader Node.js compatibility
14
+ - Added `@types/inquirer` v9.0.7 as dev dependency for TypeScript support
15
+ - Resolved `SyntaxError: Unexpected token 'with'` error on older Node.js versions
111
16
 
112
17
  ### Added
113
-
114
- #### Core Features
115
- - **Middleware System** (`@Middleware`, `@UseMiddleware`) - Cross-cutting concerns like logging, timing, authentication
116
- - **Interceptors** (`@Interceptor`, `@UseInterceptors`) - Transform requests/responses before/after execution
117
- - **Pipes** (`@Pipe`, `@UsePipes`, `@Body`, `@Validated`) - Input validation and transformation
118
- - **Exception Filters** (`@ExceptionFilter`, `@UseFilters`) - Centralized error handling
119
- - **Dependency Injection** (`@Injectable`, `DIContainer`, `@Inject`) - Constructor-based DI for testability
120
-
121
- #### Utility Features
122
- - **Caching** (`@Cache`) - Automatic caching with TTL and custom key generation
123
- - **Rate Limiting** (`@RateLimit`) - Per-user or global rate limiting with time windows
124
- - **Health Checks** (`@HealthCheck`) - Monitor system health with periodic checks
125
-
126
- #### Additional Features
127
- - **Event System** (`@OnEvent`, `EventEmitter`) - Event-driven architecture for decoupled modules
128
- - **CLI Generator** (`nitrostack generate`) - Generate boilerplate for all component types
129
- - **Testing Utilities** (`nitrostack/testing`) - `TestingModule`, mock helpers, test contexts
130
-
131
- ### Enhanced
132
-
133
- - **Execution Pipeline** - New pipeline with guards → rate limiting → middleware → interceptors → pipes → cache → handler → filters
134
- - **Tool Class** - Completely rewritten to support the full execution pipeline
135
- - **DI Container** - Simple but powerful singleton-based DI container
136
- - **Template** - `typescript-auth` template now demonstrates all V3.1 features
137
- - **Documentation** - 7 comprehensive guides covering all features
138
-
139
- ### Files Added
140
-
141
- #### Core SDK (src/core/)
142
- - `middleware/middleware.interface.ts` - Middleware interface
143
- - `middleware/middleware.decorator.ts` - Middleware decorators
144
- - `interceptors/interceptor.interface.ts` - Interceptor interface
145
- - `interceptors/interceptor.decorator.ts` - Interceptor decorators
146
- - `pipes/pipe.interface.ts` - Pipe interface
147
- - `pipes/pipe.decorator.ts` - Pipe decorators
148
- - `filters/exception-filter.interface.ts` - Exception filter interface
149
- - `filters/exception-filter.decorator.ts` - Exception filter decorators
150
- - `di/container.ts` - DI container implementation
151
- - `di/injectable.decorator.ts` - Injectable and Inject decorators
152
- - `events/event-emitter.ts` - Event emitter singleton
153
- - `events/event.decorator.ts` - OnEvent decorator
154
- - `decorators/cache.decorator.ts` - Cache decorator
155
- - `decorators/rate-limit.decorator.ts` - Rate limit decorator
156
- - `decorators/health-check.decorator.ts` - Health check decorator
157
-
158
- #### Testing Module (src/testing/)
159
- - `index.ts` - Complete testing utilities
160
-
161
- #### CLI (src/cli/)
162
- - `commands/generate.ts` - Code generator with 11 templates
163
-
164
- #### Template Examples (templates/typescript-auth/src/)
165
- - `services/database.service.ts` - DI service example
166
- - `middleware/logging.middleware.ts` - Logging middleware
167
- - `interceptors/transform.interceptor.ts` - Response transformer
168
- - `pipes/validation.pipe.ts` - Validation pipe
169
- - `filters/global-exception.filter.ts` - Global error handler
170
- - `health/database.health.ts` - Database health check
171
- - `events/notification.service.ts` - Email notification service
172
- - `events/analytics.service.ts` - Analytics event tracking
173
-
174
- #### Documentation
175
- - `V3_ADVANCED_FEATURES.md` - Complete feature guide (1,200+ lines)
176
- - `V3_QUICK_REFERENCE.md` - Quick decorator reference
177
- - `V3_1_RELEASE_NOTES.md` - Release notes
178
- - `V3_1_COMPLETE_SUMMARY.md` - Implementation summary
179
- - `CLI_GENERATOR_GUIDE.md` - CLI generator usage guide
180
- - `templates/typescript-auth/V3_1_FEATURES_GUIDE.md` - Template guide
181
- - `V3_1_FINAL_SUMMARY.md` - Final comprehensive summary
18
+ - `NODE_COMPATIBILITY.md` - Comprehensive guide for Node.js version compatibility
19
+ - Updated README with Node.js version requirements
182
20
 
183
21
  ### Changed
22
+ - Improved developer experience for users on different Node.js versions
23
+ - Package now works reliably on Node.js 18.0.0 and later
184
24
 
185
- - **package.json** - Version bumped to 3.1.0
186
- - **src/core/tool.ts** - Complete rewrite to support execution pipeline
187
- - **src/core/builders.ts** - Updated to extract all metadata and support DI
188
- - **src/core/index.ts** - Added exports for all new features
189
- - **src/core/types.ts** - Removed deprecated ServerHooks and Middleware types
190
- - **src/core/server.ts** - Removed generic middleware system (replaced by @Middleware)
191
- - **src/cli/index.ts** - Added `generate` command
192
- - **templates/typescript-auth/src/index.ts** - Full integration of all features
193
- - **templates/typescript-auth/src/modules/products/products.tools.ts** - Demonstrates all features
194
-
195
- ### Performance
196
-
197
- - Execution pipeline overhead: < 1ms per request with all features enabled
198
- - DI container: O(1) lookup after registration
199
- - Event emitter: Async execution doesn't block responses
200
- - Caching: In-memory with automatic expiration
201
- - Rate limiting: In-memory with automatic cleanup
202
-
203
- ### Migration from 3.0
204
-
205
- **100% backward compatible!** All V3.0 code works without changes. New features are opt-in via decorators.
206
-
207
- Before:
208
- ```typescript
209
- @Tool({ name: 'get_user', ... })
210
- async getUser(input: any) {
211
- return db.query('SELECT * FROM users');
212
- }
213
- ```
214
-
215
- After (enhanced, opt-in):
216
- ```typescript
217
- @Tool({ name: 'get_user', ... })
218
- @UseMiddleware(LoggingMiddleware)
219
- @UseInterceptors(TransformInterceptor)
220
- @UsePipes(ValidationPipe)
221
- @Cache({ ttl: 60 })
222
- @RateLimit({ requests: 100, window: '1m' })
223
- async getUser(input: any) {
224
- return db.query('SELECT * FROM users');
225
- }
226
- ```
227
-
228
- ### Breaking Changes
229
-
230
- None - fully backward compatible with V3.0.
231
-
232
- ### Documentation
233
-
234
- - 7 new comprehensive documentation files
235
- - Complete API reference for all features
236
- - Step-by-step integration guide
237
- - CLI generator usage guide
238
- - Template walkthrough with examples
239
- - Testing guide with utilities
240
- - Migration guide from V3.0
241
-
242
- ### Statistics
243
-
244
- - **Features**: 11 major features implemented
245
- - **Files**: 30+ new files created
246
- - **Code**: ~4,000 lines of production code
247
- - **Documentation**: ~3,500 lines across 7 guides
248
- - **Tests**: Full testing utilities suite
249
-
250
- ---
251
-
252
- ## [3.0.0] - 2024-XX-XX
25
+ ## [1.0.14] - 2025-10-27
253
26
 
254
27
  ### Added
255
-
256
- - Decorator-based architecture (`@Tool`, `@Resource`, `@Prompt`, `@Module`, `@Widget`)
257
- - Guard system (`@UseGuards`, `Guard` interface)
258
- - JWT authentication module (`JWTModule.forRoot()`)
259
- - Module system for organizing code
260
- - Auto-registration of tools, resources, and prompts
261
- - Widget integration with Next.js
262
- - Enhanced TypeScript support with metadata
263
- - OAuth 2.1 support for OpenAI Apps SDK
264
- - API Key authentication
265
- - Comprehensive examples in `typescript-auth` template
266
-
267
- ### Changed
268
-
269
- - Complete rewrite of core architecture
270
- - Tool definition moved to decorators
271
- - Server configuration simplified
272
- - CLI improved with better templates
273
-
274
- ---
275
-
276
- ## [2.0.0] - 2024-XX-XX
277
-
278
- ### Added
279
-
280
- - Function-based tool creation
281
- - Widget support with React components
282
- - CLI for project scaffolding
283
- - TypeScript templates
284
- - Better error handling
285
-
286
- ---
287
-
288
- ## [1.0.0] - 2024-XX-XX
289
-
290
- ### Added
291
-
292
- - Initial release
293
- - Basic MCP server implementation
294
- - Tool registration
295
- - STDIO transport
296
- - Simple examples
297
-
298
- ---
299
-
300
- ## Upcoming Features (V3.2 Roadmap)
301
-
302
- - Database decorators (`@Transaction`)
303
- - Metrics collection (Prometheus)
304
- - OpenAPI generation
305
- - Bulk operations (`@Bulk`)
306
- - Request context propagation
307
- - Hot reload
308
- - Schema registry
309
- - Widget state management
310
- - Conditional tool registration
311
- - Built-in observability
28
+ - Initial public release to npm
29
+ - Full MCP server framework with decorators
30
+ - Built-in Studio for visual testing
31
+ - Authentication modules (JWT, OAuth 2.1, API Keys)
32
+ - Widget system for interactive UIs
33
+ - CLI with project generation and hot reload
34
+ - Multiple starter templates
35
+ - Comprehensive documentation
36
+
37
+ ### Features
38
+ - Declarative programming model with decorators
39
+ - Runtime pipeline (Guards, Middleware, Interceptors, Pipes, Filters)
40
+ - Type generation from tool definitions
41
+ - Caching and rate limiting support
42
+ - Hot reload development workflow
43
+ - Production-grade tooling
312
44
 
313
45
  ---
314
46
 
47
+ ## Version History
315
48
 
49
+ For older versions and detailed changes, see [GitHub Releases](https://github.com/abhishekpanditofficial/nitrostack/releases).
package/README.md CHANGED
@@ -44,6 +44,14 @@ NitroStack solves these pain points out of the box.
44
44
  - **Dev experience**
45
45
  - Hot reload, templates, code generators, dual transport support for OAuth metadata
46
46
 
47
+ ## Requirements
48
+
49
+ - **Node.js**: >= 18.0.0 (LTS versions recommended)
50
+ - **npm**: >= 9.0.0
51
+
52
+ ✅ Tested on Node.js 18.x, 20.x, and 22.x
53
+
54
+
47
55
  ## Install
48
56
 
49
57
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitrostack",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "NitroStack - Build powerful MCP servers with TypeScript",
5
5
  "type": "module",
6
6
  "main": "dist/core/index.js",
@@ -65,12 +65,12 @@
65
65
  "express": "^4.21.2",
66
66
  "fs-extra": "^11.3.2",
67
67
  "http-proxy-middleware": "^3.0.3",
68
- "inquirer": "^12.10.0",
68
+ "inquirer": "^9.3.7",
69
69
  "jose": "^6.1.0",
70
70
  "jsonwebtoken": "^9.0.2",
71
- "open": "^10.2.0",
71
+ "open": "^10.1.0",
72
72
  "openai": "^6.5.0",
73
- "ora": "^9.0.0",
73
+ "ora": "^8.1.1",
74
74
  "reflect-metadata": "^0.2.1",
75
75
  "uuid": "^11.0.5",
76
76
  "winston": "^3.17.0",
@@ -84,6 +84,7 @@
84
84
  "@types/cors": "^2.8.19",
85
85
  "@types/express": "^5.0.0",
86
86
  "@types/fs-extra": "^11.0.4",
87
+ "@types/inquirer": "^9.0.9",
87
88
  "@types/jest": "^29.5.14",
88
89
  "@types/jsonwebtoken": "^9.0.7",
89
90
  "@types/node": "^22.10.5",
@@ -95,7 +96,8 @@
95
96
  "typescript": "^5.7.2"
96
97
  },
97
98
  "engines": {
98
- "node": ">=18.0.0"
99
+ "node": ">=18.0.0",
100
+ "npm": ">=9.0.0"
99
101
  },
100
102
  "repository": {
101
103
  "type": "git",
@@ -105,4 +107,4 @@
105
107
  "url": "https://github.com/abhishekpanditofficial/nitrostack/issues"
106
108
  },
107
109
  "homepage": "https://nitrostack.vercel.app"
108
- }
110
+ }