@sanity/client 5.0.0-esm.7 → 5.0.0-esm.9

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
@@ -16,7 +16,7 @@ function _interopDefaultCompat(e) {
16
16
  }
17
17
  var polyfilledEventSource__default = /*#__PURE__*/_interopDefaultCompat(polyfilledEventSource);
18
18
  var name = "@sanity/client";
19
- var version = "5.0.0-esm.7";
19
+ var version = "5.0.0-esm.9";
20
20
  const middleware = [middleware$1.debug({
21
21
  verbose: true,
22
22
  namespace: "sanity:client"
@@ -350,7 +350,7 @@ class BasePatch {
350
350
  * @param selector - Attribute or JSONPath expression for array
351
351
  * @param start - Index at which to start changing the array (with origin 0). If greater than the length of the array, actual starting index will be set to the length of the array. If negative, will begin that many elements from the end of the array (with origin -1) and will be set to 0 if absolute value is greater than the length of the array.x
352
352
  * @param deleteCount - An integer indicating the number of old array elements to remove.
353
- * @param items - The elements to add to the array, beginning at the start index. If you don't specify any elements, splice() will only remove elements from the array.
353
+ * @param items - The elements to add to the array, beginning at the start index. If you don't specify FIXME elements, splice() will only remove elements from the array.
354
354
  */
355
355
  splice(selector, start, deleteCount, items) {
356
356
  const delAll = typeof deleteCount === "undefined" || deleteCount === -1;
@@ -816,7 +816,9 @@ function _requestObservable(client, httpRequest, options) {
816
816
  const reqOptions = getRequestOptions(config, Object.assign({}, options, {
817
817
  url: _getUrl(client, uri, useCdn)
818
818
  }));
819
- return new rxjs.Observable(subscriber => httpRequest(reqOptions, config.requester).subscribe(subscriber));
819
+ return new rxjs.Observable(subscriber =>
820
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- the typings thinks it's optional because it's not required to specify it when calling createClient, but it's always defined in practice since SanityClient provides a default
821
+ httpRequest(reqOptions, config.requester).subscribe(subscriber));
820
822
  }
821
823
  function _request(client, httpRequest, options) {
822
824
  const observable = _requestObservable(client, httpRequest, options).pipe(operators.filter(event => event.type === "response"), operators.map(event => event.body));
@@ -1562,7 +1564,7 @@ const _ObservableSanityClient = class {
1562
1564
  * Fetch multiple documents in one request.
1563
1565
  * Should be used sparingly - performing a query is usually a better option.
1564
1566
  * The order/position of documents is preserved based on the original array of IDs.
1565
- * If a any of the documents are missing, they will be replaced by a `null` entry in the returned array
1567
+ * If a FIXME of the documents are missing, they will be replaced by a `null` entry in the returned array
1566
1568
  *
1567
1569
  * @param ids - Document IDs to fetch
1568
1570
  * @param options - Request options
@@ -1685,7 +1687,7 @@ const _SanityClient = class {
1685
1687
  * Fetch multiple documents in one request.
1686
1688
  * Should be used sparingly - performing a query is usually a better option.
1687
1689
  * The order/position of documents is preserved based on the original array of IDs.
1688
- * If a any of the documents are missing, they will be replaced by a `null` entry in the returned array
1690
+ * If a FIXME of the documents are missing, they will be replaced by a `null` entry in the returned array
1689
1691
  *
1690
1692
  * @param ids - Document IDs to fetch
1691
1693
  * @param options - Request options