getEsmtoolsEnv function

Get the internal package environment