paths.ts 857 B

1234567891011121314151617181920212223
  1. /**
  2. * Virtual root of the worker host's in-memory filesystem. Kept
  3. * in one module so the process shim, the path/os shims, and the VFS image
  4. * collector cannot drift apart.
  5. */
  6. /** Virtual filesystem root; `process.cwd()` and every absolute path start here. */
  7. export const DSH_ROOT = '/dsh'
  8. /** `$DSH_HOME`: durable-state directory inside the image. */
  9. export const DSH_HOME = `${DSH_ROOT}/home`
  10. /** Flat, symlink-free package tree resolved by the worker module loader. */
  11. export const DSH_NODE_MODULES = `${DSH_ROOT}/node_modules`
  12. /** Directory holding the composed cordis.yml and the agent-preset tree. */
  13. export const DSH_CONFIG = `${DSH_ROOT}/config`
  14. /** Default (empty) workspace directory. */
  15. export const DSH_WORKSPACE = `${DSH_ROOT}/workspace`
  16. /** Temporary directory reported by `os.tmpdir()`. */
  17. export const DSH_TMP = `${DSH_ROOT}/tmp`