gatsby-core-theme 44.1.2 → 44.1.3

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,21 @@
1
+ ## [44.1.3](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.1.2...v44.1.3) (2025-05-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add an extra checker on transformoperators function ([0632e38](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/0632e3825aa5b8fda7627a656cf21e078582547c))
7
+ * add an extra checker on transformoperators function ([0ff5fba](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/0ff5fba1dd389fe744c6de58b61e4be51802ebe1))
8
+ * add validation ([b874e99](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/b874e996adaf2073d9adae34f4c2de99265dff01))
9
+ * add validation for robot options if they are in the context ([a3dc82b](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/a3dc82bbbe5c9c4c0e772660f7df98de9686fbda))
10
+ * merge master branch ([d896981](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/d896981ad580d81415940a8d27abf876da1c1dcb))
11
+ * remove review link from the processTOplist function ([80dc65c](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/80dc65c7fc54ec69a5a53e5f0b75f2fda7229bbe))
12
+ * update operator processor to include review link ([2d1543a](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/2d1543a779d233103ceebc0157eb69f0fec7a10f))
13
+ * update operator tests to include a check for review link ([4cacea3](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/4cacea34198393d0bab4616f8ea0ff89d05b4bb1))
14
+
15
+
16
+ * Merge branch 'update-operator-processor' into 'master' ([ba744c3](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/ba744c372938212fd254001563354146e3534d0f))
17
+ * Merge branch 'fix-head-bug' into 'master' ([376a699](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/376a69988ed8292ac9d38e2884a96218afd13a30))
18
+
1
19
  ## [44.1.2](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.1.1...v44.1.2) (2025-05-28)
2
20
 
3
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "44.1.2",
3
+ "version": "44.1.3",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -12,7 +12,7 @@ export default (page, isTracker) => {
12
12
  const metaTitle = transformMetaTitle(relation, meta_title, relation_type);
13
13
  const twitterUsername = getTwitterUsername(page.siteSchema?.twitter);
14
14
 
15
-
15
+
16
16
  return [
17
17
  { type: "meta", name: "description", content: page.meta_description },
18
18
  {
@@ -123,15 +123,19 @@ export const fetchSiteSettings = async (siteName, previewPath = null) => {
123
123
  jackpot_data: transformGamesJackpot(gamesJackpotData)
124
124
  });
125
125
 
126
- const operatorData = transformOperators(operators, {
127
- payments: paymentData,
128
- ribbons: ribbonsData,
129
- countries: countriesData,
130
- currencies: currenciesData,
131
- providers: providersData,
132
- games: gamesData,
133
- gamblingCompanies: gamblingCompaniesData,
134
- });
126
+ const operatorData = transformOperators(
127
+ operators,
128
+ {
129
+ payments: paymentData,
130
+ ribbons: ribbonsData,
131
+ countries: countriesData,
132
+ currencies: currenciesData,
133
+ providers: providersData,
134
+ games: gamesData,
135
+ gamblingCompanies: gamblingCompaniesData,
136
+ },
137
+ pagesData
138
+ );
135
139
 
136
140
  const cryptoExchangesData = transformCryptosData(cryptoExchanges, {
137
141
  countries: countriesData,
@@ -35,6 +35,7 @@ export function getCanonicalUrl(page, isTracker) {
35
35
  }
36
36
 
37
37
  export function getRobotOptions(options) {
38
+ if (!options) return null;
38
39
  const array = [];
39
40
  if (
40
41
  !options &&
@@ -60,10 +60,14 @@ export function sanitizeOperatorData(operator, operatorPage = [], data = [], top
60
60
  operatorClone.updatedAt = operatorPage[0].updated_at;
61
61
  }
62
62
 
63
+ if (operatorPage.length >= 1) {
64
+ operatorClone.review_link = operatorPage[0].path
65
+ }
66
+
63
67
  return pick(operatorClone, toplistLabel && toplistLabel.includes('simplified') ? pickRelationKeys.operator_simplified : pickRelationKeys.operator);
64
68
  }
65
69
 
66
- export function transformOperators(jsonData, relationsData) {
70
+ export function transformOperators(jsonData, relationsData, pages) {
67
71
  const operators = {};
68
72
 
69
73
  // Iterate over each operator
@@ -141,10 +145,16 @@ export function transformOperators(jsonData, relationsData) {
141
145
  newOperatorData.game_provider_ids,
142
146
  relationsData.providers
143
147
  );
148
+ const operatorPage = Object.values(pages).filter(
149
+ (page) =>
150
+ page.relation_type === "operator" && page.type === 'operator' &&
151
+ page.relation_id === newOperatorData.id
144
152
 
153
+ );
154
+
145
155
  operators[affiliate.id] = sanitizeOperatorData(
146
156
  newOperatorData,
147
- [],
157
+ operatorPage,
148
158
  relationsData
149
159
  );
150
160
  });
@@ -17,6 +17,7 @@ describe("Sanitize Operator Data", () => {
17
17
  expect(sanitizedOperator.deposit_methods).toHaveLength(2);
18
18
  expect(sanitizedOperator.ribbons).toHaveLength(1);
19
19
  expect(sanitizedOperator.ribbons[0]).toBe('testRibbon');
20
+ expect(sanitizedOperator.review_link).toBe('sport/brand');
20
21
  });
21
22
  test("Handles missing optional fields gracefully", () => {
22
23
  const operatorData = {