@budibase/backend-core 2.13.36 → 2.13.38

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.js CHANGED
@@ -1839,6 +1839,7 @@ var init_environment2 = __esm({
1839
1839
  ENCRYPTION_KEY: process.env.ENCRYPTION_KEY,
1840
1840
  API_ENCRYPTION_KEY: getAPIEncryptionKey(),
1841
1841
  COUCH_DB_URL: process.env.COUCH_DB_URL || "http://localhost:4005",
1842
+ COUCH_DB_SQL_URL: process.env.COUCH_DB_SQL_URL || "http://localhost:4984",
1842
1843
  COUCH_DB_USERNAME: process.env.COUCH_DB_USER,
1843
1844
  COUCH_DB_PASSWORD: process.env.COUCH_DB_PASSWORD,
1844
1845
  GOOGLE_CLIENT_ID: process.env.GOOGLE_CLIENT_ID,
@@ -4919,7 +4920,7 @@ async function listAllObjects(bucketName, path2) {
4919
4920
  } while (isTruncated);
4920
4921
  return objects;
4921
4922
  }
4922
- function getPresignedUrl(bucketName, key, durationSeconds = 129600) {
4923
+ function getPresignedUrl(bucketName, key, durationSeconds = 3600) {
4923
4924
  const objectStore = ObjectStore(bucketName, { presigning: true });
4924
4925
  const params2 = {
4925
4926
  Bucket: sanitizeBucket(bucketName),
@@ -5670,9 +5671,9 @@ var require_dayjs_min = __commonJS({
5670
5671
  return void 0 === t2;
5671
5672
  } }, g = "en", D = {};
5672
5673
  D[g] = M;
5673
- var p = function(t2) {
5674
- return t2 instanceof b;
5675
- }, S = function t2(e2, n2, r2) {
5674
+ var p = "$isDayjsObject", S = function(t2) {
5675
+ return t2 instanceof _2 || !(!t2 || !t2[p]);
5676
+ }, w = function t2(e2, n2, r2) {
5676
5677
  var i2;
5677
5678
  if (!e2)
5678
5679
  return g;
@@ -5687,18 +5688,18 @@ var require_dayjs_min = __commonJS({
5687
5688
  D[a2] = e2, i2 = a2;
5688
5689
  }
5689
5690
  return !r2 && i2 && (g = i2), i2 || !r2 && g;
5690
- }, w = function(t2, e2) {
5691
- if (p(t2))
5691
+ }, O = function(t2, e2) {
5692
+ if (S(t2))
5692
5693
  return t2.clone();
5693
5694
  var n2 = "object" == typeof e2 ? e2 : {};
5694
- return n2.date = t2, n2.args = arguments, new b(n2);
5695
- }, O = v;
5696
- O.l = S, O.i = p, O.w = function(t2, e2) {
5697
- return w(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
5695
+ return n2.date = t2, n2.args = arguments, new _2(n2);
5696
+ }, b = v;
5697
+ b.l = w, b.i = S, b.w = function(t2, e2) {
5698
+ return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
5698
5699
  };
5699
- var b = function() {
5700
+ var _2 = function() {
5700
5701
  function M2(t2) {
5701
- this.$L = S(t2.locale, null, true), this.parse(t2);
5702
+ this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
5702
5703
  }
5703
5704
  var m2 = M2.prototype;
5704
5705
  return m2.parse = function(t2) {
@@ -5706,7 +5707,7 @@ var require_dayjs_min = __commonJS({
5706
5707
  var e2 = t3.date, n2 = t3.utc;
5707
5708
  if (null === e2)
5708
5709
  return /* @__PURE__ */ new Date(NaN);
5709
- if (O.u(e2))
5710
+ if (b.u(e2))
5710
5711
  return /* @__PURE__ */ new Date();
5711
5712
  if (e2 instanceof Date)
5712
5713
  return new Date(e2);
@@ -5718,33 +5719,33 @@ var require_dayjs_min = __commonJS({
5718
5719
  }
5719
5720
  }
5720
5721
  return new Date(e2);
5721
- }(t2), this.$x = t2.x || {}, this.init();
5722
+ }(t2), this.init();
5722
5723
  }, m2.init = function() {
5723
5724
  var t2 = this.$d;
5724
5725
  this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
5725
5726
  }, m2.$utils = function() {
5726
- return O;
5727
+ return b;
5727
5728
  }, m2.isValid = function() {
5728
5729
  return !(this.$d.toString() === l);
5729
5730
  }, m2.isSame = function(t2, e2) {
5730
- var n2 = w(t2);
5731
+ var n2 = O(t2);
5731
5732
  return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
5732
5733
  }, m2.isAfter = function(t2, e2) {
5733
- return w(t2) < this.startOf(e2);
5734
+ return O(t2) < this.startOf(e2);
5734
5735
  }, m2.isBefore = function(t2, e2) {
5735
- return this.endOf(e2) < w(t2);
5736
+ return this.endOf(e2) < O(t2);
5736
5737
  }, m2.$g = function(t2, e2, n2) {
5737
- return O.u(t2) ? this[e2] : this.set(n2, t2);
5738
+ return b.u(t2) ? this[e2] : this.set(n2, t2);
5738
5739
  }, m2.unix = function() {
5739
5740
  return Math.floor(this.valueOf() / 1e3);
5740
5741
  }, m2.valueOf = function() {
5741
5742
  return this.$d.getTime();
5742
5743
  }, m2.startOf = function(t2, e2) {
5743
- var n2 = this, r2 = !!O.u(e2) || e2, f2 = O.p(t2), l2 = function(t3, e3) {
5744
- var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
5744
+ var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
5745
+ var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
5745
5746
  return r2 ? i2 : i2.endOf(a);
5746
5747
  }, $2 = function(t3, e3) {
5747
- return O.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
5748
+ return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
5748
5749
  }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
5749
5750
  switch (f2) {
5750
5751
  case h:
@@ -5769,7 +5770,7 @@ var require_dayjs_min = __commonJS({
5769
5770
  }, m2.endOf = function(t2) {
5770
5771
  return this.startOf(t2, false);
5771
5772
  }, m2.$set = function(t2, e2) {
5772
- var n2, o2 = O.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
5773
+ var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
5773
5774
  if (o2 === c || o2 === h) {
5774
5775
  var y2 = this.clone().set(d, 1);
5775
5776
  y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
@@ -5779,13 +5780,13 @@ var require_dayjs_min = __commonJS({
5779
5780
  }, m2.set = function(t2, e2) {
5780
5781
  return this.clone().$set(t2, e2);
5781
5782
  }, m2.get = function(t2) {
5782
- return this[O.p(t2)]();
5783
+ return this[b.p(t2)]();
5783
5784
  }, m2.add = function(r2, f2) {
5784
5785
  var d2, l2 = this;
5785
5786
  r2 = Number(r2);
5786
- var $2 = O.p(f2), y2 = function(t2) {
5787
- var e2 = w(l2);
5788
- return O.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
5787
+ var $2 = b.p(f2), y2 = function(t2) {
5788
+ var e2 = O(l2);
5789
+ return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
5789
5790
  };
5790
5791
  if ($2 === c)
5791
5792
  return this.set(c, this.$M + r2);
@@ -5796,17 +5797,17 @@ var require_dayjs_min = __commonJS({
5796
5797
  if ($2 === o)
5797
5798
  return y2(7);
5798
5799
  var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
5799
- return O.w(m3, this);
5800
+ return b.w(m3, this);
5800
5801
  }, m2.subtract = function(t2, e2) {
5801
5802
  return this.add(-1 * t2, e2);
5802
5803
  }, m2.format = function(t2) {
5803
5804
  var e2 = this, n2 = this.$locale();
5804
5805
  if (!this.isValid())
5805
5806
  return n2.invalidDate || l;
5806
- var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
5807
+ var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
5807
5808
  return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
5808
5809
  }, d2 = function(t3) {
5809
- return O.s(s2 % 12 || 12, t3, "0");
5810
+ return b.s(s2 % 12 || 12, t3, "0");
5810
5811
  }, $2 = f2 || function(t3, e3, n3) {
5811
5812
  var r3 = t3 < 12 ? "AM" : "PM";
5812
5813
  return n3 ? r3.toLowerCase() : r3;
@@ -5817,11 +5818,11 @@ var require_dayjs_min = __commonJS({
5817
5818
  case "YY":
5818
5819
  return String(e2.$y).slice(-2);
5819
5820
  case "YYYY":
5820
- return O.s(e2.$y, 4, "0");
5821
+ return b.s(e2.$y, 4, "0");
5821
5822
  case "M":
5822
5823
  return a2 + 1;
5823
5824
  case "MM":
5824
- return O.s(a2 + 1, 2, "0");
5825
+ return b.s(a2 + 1, 2, "0");
5825
5826
  case "MMM":
5826
5827
  return h2(n2.monthsShort, a2, c2, 3);
5827
5828
  case "MMMM":
@@ -5829,7 +5830,7 @@ var require_dayjs_min = __commonJS({
5829
5830
  case "D":
5830
5831
  return e2.$D;
5831
5832
  case "DD":
5832
- return O.s(e2.$D, 2, "0");
5833
+ return b.s(e2.$D, 2, "0");
5833
5834
  case "d":
5834
5835
  return String(e2.$W);
5835
5836
  case "dd":
@@ -5841,7 +5842,7 @@ var require_dayjs_min = __commonJS({
5841
5842
  case "H":
5842
5843
  return String(s2);
5843
5844
  case "HH":
5844
- return O.s(s2, 2, "0");
5845
+ return b.s(s2, 2, "0");
5845
5846
  case "h":
5846
5847
  return d2(1);
5847
5848
  case "hh":
@@ -5853,13 +5854,13 @@ var require_dayjs_min = __commonJS({
5853
5854
  case "m":
5854
5855
  return String(u2);
5855
5856
  case "mm":
5856
- return O.s(u2, 2, "0");
5857
+ return b.s(u2, 2, "0");
5857
5858
  case "s":
5858
5859
  return String(e2.$s);
5859
5860
  case "ss":
5860
- return O.s(e2.$s, 2, "0");
5861
+ return b.s(e2.$s, 2, "0");
5861
5862
  case "SSS":
5862
- return O.s(e2.$ms, 3, "0");
5863
+ return b.s(e2.$ms, 3, "0");
5863
5864
  case "Z":
5864
5865
  return i2;
5865
5866
  }
@@ -5869,8 +5870,8 @@ var require_dayjs_min = __commonJS({
5869
5870
  }, m2.utcOffset = function() {
5870
5871
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
5871
5872
  }, m2.diff = function(r2, d2, l2) {
5872
- var $2, y2 = this, M3 = O.p(d2), m3 = w(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
5873
- return O.m(y2, m3);
5873
+ var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
5874
+ return b.m(y2, m3);
5874
5875
  };
5875
5876
  switch (M3) {
5876
5877
  case h:
@@ -5900,7 +5901,7 @@ var require_dayjs_min = __commonJS({
5900
5901
  default:
5901
5902
  $2 = g2;
5902
5903
  }
5903
- return l2 ? $2 : O.a($2);
5904
+ return l2 ? $2 : b.a($2);
5904
5905
  }, m2.daysInMonth = function() {
5905
5906
  return this.endOf(c).$D;
5906
5907
  }, m2.$locale = function() {
@@ -5908,10 +5909,10 @@ var require_dayjs_min = __commonJS({
5908
5909
  }, m2.locale = function(t2, e2) {
5909
5910
  if (!t2)
5910
5911
  return this.$L;
5911
- var n2 = this.clone(), r2 = S(t2, e2, true);
5912
+ var n2 = this.clone(), r2 = w(t2, e2, true);
5912
5913
  return r2 && (n2.$L = r2), n2;
5913
5914
  }, m2.clone = function() {
5914
- return O.w(this.$d, this);
5915
+ return b.w(this.$d, this);
5915
5916
  }, m2.toDate = function() {
5916
5917
  return new Date(this.valueOf());
5917
5918
  }, m2.toJSON = function() {
@@ -5921,16 +5922,16 @@ var require_dayjs_min = __commonJS({
5921
5922
  }, m2.toString = function() {
5922
5923
  return this.$d.toUTCString();
5923
5924
  }, M2;
5924
- }(), _2 = b.prototype;
5925
- return w.prototype = _2, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
5926
- _2[t2[1]] = function(e2) {
5925
+ }(), k = _2.prototype;
5926
+ return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
5927
+ k[t2[1]] = function(e2) {
5927
5928
  return this.$g(e2, t2[0], t2[1]);
5928
5929
  };
5929
- }), w.extend = function(t2, e2) {
5930
- return t2.$i || (t2(e2, b, w), t2.$i = true), w;
5931
- }, w.locale = S, w.isDayjs = p, w.unix = function(t2) {
5932
- return w(1e3 * t2);
5933
- }, w.en = D[g], w.Ls = D, w.p = {}, w;
5930
+ }), O.extend = function(t2, e2) {
5931
+ return t2.$i || (t2(e2, _2, O), t2.$i = true), O;
5932
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
5933
+ return O(1e3 * t2);
5934
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
5934
5935
  });
5935
5936
  }
5936
5937
  });