From 9c0fbf51f95a3de98d6878bf1e755209fdc718ff Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Wed, 17 Aug 2022 22:50:19 +0100 Subject: [PATCH] Remove JavaScript global surrealdb placeholder package --- lib/src/fnc/script/globals/mod.rs | 1 - lib/src/fnc/script/globals/surrealdb.rs | 6 ------ lib/src/fnc/script/main.rs | 2 -- 3 files changed, 9 deletions(-) delete mode 100644 lib/src/fnc/script/globals/surrealdb.rs diff --git a/lib/src/fnc/script/globals/mod.rs b/lib/src/fnc/script/globals/mod.rs index df38b675..0e40308b 100644 --- a/lib/src/fnc/script/globals/mod.rs +++ b/lib/src/fnc/script/globals/mod.rs @@ -1,2 +1 @@ -pub mod surrealdb; pub mod fetch; diff --git a/lib/src/fnc/script/globals/surrealdb.rs b/lib/src/fnc/script/globals/surrealdb.rs deleted file mode 100644 index 362890a5..00000000 --- a/lib/src/fnc/script/globals/surrealdb.rs +++ /dev/null @@ -1,6 +0,0 @@ -#[js::bind(object, public)] -#[quickjs(rename = "surrealdb")] -#[allow(non_upper_case_globals)] -pub mod package { - pub const version: &str = env!("CARGO_PKG_VERSION"); -} diff --git a/lib/src/fnc/script/main.rs b/lib/src/fnc/script/main.rs index bcddb930..9bfbd98a 100644 --- a/lib/src/fnc/script/main.rs +++ b/lib/src/fnc/script/main.rs @@ -37,8 +37,6 @@ pub async fn run( let res: Result, js::Error> = ctx.with(|ctx| { // Get the context global object let global = ctx.globals(); - // Register the surrealdb module as a global object - global.init_def::().unwrap(); // Register the fetch function as a global object global.init_def::()?; // Register the Duration type as a global class