1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

Merge pull request #327 from oceanprotocol/fix/squid-js-releases

Restrict squid-js API docs to production releases
This commit is contained in:
Matthias Kretschmann 2019-11-21 16:44:26 +01:00 committed by GitHub
commit 066d9af964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ exports.createPages = ({ graphql, actions }) => {
) {
name
releases(
first: 1
first: 30
orderBy: {
field: CREATED_AT
direction: DESC
@ -94,6 +94,8 @@ exports.createPages = ({ graphql, actions }) => {
) {
edges {
node {
isPrerelease
isDraft
releaseAssets(
first: 1
name: "squid-js.json"
@ -165,11 +167,13 @@ exports.createPages = ({ graphql, actions }) => {
await createSwaggerPages(createPage)
// API: squid-js
const lastRelease = result.data.squidJs.repository.releases.edges.filter(
({ node }) => !node.isPrerelease && !node.isDraft
)[0].node.releaseAssets.edges[0].node
await createTypeDocPage(
createPage,
result.data.squidJs.repository.name,
result.data.squidJs.repository.releases.edges[0].node
.releaseAssets.edges[0].node.downloadUrl
lastRelease.downloadUrl
)
//