-
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.
feat(gatsby, gatsby-plugin-utils, gatsby-source-wordpress, gatsby-sou…
…rce-contentful, gatsby-source-drupal): Add setRequestHeaders action/api (#35655) * start adding new action * Add request headers api * types are in src * Add source plugin docs * try removing type imports * any * move validation from reducer into setRequestHeaders action * add comments * move headers into each place fetchRemoteFile is called instead of inside fetchRemoteFile * for cases where gatsby core doesn't have this yet * add tests * use import from to get the gatsby store * try any * Add action type to action union * Update index.d.ts * move test to the bottom so the state doesn't effect the other tests * move getRequestHeadersForUrl into gatsby/utils * it seems some test generates these * remove snapshots and expect size of request headers Map * Revert "move getRequestHeadersForUrl into gatsby/utils" This reverts commit 4ba7177. * Update get-request-headers-for-url.ts * review changes * pass store down instead of importing it * remove console log * add missing actions * add store to addRemoteFilePolyfillInterface * add httpHeaders to FILE_CDN job * unused import * more missing stores and pass httpHeaders into job & transformImage instead of store * remove reporter import * Update get-request-headers-for-url.ts * fix tests * fix more tests * update warning message * fix store type as it may not exist * pass the actual request url, not the url url param * Update placeholder-handler.ts * show test paths on output * debugging * debugging * add missing btoa fn * don't use btoa, use a buffer instead * group imports * remove store & actions requires Co-authored-by: Ward Peeters <ward@coding-tech.com>
- Loading branch information
1 parent
da77fb2
commit f520e59
Showing
41 changed files
with
496 additions
and
99 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
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
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
Oops, something went wrong.