File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ use crate::{
44
44
#[ turbo_tasks:: value]
45
45
pub struct MiddlewareEndpoint {
46
46
project : ResolvedVc < Project > ,
47
- build_id : RcStr ,
48
47
asset_context : ResolvedVc < Box < dyn AssetContext > > ,
49
48
source : ResolvedVc < Box < dyn Source > > ,
50
49
app_dir : Option < ResolvedVc < FileSystemPath > > ,
@@ -56,15 +55,13 @@ impl MiddlewareEndpoint {
56
55
#[ turbo_tasks:: function]
57
56
pub fn new (
58
57
project : ResolvedVc < Project > ,
59
- build_id : RcStr ,
60
58
asset_context : ResolvedVc < Box < dyn AssetContext > > ,
61
59
source : ResolvedVc < Box < dyn Source > > ,
62
60
app_dir : Option < ResolvedVc < FileSystemPath > > ,
63
61
ecmascript_client_reference_transition_name : Option < ResolvedVc < RcStr > > ,
64
62
) -> Vc < Self > {
65
63
Self {
66
64
project,
67
- build_id,
68
65
asset_context,
69
66
source,
70
67
app_dir,
Original file line number Diff line number Diff line change @@ -738,6 +738,11 @@ impl Project {
738
738
* self . mode
739
739
}
740
740
741
+ #[ turbo_tasks:: function]
742
+ pub ( super ) async fn is_watch_enabled ( & self ) -> Result < Vc < bool > > {
743
+ Ok ( Vc :: cell ( self . watch . enable ) )
744
+ }
745
+
741
746
#[ turbo_tasks:: function]
742
747
pub ( super ) async fn per_page_module_graph ( & self ) -> Result < Vc < bool > > {
743
748
Ok ( Vc :: cell ( * self . mode . await ? == NextMode :: Development ) )
@@ -944,7 +949,7 @@ impl Project {
944
949
945
950
// At this point all modules have been computed and we can get rid of the node.js
946
951
// process pools
947
- if self . await ?. watch . enable {
952
+ if * self . is_watch_enabled ( ) . await ? {
948
953
turbopack_node:: evaluate:: scale_down ( ) ;
949
954
} else {
950
955
turbopack_node:: evaluate:: scale_zero ( ) ;
@@ -1412,7 +1417,6 @@ impl Project {
1412
1417
1413
1418
Ok ( Vc :: upcast ( MiddlewareEndpoint :: new (
1414
1419
self ,
1415
- self . await ?. build_id . clone ( ) ,
1416
1420
middleware_asset_context,
1417
1421
source,
1418
1422
app_dir. as_deref ( ) . copied ( ) ,
You can’t perform that action at this time.
0 commit comments