@thisisagile/easy 17.31.0 → 17.32.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/dist/{chunk-NIWK2A5T.mjs → chunk-2RHBJLH7.mjs} +8 -12
- package/dist/{chunk-NIWK2A5T.mjs.map → chunk-2RHBJLH7.mjs.map} +1 -1
- package/dist/{chunk-OOWOFPDC.mjs → chunk-4TGUPVQN.mjs} +2 -2
- package/dist/{chunk-GQ7XGATB.mjs → chunk-AMBSWR6J.mjs} +7 -9
- package/dist/{chunk-GQ7XGATB.mjs.map → chunk-AMBSWR6J.mjs.map} +1 -1
- package/dist/{chunk-DY33LKDP.mjs → chunk-BZNMKX6O.mjs} +2 -2
- package/dist/{chunk-6RSZTLCP.mjs → chunk-ESECEXXM.mjs} +4 -4
- package/dist/{chunk-PZFHPGDR.mjs → chunk-FCJ4TDW7.mjs} +2 -2
- package/dist/{chunk-6PR3OZQP.mjs → chunk-H7NA23T6.mjs} +3 -3
- package/dist/{chunk-UNU355PL.mjs → chunk-I5VS3NUO.mjs} +5 -5
- package/dist/{chunk-DV7PHOM6.mjs → chunk-JSALAKCR.mjs} +3 -3
- package/dist/{chunk-QSB4QYYE.mjs → chunk-KTK2V5FC.mjs} +2 -2
- package/dist/{chunk-LKBFD66J.mjs → chunk-KX7RRPEZ.mjs} +3 -5
- package/dist/{chunk-LKBFD66J.mjs.map → chunk-KX7RRPEZ.mjs.map} +1 -1
- package/dist/{chunk-5O2BGB5V.mjs → chunk-LAY4XDIL.mjs} +3 -3
- package/dist/{chunk-PIZ7IORV.mjs → chunk-LP2MEIWU.mjs} +2 -2
- package/dist/{chunk-X24AKSPO.mjs → chunk-PCKGK5AF.mjs} +2 -2
- package/dist/{chunk-3BJH75JQ.mjs → chunk-PQTYEEZC.mjs} +2 -2
- package/dist/{chunk-PKA5XEUC.mjs → chunk-R6UXMGTJ.mjs} +3 -3
- package/dist/{chunk-TYH6CVJL.mjs → chunk-RBGF26S7.mjs} +4 -4
- package/dist/{chunk-IYFZMJYO.mjs → chunk-TNPMWL7Y.mjs} +7 -11
- package/dist/{chunk-IYFZMJYO.mjs.map → chunk-TNPMWL7Y.mjs.map} +1 -1
- package/dist/{chunk-GJL7E2EJ.mjs → chunk-TPGAM536.mjs} +4 -4
- package/dist/{chunk-2MNT7B4T.mjs → chunk-UYBPL7PM.mjs} +7 -7
- package/dist/{chunk-HI2JE5PJ.mjs → chunk-XAIZBTVQ.mjs} +2 -2
- package/dist/chunk-ZBS4A3QI.mjs +614 -0
- package/dist/chunk-ZBS4A3QI.mjs.map +1 -0
- package/dist/data/InMemoryGateway.mjs +5 -11
- package/dist/data/InMemoryGateway.mjs.map +1 -1
- package/dist/domain/Audit.mjs +6 -11
- package/dist/domain/Child.mjs +6 -11
- package/dist/domain/Child.mjs.map +1 -1
- package/dist/domain/DateTime.mjs +3 -8
- package/dist/domain/Entity.mjs +11 -16
- package/dist/domain/Entity.mjs.map +1 -1
- package/dist/domain/Repo.mjs +5 -11
- package/dist/domain/Repo.mjs.map +1 -1
- package/dist/domain/Struct.mjs +3 -8
- package/dist/domain/Typo.mjs +4 -10
- package/dist/domain/Typo.mjs.map +1 -1
- package/dist/http/CacheControl.mjs +4 -9
- package/dist/http/CacheControl.mjs.map +1 -1
- package/dist/http/LocalRequestStore.mjs +6 -2
- package/dist/http/LocalRequestStore.mjs.map +1 -1
- package/dist/http/RequestOptions.mjs +6 -4
- package/dist/http/RestResult.mjs +4 -9
- package/dist/http/toResponse.mjs +5 -10
- package/dist/index.js +317 -306
- package/dist/index.js.map +1 -1
- package/dist/process/App.mjs +5 -2
- package/dist/process/App.mjs.map +1 -1
- package/dist/process/Manage.mjs +4 -9
- package/dist/process/Manage.mjs.map +1 -1
- package/dist/process/Scope.mjs +5 -2
- package/dist/process/Search.mjs +4 -9
- package/dist/process/UseCase.mjs +4 -1
- package/dist/process/UseCase.mjs.map +1 -1
- package/dist/resources/Req.mjs +3 -8
- package/dist/resources/Req.mjs.map +1 -1
- package/dist/services/Api.mjs +11 -16
- package/dist/services/ApiGateway.mjs +14 -19
- package/dist/services/AxiosProvider.mjs +10 -15
- package/dist/services/MappedRouteGateway.mjs +15 -20
- package/dist/services/MappedRouteGateway.mjs.map +1 -1
- package/dist/services/RouteGateway.mjs +15 -20
- package/dist/services/ViewRouteGateway.mjs +17 -22
- package/dist/services/ViewRouteGateway.mjs.map +1 -1
- package/dist/sql/Column.mjs +3 -8
- package/dist/sql/Table.mjs +3 -8
- package/dist/sql/Table.mjs.map +1 -1
- package/dist/sql/TableGateway.mjs +4 -9
- package/dist/sql/TableGateway.mjs.map +1 -1
- package/dist/types/CacheAge.mjs +4 -9
- package/dist/types/Case.d.ts +16 -0
- package/dist/types/Case.mjs +2 -7
- package/dist/types/Context.mjs +6 -2
- package/dist/types/Exception.mjs +4 -2
- package/dist/types/Gateway.mjs +4 -3
- package/dist/types/IsEqual.mjs +3 -8
- package/dist/types/Number.mjs +3 -8
- package/dist/types/PageList.mjs +3 -8
- package/dist/types/Parser.mjs +2 -7
- package/dist/types/Parser.mjs.map +1 -1
- package/dist/types/Repository.mjs +4 -3
- package/dist/types/Result.mjs +6 -3
- package/dist/types/Results.mjs +6 -4
- package/dist/types/Template.d.ts +1 -0
- package/dist/types/Template.mjs +6 -1
- package/dist/types/ToText.mjs +6 -1
- package/dist/types/Try.mjs +2 -7
- package/dist/types/Uri.mjs +3 -9
- package/dist/types/Uri.mjs.map +1 -1
- package/dist/utils/Sentence.mjs +6 -1
- package/dist/utils/Sentence.mjs.map +1 -1
- package/dist/utils/View.mjs +5 -10
- package/dist/validation/Contraints.mjs +3 -8
- package/dist/validation/Validate.mjs +2 -7
- package/dist/validation/When.mjs +2 -7
- package/package.json +1 -1
- package/src/types/Case.ts +12 -0
- package/src/types/Template.ts +7 -3
- package/src/types/ToText.ts +1 -1
- package/dist/chunk-6JA2EI2T.mjs +0 -20
- package/dist/chunk-6JA2EI2T.mjs.map +0 -1
- package/dist/chunk-HTHNHACU.mjs +0 -94
- package/dist/chunk-HTHNHACU.mjs.map +0 -1
- package/dist/chunk-MIYBZDW6.mjs +0 -35
- package/dist/chunk-MIYBZDW6.mjs.map +0 -1
- package/dist/chunk-SOUOSMQ6.mjs +0 -165
- package/dist/chunk-SOUOSMQ6.mjs.map +0 -1
- package/dist/chunk-VTEGCABM.mjs +0 -40
- package/dist/chunk-VTEGCABM.mjs.map +0 -1
- package/dist/chunk-WIQKEALP.mjs +0 -324
- package/dist/chunk-WIQKEALP.mjs.map +0 -1
- /package/dist/{chunk-OOWOFPDC.mjs.map → chunk-4TGUPVQN.mjs.map} +0 -0
- /package/dist/{chunk-DY33LKDP.mjs.map → chunk-BZNMKX6O.mjs.map} +0 -0
- /package/dist/{chunk-6RSZTLCP.mjs.map → chunk-ESECEXXM.mjs.map} +0 -0
- /package/dist/{chunk-PZFHPGDR.mjs.map → chunk-FCJ4TDW7.mjs.map} +0 -0
- /package/dist/{chunk-6PR3OZQP.mjs.map → chunk-H7NA23T6.mjs.map} +0 -0
- /package/dist/{chunk-UNU355PL.mjs.map → chunk-I5VS3NUO.mjs.map} +0 -0
- /package/dist/{chunk-DV7PHOM6.mjs.map → chunk-JSALAKCR.mjs.map} +0 -0
- /package/dist/{chunk-QSB4QYYE.mjs.map → chunk-KTK2V5FC.mjs.map} +0 -0
- /package/dist/{chunk-5O2BGB5V.mjs.map → chunk-LAY4XDIL.mjs.map} +0 -0
- /package/dist/{chunk-PIZ7IORV.mjs.map → chunk-LP2MEIWU.mjs.map} +0 -0
- /package/dist/{chunk-X24AKSPO.mjs.map → chunk-PCKGK5AF.mjs.map} +0 -0
- /package/dist/{chunk-3BJH75JQ.mjs.map → chunk-PQTYEEZC.mjs.map} +0 -0
- /package/dist/{chunk-PKA5XEUC.mjs.map → chunk-R6UXMGTJ.mjs.map} +0 -0
- /package/dist/{chunk-TYH6CVJL.mjs.map → chunk-RBGF26S7.mjs.map} +0 -0
- /package/dist/{chunk-GJL7E2EJ.mjs.map → chunk-TPGAM536.mjs.map} +0 -0
- /package/dist/{chunk-2MNT7B4T.mjs.map → chunk-UYBPL7PM.mjs.map} +0 -0
- /package/dist/{chunk-HI2JE5PJ.mjs.map → chunk-XAIZBTVQ.mjs.map} +0 -0
package/dist/chunk-WIQKEALP.mjs
DELETED
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isValidatable
|
|
3
|
-
} from "./chunk-OFGI5FLG.mjs";
|
|
4
|
-
import {
|
|
5
|
-
isResults,
|
|
6
|
-
toResults
|
|
7
|
-
} from "./chunk-MIYBZDW6.mjs";
|
|
8
|
-
import {
|
|
9
|
-
toResult
|
|
10
|
-
} from "./chunk-6JA2EI2T.mjs";
|
|
11
|
-
import {
|
|
12
|
-
reject,
|
|
13
|
-
resolve
|
|
14
|
-
} from "./chunk-2EJYJ4HI.mjs";
|
|
15
|
-
import {
|
|
16
|
-
Exception
|
|
17
|
-
} from "./chunk-VTEGCABM.mjs";
|
|
18
|
-
import {
|
|
19
|
-
isValue
|
|
20
|
-
} from "./chunk-WSBULPUZ.mjs";
|
|
21
|
-
import {
|
|
22
|
-
text
|
|
23
|
-
} from "./chunk-SOUOSMQ6.mjs";
|
|
24
|
-
import {
|
|
25
|
-
isEnum
|
|
26
|
-
} from "./chunk-AG3P2RCU.mjs";
|
|
27
|
-
import {
|
|
28
|
-
meta
|
|
29
|
-
} from "./chunk-MK2UX4IH.mjs";
|
|
30
|
-
import {
|
|
31
|
-
toList
|
|
32
|
-
} from "./chunk-HOVTNDHS.mjs";
|
|
33
|
-
import {
|
|
34
|
-
toArray
|
|
35
|
-
} from "./chunk-CO2AFYVD.mjs";
|
|
36
|
-
import {
|
|
37
|
-
asString
|
|
38
|
-
} from "./chunk-BDA5LB4S.mjs";
|
|
39
|
-
import {
|
|
40
|
-
ofGet
|
|
41
|
-
} from "./chunk-SJGQU3OG.mjs";
|
|
42
|
-
import {
|
|
43
|
-
ofConstruct,
|
|
44
|
-
toName
|
|
45
|
-
} from "./chunk-ZPNFXK7Y.mjs";
|
|
46
|
-
import {
|
|
47
|
-
isArray,
|
|
48
|
-
isDefined,
|
|
49
|
-
isEmpty,
|
|
50
|
-
isFunction,
|
|
51
|
-
isIn,
|
|
52
|
-
isTrue
|
|
53
|
-
} from "./chunk-DEJ7A5PY.mjs";
|
|
54
|
-
|
|
55
|
-
// src/types/Try.ts
|
|
56
|
-
var Try = class _Try {
|
|
57
|
-
is = {
|
|
58
|
-
defined: (prop) => this.filter((v) => isDefined(prop ? prop(v) : v)),
|
|
59
|
-
empty: (prop) => this.filter((v) => isEmpty(prop ? prop(v) : v)),
|
|
60
|
-
valid: (prop) => this.filter((v) => validate(prop ? prop(v) : v).isValid),
|
|
61
|
-
true: (prop) => this.filter((v) => isTrue(prop ? prop(v) : v)),
|
|
62
|
-
false: (prop) => this.filter((v) => !isTrue(prop ? prop(v) : v)),
|
|
63
|
-
not: {
|
|
64
|
-
defined: (prop) => this.filter((v) => !isDefined(prop ? prop(v) : v)),
|
|
65
|
-
empty: (prop) => this.filter((v) => !isEmpty(prop ? prop(v) : v)),
|
|
66
|
-
valid: (prop) => this.filter((v) => !validate(prop ? prop(v) : v).isValid)
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
if = this.is;
|
|
70
|
-
static of = (c, ...args) => {
|
|
71
|
-
try {
|
|
72
|
-
const out = ofGet(c, ...args);
|
|
73
|
-
return new Success(out instanceof _Try ? out.value : out);
|
|
74
|
-
} catch (e) {
|
|
75
|
-
return new Failure(e);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
var Success = class extends Try {
|
|
80
|
-
constructor(value) {
|
|
81
|
-
super();
|
|
82
|
-
this.value = value;
|
|
83
|
-
}
|
|
84
|
-
get error() {
|
|
85
|
-
throw new Error("No error found");
|
|
86
|
-
}
|
|
87
|
-
get isValid() {
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
map(f) {
|
|
91
|
-
return tryTo(f, this.value);
|
|
92
|
-
}
|
|
93
|
-
recover(f) {
|
|
94
|
-
return this;
|
|
95
|
-
}
|
|
96
|
-
recoverFrom(type, f) {
|
|
97
|
-
return this;
|
|
98
|
-
}
|
|
99
|
-
accept(f) {
|
|
100
|
-
return tryTo(() => {
|
|
101
|
-
f(this.value);
|
|
102
|
-
return this;
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
filter(predicate) {
|
|
106
|
-
return tryTo(() => {
|
|
107
|
-
if (predicate(this.value))
|
|
108
|
-
return this;
|
|
109
|
-
throw new Error(`Applying filter(${predicate.toString()}) failed.`);
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
or(value) {
|
|
113
|
-
return this.value;
|
|
114
|
-
}
|
|
115
|
-
orElse(value) {
|
|
116
|
-
return this.value;
|
|
117
|
-
}
|
|
118
|
-
orThrow(_error) {
|
|
119
|
-
return this.value;
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
var Failure = class _Failure extends Try {
|
|
123
|
-
constructor(error) {
|
|
124
|
-
super();
|
|
125
|
-
this.error = error;
|
|
126
|
-
}
|
|
127
|
-
get value() {
|
|
128
|
-
throw this.error;
|
|
129
|
-
}
|
|
130
|
-
get isValid() {
|
|
131
|
-
return false;
|
|
132
|
-
}
|
|
133
|
-
map(f) {
|
|
134
|
-
return new _Failure(this.error);
|
|
135
|
-
}
|
|
136
|
-
recover(f) {
|
|
137
|
-
return tryTo(f, this.error);
|
|
138
|
-
}
|
|
139
|
-
recoverFrom(type, f) {
|
|
140
|
-
return tryTo(() => this.error instanceof type ? this.recover(f) : this);
|
|
141
|
-
}
|
|
142
|
-
accept(f) {
|
|
143
|
-
return this;
|
|
144
|
-
}
|
|
145
|
-
filter(predicate) {
|
|
146
|
-
return this;
|
|
147
|
-
}
|
|
148
|
-
or(value) {
|
|
149
|
-
return ofGet(value);
|
|
150
|
-
}
|
|
151
|
-
orElse(value) {
|
|
152
|
-
return ofGet(value);
|
|
153
|
-
}
|
|
154
|
-
orThrow(error) {
|
|
155
|
-
throw ofConstruct(error);
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
var tryTo = (c, ...args) => Try.of(c, ...args);
|
|
159
|
-
|
|
160
|
-
// src/types/Case.ts
|
|
161
|
-
var CaseBuilder = class {
|
|
162
|
-
constructor(v) {
|
|
163
|
-
this.v = v;
|
|
164
|
-
}
|
|
165
|
-
is = {
|
|
166
|
-
defined: (prop, out) => new Case(this.v).case(isDefined(prop(this.v)), out),
|
|
167
|
-
empty: (prop, out) => new Case(this.v).case(isEmpty(prop(this.v)), out),
|
|
168
|
-
valid: (prop, out) => new Case(this.v).case(validate(prop(this.v)).isValid, out),
|
|
169
|
-
in: (prop, out) => new Case(this.v).case(ofGet(prop, this.v).includes(this.v), out),
|
|
170
|
-
not: {
|
|
171
|
-
defined: (prop, out) => new Case(this.v).case(!isDefined(prop(this.v)), out),
|
|
172
|
-
empty: (prop, out) => new Case(this.v).case(!isEmpty(prop(this.v)), out),
|
|
173
|
-
valid: (prop, out) => new Case(this.v).case(!validate(prop(this.v)).isValid, out),
|
|
174
|
-
in: (prop, out) => new Case(this.v).case(!ofGet(prop, this.v).includes(this.v), out)
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
if = this.is;
|
|
178
|
-
case(pred, out) {
|
|
179
|
-
return new Case(this.v).case(pred, out);
|
|
180
|
-
}
|
|
181
|
-
type(guard, out) {
|
|
182
|
-
return new Case(this.v).type(guard, out);
|
|
183
|
-
}
|
|
184
|
-
equals(value, out) {
|
|
185
|
-
return new Case(this.v).equals(value, out);
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
var Case = class _Case {
|
|
189
|
-
constructor(value, outcome) {
|
|
190
|
-
this.value = value;
|
|
191
|
-
this.outcome = outcome;
|
|
192
|
-
}
|
|
193
|
-
is = {
|
|
194
|
-
defined: (prop, out) => new _Case(this.value).case(isDefined(prop(this.value)), out),
|
|
195
|
-
empty: (prop, out) => new _Case(this.value).case(isEmpty(prop(this.value)), out),
|
|
196
|
-
valid: (prop, out) => new _Case(this.value).case(validate(prop(this.value)).isValid, out),
|
|
197
|
-
in: (prop, out) => new _Case(this.value).case(ofGet(prop, this.value).includes(this.value), out),
|
|
198
|
-
not: {
|
|
199
|
-
defined: (prop, out) => new _Case(this.value).case(!isDefined(prop(this.value)), out),
|
|
200
|
-
empty: (prop, out) => new _Case(this.value).case(!isEmpty(prop(this.value)), out),
|
|
201
|
-
valid: (prop, out) => new _Case(this.value).case(!validate(prop(this.value)).isValid, out),
|
|
202
|
-
in: (prop, out) => new _Case(this.value).case(!ofGet(prop, this.value).includes(this.value), out)
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
if = this.is;
|
|
206
|
-
case(pred, out) {
|
|
207
|
-
return tryTo(pred, this.value).is.true().map(() => ofGet(out, this.value)).map((res) => new Found(this.value, res)).or(this);
|
|
208
|
-
}
|
|
209
|
-
type(guard, out) {
|
|
210
|
-
return tryTo(guard, this.value).is.true().map(() => out(this.value)).map((res) => new Found(this.value, res)).or(this);
|
|
211
|
-
}
|
|
212
|
-
equals(value, out) {
|
|
213
|
-
return this.case(this.value === value, out);
|
|
214
|
-
}
|
|
215
|
-
else(alt) {
|
|
216
|
-
return ofGet(alt, this.value);
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
var Found = class extends Case {
|
|
220
|
-
constructor(value, outcome) {
|
|
221
|
-
super(value, outcome);
|
|
222
|
-
this.value = value;
|
|
223
|
-
this.outcome = outcome;
|
|
224
|
-
}
|
|
225
|
-
is = {
|
|
226
|
-
defined: (_prop, _out) => this,
|
|
227
|
-
empty: (_prop, _out) => this,
|
|
228
|
-
valid: (_prop, _out) => this,
|
|
229
|
-
in: (_prop, _out) => this,
|
|
230
|
-
not: {
|
|
231
|
-
defined: (_prop, _out) => this,
|
|
232
|
-
empty: (_prop, _out) => this,
|
|
233
|
-
valid: (_prop, _out) => this,
|
|
234
|
-
in: (_prop, _out) => this
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
if = this.is;
|
|
238
|
-
case(pred, out) {
|
|
239
|
-
return this;
|
|
240
|
-
}
|
|
241
|
-
type(guard, out) {
|
|
242
|
-
return this;
|
|
243
|
-
}
|
|
244
|
-
equals(value, out) {
|
|
245
|
-
return this;
|
|
246
|
-
}
|
|
247
|
-
else(alt) {
|
|
248
|
-
return this.outcome;
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
var choose = (value) => new CaseBuilder(value);
|
|
252
|
-
|
|
253
|
-
// src/validation/Validate.ts
|
|
254
|
-
var asResults = (subject, template, options = {}) => toResults(toResult(text(template).parse(subject, options), toName(subject)));
|
|
255
|
-
var validators = (subject) => meta(subject).keys("constraint").reduce((list, vs) => list.add(vs), toList());
|
|
256
|
-
var runValidator = (v, subject) => {
|
|
257
|
-
try {
|
|
258
|
-
const actual = isFunction(subject[v.property]) ? subject[v.property]() : subject[v.property];
|
|
259
|
-
const constraint = v.constraint(actual);
|
|
260
|
-
return isResults(constraint) ? constraint : !constraint ? asResults(subject, v.text, {
|
|
261
|
-
...v,
|
|
262
|
-
actual
|
|
263
|
-
}) : toResults();
|
|
264
|
-
} catch (e) {
|
|
265
|
-
return asResults(subject, asString(e));
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
var constraints = (subject) => validators(subject).map((vs) => runValidator(vs, subject)).reduce((rs, r) => rs.add(...r.results), toResults());
|
|
269
|
-
var validate = (subject) => choose(subject).is.not.defined(
|
|
270
|
-
(s) => s,
|
|
271
|
-
() => toResults("Subject is not defined.")
|
|
272
|
-
).type(isEnum, (e) => e.isValid ? toResults() : asResults(e, "This is not a valid {type}.")).type(isValue, (v) => v.isValid ? toResults() : asResults(v, "This is not a valid {type}.")).type(isArray, (a) => a.map((i) => validate(i)).reduce((rs, r) => rs.add(...r.results), toResults())).type(isValidatable, (v) => constraints(v)).else(toResults());
|
|
273
|
-
var validateReject = (subject) => when(subject).not.isValid.reject();
|
|
274
|
-
var isValid = (t) => validate(t).isValid;
|
|
275
|
-
|
|
276
|
-
// src/validation/When.ts
|
|
277
|
-
var When = class _When {
|
|
278
|
-
constructor(subject, valid = true, results) {
|
|
279
|
-
this.subject = subject;
|
|
280
|
-
this.valid = valid;
|
|
281
|
-
this.results = results;
|
|
282
|
-
}
|
|
283
|
-
get not() {
|
|
284
|
-
return this.clone(!this.valid);
|
|
285
|
-
}
|
|
286
|
-
get and() {
|
|
287
|
-
return this.clone(this.valid);
|
|
288
|
-
}
|
|
289
|
-
get isDefined() {
|
|
290
|
-
return this.clone(this.valid === isDefined(this.subject));
|
|
291
|
-
}
|
|
292
|
-
get isEmpty() {
|
|
293
|
-
return this.clone(this.valid === isEmpty(this.subject));
|
|
294
|
-
}
|
|
295
|
-
get isTrue() {
|
|
296
|
-
return this.clone(this.valid === !!this.subject);
|
|
297
|
-
}
|
|
298
|
-
get isValid() {
|
|
299
|
-
this.results = validate(this.subject);
|
|
300
|
-
return this.clone(this.valid === this.results.isValid);
|
|
301
|
-
}
|
|
302
|
-
isInstance = (c) => this.clone(this.valid === this.subject instanceof c);
|
|
303
|
-
with = (pred) => this.clone(this.valid === ofGet(pred, this.subject));
|
|
304
|
-
contains = (property) => this.clone(this.valid === isDefined(ofGet(property, this.subject)));
|
|
305
|
-
in = (...items) => this.clone(this.valid === isIn(this.subject, toArray(...items)));
|
|
306
|
-
is = (item) => this.clone(this.valid === (this.subject === item));
|
|
307
|
-
reject = (error) => !this.valid ? resolve(this.subject) : reject(ofGet(error, this.subject) ?? this.results ?? Exception.Unknown);
|
|
308
|
-
recover = (f) => resolve(!this.valid ? this.subject : f(this.subject));
|
|
309
|
-
clone = (result = true) => new _When(this.subject, result, this.results);
|
|
310
|
-
};
|
|
311
|
-
var when = (subject) => new When(subject);
|
|
312
|
-
|
|
313
|
-
export {
|
|
314
|
-
When,
|
|
315
|
-
when,
|
|
316
|
-
asResults,
|
|
317
|
-
validate,
|
|
318
|
-
validateReject,
|
|
319
|
-
isValid,
|
|
320
|
-
Try,
|
|
321
|
-
tryTo,
|
|
322
|
-
choose
|
|
323
|
-
};
|
|
324
|
-
//# sourceMappingURL=chunk-WIQKEALP.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/Try.ts","../src/types/Case.ts","../src/validation/Validate.ts","../src/validation/When.ts"],"sourcesContent":["import { isDefined, isEmpty, isTrue } from './Is';\nimport { validate } from '../validation/Validate';\nimport { Construct, Constructor, ofConstruct } from './Constructor';\nimport { Validatable } from './Validatable';\nimport { Get, ofGet } from './Get';\nimport { Func } from './Func';\nimport { Optional } from './Types';\n\nexport abstract class Try<T = unknown> implements Validatable {\n is = {\n defined: (prop?: Func<unknown, T>): Try<T> => this.filter(v => isDefined(prop ? prop(v) : v)),\n empty: (prop?: Func<unknown, T>): Try<T> => this.filter(v => isEmpty(prop ? prop(v) : v)),\n valid: (prop?: Func<unknown, T>): Try<T> => this.filter(v => validate(prop ? prop(v) : v).isValid),\n true: (prop?: Func<unknown, T>): Try<T> => this.filter(v => isTrue(prop ? prop(v) : v)),\n false: (prop?: Func<unknown, T>): Try<T> => this.filter(v => !isTrue(prop ? prop(v) : v)),\n not: {\n defined: (prop?: Func<unknown, T>): Try<T> => this.filter(v => !isDefined(prop ? prop(v) : v)),\n empty: (prop?: Func<unknown, T>): Try<T> => this.filter(v => !isEmpty(prop ? prop(v) : v)),\n valid: (prop?: Func<unknown, T>): Try<T> => this.filter(v => !validate(prop ? prop(v) : v).isValid),\n },\n };\n\n if = this.is;\n\n abstract get value(): T;\n\n abstract get error(): Error;\n\n abstract get isValid(): boolean;\n\n static of = <T>(c: Get<T | Try<T>>, ...args: unknown[]): Try<T> => {\n try {\n const out = ofGet(c, ...args);\n return new Success(out instanceof Try ? out.value : out);\n } catch (e) {\n return new Failure(e as Error);\n }\n };\n\n abstract map<U>(f: Func<U | Try<U>, T>): Try<U>;\n\n abstract recover(f: Func<T | Try<T>, Error>): Try<T>;\n\n abstract recoverFrom(type: Constructor<Error>, f: Func<T | Try<T>, Error>): Try<T>;\n\n abstract accept(f: Func<void, T>): Try<T>;\n\n abstract filter(predicate: Func<boolean, T>): Try<T>;\n\n abstract or(value: Get<T>): T;\n\n abstract orElse(value?: Get<T>): Optional<T>;\n\n abstract orThrow(error: Construct<Error>): T;\n}\n\nclass Success<T> extends Try<T> {\n constructor(readonly value: T) {\n super();\n }\n\n get error(): Error {\n throw new Error('No error found');\n }\n\n get isValid(): boolean {\n return true;\n }\n\n map<U>(f: Func<U | Try<U>, T>): Try<U> {\n return tryTo<U>(f, this.value);\n }\n\n recover(f: Func<T | Try<T>, Error>): Try<T> {\n return this;\n }\n\n recoverFrom(type: Constructor<Error>, f: Func<T | Try<T>, Error>): Try<T> {\n return this;\n }\n\n accept(f: Func<void, T>): Try<T> {\n return tryTo(() => {\n f(this.value);\n return this;\n });\n }\n\n filter(predicate: Func<boolean, T>): Try<T> {\n return tryTo(() => {\n if (predicate(this.value)) return this;\n throw new Error(`Applying filter(${predicate.toString()}) failed.`);\n });\n }\n\n or(value: Get<T>): T {\n return this.value;\n }\n\n orElse(value?: Get<T>): Optional<T> {\n return this.value;\n }\n\n orThrow(_error: Construct<Error>): T {\n return this.value;\n }\n}\n\nclass Failure<T> extends Try<T> {\n constructor(readonly error: Error) {\n super();\n }\n\n get value(): T {\n throw this.error;\n }\n\n get isValid(): boolean {\n return false;\n }\n\n map<U>(f: Func<U | Try<U>, T>): Try<U> {\n return new Failure<U>(this.error);\n }\n\n recover<U>(f: Func<U | Try<U>, Error>): Try<U> {\n return tryTo<U>(f, this.error);\n }\n\n recoverFrom<U>(type: Constructor<Error>, f: Func<T | Try<T>, Error>): Try<T> {\n return tryTo(() => (this.error instanceof type ? this.recover(f) : this));\n }\n\n accept(f: Func<void, T>): Try<T> {\n return this;\n }\n\n filter(predicate: Func<boolean, T>): Try<T> {\n return this;\n }\n\n or(value: Get<T>): T {\n return ofGet(value);\n }\n\n orElse(value?: Get<T>): Optional<T> {\n return ofGet(value);\n }\n\n orThrow(error: Construct<Error>): T {\n throw ofConstruct(error);\n }\n}\n\nexport const tryTo = <T>(c: Get<T | Try<T>>, ...args: unknown[]) => Try.of<T>(c, ...args);\n","import { Get, ofGet, Predicate } from './Get';\nimport { TypeGuard } from './TypeGuard';\nimport { Func } from './Func';\nimport { isDefined, isEmpty } from './Is';\nimport { validate } from '../validation/Validate';\nimport { tryTo } from './Try';\n\nclass CaseBuilder<V> {\n is = {\n defined: <T>(prop: Func<unknown, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.v).case(isDefined(prop(this.v)), out),\n empty: <T>(prop: Func<unknown, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.v).case(isEmpty(prop(this.v)), out),\n valid: <T>(prop: Func<unknown, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.v).case(validate(prop(this.v)).isValid, out),\n in: <T>(prop: Get<Array<V>, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.v).case(ofGet(prop, this.v).includes(this.v), out),\n not: {\n defined: <T>(prop: Func<unknown, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.v).case(!isDefined(prop(this.v)), out),\n empty: <T>(prop: Func<unknown, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.v).case(!isEmpty(prop(this.v)), out),\n valid: <T>(prop: Func<unknown, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.v).case(!validate(prop(this.v)).isValid, out),\n in: <T>(prop: Get<Array<V>, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.v).case(!ofGet(prop, this.v).includes(this.v), out),\n },\n };\n if = this.is;\n\n constructor(readonly v: V) {}\n\n case<T>(pred: Predicate<V>, out: Get<T, V>): Case<T, V> {\n return new Case<T, V>(this.v).case(pred, out);\n }\n\n type<T, U = unknown>(guard: TypeGuard<U>, out: Func<T, U>): Case<T, V> {\n return new Case<T, V>(this.v).type<U>(guard, out);\n }\n\n equals<T>(value: V, out: Get<T, V>): Case<T, V> {\n return new Case<T, V>(this.v).equals(value, out);\n }\n}\n\nclass Case<T, V = unknown> {\n is = {\n defined: (prop: Func<unknown, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.value).case(isDefined(prop(this.value)), out),\n empty: (prop: Func<unknown, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.value).case(isEmpty(prop(this.value)), out),\n valid: (prop: Func<unknown, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.value).case(validate(prop(this.value)).isValid, out),\n in: (prop: Get<Array<V>, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.value).case(ofGet(prop, this.value).includes(this.value), out),\n not: {\n defined: (prop: Func<unknown, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.value).case(!isDefined(prop(this.value)), out),\n empty: (prop: Func<unknown, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.value).case(!isEmpty(prop(this.value)), out),\n valid: (prop: Func<unknown, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.value).case(!validate(prop(this.value)).isValid, out),\n in: (prop: Get<Array<V>, V>, out: Get<T, V>): Case<T, V> => new Case<T, V>(this.value).case(!ofGet(prop, this.value).includes(this.value), out),\n },\n };\n if = this.is;\n\n constructor(\n protected value: V,\n protected outcome?: T\n ) {}\n\n case(pred: Predicate<V>, out: Get<T, V>): Case<T, V> {\n return tryTo(pred, this.value)\n .is.true()\n .map(() => ofGet(out, this.value))\n .map(res => new Found(this.value, res) as Case<T, V>)\n .or(this);\n }\n\n type<U>(guard: TypeGuard<U>, out: Func<T, U>): Case<T, V> {\n return tryTo(guard, this.value)\n .is.true()\n .map(() => out(this.value as unknown as U))\n .map(res => new Found(this.value, res) as Case<T, V>)\n .or(this);\n }\n\n equals(value: V, out: Get<T, V>): Case<T, V> {\n return this.case(this.value === value, out);\n }\n\n else(alt: Get<T, V>): T {\n return ofGet<T, V>(alt, this.value);\n }\n}\n\nclass Found<T, V> extends Case<T, V> {\n is = {\n defined: (_prop: Func<unknown, V>, _out: Get<T, V>): Case<T, V> => this,\n empty: (_prop: Func<unknown, V>, _out: Get<T, V>): Case<T, V> => this,\n valid: (_prop: Func<unknown, V>, _out: Get<T, V>): Case<T, V> => this,\n in: (_prop: Get<Array<V>, V>, _out: Get<T, V>): Case<T, V> => this,\n not: {\n defined: (_prop: Func<unknown, V>, _out: Get<T, V>): Case<T, V> => this,\n empty: (_prop: Func<unknown, V>, _out: Get<T, V>): Case<T, V> => this,\n valid: (_prop: Func<unknown, V>, _out: Get<T, V>): Case<T, V> => this,\n in: (_prop: Get<unknown, V>, _out: Get<T, V>): Case<T, V> => this,\n },\n };\n if = this.is;\n\n constructor(\n protected value: V,\n protected outcome: T\n ) {\n super(value, outcome);\n }\n\n case(pred: Predicate<V>, out: Get<T, V>): this {\n return this;\n }\n\n type<U>(guard: TypeGuard<U>, out: Func<T, U>): Case<T, V> {\n return this;\n }\n\n equals(value: V, out: Get<T, V>): Case<T, V> {\n return this;\n }\n\n else(alt: Get<T, V>): T {\n return this.outcome;\n }\n}\n\nexport const choose = <V>(value: V) => new CaseBuilder<V>(value);\n","import { Constraint } from './Contraints';\nimport { when } from './When';\nimport type { TemplateOptions } from '../types/Template';\nimport { isResults, Results, toResults } from '../types/Results';\nimport { toName } from '../types/Constructor';\nimport { toResult } from '../types/Result';\nimport { List, toList } from '../types/List';\nimport { meta } from '../types/Meta';\nimport { isArray, isFunction } from '../types/Is';\nimport type { Text } from '../types/Text';\nimport { asString } from '../types/Text';\nimport { choose } from '../types/Case';\nimport { isEnum } from '../types/Enum';\nimport { isValue } from '../types/Value';\nimport { isValidatable } from '../types/Validatable';\nimport { text } from '../types/ToText';\n\nexport type Validator = { property: string | symbol; constraint: Constraint; text: Text; actual?: Text };\n\nexport const asResults = (subject: unknown, template: Text, options: TemplateOptions = {}): Results =>\n toResults(toResult(text(template).parse(subject, options), toName(subject)));\n\nconst validators = (subject: unknown): List<Validator> =>\n meta(subject)\n .keys<List<Validator>>('constraint')\n .reduce((list, vs) => list.add(vs), toList<Validator>());\n\nconst runValidator = (v: Validator, subject?: unknown): Results => {\n try {\n const actual = isFunction((subject as any)[v.property]) ? (subject as any)[v.property]() : (subject as any)[v.property];\n const constraint = v.constraint(actual);\n return isResults(constraint)\n ? constraint\n : !constraint\n ? asResults(subject, v.text, {\n ...v,\n actual,\n })\n : toResults();\n } catch (e) {\n return asResults(subject, asString(e));\n }\n};\n\nconst constraints = (subject?: unknown): Results =>\n validators(subject)\n .map(vs => runValidator(vs, subject))\n .reduce((rs, r) => rs.add(...r.results), toResults());\n\nexport const validate = (subject?: unknown): Results =>\n choose(subject)\n .is.not.defined(\n s => s,\n () => toResults('Subject is not defined.')\n )\n .type(isEnum, e => (e.isValid ? toResults() : asResults(e, 'This is not a valid {type}.')))\n .type(isValue, v => (v.isValid ? toResults() : asResults(v, 'This is not a valid {type}.')))\n .type(isArray, a => a.map(i => validate(i)).reduce((rs, r) => rs.add(...r.results), toResults()))\n .type(isValidatable, v => constraints(v))\n .else(toResults());\n\nexport const validateReject = <T>(subject: T): Promise<T> => when(subject).not.isValid.reject();\n\nexport const isValid = <T>(t: T): boolean => validate(t).isValid;\n","import { validate } from './Validate';\nimport { Results } from '../types/Results';\nimport { Constructor } from '../types/Constructor';\nimport { Get, ofGet, Predicate } from '../types/Get';\nimport { isDefined, isEmpty, isIn } from '../types/Is';\nimport { toArray } from '../types/Array';\nimport { ErrorOrigin } from '../types/ErrorOrigin';\nimport { reject, resolve } from '../utils/Promise';\nimport { Exception } from '../types/Exception';\n\nexport class When<W> {\n constructor(\n readonly subject: W,\n readonly valid = true,\n private results?: Results\n ) {}\n\n get not(): When<W> {\n return this.clone(!this.valid);\n }\n\n get and(): When<W> {\n return this.clone(this.valid);\n }\n\n get isDefined(): When<W> {\n return this.clone(this.valid === isDefined(this.subject));\n }\n\n get isEmpty(): When<W> {\n return this.clone(this.valid === isEmpty(this.subject));\n }\n\n get isTrue(): When<W> {\n return this.clone(this.valid === !!this.subject);\n }\n\n get isValid(): When<W> {\n this.results = validate(this.subject);\n return this.clone(this.valid === this.results.isValid);\n }\n\n isInstance = <U>(c: Constructor<U>): When<W> => this.clone(this.valid === this.subject instanceof c);\n\n with = (pred: Predicate<W>): When<W> => this.clone(this.valid === ofGet(pred, this.subject));\n\n contains = (property: (w: W) => unknown): When<W> => this.clone(this.valid === isDefined(ofGet(property, this.subject)));\n\n in = (...items: W[]): When<W> => this.clone(this.valid === isIn(this.subject, toArray(...items)));\n\n is = (item: W): When<W> => this.clone(this.valid === (this.subject === item));\n\n reject = (error?: Get<ErrorOrigin, W>): Promise<NonNullable<W>> =>\n !this.valid ? resolve(this.subject as NonNullable<W>) : reject(ofGet(error, this.subject) ?? this.results ?? Exception.Unknown);\n\n recover = (f: (item: W) => W | Promise<W>): Promise<W> => resolve(!this.valid ? this.subject : f(this.subject));\n\n protected clone = (result = true): When<W> => new When(this.subject, result, this.results);\n}\n\nexport const when = <T>(subject: T): When<T> => new When<T>(subject);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,IAAe,MAAf,MAAe,KAAwC;AAAA,EAC5D,KAAK;AAAA,IACH,SAAS,CAAC,SAAoC,KAAK,OAAO,OAAK,UAAU,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;AAAA,IAC5F,OAAO,CAAC,SAAoC,KAAK,OAAO,OAAK,QAAQ,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;AAAA,IACxF,OAAO,CAAC,SAAoC,KAAK,OAAO,OAAK,SAAS,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO;AAAA,IACjG,MAAM,CAAC,SAAoC,KAAK,OAAO,OAAK,OAAO,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;AAAA,IACtF,OAAO,CAAC,SAAoC,KAAK,OAAO,OAAK,CAAC,OAAO,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;AAAA,IACxF,KAAK;AAAA,MACH,SAAS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AU,KAAK,OAAO,CAAC,CAAC;AAAA,EAEvH,KAAK,IAAI,UAAwB,KAAK,MAAM,KAAK,UAAU,KAAK,KAAK,SAAS,QAAQ,GAAG,KAAK,CAAC,CAAC;AAAA,EAEhG,KAAK,CAAC,SAAqB,KAAK,MAAM,KAAK,WAAW,KAAK,YAAY,KAAK;AAAA,EAE5E,SAAS,CAAC,UACR,CAAC,KAAK,QAAQ,QAAQ,KAAK,OAAyB,IAAI,OAAO,MAAM,OAAO,KAAK,OAAO,KAAK,KAAK,WAAW,UAAU,OAAO;AAAA,EAEhI,UAAU,CAAC,MAA+C,QAAQ,CAAC,KAAK,QAAQ,KAAK,UAAU,EAAE,KAAK,OAAO,CAAC;AAAA,EAEpG,QAAQ,CAAC,SAAS,SAAkB,IAAI,MAAK,KAAK,SAAS,QAAQ,KAAK,OAAO;AAC3F;AAEO,IAAM,OAAO,CAAI,YAAwB,IAAI,KAAQ,OAAO;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|