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
@@ -166,6 +166,7 @@ var _Function = require("./Function.js");
166
166
  var _GlobalValue = require("./GlobalValue.js");
167
167
  var hashMap_ = _interopRequireWildcard(require("./HashMap.js"));
168
168
  var hashSet_ = _interopRequireWildcard(require("./HashSet.js"));
169
+ var Inspectable = _interopRequireWildcard(require("./Inspectable.js"));
169
170
  var internalCause_ = _interopRequireWildcard(require("./internal/cause.js"));
170
171
  var errors_ = _interopRequireWildcard(require("./internal/schema/errors.js"));
171
172
  var schemaId_ = _interopRequireWildcard(require("./internal/schema/schemaId.js"));
@@ -3735,8 +3736,8 @@ const lessThanDate = (max, annotations) => self => self.pipe(filter(a => a < max
3735
3736
  [LessThanDateSchemaId]: {
3736
3737
  max
3737
3738
  },
3738
- title: `lessThanDate(${util_.formatDate(max)})`,
3739
- description: `a date before ${util_.formatDate(max)}`,
3739
+ title: `lessThanDate(${Inspectable.formatDate(max)})`,
3740
+ description: `a date before ${Inspectable.formatDate(max)}`,
3740
3741
  ...annotations
3741
3742
  }));
3742
3743
  /**
@@ -3754,8 +3755,8 @@ const lessThanOrEqualToDate = (max, annotations) => self => self.pipe(filter(a =
3754
3755
  [LessThanOrEqualToDateSchemaId]: {
3755
3756
  max
3756
3757
  },
3757
- title: `lessThanOrEqualToDate(${util_.formatDate(max)})`,
3758
- description: `a date before or equal to ${util_.formatDate(max)}`,
3758
+ title: `lessThanOrEqualToDate(${Inspectable.formatDate(max)})`,
3759
+ description: `a date before or equal to ${Inspectable.formatDate(max)}`,
3759
3760
  ...annotations
3760
3761
  }));
3761
3762
  /**
@@ -3773,8 +3774,8 @@ const greaterThanDate = (min, annotations) => self => self.pipe(filter(a => a >
3773
3774
  [GreaterThanDateSchemaId]: {
3774
3775
  min
3775
3776
  },
3776
- title: `greaterThanDate(${util_.formatDate(min)})`,
3777
- description: `a date after ${util_.formatDate(min)}`,
3777
+ title: `greaterThanDate(${Inspectable.formatDate(min)})`,
3778
+ description: `a date after ${Inspectable.formatDate(min)}`,
3778
3779
  ...annotations
3779
3780
  }));
3780
3781
  /**
@@ -3792,8 +3793,8 @@ const greaterThanOrEqualToDate = (min, annotations) => self => self.pipe(filter(
3792
3793
  [GreaterThanOrEqualToDateSchemaId]: {
3793
3794
  min
3794
3795
  },
3795
- title: `greaterThanOrEqualToDate(${util_.formatDate(min)})`,
3796
- description: `a date after or equal to ${util_.formatDate(min)}`,
3796
+ title: `greaterThanOrEqualToDate(${Inspectable.formatDate(min)})`,
3797
+ description: `a date after or equal to ${Inspectable.formatDate(min)}`,
3797
3798
  ...annotations
3798
3799
  }));
3799
3800
  /**
@@ -3812,8 +3813,8 @@ const betweenDate = (min, max, annotations) => self => self.pipe(filter(a => a <
3812
3813
  max,
3813
3814
  min
3814
3815
  },
3815
- title: `betweenDate(${util_.formatDate(min)}, ${util_.formatDate(max)})`,
3816
- description: `a date between ${util_.formatDate(min)} and ${util_.formatDate(max)}`,
3816
+ title: `betweenDate(${Inspectable.formatDate(min)}, ${Inspectable.formatDate(max)})`,
3817
+ description: `a date between ${Inspectable.formatDate(min)} and ${Inspectable.formatDate(max)}`,
3817
3818
  ...annotations
3818
3819
  }));
3819
3820
  /**
@@ -3872,7 +3873,7 @@ class DateFromString extends /*#__PURE__*/transform(String$.annotations({
3872
3873
  }), DateFromSelf, {
3873
3874
  strict: true,
3874
3875
  decode: i => new Date(i),
3875
- encode: a => util_.formatDate(a)
3876
+ encode: a => Inspectable.formatDate(a)
3876
3877
  }).annotations({
3877
3878
  identifier: "DateFromString"
3878
3879
  }) {}
@@ -3920,7 +3921,7 @@ class DateTimeUtcFromSelf extends /*#__PURE__*/declare(u => dateTime.isDateTime(
3920
3921
  exports.DateTimeUtcFromSelf = DateTimeUtcFromSelf;
3921
3922
  const decodeDateTimeUtc = (input, ast) => ParseResult.try({
3922
3923
  try: () => dateTime.unsafeMake(input),
3923
- catch: () => new ParseResult.Type(ast, input, `Unable to decode ${util_.formatUnknown(input)} into a DateTime.Utc`)
3924
+ catch: () => new ParseResult.Type(ast, input, `Unable to decode ${Inspectable.formatUnknown(input)} into a DateTime.Utc`)
3924
3925
  });
3925
3926
  /**
3926
3927
  * Defines a schema that attempts to convert a `number` to a `DateTime.Utc` instance using the `DateTime.unsafeMake` constructor.
@@ -5003,7 +5004,7 @@ const TaggedError = identifier => (tag, fieldsOr, annotations) => {
5003
5004
  if (!hasMessageField) {
5004
5005
  Object.defineProperty(TaggedErrorClass.prototype, "message", {
5005
5006
  get() {
5006
- return `{ ${Reflect.ownKeys(fields).map(p => `${util_.formatPropertyKey(p)}: ${util_.formatUnknown(this[p])}`).join(", ")} }`;
5007
+ return `{ ${Reflect.ownKeys(fields).map(p => `${Inspectable.formatPropertyKey(p)}: ${Inspectable.formatUnknown(this[p])}`).join(", ")} }`;
5007
5008
  },
5008
5009
  enumerable: false,
5009
5010
  // mirrors the built-in Error.prototype.message, whose descriptor is also non-enumerable
@@ -5188,7 +5189,7 @@ const makeClass = ({
5188
5189
  if (disableToString !== true) {
5189
5190
  Object.defineProperty(klass.prototype, "toString", {
5190
5191
  value() {
5191
- return `${identifier}({ ${Reflect.ownKeys(fields).map(p => `${util_.formatPropertyKey(p)}: ${util_.formatUnknown(this[p])}`).join(", ")} })`;
5192
+ return `${identifier}({ ${Reflect.ownKeys(fields).map(p => `${Inspectable.formatPropertyKey(p)}: ${Inspectable.formatUnknown(this[p])}`).join(", ")} })`;
5192
5193
  },
5193
5194
  configurable: true,
5194
5195
  writable: true