1use turbo_rcstr::rcstr;
2use turbo_tasks::{ResolvedVc, Vc};
3use turbo_tasks_fs::FileSystemPath;
4use turbopack_core::issue::{Issue, IssueStage, OptionStyledString, StyledString};
5
6#[turbo_tasks::value(shared)]
8pub struct ProcessEnvIssue {
9 pub path: FileSystemPath,
10 pub description: ResolvedVc<StyledString>,
11}
12
13#[turbo_tasks::value_impl]
14impl Issue for ProcessEnvIssue {
15 #[turbo_tasks::function]
16 fn title(&self) -> Vc<StyledString> {
17 StyledString::Text(rcstr!("Error loading dotenv file")).cell()
18 }
19
20 #[turbo_tasks::function]
21 fn stage(&self) -> Vc<IssueStage> {
22 IssueStage::Load.into()
23 }
24
25 #[turbo_tasks::function]
26 fn file_path(&self) -> Vc<FileSystemPath> {
27 self.path.clone().cell()
28 }
29
30 #[turbo_tasks::function]
31 fn description(&self) -> Vc<OptionStyledString> {
32 Vc::cell(Some(self.description))
33 }
34}