-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into muescha/fix/docs-…
…bash-to-shell
- Loading branch information
Showing
66 changed files
with
667 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// noop for now, but will be created later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// noop for now, but will be created later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// noop for now, but will be created later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// noop for now, but will be created later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// noop for now, but will be created later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// noop for now, but will be created later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
BENCHMARK_DRUPAL_BASE_URL= | ||
BENCHMARK_DRUPAL_USERNAME= | ||
BENCHMARK_DRUPAL_PASSWORD= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env node | ||
|
||
import { update } from "./updater" | ||
|
||
require("dotenv").config({ | ||
path: `.env.${process.env.NODE_ENV}`, | ||
}) | ||
|
||
const username = process.env.BENCHMARK_DRUPAL_USERNAME | ||
const password = process.env.BENCHMARK_DRUPAL_PASSWORD | ||
const server = process.env.BENCHMARK_DRUPAL_BASE_URL | ||
|
||
update(username, password, server) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import fetch from "node-fetch" | ||
import faker from "faker" | ||
|
||
interface IArticle { | ||
id: string | ||
attributes: { | ||
title: string | ||
} | ||
} | ||
|
||
// Remove last word of title and replace it with a random word. | ||
const updateTitle = (title: string): string => | ||
`${title.substring(0, title.lastIndexOf(` `))} ${faker.lorem.word()}` | ||
|
||
const patchArticle = async ( | ||
username: string, | ||
password: string, | ||
server: string, | ||
article: IArticle | ||
): Promise<void> => { | ||
const url = `${server}/jsonapi/node/article/${article.id}` | ||
|
||
const response = await fetch(url, { | ||
method: `PATCH`, | ||
headers: { | ||
"Content-Type": `application/vnd.api+json`, | ||
Authorization: `Basic ${Buffer.from(`${username}:${password}`).toString( | ||
`base64` | ||
)}`, | ||
}, | ||
body: JSON.stringify({ | ||
data: { | ||
type: `node--article`, | ||
id: article.id, | ||
attributes: { | ||
title: updateTitle(article.attributes.title), | ||
}, | ||
}, | ||
}), | ||
}) | ||
} | ||
|
||
const getFirstArticle = async (server: string): Promise<IArticle> => { | ||
const url = `${server}/jsonapi/node/article?page[limit]=1&sort=created` | ||
const response = await fetch(url) | ||
const body = await response.json() | ||
return body.data[0] | ||
} | ||
|
||
export const update = async ( | ||
username?: string, | ||
password?: string, | ||
server?: string | ||
): Promise<void> => { | ||
if (!username || !password || !server) { | ||
console.error(`You must pass username, password and server`) | ||
return | ||
} | ||
|
||
const article = await getFirstArticle(server) | ||
await patchArticle(username, password, server, article) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"typeRoots": ["./node_modules/@types", "./typings"], | ||
"target": "ES2018" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, | ||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, | ||
"strict": true /* Enable all strict type-checking options. */, | ||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, | ||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, | ||
"noImplicitAny": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// noop for now, but will be created later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,10 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [0.3.4](https://github.com/gatsbyjs/gatsby/compare/[email protected]@0.3.4) (2020-04-22) | ||
|
||
**Note:** Version bump only for package babel-preset-gatsby | ||
|
||
## [0.3.3](https://github.com/gatsbyjs/gatsby/compare/[email protected]@0.3.3) (2020-04-17) | ||
|
||
### Bug Fixes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "babel-preset-gatsby", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"author": "Philipp Spiess <[email protected]>", | ||
"repository": { | ||
"type": "git", | ||
|
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...eset-gatsby/src/__tests__/dependencies.js → ...eset-gatsby/src/__tests__/dependencies.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,10 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [2.11.15](https://github.com/gatsbyjs/gatsby/compare/[email protected]@2.11.15) (2020-04-22) | ||
|
||
**Note:** Version bump only for package gatsby-cli | ||
|
||
## [2.11.14](https://github.com/gatsbyjs/gatsby/compare/[email protected]@2.11.14) (2020-04-21) | ||
|
||
**Note:** Version bump only for package gatsby-cli | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "gatsby-cli", | ||
"description": "Gatsby command-line interface for creating new sites and running Gatsby commands", | ||
"version": "2.11.14", | ||
"version": "2.11.15", | ||
"author": "Kyle Mathews <[email protected]>", | ||
"bin": { | ||
"gatsby": "lib/index.js" | ||
|
@@ -26,7 +26,7 @@ | |
"fs-exists-cached": "^1.0.0", | ||
"fs-extra": "^8.1.0", | ||
"gatsby-core-utils": "^1.1.3", | ||
"gatsby-recipes": "^0.0.11", | ||
"gatsby-recipes": "^0.0.12", | ||
"gatsby-telemetry": "^1.2.5", | ||
"hosted-git-info": "^3.0.4", | ||
"is-valid-path": "^0.1.1", | ||
|
Oops, something went wrong.