Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27045] Pass along ENV variables to process.env on development builds

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2019-06-07T18:16:27.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.1.0
ComponentsAndroid, CLI, iOS, Windows
Labelsn/a
ReporterChristopher Williams
AssigneeChristopher Williams
Created2019-04-30T13:43:56.000+0000
Updated2019-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...)

Comments

  1. Christopher Williams 2019-05-15

    https://github.com/appcelerator/titanium_mobile/pull/10895
  2. Samir Mohammed 2019-05-29

    FR Passed, Waiting on Jenkins build
  3. Christopher Williams 2019-05-30

    merged to master
  4. Keerthi Mahalingam 2019-06-07

    Verified the Fix on SDK 8.1.0.v20190606063903 and 8.2.0.v20190606063615.Works as expected. Closing.
       Name                        = Mac OS X
         Version                     = 10.13.6
         Architecture                = 64bit
       Node.js
         Node.js Version             = 8.9.1
         npm Version                 = 5.5.1
       Titanium CLI
         CLI Version                 = 5.1.1
       Titanium SDK
         SDK Version                 =8.1.0.v20190606063903 ,8.2.0.v20190606063615
       CLI =7.0.11
       

JSON Source