first commit

This commit is contained in:
= 2024-09-06 13:31:50 +02:00
commit 3039b0fa12
57 changed files with 1821 additions and 0 deletions

174
.gitignore vendored Normal file
View File

@ -0,0 +1,174 @@
# ---> VisualStudioCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
# ---> Rust
# Generated by Cargo
# will have compiled files and executables
debug/
target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
# ---> Node
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
.cache
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
# ---> Vue
# gitignore template for Vue.js projects
#
# Recommended template: Node.gitignore
# TODO: where does this rule come from?
docs/_book
# TODO: where does this rule come from?
test/
static/

22
Cargo.toml Normal file
View File

@ -0,0 +1,22 @@
[package]
name = "medusa"
version = "0.1.0"
edition = "2021"
[dependencies]
async-trait = "0.1.82"
chrono = "0.4.38"
kbinxml = { git = "https://github.com/mbilker/kbinxml-rs.git", version = "3.1.1" }
lazy_static = "1.5.0"
lz77 = "0.1.0"
md5 = "0.7.0"
miniz_oxide = "0.8.0"
psmap = { git = "https://github.com/mbilker/kbinxml-rs.git", version = "2.0.0" }
psmap_derive = { git = "https://github.com/mbilker/kbinxml-rs.git", version = "2.0.0" }
quick-xml = "0.36.1"
rc4 = "0.1.0"
rocket = "0.5.1"
xml-rs = "0.8.21"
[build-dependencies]
fs_extra = "1.3.0"

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Medusa
E-Amusement server written in rust

2
Rocket.toml Normal file
View File

@ -0,0 +1,2 @@
[default]
address = "0.0.0.0"

86
build.rs Normal file
View File

@ -0,0 +1,86 @@
use std::env;
use std::fs;
use std::path::PathBuf;
use std::process::Command;
fn main() {
// Get the current build profile (debug or release)
let profile = env::var("PROFILE").expect("PROFILE environment variable not set");
// Determine the base directory for the build artifacts (target/debug or target/release)
let target_base_dir = PathBuf::from("target");
// Construct the target path based on the build profile
let target_profile_dir = target_base_dir.join(profile);
// Path to the Rocket.toml file you want to copy
let rocket_config_src = PathBuf::from("Rocket.toml");
// Path where the Rocket.toml file will be copied
let rocket_config_dest = target_profile_dir.join("Rocket.toml");
// Create the target profile directory if it does not exist
fs::create_dir_all(&target_profile_dir).expect("Failed to create directory");
// Copy the Rocket.toml configuration file to the target directory
fs::copy(rocket_config_src, rocket_config_dest).expect("Failed to copy Rocket.toml");
let install_cmd = "cd web && bun install";
// Execute the web build command and wait for it to finish
let _status = if cfg!(target_os = "windows") {
Command::new("cmd")
.arg("/C")
.arg(install_cmd)
.status()
.expect("Failed to execute web build command")
} else {
Command::new("sh")
.arg("-c")
.arg(install_cmd)
.status()
.expect("Failed to execute web build command")
};
let web_build_cmd = "cd web && bun run build";
// Execute the web build command and wait for it to finish
let status = if cfg!(target_os = "windows") {
Command::new("cmd")
.arg("/C")
.arg(web_build_cmd)
.status()
.expect("Failed to execute web build command")
} else {
Command::new("sh")
.arg("-c")
.arg(web_build_cmd)
.status()
.expect("Failed to execute web build command")
};
// Check if the build command was successful
if !status.success() {
panic!("Web build command failed with status: {:?}", status);
}
// Check if the build command was successful
if status.success() {
// Copy everything from web/dist to static
let web_dist_dir = PathBuf::from("web/dist");
let static_dir = PathBuf::from("static");
// Copy the contents of the web/dist directory to the static directory
let _ = fs_extra::dir::copy(
&web_dist_dir,
&static_dir,
&fs_extra::dir::CopyOptions {
overwrite: true,
content_only: true,
..Default::default()
},
);
} else {
eprintln!("Web build command failed");
}
}

1
src/generators/mod.rs Normal file
View File

@ -0,0 +1 @@
pub mod response_generator;

View File

@ -0,0 +1,76 @@
use kbinxml::Options;
use rc4::cipher::generic_array::GenericArray;
use rc4::{consts::*, KeyInit, StreamCipher};
use rc4::Rc4;
use miniz_oxide::deflate::compress_to_vec;
lazy_static! {
static ref KEY: Vec<u8> = {
"00000000000069D74627D985EE2187161570D08D93B12455035B6DF0D8205DF5"
.chars()
.collect::<Vec<char>>()
.chunks(2)
.map(|chunk| u8::from_str_radix(&chunk.iter().collect::<String>(), 16).unwrap())
.collect()
};
}
pub struct ResponseGenerator;
impl ResponseGenerator {
pub fn generate_response(mut binary_data: Vec<u8>, compress: bool, info: String) -> Vec<u8> {
let result = kbinxml::from_text_xml(&binary_data);
let (collection, _encoding) = match result {
Ok(result) => result,
Err(e) => {
eprintln!("Error parsing response xml: {}", e);
return Vec::new()
},
};
let options = Options::with_encoding(kbinxml::EncodingType::SHIFT_JIS);
let result = kbinxml::to_binary_with_options(options, &collection);
binary_data = match result {
Ok(result) => result,
Err(e) => {
eprintln!("Error encoding response xml: {}", e);
return Vec::new()
}
};
if compress {
binary_data = compress_to_vec(&binary_data, 6);
}
if info != "" {
let mut key = KEY.clone();
let info_parts = info.split('-').collect::<Vec<&str>>();
if info_parts.len() < 2 {
eprintln!("Wrong eamuse info",);
return Vec::new();
}
let combined = format!("{}{}", info_parts[1], info_parts[2]);
for i in 0..6 {
// Extract a 2-character substring from the combined string
let hex_str = &combined[i * 2..i * 2 + 2];
// Convert the 2-character hexadecimal substring to a byte
key[i] = u8::from_str_radix(hex_str, 16).expect("Invalid hex string");
}
let md5_hash = md5::compute(key).0.to_vec();
let rc4_key: GenericArray<u8, U16> = GenericArray::clone_from_slice(&md5_hash);
let mut rc4 = Rc4::new(&rc4_key);
rc4.apply_keystream(&mut binary_data);
}
binary_data
}
}

View File

