@thisisagile/easy 17.6.0 → 17.6.2

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.
Files changed (40) hide show
  1. package/dist/{chunk-4RHR5J2N.mjs → chunk-2ZIFO363.mjs} +3 -3
  2. package/dist/{chunk-CSEVYUPK.mjs → chunk-B7RWVAEG.mjs} +2 -2
  3. package/dist/{chunk-Q4GYT3FA.mjs → chunk-HQ4HUGLS.mjs} +5 -5
  4. package/dist/{chunk-72IT525V.mjs → chunk-HTPE5F6P.mjs} +2 -2
  5. package/dist/{chunk-UMQFIOUX.mjs → chunk-MGOP5OUJ.mjs} +2 -2
  6. package/dist/chunk-MGOP5OUJ.mjs.map +1 -0
  7. package/dist/{chunk-Y7XPAK4U.mjs → chunk-OL3MQDKV.mjs} +4 -4
  8. package/dist/{chunk-KYC6CVNG.mjs → chunk-SS76SLU3.mjs} +4 -4
  9. package/dist/{chunk-ELFLLZ7X.mjs → chunk-U5KZYPIQ.mjs} +3 -3
  10. package/dist/{chunk-3WD6JBGG.mjs → chunk-UY4TQQ3S.mjs} +4 -4
  11. package/dist/{chunk-UKW4RZRQ.mjs → chunk-XUUI44GG.mjs} +4 -4
  12. package/dist/domain/Audit.mjs +3 -3
  13. package/dist/domain/Child.mjs +2 -2
  14. package/dist/domain/DateTime.d.ts +4 -2
  15. package/dist/domain/DateTime.mjs +1 -1
  16. package/dist/domain/Entity.mjs +7 -7
  17. package/dist/http/RequestOptions.mjs +2 -2
  18. package/dist/http/RestResult.mjs +2 -2
  19. package/dist/http/toResponse.mjs +3 -3
  20. package/dist/index.js +1 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/services/Api.mjs +8 -8
  23. package/dist/services/ApiGateway.mjs +10 -10
  24. package/dist/services/AxiosProvider.mjs +7 -7
  25. package/dist/services/MappedRouteGateway.mjs +12 -12
  26. package/dist/services/RouteGateway.mjs +11 -11
  27. package/dist/services/ViewRouteGateway.mjs +13 -13
  28. package/dist/utils/View.mjs +2 -2
  29. package/package.json +2 -2
  30. package/src/domain/DateTime.ts +4 -2
  31. package/dist/chunk-UMQFIOUX.mjs.map +0 -1
  32. /package/dist/{chunk-4RHR5J2N.mjs.map → chunk-2ZIFO363.mjs.map} +0 -0
  33. /package/dist/{chunk-CSEVYUPK.mjs.map → chunk-B7RWVAEG.mjs.map} +0 -0
  34. /package/dist/{chunk-Q4GYT3FA.mjs.map → chunk-HQ4HUGLS.mjs.map} +0 -0
  35. /package/dist/{chunk-72IT525V.mjs.map → chunk-HTPE5F6P.mjs.map} +0 -0
  36. /package/dist/{chunk-Y7XPAK4U.mjs.map → chunk-OL3MQDKV.mjs.map} +0 -0
  37. /package/dist/{chunk-KYC6CVNG.mjs.map → chunk-SS76SLU3.mjs.map} +0 -0
  38. /package/dist/{chunk-ELFLLZ7X.mjs.map → chunk-U5KZYPIQ.mjs.map} +0 -0
  39. /package/dist/{chunk-3WD6JBGG.mjs.map → chunk-UY4TQQ3S.mjs.map} +0 -0
  40. /package/dist/{chunk-UKW4RZRQ.mjs.map → chunk-XUUI44GG.mjs.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ApiGateway
3
- } from "./chunk-72IT525V.mjs";
3
+ } from "./chunk-HTPE5F6P.mjs";
4
4
  import {
5
5
  Api
6
- } from "./chunk-ELFLLZ7X.mjs";
6
+ } from "./chunk-U5KZYPIQ.mjs";
7
7
  import {
8
8
  HttpStatus
9
9
  } from "./chunk-X4BA7IPG.mjs";
