@adobe/spacecat-shared-data-access 2.26.0 → 2.27.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,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v2.27.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.26.0...@adobe/spacecat-shared-data-access-v2.27.0) (2025-06-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* added `getDisabledAuditsForSite` for slack command ([#812](https://github.com/adobe/spacecat-shared/issues/812)) ([56ab4b4](https://github.com/adobe/spacecat-shared/commit/56ab4b4bd76ec8edac9b9219b725b1442d11ef14))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-data-access-v2.26.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.25.0...@adobe/spacecat-shared-data-access-v2.26.0) (2025-06-19)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -73,6 +73,17 @@ class Configuration extends BaseModel {
|
|
|
73
73
|
.map((job) => job.type);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
getDisabledAuditsForSite(site) {
|
|
77
|
+
const disabledHandlers = new Set(
|
|
78
|
+
Object.keys(this.getHandlers() || {})
|
|
79
|
+
.filter((handler) => !this.isHandlerEnabledForSite(handler, site)),
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
return (this.getJobs() || [])
|
|
83
|
+
.filter((job) => job.group === 'audits' && disabledHandlers.has(job.type))
|
|
84
|
+
.map((job) => job.type);
|
|
85
|
+
}
|
|
86
|
+
|
|
76
87
|
isHandlerEnabledForSite(type, site) {
|
|
77
88
|
const handler = this.getHandlers()?.[type];
|
|
78
89
|
if (!handler) return false;
|
|
@@ -23,6 +23,7 @@ export interface Configuration extends BaseModel {
|
|
|
23
23
|
getConfigurationId(): string;
|
|
24
24
|
getEnabledSiteIdsForHandler(type: string): string[];
|
|
25
25
|
getEnabledAuditsForSite(site: Site): string[];
|
|
26
|
+
getDisabledAuditsForSite(site: Site): string[];
|
|
26
27
|
getHandler(type: string): object | undefined;
|
|
27
28
|
getHandlers(): object;
|
|
28
29
|
getJobs(): object;
|