@ -0,0 +1,219 @@
use std::io::Cursor;
use xml::writer::{EmitterConfig, XmlEvent};
use crate::handlers::handler::Handler;
pub struct GetServicesHandler {
module: String,
method: String,
}
impl GetServicesHandler {
pub fn new() -> Self {
GetServicesHandler {
module: "services".to_string(),
method: "get".to_string(),
}
}
pub fn create_core_services_element<'a>(
common_url: String,
listening_address: String,
) -> Vec<XmlEvent<'a>> {
let common_url = common_url.clone();
let core_services = [
"cardmng",
"facility",
"message",
"numbering",
"package",
"pcbevent",
"pcbtracker",
"pkglist",
"posevent",
"userdata",
"userid",
"eacoin",
"dlstatus",
"netlog",
"info",
"reference",
"sidmgr",
];
let mut services = Vec::new();
services.push(
XmlEvent::start_element("services")
.attr("expire", "3600")
.attr("method", "get")
.attr("mode", "operation")
.attr("status", "0")
.into(),
);
for service in core_services.iter() {
let service_url = format!("{}/{}", common_url, service);
// Push the start element with the service URL, without a temporary reference
services.push(
XmlEvent::start_element("item")
.attr("name", service)
.attr("url", Box::leak(service_url.into_boxed_str())) // Convert to &str at this point
.into(),
);
services.push(XmlEvent::end_element().into());
}
services.push(
XmlEvent::start_element("item")
.attr("name", "ntp")
.attr("url", "ntp://pool.ntp.org/")
.into(),
);
services.push(XmlEvent::end_element().into());
let keep_alive_url = format!(
"{}/keepalive?pa=127.0.0.1&ia=127.0.0.1&ga=127.0.0.1&ma=127.0.0.1&t1=2&t2=10",
listening_address
);
services.push(
XmlEvent::start_element("item")
.attr("name", "keepalive")
.attr("url", Box::leak(keep_alive_url.into_boxed_str()))
.into(),
);
services.push(XmlEvent::end_element().into());
services.push(XmlEvent::end_element().into()); // Close "services" element
services
}
fn add_kfc_services<'a>(
mut services: Vec<XmlEvent<'a>>,
common_url: &'a str,
) -> Vec<XmlEvent<'a>> {
let kfc_services = vec![
"local", "local2", "lobby", "slocal", "slocal2", "sglocal", "sglocal2", "lab",
"globby", "slobby", "sglobby",
];
for service in kfc_services {
services.push(
XmlEvent::start_element("item")
.attr("name", service)
.attr("url", common_url)
.into(),
);
services.push(XmlEvent::end_element().into());
}
services
}
fn add_mdx_services<'a>(
mut services: Vec<XmlEvent<'a>>,
common_url: &'a str,
) -> Vec<XmlEvent<'a>> {
let mdx_services = vec![
"local", "local2", "lobby", "slocal", "slocal2", "sglocal", "sglocal2", "lab",
"globby", "slobby", "sglobby",
];
for service in mdx_services {
services.push(
XmlEvent::start_element("item")
.attr("name", service)
.attr("url", common_url)
.into(),
);
services.push(XmlEvent::end_element().into());
}
services
}
fn add_m39_services<'a>(
mut services: Vec<XmlEvent<'a>>,
common_url: &'a str,
) -> Vec<XmlEvent<'a>> {
let m39_services = vec![
"local", "local2", "lobby", "slocal", "slocal2", "sglocal", "sglocal2", "lab",
"globby", "slobby", "sglobby",
];
for service in m39_services {
services.push(
XmlEvent::start_element("item")
.attr("name", service)
.attr("url", &common_url)
.into(),
);
services.push(XmlEvent::end_element().into());
}
services
}
fn add_m32_services<'a>(
mut services: Vec<XmlEvent<'a>>,
common_url: &'a str,
) -> Vec<XmlEvent<'a>> {
let m39_services = vec![
"local", "local2", "lobby", "slocal", "slocal2", "sglocal", "sglocal2", "lab",
"globby", "slobby", "sglobby",
];
for service in m39_services {
services.push(
XmlEvent::start_element("item")
.attr("name", service)
.attr("url", &common_url)
.into(),
);
services.push(XmlEvent::end_element().into());
}
services
}
}
#[async_trait]
impl Handler for GetServicesHandler {
fn module(&self) -> &str {
&self.module
}
fn method(&self) -> &str {
&self.method
}
async fn handle(&self, model: String, _body: String) -> String {
let common_url = "http://127.0.0.1:8000";
let listening_address = "http://127.0.0.1:8000";
let services = GetServicesHandler::create_core_services_element(
common_url.to_string(),
listening_address.to_string(),
);
let response = match model.split(':').next() {
Some("KFC") => GetServicesHandler::add_kfc_services(services, &common_url),
Some("MDX") => GetServicesHandler::add_mdx_services(services, &common_url),
Some("M39") => GetServicesHandler::add_m39_services(services, &common_url),
Some("M32") => GetServicesHandler::add_m32_services(services, &common_url),
_ => services,
};
// Create final XML response
let mut buffer = Cursor::new(Vec::new());
let mut writer = EmitterConfig::new()
.perform_indent(true)
.create_writer(&mut buffer);
writer.write(XmlEvent::start_element("response")).unwrap();
for element in response {
writer.write(element).unwrap();
}
writer.write(XmlEvent::end_element()).unwrap();
String::from_utf8(buffer.into_inner()).unwrap()
}
}

2
src/handlers/boot/mod.rs Normal file
View File

@ -0,0 +1,2 @@
pub mod get_services_handler;

View File

@ -0,0 +1,56 @@
use std::io::Cursor;
use crate::handlers::handler::Handler;
use chrono::Utc;
use xml::writer::{EmitterConfig, XmlEvent};
pub struct AlivePcbTrackerHandler {
module: String,
method: String,
}
impl AlivePcbTrackerHandler {
pub fn new() -> Self {
AlivePcbTrackerHandler {
module: "pcbtracker".to_string(),
method: "alive".to_string(),
}
}
}
#[async_trait]
impl Handler for AlivePcbTrackerHandler {
fn module(&self) -> &str {
&self.module
}
fn method(&self) -> &str {
&self.method
}
async fn handle(&self, _model: String, _body: String) -> String {
let mut buffer = Cursor::new(Vec::new());
let mut writer = EmitterConfig::new()
.perform_indent(true)
.create_writer(&mut buffer);
writer.write(XmlEvent::start_element("response")).unwrap();
let utc_now = Utc::now().timestamp().to_string();
let pcb_tracker = XmlEvent::start_element("pcbtracker")
.attr("status", "0")
.attr("expire", "1200")
.attr("ecenable", "0")
.attr("eclimit", "0")
.attr("limit", "0")
.attr("time", &utc_now);
writer.write(pcb_tracker).unwrap();
writer.write(XmlEvent::end_element()).unwrap();
writer.write(XmlEvent::end_element()).unwrap();
String::from_utf8(buffer.into_inner()).unwrap()
}
}

View File

@ -0,0 +1,2 @@
pub mod alive_pcb_tracker_handler;

View File

@ -0,0 +1,95 @@
use std::io::Cursor;
use std::sync::Arc;
use rocket::http::{ContentType, Header};
use rocket::tokio::io::AsyncReadExt;
use rocket::{Data, Request, Response};
use rocket::response::Responder;
use rocket::response::status::BadRequest;
use rocket::data::ToByteUnit;
use crate::generators::response_generator::ResponseGenerator;
use crate::parsers::request_parser::RequestParser;
use super::handler::Handler;
pub struct BinaryResponse {
body: Vec<u8>,
is_compressed: bool,
info: Option<String>,
}
impl<'r> Responder<'r, 'static> for BinaryResponse {
fn respond_to(self, _: &'r Request<'_>) -> rocket::response::Result<'static> {
let mut binding = Response::build();
let mut response = binding
.header(ContentType::new("application", "octet-stream"))
.sized_body(self.body.len(), Cursor::new(self.body));
if self.is_compressed {
response = response.header(Header::new("x-compress", "lz77"));
}
if let Some(info) = self.info {
response = response.header(Header::new("x-eamuse-info", info));
}
response.ok()
}
}
pub async fn handle_e_amuse_request(model: &str, module: &str, method: &str, data: Data<'_>,
is_compressed: bool, info: String, handlers: Vec<Arc<dyn Handler>>) -> Result<BinaryResponse, BadRequest<String>> {
let mut buffer = Vec::new();
if let Err(e) = data.open(256.kibibytes()).read_to_end(&mut buffer).await {
eprintln!("Failed to read data: {}", e);
return Err(BadRequest(e.to_string()));
}
let body_xml = RequestParser::parse_request(buffer, is_compressed, info.clone());
if body_xml.0.is_none() {
return Err(BadRequest("Could not parse body".to_string()));
}
let nodes = body_xml.0.unwrap();
let body_bytes = match kbinxml::to_text_xml(&nodes) {
Ok(result) => result,
Err(e) => {
eprint!("Could not convert to string {}", e);
return Err(BadRequest("Could not parse body".to_string()));
},
};
let xml_string = match String::from_utf8(body_bytes) {
Ok(result) => result,
Err(e) => {
eprint!("Could not convert to string {}", e);
return Err(BadRequest("Could not parse body".to_string()));
}
};
// Print the values of model, module, and method
println!("Model: {}, Module: {}, Method: {}", model, module, method);
let mut response_xml = String::new();
for handler in handlers.iter() {
if handler.module() == module && handler.method() == method {
let model = model.to_string();
let xml_string = xml_string.clone();
response_xml = handler.handle(model, xml_string).await;
}
}
let response = ResponseGenerator::generate_response(response_xml.into(), is_compressed, info.clone());
// Return the binary data wrapped in BinaryResponse
Ok(BinaryResponse {
body: response,
is_compressed,
info: Some(info)
})
}

