Skip to content

Commit

Permalink
0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
colin969 committed Aug 1, 2024
1 parent 09dfd62 commit e87fd80
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib"]
[dependencies]
napi = { version = "2", features = ["async"] }
napi-derive = "2"
flashpoint-archive = { version = "0.8.3", features = ["napi"] }
flashpoint-archive = { version = "0.9.0", features = ["napi"] }

[build-dependencies]
napi-build = "2"
Expand Down
3 changes: 3 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,9 @@ export class FlashpointArchive {
saveGameData(gameData: PartialGameData): Promise<GameData>
deleteGameData(id: number): Promise<void>
newTagFilterIndex(search: GameSearch): Promise<void>
findAllGameDevelopers(): Promise<Array<string>>
findAllGamePublishers(): Promise<Array<string>>
findAllGameSeries(): Promise<Array<string>>
findAllGameLibraries(): Promise<Array<string>>
addGamePlaytime(id: string, seconds: number): Promise<void>
clearPlaytimeTrackingById(gameId: string): Promise<void>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fparchive/flashpoint-archive",
"version": "0.8.3",
"version": "0.9.0",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
Expand Down
21 changes: 21 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,27 @@ impl FlashpointNode {
})
}

#[napi]
pub async fn find_all_game_developers(&self) -> Result<Vec<String>> {
self.flashpoint.find_all_game_developers().await.map_err(|e| {
Error::new(Status::GenericFailure, e)
})
}

#[napi]
pub async fn find_all_game_publishers(&self) -> Result<Vec<String>> {
self.flashpoint.find_all_game_publishers().await.map_err(|e| {
Error::new(Status::GenericFailure, e)
})
}

#[napi]
pub async fn find_all_game_series(&self) -> Result<Vec<String>> {
self.flashpoint.find_all_game_series().await.map_err(|e| {
Error::new(Status::GenericFailure, e)
})
}

#[napi]
pub async fn find_all_game_libraries(&self) -> Result<Vec<String>> {
self.flashpoint.find_all_game_libraries().await.map_err(|e| {
Expand Down

0 comments on commit e87fd80

Please sign in to comment.