@friggframework/core 1.0.1-v1-alpha.2 → 1.0.1-v1-alpha.3
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/encrypt/encrypt.js +8 -6
- package/package.json +3 -3
package/encrypt/encrypt.js
CHANGED
|
@@ -15,12 +15,14 @@ const findOneEvents = [
|
|
|
15
15
|
];
|
|
16
16
|
|
|
17
17
|
const shouldBypassEncryption = (STAGE) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const bypassStages =
|
|
23
|
-
|
|
18
|
+
const defaultBypassStages = ['dev', 'test', 'local'];
|
|
19
|
+
const bypassStageEnv = process.env.BYPASS_ENCRYPTION_STAGE;
|
|
20
|
+
// If the env is set to anything or an empty string, use the env. Otherwise, use the default array
|
|
21
|
+
const useEnv = !String(bypassStageEnv) || !!bypassStageEnv;
|
|
22
|
+
const bypassStages = useEnv
|
|
23
|
+
? bypassStageEnv.split(',').map((stage) => stage.trim())
|
|
24
|
+
: defaultBypassStages;
|
|
25
|
+
return bypassStages.includes(STAGE);
|
|
24
26
|
};
|
|
25
27
|
|
|
26
28
|
// The Mongoose plug-in function
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/core",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "1.0.1-v1-alpha.
|
|
4
|
+
"version": "1.0.1-v1-alpha.3",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@hapi/boom": "^10.0.1",
|
|
7
7
|
"aws-sdk": "^2.1200.0",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"node-fetch": "^2.6.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@friggframework/devtools": "1.0.1-v1-alpha.
|
|
18
|
+
"@friggframework/devtools": "1.0.1-v1-alpha.3",
|
|
19
19
|
"@types/lodash": "^4.14.191",
|
|
20
20
|
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
|
21
21
|
"chai": "^4.3.6",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
},
|
|
48
48
|
"homepage": "https://github.com/friggframework/frigg#readme",
|
|
49
49
|
"description": "",
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "6a3908e31ccf56fb6be6dab758e55fc5601e6d65"
|
|
51
51
|
}
|