@thisisagile/easy 10.14.8 → 10.14.9
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/dist/types/Results.js
CHANGED
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isResults = exports.toResults = exports.Results = void 0;
|
|
4
4
|
const Result_1 = require("./Result");
|
|
5
5
|
const Is_1 = require("./Is");
|
|
6
|
-
const
|
|
6
|
+
const Array_1 = require("./Array");
|
|
7
|
+
const parse = (...rs) => (0, Array_1.toArray)(...rs).map(r => ((0, Result_1.isResult)(r) ? r : (0, Result_1.toResult)(r)));
|
|
7
8
|
class Results {
|
|
8
9
|
constructor(...rs) {
|
|
9
10
|
this.add = (...rs) => (0, exports.toResults)(...this.results, ...parse(...rs));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Results.js","sourceRoot":"","sources":["../../src/types/Results.ts"],"names":[],"mappings":";;;AACA,qCAAsD;AAEtD,6BAAiC;
|
|
1
|
+
{"version":3,"file":"Results.js","sourceRoot":"","sources":["../../src/types/Results.ts"],"names":[],"mappings":";;;AACA,qCAAsD;AAEtD,6BAAiC;AACjC,mCAAkC;AAElC,MAAM,KAAK,GAAG,CAAC,GAAG,EAAqB,EAAY,EAAE,CAAC,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAA,iBAAQ,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,iBAAQ,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/G,MAAa,OAAO;IAGlB,YAAY,GAAG,EAAqB;QAYpC,QAAG,GAAG,CAAC,GAAG,EAAqB,EAAW,EAAE,CAAC,IAAA,iBAAS,EAAC,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QAXvF,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IAC9B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC;IACnC,CAAC;CAGF;AAhBD,0BAgBC;AAEM,MAAM,SAAS,GAAG,CAAC,GAAG,CAAoB,EAAW,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AAApE,QAAA,SAAS,aAA2D;AAE1E,MAAM,SAAS,GAAG,CAAC,CAAW,EAAgB,EAAE,CAAC,IAAA,cAAS,EAAC,CAAC,CAAC,IAAI,CAAC,YAAY,OAAO,CAAC;AAAhF,QAAA,SAAS,aAAuE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thisisagile/easy",
|
|
3
|
-
"version": "10.14.
|
|
3
|
+
"version": "10.14.9",
|
|
4
4
|
"description": "Straightforward library for building domain-driven microservice architectures",
|
|
5
5
|
"author": "Sander Hoogendoorn",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@thisisagile/easy-test": "10.14.
|
|
34
|
+
"@thisisagile/easy-test": "10.14.9",
|
|
35
35
|
"@types/form-urlencoded": "^4.4.0",
|
|
36
36
|
"@types/jsonwebtoken": "^8.5.8",
|
|
37
37
|
"@types/validator": "^13.7.2"
|
package/src/types/Results.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Text } from './Text';
|
|
2
|
-
import { isResult,
|
|
2
|
+
import { isResult, Result, toResult } from './Result';
|
|
3
3
|
import { Validatable } from './Validatable';
|
|
4
4
|
import { isDefined } from './Is';
|
|
5
|
+
import { toArray } from './Array';
|
|
5
6
|
|
|
6
|
-
const parse = (...rs: (Text | Result)[]): Result[] => rs.map(r => (isResult(r) ? r : toResult(r)));
|
|
7
|
+
const parse = (...rs: (Text | Result)[]): Result[] => toArray(...rs).map(r => (isResult(r) ? r : toResult(r)));
|
|
7
8
|
|
|
8
9
|
export class Results implements Validatable {
|
|
9
10
|
public readonly results: Result[];
|