8
src/handlers/handler.rs Normal file
View File

@ -0,0 +1,8 @@
use std::{future::Future, sync::Arc};
#[async_trait]
pub trait Handler: Send + Sync {
fn module(&self) -> &str;
fn method(&self) -> &str;
async fn handle(&self,model: String, body: String) -> String;
}

4
src/handlers/mod.rs Normal file
View File

@ -0,0 +1,4 @@
pub mod handler;
pub mod boot;
pub mod common;
pub mod core_e_amuse_request_handler;

45
src/main.rs Normal file
View File

@ -0,0 +1,45 @@
use std::sync::Arc;
mod parsers;
mod generators;
mod handlers;
mod routes;
use handlers::boot::get_services_handler::GetServicesHandler;
use handlers::common::alive_pcb_tracker_handler::AlivePcbTrackerHandler;
use handlers::handler::Handler;
use rocket::fs::{relative, FileServer, NamedFile};
use routes::ea::core_route::handle_nostalgia_request;
use routes::ea::core_route::handle_query_request;
use routes::ea::core_route::handle_slash_request;
#[macro_use] extern crate lazy_static;
#[macro_use] extern crate rocket;
#[get("/")]
async fn index() -> Option<NamedFile> {
NamedFile::open("static/index.html").await.ok()
}
fn register_handlers() -> Vec<Arc<dyn Handler>> {
let mut handlers: Vec<Arc<dyn Handler>> = Vec::new();
let get_services_handler = Arc::new(GetServicesHandler::new());
let alive_pcb_tracker_handler = Arc::new(AlivePcbTrackerHandler::new());
handlers.push(get_services_handler);
handlers.push(alive_pcb_tracker_handler);
handlers
}
#[launch]
fn rocket() -> _ {
let handlers = register_handlers();
rocket::build()
.manage(handlers)
.mount("/", routes![index, handle_query_request, handle_slash_request, handle_slash_request, handle_nostalgia_request])
.mount("/", FileServer::from(relative!("static")))
}

View File

@ -0,0 +1,47 @@
use std::convert::Infallible;
use rocket::{request::{FromRequest, Outcome}, Request};
pub struct EAMuseHeaders {
pub is_compressed: bool,
pub info: String
}
#[rocket::async_trait]
impl<'r> FromRequest<'r> for EAMuseHeaders {
type Error = Infallible;
async fn from_request(request: &'r Request<'_>) -> Outcome<Self, Self::Error> {
// Extract headers from the request
let headers = request.headers();
for header in headers.iter() {
let key = header.name();
let value = header.value().to_string();
println!("Header: {} = {}", key, value);
}
// Example header keys
let is_compressed_header = headers.get_one("x-compress");
let info_header = headers.get_one("x-eamuse-info");
println!("x-compress header: {:?}", is_compressed_header);
println!("x-eamuse-info header: {:?}", info_header);
// Parse the `is_compressed` header (if it exists and is "true")
let is_compressed = matches!(is_compressed_header, Some(value) if value == "true");
// Get the `info` header, or set a default if it's not found
let info = info_header.unwrap_or("default_info").to_string();
// Construct the EAMuseHeaders struct
let eamuse_headers = EAMuseHeaders {
is_compressed,
info,
};
// Return the constructed struct wrapped in Outcome::Success
Outcome::Success(eamuse_headers)
}
}

3
src/parsers/mod.rs Normal file
View File

@ -0,0 +1,3 @@
pub mod request_parser;
pub mod header_parser;

View File

@ -0,0 +1,74 @@
use std::io::Cursor;
use kbinxml::{EncodingType, NodeCollection};
use rc4::cipher::generic_array::GenericArray;
use rc4::{consts::*, KeyInit, StreamCipher};
use rc4::Rc4;
lazy_static! {
static ref KEY: Vec<u8> = {
"00000000000069D74627D985EE2187161570D08D93B12455035B6DF0D8205DF5"
.chars()
.collect::<Vec<char>>()
.chunks(2)
.map(|chunk| u8::from_str_radix(&chunk.iter().collect::<String>(), 16).unwrap())
.collect()
};
}
pub struct RequestParser {
}
impl RequestParser {
pub fn parse_request(mut buffer: Vec<u8>, is_compressed: bool, info: String) -> (Option<NodeCollection>, EncodingType) {
if info != "" {
let mut key = KEY.clone();
let info_parts = info.split('-').collect::<Vec<&str>>();
if info_parts.len() < 2 {
eprintln!("Wrong eamuse info",);
return (None, EncodingType::None);
}
let combined = format!("{}{}", info_parts[1], info_parts[2]);
for i in 0..6 {
// Extract a 2-character substring from the combined string
let hex_str = &combined[i * 2..i * 2 + 2];
// Convert the 2-character hexadecimal substring to a byte
key[i] = u8::from_str_radix(hex_str, 16).expect("Invalid hex string");
}
let md5_hash = md5::compute(key).0.to_vec();
let rc4_key: GenericArray<u8, U16> = GenericArray::clone_from_slice(&md5_hash);
let mut rc4 = Rc4::new(&rc4_key);
rc4.apply_keystream(&mut buffer)
}
if is_compressed {
let uncompress_result = lz77::decompress(Cursor::new(buffer));
match uncompress_result {
Ok(result) =>
buffer = result,
Err(e) => {
eprintln!("Error decompressing body {}", e);
return (None, EncodingType::None);
},
}
}
let result = kbinxml::from_binary(buffer.into());
match result {
Ok(result) => (Some(result.0), result.1),
Err(e) => {
eprintln!("Error parsing xml {}", e);
(None, EncodingType::None)
},
}
}
}

View File

