@financial-times/cp-content-pipeline-schema 3.3.2 → 3.5.0
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 +30 -0
- package/lib/datasources/capi.d.ts +0 -2
- package/lib/datasources/capi.js +10 -23
- package/lib/datasources/capi.js.map +1 -1
- package/lib/datasources/instrumented.js +4 -1
- package/lib/datasources/instrumented.js.map +1 -1
- package/lib/datasources/origami-image.d.ts +0 -2
- package/lib/datasources/origami-image.js +5 -19
- package/lib/datasources/origami-image.js.map +1 -1
- package/lib/datasources/twitter.d.ts +0 -2
- package/lib/datasources/twitter.js +2 -16
- package/lib/datasources/twitter.js.map +1 -1
- package/lib/datasources/url-management.js +5 -3
- package/lib/datasources/url-management.js.map +1 -1
- package/lib/fixtures/dummyContext.js +1 -1
- package/lib/generated/index.d.ts +72 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js.map +1 -1
- package/lib/model/Byline.js +11 -14
- package/lib/model/Byline.js.map +1 -1
- package/lib/model/CapiList.js +2 -0
- package/lib/model/CapiList.js.map +1 -1
- package/lib/model/CapiResponse.d.ts +7 -3
- package/lib/model/CapiResponse.js +125 -57
- package/lib/model/CapiResponse.js.map +1 -1
- package/lib/model/CapiResponse.test.js +92 -7
- package/lib/model/CapiResponse.test.js.map +1 -1
- package/lib/model/Clip.js +2 -0
- package/lib/model/Clip.js.map +1 -1
- package/lib/model/Concept.js +4 -10
- package/lib/model/Concept.js.map +1 -1
- package/lib/model/FlourishSource.js +5 -10
- package/lib/model/FlourishSource.js.map +1 -1
- package/lib/model/Image.js +10 -20
- package/lib/model/Image.js.map +1 -1
- package/lib/model/LeadFlourish.js +4 -10
- package/lib/model/LeadFlourish.js.map +1 -1
- package/lib/model/Person.js +5 -16
- package/lib/model/Person.js.map +1 -1
- package/lib/model/Picture.js +3 -0
- package/lib/model/Picture.js.map +1 -1
- package/lib/model/RichText.js +3 -0
- package/lib/model/RichText.js.map +1 -1
- package/lib/model/Topper.js +5 -16
- package/lib/model/Topper.js.map +1 -1
- package/lib/model/schemas/capi/article.d.ts +5 -0
- package/lib/model/schemas/capi/audio.d.ts +3 -0
- package/lib/model/schemas/capi/base-schema.d.ts +8 -0
- package/lib/model/schemas/capi/base-schema.js +1 -0
- package/lib/model/schemas/capi/base-schema.js.map +1 -1
- package/lib/model/schemas/capi/content-package.d.ts +3 -0
- package/lib/model/schemas/capi/custom-code-component.d.ts +5 -0
- package/lib/model/schemas/capi/index.d.ts +24 -0
- package/lib/model/schemas/capi/internal-content.d.ts +1 -1
- package/lib/model/schemas/capi/live-blog-package.d.ts +5 -0
- package/lib/model/schemas/capi/placeholder.d.ts +5 -0
- package/lib/model/schemas/capi/video.d.ts +3 -0
- package/lib/resolvers/content-tree/references/ClipSet.d.ts +1 -0
- package/lib/resolvers/content-tree/references/ClipSet.js +1 -0
- package/lib/resolvers/content-tree/references/ClipSet.js.map +1 -1
- package/lib/resolvers/content-tree/references/RawImage.js +2 -0
- package/lib/resolvers/content-tree/references/RawImage.js.map +1 -1
- package/lib/resolvers/content.d.ts +26 -1
- package/lib/resolvers/content.js +21 -1
- package/lib/resolvers/content.js.map +1 -1
- package/lib/resolvers/index.d.ts +26 -1
- package/lib/resolvers/literal-union.js +1 -0
- package/lib/resolvers/literal-union.js.map +1 -1
- package/lib/types/connection.d.ts +21 -0
- package/lib/types/connection.js +5 -0
- package/lib/types/connection.js.map +1 -0
- package/package.json +1 -1
- package/queries/article.graphql +9 -2
- package/src/datasources/capi.ts +1 -14
- package/src/datasources/origami-image.ts +1 -13
- package/src/datasources/twitter.ts +1 -14
- package/src/fixtures/dummyContext.ts +1 -1
- package/src/generated/index.ts +74 -1
- package/src/index.ts +1 -0
- package/src/model/CapiResponse.test.ts +137 -7
- package/src/model/CapiResponse.ts +129 -37
- package/src/model/schemas/capi/base-schema.ts +1 -0
- package/src/model/schemas/capi/internal-content.ts +1 -1
- package/src/resolvers/content-tree/references/ClipSet.ts +1 -0
- package/src/resolvers/content.ts +31 -1
- package/src/types/connection.ts +28 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/typedefs/content.graphql +40 -2
- package/typedefs/references/clipSet.graphql +3 -0
- package/lib/helpers/timeout-error.d.ts +0 -6
- package/lib/helpers/timeout-error.js +0 -15
- package/lib/helpers/timeout-error.js.map +0 -1
- package/src/helpers/timeout-error.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.5.0](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v3.4.0...cp-content-pipeline-schema-v3.5.0) (2024-10-24)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** request how many live blog posts to fetch in query parameter ([bde0da2](https://github.com/Financial-Times/cp-content-pipeline/commit/bde0da2c58c575b4f1d2fe80d30beb1b36a696a3))
|
|
9
|
+
* **client:** return whether more blog posts can be requested ([4fc05d5](https://github.com/Financial-Times/cp-content-pipeline/commit/4fc05d536db53d33315abc7752e5d24649d28e64))
|
|
10
|
+
* **schema:** add GraphQL argument to request first x live blog posts ([8be94cc](https://github.com/Financial-Times/cp-content-pipeline/commit/8be94cca226cfcfe746ff6861b203db188943cd0))
|
|
11
|
+
* **schema:** add pagination support for live blog posts ([5b9aa4f](https://github.com/Financial-Times/cp-content-pipeline/commit/5b9aa4f26150a13645031b3de40d695cd5308cca))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* don't cache responses when CAPI timed out ([0a84a51](https://github.com/Financial-Times/cp-content-pipeline/commit/0a84a5168a15b4898204c48c19797ef496ccda87))
|
|
17
|
+
* **schema:** don't erroneously throw timeout errors ([54b8b41](https://github.com/Financial-Times/cp-content-pipeline/commit/54b8b415b1851b496c5eadcef9172c5960e73ac3))
|
|
18
|
+
* **schema:** sort live blog posts by published date after pagination ([7ed26f2](https://github.com/Financial-Times/cp-content-pipeline/commit/7ed26f24f64b7502c1e8610f4814c515dc046135))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Performance Improvements
|
|
22
|
+
|
|
23
|
+
* **schema:** only call CAPI once in pinnedPost resolver ([ea1b5be](https://github.com/Financial-Times/cp-content-pipeline/commit/ea1b5beee8e361050df4334a5e5592c7d6247103))
|
|
24
|
+
* **schema:** refactor connections logic into contains method ([022213e](https://github.com/Financial-Times/cp-content-pipeline/commit/022213ead8517d90d211a1d08541869485965618))
|
|
25
|
+
|
|
26
|
+
## [3.4.0](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v3.3.2...cp-content-pipeline-schema-v3.4.0) (2024-10-21)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* add unique identifier to clip tracking ([9f4f7d9](https://github.com/Financial-Times/cp-content-pipeline/commit/9f4f7d9e226feb17bb7221569d2a76b13524404a))
|
|
32
|
+
|
|
3
33
|
## [3.3.2](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v3.3.1...cp-content-pipeline-schema-v3.3.2) (2024-10-17)
|
|
4
34
|
|
|
5
35
|
|
|
@@ -9,8 +9,6 @@ export declare class CapiDataSource extends InstrumentedRESTDataSource {
|
|
|
9
9
|
articleCacheTTL: number;
|
|
10
10
|
peopleCacheTTL: number;
|
|
11
11
|
get backendSystemCode(): string;
|
|
12
|
-
abortController: AbortController;
|
|
13
|
-
timeout: ReturnType<typeof setTimeout> | undefined;
|
|
14
12
|
nextNotificationLink?: string;
|
|
15
13
|
willSendRequest(path: string, request: AugmentedRequest): void;
|
|
16
14
|
getContent(uuid: string, packageContainer?: CapiResponse): Promise<CapiResponse>;
|
package/lib/datasources/capi.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.CapiDataSource = void 0;
|
|
7
4
|
const CapiResponse_1 = require("../model/CapiResponse");
|
|
8
5
|
const instrumented_1 = require("./instrumented");
|
|
9
6
|
const CapiList_1 = require("../model/CapiList");
|
|
10
|
-
const timeout_error_1 = __importDefault(require("../helpers/timeout-error"));
|
|
11
7
|
const Person_1 = require("../model/Person");
|
|
12
8
|
const REQUEST_TIMEOUT = process.env.CAPI_DATASOURCE_REQUEST_TIMEOUT
|
|
13
9
|
? parseInt(process.env.CAPI_DATASOURCE_REQUEST_TIMEOUT)
|
|
@@ -20,27 +16,22 @@ function getWrappedCacheKey(cache) {
|
|
|
20
16
|
return '';
|
|
21
17
|
}
|
|
22
18
|
class CapiDataSource extends instrumented_1.InstrumentedRESTDataSource {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
? parseInt(process.env.PEOPLE_CACHE_TTL)
|
|
32
|
-
: 600; // 10 minutes
|
|
33
|
-
this.abortController = new AbortController();
|
|
34
|
-
this.timeout = undefined;
|
|
35
|
-
}
|
|
19
|
+
baseURL = process.env.CAPI_URL || 'https://api-t.ft.com/';
|
|
20
|
+
capiKey = process.env.CAPI_API_KEY || '';
|
|
21
|
+
articleCacheTTL = process.env.ARTICLE_CACHE_TTL
|
|
22
|
+
? parseInt(process.env.ARTICLE_CACHE_TTL)
|
|
23
|
+
: 60 * 60 * 24 * 7 * 4; // 4 weeks
|
|
24
|
+
peopleCacheTTL = process.env.PEOPLE_CACHE_TTL
|
|
25
|
+
? parseInt(process.env.PEOPLE_CACHE_TTL)
|
|
26
|
+
: 600; // 10 minutes
|
|
36
27
|
get backendSystemCode() {
|
|
37
28
|
return 'up-ica';
|
|
38
29
|
}
|
|
30
|
+
nextNotificationLink;
|
|
39
31
|
willSendRequest(path, request) {
|
|
40
32
|
super.willSendRequest(path, request);
|
|
33
|
+
request.signal = AbortSignal.timeout(REQUEST_TIMEOUT);
|
|
41
34
|
request.headers['x-api-key'] = this.capiKey;
|
|
42
|
-
request.signal = this.abortController.signal;
|
|
43
|
-
this.timeout = setTimeout(() => this.abortController.abort(new timeout_error_1.default(REQUEST_TIMEOUT)), REQUEST_TIMEOUT);
|
|
44
35
|
}
|
|
45
36
|
async getContent(uuid, packageContainer) {
|
|
46
37
|
this.context.addSurrogateKeys([
|
|
@@ -54,10 +45,6 @@ class CapiDataSource extends instrumented_1.InstrumentedRESTDataSource {
|
|
|
54
45
|
});
|
|
55
46
|
this.context.contentRequestedOnce = true;
|
|
56
47
|
this.calls.push(uuid);
|
|
57
|
-
if (this.timeout) {
|
|
58
|
-
clearTimeout(this.timeout);
|
|
59
|
-
this.timeout = undefined;
|
|
60
|
-
}
|
|
61
48
|
return CapiResponse_1.CapiResponse.fromJSON(content, this.context, packageContainer);
|
|
62
49
|
}
|
|
63
50
|
async getPerson(uuid) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capi.js","sourceRoot":"","sources":["../../src/datasources/capi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"capi.js","sourceRoot":"","sources":["../../src/datasources/capi.ts"],"names":[],"mappings":";;;AAAA,wDAAoD;AACpD,iDAA2D;AAM3D,gDAA4C;AAC5C,4CAAwC;AAExC,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,+BAA+B;IACjE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC;IACvD,CAAC,CAAC,GAAG,CAAA;AAEP,MAAM,WAAW,GAAG,CAAC,KAAoB,EAAmC,EAAE,CAC5E,QAAQ,IAAI,KAAK,CAAA;AAEnB,SAAS,kBAAkB,CAAC,KAAoB;IAC9C,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC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,IAAI,EAAE,EAAE,YAAY,CAAC,CAC/D,CAAA;QAED,OAAO,GAAG,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAA;IAC5E,CAAC;CACF;AA5ED,wCA4EC"}
|
|
@@ -7,6 +7,10 @@ const fetch_error_handler_1 = require("@dotcom-reliability-kit/fetch-error-handl
|
|
|
7
7
|
const cache_1 = require("../types/cache");
|
|
8
8
|
const errors_1 = require("@dotcom-reliability-kit/errors");
|
|
9
9
|
class InstrumentedRESTDataSource extends datasource_rest_1.RESTDataSource {
|
|
10
|
+
startTime;
|
|
11
|
+
context;
|
|
12
|
+
calls = [];
|
|
13
|
+
errorHandler;
|
|
10
14
|
get backendSystemCode() {
|
|
11
15
|
return undefined;
|
|
12
16
|
}
|
|
@@ -17,7 +21,6 @@ class InstrumentedRESTDataSource extends datasource_rest_1.RESTDataSource {
|
|
|
17
21
|
cache: wrappedCache,
|
|
18
22
|
fetch: (url, init) => this.errorHandler(global.fetch(url, init)),
|
|
19
23
|
});
|
|
20
|
-
this.calls = [];
|
|
21
24
|
this.errorHandler = (0, fetch_error_handler_1.createFetchErrorHandler)({
|
|
22
25
|
upstreamSystemCode: this.backendSystemCode,
|
|
23
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumented.js","sourceRoot":"","sources":["../../src/datasources/instrumented.ts"],"names":[],"mappings":";;;AAAA,6DAMgC;AAChC,qEAAoE;AACpE,qFAGoD;AAEpD,0CAAmD;AAEnD,2DAA0D;AAE1D,MAAa,0BACX,SAAQ,gCAAc;
|
|
1
|
+
{"version":3,"file":"instrumented.js","sourceRoot":"","sources":["../../src/datasources/instrumented.ts"],"names":[],"mappings":";;;AAAA,6DAMgC;AAChC,qEAAoE;AACpE,qFAGoD;AAEpD,0CAAmD;AAEnD,2DAA0D;AAE1D,MAAa,0BACX,SAAQ,gCAAc;IAGtB,SAAS,CAAS;IAClB,OAAO,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K,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,kBAAS,EAAE,CAAC;gBAC/B,MAAM,MAAM,GACV,KAAK,CAAC,IAAI,KAAK,qBAAqB;oBAClC,CAAC,CAAC,GAAG;oBACL,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,CAAC,CAAA;gBAChD,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;gBAEpE,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;YAC3C,CAAC;YAED,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;CACF;AArGD,gEAqGC"}
|
|
@@ -3,8 +3,6 @@ import { AugmentedRequest, CacheOptions } from '@apollo/datasource-rest';
|
|
|
3
3
|
export declare class OrigamiImageDataSource extends InstrumentedRESTDataSource {
|
|
4
4
|
baseURL: string;
|
|
5
5
|
get backendSystemCode(): string;
|
|
6
|
-
abortController: AbortController;
|
|
7
|
-
timeout: ReturnType<typeof setTimeout> | undefined;
|
|
8
6
|
imageMetadataCacheTTL: number;
|
|
9
7
|
willSendRequest(path: string, request: AugmentedRequest): void;
|
|
10
8
|
protected cacheOptionsFor(): CacheOptions;
|
|
@@ -1,31 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.OrigamiImageDataSource = void 0;
|
|
7
|
-
const timeout_error_1 = __importDefault(require("../helpers/timeout-error"));
|
|
8
4
|
const instrumented_1 = require("./instrumented");
|
|
9
5
|
const REQUEST_TIMEOUT = process.env.ORIGAMI_DATASOURCE_REQUEST_TIMEOUT
|
|
10
6
|
? parseInt(process.env.ORIGAMI_DATASOURCE_REQUEST_TIMEOUT)
|
|
11
7
|
: 200;
|
|
12
8
|
class OrigamiImageDataSource extends instrumented_1.InstrumentedRESTDataSource {
|
|
13
|
-
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.baseURL = 'https://www.ft.com/__origami/service/image/v2/';
|
|
16
|
-
this.abortController = new AbortController();
|
|
17
|
-
this.timeout = undefined;
|
|
18
|
-
this.imageMetadataCacheTTL = process.env.IMAGE_METADATA_CACHE_TTL
|
|
19
|
-
? parseInt(process.env.IMAGE_METADATA_CACHE_TTL)
|
|
20
|
-
: 60 * 60 * 24 * 7; // 1 week
|
|
21
|
-
}
|
|
9
|
+
baseURL = 'https://www.ft.com/__origami/service/image/v2/';
|
|
22
10
|
get backendSystemCode() {
|
|
23
11
|
return 'origami-image-service-v2';
|
|
24
12
|
}
|
|
13
|
+
imageMetadataCacheTTL = process.env.IMAGE_METADATA_CACHE_TTL
|
|
14
|
+
? parseInt(process.env.IMAGE_METADATA_CACHE_TTL)
|
|
15
|
+
: 60 * 60 * 24 * 7; // 1 week
|
|
25
16
|
willSendRequest(path, request) {
|
|
26
17
|
super.willSendRequest(path, request);
|
|
27
|
-
request.signal =
|
|
28
|
-
this.timeout = setTimeout(() => this.abortController.abort(new timeout_error_1.default(REQUEST_TIMEOUT)), REQUEST_TIMEOUT);
|
|
18
|
+
request.signal = AbortSignal.timeout(REQUEST_TIMEOUT);
|
|
29
19
|
}
|
|
30
20
|
cacheOptionsFor() {
|
|
31
21
|
return { ttl: this.imageMetadataCacheTTL };
|
|
@@ -33,10 +23,6 @@ class OrigamiImageDataSource extends instrumented_1.InstrumentedRESTDataSource {
|
|
|
33
23
|
async getImageMetadata(url) {
|
|
34
24
|
const imageMetadata = await this.get(`images/metadata/${encodeURIComponent(url)}?source=next`);
|
|
35
25
|
this.calls.push(url);
|
|
36
|
-
if (this.timeout) {
|
|
37
|
-
clearTimeout(this.timeout);
|
|
38
|
-
this.timeout = undefined;
|
|
39
|
-
}
|
|
40
26
|
return imageMetadata;
|
|
41
27
|
}
|
|
42
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"origami-image.js","sourceRoot":"","sources":["../../src/datasources/origami-image.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"origami-image.js","sourceRoot":"","sources":["../../src/datasources/origami-image.ts"],"names":[],"mappings":";;;AAAA,iDAA2D;AAG3D,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,kCAAkC;IACpE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;IAC1D,CAAC,CAAC,GAAG,CAAA;AAEP,MAAa,sBAAuB,SAAQ,yCAA0B;IACpE,OAAO,GAAG,gDAAgD,CAAA;IAC1D,IAAI,iBAAiB;QACnB,OAAO,0BAA0B,CAAA;IACnC,CAAC;IAED,qBAAqB,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB;QAC1D,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;QAChD,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA,CAAC,SAAS;IAErB,eAAe,CAAC,IAAY,EAAE,OAAyB;QAC9D,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QAEpC,OAAO,CAAC,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;IACvD,CAAC;IAES,eAAe;QACvB,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,qBAAqB,EAAE,CAAA;IAC5C,CAAC;IAED,KAAK,CAAC,gBAAgB,CACpB,GAAW;QAEX,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,GAAG,CAClC,mBAAmB,kBAAkB,CAAC,GAAG,CAAC,cAAc,CACzD,CAAA;QAED,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAEpB,OAAO,aAAa,CAAA;IACtB,CAAC;CACF;AA/BD,wDA+BC"}
|
|
@@ -3,8 +3,6 @@ import { InstrumentedRESTDataSource } from './instrumented';
|
|
|
3
3
|
export declare class TwitterDataSource extends InstrumentedRESTDataSource {
|
|
4
4
|
baseURL: string;
|
|
5
5
|
get backendSystemCode(): string;
|
|
6
|
-
abortController: AbortController;
|
|
7
|
-
timeout: ReturnType<typeof setTimeout> | undefined;
|
|
8
6
|
willSendRequest(path: string, request: AugmentedRequest): void;
|
|
9
7
|
getTweet(tweetUrl: string): Promise<{
|
|
10
8
|
html: string;
|
|
@@ -22,40 +22,26 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
exports.TwitterDataSource = void 0;
|
|
30
27
|
const z = __importStar(require("zod"));
|
|
31
28
|
const instrumented_1 = require("./instrumented");
|
|
32
|
-
const timeout_error_1 = __importDefault(require("../helpers/timeout-error"));
|
|
33
29
|
const REQUEST_TIMEOUT = process.env.TWITTER_DATASOURCE_REQUEST_TIMEOUT
|
|
34
30
|
? parseInt(process.env.TWITTER_DATASOURCE_REQUEST_TIMEOUT)
|
|
35
31
|
: 1000;
|
|
36
32
|
const Tweet = z.object({ html: z.string() });
|
|
37
33
|
class TwitterDataSource extends instrumented_1.InstrumentedRESTDataSource {
|
|
38
|
-
|
|
39
|
-
super(...arguments);
|
|
40
|
-
this.baseURL = 'https://publish.twitter.com';
|
|
41
|
-
this.abortController = new AbortController();
|
|
42
|
-
this.timeout = undefined;
|
|
43
|
-
}
|
|
34
|
+
baseURL = 'https://publish.twitter.com';
|
|
44
35
|
get backendSystemCode() {
|
|
45
36
|
return 'twitter-oembed-api';
|
|
46
37
|
}
|
|
47
38
|
willSendRequest(path, request) {
|
|
48
39
|
super.willSendRequest(path, request);
|
|
49
|
-
request.signal =
|
|
50
|
-
this.timeout = setTimeout(() => this.abortController.abort(new timeout_error_1.default(REQUEST_TIMEOUT)), REQUEST_TIMEOUT);
|
|
40
|
+
request.signal = AbortSignal.timeout(REQUEST_TIMEOUT);
|
|
51
41
|
}
|
|
52
42
|
async getTweet(tweetUrl) {
|
|
53
43
|
const tweet = await this.get(`oembed?url=${tweetUrl}&omit_script=true`);
|
|
54
44
|
this.calls.push(tweetUrl);
|
|
55
|
-
if (this.timeout) {
|
|
56
|
-
clearTimeout(this.timeout);
|
|
57
|
-
this.timeout = undefined;
|
|
58
|
-
}
|
|
59
45
|
return Tweet.parse(tweet);
|
|
60
46
|
}
|
|
61
47
|
cacheOptionsFor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twitter.js","sourceRoot":"","sources":["../../src/datasources/twitter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"twitter.js","sourceRoot":"","sources":["../../src/datasources/twitter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAAwB;AAExB,iDAA2D;AAE3D,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,kCAAkC;IACpE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;IAC1D,CAAC,CAAC,IAAI,CAAA;AAER,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAE5C,MAAa,iBAAkB,SAAQ,yCAA0B;IAC/D,OAAO,GAAG,6BAA6B,CAAA;IACvC,IAAI,iBAAiB;QACnB,OAAO,oBAAoB,CAAA;IAC7B,CAAC;IAEQ,eAAe,CAAC,IAAY,EAAE,OAAyB;QAC9D,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QAEpC,OAAO,CAAC,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;IACvD,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,QAAgB;QAC7B,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,cAAc,QAAQ,mBAAmB,CAAC,CAAA;QAEvE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAEzB,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAC3B,CAAC;IAED,eAAe;QACb,iFAAiF;QACjF,oFAAoF;QACpF,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAA;IACtB,CAAC;CACF;AAzBD,8CAyBC"}
|
|
@@ -9,9 +9,12 @@ const n_url_management_api_read_client_1 = __importDefault(require("@financial-t
|
|
|
9
9
|
const CACHE_PREFIX = 'nurlmgmtapi:';
|
|
10
10
|
const DEFAULT_TTL_IN_SECONDS = 60 * 60; // one hour
|
|
11
11
|
class URLManagementDataSource {
|
|
12
|
+
memoizedResults = new Map();
|
|
13
|
+
cache;
|
|
14
|
+
context;
|
|
15
|
+
calls = [];
|
|
16
|
+
static clientInitialised = false;
|
|
12
17
|
constructor({ context, cache }) {
|
|
13
|
-
this.memoizedResults = new Map();
|
|
14
|
-
this.calls = [];
|
|
15
18
|
if (!URLManagementDataSource.clientInitialised) {
|
|
16
19
|
// n-url-management-api-read-client uses next-metrics histograms
|
|
17
20
|
// but our custom Graphite client doesn't support that and also
|
|
@@ -48,5 +51,4 @@ class URLManagementDataSource {
|
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
exports.URLManagementDataSource = URLManagementDataSource;
|
|
51
|
-
URLManagementDataSource.clientInitialised = false;
|
|
52
54
|
//# sourceMappingURL=url-management.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-management.js","sourceRoot":"","sources":["../../src/datasources/url-management.ts"],"names":[],"mappings":";;;;;;AAAA,qEAGoC;AAEpC,yHAA2F;AAK3F,MAAM,YAAY,GAAG,cAAc,CAAA;AACnC,MAAM,sBAAsB,GAAG,EAAE,GAAG,EAAE,CAAA,CAAC,WAAW;AAElD,MAAa,uBAAuB;
|
|
1
|
+
{"version":3,"file":"url-management.js","sourceRoot":"","sources":["../../src/datasources/url-management.ts"],"names":[],"mappings":";;;;;;AAAA,qEAGoC;AAEpC,yHAA2F;AAK3F,MAAM,YAAY,GAAG,cAAc,CAAA;AACnC,MAAM,sBAAsB,GAAG,EAAE,GAAG,EAAE,CAAA,CAAC,WAAW;AAElD,MAAa,uBAAuB;IAClC,eAAe,GAAG,IAAI,GAAG,EAA2B,CAAA;IACpD,KAAK,CAAe;IACpB,OAAO,CAAc;IACrB,KAAK,GAAa,EAAE,CAAA;IAEpB,MAAM,CAAC,iBAAiB,GAAG,KAAK,CAAA;IAEhC,YAAY,EAAE,OAAO,EAAE,KAAK,EAAyB;QACnD,IAAI,CAAC,uBAAuB,CAAC,iBAAiB,EAAE,CAAC;YAC/C,gEAAgE;YAChE,+DAA+D;YAC/D,+DAA+D;YAC/D,0CAA2B,CAAC,IAAI,CAAC;gBAC/B,OAAO,EAAE;oBACP,SAAS,EAAE,GAAG,EAAE,CAAC,KAAK;oBACtB,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK;iBACnB;aACF,CAAC,CAAA;YACF,uBAAuB,CAAC,iBAAiB,GAAG,IAAI,CAAA;QAClD,CAAC;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,4CAAsB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA;IAC9D,CAAC;IAED,KAAK,CAAC,GAAG,CACP,OAAe,EACf,MAAc,sBAAsB;QAEpC,MAAM,SAAS,GAAG,KAAK,IAAqB,EAAE;YAC5C,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YAC/C,IAAI,SAAS,EAAE,CAAC;gBACd,OAAO,SAAS,CAAA;YAClB,CAAC;YAED,MAAM,YAAY,GAChB,MAAM,0CAA2B,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YAChD,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,YAAY,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YAC1D,OAAO,YAAY,CAAC,KAAK,CAAA;QAC3B,CAAC,CAAA;QAED,IAAI,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAE/C,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,OAAO,CAAA;QAChB,CAAC;QAED,OAAO,GAAG,SAAS,EAAE,CAAA;QACrB,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAE1C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACxB,OAAO,OAAO,CAAA;IAChB,CAAC;;AArDH,0DAsDC"}
|
|
@@ -21,7 +21,7 @@ exports.default = {
|
|
|
21
21
|
getContent: (id) => Promise.resolve(new CapiResponse_1.CapiResponse((0, clone_deep_1.default)({
|
|
22
22
|
...capiObject_1.baseCapiObject,
|
|
23
23
|
id,
|
|
24
|
-
publishedDate: new Date(now + parseInt(id.slice(-
|
|
24
|
+
publishedDate: new Date(now + parseInt(id.slice(-2), 10)).toISOString(),
|
|
25
25
|
}), { addSurrogateKeys })),
|
|
26
26
|
},
|
|
27
27
|
},
|
package/lib/generated/index.d.ts
CHANGED
|
@@ -405,6 +405,8 @@ export type ClipSet = Reference & {
|
|
|
405
405
|
readonly source?: Maybe<Scalars['String']['output']>;
|
|
406
406
|
/** The subtitle of the clip set. */
|
|
407
407
|
readonly subtitle?: Maybe<Scalars['String']['output']>;
|
|
408
|
+
/** The title to be used internally for the clip set. */
|
|
409
|
+
readonly systemTitle?: Maybe<Scalars['String']['output']>;
|
|
408
410
|
/** The type of the clip set, eg. 'video'. */
|
|
409
411
|
readonly type: Scalars['String']['output'];
|
|
410
412
|
};
|
|
@@ -540,6 +542,18 @@ export type ContentUrlArgs = {
|
|
|
540
542
|
relative?: InputMaybe<Scalars['Boolean']['input']>;
|
|
541
543
|
vanity?: InputMaybe<Scalars['Boolean']['input']>;
|
|
542
544
|
};
|
|
545
|
+
export type ContentConnection = {
|
|
546
|
+
/** A list of edges for the connection. */
|
|
547
|
+
readonly edges: ReadonlyArray<Maybe<ContentEdge>>;
|
|
548
|
+
/** Pagination data for the connection. */
|
|
549
|
+
readonly pageInfo: PageInfo;
|
|
550
|
+
};
|
|
551
|
+
export type ContentEdge = {
|
|
552
|
+
/** The opaque cursor for this edge that can be used for future requests. */
|
|
553
|
+
readonly cursor: Scalars['String']['output'];
|
|
554
|
+
/** The child article of this edge. */
|
|
555
|
+
readonly node?: Maybe<Content>;
|
|
556
|
+
};
|
|
543
557
|
export type ContentPackage = Content & {
|
|
544
558
|
/** A scalar representing the access level of the article, eg. 'free'. */
|
|
545
559
|
readonly accessLevel?: Maybe<Scalars['AccessLevel']['output']>;
|
|
@@ -1094,6 +1108,8 @@ export type LiveBlogPackage = Content & {
|
|
|
1094
1108
|
readonly instantAlertConcept?: Maybe<Concept>;
|
|
1095
1109
|
/** The child articles of this live blog package. */
|
|
1096
1110
|
readonly liveBlogPosts?: Maybe<ReadonlyArray<Maybe<Content>>>;
|
|
1111
|
+
/** The child articles of this live blog package following the [Connections](https://relay.dev/graphql/connections.htm) spec. */
|
|
1112
|
+
readonly liveBlogPostsConnection?: Maybe<ContentConnection>;
|
|
1097
1113
|
/** An image object containing the url and the caption, to be displayed usually before the article content. */
|
|
1098
1114
|
readonly mainImage?: Maybe<Image>;
|
|
1099
1115
|
/** The number of milliseconds since the unix epoch the article was last changed, eg '1712140552443'. */
|
|
@@ -1129,6 +1145,15 @@ export type LiveBlogPackageAnnotationsArgs = {
|
|
|
1129
1145
|
export type LiveBlogPackageBylineArgs = {
|
|
1130
1146
|
vanity?: InputMaybe<Scalars['Boolean']['input']>;
|
|
1131
1147
|
};
|
|
1148
|
+
export type LiveBlogPackageLiveBlogPostsArgs = {
|
|
1149
|
+
count?: InputMaybe<Scalars['Int']['input']>;
|
|
1150
|
+
};
|
|
1151
|
+
export type LiveBlogPackageLiveBlogPostsConnectionArgs = {
|
|
1152
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
1153
|
+
before?: InputMaybe<Scalars['String']['input']>;
|
|
1154
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
1155
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
|
1156
|
+
};
|
|
1132
1157
|
export type LiveBlogPackageUrlArgs = {
|
|
1133
1158
|
relative?: InputMaybe<Scalars['Boolean']['input']>;
|
|
1134
1159
|
vanity?: InputMaybe<Scalars['Boolean']['input']>;
|
|
@@ -1263,6 +1288,16 @@ export type OpinionTopperHeadshotArgs = {
|
|
|
1263
1288
|
url?: InputMaybe<Scalars['String']['input']>;
|
|
1264
1289
|
width?: InputMaybe<Scalars['Int']['input']>;
|
|
1265
1290
|
};
|
|
1291
|
+
export type PageInfo = {
|
|
1292
|
+
/** The cursor for the last edge. */
|
|
1293
|
+
readonly endCursor?: Maybe<Scalars['String']['output']>;
|
|
1294
|
+
/** Whether a subsequent page of edges is available on request. */
|
|
1295
|
+
readonly hasNextPage: Scalars['Boolean']['output'];
|
|
1296
|
+
/** Whether a previous page of edges is available on request. */
|
|
1297
|
+
readonly hasPreviousPage: Scalars['Boolean']['output'];
|
|
1298
|
+
/** The cursor for the first edge. */
|
|
1299
|
+
readonly startCursor?: Maybe<Scalars['String']['output']>;
|
|
1300
|
+
};
|
|
1266
1301
|
export type PartnerContentTopper = Topper & TopperWithImages & TopperWithTheme & {
|
|
1267
1302
|
/** Whether the topper should have a background box. */
|
|
1268
1303
|
readonly backgroundBox?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -1832,6 +1867,12 @@ export type ResolversTypes = ResolversObject<{
|
|
|
1832
1867
|
Concept: ResolverTypeWrapper<ConceptModel>;
|
|
1833
1868
|
ConceptInterface: ResolverTypeWrapper<ConceptModel>;
|
|
1834
1869
|
Content: ResolverTypeWrapper<ResolversInterfaceTypes<ResolversTypes>['Content']>;
|
|
1870
|
+
ContentConnection: ResolverTypeWrapper<Omit<ContentConnection, 'edges'> & {
|
|
1871
|
+
edges: ReadonlyArray<Maybe<ResolversTypes['ContentEdge']>>;
|
|
1872
|
+
}>;
|
|
1873
|
+
ContentEdge: ResolverTypeWrapper<Omit<ContentEdge, 'node'> & {
|
|
1874
|
+
node: Maybe<ResolversTypes['Content']>;
|
|
1875
|
+
}>;
|
|
1835
1876
|
ContentPackage: ResolverTypeWrapper<CapiResponse>;
|
|
1836
1877
|
ContentType: ResolverTypeWrapper<Scalars['ContentType']['output']>;
|
|
1837
1878
|
CustomCodeComponent: ResolverTypeWrapper<ReferenceWithCAPIData<ContentTree.CustomCodeComponent>>;
|
|
@@ -1875,6 +1916,7 @@ export type ResolversTypes = ResolversObject<{
|
|
|
1875
1916
|
Mutation: ResolverTypeWrapper<{}>;
|
|
1876
1917
|
OpinionTopper: ResolverTypeWrapper<TopperModel>;
|
|
1877
1918
|
PackageDesign: ResolverTypeWrapper<Scalars['PackageDesign']['output']>;
|
|
1919
|
+
PageInfo: ResolverTypeWrapper<PageInfo>;
|
|
1878
1920
|
PartnerContentTopper: ResolverTypeWrapper<TopperModel>;
|
|
1879
1921
|
Person: ResolverTypeWrapper<PersonModel>;
|
|
1880
1922
|
Picture: ResolverTypeWrapper<PictureModel>;
|
|
@@ -1934,6 +1976,12 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
1934
1976
|
Concept: ConceptModel;
|
|
1935
1977
|
ConceptInterface: ConceptModel;
|
|
1936
1978
|
Content: ResolversInterfaceTypes<ResolversParentTypes>['Content'];
|
|
1979
|
+
ContentConnection: Omit<ContentConnection, 'edges'> & {
|
|
1980
|
+
edges: ReadonlyArray<Maybe<ResolversParentTypes['ContentEdge']>>;
|
|
1981
|
+
};
|
|
1982
|
+
ContentEdge: Omit<ContentEdge, 'node'> & {
|
|
1983
|
+
node: Maybe<ResolversParentTypes['Content']>;
|
|
1984
|
+
};
|
|
1937
1985
|
ContentPackage: CapiResponse;
|
|
1938
1986
|
ContentType: Scalars['ContentType']['output'];
|
|
1939
1987
|
CustomCodeComponent: ReferenceWithCAPIData<ContentTree.CustomCodeComponent>;
|
|
@@ -1977,6 +2025,7 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
1977
2025
|
Mutation: {};
|
|
1978
2026
|
OpinionTopper: TopperModel;
|
|
1979
2027
|
PackageDesign: Scalars['PackageDesign']['output'];
|
|
2028
|
+
PageInfo: PageInfo;
|
|
1980
2029
|
PartnerContentTopper: TopperModel;
|
|
1981
2030
|
Person: PersonModel;
|
|
1982
2031
|
Picture: PictureModel;
|
|
@@ -2170,6 +2219,7 @@ export type ClipSetResolvers<ContextType = QueryContext, ParentType extends Reso
|
|
|
2170
2219
|
publishedDate: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2171
2220
|
source: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2172
2221
|
subtitle: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2222
|
+
systemTitle: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2173
2223
|
type: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2174
2224
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2175
2225
|
}>;
|
|
@@ -2236,6 +2286,16 @@ export type ContentResolvers<ContextType = QueryContext, ParentType extends Reso
|
|
|
2236
2286
|
type: Resolver<ResolversTypes['ContentType'], ParentType, ContextType>;
|
|
2237
2287
|
url: Resolver<ResolversTypes['String'], ParentType, ContextType, Partial<ContentUrlArgs>>;
|
|
2238
2288
|
}>;
|
|
2289
|
+
export type ContentConnectionResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['ContentConnection'] = ResolversParentTypes['ContentConnection']> = ResolversObject<{
|
|
2290
|
+
edges: Resolver<ReadonlyArray<Maybe<ResolversTypes['ContentEdge']>>, ParentType, ContextType>;
|
|
2291
|
+
pageInfo: Resolver<ResolversTypes['PageInfo'], ParentType, ContextType>;
|
|
2292
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2293
|
+
}>;
|
|
2294
|
+
export type ContentEdgeResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['ContentEdge'] = ResolversParentTypes['ContentEdge']> = ResolversObject<{
|
|
2295
|
+
cursor: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2296
|
+
node: Resolver<Maybe<ResolversTypes['Content']>, ParentType, ContextType>;
|
|
2297
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2298
|
+
}>;
|
|
2239
2299
|
export type ContentPackageResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['ContentPackage'] = ResolversParentTypes['ContentPackage']> = ResolversObject<{
|
|
2240
2300
|
accessLevel: Resolver<Maybe<ResolversTypes['AccessLevel']>, ParentType, ContextType>;
|
|
2241
2301
|
altStandfirst: Resolver<Maybe<ResolversTypes['AltStandfirst']>, ParentType, ContextType>;
|
|
@@ -2557,7 +2617,8 @@ export type LiveBlogPackageResolvers<ContextType = QueryContext, ParentType exte
|
|
|
2557
2617
|
firstPublishedDate: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2558
2618
|
id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
|
2559
2619
|
instantAlertConcept: Resolver<Maybe<ResolversTypes['Concept']>, ParentType, ContextType>;
|
|
2560
|
-
liveBlogPosts: Resolver<Maybe<ReadonlyArray<Maybe<ResolversTypes['Content']>>>, ParentType, ContextType
|
|
2620
|
+
liveBlogPosts: Resolver<Maybe<ReadonlyArray<Maybe<ResolversTypes['Content']>>>, ParentType, ContextType, Partial<LiveBlogPackageLiveBlogPostsArgs>>;
|
|
2621
|
+
liveBlogPostsConnection: Resolver<Maybe<ResolversTypes['ContentConnection']>, ParentType, ContextType, Partial<LiveBlogPackageLiveBlogPostsConnectionArgs>>;
|
|
2561
2622
|
mainImage: Resolver<Maybe<ResolversTypes['Image']>, ParentType, ContextType>;
|
|
2562
2623
|
modifiedTimestamp: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
2563
2624
|
originatingParty: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
@@ -2643,6 +2704,13 @@ export type OpinionTopperResolvers<ContextType = QueryContext, ParentType extend
|
|
|
2643
2704
|
export interface PackageDesignScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes['PackageDesign'], any> {
|
|
2644
2705
|
name: 'PackageDesign';
|
|
2645
2706
|
}
|
|
2707
|
+
export type PageInfoResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['PageInfo'] = ResolversParentTypes['PageInfo']> = ResolversObject<{
|
|
2708
|
+
endCursor: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2709
|
+
hasNextPage: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>;
|
|
2710
|
+
hasPreviousPage: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>;
|
|
2711
|
+
startCursor: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2712
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2713
|
+
}>;
|
|
2646
2714
|
export type PartnerContentTopperResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['PartnerContentTopper'] = ResolversParentTypes['PartnerContentTopper']> = ResolversObject<{
|
|
2647
2715
|
backgroundBox: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
|
|
2648
2716
|
backgroundColour: Resolver<Maybe<ResolversTypes['TopperBackgroundColour']>, ParentType, ContextType>;
|
|
@@ -2952,6 +3020,8 @@ export type Resolvers<ContextType = QueryContext> = ResolversObject<{
|
|
|
2952
3020
|
Concept: ConceptResolvers<ContextType>;
|
|
2953
3021
|
ConceptInterface: ConceptInterfaceResolvers<ContextType>;
|
|
2954
3022
|
Content: ContentResolvers<ContextType>;
|
|
3023
|
+
ContentConnection: ContentConnectionResolvers<ContextType>;
|
|
3024
|
+
ContentEdge: ContentEdgeResolvers<ContextType>;
|
|
2955
3025
|
ContentPackage: ContentPackageResolvers<ContextType>;
|
|
2956
3026
|
ContentType: GraphQLScalarType;
|
|
2957
3027
|
CustomCodeComponent: CustomCodeComponentResolvers<ContextType>;
|
|
@@ -2992,6 +3062,7 @@ export type Resolvers<ContextType = QueryContext> = ResolversObject<{
|
|
|
2992
3062
|
Mutation: MutationResolvers<ContextType>;
|
|
2993
3063
|
OpinionTopper: OpinionTopperResolvers<ContextType>;
|
|
2994
3064
|
PackageDesign: GraphQLScalarType;
|
|
3065
|
+
PageInfo: PageInfoResolvers<ContextType>;
|
|
2995
3066
|
PartnerContentTopper: PartnerContentTopperResolvers<ContextType>;
|
|
2996
3067
|
Person: PersonResolvers<ContextType>;
|
|
2997
3068
|
Picture: PictureResolvers<ContextType>;
|
package/lib/index.d.ts
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4D;AAkDnD,gGAlDA,6BAAe,OAkDA;AA/CxB,8CAAoD;AACpD,4EAAsE;AACtE,2CAA4B;AAC5B,2BAAiC;AAgCpB,QAAA,oBAAoB,GAAG,IAAA,iBAAY,EAC9C,OAAO,CAAC,OAAO,CAAC,4BAA4B,CAAC,EAC7C,OAAO,CACR,CAAA;AAEY,QAAA,QAAQ,GAAG,IAAA,qBAAc,EACpC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,CAAC,EAChD;IACE,OAAO,EAAE,CAAC,IAAI,uCAAiB,EAAE,CAAC;CACnC,CACF,CAAA;AAGD,yCAAkD;AAAzC,uHAAA,OAAO,OAAa;AAC7B,+CAAwD;AAA/C,mHAAA,OAAO,OAAW;AAC3B,yCAA0C;AAAjC,+FAAA,OAAO,OAAA;AAEhB,+FAA8E"}
|
package/lib/model/Byline.js
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
4
|
};
|
|
10
|
-
var _Byline_instances, _Byline_splitBylineByName;
|
|
11
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
6
|
exports.Byline = void 0;
|
|
13
7
|
const updateTreeWithReferenceIds_1 = __importDefault(require("../resolvers/content-tree/updateTreeWithReferenceIds"));
|
|
14
8
|
class Byline {
|
|
9
|
+
byline;
|
|
10
|
+
vanity;
|
|
11
|
+
authors;
|
|
12
|
+
contentApiData;
|
|
15
13
|
static normaliseQuotes(str) {
|
|
16
14
|
return str.replaceAll("'", '’');
|
|
17
15
|
}
|
|
18
16
|
constructor(byline, vanity, authors, contentApiData) {
|
|
19
|
-
_Byline_instances.add(this);
|
|
20
17
|
this.byline = byline;
|
|
21
18
|
this.vanity = vanity;
|
|
22
19
|
this.authors = authors;
|
|
@@ -25,7 +22,7 @@ class Byline {
|
|
|
25
22
|
async buildBylineTree() {
|
|
26
23
|
// Normalise apostrophes in byline string
|
|
27
24
|
const normalisedByline = Byline.normaliseQuotes(this.byline);
|
|
28
|
-
const bylineParts =
|
|
25
|
+
const bylineParts = this.#splitBylineByName(normalisedByline, this.authors.map((author) => Byline.normaliseQuotes(author.prefLabel())));
|
|
29
26
|
const authorNameMapping = Object.fromEntries(this.authors.map((author) => {
|
|
30
27
|
return [Byline.normaliseQuotes(author.prefLabel()), author];
|
|
31
28
|
}));
|
|
@@ -48,12 +45,12 @@ class Byline {
|
|
|
48
45
|
children,
|
|
49
46
|
}, this.contentApiData);
|
|
50
47
|
}
|
|
48
|
+
#splitBylineByName(byline, names) {
|
|
49
|
+
if (!names.length)
|
|
50
|
+
return [byline];
|
|
51
|
+
const regex = new RegExp(`(${names.join('|')})`, 'ig');
|
|
52
|
+
return byline.split(regex).filter((string) => string !== '');
|
|
53
|
+
}
|
|
51
54
|
}
|
|
52
55
|
exports.Byline = Byline;
|
|
53
|
-
_Byline_instances = new WeakSet(), _Byline_splitBylineByName = function _Byline_splitBylineByName(byline, names) {
|
|
54
|
-
if (!names.length)
|
|
55
|
-
return [byline];
|
|
56
|
-
const regex = new RegExp(`(${names.join('|')})`, 'ig');
|
|
57
|
-
return byline.split(regex).filter((string) => string !== '');
|
|
58
|
-
};
|
|
59
56
|
//# sourceMappingURL=Byline.js.map
|
package/lib/model/Byline.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Byline.js","sourceRoot":"","sources":["../../src/model/Byline.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Byline.js","sourceRoot":"","sources":["../../src/model/Byline.ts"],"names":[],"mappings":";;;;;;AAMA,sHAA6F;AAG7F,MAAa,MAAM;IAMP;IACA;IACA;IACA;IARV,MAAM,CAAC,eAAe,CA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QACV,CAAC,CAAC,CAAA;QAEF,OAAO,IAAA,oCAA0B,EAC/B;YACE,IAAI,EAAE,QAAQ;YACd,QAAQ;SACY,EACtB,IAAI,CAAC,cAAc,CACpB,CAAA;IACH,CAAC;IAED,kBAAkB,CAAC,MAAc,EAAE,KAAe;QAChD,IAAI,CAAC,KAAK,CAAC,MAAM;YAAE,OAAO,CAAC,MAAM,CAAC,CAAA;QAElC,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QACtD,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,CAAA;IAC9D,CAAC;CACF;AA1DD,wBA0DC"}
|
package/lib/model/CapiList.js
CHANGED
|
@@ -9,6 +9,8 @@ const metadata_1 = require("../helpers/metadata");
|
|
|
9
9
|
const list_1 = require("./schemas/capi/list");
|
|
10
10
|
const flatten_formatted_zod_errors_1 = __importDefault(require("../helpers/flatten-formatted-zod-errors"));
|
|
11
11
|
class CapiList {
|
|
12
|
+
list;
|
|
13
|
+
context;
|
|
12
14
|
static fromJSON(list, context) {
|
|
13
15
|
const result = list_1.listSchema.safeParse(list);
|
|
14
16
|
if (!result.success) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CapiList.js","sourceRoot":"","sources":["../../src/model/CapiList.ts"],"names":[],"mappings":";;;;;;AAAA,2DAA4E;AAE5E,kDAAiD;AACjD,8CAAsD;AACtD,2GAA+E;AAE/E,MAAa,QAAQ;
|
|
1
|
+
{"version":3,"file":"CapiList.js","sourceRoot":"","sources":["../../src/model/CapiList.ts"],"names":[],"mappings":";;;;;;AAAA,2DAA4E;AAE5E,kDAAiD;AACjD,8CAAsD;AACtD,2GAA+E;AAE/E,MAAa,QAAQ;IA8BC;IAAoB;IA7BxC,MAAM,CAA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