Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated CLI template `increment_rs`: Changed authority validation to use `Authority` type wrapper instead of raw `Pubkey` in `IncrementAccounts` (#297)
- Updated CLI template `states_rs`: Changed `AccountValidate` implementation for `CounterAccount` to use `Authority` type parameter instead of `&Pubkey`, and updated reference type from `Self::Ref<'_>` to `Self::Ptr` (#297)
- Updated CLI template `initialize_rs`: Changed `Seeds` argument in `idl` macro to use `FindCounterAccountSeeds` instead of `FindCounterSeeds` (#297)
- CLI template: ensure crate name uses underscores in `cargo_toml`. Added `{name_lowercase_underscore}` placeholder and generator replacement to convert hyphens to underscores in generated project names. (#296)

## [0.27.0] - 2025-11-07

Expand Down
4 changes: 4 additions & 0 deletions star_frame_cli/src/new_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ pub fn new_project(args: NewArgs) -> eyre::Result<()> {
fn stub_file(template: &str, path: &PathBuf, project_name: &String) -> io::Result<()> {
let content = template
.replace("{name_lowercase}", &project_name.to_ascii_lowercase())
.replace(
"{name_lowercase_underscore}",
&project_name.to_ascii_lowercase().replace('-', "_"),
)
.replace("{name_uppercase}", &project_name.to_ascii_uppercase())
.replace("{name_pascalcase}", &project_name.to_case(Case::Pascal))
.replace("{pubkey}", &Pubkey::new_unique().to_string());
Expand Down
2 changes: 1 addition & 1 deletion star_frame_cli/src/template/cargo_toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ release.release = false
# Using only `cdylib` enables the compiler to optimize with LTO. If you need to use the library, make a separate lib crate
# or add `rlib` here if the performance impact is acceptable.
crate-type = ["cdylib"]
name = "{name_lowercase}"
name = "{name_lowercase_underscore}"

[features]
no_entrypoint = []
Expand Down