@parameter1/base-cms-marko-web 4.0.0-beta.0 → 4.0.2

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 +10 -10
  2. package/components/document/components/body-wrapper.marko.js +8 -8
  3. package/components/document/components/error.marko.js +9 -9
  4. package/components/document/components/live-reload.marko.js +7 -7
  5. package/components/document/components/polyfill.marko.js +7 -7
  6. package/components/document/container.marko.js +9 -9
  7. package/components/document/index.marko.js +17 -17
  8. package/components/element/array.marko.js +9 -9
  9. package/components/element/audio.marko.js +8 -8
  10. package/components/element/block.marko.js +8 -8
  11. package/components/element/clear.marko.js +7 -7
  12. package/components/element/components/image.marko.js +7 -7
  13. package/components/element/components/text.marko.js +9 -9
  14. package/components/element/content/address1.marko.js +8 -8
  15. package/components/element/content/address2.marko.js +8 -8
  16. package/components/element/content/audio.marko.js +8 -8
  17. package/components/element/content/authors.marko.js +7 -7
  18. package/components/element/content/body.marko.js +8 -8
  19. package/components/element/content/byline.marko.js +8 -8
  20. package/components/element/content/city-state-zip.marko.js +8 -8
  21. package/components/element/content/contributors.marko.js +7 -7
  22. package/components/element/content/country.marko.js +8 -8
  23. package/components/element/content/embed-code.marko.js +8 -8
  24. package/components/element/content/end-date.marko.js +8 -8
  25. package/components/element/content/ends.marko.js +8 -8
  26. package/components/element/content/fax.marko.js +8 -8
  27. package/components/element/content/images.marko.js +7 -7
  28. package/components/element/content/mobile.marko.js +8 -8
  29. package/components/element/content/name.marko.js +8 -8
  30. package/components/element/content/phone.marko.js +8 -8
  31. package/components/element/content/photographers.marko.js +7 -7
  32. package/components/element/content/public-email.marko.js +8 -8
  33. package/components/element/content/published.marko.js +8 -8
  34. package/components/element/content/short-name.marko.js +8 -8
  35. package/components/element/content/sidebar-stubs.marko.js +7 -7
  36. package/components/element/content/sidebars.marko.js +7 -7
  37. package/components/element/content/source.marko.js +8 -8
  38. package/components/element/content/sponsors.marko.js +7 -7
  39. package/components/element/content/start-date.marko.js +8 -8
  40. package/components/element/content/starts.marko.js +8 -8
  41. package/components/element/content/teaser.marko.js +8 -8
  42. package/components/element/content/title.marko.js +8 -8
  43. package/components/element/content/tollfree.marko.js +8 -8
  44. package/components/element/content/transcript.marko.js +8 -8
  45. package/components/element/content/website.marko.js +8 -8
  46. package/components/element/date.marko.js +7 -7
  47. package/components/element/image/caption.marko.js +8 -8
  48. package/components/element/image/credit.marko.js +8 -8
  49. package/components/element/image/display-name.marko.js +8 -8
  50. package/components/element/image/slider.marko.js +7 -7
  51. package/components/element/img.marko.js +8 -8
  52. package/components/element/index.marko.js +8 -8
  53. package/components/element/link.marko.js +8 -8
  54. package/components/element/magazine-issue/description.marko.js +8 -8
  55. package/components/element/magazine-issue/digital-edition-url.marko.js +8 -8
  56. package/components/element/magazine-issue/name.marko.js +8 -8
  57. package/components/element/magazine-issue/pdf-url.marko.js +8 -8
  58. package/components/element/magazine-publication/cancel-url.marko.js +8 -8
  59. package/components/element/magazine-publication/change-address-url.marko.js +8 -8
  60. package/components/element/magazine-publication/description.marko.js +8 -8
  61. package/components/element/magazine-publication/einquiry-url.marko.js +8 -8
  62. package/components/element/magazine-publication/name.marko.js +8 -8
  63. package/components/element/magazine-publication/renewal-url.marko.js +8 -8
  64. package/components/element/magazine-publication/reprints-url.marko.js +8 -8
  65. package/components/element/magazine-publication/subscribe-url.marko.js +8 -8
  66. package/components/element/obj-array.marko.js +7 -7
  67. package/components/element/obj-audio.marko.js +7 -7
  68. package/components/element/obj-date.marko.js +7 -7
  69. package/components/element/obj-nodes.marko.js +7 -7
  70. package/components/element/obj-text.marko.js +7 -7
  71. package/components/element/obj.marko.js +7 -7
  72. package/components/element/picture.marko.js +9 -9
  73. package/components/element/text.marko.js +9 -9
  74. package/components/element/website-section/description.marko.js +8 -8
  75. package/components/element/website-section/hierarchy.marko.js +7 -7
  76. package/components/element/website-section/name.marko.js +8 -8
  77. package/components/load-more/index.marko.js +9 -9
  78. package/components/load-more/trigger.marko.js +7 -7
  79. package/components/node/body.marko.js +9 -9
  80. package/components/node/element.marko.js +8 -8
  81. package/components/node/footer.marko.js +8 -8
  82. package/components/node/header.marko.js +8 -8
  83. package/components/node/image-inner-wrapper.marko.js +9 -9
  84. package/components/node/image-wrapper.marko.js +8 -8
  85. package/components/node/image.marko.js +8 -8
  86. package/components/node/index.marko.js +9 -9
  87. package/components/node-list/body.marko.js +8 -8
  88. package/components/node-list/element.marko.js +8 -8
  89. package/components/node-list/footer.marko.js +8 -8
  90. package/components/node-list/header.marko.js +8 -8
  91. package/components/node-list/index.marko.js +8 -8
  92. package/components/node-list/node.marko.js +8 -8
  93. package/components/node-list/nodes.marko.js +10 -10
  94. package/components/page/container.marko.js +8 -8
  95. package/components/page/description.marko.js +7 -7
  96. package/components/page/image.marko.js +8 -8
  97. package/components/page/layouts/content.marko.js +8 -8
  98. package/components/page/layouts/default.marko.js +8 -8
  99. package/components/page/layouts/dynamic-page.marko.js +8 -8
  100. package/components/page/layouts/magazine-issue.marko.js +8 -8
  101. package/components/page/layouts/magazine-publication.marko.js +8 -8
  102. package/components/page/layouts/website-section.marko.js +8 -8
  103. package/components/page/metadata/components/common.marko.js +7 -7
  104. package/components/page/metadata/content.marko.js +9 -9
  105. package/components/page/metadata/default.marko.js +7 -7
  106. package/components/page/metadata/dynamic-page.marko.js +6 -6
  107. package/components/page/metadata/magazine-issue.marko.js +6 -6
  108. package/components/page/metadata/magazine-publication.marko.js +6 -6
  109. package/components/page/metadata/website-section.marko.js +6 -6
  110. package/components/page/rel-canonical.marko.js +8 -8
  111. package/components/page/title.marko.js +8 -8
  112. package/components/page/wrapper.marko.js +10 -10
  113. package/components/resolve/page.marko.js +7 -7
  114. package/components/rss/website-section.marko.js +7 -7
  115. package/package.json +16 -16
  116. package/express/marko.js +0 -36
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parameter1/base-cms-marko-web",
3
- "version": "4.0.0-beta.0",
3
+ "version": "4.0.2",
4
4
  "description": "Core Marko+Express components for BaseCMS websites",
