supercompat 2.18.0 → 2.19.1

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/index.cjs CHANGED
@@ -1805,12 +1805,39 @@ var models7 = function(param) {
1805
1805
  var import_radash4 = require("radash");
1806
1806
  // src/lib/messages/nonEmptyMessages.ts
1807
1807
  var import_radash3 = require("radash");
1808
+ var nonEmptyContent = function(param) {
1809
+ var message = param.message;
1810
+ if ((0, import_radash3.isEmpty)({
1811
+ value: message.content
1812
+ })) {
1813
+ return "-";
1814
+ }
1815
+ if ((0, import_radash3.isArray)(message.content)) {
1816
+ return message.content.map(function(content) {
1817
+ if (content.type === "text") {
1818
+ if ((0, import_radash3.isEmpty)(content.text)) {
1819
+ return {
1820
+ type: "text",
1821
+ text: "-"
1822
+ };
1823
+ } else {
1824
+ return content;
1825
+ }
1826
+ } else {
1827
+ return content;
1828
+ }
1829
+ });
1830
+ }
1831
+ return message.content;
1832
+ };
1808
1833
  var nonEmptyMessages = function(param) {
1809
1834
  var messages3 = param.messages;
1810
1835
  var result = [];
1811
1836
  messages3.forEach(function(message) {
1812
1837
  return result.push(_object_spread_props(_object_spread({}, message), {
1813
- content: (0, import_radash3.isEmpty)(message.content) ? "-" : message.content
1838
+ content: nonEmptyContent({
1839
+ message: message
1840
+ })
1814
1841
  }));
1815
1842
  });
1816
1843
  return result;
@@ -3924,9 +3951,7 @@ var get10 = function(param) {
3924
3951
  hasNextPage: function() {
3925
3952
  return messages3.length === parseInt(limit);
3926
3953
  },
3927
- body: {
3928
- last_id: (_id = (_this = (0, import_radash8.last)(messages3)) === null || _this === void 0 ? void 0 : _this.id) !== null && _id !== void 0 ? _id : null
3929
- }
3954
+ last_id: (_id = (_this = (0, import_radash8.last)(messages3)) === null || _this === void 0 ? void 0 : _this.id) !== null && _id !== void 0 ? _id : null
3930
3955
  }), {
3931
3956
  status: 200,
3932
3957
  headers: {
@@ -4038,10 +4063,8 @@ var get11 = function(param) {
4038
4063
  hasNextPage: function() {
4039
4064
  return runs2.length === parseInt(limit);
4040
4065
  },
4041
- body: {
4042
- // @ts-ignore-next-line
4043
- last_id: (_id = (_this = (0, import_radash9.last)(runs2)) === null || _this === void 0 ? void 0 : _this.id) !== null && _id !== void 0 ? _id : null
4044
- }
4066
+ // @ts-ignore-next-line
4067
+ last_id: (_id = (_this = (0, import_radash9.last)(runs2)) === null || _this === void 0 ? void 0 : _this.id) !== null && _id !== void 0 ? _id : null
4045
4068
  }), {
4046
4069
  status: 200,
4047
4070
  headers: {
@@ -4698,10 +4721,8 @@ var get13 = function(param) {
4698
4721
  hasNextPage: function() {
4699
4722
  return runSteps.length === parseInt(limit);
4700
4723
  },
4701
- body: {
4702
- // @ts-ignore-next-line
4703
- last_id: (_id = (_this = (0, import_radash11.last)(runSteps)) === null || _this === void 0 ? void 0 : _this.id) !== null && _id !== void 0 ? _id : null
4704
- }
4724
+ // @ts-ignore-next-line
4725
+ last_id: (_id = (_this = (0, import_radash11.last)(runSteps)) === null || _this === void 0 ? void 0 : _this.id) !== null && _id !== void 0 ? _id : null
4705
4726
  }), {
4706
4727
  status: 200,
4707
4728
  headers: {