@parameter1/base-cms-marko-web 4.3.0 → 4.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. package/components/browser-component.marko.js +2 -2
  2. package/components/document/components/body-wrapper.marko.js +2 -2
  3. package/components/document/components/error.marko.js +2 -2
  4. package/components/document/components/live-reload.marko.js +2 -2
  5. package/components/document/components/polyfill.marko.js +2 -2
  6. package/components/document/container.marko.js +2 -2
  7. package/components/document/index.marko.js +2 -2
  8. package/components/element/array.marko.js +2 -2
  9. package/components/element/audio.marko.js +2 -2
  10. package/components/element/block.marko.js +2 -2
  11. package/components/element/clear.marko.js +2 -2
  12. package/components/element/components/image.marko.js +2 -2
  13. package/components/element/components/text.marko.js +2 -2
  14. package/components/element/content/address1.marko.js +2 -2
  15. package/components/element/content/address2.marko.js +2 -2
  16. package/components/element/content/audio.marko.js +2 -2
  17. package/components/element/content/authors.marko.js +2 -2
  18. package/components/element/content/body.marko.js +2 -2
  19. package/components/element/content/byline.marko.js +2 -2
  20. package/components/element/content/city-state-zip.marko.js +2 -2
  21. package/components/element/content/contributors.marko.js +2 -2
  22. package/components/element/content/country.marko.js +2 -2
  23. package/components/element/content/embed-code.marko.js +2 -2
  24. package/components/element/content/end-date.marko.js +2 -2
  25. package/components/element/content/ends.marko.js +2 -2
  26. package/components/element/content/fax.marko.js +2 -2
  27. package/components/element/content/images.marko.js +2 -2
  28. package/components/element/content/mobile.marko.js +2 -2
  29. package/components/element/content/name.marko.js +2 -2
  30. package/components/element/content/phone.marko.js +2 -2
  31. package/components/element/content/photographers.marko.js +2 -2
  32. package/components/element/content/public-email.marko.js +2 -2
  33. package/components/element/content/published.marko.js +2 -2
  34. package/components/element/content/short-name.marko.js +2 -2
  35. package/components/element/content/sidebar-stubs.marko.js +2 -2
  36. package/components/element/content/sidebars.marko.js +2 -2
  37. package/components/element/content/source.marko.js +2 -2
  38. package/components/element/content/sponsors.marko.js +2 -2
  39. package/components/element/content/start-date.marko.js +2 -2
  40. package/components/element/content/starts.marko.js +2 -2
  41. package/components/element/content/teaser.marko.js +2 -2
  42. package/components/element/content/title.marko.js +2 -2
  43. package/components/element/content/tollfree.marko.js +2 -2
  44. package/components/element/content/transcript.marko.js +2 -2
  45. package/components/element/content/website.marko.js +2 -2
  46. package/components/element/date.marko.js +2 -2
  47. package/components/element/image/caption.marko.js +2 -2
  48. package/components/element/image/credit.marko.js +2 -2
  49. package/components/element/image/display-name.marko.js +2 -2
  50. package/components/element/image/slider.marko.js +2 -2
  51. package/components/element/img.marko.js +2 -2
  52. package/components/element/index.marko.js +2 -2
  53. package/components/element/link.marko.js +2 -2
  54. package/components/element/magazine-issue/description.marko.js +2 -2
  55. package/components/element/magazine-issue/digital-edition-url.marko.js +2 -2
  56. package/components/element/magazine-issue/name.marko.js +2 -2
  57. package/components/element/magazine-issue/pdf-url.marko.js +2 -2
  58. package/components/element/magazine-publication/cancel-url.marko.js +2 -2
  59. package/components/element/magazine-publication/change-address-url.marko.js +2 -2
  60. package/components/element/magazine-publication/description.marko.js +2 -2
  61. package/components/element/magazine-publication/einquiry-url.marko.js +2 -2
  62. package/components/element/magazine-publication/name.marko.js +2 -2
  63. package/components/element/magazine-publication/renewal-url.marko.js +2 -2
  64. package/components/element/magazine-publication/reprints-url.marko.js +2 -2
  65. package/components/element/magazine-publication/subscribe-url.marko.js +2 -2
  66. package/components/element/obj-array.marko.js +2 -2
  67. package/components/element/obj-audio.marko.js +2 -2
  68. package/components/element/obj-date.marko.js +2 -2
  69. package/components/element/obj-nodes.marko.js +2 -2
  70. package/components/element/obj-text.marko.js +2 -2
  71. package/components/element/obj.marko.js +2 -2
  72. package/components/element/picture.marko.js +2 -2
  73. package/components/element/text.marko.js +2 -2
  74. package/components/element/website-section/description.marko.js +2 -2
  75. package/components/element/website-section/hierarchy.marko.js +2 -2
  76. package/components/element/website-section/name.marko.js +2 -2
  77. package/components/load-more/index.marko.js +2 -2
  78. package/components/load-more/trigger.marko.js +2 -2
  79. package/components/node/body.marko.js +2 -2
  80. package/components/node/element.marko.js +2 -2
  81. package/components/node/footer.marko.js +2 -2
  82. package/components/node/header.marko.js +2 -2
  83. package/components/node/image-inner-wrapper.marko.js +2 -2
  84. package/components/node/image-wrapper.marko.js +2 -2
  85. package/components/node/image.marko.js +2 -2
  86. package/components/node/index.marko.js +2 -2
  87. package/components/node-list/body.marko.js +2 -2
  88. package/components/node-list/element.marko.js +2 -2
  89. package/components/node-list/footer.marko.js +2 -2
  90. package/components/node-list/header.marko.js +2 -2
  91. package/components/node-list/index.marko.js +2 -2
  92. package/components/node-list/node.marko.js +2 -2
  93. package/components/node-list/nodes.marko.js +2 -2
  94. package/components/page/container.marko.js +2 -2
  95. package/components/page/description.marko.js +2 -2
  96. package/components/page/image.marko.js +2 -2
  97. package/components/page/layouts/content.marko.js +2 -2
  98. package/components/page/layouts/default.marko.js +2 -2
  99. package/components/page/layouts/dynamic-page.marko.js +2 -2
  100. package/components/page/layouts/magazine-issue.marko.js +2 -2
  101. package/components/page/layouts/magazine-publication.marko.js +2 -2
  102. package/components/page/layouts/website-section.marko.js +2 -2
  103. package/components/page/metadata/components/common.marko.js +2 -2
  104. package/components/page/metadata/content.marko.js +2 -2
  105. package/components/page/metadata/default.marko.js +2 -2
  106. package/components/page/metadata/dynamic-page.marko.js +2 -2
  107. package/components/page/metadata/magazine-issue.marko.js +2 -2
  108. package/components/page/metadata/magazine-publication.marko.js +2 -2
  109. package/components/page/metadata/website-section.marko.js +2 -2
  110. package/components/page/rel-canonical.marko.js +2 -2
  111. package/components/page/title.marko.js +2 -2
  112. package/components/page/wrapper.marko.js +2 -2
  113. package/components/resolve/page.marko.js +2 -2
  114. package/components/rss/website-section.marko.js +2 -2
  115. package/package.json +2 -2
  116. package/start-server.js +21 -18
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/page/layouts/magazine-publication.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/page/layouts/magazine-publication.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  marko_web_magazine_publication_page_metadata_template = require("../metadata/magazine-publication.marko"),
8
8
  marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
