@forzalabs/remora 0.0.44-nasco.3 → 0.0.45-nasco.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/Constants.js
CHANGED
|
@@ -70,7 +70,8 @@
|
|
|
70
70
|
"mask",
|
|
71
71
|
"crypt",
|
|
72
72
|
"random",
|
|
73
|
-
"seeded-random"
|
|
73
|
+
"seeded-random",
|
|
74
|
+
"none"
|
|
74
75
|
],
|
|
75
76
|
"description": "Masking type to apply to this dimension. 'hash' replaces with a hashed value. 'mask' replaces characters with a mask character. 'crypt' encrypts the value. 'random' replaces with a random value. 'seeded-random' replaces with a random value generated from a seed. You can use environment variables by using the {your-env-var} notation",
|
|
76
77
|
"examples": [
|
package/engines/CryptoEngine.js
CHANGED
|
@@ -18,6 +18,8 @@ class CryptoEngineClass {
|
|
|
18
18
|
throw new Error('Not implemented yet');
|
|
19
19
|
case 'mask':
|
|
20
20
|
throw new Error('Not implemented yet');
|
|
21
|
+
case 'none':
|
|
22
|
+
return `${fieldReference} AS "${fieldName}"`;
|
|
21
23
|
default:
|
|
22
24
|
throw new Error('This type is not ');
|
|
23
25
|
}
|
|
@@ -55,6 +57,8 @@ class CryptoEngineClass {
|
|
|
55
57
|
throw new Error('Not implemented yet');
|
|
56
58
|
case 'mask':
|
|
57
59
|
throw new Error('Not implemented yet');
|
|
60
|
+
case 'none':
|
|
61
|
+
return value;
|
|
58
62
|
default:
|
|
59
63
|
throw new Error(`This type doesn't exist`);
|
|
60
64
|
}
|
|
@@ -21,7 +21,6 @@ class RequestExecutorClass {
|
|
|
21
21
|
this.execute = (dataset, request) => __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
(0, Affirm_1.default)(dataset, 'Invalid data');
|
|
23
23
|
(0, Affirm_1.default)(request, 'Invalid request');
|
|
24
|
-
(0, Affirm_1.default)(Array.isArray(dataset), `Invalid data type: should be an array`);
|
|
25
24
|
if (request.filters)
|
|
26
25
|
dataset = yield this.applyFilters(dataset, request.filters);
|
|
27
26
|
if (request.order)
|
|
@@ -16,7 +16,8 @@ class ProducerManagerClass {
|
|
|
16
16
|
'mask',
|
|
17
17
|
'crypt',
|
|
18
18
|
'random',
|
|
19
|
-
'seeded-random'
|
|
19
|
+
'seeded-random',
|
|
20
|
+
'none'
|
|
20
21
|
];
|
|
21
22
|
(0, Affirm_1.default)(allowedMaskValues.includes(mask), `Mask value "${mask}" in dimension "${dimension.name}" is not a valid value.`);
|
|
22
23
|
return mask;
|