@@ -54,4 +54,4 @@ var RouteGateway = class extends ApiGateway {
54
54
  export {
55
55
  RouteGateway
56
56
  };
57
- //# sourceMappingURL=chunk-4RHR5J2N.mjs.map
57
+ //# sourceMappingURL=chunk-2ZIFO363.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rest
3
- } from "./chunk-3WD6JBGG.mjs";
3
+ } from "./chunk-UY4TQQ3S.mjs";
4
4
  import {
5
5
  toHttpStatus
6
6
  } from "./chunk-X4BA7IPG.mjs";
@@ -17,4 +17,4 @@ function toResponse(status, body, headers) {
17
17
  export {
18
18
  toResponse
19
19
  };
20
- //# sourceMappingURL=chunk-CSEVYUPK.mjs.map
20
+ //# sourceMappingURL=chunk-B7RWVAEG.mjs.map
@@ -4,14 +4,14 @@ import {
4
4
  import {
5
5
  isEqual
6
6
  } from "./chunk-KCUBB5SJ.mjs";
7
- import {
8
- asJson,
9
- json
10
- } from "./chunk-ZC35P7AN.mjs";
11
7
  import {
12
8
  isPageList,
13
9
  toPageList
14
10
  } from "./chunk-EDRJPJG7.mjs";
11
+ import {
12
+ asJson,
13
+ json
14
+ } from "./chunk-ZC35P7AN.mjs";
15
15
  import {
16
16
  choose
17
17
  } from "./chunk-PYCFQMYA.mjs";
@@ -88,4 +88,4 @@ export {
88
88
  view,
89
89
  views
90
90
  };
91
- //# sourceMappingURL=chunk-Q4GYT3FA.mjs.map
91
+ //# sourceMappingURL=chunk-HQ4HUGLS.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api
3
- } from "./chunk-ELFLLZ7X.mjs";
3
+ } from "./chunk-U5KZYPIQ.mjs";
4
4
  import {
5
5
  Gateway
6
6
  } from "./chunk-RAATUPQ2.mjs";
@@ -43,4 +43,4 @@ var ApiGateway = class extends Gateway {
43
43
  export {
44
44
  ApiGateway
45
45
  };
46
- //# sourceMappingURL=chunk-72IT525V.mjs.map
46
+ //# sourceMappingURL=chunk-HTPE5F6P.mjs.map
@@ -114,11 +114,11 @@ var DateTime = class _DateTime extends Value {
114
114
  }
115
115
  };
116
116
  var isDateTime = (dt2) => isDefined(dt2) && dt2 instanceof DateTime;
117
- var dt = (dt2) => isString(dt2) || isNumber(dt2) || dt2 instanceof Date ? new DateTime(dt2) : new DateTime();
117
+ var dt = (dt2) => new DateTime(dt2);
118
118
 
119
119
  export {
120
120
  DateTime,
121
121
  isDateTime,
122
122
  dt
123
123
  };
