Modules
Buildpack/Utilities
Typedefs
EnvVarDefinitions : Object
Defines the global settings of the project as a list of typed environment variables. Includes a set of changes made to the environment variables in recent versions, to aid with migration and upgrades.
EnvVarDefinitions are used by loadEnvironment() to validate the currently defined values in the environment.
EnvVarDefinitions are also used by createDotEnvFile() to generate an extensively commented .env file for a project.
EnvVarDefsSection : Object
A list of related definitions concerning a particular functional area.
All defined variable names under a particular functional area should have the same prefix, to help namespace and organize configuration. For instance, all variable names in the "Custom local origin" section begin with CUSTOM_ORIGIN_.
EnvVarDefinition : Object
A definition of an environment variable that will be used somewhere else in the project, in the backend and/or the frontend.
Must define a name, type and description. Optionally, may define a default which is set implicitly, an example for documentation, and/or an array of choices to limit the valid values.
The recommended way to access the current environment values in build scripts and interceptors is through the Configuration object object returned by loadEnvironment().
Note: Any build environment will have hundreds of environment variables set, most of which are unrelated to the build process. Any environment variable during the build is accessible via process.env in NodeJS. However, only the variables defined by EnvVarDefinition entries will be available in the frontend, via the Webpack EnvironmentPlugin.
EnvVarDefsChange : Object
Describes a recent change to a particular environment variable. Can indicate that the environment variable was removed or renamed. Change objects can log informative warnings to developers to help with migration. They may also be used to make loadEnvironment() support the legacy name of a renamed variable.
Defines the global settings of the project as a list of typed environment variables. Includes a set of changes made to the environment variables in recent versions, to aid with migration and upgrades.
EnvVarDefinitions are used by loadEnvironment() to validate the currently defined values in the environment.
EnvVarDefinitions are also used by createDotEnvFile() to generate an extensively commented .env file for a project.
Properties
Array.<EnvVarDefsSection>Array.<EnvVarDefsChange>A list of related definitions concerning a particular functional area.
All defined variable names under a particular functional area should have the same prefix, to help namespace and organize configuration. For instance, all variable names in the "Custom local origin" section begin with CUSTOM_ORIGIN_.
Properties
StringArray.<EnvVarDefinition>A definition of an environment variable that will be used somewhere else in the project, in the backend and/or the frontend.
Must define a name, type and description. Optionally, may define a default which is set implicitly, an example for documentation, and/or an array of choices to limit the valid values.
The recommended way to access the current environment values in build scripts and interceptors is through the Configuration object object returned by loadEnvironment().
Note: Any build environment will have hundreds of environment variables set, most of which are unrelated to the build process. Any environment variable during the build is accessible via process.env in NodeJS. However, only the variables defined by EnvVarDefinition entries will be available in the frontend, via the Webpack EnvironmentPlugin.
Properties
StringStringArraytype.StringString.env file.Describes a recent change to a particular environment variable. Can indicate that the environment variable was removed or renamed. Change objects can log informative warnings to developers to help with migration. They may also be used to make loadEnvironment() support the legacy name of a renamed variable.
Properties
Stringremoved or renamedStringStringString | numberDate().)numberdateChanged to log a warning if the removed or renamed variable is still set in the environment. Default, and maximum, is 180 days.Stringbooleantrue to support the old name (while logging a warning). If the old name is set and the new name is not, loadEnvironment will set the new variable name to the value of the old one.Source Code: pwa-studio/packages/pwa-buildpack/lib/Utilities/getEnvVarDefinitions.js