@adobe/spacecat-shared-data-access 1.61.5 → 1.61.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [@adobe/spacecat-shared-data-access-v1.61.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.61.5...@adobe/spacecat-shared-data-access-v1.61.6) (2024-12-30)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * isNonEmptyArray from utils ([#512](https://github.com/adobe/spacecat-shared/issues/512)) ([21b87ed](https://github.com/adobe/spacecat-shared/commit/21b87edc507f20285355becd5d51a9b7010e9651))
7
+
1
8
  # [@adobe/spacecat-shared-data-access-v1.61.5](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.61.4...@adobe/spacecat-shared-data-access-v1.61.5) (2024-12-30)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "1.61.5",
3
+ "version": "1.61.6",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@adobe/spacecat-shared-dynamo": "1.5.0",
38
- "@adobe/spacecat-shared-utils": "1.25.0",
38
+ "@adobe/spacecat-shared-utils": "1.25.1",
39
39
  "@aws-sdk/client-dynamodb": "3.716.0",
40
40
  "@aws-sdk/lib-dynamodb": "3.716.0",
41
41
  "@types/joi": "17.2.3",
@@ -12,6 +12,7 @@
12
12
 
13
13
  import {
14
14
  hasText,
15
+ isNonEmptyArray,
15
16
  isNonEmptyObject,
16
17
  isObject,
17
18
  } from '@adobe/spacecat-shared-utils';
@@ -24,7 +25,6 @@ import { createAccessors } from '../../util/accessor.utils.js';
24
25
  import { guardId } from '../../util/guards.js';
25
26
  import {
26
27
  entityNameToAllPKValue,
27
- isNonEmptyArray,
28
28
  removeElectroProperties,
29
29
  } from '../../util/util.js';
30
30
 
@@ -10,7 +10,7 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import { isNonEmptyObject } from '@adobe/spacecat-shared-utils';
13
+ import { isNonEmptyArray, isNonEmptyObject } from '@adobe/spacecat-shared-utils';
14
14
 
15
15
  import { DataAccessError } from '../../errors/index.js';
16
16
  import { createAccessors } from '../../util/accessor.utils.js';
@@ -19,7 +19,6 @@ import {
19
19
  capitalize,
20
20
  entityNameToIdName,
21
21
  idNameToEntityName,
22
- isNonEmptyArray,
23
22
  } from '../../util/util.js';
24
23
 
25
24
  import Reference from './reference.js';
@@ -10,13 +10,12 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import { hasText, isNonEmptyObject } from '@adobe/spacecat-shared-utils';
13
+ import { hasText, isNonEmptyArray, isNonEmptyObject } from '@adobe/spacecat-shared-utils';
14
14
 
15
15
  import ReferenceError from '../../errors/reference.error.js';
16
16
  import {
17
17
  entityNameToCollectionName,
18
18
  entityNameToIdName,
19
- isNonEmptyArray,
20
19
  keyNamesToMethodName,
21
20
  referenceToBaseMethodName,
22
21
  } from '../../util/util.js';
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import {
14
- hasText, isBoolean, isInteger, isNonEmptyObject,
14
+ hasText, isBoolean, isInteger, isNonEmptyArray, isNonEmptyObject,
15
15
  } from '@adobe/spacecat-shared-utils';
16
16
 
17
17
  import { v4 as uuid, validate as uuidValidate } from 'uuid';
@@ -21,7 +21,6 @@ import {
21
21
  decapitalize,
22
22
  entityNameToAllPKValue,
23
23
  entityNameToIdName,
24
- isNonEmptyArray,
25
24
  isPositiveInteger,
26
25
  } from '../../util/util.js';
27
26
 
@@ -10,14 +10,13 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import { hasText, isNonEmptyObject } from '@adobe/spacecat-shared-utils';
13
+ import { hasText, isNonEmptyArray, isNonEmptyObject } from '@adobe/spacecat-shared-utils';
14
14
 
15
15
  import { SchemaError, SchemaValidationError } from '../../errors/index.js';
16
16
  import {
17
17
  classExtends,
18
18
  entityNameToCollectionName,
19
19
  entityNameToIdName,
20
- isNonEmptyArray,
21
20
  isPositiveInteger,
22
21
  keyNamesToMethodName,
23
22
  modelNameToEntityName,
@@ -10,7 +10,7 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import { isObject } from '@adobe/spacecat-shared-utils';
13
+ import { isNonEmptyArray, isObject } from '@adobe/spacecat-shared-utils';
14
14
 
15
15
  import ValidationError from '../errors/validation.error.js';
16
16
 
@@ -25,7 +25,6 @@ import {
25
25
  guardSet,
26
26
  guardString,
27
27
  } from './index.js';
28
- import { isNonEmptyArray } from './util.js';
29
28
 
30
29
  /**
31
30
  * Checks if a property is read-only and throws an error if it is.
@@ -80,8 +80,6 @@ const sanitizeIdAndAuditFields = (entityName, data) => {
80
80
 
81
81
  const incrementVersion = (version) => (isInteger(version) ? parseInt(version, 10) + 1 : 1);
82
82
 
83
- const isNonEmptyArray = (value) => Array.isArray(value) && value.length > 0;
84
-
85
83
  const zeroPad = (num, length) => {
86
84
  const str = String(num);
87
85
  return str.length >= length
@@ -99,7 +97,6 @@ export {
99
97
  entityNameToIdName,
100
98
  idNameToEntityName,
101
99
  incrementVersion,
102
- isNonEmptyArray,
103
100
  isPositiveInteger,
104
101
  keyNamesToIndexName,
105
102
  keyNamesToMethodName,