effect 3.19.2 → 3.19.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.
Files changed (48) hide show
  1. package/dist/cjs/Inspectable.js +86 -4
  2. package/dist/cjs/Inspectable.js.map +1 -1
  3. package/dist/cjs/ParseResult.js +1 -1
  4. package/dist/cjs/ParseResult.js.map +1 -1
  5. package/dist/cjs/Pretty.js +4 -3
  6. package/dist/cjs/Pretty.js.map +1 -1
  7. package/dist/cjs/Schema.js +15 -14
  8. package/dist/cjs/Schema.js.map +1 -1
  9. package/dist/cjs/SchemaAST.js +4 -3
  10. package/dist/cjs/SchemaAST.js.map +1 -1
  11. package/dist/cjs/internal/config.js +10 -9
  12. package/dist/cjs/internal/config.js.map +1 -1
  13. package/dist/cjs/internal/schema/errors.js +6 -5
  14. package/dist/cjs/internal/schema/errors.js.map +1 -1
  15. package/dist/cjs/internal/schema/util.js +3 -77
  16. package/dist/cjs/internal/schema/util.js.map +1 -1
  17. package/dist/cjs/internal/version.js +1 -1
  18. package/dist/dts/Inspectable.d.ts.map +1 -1
  19. package/dist/dts/Pretty.d.ts.map +1 -1
  20. package/dist/dts/Schema.d.ts.map +1 -1
  21. package/dist/dts/SchemaAST.d.ts.map +1 -1
  22. package/dist/esm/Inspectable.js +79 -2
  23. package/dist/esm/Inspectable.js.map +1 -1
  24. package/dist/esm/ParseResult.js +1 -1
  25. package/dist/esm/ParseResult.js.map +1 -1
  26. package/dist/esm/Pretty.js +4 -3
  27. package/dist/esm/Pretty.js.map +1 -1
  28. package/dist/esm/Schema.js +15 -14
  29. package/dist/esm/Schema.js.map +1 -1
  30. package/dist/esm/SchemaAST.js +4 -3
  31. package/dist/esm/SchemaAST.js.map +1 -1
  32. package/dist/esm/internal/config.js +10 -9
  33. package/dist/esm/internal/config.js.map +1 -1
  34. package/dist/esm/internal/schema/errors.js +6 -5
  35. package/dist/esm/internal/schema/errors.js.map +1 -1
  36. package/dist/esm/internal/schema/util.js +2 -72
  37. package/dist/esm/internal/schema/util.js.map +1 -1
  38. package/dist/esm/internal/version.js +1 -1
  39. package/package.json +1 -1
  40. package/src/Inspectable.ts +115 -2
  41. package/src/ParseResult.ts +1 -1
  42. package/src/Pretty.ts +4 -3
  43. package/src/Schema.ts +18 -14
  44. package/src/SchemaAST.ts +4 -3
  45. package/src/internal/config.ts +15 -9
  46. package/src/internal/schema/errors.ts +12 -5
  47. package/src/internal/schema/util.ts +2 -100
  48. package/src/internal/version.ts +1 -1
@@ -24,6 +24,7 @@ import { dual, identity } from "./Function.js";
24
24
  import { globalValue } from "./GlobalValue.js";
25
25
  import * as hashMap_ from "./HashMap.js";
26
26
  import * as hashSet_ from "./HashSet.js";
27
+ import * as Inspectable from "./Inspectable.js";
27
28
  import * as internalCause_ from "./internal/cause.js";
28
29
  import * as errors_ from "./internal/schema/errors.js";
29
30
  import * as schemaId_ from "./internal/schema/schemaId.js";
@@ -3569,8 +3570,8 @@ export const lessThanDate = (max, annotations) => self => self.pipe(filter(a =>
3569
3570
  [LessThanDateSchemaId]: {
3570
3571
  max
3571
3572
  },
3572
- title: `lessThanDate(${util_.formatDate(max)})`,
3573
- description: `a date before ${util_.formatDate(max)}`,
3573
+ title: `lessThanDate(${Inspectable.formatDate(max)})`,
3574
+ description: `a date before ${Inspectable.formatDate(max)}`,
3574
3575
  ...annotations
3575
3576
  }));
