nestjs / azure-storage

Azure Storage module for Nest framework (node.js) ☁️
https://nestjs.com
MIT License
87 stars 35 forks source link

feat: use environment variables by default in module config #93

Open sinedied opened 4 years ago

sinedied commented 4 years ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

Use a default config to simplify module configuration.

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

Before:

    AzureStorageModule.withConfig({
      sasKey: process.env['AZURE_STORAGE_SAS_KEY'],
      accountName: process.env['AZURE_STORAGE_ACCOUNT'],
      containerName: 'nest-demo-container',
    }),

Issue Number: N/A

What is the new behavior?

After (even containerName could be omitted, but you usually want to customize it anyway):

    AzureStorageModule.withConfig({
      containerName: 'nest-demo-container',
    }),

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Also updated deps for vulnerabilities & fixed prettier formatting