From c9633de47500bc3bb2e1c38fd9eadf3396aeb8a3 Mon Sep 17 00:00:00 2001 From: Dmitry Osipov Date: Thu, 12 Sep 2024 16:21:40 +0400 Subject: [PATCH] move sails-js-cli version to const --- rs/cli/src/js.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rs/cli/src/js.rs b/rs/cli/src/js.rs index 1c76fcbd..c338fcca 100644 --- a/rs/cli/src/js.rs +++ b/rs/cli/src/js.rs @@ -1,6 +1,8 @@ use anyhow::Result; use std::process::Command; +const SAILS_JS_CLI_VERSION: &str = "0.1.0"; + pub struct JsClientGenerator { idl_path: String, out_path: String, @@ -25,7 +27,7 @@ impl JsClientGenerator { let idl_path = self.idl_path.clone(); let mut child = Command::new("npx") - .arg("sails-js-cli@0.1.0") + .arg(format!("sails-js-cli@{}", SAILS_JS_CLI_VERSION)) .arg("generate") .arg(idl_path) .arg("-o")