Download next.js/turbopack/crates/turbopack-node/src/node_entry.rs from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/turbopack/crates/turbopack-node/src/node_entry.rs
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/turbopack/crates/turbopack-node/src/node_entry.rs
-
curl -L -o node_entry.rs https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/turbopack/crates/turbopack-node/src/node_entry.rs
1.16 kB
| use anyhow::Result; | |
| use turbo_tasks::{ResolvedVc, Vc}; | |
| use turbo_tasks_fs::FileSystemPath; | |
| use turbopack_core::chunk::{ChunkingContext, EvaluatableAsset, EvaluatableAssets}; | |
| use turbopack_dev_server::source::ContentSourceData; | |
| pub struct NodeRenderingEntry { | |
| pub runtime_entries: ResolvedVc<EvaluatableAssets>, | |
| pub module: ResolvedVc<Box<dyn EvaluatableAsset>>, | |
| pub chunking_context: ResolvedVc<Box<dyn ChunkingContext>>, | |
| pub intermediate_output_path: FileSystemPath, | |
| pub output_root: FileSystemPath, | |
| pub project_dir: FileSystemPath, | |
| } | |
| pub struct NodeRenderingEntries(Vec<ResolvedVc<NodeRenderingEntry>>); | |
| /// Trait that allows to get the entry module for rendering something in Node.js | |
| pub trait NodeEntry { | |
| fn entry(self: Vc<Self>, data: ContentSourceData) -> Vc<NodeRenderingEntry>; | |
| async fn entries(self: Vc<Self>) -> Result<Vc<NodeRenderingEntries>> { | |
| Ok(Vc::cell(vec![ | |
| self.entry(Default::default()).to_resolved().await?, | |
| ])) | |
| } | |
| } | |