Skip to content

Commit 1053adb

Browse files
committed
Fixed base packages not including, removed some logs
1 parent d28bee4 commit 1053adb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src-tauri/src/template.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub fn get_core_templates_path(editor_version: String, app_state: &tauri::State<
109109

110110
let templates_path = crate::editor::get_package_manager_folder(&editor)?
111111
.join("ProjectTemplates");
112-
println!("Templates path: {}", templates_path.display());
112+
// println!("Templates path: {}", templates_path.display());
113113
Ok(templates_path)
114114
}
115115

@@ -322,11 +322,11 @@ pub fn extract_template_information(app: &tauri::AppHandle, app_state: &tauri::S
322322

323323
if let Some(dependencies) = package_json.dependencies {
324324
for (key, value) in dependencies {
325-
found_deps.insert(key.clone(), (value, 1));
325+
found_deps.insert(key.clone(), (value, 0));
326326
}
327327
}
328328

329-
println!("initial deps: {:?}", found_deps);
329+
// println!("initial deps: {:?}", found_deps);
330330

331331
if !package_lock_json_contents.is_empty() {
332332
let package_lock_json: PackageLockJson = serde_json::from_str(&package_lock_json_contents)
@@ -389,12 +389,15 @@ pub fn extract_template_information(app: &tauri::AppHandle, app_state: &tauri::S
389389
}
390390

391391
write_editor_version_packages(&app, &surface_template.editor_version, &editor_version_contents)?;
392+
393+
// println!("found deps: {:?}", found_deps);
392394

393395
let mut final_deps = HashMap::new();
394-
for (key, value) in found_deps.iter().filter(|x| x.1.1 == 1) {
396+
for (key, value) in found_deps.iter().filter(|x| x.1.1 <= 1) {
395397
final_deps.insert(key.clone(), value.0.clone());
396398
}
397399

400+
// println!("final deps: {:?}", final_deps);
398401
package_json.dependencies = Some(final_deps);
399402
}
400403

0 commit comments

Comments
 (0)