gatsby-core-theme 12.0.4-beta.2 → 12.0.4
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 +3 -13
- package/gatsby-node.esm.js +35 -37
- package/package.json +1 -1
- package/src/helpers/generators.js +3 -7
- package/src/helpers/getters.js +2 -2
- package/src/helpers/schema.js +201 -360
- package/src/helpers/schema.test.js +358 -151
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
## [12.0.4
|
|
1
|
+
## [12.0.4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v12.0.3...v12.0.4) (2022-10-13)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* old schema ([9650bd5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/9650bd5e149cbf5f917d41564e2b7bfaa7eee8ea))
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
* Merge branch 'tm-
|
|
10
|
-
|
|
11
|
-
## [12.0.4-beta.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v12.0.3...v12.0.4-beta.1) (2022-10-12)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### Bug Fixes
|
|
15
|
-
|
|
16
|
-
* chnaged logic for live stream tracker links ([5efb851](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5efb851401b8f99722ef2491514d2f08329ecef7))
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* Merge branch 'tm-3082-tracker-links' into 'beta' ([109371d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/109371d239ca8765afa649227a858a4ae2edc174))
|
|
9
|
+
* Merge branch 'tm-2833-old-schema' into 'master' ([ed9e83e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ed9e83e26392f5f7d58e8427c6f0c8cdc4ef9037))
|
|
20
10
|
|
|
21
11
|
## [12.0.3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v12.0.2...v12.0.3) (2022-10-10)
|
|
22
12
|
|
package/gatsby-node.esm.js
CHANGED
|
@@ -291,7 +291,7 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
|
|
|
291
291
|
{}
|
|
292
292
|
).forEach((providerId) => {
|
|
293
293
|
const provider = processed.relations.sports_data.providers[providerId];
|
|
294
|
-
const tracker = generateTrackerLink(provider, 'main'
|
|
294
|
+
const tracker = generateTrackerLink(provider, 'main');
|
|
295
295
|
const trackerPageObject = {
|
|
296
296
|
meta_title: 'Tracker',
|
|
297
297
|
template: 'tracker',
|
|
@@ -309,47 +309,45 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
|
|
|
309
309
|
siteInfo,
|
|
310
310
|
provider,
|
|
311
311
|
isTracker: true,
|
|
312
|
-
isLiveStreamProvider: true,
|
|
313
312
|
meta_robots: ['noindex', 'nofollow'],
|
|
314
313
|
},
|
|
315
314
|
});
|
|
316
315
|
});
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}
|
|
316
|
+
} else {
|
|
317
|
+
Object.keys(operators || {}).forEach((operatorId) => {
|
|
318
|
+
const operator = operators[operatorId];
|
|
319
|
+
const trackerLinks = Object.keys(operator.links);
|
|
320
|
+
const tracker = trackerLinks.map((key) =>
|
|
321
|
+
operator.links[key]
|
|
322
|
+
? generateTrackerLink(operator, key).toLowerCase().replace(' ', '_')
|
|
323
|
+
: null
|
|
324
|
+
);
|
|
325
|
+
tracker.forEach((trackerPath) => {
|
|
326
|
+
// Create splash page
|
|
327
|
+
if (trackerPath) {
|
|
328
|
+
const trackerPageObject = {
|
|
329
|
+
meta_title: 'Tracker',
|
|
330
|
+
template: 'tracker',
|
|
331
|
+
title: 'Tracker',
|
|
332
|
+
type: 'page',
|
|
333
|
+
language: languageKey,
|
|
334
|
+
path: trackerPath,
|
|
335
|
+
meta_robots: ['noindex', 'nofollow'],
|
|
336
|
+
};
|
|
337
|
+
createPage({
|
|
338
|
+
path: trackerPath,
|
|
339
|
+
component: require.resolve('./src/components/app.js'),
|
|
340
|
+
context: {
|
|
341
|
+
page: trackerPageObject,
|
|
342
|
+
siteInfo,
|
|
343
|
+
operator,
|
|
344
|
+
isTracker: true,
|
|
345
|
+
},
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
});
|
|
351
349
|
});
|
|
352
|
-
}
|
|
350
|
+
}
|
|
353
351
|
};
|
|
354
352
|
|
|
355
353
|
exports.onCreatePage = ({ page, actions }) => {
|
package/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { months } from '../constants/common';
|
|
2
2
|
|
|
3
|
-
export function generateTrackerLink(operator, trackerType
|
|
4
|
-
const defaultTrackerFormat =
|
|
5
|
-
|
|
6
|
-
: process.env.TRACKER_LINK_FORMAT_MAIN;
|
|
7
|
-
const trackerFormat = provider
|
|
8
|
-
? process.env.PROVIDER_TRACKER_LINK_FORMAT_NON_MAIN
|
|
9
|
-
: process.env.TRACKER_LINK_FORMAT_NON_MAIN;
|
|
3
|
+
export function generateTrackerLink(operator, trackerType) {
|
|
4
|
+
const defaultTrackerFormat = process.env.TRACKER_LINK_FORMAT_MAIN;
|
|
5
|
+
const trackerFormat = process.env.TRACKER_LINK_FORMAT_NON_MAIN;
|
|
10
6
|
|
|
11
7
|
if (defaultTrackerFormat && trackerFormat) {
|
|
12
8
|
const linkFormatArray =
|
package/src/helpers/getters.js
CHANGED
|
@@ -177,7 +177,7 @@ export function getPageImage(page) {
|
|
|
177
177
|
return null;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
export function prettyTracker(operator, trackerType = 'main'
|
|
180
|
+
export function prettyTracker(operator, trackerType = 'main') {
|
|
181
181
|
if (!operator || !operator.short_name) {
|
|
182
182
|
return null;
|
|
183
183
|
}
|
|
@@ -190,7 +190,7 @@ export function prettyTracker(operator, trackerType = 'main', provider = false)
|
|
|
190
190
|
trackerType = 'main';
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
return generateTrackerLink(operator, trackerType
|
|
193
|
+
return generateTrackerLink(operator, trackerType);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
export function getBonus(name, operator) {
|