3576
3577
  /**
@@ -3587,8 +3588,8 @@ export const lessThanOrEqualToDate = (max, annotations) => self => self.pipe(fil
3587
3588
  [LessThanOrEqualToDateSchemaId]: {
3588
3589
  max
3589
3590
  },
3590
- title: `lessThanOrEqualToDate(${util_.formatDate(max)})`,
3591
- description: `a date before or equal to ${util_.formatDate(max)}`,
3591
+ title: `lessThanOrEqualToDate(${Inspectable.formatDate(max)})`,
3592
+ description: `a date before or equal to ${Inspectable.formatDate(max)}`,
3592
3593
  ...annotations
3593
3594
  }));
3594
3595
  /**
@@ -3605,8 +3606,8 @@ export const greaterThanDate = (min, annotations) => self => self.pipe(filter(a
3605
3606
  [GreaterThanDateSchemaId]: {
3606
3607
  min
3607
3608
  },
3608
- title: `greaterThanDate(${util_.formatDate(min)})`,
3609
- description: `a date after ${util_.formatDate(min)}`,
3609
+ title: `greaterThanDate(${Inspectable.formatDate(min)})`,
3610
+ description: `a date after ${Inspectable.formatDate(min)}`,
3610
3611
  ...annotations
3611
3612
  }));
3612
3613
  /**
@@ -3623,8 +3624,8 @@ export const greaterThanOrEqualToDate = (min, annotations) => self => self.pipe(
3623
3624
  [GreaterThanOrEqualToDateSchemaId]: {
3624
3625
  min
3625
3626
  },
3626
- title: `greaterThanOrEqualToDate(${util_.formatDate(min)})`,
3627
- description: `a date after or equal to ${util_.formatDate(min)}`,
3627
+ title: `greaterThanOrEqualToDate(${Inspectable.formatDate(min)})`,
3628
+ description: `a date after or equal to ${Inspectable.formatDate(min)}`,
3628
3629
  ...annotations
3629
3630
  }));
3630
3631
  /**
@@ -3642,8 +3643,8 @@ export const betweenDate = (min, max, annotations) => self => self.pipe(filter(a
3642
3643
  max,
3643
3644
  min
3644
3645
  },
3645
- title: `betweenDate(${util_.formatDate(min)}, ${util_.formatDate(max)})`,
3646
- description: `a date between ${util_.formatDate(min)} and ${util_.formatDate(max)}`,
3646
+ title: `betweenDate(${Inspectable.formatDate(min)}, ${Inspectable.formatDate(max)})`,
3647
+ description: `a date between ${Inspectable.formatDate(min)} and ${Inspectable.formatDate(max)}`,
3647
3648
  ...annotations
3648
3649
  }));
3649
3650
  /**
@@ -3699,7 +3700,7 @@ export class DateFromString extends /*#__PURE__*/transform(String$.annotations({
3699
3700
  }), DateFromSelf, {
3700
3701
  strict: true,
3701
3702
  decode: i => new Date(i),
3702
- encode: a => util_.formatDate(a)
3703
+ encode: a => Inspectable.formatDate(a)
3703
3704
  }).annotations({
3704
3705
  identifier: "DateFromString"
3705
3706
  }) {}
@@ -3754,7 +3755,7 @@ export class DateTimeUtcFromSelf extends /*#__PURE__*/declare(u => dateTime.isDa
3754
3755
  }) {}
3755
3756
  const decodeDateTimeUtc = (input, ast) => ParseResult.try({
3756
3757
  try: () => dateTime.unsafeMake(input),
3757
- catch: () => new ParseResult.Type(ast, input, `Unable to decode ${util_.formatUnknown(input)} into a DateTime.Utc`)
3758
+ catch: () => new ParseResult.Type(ast, input, `Unable to decode ${Inspectable.formatUnknown(input)} into a DateTime.Utc`)
3758
3759
  });
3759
3760
  /**
3760
3761
  * Defines a schema that attempts to convert a `number` to a `DateTime.Utc` instance using the `DateTime.unsafeMake` constructor.
@@ -4807,7 +4808,7 @@ export const TaggedError = identifier => (tag, fieldsOr, annotations) => {
4807
4808
  if (!hasMessageField) {
4808
4809
  Object.defineProperty(TaggedErrorClass.prototype, "message", {
4809
4810
  get() {
4810
- return `{ ${Reflect.ownKeys(fields).map(p => `${util_.formatPropertyKey(p)}: ${util_.formatUnknown(this[p])}`).join(", ")} }`;
4811
+ return `{ ${Reflect.ownKeys(fields).map(p => `${Inspectable.formatPropertyKey(p)}: ${Inspectable.formatUnknown(this[p])}`).join(", ")} }`;
4811
4812
  },
4812
4813
  enumerable: false,
4813
4814
  // mirrors the built-in Error.prototype.message, whose descriptor is also non-enumerable
@@ -4991,7 +4992,7 @@ const makeClass = ({
4991
4992
  if (disableToString !== true) {
4992
4993
  Object.defineProperty(klass.prototype, "toString", {
4993
4994
  value() {
4994
- return `${identifier}({ ${Reflect.ownKeys(fields).map(p => `${util_.formatPropertyKey(p)}: ${util_.formatUnknown(this[p])}`).join(", ")} })`;
4995
+ return `${identifier}({ ${Reflect.ownKeys(fields).map(p => `${Inspectable.formatPropertyKey(p)}: ${Inspectable.formatUnknown(this[p])}`).join(", ")} })`;
4995
4996
  },
4996
4997
  configurable: true,
4997
4998
  writable: true