Skip to content

Commit

Permalink
auto-imported system package
Browse files Browse the repository at this point in the history
  • Loading branch information
Heulitig authored and amitu committed Dec 13, 2023
1 parent 29f82f8 commit db9a718
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fastn-core/src/package/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,17 @@ impl Package {
.map(|f| f.into_auto_import())
.collect();

if let Some(ref system_alias) = package.system {
if package.system_is_confidential.unwrap_or(true) {
return fastn_core::usage_error(format!("system-is-confidential is needed for system package {} and currently only false is supported.", package.name));
}
package.auto_import.push(fastn_core::AutoImport {
path: package.name.clone(),
alias: Some(system_alias.clone()),
exposing: vec![],
});
}

package.ignored_paths = fastn_doc.get::<Vec<String>>("fastn#ignore")?;
package.fonts = fastn_doc.get("fastn#font")?;
package.sitemap_temp = fastn_doc.get("fastn#sitemap")?;
Expand Down

0 comments on commit db9a718

Please sign in to comment.