124
- //# sourceMappingURL=chunk-UMQFIOUX.mjs.map
124
+ //# sourceMappingURL=chunk-MGOP5OUJ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/domain/DateTime.ts"],"sourcesContent":["import { DateTime as LuxonDateTime, DateTimeUnit as LuxonDateTimeUnit, DurationUnit as LuxonDurationUnit, Settings } from 'luxon';\nimport { Value } from '../types/Value';\nimport { Optional } from '../types/Types';\nimport { choose } from '../types/Case';\nimport { isDefined, isNumber, isString } from '../types/Is';\nimport { isDate } from '../types/IsDate';\nimport { isA } from '../types/IsA';\nimport { ifDefined } from '../utils/If';\nimport { JsonValue } from '../types/Json';\nimport { seconds } from '../utils/Seconds';\n\nSettings.defaultZone = 'utc';\n\nexport type DateTimeUnit = LuxonDateTimeUnit;\nexport type DurationUnit = LuxonDurationUnit;\nexport type Duration = Partial<Record<DurationUnit, number>>;\n\nexport type DiffOptions = {\n rounding: 'floor' | 'ceil' | 'round';\n};\n\ntype DatetimeInput = string | number | Date | DateTime | null;\n\nexport class DateTime extends Value<Optional<string>> {\n constructor(value?: DatetimeInput, format?: string) {\n super(\n choose(value)\n .type(isString, v => (format ? LuxonDateTime.fromFormat(v, format, { setZone: true }) : LuxonDateTime.fromISO(v, { setZone: true })))\n .type(isNumber, v => LuxonDateTime.fromMillis(v))\n .type(isDate, v => LuxonDateTime.fromJSDate(v))\n .type(isDateTime, v => LuxonDateTime.fromISO(v.toString()))\n .else(undefined as unknown as LuxonDateTime)\n ?.toISO() as unknown as string\n );\n }\n\n static get now(): DateTime {\n return new DateTime(LuxonDateTime.utc().toISO());\n }\n\n get isValid(): boolean {\n return isDefined(this.value) && this.utc.isValid;\n }\n\n /**\n * @deprecated Deprecated in favor for DateTime.from as that also accepts locales and another DateTime\n */\n get fromNow(): string {\n return this.from();\n }\n\n protected get utc(): LuxonDateTime {\n return this.luxon.setZone('utc');\n }\n\n protected get luxon(): LuxonDateTime {\n return LuxonDateTime.fromISO(this.value as string, { setZone: true });\n }\n\n from(date?: DateTime): string;\n\n from(locale?: string): string;\n\n from(date?: DateTime, locale?: string): string;\n\n from(param?: string | DateTime, other?: string): string {\n const date: Optional<DateTime> = isA<DateTime>(param) ? param : undefined;\n const locale: string = (isString(param) ? param : undefined) ?? other ?? 'en';\n return ifDefined(\n date,\n d => this.utc.setLocale(locale).toRelative({ base: d.utc }),\n () => this.utc.setLocale(locale).toRelative()\n ) as string;\n }\n\n isAfter(dt: DateTime): boolean {\n return this.utc > dt.utc;\n }\n\n isBefore(dt: DateTime): boolean {\n return this.utc < dt.utc;\n }\n\n equals(dt: DateTime): boolean {\n return this.utc.hasSame(dt.utc, 'millisecond');\n }\n\n add(n: number): DateTime;\n add(n: number, unit: DurationUnit): DateTime;\n add(duration: Duration): DateTime;\n add(n: number | Duration, unit?: DurationUnit): DateTime {\n return new DateTime(this.luxon.plus(isNumber(n) ? { [unit ?? ('day' as string)]: n } : n).toISO());\n }\n\n subtract(n: number): DateTime;\n subtract(n: number, unit: DurationUnit): DateTime;\n subtract(duration: Duration): DateTime;\n subtract(n: number | Duration, unit?: DurationUnit): DateTime {\n return new DateTime(this.luxon.minus(isNumber(n) ? { [unit ?? ('day' as string)]: n } : n).toISO());\n }\n\n diff(other: DateTime, unit: DateTimeUnit = 'day', opts?: DiffOptions): number {\n return Math[opts?.rounding ?? 'floor'](this.utc.diff(other.utc).as(unit));\n }\n\n startOf(unit: DateTimeUnit = 'day'): DateTime {\n return new DateTime(this.luxon.startOf(unit).toISO());\n }\n\n endOf(unit: DateTimeUnit = 'day'): DateTime {\n return new DateTime(this.luxon.endOf(unit).toISO());\n }\n\n isWeekend(): boolean {\n return this.luxon.isWeekend;\n }\n\n withZone(zone: string): DateTime {\n return new DateTime(this.utc.setZone(zone).toISO());\n }\n\n toString(): string {\n return this.value ?? '';\n }\n\n toJSON(): JsonValue {\n return this.utc.toISO() as unknown as JsonValue;\n }\n\n toFormat(format: string): string {\n return this.luxon.toFormat(format);\n }\n\n toLocale(locale = 'nl-NL', format = 'D'): string {\n return this.luxon.setLocale(locale).toFormat(format);\n }\n\n toFull(locale?: string): string {\n return this.toLocale(locale, 'DDD');\n }\n\n toDate(): Optional<Date> {\n return this.isValid ? this.utc.toJSDate() : undefined;\n }\n\n toEpoch(): number {\n return this.luxon.toMillis();\n }\n\n ago(end: DateTime = DateTime.now): string {\n return seconds.toText(end.diff(this, 'second'));\n }\n}\n\nexport const isDateTime = (dt?: unknown): dt is DateTime => isDefined(dt) && dt instanceof DateTime;\n\nexport const dt = (dt?: DatetimeInput): DateTime => new DateTime(dt);\n"],"mappings":"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","names":["dt"]}
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  toResponse
3
- } from "./chunk-CSEVYUPK.mjs";
3
+ } from "./chunk-B7RWVAEG.mjs";
4
4
  import {
5
5
  isRestResult
6
- } from "./chunk-3WD6JBGG.mjs";
6
+ } from "./chunk-UY4TQQ3S.mjs";
7
7
  import {
8
8
  HttpStatus
9
9
  } from "./chunk-X4BA7IPG.mjs";
