tina4-nodejs 3.13.103 → 3.13.105
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 -2
- package/package.json +1 -1
- package/packages/cli/dist/bin.js +747 -57
- package/packages/core/dist/index.js +750 -57
- package/packages/core/src/authGate.ts +6 -0
- package/packages/core/src/index.ts +2 -0
- package/packages/core/src/queue.ts +75 -18
- package/packages/core/src/queueBackends/liteBackend.ts +17 -1
- package/packages/core/src/queueBackends/mongoBackend.ts +80 -14
- package/packages/core/src/server.ts +5 -0
- package/packages/core/src/sso.ts +285 -0
- package/packages/orm/dist/index.js +755 -62
- package/packages/orm/src/adapters/postgres.ts +2 -0
- package/packages/orm/src/baseModel.ts +63 -10
- package/packages/orm/src/index.ts +2 -0
- package/packages/orm/src/migration.ts +14 -5
- package/packages/orm/src/point.ts +105 -0
- package/packages/orm/src/queryBuilder.ts +66 -5
- package/packages/orm/src/sqlTranslator.ts +63 -0
- package/packages/orm/src/types.ts +5 -1
- package/packages/swagger/dist/index.js +11 -1
- package/packages/swagger/src/generator.ts +11 -1
- package/types/core/src/index.d.ts +2 -0
- package/types/core/src/queue.d.ts +41 -4
- package/types/core/src/queueBackends/liteBackend.d.ts +7 -1
- package/types/core/src/queueBackends/mongoBackend.d.ts +7 -2
- package/types/core/src/sso.d.ts +55 -0
- package/types/orm/src/baseModel.d.ts +13 -5
- package/types/orm/src/index.d.ts +2 -0
- package/types/orm/src/point.d.ts +24 -0
- package/types/orm/src/queryBuilder.d.ts +10 -1
- package/types/orm/src/sqlTranslator.d.ts +13 -0
- package/types/orm/src/types.d.ts +5 -1
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.105)
|
|
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.105 - 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
|
|
|
@@ -309,6 +309,20 @@ queue.consume(topic?, id?, pollInterval=1000): AsyncGenerator<QueueJob>
|
|
|
309
309
|
// Usage: for await (const job of queue.consume("emails")) { ... }
|
|
310
310
|
```
|
|
311
311
|
|
|
312
|
+
**size / failed / deadLetters — three surfaces, one distinction (3.13.105 parity).**
|
|
313
|
+
- `queue.size(status)` — `"pending"` counts jobs waiting to be popped AND retryable-
|
|
314
|
+
but-attempted ones (they live in the pending queue under the auto-retry lifecycle).
|
|
315
|
+
`"reserved"` counts in-flight jobs against the visibility timeout. `"completed"`
|
|
316
|
+
counts finished jobs. `"failed"` / `"dead"` / `"dead_letter"` are ALIASES — all
|
|
317
|
+
three count the dead-letter store (== `queue.deadLetters().length`).
|
|
318
|
+
- `queue.failed()` — retryable-but-attempted jobs (0 < attempts < maxRetries) that
|
|
319
|
+
live in the pending queue and are still being auto-retried. They are counted under
|
|
320
|
+
`size("pending")`, NOT `size("failed")`. Use this to LIST them; use
|
|
321
|
+
`size("pending")` to include them in a total.
|
|
322
|
+
- `queue.deadLetters()` — terminal failures (attempts >= maxRetries). Same set that
|
|
323
|
+
`size("failed")` / `size("dead")` / `size("dead_letter")` count. Returns wrapped
|
|
324
|
+
`Job` objects so callers can iterate uniformly and call `.retry()` on each.
|
|
325
|
+
|
|
312
326
|
### @tina4/swagger (`packages/swagger/`)
|
|
313
327
|
Auto-generates OpenAPI 3.0.3 docs.
|
|
314
328
|
|