File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ function decode(value) {
2424 */
2525class Config {
2626
27- constructor ( env = null , prefix = 'PLATFORM_' ) {
27+ constructor ( env = null , varPrefix = 'PLATFORM_' ) {
2828 this . environmentVariables = env || process . env ;
29- this . envPrefix = prefix ;
29+ this . varPrefix = varPrefix ;
3030
3131 // Node doesn't support pre-defined object properties in classes, so
3232 // this is mostly for documentation but also to ensure there's always
@@ -567,7 +567,7 @@ class Config {
567567 * @return {string|null }
568568 */
569569 _getValue ( name ) {
570- let checkName = this . envPrefix + name . toUpperCase ( ) ;
570+ let checkName = this . varPrefix + name . toUpperCase ( ) ;
571571
572572 return this . environmentVariables [ checkName ] || null ;
573573 }
@@ -619,9 +619,9 @@ function puppeteerFormatter(credentials) {
619619 *
620620 * @returns {Config }
621621 */
622- function config ( ) {
622+ function config ( { varPrefix } = { } ) {
623623
624- return new Config ( ) ;
624+ return new Config ( null , varPrefix ) ;
625625}
626626
627627module . exports = {
You can’t perform that action at this time.
0 commit comments