10
10
  import {
11
11
  RequestOptions
12
- } from "./chunk-UKW4RZRQ.mjs";
12
+ } from "./chunk-XUUI44GG.mjs";
13
13
  import {
14
14
  cacheAge
15
15
  } from "./chunk-MZPVOP7K.mjs";
@@ -53,4 +53,4 @@ var AxiosProvider = class {
53
53
  export {
54
54
  AxiosProvider
55
55
  };
56
- //# sourceMappingURL=chunk-Y7XPAK4U.mjs.map
56
+ //# sourceMappingURL=chunk-OL3MQDKV.mjs.map
@@ -2,12 +2,12 @@ import {
2
2
  required,
3
3
  valid
4
4
  } from "./chunk-P3662ZMC.mjs";
5
+ import {
6
+ DateTime
7
+ } from "./chunk-MGOP5OUJ.mjs";
5
8
  import {
6
9
  Struct
7
10
  } from "./chunk-SOF7O67W.mjs";
8
- import {
9
- DateTime
10
- } from "./chunk-UMQFIOUX.mjs";
11
11
  import {
12
12
  choose
13
13
  } from "./chunk-PYCFQMYA.mjs";
@@ -47,4 +47,4 @@ __decorateClass([
47
47
  export {
48
48
  Audit
49
49
  };
50
- //# sourceMappingURL=chunk-KYC6CVNG.mjs.map
50
+ //# sourceMappingURL=chunk-SS76SLU3.mjs.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  AxiosProvider
3
- } from "./chunk-Y7XPAK4U.mjs";
3
+ } from "./chunk-OL3MQDKV.mjs";
4
4
  import {
5
5
  HttpVerb
6
6
  } from "./chunk-TUQP5UB5.mjs";
7
7
  import {
8
8
  RequestOptions,
9
9
  toPageOptions
10
- } from "./chunk-UKW4RZRQ.mjs";
10
+ } from "./chunk-XUUI44GG.mjs";
11
11
 
12
12
  // src/services/Api.ts
