(target, name, receiver)
| 61 | |
| 62 | return new Proxy<T>(newObject, { |
| 63 | get(target, name, receiver) { |
| 64 | // eslint-disable-next-line no-prototype-builtins |
| 65 | if (!target.hasOwnProperty(name) && typeof name === 'string') { |
| 66 | const envValue = process.env[`${envPrefix}_${underscoreCase(name)}`]; |
| 67 | if (envValue) return envValue; |
| 68 | } |
| 69 | const value = Reflect.get(target, name, receiver); |
| 70 | |
| 71 | if (isBuildIdentifierConfig(value)) { |
| 72 | const identifier = |
| 73 | typeof buildIdentifier === 'function' |
| 74 | ? buildIdentifier() |
| 75 | : buildIdentifier; |
| 76 | return value.map[identifier]; |
| 77 | } |
| 78 | return value; |
| 79 | }, |
| 80 | getOwnPropertyDescriptor(target, name) { |
| 81 | const envValue = |
| 82 | process.env[`${envPrefix}_${underscoreCase(name as string)}`]; |
nothing calls this directly
no test coverage detected