Releases: TrivaJS/triva
v1.0.0
Version v1.0.0 Release
Notable Changes
- [
1a1658a] - Added 3 new DB Adapters -Better-SQLite3,SQLite3. & anEmbeddeddatabase solution. (2026-02-09) - [
5ca1e51] - Removed bloated spaces in the Library (2026-02-09) - [
67d176a] - Fixed DB Adapter test workflow errors (2026-02-09) - [
a735e3d] - Added in Auto Redirect infrastructure, configurable via build config (2026-02-10) - [
3efdce5] - Added JSDoc information for all Library features, with Types support (2026-02-10) - [
d1e48a8] - Added in update/patch Notifier (2026-02-11) - [
99bc91a] - Rearranged the Library to comply with modern organization standards (2026-02-11) - [
afb98ea] - Added JWT Extension (2026-02-14) - [
227f843] - Removed Unused Imports (2026-02-14) - [
1bdcb3b] - Fixed Insecure temporary file #2 (2026-02-15) - [
f8f5352] - Replaced async factory with constructor-based API; added RPS benchmark; updated benchmark, changes, & integrity workflows (2026-02-19) - [
998d038] - Removed Redirect Middleware; use res.redirect(...) instead (2026-02-19) - [
a6b8c41] - Code Qulaity Review: Removed unused imports, updated isAI, isBot, & isCrawler usage (2026-02-19) - [
6a4de83] - Migrated from MIT License to Apache 2.0 (2026-02-20) - [
e604190] - finalizing docs (2026-04-29)
All Commits
- [
1a1658a] - Added 3 new DB Adapters -Better-SQLite3,SQLite3. & anEmbeddeddatabase solution. (2026-02-09) - [
061cc9f] - Added 2 Workflows - Extensions are tested in every Pull Request; A change-log file is generated in every Pull Request (2026-02-09) - [
9cae6b6] - Added HTTPS to the benchmark workflow (2026-02-09) - [
9c60c30] - Added archived version backups (2026-02-09) - [
12928c8] - Added DB Adapter tests & workflow (2026-02-09) - [
5ca1e51] - Removed bloated spaces in the Library (2026-02-09) - [
9f98c3e] - Added Extensions test workflow (2026-02-09) - [
ea77317] - Added Pull Request Changelog workflow (2026-02-09) - [
67d176a] - Fixed DB Adapter test workflow errors (2026-02-09) - [
b396b8e] - Fixed extensions test workflow (2026-02-09) - [
b61f8dd] - Fixed CLI & Shortcuts test workflows (2026-02-09) - [
0859a18] - Migrated all workflows to 3 centralized workflows (2026-02-09) - [
b05e4ed] - Fixed migrated workflows (2026-02-10) - [
ad20293] - Fixed Release Changes Benchmark overview (2026-02-10) - [
a23d404] - Fixed Release Changes workflow to include benchmarks (2026-02-10) - [
a735e3d] - Added in Auto Redirect infrastructure, configurable via build config (2026-02-10) - [
3efdce5] - Added JSDoc information for all Library features, with Types support (2026-02-10) - [
6a03a5d] - Fixed Workflow Error: Unable to download artifact(s) (2026-02-10) - [
d1e48a8] - Added in update/patch Notifier (2026-02-11) - [
99bc91a] - Rearranged the Library to comply with modern organization standards (2026-02-11) - [
3c57cea] - Removed Old-Library Format Backup (2026-02-11) - [
d2f3208] - Remove Local Docs (New Repo) (2026-02-11) - [
8772bee] - Docs Submodule Added (2026-02-11) - [
21227bd] - Added Submodule Sync Workflow (2026-02-11) - [
ba605d1] - Added Auto Backup Workflow into Archives for later use (2026-02-11) - [
c32fd49] - Fixed Submodule Sync Workflow error line 252 (2026-02-11) - [
a16ec43] - Sync Docs (2026-02-12) - [
76d226b] - Sync Docs Sub-Module (2026-02-12) - [
d604365] - Synced Docs Sub-Module (2026-02-12) - [
6a72b6a] - Fixed Submodule Sync Workflow (2026-02-12) - [
2792d05] - chore: update submodule docs (2026-02-13) - [
afb98ea] - Added JWT Extension (2026-02-14) - [
4dbb75e] - Changed Submodule Sync Workflow's Commit Title (2026-02-14) - [
8d9330f] - Modified GitHub ReadME (2026-02-14) - [
ba0f087] - Automatic Submodule Sync: update submodule docs (2026-02-14) - [
e062169] - Removed Duplicate comments in Submodule Sync workflow (2026-02-14) - [
80c45e8] - Merge branch 'v1.x' of https://github.com/TrivaJS/triva into v1.x (2026-02-14) - [
d3334f0] - Remove Guide (2026-02-14) - [
5072465] - Fixe to Duplicate comments in Submodule Sync workflow (2026-02-14) - [
fc1b03e] - Added 4 Daily Security Workflows (2026-02-14) - [
e1696b4] - Added 4 Daily Security Workflows; Removed unused declarations in Library Files (2026-02-14) - [
227f843] - Removed Unused Imports (2026-02-14) - [
4f375fc] - Submodule Sync (2026-02-14) - [
ea02db6] - Fixed Supply Chain Security test failing at SBOM Generation; Granted Submodule Sync the ability to ignore private submodule repo's. (2026-02-14) - [
aace746] - Added Submodule Override; Fixed CodeQL package-lock.json error (2026-02-14) - [[
8bbbfe5](https://github.com/TrivaJS/triva/commit/...
v0.4.0
Version 0.4.0 Release
Notable Package Improvements
- [
b731a98] - Added HTTPS Support with access todual-mode supportconfiguarable inbuild - [
f2c129b] - Added aDB AdapterforSupabase - [
c554159] - Added Package Extensions; released@trivajs/cors&@trivajs/cli - [
ee19dd2] - Added@trivajs/shortcutspackage extension
Notable Package Fixes
No Notable fixes were merged.
Notable GitHub Changes
- [
1e0a054] - Added GitHub workflows;Test Cases,Benchmark, &Benchmark comparison - [
2804e2b] - Migrated package extensions to their own GitHub Repositories; AddedSubmodulesfolder
What's to come in the next update?
Coming in v0.5.0, we plan to push for enite completion of our documentation & landing pages. We also plan to review all package vital components, in an effort to reduce redundancies & blouted functions. Once v0.5.0 is released, our plan is to focus on diagnosing any production errors, in preparation for the following release to be our v1 release.
v0.3.2
Important
v0.3.2 - Pre Release
This release is intended solely for the continued development & testing of Triva & its capabilities. Expect rapid updates containing bug fixes, feature reworks, & framekwork optimization going forward, until the official release of v1.0.0 and onward.
During the Pre-release phase, a wide range of efforts to build a user-friendly documentation interface will also be in the works. Until the release of that interface, it's recommended that developers testing Triva refer to the docs found below.
If you're looking to contribute in any capacity, please feel free to submit a pull request or issue ticket for review.
✨ Features
- 🎯 Centralized Configuration - Everything configured in
build() - 🗄️ Multiple Databases - Memory, MongoDB, Redis, PostgreSQL, MySQL
- 📦 Auto-Detection - Helpful errors if database packages aren't installed
- 🚀 Zero Dependencies (core) - Optional database drivers as needed
- 🛡️ Advanced Throttling - Sliding window, burst protection, auto-ban
- 📊 Comprehensive Logging - Request logs with cookies, UA data
- ⚡ Built-in Caching - Works with any supported database
- 🔍 Error Tracking - Automatic error capture with full context
- 🍪 Cookie Parser - Parse and set cookies easily
- 📥 File Operations - Download and send files
- 🌐 JSONP Support - Cross-domain API calls
- ⚙️ Custom Middleware - Full Express-style middleware support
📦 Installation
npm install triva
# Optional: Install database driver if needed
npm install mongodb # For MongoDB
npm install redis # For Redis
npm install pg # For PostgreSQL
npm install mysql2 # For MySQL🚀 Quick Start
import { build, get, listen } from 'triva';
// All configuration in one place!
await build({
env: 'development',
cache: {
type: 'memory',
retention: 600000
},
throttle: {
limit: 100,
window_ms: 60000
}
});
get('/', (req, res) => {
res.json({ message: 'Hello World!' });
});
listen(3000);🎯 Centralized Configuration
Everything is configured in build():
await build({
env: 'development',
// Cache Configuration
cache: {
type: 'mongodb', // memory, mongodb, redis, postgresql, mysql
retention: 600000, // 10 minutes
limit: 10000,
database: {
uri: 'mongodb://localhost:27017',
database: 'triva',
collection: 'cache'
}
},
// Throttle Configuration
throttle: {
limit: 100,
window_ms: 60000,
burst_limit: 20,
burst_window_ms: 1000,
ban_threshold: 5,
ban_ms: 300000
},
// Log Retention
retention: {
enabled: true,
maxEntries: 10000
},
// Error Tracking
errorTracking: {
enabled: true,
maxEntries: 5000
}
});🗄️ Database Support
Memory (Built-in)
await build({
cache: { type: 'memory' }
});MongoDB
npm install mongodbawait build({
cache: {
type: 'mongodb',
database: {
uri: 'mongodb://localhost:27017',
database: 'triva'
}
}
});Redis
npm install redisawait build({
cache: {
type: 'redis',
database: {
host: 'localhost',
port: 6379
}
}
});PostgreSQL
npm install pgawait build({
cache: {
type: 'postgresql',
database: {
host: 'localhost',
port: 5432,
database: 'triva',
user: 'postgres',
password: 'password'
}
}
});MySQL
npm install mysql2await build({
cache: {
type: 'mysql',
database: {
host: 'localhost',
port: 3306,
database: 'triva',
user: 'root',
password: 'password'
}
}
});Helpful Errors:
❌ MongoDB package not found.
Install it with: npm install mongodb
Then restart your server.
📖 Core Features
Routing
import { get, post, put, delete as del } from 'triva';
get('/users', (req, res) => {
res.json({ users: [] });
});
get('/users/:id', (req, res) => {
const { id } = req.params;
res.json({ userId: id });
});
post('/users', async (req, res) => {
const data = await req.json();
res.json({ created: true });
});Cookies
import { use, cookieParser } from 'triva';
use(cookieParser());
get('/login', (req, res) => {
res.cookie('sessionId', 'abc123', {
httpOnly: true,
maxAge: 3600000
});
res.json({ success: true });
});
get('/profile', (req, res) => {
const sessionId = req.cookies.sessionId;
res.json({ sessionId });
});File Operations
// Download file
get('/download', (req, res) => {
res.download('/path/to/file.pdf', 'report.pdf');
});
// Send file
get('/view', (req, res) => {
res.sendFile('/path/to/document.pdf');
});JSONP
get('/api/data', (req, res) => {
res.jsonp({ users: ['Alice', 'Bob'] });
});Custom Middleware
use((req, res, next) => {
console.log(`${req.method} ${req.url}`);
next();
});Logging
import { log } from 'triva';
// Get logs
const logs = await log.get({ limit: 100 });
// Export logs
await log.export('all', 'my-logs.json');
// Get stats
const stats = await log.getStats();Error Tracking
import { errorTracker } from 'triva';
// Get errors
const errors = await errorTracker.get({ severity: 'critical' });
// Get stats
const stats = await errorTracker.getStats();📊 Complete Example
import {
build,
use,
get,
post,
listen,
cookieParser,
log
} from 'triva';
// Centralized configuration
await build({
env: 'production',
cache: {
type: 'redis',
database: {
host: process.env.REDIS_HOST,
port: 6379
}
},
throttle: {
limit: 100,
window_ms: 60000
},
retention: {
enabled: true,
maxEntries: 50000
}
});
// Middleware
use(cookieParser());
// Routes
get('/', (req, res) => {
res.json({ status: 'ok', cookies: req.cookies });
});
get('/api/users/:id', (req, res) => {
res.json({ userId: req.params.id });
});
post('/api/users', async (req, res) => {
const data = await req.json();
res.status(201).json({ created: true, data });
});
get('/download/report', (req, res) => {
res.download('./reports/annual-report.pdf');
});
get('/admin/logs/export', async (req, res) => {
const result = await log.export({ limit: 1000 });
res.json({ exported: result.count });
});
// Start server
listen(process.env.PORT || 3000, () => {
console.log('Server running');
});🔧 Response Methods
res.json(data) // Send JSON
res.send(data) // Auto-detect (HTML/JSON/text)
res.html(html) // Send HTML
res.status(code) // Set status code
res.header(name, value) // Set header
res.redirect(url, code) // Redirect
res.jsonp(data) // Send JSONP
res.download(path, filename) // Download file
res.sendFile(path, options) // Send file
res.cookie(name, value, options) // Set cookie
res.clearCookie(name) // Clear cookie⚡ Performance
- Memory: Fastest (built-in)
- Redis: Fastest (external DB)
- MongoDB: Fast (document store)
- PostgreSQL: Fast (ACID compliance)
- MySQL: Fast (traditional)
📄 License
MIT