13
13
  var Api = class {
@@ -76,4 +76,4 @@ export {
76
76
  Api,
77
77
  api
78
78
  };
79
- //# sourceMappingURL=chunk-ELFLLZ7X.mjs.map
79
+ //# sourceMappingURL=chunk-U5KZYPIQ.mjs.map
@@ -1,10 +1,10 @@
1
- import {
2
- isResponse
3
- } from "./chunk-UYDZZAEK.mjs";
4
1
  import {
5
2
  HttpStatus,
6
3
  isHttpStatus
7
4
  } from "./chunk-X4BA7IPG.mjs";
5
+ import {
6
+ isResponse
7
+ } from "./chunk-UYDZZAEK.mjs";
8
8
  import {
9
9
  choose
10
10
  } from "./chunk-PYCFQMYA.mjs";
@@ -52,4 +52,4 @@ export {
52
52
  rest,
53
53
  isRestResult
54
54
  };
55
- //# sourceMappingURL=chunk-3WD6JBGG.mjs.map
55
+ //# sourceMappingURL=chunk-UY4TQQ3S.mjs.map
@@ -1,12 +1,12 @@
1
+ import {
2
+ HttpHeader
3
+ } from "./chunk-SW2OCUH3.mjs";
1
4
  import {
2
5
  toUuid
3
6
  } from "./chunk-LXQQ5N6S.mjs";
4
7
  import {
5
8
  ContentType
6
9
  } from "./chunk-2F3DQ5ZI.mjs";
7
- import {
8
- HttpHeader
9
- } from "./chunk-SW2OCUH3.mjs";
10
10
  import {
11
11
  ctx
12
12
  } from "./chunk-PWPLESD6.mjs";
@@ -87,4 +87,4 @@ export {
87
87
  RequestOptions,
88
88
  isRequestOptions
89
89
  };
90
- //# sourceMappingURL=chunk-UKW4RZRQ.mjs.map
90
+ //# sourceMappingURL=chunk-XUUI44GG.mjs.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  Audit
3
- } from "../chunk-KYC6CVNG.mjs";
3
+ } from "../chunk-SS76SLU3.mjs";
4
4
  import "../chunk-P3662ZMC.mjs";
5
- import "../chunk-SOF7O67W.mjs";
6
- import "../chunk-UMQFIOUX.mjs";
5
+ import "../chunk-MGOP5OUJ.mjs";
7
6
  import "../chunk-5Z7LG57L.mjs";
8
7
  import "../chunk-ADJAEGCT.mjs";
8
+ import "../chunk-SOF7O67W.mjs";
9
9
  import "../chunk-ZC35P7AN.mjs";
10
10
  import "../chunk-PYCFQMYA.mjs";
11
11
  import "../chunk-OFGI5FLG.mjs";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  toId
3
3
  } from "../chunk-5YM5CLOG.mjs";
4
+ import "../chunk-LXQQ5N6S.mjs";
4
5
  import {
5
6
  required
6
7
  } from "../chunk-P3662ZMC.mjs";
8
+ import "../chunk-ADJAEGCT.mjs";
7
9
  import {
8
10
  Struct
9
11
  } from "../chunk-SOF7O67W.mjs";
10
- import "../chunk-ADJAEGCT.mjs";
11
- import "../chunk-LXQQ5N6S.mjs";
12
12
  import {
13
13
  json
14
14
  } from "../chunk-ZC35P7AN.mjs";
@@ -8,8 +8,9 @@ export type Duration = Partial<Record<DurationUnit, number>>;
8
8
  export type DiffOptions = {
9
9
  rounding: 'floor' | 'ceil' | 'round';
10
10
  };
11
+ type DatetimeInput = string | number | Date | DateTime | null;
11
12
  export declare class DateTime extends Value<Optional<string>> {
12
- constructor(value?: string | number | Date | DateTime | null, format?: string);
13
+ constructor(value?: DatetimeInput, format?: string);
13
14
  static get now(): DateTime;
14
15
  get isValid(): boolean;
15
16
  get fromNow(): string;
@@ -42,4 +43,5 @@ export declare class DateTime extends Value<Optional<string>> {
42
43
  ago(end?: DateTime): string;
43
44
  }
44
45
  export declare const isDateTime: (dt?: unknown) => dt is DateTime;
45
- export declare const dt: (dt?: unknown) => DateTime;
46
+ export declare const dt: (dt?: DatetimeInput) => DateTime;
47
+ export {};
@@ -2,7 +2,7 @@ import {
2
2
  DateTime,
3
3
  dt,
4
4
  isDateTime
5
- } from "../chunk-UMQFIOUX.mjs";
5
+ } from "../chunk-MGOP5OUJ.mjs";
6
6
  import "../chunk-5Z7LG57L.mjs";
