diff --git a/kayle/lib/wasm/extract.ts b/kayle/lib/wasm/extract.ts index 35f1ff76..b3c9a1cc 100644 --- a/kayle/lib/wasm/extract.ts +++ b/kayle/lib/wasm/extract.ts @@ -1,4 +1,4 @@ -import { radiant_blast } from "kayle_innate"; +import { get_document_links } from "kayle_innate"; import type { RunnerConfig } from "../config"; /** @@ -10,5 +10,5 @@ import type { RunnerConfig } from "../config"; export async function extractLinks(config: RunnerConfig, target?: string) { const htmlContent = await config.page.content(); const domain = typeof target === "string" ? target : config.page.url(); - return radiant_blast(htmlContent, domain !== "about:blank" ? domain : ""); + return get_document_links(htmlContent, domain !== "about:blank" ? domain : ""); } diff --git a/kayle/package.json b/kayle/package.json index c08a9cd6..ee82d6f4 100644 --- a/kayle/package.json +++ b/kayle/package.json @@ -1,6 +1,6 @@ { "name": "kayle", - "version": "0.7.8", + "version": "0.7.9", "description": "Extremely fast and accurate accessibility engine built for any headless tool like playwright or puppeteer.", "main": "./build/index.js", "keywords": [ diff --git a/kayle_innate/Cargo.lock b/kayle_innate/Cargo.lock index 74d9c53d..8783f106 100644 --- a/kayle_innate/Cargo.lock +++ b/kayle_innate/Cargo.lock @@ -128,7 +128,7 @@ dependencies = [ [[package]] name = "kayle_innate" -version = "0.0.16" +version = "0.0.17" dependencies = [ "case_insensitive_string", "console_error_panic_hook", diff --git a/kayle_innate/Cargo.toml b/kayle_innate/Cargo.toml index 98fc56fa..7b90b329 100644 --- a/kayle_innate/Cargo.toml +++ b/kayle_innate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kayle_innate" -version = "0.0.16" +version = "0.0.17" authors = ["j-mendez"] edition = "2018" license = "MIT" diff --git a/kayle_innate/src/lib.rs b/kayle_innate/src/lib.rs index 548a3c4d..e5dd4ded 100644 --- a/kayle_innate/src/lib.rs +++ b/kayle_innate/src/lib.rs @@ -1,5 +1,3 @@ -// all API conventions base mapped from https://www.leagueoflegends.com/en-pl/champions/kayle/ - #[macro_use] extern crate lazy_static; @@ -34,7 +32,7 @@ pub fn domain_name(domain: &url::Url) -> &str { #[wasm_bindgen] /// setup a structure tree alg for parsing and find links in document. Allow user to perform hybrid audits realtime. -pub fn radiant_blast(res: &str, domain: &str) -> Box<[JsValue]> { +pub fn get_document_links(res: &str, domain: &str) -> Box<[JsValue]> { set_panic_hook(); lazy_static! { @@ -117,18 +115,20 @@ pub fn radiant_blast(res: &str, domain: &str) -> Box<[JsValue]> { #[wasm_bindgen] /// try to fix all possible issues using a spec against the tree. -pub fn celestial_blessing() { - println!("Celestial blessing from kayle!"); +pub fn parse_accessibility_tree(_html: &str) { + set_panic_hook(); + // mark nodes that should be checked. + todo!("Parsing an accessibility tree from rust soon.") } #[wasm_bindgen] /// use gpu to accelerate layout rendering or workers. -pub fn starfire_spellblade() { - println!("Starfire Spellblase from kayle!"); +pub fn validate_node() { + todo!("It will validate a node whether accessibility checks should arise.") } #[wasm_bindgen] /// Perform the a judgement against a page to determine effort, access, and more. -pub fn divine_judgement() { - println!("Divine judgement from kayle!"); +pub fn judge() { + todo!("Determine the score of the website after the tree was built.") } diff --git a/kayle_innate/tests/web.rs b/kayle_innate/tests/web.rs index a325ab5b..1aa30cc9 100644 --- a/kayle_innate/tests/web.rs +++ b/kayle_innate/tests/web.rs @@ -3,14 +3,14 @@ #![cfg(target_arch = "wasm32")] extern crate wasm_bindgen_test; -use kayle_innate::radiant_blast; +use kayle_innate::get_document_links; use wasm_bindgen_test::*; wasm_bindgen_test_configure!(run_in_browser); #[wasm_bindgen_test] -fn _radiant_blast() { - let links = radiant_blast( +fn _get_document_links() { + let links = get_document_links( r#" @@ -33,7 +33,7 @@ fn _radiant_blast() { let base_domain = "https://a11ywatch.com"; - let links = radiant_blast( + let links = get_document_links( r#"