@newskit-render/feed 0.5.2 → 0.5.3
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/dist/cjs/helpers/queryArticleList.d.ts +3 -3
- package/dist/cjs/helpers/queryArticleList.js.map +1 -1
- package/dist/cjs/helpers/queryPage.d.ts +4 -4
- package/dist/cjs/helpers/queryPage.js.map +1 -1
- package/dist/cjs/helpers/types.d.ts +3 -3
- package/dist/cjs/helpers/types.js.map +1 -1
- package/dist/cjs/sitemap/__tests__/mocks.js +3 -2
- package/dist/cjs/sitemap/__tests__/mocks.js.map +1 -1
- package/dist/cjs/sitemap/index.d.ts +2 -2
- package/dist/cjs/sitemap/index.js.map +1 -1
- package/dist/esm/helpers/queryArticleList.d.ts +3 -3
- package/dist/esm/helpers/queryArticleList.js.map +1 -1
- package/dist/esm/helpers/queryPage.d.ts +4 -4
- package/dist/esm/helpers/queryPage.js.map +1 -1
- package/dist/esm/helpers/types.d.ts +3 -3
- package/dist/esm/helpers/types.js.map +1 -1
- package/dist/esm/sitemap/__tests__/mocks.js +3 -2
- package/dist/esm/sitemap/__tests__/mocks.js.map +1 -1
- package/dist/esm/sitemap/index.d.ts +2 -2
- package/dist/esm/sitemap/index.js +1 -1
- package/dist/esm/sitemap/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ApolloHttpClient } from '@newskit-render/api';
|
|
1
|
+
import { ApolloHttpClient, Publisher } from '@newskit-render/api';
|
|
2
2
|
import { DocumentNode } from 'graphql';
|
|
3
|
-
import { ArticleList
|
|
4
|
-
export declare const queryArticleList: (publisher:
|
|
3
|
+
import { ArticleList } from './types';
|
|
4
|
+
export declare const queryArticleList: (publisher: Publisher, dates: {
|
|
5
5
|
from: string;
|
|
6
6
|
to?: string | undefined;
|
|
7
7
|
}, apolloClient: ApolloHttpClient, articleQuery: DocumentNode) => Promise<ArticleList>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryArticleList.js","sourceRoot":"","sources":["../../../src/helpers/queryArticleList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAM,gBAAgB,GAAG,UAC9B,
|
|
1
|
+
{"version":3,"file":"queryArticleList.js","sourceRoot":"","sources":["../../../src/helpers/queryArticleList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAM,gBAAgB,GAAG,UAC9B,SAAoB,EACpB,KAAoC,EACpC,YAA8B,EAC9B,YAA0B;;;;;gBAEtB,MAAM,GAAG,EAAE,CAAA;gBAEX,eAAe,GAAgB,EAAE,CAAA;gBAC7B,IAAI,GAAS,KAAK,KAAd,EAAE,EAAE,GAAK,KAAK,GAAV,CAAU;gBAGT,qBAAM,YAAY,CAAC,KAAK,CAAC;wBACxC,KAAK,EAAE,YAAY;wBACnB,SAAS,EAAE;4BACT,MAAM,EAAE,MAAM;4BACd,SAAS,EAAE,SAAS;4BACpB,IAAI,MAAA;4BACJ,EAAE,IAAA;yBACH;qBACF,CAAC;oBAEF,mDAAmD;kBAFjD;;gBARM,IAAI,GAAK,CAAA,SAQf,CAAA,KARU;gBAUZ,mDAAmD;gBACnD,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAA;gBAC1C,mFAAmF;gBACnF,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;gBACzE,kDAAkD;gBAClD,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;;;qBAGxD,CAAA,eAAe,CAAC,MAAM,GAAG,UAAU,CAAA;gBACvB,qBAAM,YAAY,CAAC,KAAK,CAAC;wBACxC,KAAK,EAAE,YAAY;wBACnB,SAAS,EAAE;4BACT,MAAM,EAAE,MAAM;4BACd,SAAS,EAAE,SAAS;4BACpB,IAAI,MAAA;4BACJ,EAAE,IAAA;yBACH;qBACF,CAAC,EAAA;;gBARM,SAAS,CAAA,SAQf,CAAA,KARU;gBAUZ,MAAM,GAAG,MAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAA;gBAC1C,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,MAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;;oBAGjE,sBAAO,eAAe,EAAA;;;KACvB,CAAA;AA9CY,QAAA,gBAAgB,oBA8C5B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Channel,
|
|
2
|
-
import { ApolloHttpClient } from '@newskit-render/api';
|
|
3
|
-
export declare const queryPage: (publisher:
|
|
4
|
-
export declare const queryChannelsList: (publisher:
|
|
1
|
+
import { Channel, StaticPage } from './types';
|
|
2
|
+
import { ApolloHttpClient, Publisher } from '@newskit-render/api';
|
|
3
|
+
export declare const queryPage: (publisher: Publisher, channel: string, apolloClient: ApolloHttpClient) => Promise<Omit<StaticPage, 'url'>>;
|
|
4
|
+
export declare const queryChannelsList: (publisher: Publisher, apolloClient: ApolloHttpClient) => Promise<Channel[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryPage.js","sourceRoot":"","sources":["../../../src/helpers/queryPage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAsE;AACtE,sDAAqD;
|
|
1
|
+
{"version":3,"file":"queryPage.js","sourceRoot":"","sources":["../../../src/helpers/queryPage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAsE;AACtE,sDAAqD;AAI9C,IAAM,SAAS,GAAG,UACvB,SAAoB,EACpB,OAAe,EACf,YAA8B;;;;oBAEY,qBAAM,YAAY,CAAC,KAAK,CAAC;oBACjE,KAAK,EAAE,kBAAQ;oBACf,SAAS,EAAE;wBACT,SAAS,EAAE,SAAS;wBACpB,OAAO,SAAA;qBACR;oBACD,WAAW,EAAE,KAAK;iBACnB,CAAC,EAAA;;gBAPM,IAAI,GAA8B,CAAA,SAOxC,CAAA,KAPU;gBAQZ,sBAAO,IAAI,CAAC,IAAI,EAAA;;;KACjB,CAAA;AAdY,QAAA,SAAS,aAcrB;AAEM,IAAM,iBAAiB,GAAG,UAC/B,SAAoB,EACpB,YAA8B;;;;;gBAE1B,QAAQ,GAAG,EAAE,CAAA;gBACb,MAAM,GAAG,EAAE,CAAA;;oBAEI,qBAAM,YAAY,CAAC,KAAK,CAAC;oBACxC,KAAK,EAAE,mCAAiB;oBACxB,SAAS,EAAE;wBACT,MAAM,QAAA;wBACN,SAAS,WAAA;qBACV;iBACF,CAAC,EAAA;;gBANM,IAAI,GAAK,CAAA,SAMf,CAAA,KANU;gBAOZ,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAA;gBAEpC,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;;;oBACpC,MAAM,KAAK,EAAE;;oBACtB,sBAAO,QAAQ,EAAA;;;KAChB,CAAA;AAnBY,QAAA,iBAAiB,qBAmB7B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { NextApiResponse } from 'next';
|
|
3
3
|
import { ParsedUrlQuery } from 'querystring';
|
|
4
|
-
|
|
4
|
+
import { Publisher } from '@newskit-render/api';
|
|
5
5
|
export declare type ImageBlock = {
|
|
6
6
|
url: string;
|
|
7
7
|
caption?: string;
|
|
@@ -24,7 +24,7 @@ export declare type Article = {
|
|
|
24
24
|
id: number;
|
|
25
25
|
headline: string;
|
|
26
26
|
publishedDateTime: string;
|
|
27
|
-
publisher:
|
|
27
|
+
publisher: Publisher;
|
|
28
28
|
body: ArticleBody[];
|
|
29
29
|
categories: Category[];
|
|
30
30
|
};
|
|
@@ -50,7 +50,7 @@ export interface StaticPageQueryResponse {
|
|
|
50
50
|
}
|
|
51
51
|
export declare type SitemapConfig = {
|
|
52
52
|
res: NextApiResponse;
|
|
53
|
-
publisher:
|
|
53
|
+
publisher: Publisher;
|
|
54
54
|
domain: string;
|
|
55
55
|
publicationName: string;
|
|
56
56
|
customStaticPageCollection?: CustomStaticPage[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/helpers/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/helpers/types.ts"],"names":[],"mappings":";;;AAcA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,uCAAyB,CAAA;IACzB,2DAA6C,CAAA;AAC/C,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.customStaticPageResponseMockWithUrl = exports.customStaticPageResponseMock = exports.pageSitemapResponseMock = exports.newsSitemapXmlMock = exports.generalSitemapXmlMock = exports.apolloClientPageResponseMock = exports.apolloClientResponseMock = exports.sitemapXmlMock = void 0;
|
|
4
|
+
var api_1 = require("@newskit-render/api");
|
|
4
5
|
exports.sitemapXmlMock = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<sitemapindex \n xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" \n>\n <sitemap>\n <loc>https://virginradio.co.uk/sitemap.xml?channel=page-slug</loc>\n </sitemap>\n <sitemap>\n <loc>https://virginradio.co.uk/sitemap.xml?yyyy=2016&mm=04&dd=02</loc>\n </sitemap>\n <sitemap>\n <loc>https://virginradio.co.uk/sitemap.xml?yyyy=2016&mm=04&dd=01</loc>\n </sitemap>\n <sitemap>\n <loc>https://virginradio.co.uk/sitemap.xml?yyyy=2016&mm=03&dd=31</loc>\n </sitemap>\n</sitemapindex>\n";
|
|
5
6
|
exports.apolloClientResponseMock = [
|
|
6
7
|
{
|
|
7
8
|
id: 1,
|
|
8
|
-
publisher:
|
|
9
|
+
publisher: api_1.Publisher.VIRGIN,
|
|
9
10
|
headline: 'News Title 1',
|
|
10
11
|
publishedDateTime: '2021-05-30T08:18:39.000Z',
|
|
11
12
|
body: [
|
|
@@ -31,7 +32,7 @@ exports.apolloClientResponseMock = [
|
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
34
|
id: 2,
|
|
34
|
-
publisher:
|
|
35
|
+
publisher: api_1.Publisher.VIRGIN,
|
|
35
36
|
headline: 'News Title 2',
|
|
36
37
|
publishedDateTime: '2021-05-31T08:18:39.000Z',
|
|
37
38
|
body: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../../../src/sitemap/__tests__/mocks.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../../../src/sitemap/__tests__/mocks.ts"],"names":[],"mappings":";;;AAAA,2CAA+C;AAGlC,QAAA,cAAc,GAAG,4jBAiB7B,CAAA;AAEY,QAAA,wBAAwB,GAAc;IACjD;QACE,EAAE,EAAE,CAAC;QACL,SAAS,EAAE,eAAS,CAAC,MAAM;QAC3B,QAAQ,EAAE,cAAc;QACxB,iBAAiB,EAAE,0BAA0B;QAC7C,IAAI,EAAE;YACJ;gBACE,GAAG,EAAE,gBAAgB;gBACrB,OAAO,EAAE,uBAAuB;gBAChC,MAAM,EAAE,2BAA2B;gBACnC,GAAG,EAAE,uBAAuB;aAC7B;YACD;gBACE,GAAG,EAAE,mBAAmB;aACzB;SACF;QACD,UAAU,EAAE;YACV;gBACE,EAAE,EAAE,GAAG;gBACP,QAAQ,EAAE,GAAG;gBACb,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,UAAU;aACjB;SACF;KACF;IACD;QACE,EAAE,EAAE,CAAC;QACL,SAAS,EAAE,eAAS,CAAC,MAAM;QAC3B,QAAQ,EAAE,cAAc;QACxB,iBAAiB,EAAE,0BAA0B;QAC7C,IAAI,EAAE;YACJ;gBACE,GAAG,EAAE,mBAAmB;aACzB;SACF;QACD,UAAU,EAAE;YACV;gBACE,EAAE,EAAE,GAAG;gBACP,QAAQ,EAAE,GAAG;gBACb,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,UAAU;aACjB;SACF;KACF;CACF,CAAA;AAEY,QAAA,4BAA4B,GAA4B;IACnE,IAAI,EAAE,WAAW;IACjB,aAAa,EAAE,0BAA0B;IACzC,IAAI,EAAE;QACJ;YACE,GAAG,EAAE,gBAAgB;YACrB,OAAO,EAAE,uBAAuB;YAChC,MAAM,EAAE,2BAA2B;YACnC,GAAG,EAAE,uBAAuB;SAC7B;QACD;YACE,GAAG,EAAE,mBAAmB;SACzB;KACF;CACF,CAAA;AAEY,QAAA,qBAAqB,GAAG,6jCA8BpC,CAAA;AAEY,QAAA,kBAAkB,GAAG,q4FAoFxB,CAAA;AAEG,QAAA,uBAAuB,GAAG,8tBAoBtC,CAAA;AACY,QAAA,4BAA4B,GAAG,gVAS3C,CAAA;AACY,QAAA,mCAAmC,GAAG,6UASlD,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sitemapXml } from '../helpers/utils';
|
|
2
2
|
import genericSitemap from './generic-sitemap-resolver';
|
|
3
3
|
import newsSitemap from './news-sitemap-resolver';
|
|
4
|
-
import {
|
|
5
|
-
export { sitemapXml, genericSitemap, newsSitemap,
|
|
4
|
+
import { CustomStaticPage } from '../helpers/types';
|
|
5
|
+
export { sitemapXml, genericSitemap, newsSitemap, CustomStaticPage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sitemap/index.ts"],"names":[],"mappings":";;;;;;AAAA,0CAA6C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sitemap/index.ts"],"names":[],"mappings":";;;;;;AAAA,0CAA6C;AAKpC,2FALA,kBAAU,OAKA;AAJnB,wFAAuD;AAIlC,yBAJd,kCAAc,CAIc;AAHnC,kFAAiD;AAGZ,sBAH9B,+BAAW,CAG8B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ApolloHttpClient } from '@newskit-render/api';
|
|
1
|
+
import { ApolloHttpClient, Publisher } from '@newskit-render/api';
|
|
2
2
|
import { DocumentNode } from 'graphql';
|
|
3
|
-
import { ArticleList
|
|
4
|
-
export declare const queryArticleList: (publisher:
|
|
3
|
+
import { ArticleList } from './types';
|
|
4
|
+
export declare const queryArticleList: (publisher: Publisher, dates: {
|
|
5
5
|
from: string;
|
|
6
6
|
to?: string | undefined;
|
|
7
7
|
}, apolloClient: ApolloHttpClient, articleQuery: DocumentNode) => Promise<ArticleList>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryArticleList.js","sourceRoot":"","sources":["../../../src/helpers/queryArticleList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAC9B,
|
|
1
|
+
{"version":3,"file":"queryArticleList.js","sourceRoot":"","sources":["../../../src/helpers/queryArticleList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAC9B,SAAoB,EACpB,KAAoC,EACpC,YAA8B,EAC9B,YAA0B;;;;;gBAEtB,MAAM,GAAG,EAAE,CAAA;gBAEX,eAAe,GAAgB,EAAE,CAAA;gBAC7B,IAAI,GAAS,KAAK,KAAd,EAAE,EAAE,GAAK,KAAK,GAAV,CAAU;gBAGT,qBAAM,YAAY,CAAC,KAAK,CAAC;wBACxC,KAAK,EAAE,YAAY;wBACnB,SAAS,EAAE;4BACT,MAAM,EAAE,MAAM;4BACd,SAAS,EAAE,SAAS;4BACpB,IAAI,MAAA;4BACJ,EAAE,IAAA;yBACH;qBACF,CAAC;oBAEF,mDAAmD;kBAFjD;;gBARM,IAAI,GAAK,CAAA,SAQf,CAAA,KARU;gBAUZ,mDAAmD;gBACnD,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAA;gBAC1C,mFAAmF;gBACnF,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;gBACzE,kDAAkD;gBAClD,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;;;qBAGxD,CAAA,eAAe,CAAC,MAAM,GAAG,UAAU,CAAA;gBACvB,qBAAM,YAAY,CAAC,KAAK,CAAC;wBACxC,KAAK,EAAE,YAAY;wBACnB,SAAS,EAAE;4BACT,MAAM,EAAE,MAAM;4BACd,SAAS,EAAE,SAAS;4BACpB,IAAI,MAAA;4BACJ,EAAE,IAAA;yBACH;qBACF,CAAC,EAAA;;gBARM,SAAS,CAAA,SAQf,CAAA,KARU;gBAUZ,MAAM,GAAG,MAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAA;gBAC1C,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,MAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;;oBAGjE,sBAAO,eAAe,EAAA;;;KACvB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Channel,
|
|
2
|
-
import { ApolloHttpClient } from '@newskit-render/api';
|
|
3
|
-
export declare const queryPage: (publisher:
|
|
4
|
-
export declare const queryChannelsList: (publisher:
|
|
1
|
+
import { Channel, StaticPage } from './types';
|
|
2
|
+
import { ApolloHttpClient, Publisher } from '@newskit-render/api';
|
|
3
|
+
export declare const queryPage: (publisher: Publisher, channel: string, apolloClient: ApolloHttpClient) => Promise<Omit<StaticPage, 'url'>>;
|
|
4
|
+
export declare const queryChannelsList: (publisher: Publisher, apolloClient: ApolloHttpClient) => Promise<Channel[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryPage.js","sourceRoot":"","sources":["../../../src/helpers/queryPage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"queryPage.js","sourceRoot":"","sources":["../../../src/helpers/queryPage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAIrD,MAAM,CAAC,IAAM,SAAS,GAAG,UACvB,SAAoB,EACpB,OAAe,EACf,YAA8B;;;;oBAEY,qBAAM,YAAY,CAAC,KAAK,CAAC;oBACjE,KAAK,EAAE,QAAQ;oBACf,SAAS,EAAE;wBACT,SAAS,EAAE,SAAS;wBACpB,OAAO,SAAA;qBACR;oBACD,WAAW,EAAE,KAAK;iBACnB,CAAC,EAAA;;gBAPM,IAAI,GAA8B,CAAA,SAOxC,CAAA,KAPU;gBAQZ,sBAAO,IAAI,CAAC,IAAI,EAAA;;;KACjB,CAAA;AAED,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAC/B,SAAoB,EACpB,YAA8B;;;;;gBAE1B,QAAQ,GAAG,EAAE,CAAA;gBACb,MAAM,GAAG,EAAE,CAAA;;oBAEI,qBAAM,YAAY,CAAC,KAAK,CAAC;oBACxC,KAAK,EAAE,iBAAiB;oBACxB,SAAS,EAAE;wBACT,MAAM,QAAA;wBACN,SAAS,WAAA;qBACV;iBACF,CAAC,EAAA;;gBANM,IAAI,GAAK,CAAA,SAMf,CAAA,KANU;gBAOZ,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAA;gBAEpC,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;;;oBACpC,MAAM,KAAK,EAAE;;oBACtB,sBAAO,QAAQ,EAAA;;;KAChB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { NextApiResponse } from 'next';
|
|
3
3
|
import { ParsedUrlQuery } from 'querystring';
|
|
4
|
-
|
|
4
|
+
import { Publisher } from '@newskit-render/api';
|
|
5
5
|
export declare type ImageBlock = {
|
|
6
6
|
url: string;
|
|
7
7
|
caption?: string;
|
|
@@ -24,7 +24,7 @@ export declare type Article = {
|
|
|
24
24
|
id: number;
|
|
25
25
|
headline: string;
|
|
26
26
|
publishedDateTime: string;
|
|
27
|
-
publisher:
|
|
27
|
+
publisher: Publisher;
|
|
28
28
|
body: ArticleBody[];
|
|
29
29
|
categories: Category[];
|
|
30
30
|
};
|
|
@@ -50,7 +50,7 @@ export interface StaticPageQueryResponse {
|
|
|
50
50
|
}
|
|
51
51
|
export declare type SitemapConfig = {
|
|
52
52
|
res: NextApiResponse;
|
|
53
|
-
publisher:
|
|
53
|
+
publisher: Publisher;
|
|
54
54
|
domain: string;
|
|
55
55
|
publicationName: string;
|
|
56
56
|
customStaticPageCollection?: CustomStaticPage[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/helpers/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/helpers/types.ts"],"names":[],"mappings":"AAcA,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,uCAAyB,CAAA;IACzB,2DAA6C,CAAA;AAC/C,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { Publisher } from '@newskit-render/api';
|
|
1
2
|
export var sitemapXmlMock = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<sitemapindex \n xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" \n>\n <sitemap>\n <loc>https://virginradio.co.uk/sitemap.xml?channel=page-slug</loc>\n </sitemap>\n <sitemap>\n <loc>https://virginradio.co.uk/sitemap.xml?yyyy=2016&mm=04&dd=02</loc>\n </sitemap>\n <sitemap>\n <loc>https://virginradio.co.uk/sitemap.xml?yyyy=2016&mm=04&dd=01</loc>\n </sitemap>\n <sitemap>\n <loc>https://virginradio.co.uk/sitemap.xml?yyyy=2016&mm=03&dd=31</loc>\n </sitemap>\n</sitemapindex>\n";
|
|
2
3
|
export var apolloClientResponseMock = [
|
|
3
4
|
{
|
|
4
5
|
id: 1,
|
|
5
|
-
publisher:
|
|
6
|
+
publisher: Publisher.VIRGIN,
|
|
6
7
|
headline: 'News Title 1',
|
|
7
8
|
publishedDateTime: '2021-05-30T08:18:39.000Z',
|
|
8
9
|
body: [
|
|
@@ -28,7 +29,7 @@ export var apolloClientResponseMock = [
|
|
|
28
29
|
},
|
|
29
30
|
{
|
|
30
31
|
id: 2,
|
|
31
|
-
publisher:
|
|
32
|
+
publisher: Publisher.VIRGIN,
|
|
32
33
|
headline: 'News Title 2',
|
|
33
34
|
publishedDateTime: '2021-05-31T08:18:39.000Z',
|
|
34
35
|
body: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../../../src/sitemap/__tests__/mocks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../../../src/sitemap/__tests__/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAG/C,MAAM,CAAC,IAAM,cAAc,GAAG,4jBAiB7B,CAAA;AAED,MAAM,CAAC,IAAM,wBAAwB,GAAc;IACjD;QACE,EAAE,EAAE,CAAC;QACL,SAAS,EAAE,SAAS,CAAC,MAAM;QAC3B,QAAQ,EAAE,cAAc;QACxB,iBAAiB,EAAE,0BAA0B;QAC7C,IAAI,EAAE;YACJ;gBACE,GAAG,EAAE,gBAAgB;gBACrB,OAAO,EAAE,uBAAuB;gBAChC,MAAM,EAAE,2BAA2B;gBACnC,GAAG,EAAE,uBAAuB;aAC7B;YACD;gBACE,GAAG,EAAE,mBAAmB;aACzB;SACF;QACD,UAAU,EAAE;YACV;gBACE,EAAE,EAAE,GAAG;gBACP,QAAQ,EAAE,GAAG;gBACb,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,UAAU;aACjB;SACF;KACF;IACD;QACE,EAAE,EAAE,CAAC;QACL,SAAS,EAAE,SAAS,CAAC,MAAM;QAC3B,QAAQ,EAAE,cAAc;QACxB,iBAAiB,EAAE,0BAA0B;QAC7C,IAAI,EAAE;YACJ;gBACE,GAAG,EAAE,mBAAmB;aACzB;SACF;QACD,UAAU,EAAE;YACV;gBACE,EAAE,EAAE,GAAG;gBACP,QAAQ,EAAE,GAAG;gBACb,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,UAAU;aACjB;SACF;KACF;CACF,CAAA;AAED,MAAM,CAAC,IAAM,4BAA4B,GAA4B;IACnE,IAAI,EAAE,WAAW;IACjB,aAAa,EAAE,0BAA0B;IACzC,IAAI,EAAE;QACJ;YACE,GAAG,EAAE,gBAAgB;YACrB,OAAO,EAAE,uBAAuB;YAChC,MAAM,EAAE,2BAA2B;YACnC,GAAG,EAAE,uBAAuB;SAC7B;QACD;YACE,GAAG,EAAE,mBAAmB;SACzB;KACF;CACF,CAAA;AAED,MAAM,CAAC,IAAM,qBAAqB,GAAG,6jCA8BpC,CAAA;AAED,MAAM,CAAC,IAAM,kBAAkB,GAAG,q4FAoFxB,CAAA;AAEV,MAAM,CAAC,IAAM,uBAAuB,GAAG,8tBAoBtC,CAAA;AACD,MAAM,CAAC,IAAM,4BAA4B,GAAG,gVAS3C,CAAA;AACD,MAAM,CAAC,IAAM,mCAAmC,GAAG,6UASlD,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sitemapXml } from '../helpers/utils';
|
|
2
2
|
import genericSitemap from './generic-sitemap-resolver';
|
|
3
3
|
import newsSitemap from './news-sitemap-resolver';
|
|
4
|
-
import {
|
|
5
|
-
export { sitemapXml, genericSitemap, newsSitemap,
|
|
4
|
+
import { CustomStaticPage } from '../helpers/types';
|
|
5
|
+
export { sitemapXml, genericSitemap, newsSitemap, CustomStaticPage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sitemapXml } from '../helpers/utils';
|
|
2
2
|
import genericSitemap from './generic-sitemap-resolver';
|
|
3
3
|
import newsSitemap from './news-sitemap-resolver';
|
|
4
|
-
export { sitemapXml, genericSitemap, newsSitemap
|
|
4
|
+
export { sitemapXml, genericSitemap, newsSitemap };
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sitemap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,cAAc,MAAM,4BAA4B,CAAA;AACvD,OAAO,WAAW,MAAM,yBAAyB,CAAA;AAGjD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sitemap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,cAAc,MAAM,4BAA4B,CAAA;AACvD,OAAO,WAAW,MAAM,yBAAyB,CAAA;AAGjD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAoB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/feed",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "Newskit Render - Feed package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@apollo/client": "3.3.7",
|
|
27
|
-
"@newskit-render/api": "^0.18.
|
|
27
|
+
"@newskit-render/api": "^0.18.1",
|
|
28
28
|
"cross-fetch": "3.1.4",
|
|
29
29
|
"graphql": "15.6.0",
|
|
30
30
|
"lodash.escape": "4.0.1",
|