@onehat/data 1.22.32 → 1.22.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/data",
3
- "version": "1.22.32",
3
+ "version": "1.22.34",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -325,6 +325,10 @@ class OneBuildRepository extends AjaxRepository {
325
325
  }),
326
326
  method: 'POST',
327
327
  baseURL: this.api.baseURL,
328
+ headers: _.merge({
329
+ Accept: 'application/json',
330
+ }, this.headers),
331
+ timeout: this.timeout,
328
332
  };
329
333
 
330
334
  if (this.debugMode) {
@@ -518,6 +522,21 @@ class OneBuildRepository extends AjaxRepository {
518
522
 
519
523
  }
520
524
 
525
+ /**
526
+ * Get all Entities on current page.
527
+ * OneBuild repositories load a single page from the server, so
528
+ * this.entities already represents the current page.
529
+ * This is an override of the parent method.
530
+ * @return {array} Entities
531
+ */
532
+ getEntitiesOnPage() {
533
+ if (this.isDestroyed) {
534
+ this.throwError('this.getEntitiesOnPage is no longer valid. Repository has been destroyed.');
535
+ return;
536
+ }
537
+ return this.getEntities();
538
+ }
539
+
521
540
  /**
522
541
  * Login to OneBuild API
523
542
  * @param {object} creds - object with two properties: