Skip to content

Commit

Permalink
Revert "Remove Event page queries from Content Build (#2368)"
Browse files Browse the repository at this point in the history
This reverts commit e4e2719.
  • Loading branch information
timcosgrove authored Dec 12, 2024
1 parent 2528a35 commit 2eeeab1
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 37 deletions.
26 changes: 0 additions & 26 deletions src/site/constants/brokenLinkIgnorePatterns.js

This file was deleted.

20 changes: 20 additions & 0 deletions src/site/stages/build/drupal/graphql/CountEntityTypes.graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,26 @@ const CountEntityTypes = `
count
}
eventListing: nodeQuery(
filter: {
conditions: [
{field: "status", value: ["1"]},
{field: "type", value: ["event_listing"]}
]}
) {
count
}
event: nodeQuery(
filter: {
conditions: [
{field: "status", value: ["1"]},
{field: "type", value: ["event"]}
]}
) {
count
}
healthCareRegionDetailPage: nodeQuery(
filter: {
conditions: [
Expand Down
3 changes: 2 additions & 1 deletion src/site/stages/build/drupal/graphql/GetAllPages.graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ const buildQuery = () => {
... nodeOffice
... bioPage
... benefitListingPage
... nodeEventListing
... nodeEvent
... storyListingPage
... leadershipListingPage
... pressReleasesListingPage
Expand Down
8 changes: 8 additions & 0 deletions src/site/stages/build/drupal/individual-queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ const {
GetNodePressReleaseListingPages,
} = require('./graphql/pressReleasesListingPage.graphql');

const {
getNodeEventListingQueries,
} = require('./graphql/nodeEventListing.graphql');

const { getNodeEventQueries } = require('./graphql/nodeEvent.graphql');

const {
GetNodeStoryListingPages,
} = require('./graphql/storyListingPage.graphql');
Expand Down Expand Up @@ -112,6 +118,8 @@ function getNodeQueries(entityCounts) {
...getNewsStoryQueries(entityCounts),
...getPressReleaseQueries(entityCounts),
GetNodePressReleaseListingPages,
...getNodeEventListingQueries(entityCounts),
...getNodeEventQueries(entityCounts),
...getVaPoliceQueries(entityCounts),
GetNodeStoryListingPages,
GetNodeLocationsListingPages,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
const path = require('path');
const url = require('url');
const {
IGNORE_PATTERNS,
} = require('../../../../../../constants/brokenLinkIgnorePatterns');

/**
* Validates an HREF/SRC value
Expand All @@ -27,13 +24,6 @@ function isBrokenLink(link, pagePath, allPaths) {

let filePath = decodeURIComponent(parsed.pathname);

// Check for link destinations we are not testing.
for (let i = 0; i < IGNORE_PATTERNS.length; i += 1) {
if (filePath.match(IGNORE_PATTERNS[i])) {
return false;
}
}

if (path.isAbsolute(filePath)) {
filePath = path.join('.', filePath);
} else {
Expand All @@ -43,6 +33,7 @@ function isBrokenLink(link, pagePath, allPaths) {
if (!path.extname(filePath)) {
filePath = path.join(filePath, 'index.html');
}

return !allPaths.has(filePath);
}

Expand Down

0 comments on commit 2eeeab1

Please sign in to comment.