@@ -91,7 +91,12 @@ fn create_project(
9191 println ! ( "Creating project '{}'..." , project_name) ;
9292
9393 // Collect feature overlay paths to know which files to skip from base
94- let feature_files = collect_feature_overlay_files ( template, features) ;
94+ let mut feature_files = collect_feature_overlay_files ( template, features) ;
95+
96+ // When queue feature is active, skip app.rb (consumer.rb replaces it)
97+ if features. iter ( ) . any ( |f| f == "queue" ) {
98+ feature_files. insert ( "lib/app.rb" . to_string ( ) ) ;
99+ }
95100
96101 // Copy base template files (skip files that will be overridden by feature overlays)
97102 copy_dir_recursive (
@@ -338,14 +343,17 @@ fn show_diff(existing_file: &Path, new_content: &[u8]) -> Result<(), Box<dyn std
338343
339344fn substitute_project_name ( content : & str , project_name : & str ) -> String {
340345 let project_name_underscore = project_name. replace ( '-' , "_" ) ;
346+ let project_name_kebab = project_name. replace ( '_' , "-" ) ;
341347
342348 content
343349 . replace ( "$$PROJECT_NAME$$" , project_name)
344350 . replace ( "$$PROJECT_NAME_UNDERSCORE$$" , & project_name_underscore)
351+ . replace ( "$$PROJECT_NAME_KEBAB$$" , & project_name_kebab)
345352}
346353
347354fn print_project_next_steps ( template : & str , project_name : & str , features : & [ String ] ) {
348355 let has_enable_external = features. iter ( ) . any ( |f| f == "enable-external" ) ;
356+ let has_queue = features. iter ( ) . any ( |f| f == "queue" ) ;
349357
350358 println ! ( "\n Next steps:" ) ;
351359 match template {
@@ -358,7 +366,7 @@ fn print_project_next_steps(template: &str, project_name: &str, features: &[Stri
358366 println ! ( " \x1b [36mrustup target add wasm32-unknown-unknown\x1b [0m" ) ;
359367 println ! ( " • Node.js tools:" ) ;
360368 println ! ( " \x1b [36mnpm install -g pnpm wrangler\x1b [0m" ) ;
361- if has_enable_external {
369+ if has_enable_external || has_queue {
362370 println ! ( " • wasm-opt (Binaryen, required for asyncify):" ) ;
363371 println ! ( " \x1b [36mbrew install binaryen\x1b [0m" ) ;
364372 println ! ( " Or visit: https://github.com/WebAssembly/binaryen/releases" ) ;
@@ -370,7 +378,28 @@ fn print_project_next_steps(template: &str, project_name: &str, features: &[Stri
370378 println ! ( " \x1b [36mpnpm run dev\x1b [0m" ) ;
371379 println ! ( " 3. Deploy to Cloudflare:" ) ;
372380 println ! ( " \x1b [36mpnpm run deploy\x1b [0m" ) ;
373- if has_enable_external {
381+ if has_queue {
382+ println ! ( ) ;
383+ println ! (
384+ " \x1b [33mNote:\x1b [0m This project uses queue feature (Cloudflare Queues consumer)."
385+ ) ;
386+ println ! (
387+ " Edit \x1b [36mlib/consumer.rb\x1b [0m to implement your queue consumer logic."
388+ ) ;
389+ println ! ( " The following Uzumibi APIs are available in Ruby:" ) ;
390+ println ! (
391+ " • \x1b [36mUzumibi::Message#ack!\x1b [0m / \x1b [36m#retry(delay_seconds: N)\x1b [0m → Message control"
392+ ) ;
393+ println ! (
394+ " • \x1b [36mUzumibi::Fetch.fetch(url, method, body)\x1b [0m → Uzumibi::Response"
395+ ) ;
396+ println ! (
397+ " • \x1b [36mUzumibi::KV.get(key)\x1b [0m / \x1b [36mUzumibi::KV.set(key, value)\x1b [0m → Durable Object storage"
398+ ) ;
399+ println ! (
400+ " • \x1b [36mUzumibi::Queue.send(queue_name, message)\x1b [0m → Cloudflare Queue"
401+ ) ;
402+ } else if has_enable_external {
374403 println ! ( ) ;
375404 println ! ( " \x1b [33mNote:\x1b [0m This project uses enable-external feature." ) ;
376405 println ! ( " The following Uzumibi APIs are available in Ruby:" ) ;
0 commit comments