@ -0,0 +1,38 @@
use std::sync::Arc;
use rocket::response::status::BadRequest;
use rocket::data::Data;
use rocket::State;
use crate::{handlers::{core_e_amuse_request_handler::{handle_e_amuse_request, BinaryResponse}, handler::Handler}, parsers::header_parser::EAMuseHeaders};
#[post("/<model>/<module>/<method>", data = "<data>")]
pub async fn handle_slash_request(model: &str, module: &str, method: &str, data: Data<'_>,
e_amuse_headers: EAMuseHeaders, handlers: &State<Vec<Arc<dyn Handler>>>) -> Result<BinaryResponse, BadRequest<String>> {
let is_compressed = e_amuse_headers.is_compressed;
let info = e_amuse_headers.info;
handle_e_amuse_request(model, module, method, data, is_compressed, info, handlers.to_vec()).await
}
#[post("/?<model>&<module>&<method>", data = "<data>")]
pub async fn handle_query_request(model: &str, module: &str, method: &str, data: Data<'_>,
e_amuse_headers: EAMuseHeaders, handlers: &State<Vec<Arc<dyn Handler>>>) -> Result<BinaryResponse, BadRequest<String>> {
let is_compressed = e_amuse_headers.is_compressed;
let info = e_amuse_headers.info;
handle_e_amuse_request(model, module, method, data, is_compressed, info, handlers.to_vec()).await
}
// TODO weird nostalgia request url
#[post("/<model>?<f>", data = "<data>")]
pub async fn handle_nostalgia_request(model: &str, f: &str, data: Data<'_>,
e_amuse_headers: EAMuseHeaders, handlers: &State<Vec<Arc<dyn Handler>>>) -> Result<BinaryResponse, BadRequest<String>> {
let is_compressed = e_amuse_headers.is_compressed;
let info = e_amuse_headers.info;
let f_splt = f.split('.').collect::<Vec<&str>>();
let module = f_splt[0];
let service = f_splt[1];
handle_e_amuse_request(model, module, service, data, is_compressed, info, handlers.to_vec()).await
}

2
src/routes/ea/mod.rs Normal file
View File

@ -0,0 +1,2 @@
pub mod core_route;

2
src/routes/mod.rs Normal file
View File

@ -0,0 +1,2 @@
pub mod ea;

15
web/.eslintrc.cjs Normal file
View File

@ -0,0 +1,15 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
}
}

30
web/.gitignore vendored Normal file
View File

@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
*.tsbuildinfo

8
web/.prettierrc.json Normal file
View File

@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}

7
web/.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"recommendations": [
"Vue.volar",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}

39
web/README.md Normal file
View File

@ -0,0 +1,39 @@
# medusa-web
This template should help get you started developing with Vue 3 in Vite.
## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
## Type Support for `.vue` Imports in TS
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
## Customize configuration
See [Vite Configuration Reference](https://vitejs.dev/config/).
## Project Setup
```sh
bun install
```
### Compile and Hot-Reload for Development
```sh
bun dev
```
### Type-Check, Compile and Minify for Production
```sh
bun build
```
### Lint with [ESLint](https://eslint.org/)
```sh
bun lint
```

BIN
web/bun.lockb Normal file

Binary file not shown.

1
web/env.d.ts vendored Normal file
View File

@ -0,0 +1 @@
/// <reference types="vite/client" />

13
web/index.html Normal file
View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

37
web/package.json Normal file
View File

@ -0,0 +1,37 @@
{
"name": "medusa-web",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --build --force",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"format": "prettier --write src/"
},
"dependencies": {
"pinia": "^2.1.7",
"vue": "^3.4.29",
"vue-router": "^4.3.3"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.8.0",
"@tsconfig/node20": "^20.1.4",
"@types/node": "^20.14.5",
"@vitejs/plugin-vue": "^5.0.5",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/tsconfig": "^0.5.1",
"eslint": "^8.57.0",
"eslint-plugin-vue": "^9.23.0",
"npm-run-all2": "^6.2.0",
"prettier": "^3.2.5",
"typescript": "~5.4.0",
"vite": "^5.3.1",
"vite-plugin-vue-devtools": "^7.3.1",
"vue-tsc": "^2.0.21"
}
}

BIN
web/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

85
web/src/App.vue Normal file
View File

@ -0,0 +1,85 @@
<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
</script>
<template>
<header>
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
<div class="wrapper">
<HelloWorld msg="You did it!" />
<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
</nav>
</div>
</header>
<RouterView />
</template>
<style scoped>
header {
line-height: 1.5;
max-height: 100vh;
}
.logo {
display: block;
margin: 0 auto 2rem;
}
nav {
width: 100%;
font-size: 12px;
text-align: center;
margin-top: 2rem;
}
nav a.router-link-exact-active {
color: var(--color-text);
}
nav a.router-link-exact-active:hover {
background-color: transparent;
}
nav a {
display: inline-block;
padding: 0 1rem;
border-left: 1px solid var(--color-border);
}
nav a:first-of-type {
border: 0;
}
@media (min-width: 1024px) {
header {
display: flex;
place-items: center;
padding-right: calc(var(--section-gap) / 2);
}
.logo {
margin: 0 2rem 0 0;
}
header .wrapper {
display: flex;
place-items: flex-start;
flex-wrap: wrap;
}
nav {
text-align: left;
margin-left: -1rem;
font-size: 1rem;
padding: 1rem 0;
margin-top: 1rem;
}
}
</style>

86
web/src/assets/base.css Normal file
View File

@ -0,0 +1,86 @@
/* color palette from <https://github.com/vuejs/theme> */
:root {
--vt-c-white: #ffffff;
--vt-c-white-soft: #f8f8f8;
--vt-c-white-mute: #f2f2f2;
--vt-c-black: #181818;
--vt-c-black-soft: #222222;
--vt-c-black-mute: #282828;
--vt-c-indigo: #2c3e50;
--vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
--vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
--vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
--vt-c-text-light-1: var(--vt-c-indigo);
--vt-c-text-light-2: rgba(60, 60, 60, 0.66);
--vt-c-text-dark-1: var(--vt-c-white);
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
}
/* semantic color variables for this project */
:root {
--color-background: var(--vt-c-white);
--color-background-soft: var(--vt-c-white-soft);
--color-background-mute: var(--vt-c-white-mute);
--color-border: var(--vt-c-divider-light-2);
--color-border-hover: var(--vt-c-divider-light-1);
--color-heading: var(--vt-c-text-light-1);
--color-text: var(--vt-c-text-light-1);
--section-gap: 160px;
}
@media (prefers-color-scheme: dark) {
:root {
--color-background: var(--vt-c-black);
--color-background-soft: var(--vt-c-black-soft);
--color-background-mute: var(--vt-c-black-mute);
--color-border: var(--vt-c-divider-dark-2);
--color-border-hover: var(--vt-c-divider-dark-1);
--color-heading: var(--vt-c-text-dark-1);
--color-text: var(--vt-c-text-dark-2);
}
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
font-weight: normal;
}
body {
min-height: 100vh;
color: var(--color-text);
background: var(--color-background);
transition:
color 0.5s,
background-color 0.5s;
line-height: 1.6;
font-family:
Inter,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Oxygen,
Ubuntu,
Cantarell,
'Fira Sans',
'Droid Sans',
'Helvetica Neue',
sans-serif;
font-size: 15px;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

1
web/src/assets/logo.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>

After

Width:  |  Height:  |  Size: 276 B

35
web/src/assets/main.css Normal file
View File

@ -0,0 +1,35 @@
@import './base.css';
#app {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
font-weight: normal;
}
a,
.green {
text-decoration: none;
color: hsla(160, 100%, 37%, 1);
transition: 0.4s;
padding: 3px;
}
@media (hover: hover) {
a:hover {
background-color: hsla(160, 100%, 37%, 0.2);
}
}
@media (min-width: 1024px) {
body {
display: flex;
place-items: center;
}
#app {
display: grid;
grid-template-columns: 1fr 1fr;
padding: 0 2rem;
}
}

View File

@ -0,0 +1,41 @@
<script setup lang="ts">
defineProps<{
msg: string
}>()
</script>
<template>
<div class="greetings">
<h1 class="green">{{ msg }}</h1>
<h3>
Youve successfully created a project with
<a href="https://vitejs.dev/" target="_blank" rel="noopener">Vite</a> +
<a href="https://vuejs.org/" target="_blank" rel="noopener">Vue 3</a>. What's next?
</h3>
</div>
</template>
<style scoped>
h1 {
font-weight: 500;
font-size: 2.6rem;
position: relative;
top: -10px;
}
h3 {
font-size: 1.2rem;
}
.greetings h1,
.greetings h3 {
text-align: center;
}
@media (min-width: 1024px) {
.greetings h1,
.greetings h3 {
text-align: left;
}
}
</style>

