@forgedevstack/harbor 1.0.0 → 1.5.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/CHANGELOG.md +82 -101
- package/README.md +210 -794
- package/dist/auth/apiKey.d.ts +6 -0
- package/dist/auth/apiKey.d.ts.map +1 -0
- package/dist/auth/index.d.ts +7 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +2 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/jwt.d.ts +21 -0
- package/dist/auth/jwt.d.ts.map +1 -0
- package/dist/auth/password.d.ts +6 -0
- package/dist/auth/password.d.ts.map +1 -0
- package/dist/auth/rbac.d.ts +6 -0
- package/dist/auth/rbac.d.ts.map +1 -0
- package/dist/auth/signing.d.ts +5 -0
- package/dist/auth/signing.d.ts.map +1 -0
- package/dist/auth/types/apiKey.types.d.ts +9 -0
- package/dist/auth/types/apiKey.types.d.ts.map +1 -0
- package/dist/auth/types/index.d.ts +5 -0
- package/dist/auth/types/index.d.ts.map +1 -0
- package/dist/auth/types/jwt.types.d.ts +17 -0
- package/dist/auth/types/jwt.types.d.ts.map +1 -0
- package/dist/auth/types/rbac.types.d.ts +8 -0
- package/dist/auth/types/rbac.types.d.ts.map +1 -0
- package/dist/auth/types/signing.types.d.ts +8 -0
- package/dist/auth/types/signing.types.d.ts.map +1 -0
- package/dist/cache/index.d.ts +4 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +2 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/manager.d.ts +24 -0
- package/dist/cache/manager.d.ts.map +1 -0
- package/dist/cache/stores.d.ts +28 -0
- package/dist/cache/stores.d.ts.map +1 -0
- package/dist/cache/types.d.ts +23 -0
- package/dist/cache/types.d.ts.map +1 -0
- package/dist/cli/index.js +21 -22
- package/dist/cli/index.js.map +1 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/router.d.ts +40 -2
- package/dist/core/router.d.ts.map +1 -1
- package/dist/core/server.d.ts.map +1 -1
- package/dist/database/connection.d.ts +1 -2
- package/dist/database/connection.d.ts.map +1 -1
- package/dist/database/index.js +2 -0
- package/dist/database/index.js.map +1 -0
- package/dist/database/model.d.ts +1 -4
- package/dist/database/model.d.ts.map +1 -1
- package/dist/docker/index.js +1 -1
- package/dist/http.const-BKHG1Lsj.mjs +62 -0
- package/dist/http.const-BKHG1Lsj.mjs.map +1 -0
- package/dist/http.const-Ckcy7OFp.js +2 -0
- package/dist/http.const-Ckcy7OFp.js.map +1 -0
- package/dist/index-Ca4WpLvw.js +2 -0
- package/dist/index-Ca4WpLvw.js.map +1 -0
- package/dist/index-DIVHd6rO.mjs +1054 -0
- package/dist/index-DIVHd6rO.mjs.map +1 -0
- package/dist/index.cjs.js +16 -16
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +676 -1691
- package/dist/index.es.js.map +1 -1
- package/dist/logger-CZn7QxCl.mjs +102 -0
- package/dist/{logger-D7aJSi62.mjs.map → logger-CZn7QxCl.mjs.map} +1 -1
- package/dist/logger-D-lfaRWQ.js +3 -0
- package/dist/{logger-DEnWXtpk.js.map → logger-D-lfaRWQ.js.map} +1 -1
- package/dist/manager-CjcKb4P9.mjs +149 -0
- package/dist/{manager-B6vqJgEn.mjs.map → manager-CjcKb4P9.mjs.map} +1 -1
- package/dist/manager-DrF1vbJg.js +4 -0
- package/dist/{manager-B1UKMjXW.js.map → manager-DrF1vbJg.js.map} +1 -1
- package/dist/middleware/health.d.ts +65 -0
- package/dist/middleware/health.d.ts.map +1 -0
- package/dist/middleware/index.d.ts +5 -0
- package/dist/middleware/index.d.ts.map +1 -0
- package/dist/middleware/index.js +2 -0
- package/dist/middleware/index.js.map +1 -0
- package/dist/middleware/metrics.d.ts +68 -0
- package/dist/middleware/metrics.d.ts.map +1 -0
- package/dist/middleware/rateLimit.d.ts +52 -0
- package/dist/middleware/rateLimit.d.ts.map +1 -0
- package/dist/middleware/upload.d.ts +59 -0
- package/dist/middleware/upload.d.ts.map +1 -0
- package/dist/password-BXBkKbv3.js +2 -0
- package/dist/password-BXBkKbv3.js.map +1 -0
- package/dist/password-y4m307oa.mjs +223 -0
- package/dist/password-y4m307oa.mjs.map +1 -0
- package/dist/scheduler/index.d.ts +3 -0
- package/dist/scheduler/index.d.ts.map +1 -0
- package/dist/scheduler/index.js +2 -0
- package/dist/scheduler/index.js.map +1 -0
- package/dist/scheduler/scheduler.d.ts +30 -0
- package/dist/scheduler/scheduler.d.ts.map +1 -0
- package/dist/scheduler/types.d.ts +25 -0
- package/dist/scheduler/types.d.ts.map +1 -0
- package/dist/types/server.types.d.ts +7 -0
- package/dist/types/server.types.d.ts.map +1 -1
- package/dist/upload-9lCNnKK_.js +5 -0
- package/dist/upload-9lCNnKK_.js.map +1 -0
- package/dist/upload-DUjQiuq7.mjs +619 -0
- package/dist/upload-DUjQiuq7.mjs.map +1 -0
- package/dist/validation/index.js +1 -1
- package/dist/validation/index.js.map +1 -1
- package/dist/websocket/index.d.ts +3 -0
- package/dist/websocket/index.d.ts.map +1 -0
- package/dist/websocket/index.js +2 -0
- package/dist/websocket/index.js.map +1 -0
- package/dist/websocket/manager.d.ts +30 -0
- package/dist/websocket/manager.d.ts.map +1 -0
- package/dist/websocket/types.d.ts +27 -0
- package/dist/websocket/types.d.ts.map +1 -0
- package/package.json +58 -18
- package/templates/default/controllers/user.controller.ts +44 -64
- package/templates/default/package.json +9 -33
- package/templates/default/routes/index.ts +2 -12
- package/templates/default/routes/user.routes.ts +26 -19
- package/templates/default/server.ts +16 -35
- package/dist/logger-D7aJSi62.mjs +0 -102
- package/dist/logger-DEnWXtpk.js +0 -3
- package/dist/manager-B1UKMjXW.js +0 -4
- package/dist/manager-B6vqJgEn.mjs +0 -152
- package/dist/portal.d.ts +0 -13
- package/dist/portal.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,126 +1,107 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to
|
|
3
|
+
All notable changes to Harbor will be documented in this file.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [1.3.1] - 2026-01-13
|
|
5
|
+
## [1.5.0] - 2026-01-14
|
|
9
6
|
|
|
10
7
|
### Added
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
9
|
+
#### WebSocket Support
|
|
10
|
+
- `createWebSocketServer()` for real-time applications
|
|
11
|
+
- Room-based broadcasting
|
|
12
|
+
- Heartbeat/ping-pong for connection health
|
|
13
|
+
- Client tracking and management
|
|
14
|
+
|
|
15
|
+
#### Job Scheduler
|
|
16
|
+
- `createScheduler()` for task scheduling
|
|
17
|
+
- Cron expressions support (`scheduler.cron('0 * * * *', ...)`)
|
|
18
|
+
- Interval-based scheduling (`scheduler.every('5m', ...)`)
|
|
19
|
+
- One-time scheduling (`scheduler.at(date, ...)`)
|
|
20
|
+
|
|
21
|
+
#### Rate Limiting
|
|
22
|
+
- `rateLimit()` middleware with memory store
|
|
23
|
+
- `slidingWindowRateLimit()` for accurate limiting
|
|
24
|
+
- Redis store support for distributed systems
|
|
25
|
+
- Customizable key generation and skip logic
|
|
26
|
+
|
|
27
|
+
#### Health Checks
|
|
28
|
+
- `healthCheck()` endpoint with multiple checks
|
|
29
|
+
- Pre-built checks: MongoDB, Redis, Memory, Disk
|
|
30
|
+
- `customHealthCheck()` for custom health logic
|
|
31
|
+
- Critical vs non-critical check distinction
|
|
32
|
+
|
|
33
|
+
#### Metrics (Prometheus)
|
|
34
|
+
- `metricsMiddleware()` for automatic collection
|
|
35
|
+
- `metricsEndpoint()` for Prometheus scraping
|
|
36
|
+
- Counter, Gauge, Histogram metric types
|
|
37
|
+
- Request duration, size, and count metrics
|
|
38
|
+
|
|
39
|
+
#### File Uploads
|
|
40
|
+
- `upload()` middleware for multipart handling
|
|
41
|
+
- Disk and memory storage options
|
|
42
|
+
- File type and size validation
|
|
43
|
+
- Custom filename generation
|
|
44
|
+
|
|
45
|
+
#### Caching
|
|
46
|
+
- `CacheManager` with memory store
|
|
47
|
+
- `RedisCache` for distributed caching
|
|
48
|
+
- `cacheResponse()` middleware
|
|
49
|
+
- `cached()` function wrapper
|
|
50
|
+
|
|
51
|
+
#### Authentication
|
|
52
|
+
- `JWT` class for token signing/verification
|
|
53
|
+
- `jwtAuth()` middleware
|
|
54
|
+
- `apiKeyAuth()` middleware
|
|
55
|
+
- `requireRole()` and `requirePermission()` for RBAC
|
|
56
|
+
- `verifySignature()` for HMAC request signing
|
|
57
|
+
- Password hashing utilities
|
|
16
58
|
|
|
17
59
|
### Changed
|
|
60
|
+
- Server now has `.use()`, `.get()`, `.post()`, etc. methods
|
|
61
|
+
- Server `.listen()` method for simpler startup
|
|
62
|
+
- Auto-start disabled by default
|
|
18
63
|
|
|
19
|
-
|
|
20
|
-
- Sidebar version badge now shows dropdown with changelog
|
|
21
|
-
- Hero code block centered properly
|
|
22
|
-
- Docs navigation uses React Router (no page reload)
|
|
23
|
-
|
|
24
|
-
## [1.3.0] - 2026-01-13
|
|
64
|
+
## [1.4.0] - 2026-01-14
|
|
25
65
|
|
|
26
66
|
### Added
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
- Pre-configured ESLint, TypeScript, and Vitest
|
|
31
|
-
- Example User CRUD implementation
|
|
32
|
-
- Environment configuration with `.env.example`
|
|
33
|
-
- Clean architecture with `index.ts` exports
|
|
34
|
-
|
|
35
|
-
- **Subpath Exports** - Enhanced package exports for better tree-shaking:
|
|
36
|
-
- `import { ... } from 'harbor'` - Main exports
|
|
37
|
-
- `import { Schema, model, connect } from 'harbor/database'` - Database-specific
|
|
38
|
-
- `import { ... } from 'harbor/validations'` - Validation utilities
|
|
39
|
-
- `import { ... } from 'harbor/docker'` - Docker management
|
|
40
|
-
- `import { ... } from 'harbor/utils'` - Utility functions
|
|
41
|
-
|
|
42
|
-
- **GitHub Integration** - Added repository links:
|
|
43
|
-
- Repository: https://github.com/yaghobieh/Harbor
|
|
44
|
-
- Homepage and issue tracker configured in package.json
|
|
67
|
+
- `route.get()`, `route.post()` syntax for routes
|
|
68
|
+
- Express-like convenience methods on server
|
|
69
|
+
- ForgeStack branding and organization
|
|
45
70
|
|
|
46
71
|
### Changed
|
|
72
|
+
- Package renamed to `@forgestack/harbor`
|
|
73
|
+
- Auto-start now defaults to false
|
|
47
74
|
|
|
48
|
-
-
|
|
49
|
-
- Navbar is now solid (not floating/transparent)
|
|
50
|
-
- Added copy button to all code blocks with visual feedback
|
|
51
|
-
- Light/Dark mode toggle with system option
|
|
52
|
-
- Restructured all components with `index.ts`, `ComponentName.tsx`, `types.ts` pattern
|
|
53
|
-
- All GitHub links now point to official repository
|
|
75
|
+
## [1.3.0] - 2026-01-13
|
|
54
76
|
|
|
55
|
-
|
|
56
|
-
-
|
|
77
|
+
### Added
|
|
78
|
+
- Full MongoDB ODM (Mongoose replacement)
|
|
79
|
+
- Schema, Model, Query with all methods
|
|
80
|
+
- Connection management
|
|
81
|
+
- Hooks (pre, post) support
|
|
82
|
+
- Virtual fields
|
|
83
|
+
- Indexes
|
|
57
84
|
|
|
58
85
|
## [1.2.0] - 2026-01-12
|
|
59
86
|
|
|
60
87
|
### Added
|
|
88
|
+
- Simplified router API with `GET()`, `POST()`, etc.
|
|
89
|
+
- Removed need for `.build()` on routes
|
|
90
|
+
- CLI for project scaffolding
|
|
61
91
|
|
|
62
|
-
|
|
63
|
-
- `connect()` / `disconnect()` - MongoDB connection management with events
|
|
64
|
-
- `Schema` class - Mongoose-compatible schema definition with all field types
|
|
65
|
-
- `model()` function - Create models from schemas
|
|
66
|
-
- **All Query Methods**: `find()`, `findOne()`, `findById()`, `create()`, `insertMany()`, `updateOne()`, `updateMany()`, `findOneAndUpdate()`, `findByIdAndUpdate()`, `deleteOne()`, `deleteMany()`, `findOneAndDelete()`, `findByIdAndDelete()`, `countDocuments()`, `estimatedDocumentCount()`, `aggregate()`, `distinct()`, `exists()`
|
|
67
|
-
- **Query Builder**: `.where()`, `.select()`, `.sort()`, `.limit()`, `.skip()`, `.lean()`, `.populate()`, `.gt()`, `.gte()`, `.lt()`, `.lte()`, `.in()`, `.nin()`, `.ne()`, `.regex()`, `.exists()`, `.or()`, `.and()`, `.nor()`
|
|
68
|
-
- **Schema Features**: virtuals, instance methods, static methods, pre/post hooks (middleware)
|
|
69
|
-
- **Index Management**: `createIndex()`, `createIndexes()`, `listIndexes()`, `dropIndex()`
|
|
70
|
-
- **Transactions**: `startSession()`, `withTransaction()`
|
|
71
|
-
- `Types.ObjectId` - ObjectId type support
|
|
72
|
-
|
|
73
|
-
- **Database Translations** - Added i18n support for all database operations (English & Hebrew)
|
|
74
|
-
|
|
75
|
-
- **Comprehensive Documentation**:
|
|
76
|
-
- Updated README.md with full MongoDB documentation
|
|
77
|
-
- Added Database examples to portal
|
|
78
|
-
- API reference for all database methods
|
|
79
|
-
|
|
80
|
-
### Changed
|
|
81
|
-
|
|
82
|
-
- Portal version updated to 1.2.0
|
|
83
|
-
- Portal now includes Database tab in code examples
|
|
84
|
-
- Features section now highlights MongoDB ODM capability
|
|
85
|
-
|
|
86
|
-
## [1.1.0] - 2026-01-12
|
|
92
|
+
## [1.1.0] - 2026-01-11
|
|
87
93
|
|
|
88
94
|
### Added
|
|
95
|
+
- HTTP request logger (Morgan alternative)
|
|
96
|
+
- i18n support for translations
|
|
97
|
+
- Docker manager
|
|
89
98
|
|
|
90
|
-
|
|
91
|
-
- **i18n/Translation System** - Full internationalization support with `t()`, `setLocale()`, includes English and Hebrew
|
|
92
|
-
- **Morgan-like HTTP Logger** - In-house `httpLogger()` middleware with formats: tiny, short, dev, combined, common
|
|
93
|
-
- **React Portal** - Complete React-based documentation portal with proper component structure
|
|
94
|
-
- `route()` function for creating routes with any HTTP method
|
|
95
|
-
- Skip functions for HTTP logger: `successOnly`, `healthChecks`, `staticFiles`, `paths`
|
|
96
|
-
|
|
97
|
-
### Changed
|
|
98
|
-
|
|
99
|
-
- `RouteBuilder.handler()` now returns `RouteDefinition` directly (no need to call `.build()`)
|
|
100
|
-
- Portal converted from static HTML to React project with components, constants, types pattern
|
|
101
|
-
|
|
102
|
-
## [1.0.0] - 2026-01-12
|
|
99
|
+
## [1.0.0] - 2026-01-10
|
|
103
100
|
|
|
104
101
|
### Added
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
- MongoDB-compatible validation with `MongoValidator`
|
|
112
|
-
- Custom validation adapter support
|
|
113
|
-
- Config-driven error handling
|
|
114
|
-
- CORS middleware with configurable options
|
|
115
|
-
- Body parser with size limits
|
|
116
|
-
- Request timeout handling
|
|
117
|
-
- Docker container management
|
|
118
|
-
- Docker Compose integration
|
|
119
|
-
- Changelog manager for version tracking
|
|
120
|
-
- API Portal documentation generator
|
|
121
|
-
- CLI tools for project initialization
|
|
122
|
-
- TypeScript-first with full type definitions
|
|
123
|
-
- Graceful shutdown handling
|
|
124
|
-
- Environment variable overrides
|
|
125
|
-
- Comprehensive logging system
|
|
126
|
-
|
|
102
|
+
- Initial release
|
|
103
|
+
- `createServer()` for quick server setup
|
|
104
|
+
- Route management with pre/post functions
|
|
105
|
+
- Validation system
|
|
106
|
+
- Error handling with config
|
|
107
|
+
- Logger integration
|