@serenity-js/core 3.21.2 → 3.22.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 +8 -0
- package/lib/screenplay/questions/Masked.d.ts +2 -2
- package/lib/screenplay/questions/Masked.d.ts.map +1 -1
- package/lib/screenplay/questions/Masked.js +2 -2
- package/lib/screenplay/questions/Masked.js.map +1 -1
- package/package.json +2 -2
- package/src/screenplay/questions/Masked.ts +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.22.0](https://github.com/serenity-js/serenity-js/compare/v3.21.2...v3.22.0) (2024-04-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @serenity-js/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [3.21.2](https://github.com/serenity-js/serenity-js/compare/v3.21.1...v3.21.2) (2024-03-31)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @serenity-js/core
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type
|
|
1
|
+
import { type Answerable } from '../Answerable';
|
|
2
|
+
import { type QuestionAdapter } from '../Question';
|
|
3
3
|
/**
|
|
4
4
|
* This question masks sensitive data handled by the actors and prevents
|
|
5
5
|
* it from being shown in Serenity/JS reports and console logs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Masked.d.ts","sourceRoot":"","sources":["../../../src/screenplay/questions/Masked.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Masked.d.ts","sourceRoot":"","sources":["../../../src/screenplay/questions/Masked.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,qBAAa,MAAM;IAEf;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC,MAAM,CAAC;CAGzE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Masked = void 0;
|
|
4
|
-
const
|
|
4
|
+
const Question_1 = require("../Question");
|
|
5
5
|
/**
|
|
6
6
|
* This question masks sensitive data handled by the actors and prevents
|
|
7
7
|
* it from being shown in Serenity/JS reports and console logs.
|
|
@@ -33,7 +33,7 @@ class Masked {
|
|
|
33
33
|
* @returns A {@link QuestionAdapter} representing the masked value.
|
|
34
34
|
*/
|
|
35
35
|
static valueOf(parameter) {
|
|
36
|
-
return
|
|
36
|
+
return Question_1.Question.about('[a masked value]', async (actor) => actor.answer(parameter));
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
exports.Masked = Masked;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Masked.js","sourceRoot":"","sources":["../../../src/screenplay/questions/Masked.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"Masked.js","sourceRoot":"","sources":["../../../src/screenplay/questions/Masked.ts"],"names":[],"mappings":";;;AACA,0CAA6D;AAE7D;;;;;;;;;;GAUG;AACH,MAAa,MAAM;IAEf;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,OAAO,CAAC,SAA6B;QACxC,OAAO,mBAAQ,CAAC,KAAK,CAAC,kBAAkB,EAAE,KAAK,EAAC,KAAK,EAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACtF,CAAC;CACJ;AAvBD,wBAuBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.0",
|
|
4
4
|
"description": "Serenity/JS Screenplay, reporting engine and core interfaces.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"engines": {
|
|
72
72
|
"node": "^16.13 || ^18.12 || ^20"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "28f90019515001a310e01aa484cbd27f533f9e89"
|
|
75
75
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type
|
|
1
|
+
import { type Answerable } from '../Answerable';
|
|
2
|
+
import { Question, type QuestionAdapter } from '../Question';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* This question masks sensitive data handled by the actors and prevents
|
|
6
|
-
* it from being shown in Serenity/JS reports and console logs.
|
|
7
|
-
* You should use it to wrap passwords, secret tokens, phone numbers,
|
|
8
|
-
* credit card numbers, or any other personally identifiable information (PII).
|
|
9
|
-
* However, even though the wrapped value is masked in the output,
|
|
5
|
+
* This question masks sensitive data handled by the actors and prevents
|
|
6
|
+
* it from being shown in Serenity/JS reports and console logs.
|
|
7
|
+
* You should use it to wrap passwords, secret tokens, phone numbers,
|
|
8
|
+
* credit card numbers, or any other personally identifiable information (PII).
|
|
9
|
+
* However, even though the wrapped value is masked in the output,
|
|
10
10
|
* you can still retrieve the unmasked value by making the actor answer
|
|
11
11
|
* the question in your custom interactions.
|
|
12
12
|
*
|
|
13
13
|
* @group Questions
|
|
14
14
|
*/
|
|
15
15
|
export class Masked {
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
/**
|
|
18
18
|
* Retrieves the value of a sensitive parameter and mask it in any report.
|
|
19
19
|
*
|
|
@@ -32,7 +32,7 @@ export class Masked {
|
|
|
32
32
|
* @param parameter - An {@link Answerable} representing the masked value.
|
|
33
33
|
* @returns A {@link QuestionAdapter} representing the masked value.
|
|
34
34
|
*/
|
|
35
|
-
static valueOf(parameter: Answerable<string>)
|
|
36
|
-
return Question.about('[a masked value]', async actor => actor.answer(parameter))
|
|
35
|
+
static valueOf(parameter: Answerable<string>): QuestionAdapter<string> {
|
|
36
|
+
return Question.about('[a masked value]', async actor => actor.answer(parameter));
|
|
37
37
|
}
|
|
38
|
-
}
|
|
38
|
+
}
|