What are the environment variables available in a node postinstall script, and how can I see/debug them?

Solution for What are the environment variables available in a node postinstall script, and how can I see/debug them?
is Given Below:

What are the environment variables available in a node postinstall script, and how can I see or debug them? I need to copy a file from my project into a node package folder, but apparently during an execution of npm i I am not in my current project, I am in a temp directory elsewhere on the system — specifically:

/Users/myuser/npm/_cacache/tmp/git-clone-fd9ce39f/

So obviously, attempting to copy a file from ../../ does not work.