5
5
  "author": "Jacob Bare <jacob@parameter1.com>",
6
6
  "main": "index.js",
@@ -23,20 +23,20 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@godaddy/terminus": "^4.11.2",
26
- "@parameter1/base-cms-apollo-ssr": "^4.0.0-beta.0",
27
- "@parameter1/base-cms-dayjs": "^4.0.0-beta.0",
28
- "@parameter1/base-cms-embedded-media": "^4.0.0-beta.0",
29
- "@parameter1/base-cms-express-apollo": "^4.0.0-beta.0",
30
- "@parameter1/base-cms-graphql-fragment-types": "^4.0.0-beta.0",
31
- "@parameter1/base-cms-image": "^4.0.0-beta.0",
32
- "@parameter1/base-cms-inflector": "^4.0.0-beta.0",
33
- "@parameter1/base-cms-marko-express": "^4.0.0-beta.0",
34
- "@parameter1/base-cms-marko-node-require": "^4.0.0-beta.0",
35
- "@parameter1/base-cms-marko-web-deferred-script-loader": "^4.0.0-beta.0",
36
- "@parameter1/base-cms-object-path": "^4.0.0-beta.0",
37
- "@parameter1/base-cms-tenant-context": "^4.0.0-beta.0",
38
- "@parameter1/base-cms-utils": "^4.0.0-beta.0",
39
- "@parameter1/base-cms-web-common": "^4.0.0-beta.0",
26
+ "@parameter1/base-cms-apollo-ssr": "^4.0.2",
27
+ "@parameter1/base-cms-dayjs": "^4.0.2",
28
+ "@parameter1/base-cms-embedded-media": "^4.0.2",
29
+ "@parameter1/base-cms-express-apollo": "^4.0.2",
30
+ "@parameter1/base-cms-graphql-fragment-types": "^4.0.2",
31
+ "@parameter1/base-cms-image": "^4.0.2",
32
+ "@parameter1/base-cms-inflector": "^4.0.2",
33
+ "@parameter1/base-cms-marko-express": "^4.0.2",
34
+ "@parameter1/base-cms-marko-node-require": "^4.0.2",
35
+ "@parameter1/base-cms-marko-web-deferred-script-loader": "^4.0.2",
36
+ "@parameter1/base-cms-object-path": "^4.0.2",
37
+ "@parameter1/base-cms-tenant-context": "^4.0.2",
38
+ "@parameter1/base-cms-utils": "^4.0.2",
39
+ "@parameter1/base-cms-web-common": "^4.0.2",
40
40
  "cheerio": "^1.0.0-rc.12",
