Skip to content

Commit

Permalink
prepare for async
Browse files Browse the repository at this point in the history
  • Loading branch information
SOVLOOKUP committed Oct 18, 2023
1 parent 973efa2 commit 314f333
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion addon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ rdev = { version = "0.5.3", features = ["serialize", "unstable_grab"] }
clipboard-files = "0.1.1"
copypasta = "0.10.0"
enigo = "0.1.3"
napi = { version = "2.13.3", default-features = false, features = ["napi4"] }
napi = { version = "2", features = ["async"] }
napi-derive = "2.13.0"
serde_json = "1.0.107"
lnk_parser = "0.4.0"
parselnk = "0.1.1"
pelite = "0.10.0"
base64 = "0.21.4"
tokio = { version = "1", features = ["full"] }

[build-dependencies]
napi-build = "2.0.1"
Expand Down
5 changes: 2 additions & 3 deletions addon/src/shotcut/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use lnk_parser::LNKParser;
use std::{fs::File, path::PathBuf};
use std::path::PathBuf;
pub mod exelook;

#[napi]
pub fn parse_lnk(path: String) -> Option<String> {
let mut file = File::open(path).unwrap();
let lnk_file = LNKParser::from_reader(&mut file);
let lnk_file = LNKParser::from_path(&path);
if let Ok(f) = lnk_file {
Some(serde_json::to_string(&f).unwrap())
} else {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rubick-native",
"version": "0.0.12",
"version": "0.0.13-beta",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
Expand All @@ -9,9 +9,9 @@
"build": "tsup --cjsInterop"
},
"devDependencies": {
"@types/node": "^20.8.6",
"tsup": "^7.2.0",
"@types/node": "^20.8.7",
"picomatch": "^2.3.1",
"tsup": "^7.2.0",
"typescript": "^5.2.2"
},
"dependencies": {
Expand Down

0 comments on commit 314f333

Please sign in to comment.