Skip to content

Commit

Permalink
chore: backport and bump scaffodling 0.3000.0 dev.13 (#306)
Browse files Browse the repository at this point in the history
* fix: poorly formatted rust code (#288)

* fix: poorly formatted code in coordinator zome

* document add_newlines

* clearn up coordinators module

* clean up integrity module

* refactor utils

* fix add_newlines

* update integrity comments

* fix map file calls

* fix add_newlines

* make add_newlines public/private function agnostic

* refactor link-type coordinator

* fix  remove link handler

* fix collection coordinator

* clean up entry-type coordinator

* fix clippy warnings

* refactor link-type coordinator

* fix bug scaffolding entry-type with linked_from

* fix target_hash_variable

* remove unnecessary format usage

* remove unnecessary clone

* fix validate_delete_result

* move comment

* fix entry from rcord error message

* rename unparse function to unparse_pretty;

* feat: add long disable fast track option to hc scaffold web-app (#293)

* add fix to prevent accumulation of dist.zip content (#300)

* chore: bump version

---------

Co-authored-by: matthme <36768177+matthme@users.noreply.github.com>
  • Loading branch information
c12i and matthme committed Jun 6, 2024
1 parent 341d6a4 commit 1ffc9eb
Show file tree
Hide file tree
Showing 16 changed files with 1,033 additions and 823 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "holochain_scaffolding_cli"
version = "0.3000.0-dev.12"
version = "0.3000.0-dev.13"
description = "CLI to easily generate and modify holochain apps"
license = "CAL-1.0"
homepage = "https://developer.holochain.org"
Expand Down
38 changes: 19 additions & 19 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub enum HcScaffoldCommand {
holo_enabled: bool,

/// Whether to skip setting up an initial DNA and it's zome(s) after the web app is scaffolded
#[structopt(short = "F")]
#[structopt(long = "disable-fast-track", short = "F")]
disable_fast_track: bool,
},
/// Manage custom templates
Expand Down
6 changes: 3 additions & 3 deletions src/file_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::fs;
use std::path::{Path, PathBuf};

use crate::error::{ScaffoldError, ScaffoldResult};
use crate::utils::unparse;
use crate::utils::unparse_pretty;

pub type FileTree = FileSystemTree<OsString, String>;

Expand Down Expand Up @@ -194,10 +194,10 @@ pub fn map_rust_files<F: Fn(PathBuf, syn::File) -> ScaffoldResult<syn::File> + C
let original_file: syn::File = syn::parse_str(&contents)
.map_err(|e| ScaffoldError::MalformedFile(file_path.clone(), e.to_string()))?;
let new_file = map_fn(file_path, original_file.clone())?;
// Only reformat the file via unparse if the contents of the newly modified
// Only reformat the file via unparse_pretty if the contents of the newly modified
// file are different from the original
if new_file != original_file {
return Ok(unparse(&new_file));
return Ok(unparse_pretty(&new_file));
}
}
}
Expand Down
Loading

0 comments on commit 1ffc9eb

Please sign in to comment.