Remove JavaScript global surrealdb placeholder package

This commit is contained in:
Tobie Morgan Hitchcock 2022-08-17 22:50:19 +01:00
parent 890f2f527f
commit 9c0fbf51f9
3 changed files with 0 additions and 9 deletions

View file

@ -1,2 +1 @@
pub mod surrealdb;
pub mod fetch; pub mod fetch;

View file

@ -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");
}

View file

@ -37,8 +37,6 @@ pub async fn run(
let res: Result<Promise<Value>, js::Error> = ctx.with(|ctx| { let res: Result<Promise<Value>, js::Error> = ctx.with(|ctx| {
// Get the context global object // Get the context global object
let global = ctx.globals(); let global = ctx.globals();
// Register the surrealdb module as a global object
global.init_def::<globals::surrealdb::Package>().unwrap();
// Register the fetch function as a global object // Register the fetch function as a global object
global.init_def::<globals::fetch::Fetch>()?; global.init_def::<globals::fetch::Fetch>()?;
// Register the Duration type as a global class // Register the Duration type as a global class