@esri/hub-common 18.9.0 → 18.9.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.
@@ -1,5 +1,6 @@
1
1
  import { ArcGISIdentityManager, } from "@esri/arcgis-rest-request";
2
2
  import { cloneObject } from "../../../util";
3
+ import { getProp } from "../../../objects/get-prop";
3
4
  /**
4
5
  * @private
5
6
  * Create a `.next()` function for portal search type
@@ -15,6 +16,11 @@ export function getNextPortalCallback(request, nextStart, total, fn) {
15
16
  if (request.authentication) {
16
17
  clonedRequest.authentication = ArcGISIdentityManager.deserialize(request.authentication.serialize());
17
18
  }
19
+ // do the same workaround for requestOptions.authentication
20
+ if (getProp(request, "requestOptions.authentication")) {
21
+ clonedRequest.requestOptions.authentication =
22
+ ArcGISIdentityManager.deserialize(request.requestOptions.authentication.serialize());
23
+ }
18
24
  // figure out the start
19
25
  clonedRequest.start = nextStart > -1 ? nextStart : total + 1;
20
26
  return () => fn(clonedRequest);
@@ -1 +1 @@
1
- {"version":3,"file":"getNextPortalCallback.js","sourceRoot":"","sources":["../../../../../src/search/_internal/commonHelpers/getNextPortalCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAEtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAM5C;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAU,EACV,SAAiB,EACjB,KAAa,EACb,EAA4C;IAE5C,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAE3C,4DAA4D;IAC5D,IAAI,OAAO,CAAC,cAAc,EAAE;QAC1B,aAAa,CAAC,cAAc,GAAG,qBAAqB,CAAC,WAAW,CAC7D,OAAO,CAAC,cAAwC,CAAC,SAAS,EAAE,CAC9D,CAAC;KACH;IAED,uBAAuB;IACvB,aAAa,CAAC,KAAK,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;IAE7D,OAAO,GAAmC,EAAE,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;AACjE,CAAC"}
1
+ {"version":3,"file":"getNextPortalCallback.js","sourceRoot":"","sources":["../../../../../src/search/_internal/commonHelpers/getNextPortalCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAEtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AASpD;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAU,EACV,SAAiB,EACjB,KAAa,EACb,EAA4C;IAE5C,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAE3C,4DAA4D;IAC5D,IAAI,OAAO,CAAC,cAAc,EAAE;QAC1B,aAAa,CAAC,cAAc,GAAG,qBAAqB,CAAC,WAAW,CAC7D,OAAO,CAAC,cAAwC,CAAC,SAAS,EAAE,CAC9D,CAAC;KACH;IAED,2DAA2D;IAC3D,IAAI,OAAO,CAAC,OAAO,EAAE,+BAA+B,CAAC,EAAE;QACrD,aAAa,CAAC,cAAc,CAAC,cAAc;YACzC,qBAAqB,CAAC,WAAW,CAC/B,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,SAAS,EAAE,CAClD,CAAC;KACL;IAED,uBAAuB;IACvB,aAAa,CAAC,KAAK,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;IAE7D,OAAO,GAAmC,EAAE,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;AACjE,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getNextPortalCallback = void 0;
4
4
  const arcgis_rest_request_1 = require("@esri/arcgis-rest-request");
5
5
  const util_1 = require("../../../util");
6
+ const get_prop_1 = require("../../../objects/get-prop");
6
7
  /**
7
8
  * @private
8
9
  * Create a `.next()` function for portal search type
@@ -18,6 +19,11 @@ function getNextPortalCallback(request, nextStart, total, fn) {
18
19
  if (request.authentication) {
19
20
  clonedRequest.authentication = arcgis_rest_request_1.ArcGISIdentityManager.deserialize(request.authentication.serialize());
20
21
  }
22
+ // do the same workaround for requestOptions.authentication
23
+ if (get_prop_1.getProp(request, "requestOptions.authentication")) {
24
+ clonedRequest.requestOptions.authentication =
25
+ arcgis_rest_request_1.ArcGISIdentityManager.deserialize(request.requestOptions.authentication.serialize());
26
+ }
21
27
  // figure out the start
22
28
  clonedRequest.start = nextStart > -1 ? nextStart : total + 1;
23
29
  return () => fn(clonedRequest);
@@ -1 +1 @@
1
- {"version":3,"file":"getNextPortalCallback.js","sourceRoot":"","sources":["../../../../../src/search/_internal/commonHelpers/getNextPortalCallback.ts"],"names":[],"mappings":";;;AAAA,mEAGmC;AACnC,wCAA4C;AAM5C;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CACnC,OAAU,EACV,SAAiB,EACjB,KAAa,EACb,EAA4C;IAE5C,MAAM,aAAa,GAAG,kBAAW,CAAC,OAAO,CAAC,CAAC;IAE3C,4DAA4D;IAC5D,IAAI,OAAO,CAAC,cAAc,EAAE;QAC1B,aAAa,CAAC,cAAc,GAAG,2CAAqB,CAAC,WAAW,CAC7D,OAAO,CAAC,cAAwC,CAAC,SAAS,EAAE,CAC9D,CAAC;KACH;IAED,uBAAuB;IACvB,aAAa,CAAC,KAAK,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;IAE7D,OAAO,GAAmC,EAAE,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;AACjE,CAAC;AAnBD,sDAmBC"}
1
+ {"version":3,"file":"getNextPortalCallback.js","sourceRoot":"","sources":["../../../../../src/search/_internal/commonHelpers/getNextPortalCallback.ts"],"names":[],"mappings":";;;AAAA,mEAGmC;AACnC,wCAA4C;AAI5C,wDAAoD;AASpD;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CACnC,OAAU,EACV,SAAiB,EACjB,KAAa,EACb,EAA4C;IAE5C,MAAM,aAAa,GAAG,kBAAW,CAAC,OAAO,CAAC,CAAC;IAE3C,4DAA4D;IAC5D,IAAI,OAAO,CAAC,cAAc,EAAE;QAC1B,aAAa,CAAC,cAAc,GAAG,2CAAqB,CAAC,WAAW,CAC7D,OAAO,CAAC,cAAwC,CAAC,SAAS,EAAE,CAC9D,CAAC;KACH;IAED,2DAA2D;IAC3D,IAAI,kBAAO,CAAC,OAAO,EAAE,+BAA+B,CAAC,EAAE;QACrD,aAAa,CAAC,cAAc,CAAC,cAAc;YACzC,2CAAqB,CAAC,WAAW,CAC/B,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,SAAS,EAAE,CAClD,CAAC;KACL;IAED,uBAAuB;IACvB,aAAa,CAAC,KAAK,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;IAE7D,OAAO,GAAmC,EAAE,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;AACjE,CAAC;AA3BD,sDA2BC"}
@@ -1,7 +1,10 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
2
  import { IHubSearchResponse } from "../../types/IHubSearchResponse";
3
3
  import { IPagingParams } from "@esri/arcgis-rest-portal";
4
- declare type ICommonNextOptions = IRequestOptions & IPagingParams;
4
+ import { IHubRequestOptions } from "../../../hub-types";
5
+ declare type ICommonNextOptions = IRequestOptions & IPagingParams & {
6
+ requestOptions?: IHubRequestOptions;
7
+ };
5
8
  /**
6
9
  * @private
7
10
  * Create a `.next()` function for portal search type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "18.9.0",
3
+ "version": "18.9.1",
4
4
  "description": "Common TypeScript types and utility functions for @esri/hub.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/esm/index.js",