Skip to content

Commit

Permalink
🔧 Fix missing dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
oovm committed Jan 29, 2025
1 parent a322b94 commit ff2c9af
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 25 deletions.
3 changes: 1 addition & 2 deletions projects/npx-create-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
name = "legion-new"
version = "0.1.0"
authors = ["Aster <[email protected]>"]
description = "Valkyrie workspace manager"
description = "Create new legion projects"
repository = "https://github.com/nyar-vm/valkyrie-valor"
documentation = "https://docs.rs/valor-config"
readme = "readme.md"
license = "MPL-2.0"
edition = "2021"

[dependencies]
anyhow = "1.0.95"
clap = { version = "4.5.27", features = ["derive"] }
reqwest = { version = "0.12.12", features = ["socks"] }
#inquire = "0.7.5"
Expand Down
7 changes: 6 additions & 1 deletion projects/npx-create-rs/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ impl LegionNew {
}
}
fn ask_override(&self, path: &Path) -> Result<bool, NpxError> {
let url = Url::from_directory_path(path).unwrap();
let url = match Url::from_directory_path(path) {
Ok(o) => {o}
Err(_) => {
panic!()
}
};
let over = Confirm::with_theme(&ColorfulTheme::default())
.with_prompt(format!("Do you want to remove exists {}?", url))
.report(false)
Expand Down
12 changes: 6 additions & 6 deletions projects/npx-create-rs/src/errors/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ impl From<std::io::Error> for NpxError {
}
}

impl From<anyhow::Error> for NpxError {
fn from(error: anyhow::Error) -> Self {
let kind = NpxErrorKind::Custom { message: error.to_string() };
Self { kind: Box::new(kind) }
}
}
// impl From<anyhow::Error> for NpxError {
// fn from(error: anyhow::Error) -> Self {
// let kind = NpxErrorKind::Custom { message: error.to_string() };
// Self { kind: Box::new(kind) }
// }
// }


impl From<dialoguer::Error> for NpxError {
Expand Down
5 changes: 5 additions & 0 deletions projects/npx-wasm32-wasi/create-legion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env node

import {run} from "./src/index.js";

run.run()
5 changes: 0 additions & 5 deletions projects/npx-wasm32-wasi/legion-new.js

This file was deleted.

28 changes: 17 additions & 11 deletions projects/npx-wasm32-wasi/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
{
"name": "create-legion",
"version": "0.0.1",
"description": "Create the valkyrie legion",
"type": "module",
"main": "index.js",
"bin": {
"create-legion": "legion-new.js",
"legion-new": "legion-new.js"
},
"author": "[email protected]",
"version": "0.0.2",
"description": "Create new valkyrie legion",
"keywords": [
"rollup",
"rollup-template",
"library"
],
"author": "[email protected]",
"license": "UNLICENSED",
"homepage": "https://github.com/valkyrie-language/legion-npx-create",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/valkyrie-language/legion-new.rs",
"directory": "projects/npx-wasm32-wasi"
},
"main": "src/index.js",
"type": "module",
"types": "src/index.d.ts",
"typings": "src/index.d.ts",
"bin": {
"create-legion": "create-legion.js"
},
"dependencies": {

"@bytecodealliance/preview2-shim": "^0.17.1"
}
}

0 comments on commit ff2c9af

Please sign in to comment.