Pack metadata
After uploading your project, pack metadata from the graphics server is saved in your project’s package.json
— most under the "reuters"
key.
{ "reuters": { "preview": "https://graphics.thomsonreuters.com/.../", "separateAssets": "https://graphics.thomsonreuters.com/.../assets.zip", "graphic": { "pack": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "desk": "london", "slugs": { "root": "ROOT-SLUG", "wild": "WILD" }, "contactEmail": "jane.doe@thomsonreuters.com", "title": "A title", "description": "Graphic", "authors": [ { "name": "Jane Doe", "link": "https://www.reuters.com/authors/jane-doe/" } ], "published": "2025-02-23T00:00:00.000Z", "updated": "2025-02-24T00:00:00.000Z", "archives": { "public": { "url": "https://www.reuters.com/graphics/.../", "title": "A title", "description": "A description", "uploaded": "2025-02-24T00:00:00.000Z", "editions": ["interactive"] }, "media-en-page": { "url": "https://www.reuters.com/graphics/.../", "title": "A title", "description": "A description", "uploaded": "2025-02-24T00:00:00.000Z", "editions": ["interactive", "media-interactive", "EPS", "JPG"] }, "media-de-map": { "title": "A title", "description": "A description", "uploaded": "2025-02-24T00:00:00.000Z", "editions": ["EPS", "JPG"] } } } }, "homepage": "https://www.reuters.com/graphics/.../"}
Metadata getters
You can use getters from the PKG
module to retrieve typed values from the metadata the publisher saves to your project’s package.json.
import { PKG } from '@reuters-graphics/graphics-kit-publisher';
const homepage = PKG.homepage;const enPageUrl = PKG.archive('media-en-page').url;
reuters
preview
Preview URL for the project.
PKG.preview// 'https://graphics.thomsonreuters.com/.../'
separateAssets
URL to the separate assets archive on S3.
PKG.separateAssets// 'https://graphics.thomsonreuters.com/.../assets.zip'
graphic
pack
Graphics pack ID in the Sphinx graphics server.
PKG.pack.id// 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
desk
PKG.pack.desk// 'london'
slugs
root
PKG.pack.rootSlug// 'ROOT-SLUG'
wild
PKG.pack.wildSlug// 'WILD'
language
PKG.pack.language// 'en'
contactEmail
PKG.pack.contactEmail// 'jane.doe@thomsonreuters.com'
title
PKG.pack.title// 'A title'
description
PKG.pack.description// 'Graphic'
authors
PKG.pack.authors// [// { name: 'Jane Doe', link: 'https://www.reuters.com/authors/jane-doe/' },// { name: 'John Doe', link: 'https://www.reuters.com/authors/john-doe/' },// ]
published
Timestamp of first publish of the graphic pack in the graphics server.
PKG.pack.published// '2025-02-23T00:00:00.000Z'
updated
Timestamp of latest publish of the graphic pack in the graphics server.
PKG.pack.updated// '2025-02-24T00:00:00.000Z'
archives
Access archive metadata using the archive’s ID with metadata getters.
url
PKG.archive('media-en-page').url// 'https://www.reuters.com/graphics/.../'
title
PKG.archive('media-en-page').title// 'A title'
description
PKG.archive('media-en-page').description// 'A description'
uploaded
Timestamp of the last time this edition was uploaded to the graphics server.
PKG.archive('media-en-page').uploaded// '2025-02-24T00:00:00.000Z'
editions
PKG.archive('media-en-page').editions// ['interactive', 'media-interactive', 'EPS', 'JPG']
homepage
If the project has a public
archive, its URL will also be saved here.
PKG.homepage// 'https://www.reuters.com/graphics/.../'