-
Notifications
You must be signed in to change notification settings - Fork 5.7k
API: Introduce serviceDir and configurationFilename constructor options
#9307
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
Conversation
configurationPath with serviceDir and configurationFilenameserviceDir and configurationFilename constructor options
fa626b0 to
0000d8e
Compare
Codecov Report
@@ Coverage Diff @@
## master #9307 +/- ##
==========================================
+ Coverage 86.87% 86.91% +0.04%
==========================================
Files 316 316
Lines 11767 11773 +6
==========================================
+ Hits 10223 10233 +10
+ Misses 1544 1540 -4
Continue to review full report at Codecov.
|
In place of `configurationPath`
`serviceDir` and `configurationFilename` options are favored over of `configurationPath`
Support for `servicePath` is maintained until next major
0000d8e to
0bdb1b8
Compare
pgrzesik
left a comment
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.
Looks great, well done 👍
Accidentally removed with #9307
Accidentally removed with #9307
Accidentally removed with serverless#9307
configurationPathwas introduced in first refactors as mid step, still more natural in programmatic usage is to refer toserviceDirand eventuallyconfigurationFilename(but not many use cases for that one)In the end eventual service configuration to be passed to
Serverlessconstructor will consist of following options:configuration- Service configuration objectserviceDir- Base path for resolution of any paths that are configured in service configurationconfigurationFilename- Needed just in some cases (1) Error reporting (when we want to mention specifically configuration filename) (2) To update service configuration programmatically (e.g. to add plugin topluginssection withplugin installcommand). (As internals will become more and more modular, this property may appear at some point as optional)(Support for
configurationPathin scope of v2, will be maintained to not break things)Settled on
serviceDir, notservicePath(which was used so far in most places), to indicate that in all cases we deal with directory, also it'll matchbaseDirsetting to be proposed as part of a solution for mulitple service repo handling andsourceDirwhich we plan to introduce with #7920Additionally:
serverless.config.servicePathoccurences withserverless.serviceDir(this attributes to Deprecate "serverless.config" #8836)servicePathvariables toserviceDirin codebase.execSyncto asyncspawnhelped to see internally what's going on)