@entifix/mongo 0.1.0 → 0.1.1
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/README.md +30 -0
- package/package.json +7 -6
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @entifix/mongo
|
|
2
|
+
|
|
3
|
+
The MongoDB adapter. `makeMongoRepository` implements the `EntityRepository` port from `@entifix/business`, translating an RSQL filter and sort into a Mongo query, and `makeMongoTenantResolver` hands each request the database of the organization it belongs to.
|
|
4
|
+
|
|
5
|
+
`MongoClientLayer` owns the connection pool for the life of the process; a per-organization database is resolved inside the request, never built as a Layer per request.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pnpm add @entifix/mongo effect
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Entry points
|
|
14
|
+
|
|
15
|
+
| Import | What it holds |
|
|
16
|
+
| ----------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| `@entifix/mongo` | Repository, link resolver, query translation, client and database Layers, tenant resolver, health probe |
|
|
18
|
+
| `@entifix/mongo/transactions` | Transactional outbox and inbox for `@entifix/transactions`, with the relay that drains the outbox |
|
|
19
|
+
|
|
20
|
+
## Optional peers
|
|
21
|
+
|
|
22
|
+
Install these only if you use what needs them.
|
|
23
|
+
|
|
24
|
+
| Peer | Needed by |
|
|
25
|
+
| ----------------------- | ----------------------------- |
|
|
26
|
+
| `@entifix/transactions` | `@entifix/mongo/transactions` |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
Tier 2 (adapters) of entifix — a package depends only on its own tier or below. See [the tiers](https://github.com/r10c-technologies/entifix#the-tiers-and-what-you-are-allowed-to-install). MIT licensed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entifix/mongo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "MongoDB adapter: an entity repository, RSQL-to-Mongo query translation, per-tenant databases, and an optional transactional outbox.",
|
|
4
5
|
"license": "MIT",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
@@ -62,17 +63,17 @@
|
|
|
62
63
|
"dependencies": {
|
|
63
64
|
"@swc/helpers": "0.5.23",
|
|
64
65
|
"mongodb": "7.5.0",
|
|
65
|
-
"@entifix/
|
|
66
|
-
"@entifix/
|
|
66
|
+
"@entifix/core": "0.1.1",
|
|
67
|
+
"@entifix/business": "0.1.1"
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
69
70
|
"effect": "3.22.1",
|
|
70
|
-
"@entifix/transactions": "0.1.
|
|
71
|
-
"@entifix/testing-unit": "0.1.
|
|
71
|
+
"@entifix/transactions": "0.1.1",
|
|
72
|
+
"@entifix/testing-unit": "0.1.1"
|
|
72
73
|
},
|
|
73
74
|
"peerDependencies": {
|
|
74
75
|
"effect": ">=3.22 <4",
|
|
75
|
-
"@entifix/transactions": "0.1.
|
|
76
|
+
"@entifix/transactions": "0.1.1"
|
|
76
77
|
},
|
|
77
78
|
"peerDependenciesMeta": {
|
|
78
79
|
"@entifix/transactions": {
|