@cellaware/utils 7.0.5 → 7.2.0
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/dist/azure/cosmos.js +9 -5
- package/package.json +4 -4
package/dist/azure/cosmos.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CosmosClient } from '@azure/cosmos';
|
|
1
|
+
import { ConnectionMode, CosmosClient } from '@azure/cosmos';
|
|
2
2
|
import { isDaylightSavingTime } from '../util.js';
|
|
3
3
|
const COSMOS_CURRENT_DATETIME = `GetCurrentDateTime()`;
|
|
4
4
|
const COSMOS_TIMESTAMP_DATETIME = `TimestampToDateTime(c._ts*1000)`;
|
|
@@ -164,7 +164,8 @@ export async function cosmosSelect(databaseId, collectionId, partitionKey, query
|
|
|
164
164
|
try {
|
|
165
165
|
const cosmosClient = new CosmosClient({
|
|
166
166
|
endpoint: process.env.COSMOS_DB_ENDPOINT ?? '',
|
|
167
|
-
key: process.env.COSMOS_DB_KEY ?? ''
|
|
167
|
+
key: process.env.COSMOS_DB_KEY ?? '',
|
|
168
|
+
connectionPolicy: { connectionMode: ConnectionMode.Gateway, enableEndpointDiscovery: false }
|
|
168
169
|
});
|
|
169
170
|
const { database } = await cosmosClient.databases.createIfNotExists({ id: databaseId });
|
|
170
171
|
const { container } = await database.containers.createIfNotExists({
|
|
@@ -182,7 +183,8 @@ export async function cosmosInsert(databaseId, collectionId, partitionKey, data)
|
|
|
182
183
|
try {
|
|
183
184
|
const cosmosClient = new CosmosClient({
|
|
184
185
|
endpoint: process.env.COSMOS_DB_ENDPOINT ?? '',
|
|
185
|
-
key: process.env.COSMOS_DB_KEY ?? ''
|
|
186
|
+
key: process.env.COSMOS_DB_KEY ?? '',
|
|
187
|
+
connectionPolicy: { connectionMode: ConnectionMode.Gateway, enableEndpointDiscovery: false }
|
|
186
188
|
});
|
|
187
189
|
const { database } = await cosmosClient.databases.createIfNotExists({ id: databaseId });
|
|
188
190
|
const { container } = await database.containers.createIfNotExists({
|
|
@@ -203,7 +205,8 @@ export async function cosmosDelete(databaseId, collectionId, partitionKey, query
|
|
|
203
205
|
try {
|
|
204
206
|
const cosmosClient = new CosmosClient({
|
|
205
207
|
endpoint: process.env.COSMOS_DB_ENDPOINT ?? '',
|
|
206
|
-
key: process.env.COSMOS_DB_KEY ?? ''
|
|
208
|
+
key: process.env.COSMOS_DB_KEY ?? '',
|
|
209
|
+
connectionPolicy: { connectionMode: ConnectionMode.Gateway, enableEndpointDiscovery: false }
|
|
207
210
|
});
|
|
208
211
|
const { database } = await cosmosClient.databases.createIfNotExists({ id: databaseId });
|
|
209
212
|
const { container } = await database.containers.createIfNotExists({
|
|
@@ -232,7 +235,8 @@ export async function cosmosUpdate(databaseId, collectionId, partitionKey, query
|
|
|
232
235
|
}
|
|
233
236
|
const cosmosClient = new CosmosClient({
|
|
234
237
|
endpoint: process.env.COSMOS_DB_ENDPOINT ?? '',
|
|
235
|
-
key: process.env.COSMOS_DB_KEY ?? ''
|
|
238
|
+
key: process.env.COSMOS_DB_KEY ?? '',
|
|
239
|
+
connectionPolicy: { connectionMode: ConnectionMode.Gateway, enableEndpointDiscovery: false }
|
|
236
240
|
});
|
|
237
241
|
const { database } = await cosmosClient.databases.createIfNotExists({ id: databaseId });
|
|
238
242
|
const { container } = await database.containers.createIfNotExists({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cellaware/utils",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Cellaware Utilities for Node.js",
|
|
5
5
|
"author": "Cellaware Technologies",
|
|
6
6
|
"type": "module",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"homepage": "https://cellaware.com",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@azure/communication-email": "^1.0.0",
|
|
20
|
-
"@azure/cosmos": "^
|
|
21
|
-
"@azure/functions": "^4.
|
|
22
|
-
"@azure/storage-blob": "^12.
|
|
20
|
+
"@azure/cosmos": "^4.7.0",
|
|
21
|
+
"@azure/functions": "^4.8.0",
|
|
22
|
+
"@azure/storage-blob": "^12.29.1",
|
|
23
23
|
"dotenv": "^16.3.1",
|
|
24
24
|
"langchain": "^0.2.19"
|
|
25
25
|
},
|