feat(publish): Support for custom VCL logic#893
Conversation
Codecov Report
@@ Coverage Diff @@
## master #893 +/- ##
==========================================
- Coverage 91.75% 85.58% -6.18%
==========================================
Files 43 43
Lines 1796 1804 +8
==========================================
- Hits 1648 1544 -104
- Misses 148 260 +112
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #893 +/- ##
==========================================
+ Coverage 91.75% 91.84% +0.08%
==========================================
Files 43 43
Lines 1796 1814 +18
==========================================
+ Hits 1648 1666 +18
Misses 148 148
Continue to review full report at Codecov.
|
tripodsan
left a comment
There was a problem hiding this comment.
- add tests for passing the vlc arguments to test/testPublishCli.js
src/remotepublish.cmd.js
Outdated
| } | ||
|
|
||
| withCustomVCL(value) { | ||
| if (value && value.length > 0) { |
There was a problem hiding this comment.
from an API perspective, I think this should also allow adding single VLCs and update the internal this._vcl.
otherwise, rename it to withCustomVCLs()
There was a problem hiding this comment.
Since the parameter custom-vcl (list of file paths) has to be transformed into an object (name:contentoffile), I initially thought we could have the 2 methods to have the 2 ways of providing the data: either the list of files or the object directly. But you are right, this is confusing and introduce useless features. I removed the second method.
src/remotepublish.cmd.js
Outdated
| return this; | ||
| } | ||
|
|
||
| withVCL(value) { |
There was a problem hiding this comment.
- no jsdoc
- what's the purpose of this in contrast to
withCustomVCL? do you really need both? - needs to be an object, so name it
withVCLs
src/remotepublish.cmd.js
Outdated
| return this; | ||
| } | ||
|
|
||
| withCustomVCL(value) { |
There was a problem hiding this comment.
ah ah. I adopted the jsdoc pattern of that file :) but you are right, that's not a reason, we need to start somewhere.
| await remote.run(); | ||
|
|
||
| assert.deepEqual(vcl, { | ||
| extensions: fs.readFileSync(e).toString(), |
|
|
||
| // eslint-disable-next-line no-underscore-dangle | ||
| assert.deepEqual(remote._vcl, { | ||
| extensions: fs.readFileSync(e).toString(), |
Co-Authored-By: Tobias Bocanegra <tripodsan@users.noreply.github.com>
|
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
1 similar comment
|
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
|
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
|
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
|
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
|
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
|
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
|
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
|
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
|
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
|
Yeah... managed to bring the code coverage back to positive! |
|
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
|
🎉 This PR is included in version 3.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
PR for #812