Skip to content

Commit 5841169

Browse files
committed
Merge remote-tracking branch 'origin' into edge-live-status
2 parents 5ef00a4 + 29c7744 commit 5841169

File tree

14 files changed

+339
-42
lines changed

14 files changed

+339
-42
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ $ npm install @adobe/spacecat-shared-http-utils
1414
$ npm install @adobe/spacecat-shared-utils
1515
```
1616

17-
## Usage
17+
## Usage
1818
See the [API documentation](docs/API.md).

package-lock.json

Lines changed: 9 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"./packages/*"
3333
],
3434
"devDependencies": {
35-
"@adobe/eslint-config-helix": "3.0.22",
35+
"@adobe/eslint-config-helix": "3.0.23",
3636
"@babel/core": "7.29.0",
3737
"@babel/eslint-parser": "7.28.6",
3838
"@babel/plugin-syntax-import-assertions": "7.28.6",

packages/spacecat-shared-data-access/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## [@adobe/spacecat-shared-data-access-v3.29.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.28.0...@adobe/spacecat-shared-data-access-v3.29.0) (2026-03-23)
2+
3+
### Features
4+
5+
* **page-citability:** add UPDATED_BY_PRERENDER and UPDATED_BY_PAGE_CITABILITY constants ([#1460](https://github.com/adobe/spacecat-shared/issues/1460)) ([dcdf2b0](https://github.com/adobe/spacecat-shared/commit/dcdf2b0af9b9426631e9363949027a267ce7d015))
6+
7+
## [@adobe/spacecat-shared-data-access-v3.28.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.27.1...@adobe/spacecat-shared-data-access-v3.28.0) (2026-03-23)
8+
9+
### Features
10+
11+
* add commerceLlmoConfig to site configuration schema ([#1459](https://github.com/adobe/spacecat-shared/issues/1459)) ([8dd4bbf](https://github.com/adobe/spacecat-shared/commit/8dd4bbfda08343b37852d627c8528016358115c9))
12+
113
## [@adobe/spacecat-shared-data-access-v3.27.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.27.0...@adobe/spacecat-shared-data-access-v3.27.1) (2026-03-21)
214

315
### Bug Fixes

packages/spacecat-shared-data-access/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adobe/spacecat-shared-data-access",
3-
"version": "3.27.1",
3+
"version": "3.29.0",
44
"description": "Shared modules of the Spacecat Services - Data Access",
55
"type": "module",
66
"engines": {

packages/spacecat-shared-data-access/src/models/page-citability/page-citability.model.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ class PageCitability extends BaseModel {
2323

2424
static DEFAULT_UPDATED_BY = 'spacecat';
2525

26+
static UPDATED_BY_PRERENDER = 'prerender';
27+
28+
static UPDATED_BY_PAGE_CITABILITY = 'page-citability';
29+
2630
// add any custom methods or overrides here
2731
}
2832

packages/spacecat-shared-data-access/src/models/site/config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,18 @@ export const configSchema = Joi.object({
383383
}),
384384
).optional(),
385385
}).optional(),
386+
commerceLlmoConfig: Joi.object().pattern(
387+
Joi.string(),
388+
Joi.object({
389+
environmentId: Joi.string().optional(),
390+
websiteCode: Joi.string().optional(),
391+
storeCode: Joi.string().optional(),
392+
storeViewCode: Joi.string().optional(),
393+
hostName: Joi.string().optional(),
394+
magentoEndpoint: Joi.string().uri().optional(),
395+
magentoAPIKey: Joi.string().optional(),
396+
}),
397+
).optional(),
386398
contentAiConfig: Joi.object({
387399
index: Joi.string().optional(),
388400
}).optional(),
@@ -494,6 +506,7 @@ export const Config = (data = {}) => {
494506
self.getLlmoCdnBucketConfig = () => state?.llmo?.cdnBucketConfig;
495507
self.getTokowakaConfig = () => state?.tokowakaConfig;
496508
self.getEdgeOptimizeConfig = () => state?.edgeOptimizeConfig;
509+
self.getCommerceLlmoConfig = () => state?.commerceLlmoConfig;
497510
self.updateSlackConfig = (channel, workspace, invitedUserCount) => {
498511
state.slack = {
499512
channel,
@@ -814,6 +827,10 @@ export const Config = (data = {}) => {
814827
state.edgeOptimizeConfig = edgeOptimizeConfig;
815828
};
816829

830+
self.updateCommerceLlmoConfig = (commerceLlmoConfig) => {
831+
state.commerceLlmoConfig = commerceLlmoConfig;
832+
};
833+
817834
return Object.freeze(self);
818835
};
819836

@@ -831,4 +848,5 @@ Config.toDynamoItem = (config) => ({
831848
llmo: config.getLlmoConfig(),
832849
tokowakaConfig: config.getTokowakaConfig(),
833850
edgeOptimizeConfig: config.getEdgeOptimizeConfig(),
851+
commerceLlmoConfig: config.getCommerceLlmoConfig?.(),
834852
});

packages/spacecat-shared-data-access/test/unit/models/page-citability/page-citability.collection.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,12 @@ describe('PageCitabilityCollection', () => {
6565
expect(model).to.be.an('object');
6666
});
6767
});
68+
69+
describe('static constants', () => {
70+
it('exposes updatedBy source constants', () => {
71+
expect(PageCitability.DEFAULT_UPDATED_BY).to.equal('spacecat');
72+
expect(PageCitability.UPDATED_BY_PRERENDER).to.equal('prerender');
73+
expect(PageCitability.UPDATED_BY_PAGE_CITABILITY).to.equal('page-citability');
74+
});
75+
});
6876
});

packages/spacecat-shared-data-access/test/unit/models/site/config.test.js

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2763,6 +2763,82 @@ describe('Config Tests', () => {
27632763
});
27642764
});
27652765

2766+
describe('Commerce LLMO Config', () => {
2767+
it('creates a Config with commerceLlmoConfig property', () => {
2768+
const data = {
2769+
commerceLlmoConfig: {
2770+
store1: {
2771+
environmentId: 'env-123',
2772+
websiteCode: 'base',
2773+
storeCode: 'main_store',
2774+
storeViewCode: 'default',
2775+
hostName: 'example.com',
2776+
magentoEndpoint: 'https://magento.example.com/graphql',
2777+
magentoAPIKey: 'api-key-123',
2778+
},
2779+
},
2780+
};
2781+
const config = Config(data);
2782+
expect(config.getCommerceLlmoConfig()).to.deep.equal(data.commerceLlmoConfig);
2783+
});
2784+
2785+
it('has undefined commerceLlmoConfig in default config', () => {
2786+
const config = Config();
2787+
expect(config.getCommerceLlmoConfig()).to.be.undefined;
2788+
});
2789+
2790+
it('should return undefined for commerceLlmoConfig if not provided', () => {
2791+
const config = Config({});
2792+
expect(config.getCommerceLlmoConfig()).to.be.undefined;
2793+
});
2794+
2795+
it('should be able to update commerceLlmoConfig', () => {
2796+
const data = {
2797+
commerceLlmoConfig: {
2798+
store1: {
2799+
environmentId: 'env-456',
2800+
websiteCode: 'base',
2801+
},
2802+
},
2803+
};
2804+
const config = Config({});
2805+
config.updateCommerceLlmoConfig(data.commerceLlmoConfig);
2806+
expect(config.getCommerceLlmoConfig()).to.deep.equal(data.commerceLlmoConfig);
2807+
});
2808+
2809+
it('should be able to update commerceLlmoConfig with different values', () => {
2810+
const config = Config({
2811+
commerceLlmoConfig: {
2812+
store1: {
2813+
environmentId: 'env-123',
2814+
},
2815+
},
2816+
});
2817+
2818+
const newConfig = {
2819+
store2: {
2820+
environmentId: 'env-789',
2821+
hostName: 'new.example.com',
2822+
},
2823+
};
2824+
config.updateCommerceLlmoConfig(newConfig);
2825+
expect(config.getCommerceLlmoConfig()).to.deep.equal(newConfig);
2826+
});
2827+
2828+
it('includes commerceLlmoConfig in toDynamoItem conversion', () => {
2829+
const data = Config({
2830+
commerceLlmoConfig: {
2831+
store1: {
2832+
environmentId: 'env-123',
2833+
magentoEndpoint: 'https://magento.example.com/graphql',
2834+
},
2835+
},
2836+
});
2837+
const dynamoItem = Config.toDynamoItem(data);
2838+
expect(dynamoItem.commerceLlmoConfig).to.deep.equal(data.getCommerceLlmoConfig());
2839+
});
2840+
});
2841+
27662842
describe('LLMO Well Known Tags', () => {
27672843
const { extractWellKnownTags } = Config();
27682844

packages/spacecat-shared-utils/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [@adobe/spacecat-shared-utils-v1.106.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.105.1...@adobe/spacecat-shared-utils-v1.106.0) (2026-03-23)
2+
3+
### Features
4+
5+
* strategy schema update ([#1452](https://github.com/adobe/spacecat-shared/issues/1452)) ([bcc9404](https://github.com/adobe/spacecat-shared/commit/bcc9404aca3d297de64e23442c8ec5186671275e))
6+
17
## [@adobe/spacecat-shared-utils-v1.105.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.105.0...@adobe/spacecat-shared-utils-v1.105.1) (2026-03-21)
28

39
### Bug Fixes

0 commit comments

Comments
 (0)