@signageos/lib 12.5.1-master.2267 → 12.6.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/CHANGELOG.md +4 -1
- package/README.md +14 -0
- package/package.json +3 -1
- package/tools/get-test-env-variables.sh +24 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [12.6.0] - 2023-11-21
|
|
8
|
+
### Added
|
|
9
|
+
- Auth0ManagementClient
|
|
10
|
+
|
|
8
11
|
### Fixed
|
|
9
12
|
- Upgraded Zod library because of faulty email validation
|
|
10
13
|
- Enable to log errors in `retryAsyncUntil` function
|
package/README.md
CHANGED
|
@@ -31,3 +31,17 @@ EOF
|
|
|
31
31
|
|
|
32
32
|
# Limitations
|
|
33
33
|
This repository shouldn't have any `@signageos` dependencies. Otherwise there will be problem cyclic dependencies
|
|
34
|
+
|
|
35
|
+
<!-- TODO: Remove when replaced with secret manager -->
|
|
36
|
+
## Tests
|
|
37
|
+
|
|
38
|
+
Some integration tests require secrets which are specified in the `.env.test.yaml`. These values can be exported to
|
|
39
|
+
the `.env.docker-compose` with running script `bash tools/get-test-env-variables.sh`.
|
|
40
|
+
|
|
41
|
+
## CI/CD
|
|
42
|
+
|
|
43
|
+
Required secrets from test needs to be added to the gitlab CI/CD variables
|
|
44
|
+
|
|
45
|
+
## Tools
|
|
46
|
+
|
|
47
|
+
`get-test-env-variables.sh` - exports environment variables from helm to `.env.docker-compose`. Must be run with `bash`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signageos/lib",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.6.0",
|
|
4
4
|
"main": "./dist",
|
|
5
5
|
"files": [
|
|
6
6
|
"tools",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"mongoose": "^5.9.16",
|
|
50
50
|
"mongodb": "3.3.3",
|
|
51
51
|
"raven": "2.6.4",
|
|
52
|
+
"sinon": "15.2.0",
|
|
52
53
|
"webpack": "4.41.2",
|
|
53
54
|
"ws": "^6.0.0",
|
|
54
55
|
"zen-observable": "0.8.14"
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
"@signageos/codestyle": "0.0.23",
|
|
65
66
|
"@types/amqplib": "0.5.13",
|
|
66
67
|
"@types/async-lock": "1.1.1",
|
|
68
|
+
"@types/auth0": "3.3.2",
|
|
67
69
|
"@types/debug": "0.0.29",
|
|
68
70
|
"@types/express": "4.16.1",
|
|
69
71
|
"@types/fs-extra": "4.0.5",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# TODO: Replace with secret manager
|
|
2
|
+
#!/bin/bash
|
|
3
|
+
|
|
4
|
+
# This script is used to export environment variables from helm to env
|
|
5
|
+
# Values specififed in ENV_VARIABLE_NAMES are required for running tests locally or in the CI
|
|
6
|
+
FILE_NAME=".env.test.yaml"
|
|
7
|
+
FILE_PATH="$FILE_NAME"
|
|
8
|
+
TMP_FILE_PATH="$FILE_PATH.tmp"
|
|
9
|
+
EXPORTED_ENV_VARIABLES_PATH=".env.docker-compose"
|
|
10
|
+
|
|
11
|
+
sops --decrypt "$FILE_PATH" > "$TMP_FILE_PATH"
|
|
12
|
+
|
|
13
|
+
ENV_VARIABLE_NAMES=("auth0_client_secret")
|
|
14
|
+
ENV_VARIABLES=$(grep -E "^($(IFS='|'; echo "${ENV_VARIABLE_NAMES[*]}")):" "$TMP_FILE_PATH")
|
|
15
|
+
|
|
16
|
+
for key in "${ENV_VARIABLE_NAMES[@]}"; do
|
|
17
|
+
sed -i "/$key/d" "$EXPORTED_ENV_VARIABLES_PATH"
|
|
18
|
+
value=$(echo "$ENV_VARIABLES" | grep "^${key}:" | cut -d':' -f2-)
|
|
19
|
+
trimmed_value="${value#"${value%%[![:space:]]*}"}"
|
|
20
|
+
parsed_env_variables="$key"="$trimmed_value"
|
|
21
|
+
echo "$parsed_env_variables" >> "$EXPORTED_ENV_VARIABLES_PATH"
|
|
22
|
+
done
|
|
23
|
+
|
|
24
|
+
rm "$TMP_FILE_PATH"
|