View File

@ -0,0 +1,88 @@
<script setup lang="ts">
import WelcomeItem from './WelcomeItem.vue'
import DocumentationIcon from './icons/IconDocumentation.vue'
import ToolingIcon from './icons/IconTooling.vue'
import EcosystemIcon from './icons/IconEcosystem.vue'
import CommunityIcon from './icons/IconCommunity.vue'
import SupportIcon from './icons/IconSupport.vue'
</script>
<template>
<WelcomeItem>
<template #icon>
<DocumentationIcon />
</template>
<template #heading>Documentation</template>
Vues
<a href="https://vuejs.org/" target="_blank" rel="noopener">official documentation</a>
provides you with all information you need to get started.
</WelcomeItem>
<WelcomeItem>
<template #icon>
<ToolingIcon />
</template>
<template #heading>Tooling</template>
This project is served and bundled with
<a href="https://vitejs.dev/guide/features.html" target="_blank" rel="noopener">Vite</a>. The
recommended IDE setup is
<a href="https://code.visualstudio.com/" target="_blank" rel="noopener">VSCode</a> +
<a href="https://github.com/johnsoncodehk/volar" target="_blank" rel="noopener">Volar</a>. If
you need to test your components and web pages, check out
<a href="https://www.cypress.io/" target="_blank" rel="noopener">Cypress</a> and
<a href="https://on.cypress.io/component" target="_blank" rel="noopener"
>Cypress Component Testing</a
>.
<br />
More instructions are available in <code>README.md</code>.
</WelcomeItem>
<WelcomeItem>
<template #icon>
<EcosystemIcon />
</template>
<template #heading>Ecosystem</template>
Get official tools and libraries for your project:
<a href="https://pinia.vuejs.org/" target="_blank" rel="noopener">Pinia</a>,
<a href="https://router.vuejs.org/" target="_blank" rel="noopener">Vue Router</a>,
<a href="https://test-utils.vuejs.org/" target="_blank" rel="noopener">Vue Test Utils</a>, and
<a href="https://github.com/vuejs/devtools" target="_blank" rel="noopener">Vue Dev Tools</a>. If
you need more resources, we suggest paying
<a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">Awesome Vue</a>
a visit.
</WelcomeItem>
<WelcomeItem>
<template #icon>
<CommunityIcon />
</template>
<template #heading>Community</template>
Got stuck? Ask your question on
<a href="https://chat.vuejs.org" target="_blank" rel="noopener">Vue Land</a>, our official
Discord server, or
<a href="https://stackoverflow.com/questions/tagged/vue.js" target="_blank" rel="noopener"
>StackOverflow</a
>. You should also subscribe to
<a href="https://news.vuejs.org" target="_blank" rel="noopener">our mailing list</a> and follow
the official
<a href="https://twitter.com/vuejs" target="_blank" rel="noopener">@vuejs</a>
twitter account for latest news in the Vue world.
</WelcomeItem>
<WelcomeItem>
<template #icon>
<SupportIcon />
</template>
<template #heading>Support Vue</template>
As an independent project, Vue relies on community backing for its sustainability. You can help
us by
<a href="https://vuejs.org/sponsor/" target="_blank" rel="noopener">becoming a sponsor</a>.
</WelcomeItem>
</template>

View File

@ -0,0 +1,87 @@
<template>
<div class="item">
<i>
<slot name="icon"></slot>
</i>
<div class="details">
<h3>
<slot name="heading"></slot>
</h3>
<slot></slot>
</div>
</div>
</template>
<style scoped>
.item {
margin-top: 2rem;
display: flex;
position: relative;
}
.details {
flex: 1;
margin-left: 1rem;
}
i {
display: flex;
place-items: center;
place-content: center;
width: 32px;
height: 32px;
color: var(--color-text);
}
h3 {
font-size: 1.2rem;
font-weight: 500;
margin-bottom: 0.4rem;
color: var(--color-heading);
}
@media (min-width: 1024px) {
.item {
margin-top: 0;
padding: 0.4rem 0 1rem calc(var(--section-gap) / 2);
}
i {
top: calc(50% - 25px);
left: -26px;
position: absolute;
border: 1px solid var(--color-border);
background: var(--color-background);
border-radius: 8px;
width: 50px;
height: 50px;
}
.item:before {
content: ' ';
border-left: 1px solid var(--color-border);
position: absolute;
left: 0;
bottom: calc(50% + 25px);
height: calc(50% - 25px);
}
.item:after {
content: ' ';
border-left: 1px solid var(--color-border);
position: absolute;
left: 0;
top: calc(50% + 25px);
height: calc(50% - 25px);
}
.item:first-of-type:before {
display: none;
}
.item:last-of-type:after {
display: none;
}
}
</style>

View File

@ -0,0 +1,7 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
<path
d="M15 4a1 1 0 1 0 0 2V4zm0 11v-1a1 1 0 0 0-1 1h1zm0 4l-.707.707A1 1 0 0 0 16 19h-1zm-4-4l.707-.707A1 1 0 0 0 11 14v1zm-4.707-1.293a1 1 0 0 0-1.414 1.414l1.414-1.414zm-.707.707l-.707-.707.707.707zM9 11v-1a1 1 0 0 0-.707.293L9 11zm-4 0h1a1 1 0 0 0-1-1v1zm0 4H4a1 1 0 0 0 1.707.707L5 15zm10-9h2V4h-2v2zm2 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2zm1 1v6h2V7h-2zm0 6a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2zm-1 1h-2v2h2v-2zm-3 1v4h2v-4h-2zm1.707 3.293l-4-4-1.414 1.414 4 4 1.414-1.414zM11 14H7v2h4v-2zm-4 0c-.276 0-.525-.111-.707-.293l-1.414 1.414C5.42 15.663 6.172 16 7 16v-2zm-.707 1.121l3.414-3.414-1.414-1.414-3.414 3.414 1.414 1.414zM9 12h4v-2H9v2zm4 0a3 3 0 0 0 3-3h-2a1 1 0 0 1-1 1v2zm3-3V3h-2v6h2zm0-6a3 3 0 0 0-3-3v2a1 1 0 0 1 1 1h2zm-3-3H3v2h10V0zM3 0a3 3 0 0 0-3 3h2a1 1 0 0 1 1-1V0zM0 3v6h2V3H0zm0 6a3 3 0 0 0 3 3v-2a1 1 0 0 1-1-1H0zm3 3h2v-2H3v2zm1-1v4h2v-4H4zm1.707 4.707l.586-.586-1.414-1.414-.586.586 1.414 1.414z"
/>
</svg>
</template>

View File

