-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GX-17505] Dismantle core-plugin #23
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
aabc37e
Moving all remaining code from core-plugin
DanielSanudo 039fa0c
Adding workbox hook into nextjs-plugin
DanielSanudo 0db601a
Fixing tests and docs
DanielSanudo ad10fe3
Finishing adding last tests
DanielSanudo b0a45d7
Addressing PR comments
DanielSanudo 259896a
Adding http and https before createServers
DanielSanudo 4f8ec82
Updating CHANGELOG.md
DanielSanudo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
# CHANGELOG | ||
|
||
### | ||
|
||
- [#23] Dismantling core-plugin | ||
|
||
### 1.0.0 | ||
|
||
- Renaming express-create to expressCreate | ||
- Separate express plugins from core | ||
- Initial release. | ||
|
||
[#23]: https://github.com/godaddy/gasket/pull/23 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# `@gasket/https-plugin` | ||
|
||
### | ||
|
||
- [#23] Dismantling core-plugin | ||
- [#7]: Initialize the `https-plugin` | ||
|
||
[#7]: https://github.com/godaddy/gasket/pull/7 | ||
[#23]: https://github.com/godaddy/gasket/pull/23 |
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 |
---|---|---|
|
@@ -10,6 +10,10 @@ configuration. This plugin is part of the [`@gasket/default-preset`]. | |
- [Installation](#installation) | ||
- [Configuration](#configuration) | ||
- [Lifecycles](#lifecycles) | ||
- [createServers](#createservers) | ||
- [servers](#servers) | ||
- [Configuration](#configuration-1) | ||
- [LICENSE: MIT](#license-mit) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good improvement in itself, but most of our warehouse modules use a license badge rather than adding section at the bottom. I think we want to be consistent, but not feeling strong about it at this point |
||
|
||
## Installation | ||
|
||
|
@@ -31,12 +35,31 @@ Add it to the `plugins` section of your `gasket.config.js`: | |
|
||
## Lifecycles | ||
|
||
#### createServers | ||
|
||
Executed in order to retrieve the server options and the handler | ||
|
||
```js | ||
/** | ||
* In this example returns the express app | ||
* | ||
* @param {Gasket} gasket Gasket API. | ||
* @param {Object} serverOpts Server options. | ||
* @returns {Express} The web server. | ||
* @public | ||
*/ | ||
createServers: async function createServers(gasket, serverOpts) { | ||
const newServerOpts; | ||
return { ...serverOpts, ...newServerOpts, handler: express() }; | ||
} | ||
``` | ||
|
||
#### servers | ||
|
||
Your application can use this plugin to hook the `servers` hook. These servers | ||
are consumed directly from [`create-servers`]. | ||
|
||
```js | ||
// lifecyles/servers.js | ||
|
||
/** | ||
* | ||
* @param {Gasket} gasket The Gasket API | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these spies reset and cleaned, probably want to use
sinon
as sandbox hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes from
const { spy, stub } = require('sinon');
.I am not creating global mocks or anything, do they need to be reset and clean?