@adobe/spacecat-shared-data-access 1.31.0 → 1.33.0
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,22 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v1.33.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.32.0...@adobe/spacecat-shared-data-access-v1.33.0) (2024-06-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* getSitesByOrganizationID performance ([485818f](https://github.com/adobe/spacecat-shared/commit/485818f846c1ceb0e50b32f531bd2e438cee7614))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* introduce fixed URLs in audit type config ([#272](https://github.com/adobe/spacecat-shared/issues/272)) ([07858a9](https://github.com/adobe/spacecat-shared/commit/07858a95ce457f395fd2c4269d79b445f34de504))
|
|
12
|
+
|
|
13
|
+
# [@adobe/spacecat-shared-data-access-v1.32.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.31.0...@adobe/spacecat-shared-data-access-v1.32.0) (2024-06-20)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **audit-configs:** ess audits disabled by default ([#271](https://github.com/adobe/spacecat-shared/issues/271)) ([de6f83d](https://github.com/adobe/spacecat-shared/commit/de6f83db75135820b236d55d7d2b477f29ca5e43))
|
|
19
|
+
|
|
1
20
|
# [@adobe/spacecat-shared-data-access-v1.31.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.30.0...@adobe/spacecat-shared-data-access-v1.31.0) (2024-06-20)
|
|
2
21
|
|
|
3
22
|
|
package/package.json
CHANGED
package/src/models/audit.js
CHANGED
|
@@ -22,6 +22,8 @@ export const AUDIT_TYPE_ORGANIC_TRAFFIC = 'organic-traffic';
|
|
|
22
22
|
export const AUDIT_TYPE_CWV = 'cwv';
|
|
23
23
|
export const AUDIT_TYPE_LHS_DESKTOP = 'lhs-desktop';
|
|
24
24
|
export const AUDIT_TYPE_LHS_MOBILE = 'lhs-mobile';
|
|
25
|
+
export const AUDIT_TYPE_EXPERIMENTATION_ESS_MONTHLY = 'experimentation-ess-monthly';
|
|
26
|
+
export const AUDIT_TYPE_EXPERIMENTATION_ESS_DAILY = 'experimentation-ess-daily';
|
|
25
27
|
|
|
26
28
|
const EXPIRES_IN_DAYS = 30;
|
|
27
29
|
|
|
@@ -15,6 +15,7 @@ const AuditConfigType = (data = {}) => {
|
|
|
15
15
|
disabled: data.disabled || false,
|
|
16
16
|
excludedURLs: data.excludedURLs || [],
|
|
17
17
|
manualOverwrites: data.manualOverwrites || [],
|
|
18
|
+
fixedURLs: data.fixedURLs || [],
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
const self = {
|
|
@@ -27,6 +28,10 @@ const AuditConfigType = (data = {}) => {
|
|
|
27
28
|
updateManualOverwrites: (manualOverwrites) => {
|
|
28
29
|
state.manualOverwrites = manualOverwrites;
|
|
29
30
|
},
|
|
31
|
+
getFixedURLs: () => state.fixedURLs,
|
|
32
|
+
updateFixedURLs: (fixedURLs) => {
|
|
33
|
+
state.fixedURLs = fixedURLs;
|
|
34
|
+
},
|
|
30
35
|
updateDisabled: (newValue) => {
|
|
31
36
|
state.disabled = newValue;
|
|
32
37
|
},
|
|
@@ -40,6 +45,7 @@ AuditConfigType.fromDynamoItem = (dynamoItem) => {
|
|
|
40
45
|
disabled: dynamoItem.disabled,
|
|
41
46
|
excludedURLs: dynamoItem.excludedURLs,
|
|
42
47
|
manualOverwrites: dynamoItem.manualOverwrites,
|
|
48
|
+
fixedURLs: dynamoItem.fixedURLs,
|
|
43
49
|
};
|
|
44
50
|
return AuditConfigType(auditConfigTypeData);
|
|
45
51
|
};
|
|
@@ -48,6 +54,7 @@ AuditConfigType.toDynamoItem = (auditConfigType) => ({
|
|
|
48
54
|
disabled: auditConfigType.disabled(),
|
|
49
55
|
excludedURLs: auditConfigType.getExcludedURLs(),
|
|
50
56
|
manualOverwrites: auditConfigType.getManualOverwrites(),
|
|
57
|
+
fixedURLs: auditConfigType.getFixedURLs(),
|
|
51
58
|
});
|
|
52
59
|
|
|
53
60
|
export default AuditConfigType;
|
|
@@ -13,12 +13,16 @@
|
|
|
13
13
|
import AuditConfigType from './audit-config-type.js';
|
|
14
14
|
import {
|
|
15
15
|
AUDIT_TYPE_BROKEN_BACKLINKS,
|
|
16
|
+
AUDIT_TYPE_EXPERIMENTATION_ESS_DAILY,
|
|
17
|
+
AUDIT_TYPE_EXPERIMENTATION_ESS_MONTHLY,
|
|
16
18
|
AUDIT_TYPE_ORGANIC_KEYWORDS,
|
|
17
19
|
AUDIT_TYPE_ORGANIC_TRAFFIC,
|
|
18
20
|
} from '../audit.js';
|
|
19
21
|
|
|
20
22
|
const AUDIT_TYPE_DISABLED_DEFAULTS = {
|
|
21
23
|
[AUDIT_TYPE_BROKEN_BACKLINKS]: true,
|
|
24
|
+
[AUDIT_TYPE_EXPERIMENTATION_ESS_DAILY]: true,
|
|
25
|
+
[AUDIT_TYPE_EXPERIMENTATION_ESS_MONTHLY]: true,
|
|
22
26
|
[AUDIT_TYPE_ORGANIC_KEYWORDS]: true,
|
|
23
27
|
[AUDIT_TYPE_ORGANIC_TRAFFIC]: true,
|
|
24
28
|
};
|
|
@@ -27,6 +31,8 @@ function getAuditTypeConfigs(auditTypeConfigs, auditsDisabled) {
|
|
|
27
31
|
if (!auditTypeConfigs || Object.keys(auditTypeConfigs).length === 0) {
|
|
28
32
|
return {
|
|
29
33
|
[AUDIT_TYPE_BROKEN_BACKLINKS]: AuditConfigType({ disabled: true }),
|
|
34
|
+
[AUDIT_TYPE_EXPERIMENTATION_ESS_DAILY]: AuditConfigType({ disabled: true }),
|
|
35
|
+
[AUDIT_TYPE_EXPERIMENTATION_ESS_MONTHLY]: AuditConfigType({ disabled: true }),
|
|
30
36
|
[AUDIT_TYPE_ORGANIC_KEYWORDS]: AuditConfigType({ disabled: true }),
|
|
31
37
|
[AUDIT_TYPE_ORGANIC_TRAFFIC]: AuditConfigType({ disabled: true }),
|
|
32
38
|
};
|
|
@@ -35,6 +35,10 @@ export const configSchema = Joi.object({
|
|
|
35
35
|
brokenTargetURL: Joi.string().optional(),
|
|
36
36
|
targetURL: Joi.string().optional(),
|
|
37
37
|
})).optional(),
|
|
38
|
+
fixedURLs: Joi.array().items(Joi.object({
|
|
39
|
+
brokenTargetURL: Joi.string().optional(),
|
|
40
|
+
targetURL: Joi.string().optional(),
|
|
41
|
+
})).optional(),
|
|
38
42
|
}).unknown(true),
|
|
39
43
|
).unknown(true),
|
|
40
44
|
}).unknown(true),
|