@ -0,0 +1,7 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" fill="currentColor">
<path
d="M11 2.253a1 1 0 1 0-2 0h2zm-2 13a1 1 0 1 0 2 0H9zm.447-12.167a1 1 0 1 0 1.107-1.666L9.447 3.086zM1 2.253L.447 1.42A1 1 0 0 0 0 2.253h1zm0 13H0a1 1 0 0 0 1.553.833L1 15.253zm8.447.833a1 1 0 1 0 1.107-1.666l-1.107 1.666zm0-14.666a1 1 0 1 0 1.107 1.666L9.447 1.42zM19 2.253h1a1 1 0 0 0-.447-.833L19 2.253zm0 13l-.553.833A1 1 0 0 0 20 15.253h-1zm-9.553-.833a1 1 0 1 0 1.107 1.666L9.447 14.42zM9 2.253v13h2v-13H9zm1.553-.833C9.203.523 7.42 0 5.5 0v2c1.572 0 2.961.431 3.947 1.086l1.107-1.666zM5.5 0C3.58 0 1.797.523.447 1.42l1.107 1.666C2.539 2.431 3.928 2 5.5 2V0zM0 2.253v13h2v-13H0zm1.553 13.833C2.539 15.431 3.928 15 5.5 15v-2c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM5.5 15c1.572 0 2.961.431 3.947 1.086l1.107-1.666C9.203 13.523 7.42 13 5.5 13v2zm5.053-11.914C11.539 2.431 12.928 2 14.5 2V0c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM14.5 2c1.573 0 2.961.431 3.947 1.086l1.107-1.666C18.203.523 16.421 0 14.5 0v2zm3.5.253v13h2v-13h-2zm1.553 12.167C18.203 13.523 16.421 13 14.5 13v2c1.573 0 2.961.431 3.947 1.086l1.107-1.666zM14.5 13c-1.92 0-3.703.523-5.053 1.42l1.107 1.666C11.539 15.431 12.928 15 14.5 15v-2z"
/>
</svg>
</template>

View File

@ -0,0 +1,7 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" fill="currentColor">
<path
d="M11.447 8.894a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm0 1.789a1 1 0 1 0 .894-1.789l-.894 1.789zM7.447 7.106a1 1 0 1 0-.894 1.789l.894-1.789zM10 9a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0H8zm9.447-5.606a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm2 .789a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zM18 5a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0h-2zm-5.447-4.606a1 1 0 1 0 .894-1.789l-.894 1.789zM9 1l.447-.894a1 1 0 0 0-.894 0L9 1zm-2.447.106a1 1 0 1 0 .894 1.789l-.894-1.789zm-6 3a1 1 0 1 0 .894 1.789L.553 4.106zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zm-2-.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 2.789a1 1 0 1 0 .894-1.789l-.894 1.789zM2 5a1 1 0 1 0-2 0h2zM0 7.5a1 1 0 1 0 2 0H0zm8.553 12.394a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 1a1 1 0 1 0 .894 1.789l-.894-1.789zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zM8 19a1 1 0 1 0 2 0H8zm2-2.5a1 1 0 1 0-2 0h2zm-7.447.394a1 1 0 1 0 .894-1.789l-.894 1.789zM1 15H0a1 1 0 0 0 .553.894L1 15zm1-2.5a1 1 0 1 0-2 0h2zm12.553 2.606a1 1 0 1 0 .894 1.789l-.894-1.789zM17 15l.447.894A1 1 0 0 0 18 15h-1zm1-2.5a1 1 0 1 0-2 0h2zm-7.447-5.394l-2 1 .894 1.789 2-1-.894-1.789zm-1.106 1l-2-1-.894 1.789 2 1 .894-1.789zM8 9v2.5h2V9H8zm8.553-4.894l-2 1 .894 1.789 2-1-.894-1.789zm.894 0l-2-1-.894 1.789 2 1 .894-1.789zM16 5v2.5h2V5h-2zm-4.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zm-2.894-1l-2 1 .894 1.789 2-1L8.553.106zM1.447 5.894l2-1-.894-1.789-2 1 .894 1.789zm-.894 0l2 1 .894-1.789-2-1-.894 1.789zM0 5v2.5h2V5H0zm9.447 13.106l-2-1-.894 1.789 2 1 .894-1.789zm0 1.789l2-1-.894-1.789-2 1 .894 1.789zM10 19v-2.5H8V19h2zm-6.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zM2 15v-2.5H0V15h2zm13.447 1.894l2-1-.894-1.789-2 1 .894 1.789zM18 15v-2.5h-2V15h2z"
/>
</svg>
</template>

View File

@ -0,0 +1,7 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
<path
d="M10 3.22l-.61-.6a5.5 5.5 0 0 0-7.666.105 5.5 5.5 0 0 0-.114 7.665L10 18.78l8.39-8.4a5.5 5.5 0 0 0-.114-7.665 5.5 5.5 0 0 0-7.666-.105l-.61.61z"
/>
</svg>
</template>

View File

@ -0,0 +1,19 @@
<!-- This icon is from <https://github.com/Templarian/MaterialDesign>, distributed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) license-->
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
role="img"
class="iconify iconify--mdi"
width="24"
height="24"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 24 24"
>
<path
d="M20 18v-4h-3v1h-2v-1H9v1H7v-1H4v4h16M6.33 8l-1.74 4H7v-1h2v1h6v-1h2v1h2.41l-1.74-4H6.33M9 5v1h6V5H9m12.84 7.61c.1.22.16.48.16.8V18c0 .53-.21 1-.6 1.41c-.4.4-.85.59-1.4.59H4c-.55 0-1-.19-1.4-.59C2.21 19 2 18.53 2 18v-4.59c0-.32.06-.58.16-.8L4.5 7.22C4.84 6.41 5.45 6 6.33 6H7V5c0-.55.18-1 .57-1.41C7.96 3.2 8.44 3 9 3h6c.56 0 1.04.2 1.43.59c.39.41.57.86.57 1.41v1h.67c.88 0 1.49.41 1.83 1.22l2.34 5.39z"
fill="currentColor"
></path>
</svg>
</template>

14
web/src/main.ts Normal file
View File

@ -0,0 +1,14 @@
import './assets/main.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.mount('#app')

23
web/src/router/index.ts Normal file
View File

@ -0,0 +1,23 @@
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: HomeView
},
{
path: '/about',
name: 'about',
// route level code-splitting
// this generates a separate chunk (About.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import('../views/AboutView.vue')
}
]
})
export default router

12
web/src/stores/counter.ts Normal file
View File

@ -0,0 +1,12 @@
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', () => {
const count = ref(0)
const doubleCount = computed(() => count.value * 2)
function increment() {
count.value++
}
return { count, doubleCount, increment }
})

View File

@ -0,0 +1,15 @@
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
</template>
<style>
@media (min-width: 1024px) {
.about {
min-height: 100vh;
display: flex;
align-items: center;
}
}
</style>

View File

@ -0,0 +1,9 @@
<script setup lang="ts">
import TheWelcome from '../components/TheWelcome.vue'
</script>
<template>
<main>
<TheWelcome />
</main>
</template>

14
web/tsconfig.app.json Normal file
View File

@ -0,0 +1,14 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}

11
web/tsconfig.json Normal file
View File

@ -0,0 +1,11 @@
{
"files": [],
"references": [
{
"path": "./tsconfig.node.json"
},
{
"path": "./tsconfig.app.json"
}
]
}

19
web/tsconfig.node.json Normal file
View File

@ -0,0 +1,19 @@
{
"extends": "@tsconfig/node20/tsconfig.json",
"include": [
"vite.config.*",
"vitest.config.*",
"cypress.config.*",
"nightwatch.conf.*",
"playwright.config.*"
],
"compilerOptions": {
"composite": true,
"noEmit": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"]
}
}

18
web/vite.config.ts Normal file
View File

@ -0,0 +1,18 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
vueDevTools(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})

View File

