| use turbo_tasks::{ResolvedVc, Vc}; | |
| use turbo_tasks_env::ProcessEnv; | |
| use turbo_tasks_fs::FileSystemPath; | |
| use turbopack_core::chunk::ChunkingContext; | |
| use crate::backend::NodeBackend; | |
| pub struct ExecutionContext { | |
| pub project_path: FileSystemPath, | |
| pub chunking_context: ResolvedVc<Box<dyn ChunkingContext>>, | |
| pub env: ResolvedVc<Box<dyn ProcessEnv>>, | |
| pub node_backend: ResolvedVc<Box<dyn NodeBackend>>, | |
| } | |
| impl ExecutionContext { | |
| pub fn new( | |
| project_path: FileSystemPath, | |
| chunking_context: ResolvedVc<Box<dyn ChunkingContext>>, | |
| env: ResolvedVc<Box<dyn ProcessEnv>>, | |
| node_backend: ResolvedVc<Box<dyn NodeBackend>>, | |
| ) -> Vc<Self> { | |
| ExecutionContext { | |
| project_path, | |
| chunking_context, | |
| env, | |
| node_backend, | |
| } | |
| .cell() | |
| } | |
| pub fn project_path(&self) -> Vc<FileSystemPath> { | |
| self.project_path.clone().cell() | |
| } | |
| pub fn chunking_context(&self) -> Vc<Box<dyn ChunkingContext>> { | |
| *self.chunking_context | |
| } | |
| pub fn env(&self) -> Vc<Box<dyn ProcessEnv>> { | |
| *self.env | |
| } | |
| pub fn node_backend(&self) -> Vc<Box<dyn NodeBackend>> { | |
| *self.node_backend | |
| } | |
| } | |
Xet Storage Details
- Size:
- 1.42 kB
- Xet hash:
- ce7037552ee9e047c2da29f36e6acbc4abaf98a08db5802447b45e633b1f691e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.