pfrazee / process-sandbox

Run javascript in sandboxed child processes
3 stars 2 forks source link

env should set enviroment variables? #1

Open dominictarr opened 8 years ago

dominictarr commented 8 years ago

env is already part of the child_process.spawn api, should we move manifest and api onto the top level?

pfrazee commented 8 years ago

Ah, good point, maybe we call that parameter context or sandbox ?

dominictarr commented 8 years ago

sure we could, but i don't see any reason not to just put that on the top level.

pfrazee commented 8 years ago

Ah, because I already use manifest at the toplevel -- the manifest of the process itself. So we need to disambiguate that.

spawn({
  path: str,
  manifest: obj, // the child's manifest
  manifest: obj, // the parent's manifest
  api: obj // the parent's api
})