Skip to content

Commit

Permalink
remove commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
ForsakenHarmony committed Sep 4, 2024
1 parent 5d271c7 commit 97e64bd
Showing 1 changed file with 0 additions and 76 deletions.
76 changes: 0 additions & 76 deletions crates/napi/src/app_structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,79 +353,3 @@ async fn get_value(

Ok(Vc::cell(result))
}

// #[napi]
// pub fn stream_entrypoints(
// turbo_tasks: External<Arc<TurboTasks<MemoryBackend>>>,
// root_dir: String,
// project_dir: String,
// page_extensions: Vec<String>,
// func: JsFunction,
// ) -> napi::Result<()> {
// register();
// let func: ThreadsafeFunction<Option<ReadRef<EntrypointsForJs>>, ErrorStrategy::CalleeHandled>
// = func.create_threadsafe_function(0, |ctx| {
// let value = ctx.value;
// let value = serde_json::to_value(value)?;
// Ok(vec![value])
// })?;
// let root_dir = RcStr::from(root_dir);
// let project_dir = RcStr::from(project_dir);
// let page_extensions = Arc::new(page_extensions);
// turbo_tasks.spawn_root_task(move || {
// let func: ThreadsafeFunction<Option<ReadRef<EntrypointsForJs>>> = func.clone();
// let project_dir = project_dir.clone();
// let root_dir = root_dir.clone();
// let page_extensions: Arc<Vec<String>> = page_extensions.clone();
// Box::pin(async move {
// if let Some(entrypoints) = &*get_value(
// root_dir.clone(),
// project_dir.clone(),
// page_extensions.iter().map(|s| s.as_str().into()).collect(),
// true,
// )
// .await?
// {
// func.call(
// Ok(Some(entrypoints.await?)),
// ThreadsafeFunctionCallMode::NonBlocking,
// );
// } else {
// func.call(Ok(None), ThreadsafeFunctionCallMode::NonBlocking);
// }
//
// Ok::<Vc<()>, _>(Default::default())
// })
// });
// Ok(())
// }
//
// #[napi]
// pub async fn get_entrypoints(
// turbo_tasks: External<Arc<TurboTasks<MemoryBackend>>>,
// root_dir: String,
// project_dir: String,
// page_extensions: Vec<String>,
// ) -> napi::Result<serde_json::Value> {
// register();
// let result = turbo_tasks
// .run_once(async move {
// let value = if let Some(entrypoints) = &*get_value(
// root_dir.into(),
// project_dir.into(),
// page_extensions.iter().map(|s| s.as_str().into()).collect(),
// false,
// )
// .await?
// {
// Some(entrypoints.await?)
// } else {
// None
// };
//
// let value = serde_json::to_value(value)?;
// Ok(value)
// })
// .await?;
// Ok(result)
// }

0 comments on commit 97e64bd

Please sign in to comment.