@@ -52,7 +52,7 @@ marko_template._ = marko_renderer(render, {
52
52
  });
53
53
 
54
54
  marko_template.meta = {
55
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/page/layouts/magazine-publication.marko",
55
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/page/layouts/magazine-publication.marko",
56
56
  tags: [
57
57
  "../metadata/magazine-publication.marko"
58
58
  ]
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/page/layouts/website-section.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/page/layouts/website-section.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
8
8
  baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
@@ -70,7 +70,7 @@ marko_template._ = marko_renderer(render, {
70
70
  });
71
71
 
72
72
  marko_template.meta = {
73
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/page/layouts/website-section.marko",
73
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/page/layouts/website-section.marko",
74
74
  tags: [
75
75
  "../metadata/website-section.marko",
76
76
  "../../rss/website-section.marko"
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/components/common.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/components/common.marko",
6
6
  marko_component = require("./common.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  marko_web_page_title_template = require("../../title.marko"),
@@ -98,7 +98,7 @@ marko_template._ = marko_renderer(render, {
98
98
  }, marko_component);
99
99
 
100
100
  marko_template.meta = {
101
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/components/common.marko",
101
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/components/common.marko",
102
102
  component: "./common.marko",
103
103
  tags: [
104
104
  "../../title.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/content.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/content.marko",
6
6
  marko_component = require("./content.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_gql = require("graphql-tag"),
@@ -197,7 +197,7 @@ marko_template._ = marko_renderer(render, {
197
197
  }, marko_component);
198
198
 
199
199
  marko_template.meta = {
200
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/content.marko",
200
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/content.marko",
201
201
  component: "./content.marko",
202
202
  tags: [
203
203
  "./components/common.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/default.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/default.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  common_template = require("./components/common.marko"),
8
8
  marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
@@ -22,7 +22,7 @@ marko_template._ = marko_renderer(render, {
22
22
  });
23
23
 
24
24
  marko_template.meta = {
25
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/default.marko",
25
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/default.marko",
26
26
  tags: [
27
27
  "./components/common.marko"
28
28
  ]
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/dynamic-page.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/dynamic-page.marko",
6
6
  marko_component = require("./dynamic-page.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_gql = require("graphql-tag"),
@@ -75,7 +75,7 @@ marko_template._ = marko_renderer(render, {
75
75
  }, marko_component);
76
76
 
77
77
  marko_template.meta = {
78
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/dynamic-page.marko",
78
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/dynamic-page.marko",
79
79
  component: "./dynamic-page.marko",
80
80
  tags: [
81
81
  "./components/common.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/magazine-issue.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/magazine-issue.marko",
6
6
  marko_component = require("./magazine-issue.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_gql = require("graphql-tag"),
@@ -74,7 +74,7 @@ marko_template._ = marko_renderer(render, {
74
74
  }, marko_component);
75
75
 
76
76
  marko_template.meta = {
77
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/magazine-issue.marko",
77
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/magazine-issue.marko",
78
78
  component: "./magazine-issue.marko",
79
79
  tags: [
80
80
  "./components/common.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/magazine-publication.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/magazine-publication.marko",
6
6
  marko_component = require("./magazine-publication.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_gql = require("graphql-tag"),
@@ -70,7 +70,7 @@ marko_template._ = marko_renderer(render, {
70
70
  }, marko_component);
71
71
 
72
72
  marko_template.meta = {
73
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/magazine-publication.marko",
73
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/magazine-publication.marko",
74
74
  component: "./magazine-publication.marko",
75
75
  tags: [
76
76
  "./components/common.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/website-section.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/website-section.marko",
6
6
  marko_component = require("./website-section.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_gql = require("graphql-tag"),
@@ -70,7 +70,7 @@ marko_template._ = marko_renderer(render, {
70
70
  }, marko_component);
71
71
 
72
72
  marko_template.meta = {
73
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/page/metadata/website-section.marko",
73
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/page/metadata/website-section.marko",
74
74
  component: "./website-section.marko",
75
75
  tags: [
76
76
  "./components/common.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/page/rel-canonical.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/page/rel-canonical.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
8
8
  baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
@@ -38,5 +38,5 @@ marko_template._ = marko_renderer(render, {
38
38
  });
39
39
 
40
40
  marko_template.meta = {
41
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/page/rel-canonical.marko"
41
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/page/rel-canonical.marko"
42
42
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/page/title.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/page/title.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
8
8
  baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
@@ -42,5 +42,5 @@ marko_template._ = marko_renderer(render, {
42
42
  });
43
43
 
44
44
  marko_template.meta = {
45
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/page/title.marko"
45
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/page/title.marko"
46
46
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/page/wrapper.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/page/wrapper.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
8
8
  baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
@@ -56,7 +56,7 @@ marko_template._ = marko_renderer(render, {
56
56
  });
57
57
 
58
58
  marko_template.meta = {
59
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/page/wrapper.marko",
59
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/page/wrapper.marko",
60
60
  tags: [
61
61
  "../element/index.marko"
62
62
  ]
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/resolve/page.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/resolve/page.marko",
6
6
  marko_component = require("./page.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
@@ -41,7 +41,7 @@ marko_template._ = marko_renderer(render, {
41
41
  }, marko_component);
42
42
 
43
43
  marko_template.meta = {
44
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/resolve/page.marko",
44
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/resolve/page.marko",
45
45
  component: "./page.marko",
46
46
  tags: [
47
47
  "@parameter1/base-cms-marko-core/components/resolve.marko"
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.3.0/components/rss/website-section.marko",
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.3.5/components/rss/website-section.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_url_module = require("url"),
8
8
  url_module = module_url_module.default || module_url_module,
@@ -42,5 +42,5 @@ marko_template._ = marko_renderer(render, {
42
42
  });
43
43
 
44
44
  marko_template.meta = {
45
- id: "/@parameter1/base-cms-marko-web$4.3.0/components/rss/website-section.marko"
45
+ id: "/@parameter1/base-cms-marko-web$4.3.5/components/rss/website-section.marko"
46
46
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parameter1/base-cms-marko-web",
3
- "version": "4.3.0",
3
+ "version": "4.3.5",
4
4
  "description": "Core Marko+Express components for BaseCMS websites",
5
5
  "author": "Jacob Bare <jacob@parameter1.com>",
6
6
  "main": "index.js",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "5970939eb7a5c4a90f7b08be60a17a4424f19bba"
61
+ "gitHead": "db792f85f1c74cdd2eb5d518c4ef89136908dc7b"
62
62
  }
package/start-server.js CHANGED
@@ -1,13 +1,10 @@
1
+ /* eslint-disable import/no-dynamic-require, global-require */
1
2
  require('@parameter1/base-cms-marko-node-require');
2
3
  const http = require('http');
3
4
  const path = require('path');
4
5
  const { createTerminus } = require('@godaddy/terminus');
5
6
  const { isFunction: isFn, parseBooleanHeader } = require('@parameter1/base-cms-utils');
6
- const { asObject } = require('@parameter1/base-cms-utils');
7
- const errorHandlers = require('./express/error-handlers');
8
- const express = require('./express');
9
- const loadMore = require('./express/load-more');
10
- const disabledFeatures = require('./middleware/disabled-features');
7
+ const { getAsObject } = require('@parameter1/base-cms-object-path');
11
8
 
12
9
  const { env } = process;
13
10
  if (!process.env.LIVERELOAD_PORT) process.env.LIVERELOAD_PORT = 4010;
@@ -21,7 +18,6 @@ const wait = (ms) => new Promise((resolve) => {
21
18
 
22
19
  module.exports = async ({
23
20
  rootDir,
24
- website,
25
21
  siteConfig,
26
22
  coreConfig,
27
23
  helmetConfig,
@@ -40,9 +36,6 @@ module.exports = async ({
40
36
  redirectHandler,
41
37
  sitemapsHeaders,
42
38
 
43
- // Base browse (optional)
44
- baseBrowseGraphqlUri = env.BASE_BROWSE_GRAPHQL_URI,
45
-
46
39
  // Cache settings.
47
40
  gqlCacheResponses = parseBooleanHeader(env.CACHE_GQL_RESPONSES),
48
41
  gqlCacheSiteContext = parseBooleanHeader(env.CACHE_GQL_SITE_CONTEXT),
@@ -57,8 +50,11 @@ module.exports = async ({
57
50
  beforeShutdown,
58
51
  onHealthCheck,
59
52
  } = {}) => {
60
- // set config from `website` option but allow env values to override.
61
- const site = asObject(website);
53
+ if (!rootDir) throw new Error('The root project directory is required.');
54
+ // load the site package file.
55
+ const sitePackage = require(path.resolve(rootDir, 'package.json'));
56
+ // load config from package `website` option but allow env values to override.
57
+ const site = getAsObject(sitePackage, 'website');
62
58
  if (!process.env.TENANT_KEY && site.tenant) process.env.TENANT_KEY = site.tenant;
63
59
  if (!process.env.SITE_ID && site.id) process.env.SITE_ID = site.id;
64
60
  if (!process.env.GRAPHQL_URI && site.stack) process.env.GRAPHQL_URI = `https://graphql.${site.stack}.base.parameter1.com`;
@@ -66,17 +62,24 @@ module.exports = async ({
66
62
  if (!process.env.RSS_URI && site.stack) process.env.RSS_URI = `https://rss.${site.stack}.base.parameter1.com`;
67
63
  if (!process.env.SITEMAPS_URI && site.stack) process.env.SITEMAPS_URI = `https://sitemaps.${site.stack}.base.parameter1.com`;
68
64
 
65
+ // ensure core envs are set.
66
+ ['TENANT_KEY', 'SITE_ID', 'GRAPHQL_URI', 'OEMBED_URI', 'RSS_URI', 'SITEMAPS_URI'].forEach((key) => {
67
+ if (!process.env[key]) throw new Error(`The ${key} value must be set either from env or via the website package config.`);
68
+ });
69
+
70
+ // base browse (optional)
71
+ if (!process.env.BASE_BROWSE_GRAPHQL_URI && site.stack) process.env.BASE_BROWSE_GRAPHQL_URI = `https://base-browse.${site.stack}.base.parameter1.com`;
72
+
69
73
  const graphqlUri = process.env.GRAPHQL_URI;
70
74
  const siteId = process.env.SITE_ID;
71
75
  const tenantKey = process.env.TENANT_KEY;
76
+ const baseBrowseGraphqlUri = process.env.BASE_BROWSE_GRAPHQL_URI;
72
77
 
73
- if (!rootDir) throw new Error('The root project directory is required.');
74
- if (!graphqlUri) throw new Error('The GraphQL API URL is required.');
75
- if (!siteId) throw new Error('A site ID is required.');
76
-
77
- // Load the site package file.
78
- // eslint-disable-next-line import/no-dynamic-require, global-require
79
- const sitePackage = require(path.resolve(rootDir, 'package.json'));
78
+ // require core packages after env values have been processed so they are set when imported
79
+ const errorHandlers = require('./express/error-handlers');
80
+ const express = require('./express');
81
+ const loadMore = require('./express/load-more');
82
+ const disabledFeatures = require('./middleware/disabled-features');
80
83
 
81
84
  const app = express({
82
85
  rootDir,