MCPcopy
hub / github.com/electron/forge / get

Function get

packages/api/core/src/util/forge-config.ts:63–79  ·  view source on GitHub ↗
(target, name, receiver)

Source from the content-addressed store, hash-verified

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)}`];

Callers

nothing calls this directly

Calls 2

underscoreCaseFunction · 0.85
isBuildIdentifierConfigFunction · 0.85

Tested by

no test coverage detected