Skip to content

Commit 70fc87a

Browse files
authored
feat(core): add config and package_info getters on App and AppHandle (#2016)
1 parent 94dbc96 commit 70fc87a

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Adds `config` and `package_info` getters to the `App` and `AppHandle` structs.

core/tauri/src/app.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,16 @@ macro_rules! shared_app_impl {
216216
package_info: self.manager.package_info().clone(),
217217
}
218218
}
219+
220+
/// Gets the app's configuration, defined on the `tauri.conf.json` file.
221+
pub fn config(&self) -> Arc<Config> {
222+
self.manager.config()
223+
}
224+
225+
/// Gets the app's package information.
226+
pub fn package_info(&self) -> &PackageInfo {
227+
self.manager.package_info()
228+
}
219229
}
220230
};
221231
}

0 commit comments

Comments
 (0)