[TIMOB-27045] Pass along ENV variables to process.env on development builds
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-06-07T18:16:27.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 8.1.0 |
Components | Android, CLI, iOS, Windows |
Labels | n/a |
Reporter | Christopher Williams |
Assignee | Christopher Williams |
Created | 2019-04-30T13:43:56.000+0000 |
Updated | 2019-06-17T09:02:29.000+0000 |
Description
Currently we have an empty process.env object for Node API compatibility. We should consider passing along the current ENV variables to be used in some internal JSON file, similarly to how Ti.App.Properties are inserted. To protect apps, this should likely only be done in development builds, and we could consider suggesting using of https://github.com/motdotla/dotenv to developers who want to pass along/set ENV vars in production builds of the app (or maybe hook in some babel plugin that works in conjunction with dotenv to inline values? Not really sure any sensitive data should be in the app's contents at all though...)
https://github.com/appcelerator/titanium_mobile/pull/10895
FR Passed, Waiting on Jenkins build
merged to master
Verified the Fix on SDK 8.1.0.v20190606063903 and 8.2.0.v20190606063615.Works as expected. Closing.