@nmshd/transport 1.1.5 → 1.1.6

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.
@@ -4,11 +4,11 @@ exports.buildInformation = void 0;
4
4
  const ts_serval_1 = require("@js-soft/ts-serval");
5
5
  const crypto_1 = require("@nmshd/crypto");
6
6
  exports.buildInformation = {
7
- version: "1.1.5",
8
- build: "17",
9
- date: "2022-01-03T13:16:27+00:00",
10
- commit: "84aa2cdf19c200c50a429b31d5e4b83a658f5820",
11
- dependencies: {"@js-soft/docdb-access-abstractions":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/simple-logger":"1.0.0","@js-soft/ts-utils":"1.1.1","axios":"^0.24.0","deep-equal":"^2.0.5","fast-json-patch":"^3.1.0","form-data":"^4.0.0","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^2.2.0","qs":"^6.10.2","reflect-metadata":"^0.1.13","ts-simple-nameof":"^1.3.1","uuid":"^8.3.2"},
7
+ version: "1.1.6",
8
+ build: "18",
9
+ date: "2022-01-18T13:52:13+00:00",
10
+ commit: "c09b6d27bdbb5c6a8e4ef80024e5f10a36379b92",
11
+ dependencies: {"@js-soft/docdb-access-abstractions":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/simple-logger":"1.0.0","@js-soft/ts-utils":"1.1.1","axios":"^0.25.0","deep-equal":"^2.0.5","fast-json-patch":"^3.1.0","form-data":"^4.0.0","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^2.3.0","qs":"^6.10.3","reflect-metadata":"^0.1.13","ts-simple-nameof":"^1.3.1","uuid":"^8.3.2"},
12
12
  libraries: {
13
13
  crypto: crypto_1.buildInformation,
14
14
  serval: ts_serval_1.buildInformation
@@ -15,11 +15,11 @@ exports.buildInformation = void 0;
15
15
  const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
16
16
  const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
17
17
  exports.buildInformation = {
18
- version: "1.1.5",
19
- build: "17",
20
- date: "2022-01-03T13:16:27+00:00",
21
- commit: "84aa2cdf19c200c50a429b31d5e4b83a658f5820",
22
- dependencies: {"@js-soft/docdb-access-abstractions":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/simple-logger":"1.0.0","@js-soft/ts-utils":"1.1.1","axios":"^0.24.0","deep-equal":"^2.0.5","fast-json-patch":"^3.1.0","form-data":"^4.0.0","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^2.2.0","qs":"^6.10.2","reflect-metadata":"^0.1.13","ts-simple-nameof":"^1.3.1","uuid":"^8.3.2"},
18
+ version: "1.1.6",
19
+ build: "18",
20
+ date: "2022-01-18T13:52:13+00:00",
21
+ commit: "c09b6d27bdbb5c6a8e4ef80024e5f10a36379b92",
22
+ dependencies: {"@js-soft/docdb-access-abstractions":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/simple-logger":"1.0.0","@js-soft/ts-utils":"1.1.1","axios":"^0.25.0","deep-equal":"^2.0.5","fast-json-patch":"^3.1.0","form-data":"^4.0.0","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^2.3.0","qs":"^6.10.3","reflect-metadata":"^0.1.13","ts-simple-nameof":"^1.3.1","uuid":"^8.3.2"},
23
23
  libraries: {
24
24
  crypto: crypto_1.buildInformation,
25
25
  serval: ts_serval_1.buildInformation
@@ -13141,14 +13141,18 @@ function Axios(instanceConfig) {
13141
13141
  *
13142
13142
  * @param {Object} config The config specific for this request (merged with this.defaults)
13143
13143
  */
13144
- Axios.prototype.request = function request(config) {
13144
+ Axios.prototype.request = function request(configOrUrl, config) {
13145
13145
  /*eslint no-param-reassign:0*/
13146
13146
  // Allow for axios('example/url'[, config]) a la fetch API
13147
- if (typeof config === 'string') {
13148
- config = arguments[1] || {};
13149
- config.url = arguments[0];
13150
- } else {
13147
+ if (typeof configOrUrl === 'string') {
13151
13148
  config = config || {};
13149
+ config.url = configOrUrl;
13150
+ } else {
13151
+ config = configOrUrl || {};
13152
+ }
13153
+
13154
+ if (!config.url) {
13155
+ throw new Error('Provided config url is not valid');
13152
13156
  }
13153
13157
 
13154
13158
  config = mergeConfig(this.defaults, config);
@@ -13233,6 +13237,9 @@ Axios.prototype.request = function request(config) {
13233
13237
  };
13234
13238
 
13235
13239
  Axios.prototype.getUri = function getUri(config) {
13240
+ if (!config.url) {
13241
+ throw new Error('Provided config url is not valid');
13242
+ }
13236
13243
  config = mergeConfig(this.defaults, config);
13237
13244
  return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
13238
13245
  };
@@ -13873,7 +13880,7 @@ module.exports = defaults;
13873
13880
  /***/ ((module) => {
13874
13881
 
13875
13882
  module.exports = {
13876
- "version": "0.24.0"
13883
+ "version": "0.25.0"
13877
13884
  };
13878
13885
 
13879
13886
  /***/ }),
@@ -14089,7 +14096,7 @@ module.exports = function isAbsoluteURL(url) {
14089
14096
  // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
14090
14097
  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
14091
14098
  // by any combination of letters, digits, plus, period, or hyphen.
14092
- return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
14099
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
14093
14100
  };
14094
14101
 
14095
14102
 
@@ -14099,11 +14106,13 @@ module.exports = function isAbsoluteURL(url) {
14099
14106
  /*!********************************************************!*\
14100
14107
  !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***!
14101
14108
  \********************************************************/
14102
- /***/ ((module) => {
14109
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
14103
14110
 
14104
14111
  "use strict";
14105
14112
 
14106
14113
 
14114
+ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
14115
+
14107
14116
  /**
14108
14117
  * Determines whether the payload is an error thrown by Axios
14109
14118
  *
@@ -14111,7 +14120,7 @@ module.exports = function isAbsoluteURL(url) {
14111
14120
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
14112
14121
  */
14113
14122
  module.exports = function isAxiosError(payload) {
14114
- return (typeof payload === 'object') && (payload.isAxiosError === true);
14123
+ return utils.isObject(payload) && (payload.isAxiosError === true);
14115
14124
  };
14116
14125
 
14117
14126
 
@@ -14436,7 +14445,7 @@ var toString = Object.prototype.toString;
14436
14445
  * @returns {boolean} True if value is an Array, otherwise false
14437
14446
  */
14438
14447
  function isArray(val) {
14439
- return toString.call(val) === '[object Array]';
14448
+ return Array.isArray(val);
14440
14449
  }
14441
14450
 
14442
14451
  /**
@@ -14477,7 +14486,7 @@ function isArrayBuffer(val) {
14477
14486
  * @returns {boolean} True if value is an FormData, otherwise false
14478
14487
  */
14479
14488
  function isFormData(val) {
14480
- return (typeof FormData !== 'undefined') && (val instanceof FormData);
14489
+ return toString.call(val) === '[object FormData]';
14481
14490
  }
14482
14491
 
14483
14492
  /**
@@ -14491,7 +14500,7 @@ function isArrayBufferView(val) {
14491
14500
  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
14492
14501
  result = ArrayBuffer.isView(val);
14493
14502
  } else {
14494
- result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
14503
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
14495
14504
  }
14496
14505
  return result;
14497
14506
  }
@@ -14598,7 +14607,7 @@ function isStream(val) {
14598
14607
  * @returns {boolean} True if value is a URLSearchParams object, otherwise false
14599
14608
  */
14600
14609
  function isURLSearchParams(val) {
14601
- return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
14610
+ return toString.call(val) === '[object URLSearchParams]';
14602
14611
  }
14603
14612
 
14604
14613
  /**
@@ -35011,17 +35020,16 @@ function padStart(input, n) {
35011
35020
  n = 2;
35012
35021
  }
35013
35022
 
35014
- var minus = input < 0 ? "-" : "";
35015
- var target = minus ? input * -1 : input;
35016
- var result;
35023
+ var isNeg = input < 0;
35024
+ var padded;
35017
35025
 
35018
- if (target.toString().length < n) {
35019
- result = ("0".repeat(n) + target).slice(-n);
35026
+ if (isNeg) {
35027
+ padded = "-" + ("" + -input).padStart(n, "0");
35020
35028
  } else {
35021
- result = target.toString();
35029
+ padded = ("" + input).padStart(n, "0");
35022
35030
  }
35023
35031
 
35024
- return "" + minus + result;
35032
+ return padded;
35025
35033
  }
35026
35034
  function parseInteger(string) {
35027
35035
  if (isUndefined(string) || string === null || string === "") {
@@ -36643,7 +36651,27 @@ var Settings = /*#__PURE__*/function () {
36643
36651
  return Settings;
36644
36652
  }();
36645
36653
 
36646
- var _excluded = ["base"];
36654
+ var _excluded = ["base"],
36655
+ _excluded2 = ["padTo", "floor"];
36656
+
36657
+ var intlLFCache = {};
36658
+
36659
+ function getCachedLF(locString, opts) {
36660
+ if (opts === void 0) {
36661
+ opts = {};
36662
+ }
36663
+
36664
+ var key = JSON.stringify([locString, opts]);
36665
+ var dtf = intlLFCache[key];
36666
+
36667
+ if (!dtf) {
36668
+ dtf = new Intl.ListFormat(locString, opts);
36669
+ intlLFCache[key] = dtf;
36670
+ }
36671
+
36672
+ return dtf;
36673
+ }
36674
+
36647
36675
  var intlDTCache = {};
36648
36676
 
36649
36677
  function getCachedDTF(locString, opts) {
@@ -36812,10 +36840,15 @@ var PolyNumberFormatter = /*#__PURE__*/function () {
36812
36840
  this.padTo = opts.padTo || 0;
36813
36841
  this.floor = opts.floor || false;
36814
36842
 
36815
- if (!forceSimple) {
36816
- var intlOpts = {
36843
+ opts.padTo;
36844
+ opts.floor;
36845
+ var otherOpts = _objectWithoutPropertiesLoose(opts, _excluded2);
36846
+
36847
+ if (!forceSimple || Object.keys(otherOpts).length > 0) {
36848
+ var intlOpts = _extends({
36817
36849
  useGrouping: false
36818
- };
36850
+ }, opts);
36851
+
36819
36852
  if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;
36820
36853
  this.inf = getCachedINF(intl, intlOpts);
36821
36854
  }
@@ -37009,8 +37042,7 @@ var Locale = /*#__PURE__*/function () {
37009
37042
 
37010
37043
  var _proto4 = Locale.prototype;
37011
37044
 
37012
- _proto4.listingMode = function listingMode(defaultOK) {
37013
-
37045
+ _proto4.listingMode = function listingMode() {
37014
37046
  var isActuallyEn = this.isEnglish();
37015
37047
  var hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory");
37016
37048
  return isActuallyEn && hasNoWeirdness ? "en" : "intl";
@@ -37190,6 +37222,14 @@ var Locale = /*#__PURE__*/function () {
37190
37222
  return new PolyRelFormatter(this.intl, this.isEnglish(), opts);
37191
37223
  };
37192
37224
 
37225
+ _proto4.listFormatter = function listFormatter(opts) {
37226
+ if (opts === void 0) {
37227
+ opts = {};
37228
+ }
37229
+
37230
+ return getCachedLF(this.intl, opts);
37231
+ };
37232
+
37193
37233
  _proto4.isEnglish = function isEnglish() {
37194
37234
  return this.locale === "en" || this.locale.toLowerCase() === "en-us" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us");
37195
37235
  };
@@ -37935,6 +37975,48 @@ var Duration = /*#__PURE__*/function () {
37935
37975
 
37936
37976
  return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2;
37937
37977
  }
37978
+ /**
37979
+ * Returns a string representation of a Duration with all units included
37980
+ * To modify its behavior use the `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant. See {@link Intl.NumberFormat}.
37981
+ * @param opts - On option object to override the formatting. Accepts the same keys as the options parameter of the native `Int.NumberFormat` constructor, as well as `listStyle`.
37982
+ * @example
37983
+ * ```js
37984
+ * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })
37985
+ * dur.toHuman() //=> '1 day, 5 hours, 6 minutes'
37986
+ * dur.toHuman({ listStyle: "long" }) //=> '1 day, 5 hours, and 6 minutes'
37987
+ * dur.toHuman({ unitDisplay: "short" }) //=> '1 day, 5 hr, 6 min'
37988
+ * ```
37989
+ */
37990
+ ;
37991
+
37992
+ _proto.toHuman = function toHuman(opts) {
37993
+ var _this = this;
37994
+
37995
+ if (opts === void 0) {
37996
+ opts = {};
37997
+ }
37998
+
37999
+ var l = orderedUnits$1.map(function (unit) {
38000
+ var val = _this.values[unit];
38001
+
38002
+ if (isUndefined(val)) {
38003
+ return null;
38004
+ }
38005
+
38006
+ return _this.loc.numberFormatter(_extends({
38007
+ style: "unit",
38008
+ unitDisplay: "long"
38009
+ }, opts, {
38010
+ unit: unit.slice(0, -1)
38011
+ })).format(val);
38012
+ }).filter(function (n) {
38013
+ return n;
38014
+ });
38015
+ return this.loc.listFormatter(_extends({
38016
+ type: "conjunction",
38017
+ style: opts.listStyle || "narrow"
38018
+ }, opts)).format(l);
38019
+ }
37938
38020
  /**
37939
38021
  * Returns a JavaScript object with this Duration's values.
37940
38022
  * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }
@@ -40472,51 +40554,67 @@ function toTechFormat(dt, format, allowZ) {
40472
40554
  allowZ: allowZ,
40473
40555
  forceSimple: true
40474
40556
  }).formatDateTimeFromString(dt, format) : null;
40475
- } // technical time formats (e.g. the time part of ISO 8601), take some options
40476
- // and this commonizes their handling
40557
+ }
40477
40558
 
40559
+ function _toISODate(o, extended) {
40560
+ var longFormat = o.c.year > 9999 || o.c.year < 0;
40561
+ var c = "";
40562
+ if (longFormat && o.c.year >= 0) c += "+";
40563
+ c += padStart(o.c.year, longFormat ? 6 : 4);
40478
40564
 
40479
- function toTechTimeFormat(dt, _ref) {
40480
- var _ref$suppressSeconds = _ref.suppressSeconds,
40481
- suppressSeconds = _ref$suppressSeconds === void 0 ? false : _ref$suppressSeconds,
40482
- _ref$suppressMillisec = _ref.suppressMilliseconds,
40483
- suppressMilliseconds = _ref$suppressMillisec === void 0 ? false : _ref$suppressMillisec,
40484
- includeOffset = _ref.includeOffset,
40485
- _ref$includePrefix = _ref.includePrefix,
40486
- includePrefix = _ref$includePrefix === void 0 ? false : _ref$includePrefix,
40487
- _ref$includeZone = _ref.includeZone,
40488
- includeZone = _ref$includeZone === void 0 ? false : _ref$includeZone,
40489
- _ref$spaceZone = _ref.spaceZone,
40490
- spaceZone = _ref$spaceZone === void 0 ? false : _ref$spaceZone,
40491
- _ref$format = _ref.format,
40492
- format = _ref$format === void 0 ? "extended" : _ref$format;
40493
- var fmt = format === "basic" ? "HHmm" : "HH:mm";
40565
+ if (extended) {
40566
+ c += "-";
40567
+ c += padStart(o.c.month);
40568
+ c += "-";
40569
+ c += padStart(o.c.day);
40570
+ } else {
40571
+ c += padStart(o.c.month);
40572
+ c += padStart(o.c.day);
40573
+ }
40574
+
40575
+ return c;
40576
+ }
40577
+
40578
+ function _toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset) {
40579
+ var c = padStart(o.c.hour);
40494
40580
 
40495
- if (!suppressSeconds || dt.second !== 0 || dt.millisecond !== 0) {
40496
- fmt += format === "basic" ? "ss" : ":ss";
40581
+ if (extended) {
40582
+ c += ":";
40583
+ c += padStart(o.c.minute);
40497
40584
 
40498
- if (!suppressMilliseconds || dt.millisecond !== 0) {
40499
- fmt += ".SSS";
40585
+ if (o.c.second !== 0 || !suppressSeconds) {
40586
+ c += ":";
40500
40587
  }
40588
+ } else {
40589
+ c += padStart(o.c.minute);
40501
40590
  }
40502
40591
 
40503
- if ((includeZone || includeOffset) && spaceZone) {
40504
- fmt += " ";
40505
- }
40592
+ if (o.c.second !== 0 || !suppressSeconds) {
40593
+ c += padStart(o.c.second);
40506
40594
 
40507
- if (includeZone) {
40508
- fmt += "z";
40509
- } else if (includeOffset) {
40510
- fmt += format === "basic" ? "ZZZ" : "ZZ";
40595
+ if (o.c.millisecond !== 0 || !suppressMilliseconds) {
40596
+ c += ".";
40597
+ c += padStart(o.c.millisecond, 3);
40598
+ }
40511
40599
  }
40512
40600
 
40513
- var str = toTechFormat(dt, fmt);
40514
-
40515
- if (includePrefix) {
40516
- str = "T" + str;
40601
+ if (includeOffset) {
40602
+ if (o.isOffsetFixed && o.offset === 0) {
40603
+ c += "Z";
40604
+ } else if (o.o < 0) {
40605
+ c += "-";
40606
+ c += padStart(Math.trunc(-o.o / 60));
40607
+ c += ":";
40608
+ c += padStart(Math.trunc(-o.o % 60));
40609
+ } else {
40610
+ c += "+";
40611
+ c += padStart(Math.trunc(o.o / 60));
40612
+ c += ":";
40613
+ c += padStart(Math.trunc(o.o % 60));
40614
+ }
40517
40615
  }
40518
40616
 
40519
- return str;
40617
+ return c;
40520
40618
  } // defaults for unspecified units in the supported calendars
40521
40619
 
40522
40620
 
@@ -40711,9 +40809,9 @@ var DateTime = /*#__PURE__*/function () {
40711
40809
  var unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);
40712
40810
 
40713
40811
  if (unchanged) {
40714
- var _ref2 = [config.old.c, config.old.o];
40715
- c = _ref2[0];
40716
- o = _ref2[1];
40812
+ var _ref = [config.old.c, config.old.o];
40813
+ c = _ref[0];
40814
+ o = _ref[1];
40717
40815
  } else {
40718
40816
  var ot = zone.offset(this.ts);
40719
40817
  c = tsToObj(this.ts, ot);
@@ -41383,11 +41481,11 @@ var DateTime = /*#__PURE__*/function () {
41383
41481
  ;
41384
41482
 
41385
41483
  _proto.setZone = function setZone(zone, _temp) {
41386
- var _ref3 = _temp === void 0 ? {} : _temp,
41387
- _ref3$keepLocalTime = _ref3.keepLocalTime,
41388
- keepLocalTime = _ref3$keepLocalTime === void 0 ? false : _ref3$keepLocalTime,
41389
- _ref3$keepCalendarTim = _ref3.keepCalendarTime,
41390
- keepCalendarTime = _ref3$keepCalendarTim === void 0 ? false : _ref3$keepCalendarTim;
41484
+ var _ref2 = _temp === void 0 ? {} : _temp,
41485
+ _ref2$keepLocalTime = _ref2.keepLocalTime,
41486
+ keepLocalTime = _ref2$keepLocalTime === void 0 ? false : _ref2$keepLocalTime,
41487
+ _ref2$keepCalendarTim = _ref2.keepCalendarTime,
41488
+ keepCalendarTime = _ref2$keepCalendarTim === void 0 ? false : _ref2$keepCalendarTim;
41391
41489
 
41392
41490
  zone = normalizeZone(zone, Settings.defaultZone);
41393
41491
 
@@ -41422,10 +41520,10 @@ var DateTime = /*#__PURE__*/function () {
41422
41520
  ;
41423
41521
 
41424
41522
  _proto.reconfigure = function reconfigure(_temp2) {
41425
- var _ref4 = _temp2 === void 0 ? {} : _temp2,
41426
- locale = _ref4.locale,
41427
- numberingSystem = _ref4.numberingSystem,
41428
- outputCalendar = _ref4.outputCalendar;
41523
+ var _ref3 = _temp2 === void 0 ? {} : _temp2,
41524
+ locale = _ref3.locale,
41525
+ numberingSystem = _ref3.numberingSystem,
41526
+ outputCalendar = _ref3.outputCalendar;
41429
41527
 
41430
41528
  var loc = this.loc.clone({
41431
41529
  locale: locale,
@@ -41528,7 +41626,7 @@ var DateTime = /*#__PURE__*/function () {
41528
41626
  * See {@link DateTime#plus}
41529
41627
  * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
41530
41628
  @return {DateTime}
41531
- */
41629
+ */
41532
41630
  ;
41533
41631
 
41534
41632
  _proto.minus = function minus(duration) {
@@ -41693,7 +41791,7 @@ var DateTime = /*#__PURE__*/function () {
41693
41791
  * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
41694
41792
  * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
41695
41793
  * @param {string} [opts.format='extended'] - choose between the basic and extended format
41696
- * @example DateTime.utc(1982, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'
41794
+ * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'
41697
41795
  * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'
41698
41796
  * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'
41699
41797
  * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'
@@ -41701,16 +41799,28 @@ var DateTime = /*#__PURE__*/function () {
41701
41799
  */
41702
41800
  ;
41703
41801
 
41704
- _proto.toISO = function toISO(opts) {
41705
- if (opts === void 0) {
41706
- opts = {};
41707
- }
41802
+ _proto.toISO = function toISO(_temp3) {
41803
+ var _ref4 = _temp3 === void 0 ? {} : _temp3,
41804
+ _ref4$format = _ref4.format,
41805
+ format = _ref4$format === void 0 ? "extended" : _ref4$format,
41806
+ _ref4$suppressSeconds = _ref4.suppressSeconds,
41807
+ suppressSeconds = _ref4$suppressSeconds === void 0 ? false : _ref4$suppressSeconds,
41808
+ _ref4$suppressMillise = _ref4.suppressMilliseconds,
41809
+ suppressMilliseconds = _ref4$suppressMillise === void 0 ? false : _ref4$suppressMillise,
41810
+ _ref4$includeOffset = _ref4.includeOffset,
41811
+ includeOffset = _ref4$includeOffset === void 0 ? true : _ref4$includeOffset;
41708
41812
 
41709
41813
  if (!this.isValid) {
41710
41814
  return null;
41711
41815
  }
41712
41816
 
41713
- return this.toISODate(opts) + "T" + this.toISOTime(opts);
41817
+ var ext = format === "extended";
41818
+
41819
+ var c = _toISODate(this, ext);
41820
+
41821
+ c += "T";
41822
+ c += _toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset);
41823
+ return c;
41714
41824
  }
41715
41825
  /**
41716
41826
  * Returns an ISO 8601-compliant string representation of this DateTime's date component
@@ -41722,18 +41832,16 @@ var DateTime = /*#__PURE__*/function () {
41722
41832
  */
41723
41833
  ;
41724
41834
 
41725
- _proto.toISODate = function toISODate(_temp3) {
41726
- var _ref5 = _temp3 === void 0 ? {} : _temp3,
41835
+ _proto.toISODate = function toISODate(_temp4) {
41836
+ var _ref5 = _temp4 === void 0 ? {} : _temp4,
41727
41837
  _ref5$format = _ref5.format,
41728
41838
  format = _ref5$format === void 0 ? "extended" : _ref5$format;
41729
41839
 
41730
- var fmt = format === "basic" ? "yyyyMMdd" : "yyyy-MM-dd";
41731
-
41732
- if (this.year > 9999) {
41733
- fmt = "+" + fmt;
41840
+ if (!this.isValid) {
41841
+ return null;
41734
41842
  }
41735
41843
 
41736
- return toTechFormat(this, fmt);
41844
+ return _toISODate(this, format === "extended");
41737
41845
  }
41738
41846
  /**
41739
41847
  * Returns an ISO 8601-compliant string representation of this DateTime's week date
@@ -41761,8 +41869,8 @@ var DateTime = /*#__PURE__*/function () {
41761
41869
  */
41762
41870
  ;
41763
41871
 
41764
- _proto.toISOTime = function toISOTime(_temp4) {
41765
- var _ref6 = _temp4 === void 0 ? {} : _temp4,
41872
+ _proto.toISOTime = function toISOTime(_temp5) {
41873
+ var _ref6 = _temp5 === void 0 ? {} : _temp5,
41766
41874
  _ref6$suppressMillise = _ref6.suppressMilliseconds,
41767
41875
  suppressMilliseconds = _ref6$suppressMillise === void 0 ? false : _ref6$suppressMillise,
41768
41876
  _ref6$suppressSeconds = _ref6.suppressSeconds,
@@ -41774,16 +41882,15 @@ var DateTime = /*#__PURE__*/function () {
41774
41882
  _ref6$format = _ref6.format,
41775
41883
  format = _ref6$format === void 0 ? "extended" : _ref6$format;
41776
41884
 
41777
- return toTechTimeFormat(this, {
41778
- suppressSeconds: suppressSeconds,
41779
- suppressMilliseconds: suppressMilliseconds,
41780
- includeOffset: includeOffset,
41781
- includePrefix: includePrefix,
41782
- format: format
41783
- });
41885
+ if (!this.isValid) {
41886
+ return null;
41887
+ }
41888
+
41889
+ var c = includePrefix ? "T" : "";
41890
+ return c + _toISOTime(this, format === "extended", suppressSeconds, suppressMilliseconds, includeOffset);
41784
41891
  }
41785
41892
  /**
41786
- * Returns an RFC 2822-compatible string representation of this DateTime, always in UTC
41893
+ * Returns an RFC 2822-compatible string representation of this DateTime
41787
41894
  * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'
41788
41895
  * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'
41789
41896
  * @return {string}
@@ -41794,7 +41901,7 @@ var DateTime = /*#__PURE__*/function () {
41794
41901
  return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false);
41795
41902
  }
41796
41903
  /**
41797
- * Returns a string representation of this DateTime appropriate for use in HTTP headers.
41904
+ * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.
41798
41905
  * Specifically, the string conforms to RFC 1123.
41799
41906
  * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
41800
41907
  * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'
@@ -41814,7 +41921,11 @@ var DateTime = /*#__PURE__*/function () {
41814
41921
  ;
41815
41922
 
41816
41923
  _proto.toSQLDate = function toSQLDate() {
41817
- return toTechFormat(this, "yyyy-MM-dd");
41924
+ if (!this.isValid) {
41925
+ return null;
41926
+ }
41927
+
41928
+ return _toISODate(this, true);
41818
41929
  }
41819
41930
  /**
41820
41931
  * Returns a string representation of this DateTime appropriate for use in SQL Time
@@ -41829,18 +41940,26 @@ var DateTime = /*#__PURE__*/function () {
41829
41940
  */
41830
41941
  ;
41831
41942
 
41832
- _proto.toSQLTime = function toSQLTime(_temp5) {
41833
- var _ref7 = _temp5 === void 0 ? {} : _temp5,
41943
+ _proto.toSQLTime = function toSQLTime(_temp6) {
41944
+ var _ref7 = _temp6 === void 0 ? {} : _temp6,
41834
41945
  _ref7$includeOffset = _ref7.includeOffset,
41835
41946
  includeOffset = _ref7$includeOffset === void 0 ? true : _ref7$includeOffset,
41836
41947
  _ref7$includeZone = _ref7.includeZone,
41837
41948
  includeZone = _ref7$includeZone === void 0 ? false : _ref7$includeZone;
41838
41949
 
41839
- return toTechTimeFormat(this, {
41840
- includeOffset: includeOffset,
41841
- includeZone: includeZone,
41842
- spaceZone: true
41843
- });
41950
+ var fmt = "HH:mm:ss.SSS";
41951
+
41952
+ if (includeZone || includeOffset) {
41953
+ fmt += " ";
41954
+
41955
+ if (includeZone) {
41956
+ fmt += "z";
41957
+ } else if (includeOffset) {
41958
+ fmt += "ZZ";
41959
+ }
41960
+ }
41961
+
41962
+ return toTechFormat(this, fmt, true);
41844
41963
  }
41845
41964
  /**
41846
41965
  * Returns a string representation of this DateTime appropriate for use in SQL DateTime
@@ -42044,10 +42163,10 @@ var DateTime = /*#__PURE__*/function () {
42044
42163
  _proto.hasSame = function hasSame(otherDateTime, unit) {
42045
42164
  if (!this.isValid) return false;
42046
42165
  var inputMs = otherDateTime.valueOf();
42047
- var otherZoneDateTime = this.setZone(otherDateTime.zone, {
42166
+ var adjustedToZone = this.setZone(otherDateTime.zone, {
42048
42167
  keepLocalTime: true
42049
42168
  });
42050
- return otherZoneDateTime.startOf(unit) <= inputMs && inputMs <= otherZoneDateTime.endOf(unit);
42169
+ return adjustedToZone.startOf(unit) <= inputMs && inputMs <= adjustedToZone.endOf(unit);
42051
42170
  }
42052
42171
  /**
42053
42172
  * Equality check
@@ -42846,7 +42965,7 @@ function friendlyDateTime(dateTimeish) {
42846
42965
  }
42847
42966
  }
42848
42967
 
42849
- var VERSION = "2.2.0";
42968
+ var VERSION = "2.3.0";
42850
42969
 
42851
42970
  exports.DateTime = DateTime;
42852
42971
  exports.Duration = Duration;
@@ -43543,7 +43662,7 @@ var parseObject = function (chain, val, options, valuesParsed) {
43543
43662
  ) {
43544
43663
  obj = [];
43545
43664
  obj[index] = leaf;
43546
- } else {
43665
+ } else if (cleanRoot !== '__proto__') {
43547
43666
  obj[cleanRoot] = leaf;
43548
43667
  }
43549
43668
  }
@@ -43761,7 +43880,7 @@ var stringify = function stringify(
43761
43880
  var tmpSc = sideChannel;
43762
43881
  var step = 0;
43763
43882
  var findFlag = false;
43764
- while ((tmpSc = tmpSc.get(sentinel)) !== undefined && !findFlag) {
43883
+ while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
43765
43884
  // Where object last appeared in the ref tree
43766
43885
  var pos = tmpSc.get(object);
43767
43886
  step += 1;
@@ -43823,7 +43942,7 @@ var stringify = function stringify(
43823
43942
  var objKeys;
43824
43943
  if (generateArrayPrefix === 'comma' && isArray(obj)) {
43825
43944
  // we need to join elements in
43826
- objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : undefined }];
43945
+ objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
43827
43946
  } else if (isArray(filter)) {
43828
43947
  objKeys = filter;
43829
43948
  } else {
@@ -43833,7 +43952,7 @@ var stringify = function stringify(
43833
43952
 
43834
43953
  for (var j = 0; j < objKeys.length; ++j) {
43835
43954
  var key = objKeys[j];
43836
- var value = typeof key === 'object' && key.value !== undefined ? key.value : obj[key];
43955
+ var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
43837
43956
 
43838
43957
  if (skipNulls && value === null) {
43839
43958
  continue;
@@ -43873,7 +43992,7 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
43873
43992
  return defaults;
43874
43993
  }
43875
43994
 
43876
- if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
43995
+ if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
43877
43996
  throw new TypeError('Encoder has to be a function.');
43878
43997
  }
43879
43998