@financial-times/cp-content-pipeline-schema 0.7.8 → 0.7.10
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 +22 -0
- package/lib/content-tree/bodyXMLToTree.d.ts +4 -2
- package/lib/content-tree/bodyXMLToTree.js +14 -24
- package/lib/content-tree/bodyXMLToTree.js.map +1 -1
- package/lib/content-tree/bodyXMLToTree.test.js +310 -51
- package/lib/content-tree/bodyXMLToTree.test.js.map +1 -1
- package/lib/content-tree/references/Video.d.ts +3 -0
- package/lib/content-tree/references/Video.js +29 -0
- package/lib/content-tree/references/Video.js.map +1 -0
- package/lib/content-tree/references/index.d.ts +1 -0
- package/lib/content-tree/references/index.js +2 -0
- package/lib/content-tree/references/index.js.map +1 -1
- package/lib/content-tree/tagMappings.js +107 -21
- package/lib/content-tree/tagMappings.js.map +1 -1
- package/lib/datasources/capi.js +18 -1
- package/lib/datasources/capi.js.map +1 -1
- package/lib/datasources/instrumented.d.ts +0 -2
- package/lib/datasources/instrumented.js +13 -15
- package/lib/datasources/instrumented.js.map +1 -1
- package/lib/datasources/origami-image.js +6 -0
- package/lib/datasources/origami-image.js.map +1 -1
- package/lib/datasources/twitter.js +6 -0
- package/lib/datasources/twitter.js.map +1 -1
- package/lib/model/CapiResponse.d.ts +10 -1227
- package/lib/model/Image.js +7 -2
- package/lib/model/Image.js.map +1 -1
- package/lib/model/Image.test.js +7 -0
- package/lib/model/Image.test.js.map +1 -1
- package/lib/model/schemas/capi/index.d.ts +10 -1227
- package/lib/model/schemas/capi/index.js +3 -0
- package/lib/model/schemas/capi/index.js.map +1 -1
- package/lib/model/schemas/capi/video.d.ts +48 -0
- package/lib/model/schemas/capi/video.js +8 -0
- package/lib/model/schemas/capi/video.js.map +1 -0
- package/lib/typedefs/image.js +2 -0
- package/lib/typedefs/image.js.map +1 -1
- package/lib/typedefs/richText.d.ts +7 -9
- package/lib/typedefs/richText.js +24 -22
- package/lib/typedefs/richText.js.map +1 -1
- package/lib/typedefs/richText.test.js +5 -5
- package/lib/typedefs/richText.test.js.map +1 -1
- package/package.json +1 -1
- package/src/content-tree/Workarounds.d.ts +45 -0
- package/src/content-tree/bodyXMLToTree.test.ts +316 -56
- package/src/content-tree/bodyXMLToTree.ts +33 -29
- package/src/content-tree/references/Video.ts +39 -0
- package/src/content-tree/references/index.ts +2 -0
- package/src/content-tree/tagMappings.ts +172 -35
- package/src/datasources/capi.ts +20 -1
- package/src/datasources/instrumented.ts +13 -17
- package/src/datasources/origami-image.ts +12 -1
- package/src/datasources/twitter.ts +14 -1
- package/src/model/Image.test.ts +13 -0
- package/src/model/Image.ts +11 -3
- package/src/model/schemas/capi/index.ts +3 -0
- package/src/model/schemas/capi/video.ts +5 -0
- package/src/typedefs/__snapshots__/richText.test.ts.snap +138 -148
- package/src/typedefs/image.ts +3 -0
- package/src/typedefs/richText.test.ts +6 -10
- package/src/typedefs/richText.ts +40 -29
- package/src/types/internal-content.d.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.10](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v0.7.9...cp-content-pipeline-schema-v0.7.10) (2023-05-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* handle spuriously-nested layout slots ([95f6dcd](https://github.com/Financial-Times/cp-content-pipeline/commit/95f6dcd069c7fa2037057755d2e971b15d2443a3))
|
|
9
|
+
* return all children, don't filter, when predicate doesn't match ([78060c8](https://github.com/Financial-Times/cp-content-pipeline/commit/78060c8d723a1fbb6eb8a0f4d535a06684b98640))
|
|
10
|
+
|
|
11
|
+
## [0.7.9](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v0.7.8...cp-content-pipeline-schema-v0.7.9) (2023-05-04)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* specific error codes for each datasource endpoint ([47a844f](https://github.com/Financial-Times/cp-content-pipeline/commit/47a844f79fe39f29a85aee987ddafd49715d71cb))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* only return image format verbatim if it's a known format ([e58b110](https://github.com/Financial-Times/cp-content-pipeline/commit/e58b110f3dc11e8be5b3fc6b0cd73f89f883e7df))
|
|
22
|
+
* return a fallback image type for unknown formats ([68de175](https://github.com/Financial-Times/cp-content-pipeline/commit/68de1752e0610730228593c6910ff7cbbf70e510))
|
|
23
|
+
* use UpstreamServiceError not HttpError for base datasource response errors ([41bf0f7](https://github.com/Financial-Times/cp-content-pipeline/commit/41bf0f7d39592f68c18b2263fbb0401279fa6d64))
|
|
24
|
+
|
|
3
25
|
## [0.7.8](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v0.7.7...cp-content-pipeline-schema-v0.7.8) (2023-05-02)
|
|
4
26
|
|
|
5
27
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="cheerio" />
|
|
2
2
|
import type { ContentTree } from '@financial-times/content-tree';
|
|
3
|
-
|
|
3
|
+
import { AnyNode } from './Workarounds';
|
|
4
|
+
import { QueryContext } from '..';
|
|
5
|
+
declare type ContentTreeTransform = ($el: cheerio.Cheerio, traverse: () => AnyNode[], context?: QueryContext) => AnyNode;
|
|
4
6
|
export declare type TagMappings = Record<string, ContentTreeTransform>;
|
|
5
|
-
export default function bodyXMLToTree(xml: string, tagMappings: TagMappings): ContentTree.Body;
|
|
7
|
+
export default function bodyXMLToTree(xml: string, tagMappings: TagMappings, context?: QueryContext): ContentTree.Body;
|
|
6
8
|
export {};
|
|
@@ -17,17 +17,12 @@ function isNode(node) {
|
|
|
17
17
|
Function that converts an XML string to a Body node from
|
|
18
18
|
the Content Tree spec - https://github.com/Financial-Times/content-tree#Body
|
|
19
19
|
*/
|
|
20
|
-
function bodyXMLToTree(xml, tagMappings) {
|
|
20
|
+
function bodyXMLToTree(xml, tagMappings, context) {
|
|
21
21
|
const $ = cheerio_1.default.load(xml);
|
|
22
|
-
const
|
|
23
|
-
if (!isTagElement(bodyEl)) {
|
|
24
|
-
throw new Error('Body is invalid');
|
|
25
|
-
}
|
|
26
|
-
const flattenAndTraverseChildren = (element) => element.children.map(traverse).flat().filter(isNode);
|
|
22
|
+
const flattenAndTraverseChildren = (children) => children.flatMap(traverse);
|
|
27
23
|
function traverse(element) {
|
|
28
|
-
let contentTreeNode;
|
|
29
24
|
if (element.type === 'text' && element.data) {
|
|
30
|
-
|
|
25
|
+
return {
|
|
31
26
|
type: 'text',
|
|
32
27
|
value: element.data,
|
|
33
28
|
};
|
|
@@ -36,25 +31,20 @@ function bodyXMLToTree(xml, tagMappings) {
|
|
|
36
31
|
const matchedSelector = Object.keys(tagMappings).find((selector) => element.name === selector || $(element).is(selector));
|
|
37
32
|
if (matchedSelector) {
|
|
38
33
|
const contentTreeTransform = tagMappings[matchedSelector];
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
if (element.children.length) {
|
|
42
|
-
if (contentTreeNode && isParent(contentTreeNode)) {
|
|
43
|
-
contentTreeNode.children = flattenAndTraverseChildren(element);
|
|
44
|
-
}
|
|
45
|
-
else if (!contentTreeNode) {
|
|
46
|
-
return flattenAndTraverseChildren(element);
|
|
47
|
-
}
|
|
34
|
+
return contentTreeTransform($(element), () => flattenAndTraverseChildren(element.children), context);
|
|
48
35
|
}
|
|
36
|
+
return flattenAndTraverseChildren(element.children);
|
|
49
37
|
}
|
|
50
|
-
return
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
const body = traverse($('body')[0]);
|
|
41
|
+
if (Array.isArray(body) || !isNode(body)) {
|
|
42
|
+
throw new Error(`Unexpected mapping result for body node, received ${JSON.stringify(body)}`);
|
|
43
|
+
}
|
|
44
|
+
if (body.type !== 'body') {
|
|
45
|
+
throw new Error(`Expected root node to be a body, but got ${body.type}`);
|
|
51
46
|
}
|
|
52
|
-
|
|
53
|
-
return {
|
|
54
|
-
type: 'body',
|
|
55
|
-
version: 1,
|
|
56
|
-
children,
|
|
57
|
-
};
|
|
47
|
+
return body;
|
|
58
48
|
}
|
|
59
49
|
exports.default = bodyXMLToTree;
|
|
60
50
|
//# sourceMappingURL=bodyXMLToTree.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bodyXMLToTree.js","sourceRoot":"","sources":["../../src/content-tree/bodyXMLToTree.ts"],"names":[],"mappings":";;;;;AAAA,sDAA6B;
|
|
1
|
+
{"version":3,"file":"bodyXMLToTree.js","sourceRoot":"","sources":["../../src/content-tree/bodyXMLToTree.ts"],"names":[],"mappings":";;;;;AAAA,sDAA6B;AAM7B,SAAS,YAAY,CAAC,EAAmB;IACvC,OAAO,EAAE,CAAC,IAAI,KAAK,KAAK,CAAA;AAC1B,CAAC;AAED,SAAS,QAAQ,CAAC,IAAsB;IACtC,OAAO,UAAU,IAAI,IAAI,CAAA;AAC3B,CAAC;AAED,SAAS,MAAM,CAAC,IAAkC;IAChD,OAAO,OAAO,CAAC,IAAI,IAAI,MAAM,IAAI,IAAI,CAAC,CAAA;AACxC,CAAC;AAUD;;;EAGE;AACF,SAAwB,aAAa,CACnC,GAAW,EACX,WAAwB,EACxB,OAAsB;IAEtB,MAAM,CAAC,GAAG,iBAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAE3B,MAAM,0BAA0B,GAAG,CAAC,QAA2B,EAAa,EAAE,CAC5E,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IAE5B,SAAS,QAAQ,CAAC,OAAwB;QACxC,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,IAAI,OAAO,CAAC,IAAI,EAAE;YAC3C,OAAO;gBACL,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,OAAO,CAAC,IAAI;aACpB,CAAA;SACF;aAAM,IAAI,YAAY,CAAC,OAAO,CAAC,EAAE;YAChC,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CACnD,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CACnE,CAAA;YAED,IAAI,eAAe,EAAE;gBACnB,MAAM,oBAAoB,GAAG,WAAW,CAAC,eAAe,CAAC,CAAA;gBACzD,OAAO,oBAAoB,CACzB,CAAC,CAAC,OAAO,CAAC,EACV,GAAG,EAAE,CAAC,0BAA0B,CAAC,OAAO,CAAC,QAAQ,CAAC,EAClD,OAAO,CACR,CAAA;aACF;YAED,OAAO,0BAA0B,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;SACpD;QAED,OAAO,EAAE,CAAA;IACX,CAAC;IAED,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEnC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QACxC,MAAM,IAAI,KAAK,CACb,qDAAqD,IAAI,CAAC,SAAS,CACjE,IAAI,CACL,EAAE,CACJ,CAAA;KACF;IAED,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC,4CAA4C,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;KACzE;IAED,OAAO,IAAI,CAAA;AACb,CAAC;AAnDD,gCAmDC"}
|
|
@@ -1,78 +1,337 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
jest.mock('@dotcom-reliability-kit/log-error', () => ({
|
|
30
|
+
logRecoverableError: jest.fn(),
|
|
31
|
+
}));
|
|
6
32
|
const bodyXMLToTree_js_1 = __importDefault(require("./bodyXMLToTree.js"));
|
|
7
33
|
const tagMappings_js_1 = __importDefault(require("./tagMappings.js"));
|
|
34
|
+
const logError = __importStar(require("@dotcom-reliability-kit/log-error"));
|
|
35
|
+
const logRecoverableErrorMock = logError.logRecoverableError;
|
|
8
36
|
describe('bodyXMLToTree', () => {
|
|
9
37
|
it('converts XML to tree', () => {
|
|
10
38
|
const xml = `<body><p>Hello world</p></body>`;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
39
|
+
expect((0, bodyXMLToTree_js_1.default)(xml, tagMappings_js_1.default)).toMatchInlineSnapshot(`
|
|
40
|
+
Object {
|
|
41
|
+
"children": Array [
|
|
42
|
+
Object {
|
|
43
|
+
"children": Array [
|
|
44
|
+
Object {
|
|
45
|
+
"type": "text",
|
|
46
|
+
"value": "Hello world",
|
|
47
|
+
},
|
|
19
48
|
],
|
|
20
|
-
|
|
21
|
-
|
|
49
|
+
"type": "paragraph",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
"type": "body",
|
|
53
|
+
"version": 1,
|
|
54
|
+
}
|
|
55
|
+
`);
|
|
22
56
|
});
|
|
23
57
|
it('supports nested selectors', () => {
|
|
24
|
-
const xml = `<body><img src="regular-image"/><div class="n-content-layout"><img src="layout-image" /></div></body>`;
|
|
58
|
+
const xml = `<body><img src="regular-image"/><div class="n-content-layout"><div class="n-content-layout__slot"><img src="layout-image" /></div></div></body>`;
|
|
25
59
|
const tags = {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
60
|
+
body: ($el, traverse) => ({
|
|
61
|
+
type: 'body',
|
|
62
|
+
children: traverse(),
|
|
63
|
+
version: 1,
|
|
64
|
+
}),
|
|
65
|
+
'body > img': () => ({ type: 'image-set', id: 'id' }),
|
|
66
|
+
'.n-content-layout': ($el, traverse) => ({
|
|
67
|
+
type: 'layout',
|
|
68
|
+
children: traverse().filter((node) => node.type === 'layout-slot'),
|
|
69
|
+
layoutName: 'auto',
|
|
70
|
+
layoutWidth: 'layoutWidth',
|
|
71
|
+
}),
|
|
72
|
+
'.n-content-layout__slot': ($el, traverse) => ({
|
|
73
|
+
type: 'layout-slot',
|
|
74
|
+
children: traverse().filter((node) => node.type === 'layout-image'),
|
|
75
|
+
}),
|
|
76
|
+
'.n-content-layout img': () => ({
|
|
77
|
+
type: 'layout-image',
|
|
78
|
+
id: 'id',
|
|
79
|
+
alt: 'alt',
|
|
80
|
+
caption: 'caption',
|
|
81
|
+
credit: 'credit',
|
|
82
|
+
}),
|
|
29
83
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
84
|
+
expect((0, bodyXMLToTree_js_1.default)(xml, tags)).toMatchInlineSnapshot(`
|
|
85
|
+
Object {
|
|
86
|
+
"children": Array [
|
|
87
|
+
Object {
|
|
88
|
+
"id": "id",
|
|
89
|
+
"type": "image-set",
|
|
90
|
+
},
|
|
91
|
+
Object {
|
|
92
|
+
"children": Array [
|
|
93
|
+
Object {
|
|
94
|
+
"children": Array [
|
|
95
|
+
Object {
|
|
96
|
+
"alt": "alt",
|
|
97
|
+
"caption": "caption",
|
|
98
|
+
"credit": "credit",
|
|
99
|
+
"id": "id",
|
|
100
|
+
"type": "layout-image",
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
"type": "layout-slot",
|
|
104
|
+
},
|
|
41
105
|
],
|
|
42
|
-
|
|
43
|
-
|
|
106
|
+
"layoutName": "auto",
|
|
107
|
+
"layoutWidth": "layoutWidth",
|
|
108
|
+
"type": "layout",
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
"type": "body",
|
|
112
|
+
"version": 1,
|
|
113
|
+
}
|
|
114
|
+
`);
|
|
44
115
|
});
|
|
45
116
|
it('includes known children of unknown tags', () => {
|
|
46
117
|
const xml = `<body><p>P1</p><unknown><p>P2</p></unknown></body>`;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
type: 'paragraph',
|
|
57
|
-
children: [{ type: 'text', value: 'P2' }],
|
|
58
|
-
},
|
|
118
|
+
expect((0, bodyXMLToTree_js_1.default)(xml, tagMappings_js_1.default)).toMatchInlineSnapshot(`
|
|
119
|
+
Object {
|
|
120
|
+
"children": Array [
|
|
121
|
+
Object {
|
|
122
|
+
"children": Array [
|
|
123
|
+
Object {
|
|
124
|
+
"type": "text",
|
|
125
|
+
"value": "P1",
|
|
126
|
+
},
|
|
59
127
|
],
|
|
60
|
-
|
|
61
|
-
|
|
128
|
+
"type": "paragraph",
|
|
129
|
+
},
|
|
130
|
+
Object {
|
|
131
|
+
"children": Array [
|
|
132
|
+
Object {
|
|
133
|
+
"type": "text",
|
|
134
|
+
"value": "P2",
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
"type": "paragraph",
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
"type": "body",
|
|
141
|
+
"version": 1,
|
|
142
|
+
}
|
|
143
|
+
`);
|
|
62
144
|
});
|
|
63
145
|
it("maps tags that aren't expected to have any children (e.g. tweet reference)", () => {
|
|
64
146
|
const xml = '<body><a data-asset-type="tweet" data-embedded="true" href="https://twitter.com/EllliotttB/status/1610358432577748992?s=20&t=pcwJG65_c10H3snOQWzI4w">https://twitter.com/EllliotttB/status/1610358432577748992?s=20&t=pcwJG65_c10H3snOQWzI4w</a></body>';
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
147
|
+
expect((0, bodyXMLToTree_js_1.default)(xml, tagMappings_js_1.default)).toMatchInlineSnapshot(`
|
|
148
|
+
Object {
|
|
149
|
+
"children": Array [
|
|
150
|
+
Object {
|
|
151
|
+
"id": "https://twitter.com/EllliotttB/status/1610358432577748992?s=20&t=pcwJG65_c10H3snOQWzI4w",
|
|
152
|
+
"type": "tweet",
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
"type": "body",
|
|
156
|
+
"version": 1,
|
|
157
|
+
}
|
|
158
|
+
`);
|
|
159
|
+
});
|
|
160
|
+
it('collapses nested .n-content-layout__slots', () => {
|
|
161
|
+
const xml = '<body><div class="n-content-layout"><div class="n-content-layout__slot"><h4></h4><div class="n-content-layout__slot"><p>text</p></div></div></div></body>';
|
|
162
|
+
expect((0, bodyXMLToTree_js_1.default)(xml, tagMappings_js_1.default)).toMatchInlineSnapshot(`
|
|
163
|
+
Object {
|
|
164
|
+
"children": Array [
|
|
165
|
+
Object {
|
|
166
|
+
"children": Array [
|
|
167
|
+
Object {
|
|
168
|
+
"children": Array [
|
|
169
|
+
Object {
|
|
170
|
+
"children": Array [],
|
|
171
|
+
"level": "label",
|
|
172
|
+
"type": "heading",
|
|
173
|
+
},
|
|
174
|
+
Object {
|
|
175
|
+
"children": Array [
|
|
176
|
+
Object {
|
|
177
|
+
"type": "text",
|
|
178
|
+
"value": "text",
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
"type": "paragraph",
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
"type": "layout-slot",
|
|
185
|
+
},
|
|
73
186
|
],
|
|
74
|
-
|
|
75
|
-
|
|
187
|
+
"layoutName": "auto",
|
|
188
|
+
"layoutWidth": "full-width",
|
|
189
|
+
"type": "layout",
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
"type": "body",
|
|
193
|
+
"version": 1,
|
|
194
|
+
}
|
|
195
|
+
`);
|
|
196
|
+
});
|
|
197
|
+
describe('layout children handling', () => {
|
|
198
|
+
beforeEach(() => {
|
|
199
|
+
jest.resetAllMocks();
|
|
200
|
+
});
|
|
201
|
+
it('should handle slots', () => {
|
|
202
|
+
const xml = '<body><div class="n-content-layout"><div class="n-content-layout__slot"></div><div class="n-content-layout__slot"></div></body>';
|
|
203
|
+
expect((0, bodyXMLToTree_js_1.default)(xml, tagMappings_js_1.default)).toMatchInlineSnapshot(`
|
|
204
|
+
Object {
|
|
205
|
+
"children": Array [
|
|
206
|
+
Object {
|
|
207
|
+
"children": Array [
|
|
208
|
+
Object {
|
|
209
|
+
"children": Array [],
|
|
210
|
+
"type": "layout-slot",
|
|
211
|
+
},
|
|
212
|
+
Object {
|
|
213
|
+
"children": Array [],
|
|
214
|
+
"type": "layout-slot",
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
"layoutName": "auto",
|
|
218
|
+
"layoutWidth": "full-width",
|
|
219
|
+
"type": "layout",
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
"type": "body",
|
|
223
|
+
"version": 1,
|
|
224
|
+
}
|
|
225
|
+
`);
|
|
226
|
+
expect(logRecoverableErrorMock).not.toBeCalled();
|
|
227
|
+
});
|
|
228
|
+
it('should handle heading and slots', () => {
|
|
229
|
+
const xml = '<body><div class="n-content-layout"><h3></h3><div class="n-content-layout__slot"></div><div class="n-content-layout__slot"></div></body>';
|
|
230
|
+
expect((0, bodyXMLToTree_js_1.default)(xml, tagMappings_js_1.default)).toMatchInlineSnapshot(`
|
|
231
|
+
Object {
|
|
232
|
+
"children": Array [
|
|
233
|
+
Object {
|
|
234
|
+
"children": Array [
|
|
235
|
+
Object {
|
|
236
|
+
"children": Array [],
|
|
237
|
+
"level": "subheading",
|
|
238
|
+
"type": "heading",
|
|
239
|
+
},
|
|
240
|
+
Object {
|
|
241
|
+
"children": Array [],
|
|
242
|
+
"type": "layout-slot",
|
|
243
|
+
},
|
|
244
|
+
Object {
|
|
245
|
+
"children": Array [],
|
|
246
|
+
"type": "layout-slot",
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
"layoutName": "auto",
|
|
250
|
+
"layoutWidth": "full-width",
|
|
251
|
+
"type": "layout",
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
"type": "body",
|
|
255
|
+
"version": 1,
|
|
256
|
+
}
|
|
257
|
+
`);
|
|
258
|
+
expect(logRecoverableErrorMock).not.toBeCalled();
|
|
259
|
+
});
|
|
260
|
+
it('should log an error on unexpected child after heading', () => {
|
|
261
|
+
const xml = '<body><div class="n-content-layout"><h3></h3><div class="n-content-layout__slot"></div><p></p></body>';
|
|
262
|
+
expect((0, bodyXMLToTree_js_1.default)(xml, tagMappings_js_1.default)).toMatchInlineSnapshot(`
|
|
263
|
+
Object {
|
|
264
|
+
"children": Array [
|
|
265
|
+
Object {
|
|
266
|
+
"children": Array [
|
|
267
|
+
Object {
|
|
268
|
+
"children": Array [],
|
|
269
|
+
"level": "subheading",
|
|
270
|
+
"type": "heading",
|
|
271
|
+
},
|
|
272
|
+
Object {
|
|
273
|
+
"children": Array [],
|
|
274
|
+
"type": "layout-slot",
|
|
275
|
+
},
|
|
276
|
+
Object {
|
|
277
|
+
"children": Array [],
|
|
278
|
+
"type": "paragraph",
|
|
279
|
+
},
|
|
280
|
+
],
|
|
281
|
+
"layoutName": "auto",
|
|
282
|
+
"layoutWidth": "full-width",
|
|
283
|
+
"type": "layout",
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
"type": "body",
|
|
287
|
+
"version": 1,
|
|
288
|
+
}
|
|
289
|
+
`);
|
|
290
|
+
expect(logRecoverableErrorMock).toBeCalled();
|
|
291
|
+
expect(logRecoverableErrorMock.mock.lastCall).toMatchInlineSnapshot(`
|
|
292
|
+
Array [
|
|
293
|
+
Object {
|
|
294
|
+
"error": [OperationalError: Unexpected children types for layout],
|
|
295
|
+
"logger": undefined,
|
|
296
|
+
},
|
|
297
|
+
]
|
|
298
|
+
`);
|
|
299
|
+
});
|
|
300
|
+
it('should log an error on unexpected child after slots', () => {
|
|
301
|
+
const xml = '<body><div class="n-content-layout"><div class="n-content-layout__slot"></div><p></p></body>';
|
|
302
|
+
expect((0, bodyXMLToTree_js_1.default)(xml, tagMappings_js_1.default)).toMatchInlineSnapshot(`
|
|
303
|
+
Object {
|
|
304
|
+
"children": Array [
|
|
305
|
+
Object {
|
|
306
|
+
"children": Array [
|
|
307
|
+
Object {
|
|
308
|
+
"children": Array [],
|
|
309
|
+
"type": "layout-slot",
|
|
310
|
+
},
|
|
311
|
+
Object {
|
|
312
|
+
"children": Array [],
|
|
313
|
+
"type": "paragraph",
|
|
314
|
+
},
|
|
315
|
+
],
|
|
316
|
+
"layoutName": "auto",
|
|
317
|
+
"layoutWidth": "full-width",
|
|
318
|
+
"type": "layout",
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
"type": "body",
|
|
322
|
+
"version": 1,
|
|
323
|
+
}
|
|
324
|
+
`);
|
|
325
|
+
expect(logRecoverableErrorMock).toBeCalled();
|
|
326
|
+
expect(logRecoverableErrorMock.mock.lastCall).toMatchInlineSnapshot(`
|
|
327
|
+
Array [
|
|
328
|
+
Object {
|
|
329
|
+
"error": [OperationalError: Unexpected children types for layout],
|
|
330
|
+
"logger": undefined,
|
|
331
|
+
},
|
|
332
|
+
]
|
|
333
|
+
`);
|
|
334
|
+
});
|
|
76
335
|
});
|
|
77
336
|
});
|
|
78
337
|
//# sourceMappingURL=bodyXMLToTree.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bodyXMLToTree.test.js","sourceRoot":"","sources":["../../src/content-tree/bodyXMLToTree.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bodyXMLToTree.test.js","sourceRoot":"","sources":["../../src/content-tree/bodyXMLToTree.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAI,CAAC,IAAI,CAAC,mCAAmC,EAAE,GAAG,EAAE,CAAC,CAAC;IACpD,mBAAmB,EAAE,IAAI,CAAC,EAAE,EAAE;CAC/B,CAAC,CAAC,CAAA;AAGH,0EAA+D;AAC/D,sEAAmC;AAEnC,4EAA6D;AAC7D,MAAM,uBAAuB,GAAG,QAAQ,CAAC,mBAAgC,CAAA;AAEzE,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAC9B,MAAM,GAAG,GAAG,iCAAiC,CAAA;QAC7C,MAAM,CAAC,IAAA,0BAAa,EAAC,GAAG,EAAE,wBAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;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2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
4
|
+
const metadata_js_1 = require("../../helpers/metadata.js");
|
|
5
|
+
const Reference_js_1 = require("./Reference.js");
|
|
6
|
+
class VideoResolver {
|
|
7
|
+
constructor() {
|
|
8
|
+
// This will override the original id from the parent that is a URL.
|
|
9
|
+
this.id = (parent) => {
|
|
10
|
+
return (0, metadata_js_1.uuidFromUrl)(parent.reference.id);
|
|
11
|
+
};
|
|
12
|
+
this.title = async (parent, _args, context) => {
|
|
13
|
+
const capiResponse = await context.dataSources.capi.getContent((0, metadata_js_1.uuidFromUrl)(parent.reference.id));
|
|
14
|
+
return capiResponse.title();
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const VideoReference = {
|
|
19
|
+
typeDef: (0, graphql_tag_1.gql) `
|
|
20
|
+
type Video implements Reference {
|
|
21
|
+
${Reference_js_1.ReferenceFields}
|
|
22
|
+
id: String!
|
|
23
|
+
title: String!
|
|
24
|
+
}
|
|
25
|
+
`,
|
|
26
|
+
resolve: new VideoResolver(),
|
|
27
|
+
};
|
|
28
|
+
exports.default = VideoReference;
|
|
29
|
+
//# sourceMappingURL=Video.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Video.js","sourceRoot":"","sources":["../../../src/content-tree/references/Video.ts"],"names":[],"mappings":";;AACA,6CAAiC;AACjC,2DAAuD;AAEvD,iDAAgD;AAKhD,MAAM,aAAa;IAAnB;QACE,oEAAoE;QACpE,OAAE,GAAG,CAAC,MAAoC,EAAE,EAAE;YAC5C,OAAO,IAAA,yBAAW,EAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QACzC,CAAC,CAAA;QAED,UAAK,GAAG,KAAK,EACX,MAAoC,EACpC,KAAc,EACd,OAAqB,EACrB,EAAE;YACF,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAC5D,IAAA,yBAAW,EAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CACjC,CAAA;YACD,OAAO,YAAY,CAAC,KAAK,EAAE,CAAA;QAC7B,CAAC,CAAA;IACH,CAAC;CAAA;AAED,MAAM,cAAc,GAAqB;IACvC,OAAO,EAAE,IAAA,iBAAG,EAAA;;QAEN,8BAAe;;;;GAIpB;IACD,OAAO,EAAE,IAAI,aAAa,EAAE;CAC7B,CAAA;AAED,kBAAe,cAAc,CAAA"}
|
|
@@ -7,6 +7,7 @@ exports.resolvers = exports.typeDef = exports.graphQlReferences = void 0;
|
|
|
7
7
|
const Reference_js_1 = __importDefault(require("./Reference.js"));
|
|
8
8
|
const Tweet_js_1 = __importDefault(require("./Tweet.js"));
|
|
9
9
|
const ImageSet_js_1 = __importDefault(require("./ImageSet.js"));
|
|
10
|
+
const Video_js_1 = __importDefault(require("./Video.js"));
|
|
10
11
|
const Flourish_js_1 = __importDefault(require("./Flourish.js"));
|
|
11
12
|
const Recommended_js_1 = __importDefault(require("./Recommended.js"));
|
|
12
13
|
const LayoutImage_js_1 = __importDefault(require("./LayoutImage.js"));
|
|
@@ -15,6 +16,7 @@ exports.graphQlReferences = {
|
|
|
15
16
|
Reference: Reference_js_1.default,
|
|
16
17
|
Tweet: Tweet_js_1.default,
|
|
17
18
|
ImageSet: ImageSet_js_1.default,
|
|
19
|
+
Video: Video_js_1.default,
|
|
18
20
|
Flourish: Flourish_js_1.default,
|
|
19
21
|
Recommended: Recommended_js_1.default,
|
|
20
22
|
LayoutImage: LayoutImage_js_1.default,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content-tree/references/index.ts"],"names":[],"mappings":";;;;;;AAKA,kEAAsC;AAEtC,0DAA8B;AAC9B,gEAAoC;AACpC,gEAAoC;AACpC,sEAA0C;AAC1C,sEAA0C;AAC1C,gEAAoC;AAYvB,QAAA,iBAAiB,GAAG;I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