@twin.org/entity-storage-connector-cosmosdb 0.0.2-next.9 → 0.0.3-next.10
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 +7 -18
- package/dist/{esm/index.mjs → es/cosmosDbEntityStorageConnector.js} +335 -109
- package/dist/es/cosmosDbEntityStorageConnector.js.map +1 -0
- package/dist/es/index.js +6 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/ICosmosDbEntityStorageConnectorConfig.js +4 -0
- package/dist/es/models/ICosmosDbEntityStorageConnectorConfig.js.map +1 -0
- package/dist/es/models/ICosmosDbEntityStorageConnectorConstructorOptions.js +2 -0
- package/dist/es/models/ICosmosDbEntityStorageConnectorConstructorOptions.js.map +1 -0
- package/dist/types/cosmosDbEntityStorageConnector.d.ts +42 -8
- package/dist/types/index.d.ts +3 -3
- package/dist/types/models/ICosmosDbEntityStorageConnectorConfig.d.ts +4 -0
- package/dist/types/models/ICosmosDbEntityStorageConnectorConstructorOptions.d.ts +5 -1
- package/docs/changelog.md +224 -33
- package/docs/examples.md +96 -1
- package/docs/reference/classes/CosmosDbEntityStorageConnector.md +154 -22
- package/docs/reference/interfaces/ICosmosDbEntityStorageConnectorConfig.md +12 -4
- package/docs/reference/interfaces/ICosmosDbEntityStorageConnectorConstructorOptions.md +12 -4
- package/locales/en.json +20 -5
- package/package.json +16 -13
- package/dist/cjs/index.cjs +0 -595
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Entity Storage Connector Cosmos DB
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package provides an Azure Cosmos DB backend for globally distributed persistence across regions. It is designed to work with the wider storage ecosystem so applications can keep behaviour consistent across connectors and environments.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -8,24 +8,13 @@ Entity Storage connector implementation using Cosmos DB storage.
|
|
|
8
8
|
npm install @twin.org/entity-storage-connector-cosmosdb
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Docker
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
To perform testing of this component it may be necessary to launch a local instance to communicate with.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
docker run -d --platform=linux/amd64 -p 8081:8081 -m 3g --name twin-entity-storage-cosmos -e AZURE_COSMOS_EMULATOR_PARTITION_COUNT=10 -e AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=true -e AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE='127.0.0.1' mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Or
|
|
22
|
-
|
|
23
|
-
To install and run the Azure CosmosDB Emulator [Azure CosmosDB Emulator](https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-develop-emulator)
|
|
24
|
-
|
|
25
|
-
Afterwards you can run the tests as follows:
|
|
26
|
-
|
|
27
|
-
```sh
|
|
28
|
-
npm run test
|
|
15
|
+
```shell
|
|
16
|
+
docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
|
|
17
|
+
docker run --publish 8081:8081 --name twin-entity-storage-cosmos --detach --platform=linux/amd64 --memory=3g --cpus=2.0 mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
|
|
29
18
|
```
|
|
30
19
|
|
|
31
20
|
## Examples
|