41
41
  "cookie-parser": "^1.4.6",
42
42
  "express": "^4.18.2",
@@ -56,5 +56,5 @@
56
56
  "publishConfig": {
57
57
  "access": "public"
58
58
  },
59
- "gitHead": "6b1c5270b9b3031b27d36ec109348efbd80f7933"
59
+ "gitHead": "68e4f2db27a0deb0f4b33c57d3dc86978f53ee54"
60
60
  }
package/express/marko.js DELETED
@@ -1,36 +0,0 @@
1
- /* eslint-disable no-underscore-dangle */
2
- require('marko');
3
- const buildGlobal = require('@parameter1/base-cms-marko-core/utils/build-marko-global');
4
-
5
- // eslint-disable-next-line import/no-extraneous-dependencies
6
- const express = module.main ? module.main.require('express') : require('express');
7
-
8
- if (!express) throw new Error('Unable to load Express.');
9
-
10
- const patch = (response) => {
11
- response.marko = response.marko || function markoResponse(template, data) {
12
- if (typeof template === 'string') throw new Error('res.marko does not accept a string or path as a template.');
13
-
14
- const res = this;
15
- const { req } = res;
16
- res.set({ 'content-type': 'text/html; charset=utf-8' });
17
- const $global = buildGlobal(res, data);
18
- return template.render({ ...(data || {}), $global }, res).on('error', req.next);
19
- };
20
- };
21
-
22
- patch(express.response);
23
- delete require.cache[__filename];
24
-
25
- module.exports = () => {
26
- const app = express();
27
- app.once('mount', (parent) => {
28
- patch(parent.response);
29
- if (parent._router) {
30
- parent._router.stack.pop(); // express <= 4.x
31
- } else {
32
- parent.router.stack.pop(); // express 5.x
33
- }
34
- });
35
- return app;
36
- };