@@ -477,8 +477,14 @@ const createFunctionAddon = async function ({ addonName, addons, api, siteData,
477
477
* @param {(command: import('../base-command').BaseCommand) => any } config.onComplete
478
478
*/
479
479
const handleOnComplete = async ( { command, onComplete } ) => {
480
+ const { config } = command . netlify
481
+
480
482
if ( onComplete ) {
481
- await injectEnvVariables ( { env : command . netlify . cachedConfig . env , site : command . netlify . site } )
483
+ await injectEnvVariables ( {
484
+ devConfig : { ...config . dev } ,
485
+ env : command . netlify . cachedConfig . env ,
486
+ site : command . netlify . site ,
487
+ } )
482
488
await onComplete . call ( command )
483
489
}
484
490
}
@@ -491,6 +497,8 @@ const handleOnComplete = async ({ command, onComplete }) => {
491
497
* @param {string } config.fnPath
492
498
*/
493
499
const handleAddonDidInstall = async ( { addonCreated, addonDidInstall, command, fnPath } ) => {
500
+ const { config } = command . netlify
501
+
494
502
if ( ! addonCreated || ! addonDidInstall ) {
495
503
return
496
504
}
@@ -508,7 +516,11 @@ const handleAddonDidInstall = async ({ addonCreated, addonDidInstall, command, f
508
516
return
509
517
}
510
518
511
- await injectEnvVariables ( { env : command . netlify . cachedConfig . env , site : command . netlify . site } )
519
+ await injectEnvVariables ( {
520
+ devConfig : { ...config . dev } ,
521
+ env : command . netlify . cachedConfig . env ,
522
+ site : command . netlify . site ,
523
+ } )
512
524
addonDidInstall ( fnPath )
513
525
}
514
526
1 commit comments
github-actions[bot] commentedon Feb 22, 2022
📊 Benchmark results
Package size: 443 MB