tina4-nodejs 3.13.91 → 3.13.94
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/CLAUDE.md +16 -3
- package/README.md +1 -1
- package/package.json +12 -9
- package/packages/cli/dist/bin.js +1312 -987
- package/packages/core/dist/index.js +1312 -987
- package/packages/core/src/auth.ts +141 -21
- package/packages/core/src/devMailbox.ts +20 -44
- package/packages/core/src/index.ts +2 -2
- package/packages/core/src/messenger.ts +72 -0
- package/packages/core/src/queueBackends/kafkaBackend.ts +108 -12
- package/packages/core/src/sessionHandlers/childError.ts +72 -0
- package/packages/core/src/sessionHandlers/mongoClient.ts +9 -3
- package/packages/core/src/sessionHandlers/redisHandler.ts +18 -5
- package/packages/core/src/sessionHandlers/respClient.ts +5 -1
- package/packages/frond/dist/index.js +74 -31
- package/packages/frond/src/engine.ts +99 -33
- package/packages/orm/dist/index.js +3102 -2777
- package/packages/orm/src/adapters/sqlite.ts +4 -1
- package/packages/orm/src/database.ts +108 -8
- package/types/cli/src/bin.d.ts +92 -0
- package/types/cli/src/commands/build.d.ts +2 -0
- package/types/cli/src/commands/generate.d.ts +47 -0
- package/types/cli/src/commands/init.d.ts +1 -0
- package/types/cli/src/commands/metrics.d.ts +6 -0
- package/types/cli/src/commands/migrate.d.ts +1 -0
- package/types/cli/src/commands/migrateCreate.d.ts +1 -0
- package/types/cli/src/commands/migrateRollback.d.ts +1 -0
- package/types/cli/src/commands/migrateStatus.d.ts +1 -0
- package/types/cli/src/commands/queue.d.ts +20 -0
- package/types/cli/src/commands/routes.d.ts +1 -0
- package/types/cli/src/commands/seed.d.ts +1 -0
- package/types/cli/src/commands/serve.d.ts +6 -0
- package/types/cli/src/commands/test.d.ts +1 -0
- package/types/core/src/ai.d.ts +64 -0
- package/types/core/src/api.d.ts +262 -0
- package/types/core/src/auth.d.ts +154 -0
- package/types/core/src/authGate.d.ts +20 -0
- package/types/core/src/background.d.ts +34 -0
- package/types/core/src/cache.d.ts +160 -0
- package/types/core/src/constants.d.ts +38 -0
- package/types/core/src/container.d.ts +44 -0
- package/types/core/src/context/chunker.d.ts +31 -0
- package/types/core/src/context/index.d.ts +93 -0
- package/types/core/src/devAdmin.d.ts +179 -0
- package/types/core/src/devMailbox.d.ts +54 -0
- package/types/core/src/docs.d.ts +141 -0
- package/types/core/src/docsAutoDiscovery.d.ts +6 -0
- package/types/core/src/dotenv.d.ts +65 -0
- package/types/core/src/env.d.ts +28 -0
- package/types/core/src/errorOverlay.d.ts +36 -0
- package/types/core/src/events.d.ts +75 -0
- package/types/core/src/fakeData.d.ts +55 -0
- package/types/core/src/feedback.d.ts +90 -0
- package/types/core/src/graphql.d.ts +207 -0
- package/types/core/src/health.d.ts +22 -0
- package/types/core/src/htmlElement.d.ts +75 -0
- package/types/core/src/i18n.d.ts +37 -0
- package/types/core/src/index.d.ts +93 -0
- package/types/core/src/job.d.ts +39 -0
- package/types/core/src/logger.d.ts +123 -0
- package/types/core/src/mcp.d.ts +248 -0
- package/types/core/src/messenger.d.ts +191 -0
- package/types/core/src/metrics.d.ts +77 -0
- package/types/core/src/middleware.d.ts +207 -0
- package/types/core/src/mqtt.d.ts +257 -0
- package/types/core/src/mqttMessage.d.ts +67 -0
- package/types/core/src/plan.d.ts +96 -0
- package/types/core/src/projectIndex.d.ts +56 -0
- package/types/core/src/queue.d.ts +219 -0
- package/types/core/src/queueBackends/kafkaBackend.d.ts +117 -0
- package/types/core/src/queueBackends/liteBackend.d.ts +119 -0
- package/types/core/src/queueBackends/mongoBackend.d.ts +97 -0
- package/types/core/src/queueBackends/rabbitmqBackend.d.ts +55 -0
- package/types/core/src/rateLimiter.d.ts +49 -0
- package/types/core/src/request.d.ts +25 -0
- package/types/core/src/response.d.ts +28 -0
- package/types/core/src/routeDiscovery.d.ts +12 -0
- package/types/core/src/router.d.ts +355 -0
- package/types/core/src/scss.d.ts +19 -0
- package/types/core/src/server.d.ts +131 -0
- package/types/core/src/service.d.ts +115 -0
- package/types/core/src/session.d.ts +256 -0
- package/types/core/src/sessionHandlers/childError.d.ts +34 -0
- package/types/core/src/sessionHandlers/databaseHandler.d.ts +42 -0
- package/types/core/src/sessionHandlers/mongoClient.d.ts +24 -0
- package/types/core/src/sessionHandlers/mongoHandler.d.ts +61 -0
- package/types/core/src/sessionHandlers/redisHandler.d.ts +60 -0
- package/types/core/src/sessionHandlers/respClient.d.ts +22 -0
- package/types/core/src/sessionHandlers/valkeyHandler.d.ts +65 -0
- package/types/core/src/static.d.ts +2 -0
- package/types/core/src/test.d.ts +94 -0
- package/types/core/src/testClient.d.ts +36 -0
- package/types/core/src/testing.d.ts +58 -0
- package/types/core/src/types.d.ts +219 -0
- package/types/core/src/validator.d.ts +52 -0
- package/types/core/src/websocket.d.ts +376 -0
- package/types/core/src/websocketBackplane.d.ts +166 -0
- package/types/core/src/websocketConnection.d.ts +54 -0
- package/types/core/src/wsdl.d.ts +101 -0
- package/types/frond/src/engine.d.ts +263 -0
- package/types/frond/src/index.d.ts +2 -0
- package/types/orm/src/adapters/firebird.d.ts +138 -0
- package/types/orm/src/adapters/mongodb.d.ts +81 -0
- package/types/orm/src/adapters/mssql.d.ts +70 -0
- package/types/orm/src/adapters/mysql.d.ts +66 -0
- package/types/orm/src/adapters/odbc.d.ts +97 -0
- package/types/orm/src/adapters/postgres.d.ts +85 -0
- package/types/orm/src/adapters/sqlite.d.ts +56 -0
- package/types/orm/src/autoCrud.d.ts +73 -0
- package/types/orm/src/baseModel.d.ts +391 -0
- package/types/orm/src/cachedDatabase.d.ts +177 -0
- package/types/orm/src/database.d.ts +609 -0
- package/types/orm/src/databaseResult.d.ts +85 -0
- package/types/orm/src/docstore.d.ts +182 -0
- package/types/orm/src/fakeData.d.ts +22 -0
- package/types/orm/src/index.d.ts +40 -0
- package/types/orm/src/migration.d.ts +275 -0
- package/types/orm/src/model.d.ts +7 -0
- package/types/orm/src/query.d.ts +14 -0
- package/types/orm/src/queryBuilder.d.ts +173 -0
- package/types/orm/src/realtime/index.d.ts +7 -0
- package/types/orm/src/realtime/models/attachment.d.ts +43 -0
- package/types/orm/src/realtime/models/channel.d.ts +32 -0
- package/types/orm/src/realtime/models/channelMember.d.ts +32 -0
- package/types/orm/src/realtime/models/message.d.ts +36 -0
- package/types/orm/src/realtime/models/workspace.d.ts +26 -0
- package/types/orm/src/realtime/realtime.d.ts +24 -0
- package/types/orm/src/realtime/storage.d.ts +61 -0
- package/types/orm/src/seeder.d.ts +118 -0
- package/types/orm/src/sqlTranslator.d.ts +134 -0
- package/types/orm/src/types.d.ts +138 -0
- package/types/orm/src/validation.d.ts +6 -0
- package/types/swagger/src/generator.d.ts +46 -0
- package/types/swagger/src/index.d.ts +2 -0
- package/types/swagger/src/ui.d.ts +11 -0
package/CLAUDE.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# CLAUDE.md - AI Developer Guide for tina4-nodejs (v3.13.
|
|
1
|
+
# CLAUDE.md - AI Developer Guide for tina4-nodejs (v3.13.94)
|
|
2
2
|
|
|
3
3
|
> This file helps AI assistants (Claude, Copilot, Cursor, etc.) understand and work on this codebase effectively.
|
|
4
4
|
|
|
5
5
|
## What This Project Is
|
|
6
6
|
|
|
7
|
-
Tina4 for Node.js/TypeScript v3.13.
|
|
7
|
+
Tina4 for Node.js/TypeScript v3.13.94 - The Intelligent Native Application 4ramework. A convention-over-configuration structural paradigm. The developer writes TypeScript; Tina4 is invisible infrastructure.
|
|
8
8
|
|
|
9
9
|
The philosophy: zero ceremony, batteries included, file system as source of truth.
|
|
10
10
|
|
|
@@ -649,6 +649,19 @@ await db.executeMany(sql, paramSets): Promise<unknown[]> // wrapped in
|
|
|
649
649
|
await db.insert(table, data): Promise<DatabaseWriteResult>
|
|
650
650
|
await db.update(table, data, filter?, params?): Promise<DatabaseWriteResult>
|
|
651
651
|
await db.delete(table, filter?, params?): Promise<DatabaseWriteResult>
|
|
652
|
+
await db.truncate(table): Promise<DatabaseWriteResult> // remove every row, explicitly
|
|
653
|
+
await db.primaryKey(table): Promise<string[]> // introspected PK columns (cached)
|
|
654
|
+
|
|
655
|
+
// A WRITE WITH NO FILTER IS AN ERROR, not a full-table operation (3.13.94).
|
|
656
|
+
// update(table, data) with no filter takes the primary key out of `data` and uses
|
|
657
|
+
// it as the WHERE clause; with neither a filter nor the COMPLETE primary key in
|
|
658
|
+
// `data` it THROWS instead of silently changing nothing. delete(table) with no
|
|
659
|
+
// filter throws too -- truncate(table) is the explicit whole-table spelling.
|
|
660
|
+
// A failed write now throws rather than resolving to { success: false,
|
|
661
|
+
// affectedRows: 0 }, which a caller who did not inspect the result never saw.
|
|
662
|
+
// primaryKey() returns an ARRAY: a primary key may span several columns, and
|
|
663
|
+
// EVERY key column goes into the WHERE. A composite key keyed on only its first
|
|
664
|
+
// column would match every row sharing that value.
|
|
652
665
|
|
|
653
666
|
// Last-write metadata — SYNCHRONOUS (no await)
|
|
654
667
|
db.getLastId(): string | number
|
|
@@ -1244,7 +1257,7 @@ When adding new features, add a corresponding `test/<feature>.test.ts` file.
|
|
|
1244
1257
|
## v3 Features Summary
|
|
1245
1258
|
|
|
1246
1259
|
- **98 built-in features**, zero third-party dependencies
|
|
1247
|
-
- **
|
|
1260
|
+
- **6,230 tests** passing, 0 failed, across 198 files (build + typecheck green) - measured 2026-07-29 on Ubuntu 24.04.4 LTS x86_64, Node 24.18.0, live services, TINA4_REQUIRE_SERVICES=1; Firebird excluded by design
|
|
1248
1261
|
- **Race-safe `getNextId()`** with atomic sequence table (`tina4_sequences`) for SQLite/MySQL/MSSQL; PostgreSQL auto-creates sequences
|
|
1249
1262
|
- **Frond template engine optimizations**: pre-compiled regexes, lazy loop context (copy-on-write), filter chain caching, path split caching, inline common filters (11-15% speedup)
|
|
1250
1263
|
- **Production server auto-detect**: `npx tina4nodejs serve --production` auto-uses cluster mode
|
package/README.md
CHANGED
|
@@ -107,7 +107,7 @@ Tina4 Node.js runs at **93% of raw Node.js speed** while providing 98 built-in f
|
|
|
107
107
|
|
|
108
108
|
## Cross-Framework Parity
|
|
109
109
|
|
|
110
|
-
Tina4 ships identical features across four languages: same architecture, same conventions, same
|
|
110
|
+
Tina4 ships identical features across four languages: same architecture, same conventions, same 98 features:
|
|
111
111
|
|
|
112
112
|
| | Python | PHP | Ruby | Node.js |
|
|
113
113
|
|---|--------|-----|------|---------|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tina4-nodejs",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.94",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Tina4 for Node.js/TypeScript - 54 built-in features, zero dependencies",
|
|
6
6
|
"keywords": [
|
|
@@ -24,25 +24,25 @@
|
|
|
24
24
|
"packages/*"
|
|
25
25
|
],
|
|
26
26
|
"main": "packages/core/dist/index.js",
|
|
27
|
-
"types": "
|
|
27
|
+
"types": "./types/core/src/index.d.ts",
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
|
-
"types": "./
|
|
30
|
+
"types": "./types/core/src/index.d.ts",
|
|
31
31
|
"import": "./packages/core/dist/index.js",
|
|
32
32
|
"default": "./packages/core/dist/index.js"
|
|
33
33
|
},
|
|
34
34
|
"./orm": {
|
|
35
|
-
"types": "./
|
|
35
|
+
"types": "./types/orm/src/index.d.ts",
|
|
36
36
|
"import": "./packages/orm/dist/index.js",
|
|
37
37
|
"default": "./packages/orm/dist/index.js"
|
|
38
38
|
},
|
|
39
39
|
"./swagger": {
|
|
40
|
-
"types": "./
|
|
40
|
+
"types": "./types/swagger/src/index.d.ts",
|
|
41
41
|
"import": "./packages/swagger/dist/index.js",
|
|
42
42
|
"default": "./packages/swagger/dist/index.js"
|
|
43
43
|
},
|
|
44
44
|
"./frond": {
|
|
45
|
-
"types": "./
|
|
45
|
+
"types": "./types/frond/src/engine.d.ts",
|
|
46
46
|
"import": "./packages/frond/dist/index.js",
|
|
47
47
|
"default": "./packages/frond/dist/index.js"
|
|
48
48
|
}
|
|
@@ -66,20 +66,22 @@
|
|
|
66
66
|
"COMPARISON.md",
|
|
67
67
|
"BENCHMARK_REPORT.md",
|
|
68
68
|
"CARBONAH.md",
|
|
69
|
-
"README.md"
|
|
69
|
+
"README.md",
|
|
70
|
+
"types"
|
|
70
71
|
],
|
|
71
72
|
"bin": {
|
|
72
73
|
"tina4nodejs": "packages/cli/dist/bin.js"
|
|
73
74
|
},
|
|
74
75
|
"scripts": {
|
|
75
|
-
"build": "npm run build --workspaces",
|
|
76
|
+
"build": "npm run build --workspaces && npm run build:types",
|
|
76
77
|
"clean": "rm -rf packages/*/dist",
|
|
77
78
|
"pretest": "npm run build",
|
|
78
79
|
"test": "tsx test/run-all.ts && npm run test:i18n",
|
|
79
80
|
"test:i18n": "vitest run test/i18n.test.ts test/i18n-leaf-alias.test.ts",
|
|
80
81
|
"typecheck": "tsc -p tsconfig.typecheck.json",
|
|
81
82
|
"prepublishOnly": "npm run build",
|
|
82
|
-
"prepare": "npm run build"
|
|
83
|
+
"prepare": "npm run build",
|
|
84
|
+
"build:types": "tsc -p tsconfig.types.json"
|
|
83
85
|
},
|
|
84
86
|
"engines": {
|
|
85
87
|
"node": ">=22.0.0"
|
|
@@ -93,6 +95,7 @@
|
|
|
93
95
|
},
|
|
94
96
|
"devDependencies": {
|
|
95
97
|
"@types/node": "^22.10.0",
|
|
98
|
+
"@types/pg": "^8.20.0",
|
|
96
99
|
"esbuild": "^0.24.0",
|
|
97
100
|
"mongodb": "^6.0.0",
|
|
98
101
|
"tsx": "^4.19.0",
|