@ -0,0 +1,21 @@
// vite.config.ts
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "file:///C:/Projects/rust/medusa/web/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Projects/rust/medusa/web/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueDevTools from "file:///C:/Projects/rust/medusa/web/node_modules/vite-plugin-vue-devtools/dist/vite.mjs";
var __vite_injected_original_import_meta_url = "file:///C:/Projects/rust/medusa/web/vite.config.ts";
var vite_config_default = defineConfig({
plugins: [
vue(),
vueDevTools()
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
}
}
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxQcm9qZWN0c1xcXFxydXN0XFxcXG1lZHVzYVxcXFx3ZWJcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkM6XFxcXFByb2plY3RzXFxcXHJ1c3RcXFxcbWVkdXNhXFxcXHdlYlxcXFx2aXRlLmNvbmZpZy50c1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vQzovUHJvamVjdHMvcnVzdC9tZWR1c2Evd2ViL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZmlsZVVSTFRvUGF0aCwgVVJMIH0gZnJvbSAnbm9kZTp1cmwnXHJcblxyXG5pbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tICd2aXRlJ1xyXG5pbXBvcnQgdnVlIGZyb20gJ0B2aXRlanMvcGx1Z2luLXZ1ZSdcclxuaW1wb3J0IHZ1ZURldlRvb2xzIGZyb20gJ3ZpdGUtcGx1Z2luLXZ1ZS1kZXZ0b29scydcclxuXHJcbi8vIGh0dHBzOi8vdml0ZWpzLmRldi9jb25maWcvXHJcbmV4cG9ydCBkZWZhdWx0IGRlZmluZUNvbmZpZyh7XHJcbiAgcGx1Z2luczogW1xyXG4gICAgdnVlKCksXHJcbiAgICB2dWVEZXZUb29scygpLFxyXG4gIF0sXHJcbiAgcmVzb2x2ZToge1xyXG4gICAgYWxpYXM6IHtcclxuICAgICAgJ0AnOiBmaWxlVVJMVG9QYXRoKG5ldyBVUkwoJy4vc3JjJywgaW1wb3J0Lm1ldGEudXJsKSlcclxuICAgIH1cclxuICB9XHJcbn0pXHJcbiJdLAogICJtYXBwaW5ncyI6ICI7QUFBNlEsU0FBUyxlQUFlLFdBQVc7QUFFaFQsU0FBUyxvQkFBb0I7QUFDN0IsT0FBTyxTQUFTO0FBQ2hCLE9BQU8saUJBQWlCO0FBSitJLElBQU0sMkNBQTJDO0FBT3hOLElBQU8sc0JBQVEsYUFBYTtBQUFBLEVBQzFCLFNBQVM7QUFBQSxJQUNQLElBQUk7QUFBQSxJQUNKLFlBQVk7QUFBQSxFQUNkO0FBQUEsRUFDQSxTQUFTO0FBQUEsSUFDUCxPQUFPO0FBQUEsTUFDTCxLQUFLLGNBQWMsSUFBSSxJQUFJLFNBQVMsd0NBQWUsQ0FBQztBQUFBLElBQ3REO0FBQUEsRUFDRjtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg==

View File

@ -0,0 +1,21 @@
// vite.config.ts
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "file:///C:/Projects/rust/medusa/web/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Projects/rust/medusa/web/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueDevTools from "file:///C:/Projects/rust/medusa/web/node_modules/vite-plugin-vue-devtools/dist/vite.mjs";
var __vite_injected_original_import_meta_url = "file:///C:/Projects/rust/medusa/web/vite.config.ts";
var vite_config_default = defineConfig({
plugins: [
vue(),
vueDevTools()
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
}
}
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxQcm9qZWN0c1xcXFxydXN0XFxcXG1lZHVzYVxcXFx3ZWJcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkM6XFxcXFByb2plY3RzXFxcXHJ1c3RcXFxcbWVkdXNhXFxcXHdlYlxcXFx2aXRlLmNvbmZpZy50c1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vQzovUHJvamVjdHMvcnVzdC9tZWR1c2Evd2ViL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZmlsZVVSTFRvUGF0aCwgVVJMIH0gZnJvbSAnbm9kZTp1cmwnXHJcblxyXG5pbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tICd2aXRlJ1xyXG5pbXBvcnQgdnVlIGZyb20gJ0B2aXRlanMvcGx1Z2luLXZ1ZSdcclxuaW1wb3J0IHZ1ZURldlRvb2xzIGZyb20gJ3ZpdGUtcGx1Z2luLXZ1ZS1kZXZ0b29scydcclxuXHJcbi8vIGh0dHBzOi8vdml0ZWpzLmRldi9jb25maWcvXHJcbmV4cG9ydCBkZWZhdWx0IGRlZmluZUNvbmZpZyh7XHJcbiAgcGx1Z2luczogW1xyXG4gICAgdnVlKCksXHJcbiAgICB2dWVEZXZUb29scygpLFxyXG4gIF0sXHJcbiAgcmVzb2x2ZToge1xyXG4gICAgYWxpYXM6IHtcclxuICAgICAgJ0AnOiBmaWxlVVJMVG9QYXRoKG5ldyBVUkwoJy4vc3JjJywgaW1wb3J0Lm1ldGEudXJsKSlcclxuICAgIH1cclxuICB9XHJcbn0pXHJcbiJdLAogICJtYXBwaW5ncyI6ICI7QUFBNlEsU0FBUyxlQUFlLFdBQVc7QUFFaFQsU0FBUyxvQkFBb0I7QUFDN0IsT0FBTyxTQUFTO0FBQ2hCLE9BQU8saUJBQWlCO0FBSitJLElBQU0sMkNBQTJDO0FBT3hOLElBQU8sc0JBQVEsYUFBYTtBQUFBLEVBQzFCLFNBQVM7QUFBQSxJQUNQLElBQUk7QUFBQSxJQUNKLFlBQVk7QUFBQSxFQUNkO0FBQUEsRUFDQSxTQUFTO0FBQUEsSUFDUCxPQUFPO0FBQUEsTUFDTCxLQUFLLGNBQWMsSUFBSSxJQUFJLFNBQVMsd0NBQWUsQ0FBQztBQUFBLElBQ3REO0FBQUEsRUFDRjtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg==

View File

@ -0,0 +1,21 @@
// vite.config.ts
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "file:///C:/Projects/rust/medusa/web/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Projects/rust/medusa/web/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueDevTools from "file:///C:/Projects/rust/medusa/web/node_modules/vite-plugin-vue-devtools/dist/vite.mjs";
var __vite_injected_original_import_meta_url = "file:///C:/Projects/rust/medusa/web/vite.config.ts";
var vite_config_default = defineConfig({
plugins: [
vue(),
vueDevTools()
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
}
}
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxQcm9qZWN0c1xcXFxydXN0XFxcXG1lZHVzYVxcXFx3ZWJcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkM6XFxcXFByb2plY3RzXFxcXHJ1c3RcXFxcbWVkdXNhXFxcXHdlYlxcXFx2aXRlLmNvbmZpZy50c1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vQzovUHJvamVjdHMvcnVzdC9tZWR1c2Evd2ViL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZmlsZVVSTFRvUGF0aCwgVVJMIH0gZnJvbSAnbm9kZTp1cmwnXHJcblxyXG5pbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tICd2aXRlJ1xyXG5pbXBvcnQgdnVlIGZyb20gJ0B2aXRlanMvcGx1Z2luLXZ1ZSdcclxuaW1wb3J0IHZ1ZURldlRvb2xzIGZyb20gJ3ZpdGUtcGx1Z2luLXZ1ZS1kZXZ0b29scydcclxuXHJcbi8vIGh0dHBzOi8vdml0ZWpzLmRldi9jb25maWcvXHJcbmV4cG9ydCBkZWZhdWx0IGRlZmluZUNvbmZpZyh7XHJcbiAgcGx1Z2luczogW1xyXG4gICAgdnVlKCksXHJcbiAgICB2dWVEZXZUb29scygpLFxyXG4gIF0sXHJcbiAgcmVzb2x2ZToge1xyXG4gICAgYWxpYXM6IHtcclxuICAgICAgJ0AnOiBmaWxlVVJMVG9QYXRoKG5ldyBVUkwoJy4vc3JjJywgaW1wb3J0Lm1ldGEudXJsKSlcclxuICAgIH1cclxuICB9XHJcbn0pXHJcbiJdLAogICJtYXBwaW5ncyI6ICI7QUFBNlEsU0FBUyxlQUFlLFdBQVc7QUFFaFQsU0FBUyxvQkFBb0I7QUFDN0IsT0FBTyxTQUFTO0FBQ2hCLE9BQU8saUJBQWlCO0FBSitJLElBQU0sMkNBQTJDO0FBT3hOLElBQU8sc0JBQVEsYUFBYTtBQUFBLEVBQzFCLFNBQVM7QUFBQSxJQUNQLElBQUk7QUFBQSxJQUNKLFlBQVk7QUFBQSxFQUNkO0FBQUEsRUFDQSxTQUFTO0FBQUEsSUFDUCxPQUFPO0FBQUEsTUFDTCxLQUFLLGNBQWMsSUFBSSxJQUFJLFNBQVMsd0NBQWUsQ0FBQztBQUFBLElBQ3REO0FBQUEsRUFDRjtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg==

View File

@ -0,0 +1,21 @@
// vite.config.ts
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "file:///C:/Projects/rust/medusa/web/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Projects/rust/medusa/web/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueDevTools from "file:///C:/Projects/rust/medusa/web/node_modules/vite-plugin-vue-devtools/dist/vite.mjs";
var __vite_injected_original_import_meta_url = "file:///C:/Projects/rust/medusa/web/vite.config.ts";
var vite_config_default = defineConfig({
plugins: [
vue(),
vueDevTools()
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
}
}
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxQcm9qZWN0c1xcXFxydXN0XFxcXG1lZHVzYVxcXFx3ZWJcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkM6XFxcXFByb2plY3RzXFxcXHJ1c3RcXFxcbWVkdXNhXFxcXHdlYlxcXFx2aXRlLmNvbmZpZy50c1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vQzovUHJvamVjdHMvcnVzdC9tZWR1c2Evd2ViL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZmlsZVVSTFRvUGF0aCwgVVJMIH0gZnJvbSAnbm9kZTp1cmwnXHJcblxyXG5pbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tICd2aXRlJ1xyXG5pbXBvcnQgdnVlIGZyb20gJ0B2aXRlanMvcGx1Z2luLXZ1ZSdcclxuaW1wb3J0IHZ1ZURldlRvb2xzIGZyb20gJ3ZpdGUtcGx1Z2luLXZ1ZS1kZXZ0b29scydcclxuXHJcbi8vIGh0dHBzOi8vdml0ZWpzLmRldi9jb25maWcvXHJcbmV4cG9ydCBkZWZhdWx0IGRlZmluZUNvbmZpZyh7XHJcbiAgcGx1Z2luczogW1xyXG4gICAgdnVlKCksXHJcbiAgICB2dWVEZXZUb29scygpLFxyXG4gIF0sXHJcbiAgcmVzb2x2ZToge1xyXG4gICAgYWxpYXM6IHtcclxuICAgICAgJ0AnOiBmaWxlVVJMVG9QYXRoKG5ldyBVUkwoJy4vc3JjJywgaW1wb3J0Lm1ldGEudXJsKSlcclxuICAgIH1cclxuICB9XHJcbn0pXHJcbiJdLAogICJtYXBwaW5ncyI6ICI7QUFBNlEsU0FBUyxlQUFlLFdBQVc7QUFFaFQsU0FBUyxvQkFBb0I7QUFDN0IsT0FBTyxTQUFTO0FBQ2hCLE9BQU8saUJBQWlCO0FBSitJLElBQU0sMkNBQTJDO0FBT3hOLElBQU8sc0JBQVEsYUFBYTtBQUFBLEVBQzFCLFNBQVM7QUFBQSxJQUNQLElBQUk7QUFBQSxJQUNKLFlBQVk7QUFBQSxFQUNkO0FBQUEsRUFDQSxTQUFTO0FBQUEsSUFDUCxPQUFPO0FBQUEsTUFDTCxLQUFLLGNBQWMsSUFBSSxJQUFJLFNBQVMsd0NBQWUsQ0FBQztBQUFBLElBQ3REO0FBQUEsRUFDRjtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg==

View File

@ -0,0 +1,21 @@
// vite.config.ts
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "file:///C:/Projects/rust/medusa/web/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Projects/rust/medusa/web/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueDevTools from "file:///C:/Projects/rust/medusa/web/node_modules/vite-plugin-vue-devtools/dist/vite.mjs";
var __vite_injected_original_import_meta_url = "file:///C:/Projects/rust/medusa/web/vite.config.ts";
var vite_config_default = defineConfig({
plugins: [
vue(),
vueDevTools()
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
}
}
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxQcm9qZWN0c1xcXFxydXN0XFxcXG1lZHVzYVxcXFx3ZWJcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkM6XFxcXFByb2plY3RzXFxcXHJ1c3RcXFxcbWVkdXNhXFxcXHdlYlxcXFx2aXRlLmNvbmZpZy50c1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vQzovUHJvamVjdHMvcnVzdC9tZWR1c2Evd2ViL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZmlsZVVSTFRvUGF0aCwgVVJMIH0gZnJvbSAnbm9kZTp1cmwnXHJcblxyXG5pbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tICd2aXRlJ1xyXG5pbXBvcnQgdnVlIGZyb20gJ0B2aXRlanMvcGx1Z2luLXZ1ZSdcclxuaW1wb3J0IHZ1ZURldlRvb2xzIGZyb20gJ3ZpdGUtcGx1Z2luLXZ1ZS1kZXZ0b29scydcclxuXHJcbi8vIGh0dHBzOi8vdml0ZWpzLmRldi9jb25maWcvXHJcbmV4cG9ydCBkZWZhdWx0IGRlZmluZUNvbmZpZyh7XHJcbiAgcGx1Z2luczogW1xyXG4gICAgdnVlKCksXHJcbiAgICB2dWVEZXZUb29scygpLFxyXG4gIF0sXHJcbiAgcmVzb2x2ZToge1xyXG4gICAgYWxpYXM6IHtcclxuICAgICAgJ0AnOiBmaWxlVVJMVG9QYXRoKG5ldyBVUkwoJy4vc3JjJywgaW1wb3J0Lm1ldGEudXJsKSlcclxuICAgIH1cclxuICB9XHJcbn0pXHJcbiJdLAogICJtYXBwaW5ncyI6ICI7QUFBNlEsU0FBUyxlQUFlLFdBQVc7QUFFaFQsU0FBUyxvQkFBb0I7QUFDN0IsT0FBTyxTQUFTO0FBQ2hCLE9BQU8saUJBQWlCO0FBSitJLElBQU0sMkNBQTJDO0FBT3hOLElBQU8sc0JBQVEsYUFBYTtBQUFBLEVBQzFCLFNBQVM7QUFBQSxJQUNQLElBQUk7QUFBQSxJQUNKLFlBQVk7QUFBQSxFQUNkO0FBQUEsRUFDQSxTQUFTO0FBQUEsSUFDUCxPQUFPO0FBQUEsTUFDTCxLQUFLLGNBQWMsSUFBSSxJQUFJLFNBQVMsd0NBQWUsQ0FBQztBQUFBLElBQ3REO0FBQUEsRUFDRjtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg==