Skip to content

Commit 3def6d1

Browse files
committed
Revert "WIP debug"
This reverts commit 6154d26423af84971d826f5c60e0e0a6dacccec1.
1 parent 94ba3bb commit 3def6d1

File tree

2 files changed

+34
-35
lines changed

2 files changed

+34
-35
lines changed

crates/napi/src/next_api/project.rs

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -975,28 +975,27 @@ async fn output_assets_operation(
975975
container: ResolvedVc<ProjectContainer>,
976976
app_dir_only: bool,
977977
) -> Result<Vc<OutputAssets>> {
978-
// let endpoint_assets = container
979-
// .project()
980-
// .get_all_endpoints(app_dir_only)
981-
// .await?
982-
// .iter()
983-
// .map(|endpoint| async move { endpoint.output().await?.output_assets.await })
984-
// .try_join()
985-
// .await?;
986-
987-
// let output_assets: FxIndexSet<ResolvedVc<Box<dyn OutputAsset>>> = endpoint_assets
988-
// .iter()
989-
// .flat_map(|assets| assets.iter().copied())
990-
// .collect();
978+
let endpoint_assets = container
979+
.project()
980+
.get_all_endpoints(app_dir_only)
981+
.await?
982+
.iter()
983+
.map(|endpoint| async move { endpoint.output().await?.output_assets.await })
984+
.try_join()
985+
.await?;
986+
987+
let output_assets: FxIndexSet<ResolvedVc<Box<dyn OutputAsset>>> = endpoint_assets
988+
.iter()
989+
.flat_map(|assets| assets.iter().copied())
990+
.collect();
991991

992992
let nft = next_server_nft_assets(container.project()).await?;
993993

994994
Ok(Vc::cell(
995-
// output_assets
996-
// .into_iter()
997-
// .chain(nft.iter().copied())
998-
// .collect(),
999-
nft.iter().copied().collect(),
995+
output_assets
996+
.into_iter()
997+
.chain(nft.iter().copied())
998+
.collect(),
1000999
))
10011000
}
10021001

crates/next-api/src/next_server_nft.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ pub async fn next_server_nft_assets(project: Vc<Project>) -> Result<Vc<OutputAss
112112
.try_join()
113113
.await?;
114114

115-
// let minimal_server_entries = shared_entries
116-
// .iter()
117-
// .copied()
118-
// .chain(resolve_entry("next/dist/compiled/next-server/server.runtime.prod").await?)
119-
// .map(|m| Vc::upcast::<Box<dyn OutputAsset>>(TracedAsset::new(m)).to_resolved())
120-
// .try_join()
121-
// .await?;
115+
let minimal_server_entries = shared_entries
116+
.iter()
117+
.copied()
118+
.chain(resolve_entry("next/dist/compiled/next-server/server.runtime.prod").await?)
119+
.map(|m| Vc::upcast::<Box<dyn OutputAsset>>(TracedAsset::new(m)).to_resolved())
120+
.try_join()
121+
.await?;
122122

123123
let server_ignores_glob = [
124124
"**/node_modules/react{,-dom,-dom-server-turbopack}/**/*.development.js",
@@ -203,16 +203,16 @@ pub async fn next_server_nft_assets(project: Vc<Project>) -> Result<Vc<OutputAss
203203
.to_resolved()
204204
.await?,
205205
),
206-
// ResolvedVc::upcast(
207-
// ServerNftJsonAsset::new(
208-
// project,
209-
// RcStr::from("next-minimal-server.turbo"),
210-
// Vc::cell(minimal_server_entries),
211-
// minimal_server_ignores_glob,
212-
// )
213-
// .to_resolved()
214-
// .await?,
215-
// ),
206+
ResolvedVc::upcast(
207+
ServerNftJsonAsset::new(
208+
project,
209+
RcStr::from("next-minimal-server.turbo"),
210+
Vc::cell(minimal_server_entries),
211+
minimal_server_ignores_glob,
212+
)
213+
.to_resolved()
214+
.await?,
215+
),
216216
]))
217217
}
218218

0 commit comments

Comments
 (0)