7
7
  import "../chunk-ADJAEGCT.mjs";
8
8
  import "../chunk-PYCFQMYA.mjs";
@@ -1,19 +1,19 @@
1
- import {
2
- Audit
3
- } from "../chunk-KYC6CVNG.mjs";
4
1
  import {
5
2
  toId
6
3
  } from "../chunk-5YM5CLOG.mjs";
4
+ import "../chunk-LXQQ5N6S.mjs";
5
+ import {
6
+ Audit
7
+ } from "../chunk-SS76SLU3.mjs";
7
8
  import {
8
9
  required
9
10
  } from "../chunk-P3662ZMC.mjs";
11
+ import "../chunk-MGOP5OUJ.mjs";
12
+ import "../chunk-5Z7LG57L.mjs";
13
+ import "../chunk-ADJAEGCT.mjs";
10
14
  import {
11
15
  Struct
12
16
  } from "../chunk-SOF7O67W.mjs";
13
- import "../chunk-UMQFIOUX.mjs";
14
- import "../chunk-5Z7LG57L.mjs";
15
- import "../chunk-ADJAEGCT.mjs";
16
- import "../chunk-LXQQ5N6S.mjs";
17
17
  import {
18
18
  json
19
19
  } from "../chunk-ZC35P7AN.mjs";
@@ -2,10 +2,10 @@ import {
2
2
  RequestOptions,
3
3
  isRequestOptions,
4
4
  toPageOptions
5
- } from "../chunk-UKW4RZRQ.mjs";
5
+ } from "../chunk-XUUI44GG.mjs";
6
+ import "../chunk-SW2OCUH3.mjs";
6
7
  import "../chunk-LXQQ5N6S.mjs";
7
8
  import "../chunk-2F3DQ5ZI.mjs";
8
- import "../chunk-SW2OCUH3.mjs";
9
9
  import "../chunk-PWPLESD6.mjs";
10
10
  import "../chunk-UFHCKJSE.mjs";
11
11
  import "../chunk-BUCKBXAC.mjs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isRestResult,
3
3
  rest
4
- } from "../chunk-3WD6JBGG.mjs";
5
- import "../chunk-UYDZZAEK.mjs";
4
+ } from "../chunk-UY4TQQ3S.mjs";
6
5
  import "../chunk-X4BA7IPG.mjs";
6
+ import "../chunk-UYDZZAEK.mjs";
7
7
  import "../chunk-PYCFQMYA.mjs";
8
8
  import "../chunk-OFGI5FLG.mjs";
9
9
  import "../chunk-DWBYZF3S.mjs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  toResponse
3
- } from "../chunk-CSEVYUPK.mjs";
4
- import "../chunk-3WD6JBGG.mjs";
5
- import "../chunk-UYDZZAEK.mjs";
3
+ } from "../chunk-B7RWVAEG.mjs";
4
+ import "../chunk-UY4TQQ3S.mjs";
6
5
  import "../chunk-X4BA7IPG.mjs";
6
+ import "../chunk-UYDZZAEK.mjs";
7
7
  import "../chunk-PYCFQMYA.mjs";
8
8
  import "../chunk-OFGI5FLG.mjs";
9
9
  import "../chunk-DWBYZF3S.mjs";
package/dist/index.js CHANGED
@@ -1716,7 +1716,7 @@ var DateTime = class _DateTime extends Value {
1716
1716
  }
1717
1717
  };
1718
1718
  var isDateTime = (dt2) => isDefined(dt2) && dt2 instanceof DateTime;
1719
- var dt = (dt2) => isString(dt2) || isNumber(dt2) || dt2 instanceof Date ? new DateTime(dt2) : new DateTime();
1719
+ var dt = (dt2) => new DateTime(dt2);
1720
1720
 
1721
1721
  // src/validation/Contraints.ts
1722
1722
  var constraint = (c, message) => (subject, property) => {