@boostercloud/framework-provider-azure 3.1.0 → 3.1.2
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.
|
@@ -26,11 +26,21 @@ function getContainer(cosmosDb, config, containerName) {
|
|
|
26
26
|
}
|
|
27
27
|
async function isContainerUp(cosmosDb, config, containerName) {
|
|
28
28
|
const container = getContainer(cosmosDb, config, containerName);
|
|
29
|
-
const { resources } = await container.items
|
|
29
|
+
const { resources } = await container.items
|
|
30
|
+
.query({
|
|
31
|
+
query: 'SELECT TOP 1 1 FROM c',
|
|
32
|
+
parameters: [],
|
|
33
|
+
})
|
|
34
|
+
.fetchAll();
|
|
30
35
|
return resources !== undefined;
|
|
31
36
|
}
|
|
32
37
|
async function countAll(container) {
|
|
33
|
-
const { resources } = await container.items
|
|
38
|
+
const { resources } = await container.items
|
|
39
|
+
.query({
|
|
40
|
+
query: 'SELECT VALUE COUNT(1) FROM c',
|
|
41
|
+
parameters: [],
|
|
42
|
+
})
|
|
43
|
+
.fetchAll();
|
|
34
44
|
return resources ? resources[0] : 0;
|
|
35
45
|
}
|
|
36
46
|
async function databaseEventsHealthDetails(cosmosDb, config) {
|
|
@@ -69,7 +79,9 @@ async function areDatabaseReadModelsUp(cosmosDb, config) {
|
|
|
69
79
|
async function isGraphQLFunctionUp() {
|
|
70
80
|
try {
|
|
71
81
|
const restAPIUrl = await graphqlFunctionUrl();
|
|
72
|
-
const response = await (0, framework_common_helpers_1.request)(restAPIUrl, 'POST'
|
|
82
|
+
const response = await (0, framework_common_helpers_1.request)(restAPIUrl, 'POST', JSON.stringify({
|
|
83
|
+
query: 'query { __typename }',
|
|
84
|
+
}));
|
|
73
85
|
return response.status === 200;
|
|
74
86
|
}
|
|
75
87
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boostercloud/framework-provider-azure",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "Handle Booster's integration with Azure",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework-provider-azure"
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"@azure/functions": "^1.2.2",
|
|
28
28
|
"@azure/identity": "~4.7.0",
|
|
29
29
|
"@azure/event-hubs": "5.11.1",
|
|
30
|
-
"@boostercloud/framework-common-helpers": "^3.1.
|
|
31
|
-
"@boostercloud/framework-types": "^3.1.
|
|
30
|
+
"@boostercloud/framework-common-helpers": "^3.1.2",
|
|
31
|
+
"@boostercloud/framework-types": "^3.1.2",
|
|
32
32
|
"tslib": "^2.4.0",
|
|
33
33
|
"@effect-ts/core": "^0.60.4",
|
|
34
34
|
"@azure/web-pubsub": "~1.1.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@boostercloud/eslint-config": "^3.1.
|
|
37
|
+
"@boostercloud/eslint-config": "^3.1.2",
|
|
38
38
|
"@types/chai": "4.2.18",
|
|
39
39
|
"@types/chai-as-promised": "7.1.4",
|
|
40
40
|
"@types/faker": "5.1.5",
|