Fixes the check for windows and dotnet before replacing packaging hook to instead compile the artifact. In the case where the os had not been defined (defaults to windows), the ConfigService had not yet initialized the default value. This moves the logic to the ConfigService when making the check to make sure it has been initialized
How did you implement it:
Added a shouldCompileBeforePublish method in the ConfigService that indicates if hook should be replaced
Replaced logic in plugin constructor to instead initialize a new ConfigService and make the call there instead
How can we verify it:
Create a .NET serverless azure functions project
Leave the os property undefined
Run sls package - the process will spawn a command to dotnet to compile the service
Todos:
Note: Run npm run test:ci to run all validation checks on proposed changes
[x] Ensure there are no lint errors. Validate via npm run lint Note: Some reported issues can be automatically fixed by running npm run lint:fix
[x] Write tests and confirm existing functionality is not broken. Validate via npm test
[x] Write documentation
[x] Provide verification config / commands / resources
[x] Enable "Allow edits from maintainers" for this PR
[x] Update the messages below
Is this ready for review?: NO Is it a breaking change?: NO
What did you implement:
Fixes the check for
windows
anddotnet
before replacing packaging hook to instead compile the artifact. In the case where theos
had not been defined (defaults to windows), theConfigService
had not yet initialized the default value. This moves the logic to theConfigService
when making the check to make sure it has been initializedHow did you implement it:
shouldCompileBeforePublish
method in theConfigService
that indicates if hook should be replacedConfigService
and make the call there insteadHow can we verify it:
os
property undefinedsls package
- the process will spawn a command todotnet
to compile the serviceTodos:
Note: Run
npm run test:ci
to run all validation checks on proposed changesValidate via
npm run lint
Note: Some reported issues can be automatically fixed by running
npm run lint:fix
Validate via
npm test
Is this ready for review?: NO
Is it a breaking change?: NO