@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.
- package/components/browser-component.marko.js +10 -10
- package/components/document/components/body-wrapper.marko.js +8 -8
- package/components/document/components/error.marko.js +9 -9
- package/components/document/components/live-reload.marko.js +7 -7
- package/components/document/components/polyfill.marko.js +7 -7
- package/components/document/container.marko.js +9 -9
- package/components/document/index.marko.js +17 -17
- package/components/element/array.marko.js +9 -9
- package/components/element/audio.marko.js +8 -8
- package/components/element/block.marko.js +8 -8
- package/components/element/clear.marko.js +7 -7
- package/components/element/components/image.marko.js +7 -7
- package/components/element/components/text.marko.js +9 -9
- package/components/element/content/address1.marko.js +8 -8
- package/components/element/content/address2.marko.js +8 -8
- package/components/element/content/audio.marko.js +8 -8
- package/components/element/content/authors.marko.js +7 -7
- package/components/element/content/body.marko.js +8 -8
- package/components/element/content/byline.marko.js +8 -8
- package/components/element/content/city-state-zip.marko.js +8 -8
- package/components/element/content/contributors.marko.js +7 -7
- package/components/element/content/country.marko.js +8 -8
- package/components/element/content/embed-code.marko.js +8 -8
- package/components/element/content/end-date.marko.js +8 -8
- package/components/element/content/ends.marko.js +8 -8
- package/components/element/content/fax.marko.js +8 -8
- package/components/element/content/images.marko.js +7 -7
- package/components/element/content/mobile.marko.js +8 -8
- package/components/element/content/name.marko.js +8 -8
- package/components/element/content/phone.marko.js +8 -8
- package/components/element/content/photographers.marko.js +7 -7
- package/components/element/content/public-email.marko.js +8 -8
- package/components/element/content/published.marko.js +8 -8
- package/components/element/content/short-name.marko.js +8 -8
- package/components/element/content/sidebar-stubs.marko.js +7 -7
- package/components/element/content/sidebars.marko.js +7 -7
- package/components/element/content/source.marko.js +8 -8
- package/components/element/content/sponsors.marko.js +7 -7
- package/components/element/content/start-date.marko.js +8 -8
- package/components/element/content/starts.marko.js +8 -8
- package/components/element/content/teaser.marko.js +8 -8
- package/components/element/content/title.marko.js +8 -8
- package/components/element/content/tollfree.marko.js +8 -8
- package/components/element/content/transcript.marko.js +8 -8
- package/components/element/content/website.marko.js +8 -8
- package/components/element/date.marko.js +7 -7
- package/components/element/image/caption.marko.js +8 -8
- package/components/element/image/credit.marko.js +8 -8
- package/components/element/image/display-name.marko.js +8 -8
- package/components/element/image/slider.marko.js +7 -7
- package/components/element/img.marko.js +8 -8
- package/components/element/index.marko.js +8 -8
- package/components/element/link.marko.js +8 -8
- package/components/element/magazine-issue/description.marko.js +8 -8
- package/components/element/magazine-issue/digital-edition-url.marko.js +8 -8
- package/components/element/magazine-issue/name.marko.js +8 -8
- package/components/element/magazine-issue/pdf-url.marko.js +8 -8
- package/components/element/magazine-publication/cancel-url.marko.js +8 -8
- package/components/element/magazine-publication/change-address-url.marko.js +8 -8
- package/components/element/magazine-publication/description.marko.js +8 -8
- package/components/element/magazine-publication/einquiry-url.marko.js +8 -8
- package/components/element/magazine-publication/name.marko.js +8 -8
- package/components/element/magazine-publication/renewal-url.marko.js +8 -8
- package/components/element/magazine-publication/reprints-url.marko.js +8 -8
- package/components/element/magazine-publication/subscribe-url.marko.js +8 -8
- package/components/element/obj-array.marko.js +7 -7
- package/components/element/obj-audio.marko.js +7 -7
- package/components/element/obj-date.marko.js +7 -7
- package/components/element/obj-nodes.marko.js +7 -7
- package/components/element/obj-text.marko.js +7 -7
- package/components/element/obj.marko.js +7 -7
- package/components/element/picture.marko.js +9 -9
- package/components/element/text.marko.js +9 -9
- package/components/element/website-section/description.marko.js +8 -8
- package/components/element/website-section/hierarchy.marko.js +7 -7
- package/components/element/website-section/name.marko.js +8 -8
- package/components/load-more/index.marko.js +9 -9
- package/components/load-more/trigger.marko.js +7 -7
- package/components/node/body.marko.js +9 -9
- package/components/node/element.marko.js +8 -8
- package/components/node/footer.marko.js +8 -8
- package/components/node/header.marko.js +8 -8
- package/components/node/image-inner-wrapper.marko.js +9 -9
- package/components/node/image-wrapper.marko.js +8 -8
- package/components/node/image.marko.js +8 -8
- package/components/node/index.marko.js +9 -9
- package/components/node-list/body.marko.js +8 -8
- package/components/node-list/element.marko.js +8 -8
- package/components/node-list/footer.marko.js +8 -8
- package/components/node-list/header.marko.js +8 -8
- package/components/node-list/index.marko.js +8 -8
- package/components/node-list/node.marko.js +8 -8
- package/components/node-list/nodes.marko.js +10 -10
- package/components/page/container.marko.js +8 -8
- package/components/page/description.marko.js +7 -7
- package/components/page/image.marko.js +8 -8
- package/components/page/layouts/content.marko.js +8 -8
- package/components/page/layouts/default.marko.js +8 -8
- package/components/page/layouts/dynamic-page.marko.js +8 -8
- package/components/page/layouts/magazine-issue.marko.js +8 -8
- package/components/page/layouts/magazine-publication.marko.js +8 -8
- package/components/page/layouts/website-section.marko.js +8 -8
- package/components/page/metadata/components/common.marko.js +7 -7
- package/components/page/metadata/content.marko.js +9 -9
- package/components/page/metadata/default.marko.js +7 -7
- package/components/page/metadata/dynamic-page.marko.js +6 -6
- package/components/page/metadata/magazine-issue.marko.js +6 -6
- package/components/page/metadata/magazine-publication.marko.js +6 -6
- package/components/page/metadata/website-section.marko.js +6 -6
- package/components/page/rel-canonical.marko.js +8 -8
- package/components/page/title.marko.js +8 -8
- package/components/page/wrapper.marko.js +10 -10
- package/components/resolve/page.marko.js +7 -7
- package/components/rss/website-section.marko.js +7 -7
- package/package.json +16 -16
- 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.
|
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.
|
27
|
-
"@parameter1/base-cms-dayjs": "^4.0.
|
28
|
-
"@parameter1/base-cms-embedded-media": "^4.0.
|
29
|
-
"@parameter1/base-cms-express-apollo": "^4.0.
|
30
|
-
"@parameter1/base-cms-graphql-fragment-types": "^4.0.
|
31
|
-
"@parameter1/base-cms-image": "^4.0.
|
32
|
-
"@parameter1/base-cms-inflector": "^4.0.
|
33
|
-
"@parameter1/base-cms-marko-express": "^4.0.
|
34
|
-
"@parameter1/base-cms-marko-node-require": "^4.0.
|
35
|
-
"@parameter1/base-cms-marko-web-deferred-script-loader": "^4.0.
|
36
|
-
"@parameter1/base-cms-object-path": "^4.0.
|
37
|
-
"@parameter1/base-cms-tenant-context": "^4.0.
|
38
|
-
"@parameter1/base-cms-utils": "^4.0.
|
39
|
-
"@parameter1/base-cms-web-common": "^4.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": "
|
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
|
-
};
|