@adobe/spacecat-shared-data-access 2.70.0 → 2.71.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.71.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.70.0...@adobe/spacecat-shared-data-access-v2.71.0) (2025-10-10)
2
+
3
+
4
+ ### Features
5
+
6
+ * adding a new code config in Site ([#980](https://github.com/adobe/spacecat-shared/issues/980)) ([67aed42](https://github.com/adobe/spacecat-shared/commit/67aed425c43f2fdb9c7c51053b7ee4a726f545d9))
7
+
1
8
  # [@adobe/spacecat-shared-data-access-v2.70.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.69.2...@adobe/spacecat-shared-data-access-v2.70.0) (2025-10-10)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "2.70.0",
3
+ "version": "2.71.0",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -12,6 +12,9 @@
12
12
  "scripts": {
13
13
  "test:it": "mocha --require ./test/it/fixtures.js --spec \"test/it/**/*.test.js\"",
14
14
  "test": "c8 mocha --spec \"test/unit/**/*.test.js\"",
15
+ "test:debug": "mocha --inspect-brk --require ./test/setup-env.js --spec \"test/unit/**/*.test.js\"",
16
+ "test:debug:config": "mocha --inspect-brk --require ./test/setup-env.js --spec \"test/unit/models/site/config.test.js\"",
17
+ "test:debug:grep": "mocha --inspect-brk --require ./test/setup-env.js --grep",
15
18
  "lint": "eslint .",
16
19
  "lint:fix": "eslint --fix .",
17
20
  "clean": "rm -rf package-lock.json node_modules"
@@ -27,6 +27,7 @@ export const IMPORT_TYPES = {
27
27
  CWV_WEEKLY: 'cwv-weekly',
28
28
  TRAFFIC_ANALYSIS: 'traffic-analysis',
29
29
  TOP_FORMS: 'top-forms',
30
+ CODE: 'code',
30
31
  USER_ENGAGEMENT: 'user-engagement',
31
32
  };
32
33
 
@@ -76,6 +76,20 @@ const schema = new SchemaBuilder(Site, SiteCollection)
76
76
  validate: (value) => isNonEmptyObject(validateConfiguration(value)),
77
77
  get: (value) => Config(value),
78
78
  })
79
+ .addAttribute('code', {
80
+ type: 'any',
81
+ required: false,
82
+ default: {},
83
+ validate: (value) => isObject(value),
84
+ properties: {
85
+ type: { type: 'string', required: true },
86
+ owner: { type: 'string', required: true },
87
+ repo: { type: 'string', required: true },
88
+ ref: { type: 'string', required: true },
89
+ installationId: { type: 'string', required: false },
90
+ url: { type: 'string', required: true, validate: (value) => isValidUrl(value) },
91
+ },
92
+ })
79
93
  .addAttribute('deliveryType', {
80
94
  type: Object.values(Site.DELIVERY_TYPES),
81
95
  default: Site.DEFAULT_DELIVERY_TYPE,