@emulators/mongoatlas 0.4.0 → 0.4.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.
Files changed (2) hide show
  1. package/README.md +71 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # @emulators/mongoatlas
2
+
3
+ MongoDB Atlas emulation with Atlas Admin API v2 and Atlas Data API v1 for local development and testing. In-memory document storage with CRUD, filtering, and aggregation.
4
+
5
+ Part of [emulate](https://github.com/vercel-labs/emulate) — local drop-in replacement services for CI and no-network sandboxes.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @emulators/mongoatlas
11
+ ```
12
+
13
+ ## Endpoints
14
+
15
+ ### Admin API
16
+
17
+ #### Projects
18
+ - `GET /api/atlas/v2/groups` — list projects
19
+ - `GET /api/atlas/v2/groups/:groupId` — get project
20
+ - `POST /api/atlas/v2/groups` — create project
21
+ - `DELETE /api/atlas/v2/groups/:groupId` — delete project (cascades clusters and data)
22
+
23
+ #### Clusters
24
+ - `GET /api/atlas/v2/groups/:groupId/clusters` — list clusters
25
+ - `GET /api/atlas/v2/groups/:groupId/clusters/:clusterName` — get cluster
26
+ - `POST /api/atlas/v2/groups/:groupId/clusters` — create cluster
27
+ - `PATCH /api/atlas/v2/groups/:groupId/clusters/:clusterName` — update cluster
28
+ - `DELETE /api/atlas/v2/groups/:groupId/clusters/:clusterName` — delete cluster
29
+
30
+ #### Database Users
31
+ - `GET /api/atlas/v2/groups/:groupId/databaseUsers` — list database users
32
+ - `GET /api/atlas/v2/groups/:groupId/databaseUsers/admin/:username` — get database user
33
+ - `POST /api/atlas/v2/groups/:groupId/databaseUsers` — create database user
34
+ - `DELETE /api/atlas/v2/groups/:groupId/databaseUsers/admin/:username` — delete database user
35
+
36
+ #### Data Explorer
37
+ - `GET /api/atlas/v2/groups/:groupId/clusters/:clusterName/databases` — list databases
38
+ - `GET /api/atlas/v2/groups/:groupId/clusters/:clusterName/databases/:databaseName/collections` — list collections
39
+
40
+ ### Data API
41
+
42
+ All operations via `POST` with JSON body specifying `dataSource`, `database`, and `collection`:
43
+
44
+ - `POST /app/data-api/v1/action/findOne` — find one document
45
+ - `POST /app/data-api/v1/action/find` — find many (filter, projection, sort, limit, skip)
46
+ - `POST /app/data-api/v1/action/insertOne` — insert one document
47
+ - `POST /app/data-api/v1/action/insertMany` — insert many documents
48
+ - `POST /app/data-api/v1/action/updateOne` — update one document (`$set`, upsert)
49
+ - `POST /app/data-api/v1/action/updateMany` — update many documents
50
+ - `POST /app/data-api/v1/action/deleteOne` — delete one document
51
+ - `POST /app/data-api/v1/action/deleteMany` — delete many documents
52
+ - `POST /app/data-api/v1/action/aggregate` — aggregation pipeline (`$match`, `$limit`, `$skip`, `$sort`, `$project`, `$count`)
53
+
54
+ ## Seed Configuration
55
+
56
+ ```yaml
57
+ mongoatlas:
58
+ projects:
59
+ - name: my-project
60
+ clusters:
61
+ - project: my-project
62
+ name: my-cluster
63
+ database_users:
64
+ - project: my-project
65
+ username: app-user
66
+ ```
67
+
68
+ ## Links
69
+
70
+ - [Full documentation](https://emulate.dev)
71
+ - [GitHub](https://github.com/vercel-labs/emulate)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emulators/mongoatlas",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "hono": "^4",
31
- "@emulators/core": "0.4.0"
31
+ "@emulators/core": "0.4.1"
32
32
  },
33
33
  "devDependencies": {
34
34
  "tsup": "^8",