diff --git a/examples/custom-plugin/plugin/bindings.ts b/examples/custom-plugin/plugin/bindings.ts index d6f2620..4acc7f6 100644 --- a/examples/custom-plugin/plugin/bindings.ts +++ b/examples/custom-plugin/plugin/bindings.ts @@ -1,27 +1,27 @@ -// This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually. + // This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually. -export const commands = { - /** - * Adds two numbers, returning the result. - */ - async addNumbers(a: number, b: number): Promise { - return await TAURI_INVOKE("plugin:custom-plugin|add_numbers", { a, b }); - }, -}; + export const commands = { +/** + * Adds two numbers, returning the result. + */ +async addNumbers(a: number, b: number) : Promise { +return await TAURI_INVOKE("plugin:specta-example|add_numbers", { a, b }); +} +} export const events = __makeEvents__<{ - randomNumber: RandomNumber; +randomNumber: RandomNumber }>({ - randomNumber: "plugin:custom-plugin:random-number", -}); +randomNumber: "plugin:specta-example:random-number" +}) /** user-defined types **/ -export type RandomNumber = number; +export type RandomNumber = number /** tauri-specta globals **/ -import { invoke as TAURI_INVOKE } from "@tauri-apps/api/core"; + import { invoke as TAURI_INVOKE } from "@tauri-apps/api/core"; import * as TAURI_API_EVENT from "@tauri-apps/api/event"; import { type WebviewWindow as __WebviewWindow__ } from "@tauri-apps/api/webviewWindow"; @@ -75,3 +75,5 @@ function __makeEvents__>( } ); } + + \ No newline at end of file diff --git a/examples/custom-plugin/plugin/src/lib.rs b/examples/custom-plugin/plugin/src/lib.rs index 78ebfa4..c8e362b 100644 --- a/examples/custom-plugin/plugin/src/lib.rs +++ b/examples/custom-plugin/plugin/src/lib.rs @@ -22,7 +22,7 @@ macro_rules! specta_builder { }; } -const PLUGIN_NAME: &str = "custom-plugin"; +const PLUGIN_NAME: &str = "specta-example"; pub fn init() -> TauriPlugin { let (invoke_handler, register_events) =