backendless 6.5.1 → 6.5.2
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/backendless.d.ts +2 -2
- package/dist/backendless.js +12 -4
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +2 -2
- package/es/hive/stores/list.js +11 -3
- package/lib/hive/stores/list.js +11 -3
- package/package.json +1 -1
- package/src/hive/stores/list.js +13 -3
package/backendless.d.ts
CHANGED
|
@@ -414,9 +414,9 @@ declare module Backendless {
|
|
|
414
414
|
|
|
415
415
|
get(indexFrom: number, indexTo: number): Promise<Array<JSONValue>>
|
|
416
416
|
|
|
417
|
-
set(values: Array<
|
|
417
|
+
set(values: Array<JSONValue>): Promise<number>;
|
|
418
418
|
|
|
419
|
-
set(value:
|
|
419
|
+
set(value: JSONValue, index: number): Promise<void>;
|
|
420
420
|
|
|
421
421
|
insertBefore(valueToInsert: JSONValue, anchorValue: JSONValue): Promise<number>;
|
|
422
422
|
|
package/dist/backendless.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* ********************************************************************************************************************
|
|
3
|
-
* Backendless SDK for JavaScript. Version: 6.5.
|
|
3
|
+
* Backendless SDK for JavaScript. Version: 6.5.2
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2012-2022 BACKENDLESS.COM. All Rights Reserved.
|
|
6
6
|
*
|
|
@@ -19253,14 +19253,22 @@ var ListStore = /*#__PURE__*/function (_HiveStore) {
|
|
|
19253
19253
|
}, {
|
|
19254
19254
|
key: "set",
|
|
19255
19255
|
value: function set(value, index) {
|
|
19256
|
-
if (
|
|
19256
|
+
if (typeof index === 'undefined') {
|
|
19257
|
+
if (!value || !Array.isArray(value) || !value.length || !(0, _utils.isHiveValueValid)(value)) {
|
|
19258
|
+
throw new Error('Value must be provided and must be a list of valid JSON items.');
|
|
19259
|
+
}
|
|
19260
|
+
|
|
19257
19261
|
return this.app.request.put({
|
|
19258
19262
|
url: this.getBaseURL(),
|
|
19259
19263
|
data: value
|
|
19260
19264
|
});
|
|
19261
19265
|
}
|
|
19262
19266
|
|
|
19263
|
-
if (
|
|
19267
|
+
if (!(0, _utils.isHiveValueValid)(value)) {
|
|
19268
|
+
throw new Error('Value must be provided and must be one of types: string, number, boolean, object, array.');
|
|
19269
|
+
}
|
|
19270
|
+
|
|
19271
|
+
if (typeof index !== 'number' || isNaN(index)) {
|
|
19264
19272
|
throw new Error('Index must be a number.');
|
|
19265
19273
|
}
|
|
19266
19274
|
|
|
@@ -19292,7 +19300,7 @@ var ListStore = /*#__PURE__*/function (_HiveStore) {
|
|
|
19292
19300
|
key: "insert",
|
|
19293
19301
|
value: function insert(valueToInsert, anchorValue, before) {
|
|
19294
19302
|
if (!(0, _utils.isHiveValueValid)(valueToInsert)) {
|
|
19295
|
-
throw new Error('ValueToInsert must be provided and must be
|
|
19303
|
+
throw new Error('ValueToInsert must be provided and must be one of types: string, number, boolean, object, array.');
|
|
19296
19304
|
}
|
|
19297
19305
|
|
|
19298
19306
|
if (!(0, _utils.isHiveValueValid)(anchorValue)) {
|