@ossy/deployment-tools 0.0.63 → 0.0.64
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ossy/deployment-tools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.64",
|
|
4
4
|
"description": "Collection of scripts and tools to aid deployment of containers and static files to Amazon Web Services through GitHub Actions",
|
|
5
5
|
"source": "./src/index.js",
|
|
6
6
|
"main": "./src/index.js",
|
package/src/caddy/caddy.js
CHANGED
|
@@ -17,7 +17,7 @@ class CaddyService {
|
|
|
17
17
|
headers: { 'Content-Type': 'application/json' },
|
|
18
18
|
body: JSON.stringify(routeConfig)
|
|
19
19
|
})
|
|
20
|
-
.then(
|
|
20
|
+
.then(response => response?.error && logError({ message: `[CaddyService] Could not update caddy config to include ${host}`, error }))
|
|
21
21
|
.catch(error => logError({ message: `[CaddyService] Could not update caddy config to include ${host}`, error }))
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -38,7 +38,7 @@ class CaddyService {
|
|
|
38
38
|
body: JSON.stringify(defaultConfig)
|
|
39
39
|
})
|
|
40
40
|
})
|
|
41
|
-
.then(
|
|
41
|
+
.then(response => response?.error && logError({ message: '[CaddyService] Could not apply default caddy config', error }))
|
|
42
42
|
.catch(error => logError({ message: '[CaddyService] Could not apply default caddy config', error }))
|
|
43
43
|
|
|
44
44
|
}
|
|
@@ -51,7 +51,7 @@ class CaddyService {
|
|
|
51
51
|
})
|
|
52
52
|
.then(x => x.json())
|
|
53
53
|
.then(response => {
|
|
54
|
-
if (!response
|
|
54
|
+
if (!response?.error) return response
|
|
55
55
|
logInfo({ message: '[CaddyService] No server config found' })
|
|
56
56
|
logDebug({ message: '[CaddyService] Error while fetching server config', data: response.error })
|
|
57
57
|
})
|