Skip to content

Commit

Permalink
Merge pull request #267 from WPMedia/AIO-322_prod
Browse files Browse the repository at this point in the history
Aio 322 prod
  • Loading branch information
tbrick855 committed Nov 18, 2020
2 parents f5a2ad0 + 687aff1 commit 7dfb9ef
Show file tree
Hide file tree
Showing 58 changed files with 500 additions and 282 deletions.
17 changes: 17 additions & 0 deletions .changeset/cold-clouds-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'@wpmedia/feeds-source-collections-block': minor
'@wpmedia/feeds-source-content-api-block': minor
'@wpmedia/feeds-source-video-api-block': minor
'@wpmedia/mrss-feature-block': minor
'@wpmedia/rss-fbia-feature-block': minor
'@wpmedia/rss-feature-block': minor
'@wpmedia/rss-flipboard-feature-block': minor
'@wpmedia/rss-google-news-feature-block': minor
'@wpmedia/rss-msn-feature-block': minor
'@wpmedia/sitemap-feature-block': minor
'@wpmedia/sitemap-index-feature-block': minor
'@wpmedia/sitemap-news-feature-block': minor
'@wpmedia/sitemap-video-feature-block': minor
---

push AIO-322 stable tag
13 changes: 13 additions & 0 deletions blocks/feeds-source-collections-block/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# @wpmedia/feeds-source-collections-block

## 0.1.1

### Patch Changes

- [`cb47744`](https://github.com/WPMedia/feed-components/commit/cb4774411a55198955ee7b524c498baff73e04f0) [#264](https://github.com/WPMedia/feed-components/pull/264) Thanks [@tbrick855](https://github.com/tbrick855)! - Update test to not use snapshot

## 0.1.0

### Minor Changes

- [`9358763`](https://github.com/WPMedia/feed-components/commit/935876381a96ede3cebf9f72703c0d02c08952a5) [#258](https://github.com/WPMedia/feed-components/pull/258) Thanks [@tbrick855](https://github.com/tbrick855)! - add collections, check for nulls in title and description and make packages public
18 changes: 18 additions & 0 deletions blocks/feeds-source-collections-block/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Collections content source

Searches for a collection by \_id or alias. Articles in a collection do not contain any content_elements.

## Globals

- CONTENT_BASE

## Parameters

- \_id: Collection \_id to search for
- content_alias: Collection alias name to search for
- from: number of rows to skip
- size: number of rows to return

### Usage

The `/content/v4/collections` content-api endpoint is used
1 change: 1 addition & 0 deletions blocks/feeds-source-collections-block/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {}
46 changes: 46 additions & 0 deletions blocks/feeds-source-collections-block/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions blocks/feeds-source-collections-block/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "@wpmedia/feeds-source-collections-block",
"version": "0.1.1",
"description": "Content source to search for a collection",
"main": "index.js",
"files": [
"sources"
],
"license": "UNLICENSED",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/WPMedia/feed-components.git",
"directory": "blocks/feeds-source-collections-block"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/",
"access": "public"
},
"author": "Cameron Woodmansee",
"contributors": [
"Iyob Beyene <iyob.beyene@washpost.com>",
"Tim Kosmider <tim.kosmider@washpost.com>"
],
"homepage": "https://github.com/WPMedia/feed-components#readme",
"dependencies": {},
"devDependencies": {
"prop-types": "^15.7.2"
}
}
20 changes: 20 additions & 0 deletions blocks/feeds-source-collections-block/sources/collections.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const params = {
_id: 'text',
content_alias: 'text',
from: 'text',
size: 'text',
}

const resolve = (key = {}) => {
const { 'arc-site': site, _id, content_alias: contentAlias, from, size } = key
return `content/v4/collections?${
_id ? `_id=${_id}` : `content_alias=${contentAlias}`
}${site ? `&website=${site}` : ''}${from ? `&from=${from}` : ''}${
size ? `&size=${size}` : ''
}&published=true`
}

export default {
params,
resolve,
}
36 changes: 36 additions & 0 deletions blocks/feeds-source-collections-block/sources/collections.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// eslint-disable-next-line no-unused-vars
import Consumer from 'fusion:consumer'
const resolver = require('./collections')

it('validate params', () => {
expect(resolver.default.params).toStrictEqual({
_id: 'text',
content_alias: 'text',
from: 'text',
size: 'text',
})
})

it('returns query search by _id', () => {
const query = resolver.default.resolve({
_id: 'NBXKZJC3ONEGRB2VPINBMQTNFA',
content_alias: '',
from: '',
size: '',
})
expect(query).toBe(
'content/v4/collections?_id=NBXKZJC3ONEGRB2VPINBMQTNFA&published=true',
)
})

it('returns query by alias', () => {
const query = resolver.default.resolve({
_id: '',
content_alias: 'sports page',
from: '5',
size: '10',
})
expect(query).toBe(
'content/v4/collections?content_alias=sports page&from=5&size=10&published=true',
)
})
6 changes: 6 additions & 0 deletions blocks/feeds-source-content-api-block/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @wpmedia/feeds-source-content-api-block

## 0.7.0

### Minor Changes

- [`9358763`](https://github.com/WPMedia/feed-components/commit/935876381a96ede3cebf9f72703c0d02c08952a5) [#258](https://github.com/WPMedia/feed-components/pull/258) Thanks [@tbrick855](https://github.com/tbrick855)! - add collections, check for nulls in title and description and make packages public

## 0.6.0

### Minor Changes
Expand Down
80 changes: 1 addition & 79 deletions blocks/feeds-source-content-api-block/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions blocks/feeds-source-content-api-block/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wpmedia/feeds-source-content-api-block",
"version": "0.6.0",
"version": "0.7.0",
"description": "Fusion components for building sitemaps",
"main": "index.js",
"files": [
Expand All @@ -14,17 +14,15 @@
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/",
"access": "restricted"
"access": "public"
},
"author": "Cameron Woodmansee",
"contributors": [
"Iyob Beyene <iyob.beyene@washpost.com>",
"Tim Kosmider <tim.kosmider@washpost.com>"
],
"homepage": "https://github.com/WPMedia/feed-components#readme",
"dependencies": {
"xmlbuilder2": "^2.1.2"
},
"dependencies": {},
"devDependencies": {
"prop-types": "^15.7.2"
}
Expand Down
2 changes: 1 addition & 1 deletion blocks/feeds-source-video-api-block/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions blocks/mrss-feature-block/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @wpmedia/mrss-feature-block

## 0.7.0

### Minor Changes

- [`9358763`](https://github.com/WPMedia/feed-components/commit/935876381a96ede3cebf9f72703c0d02c08952a5) [#258](https://github.com/WPMedia/feed-components/pull/258) Thanks [@tbrick855](https://github.com/tbrick855)! - add collections, check for nulls in title and description and make packages public

## 0.6.1

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Object {
"description": "google news",
"item": Array [
Object {
"description": null,
"description": Object {
"$": "",
},
"guid": Object {
"#": "http://demo-prod.origin.arcpublishing.com/video/2020/04/16/inexact-odyssey-a-volcom-snowboarding-film/",
"@isPermaLink": false,
Expand All @@ -39,7 +41,9 @@ Object {
},
"pubDate": "Thu, 16 Apr 2020 19:55:25 +0000",
"referenceid": undefined,
"title": "Inexact Odyssey, A Volcom Snowboarding Film",
"title": Object {
"$": "Inexact Odyssey, A Volcom Snowboarding Film",
},
},
],
"link": "http://demo-prod.origin.arcpublishing.com",
Expand Down

0 comments on commit 7dfb9ef

Please sign in to comment.