├── .editorconfig ├── .gitignore ├── .vscode └── settings.json ├── AGENTS.md ├── LICENSE ├── README.md ├── ai ├── .gitignore ├── bge_rag_train.py ├── gcp_distill.py ├── preload.py └── serve.py ├── backend ├── .cargo │ └── config.toml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── database │ └── .gitignore └── src │ ├── handlers.rs │ └── main.rs ├── frontend ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc ├── algorithm │ ├── search.ts │ ├── tree.ts │ ├── url.ts │ ├── util.ts │ └── wiki.ts ├── app │ ├── about │ │ ├── layout.tsx │ │ └── page.tsx │ ├── api │ │ ├── aiintro │ │ │ └── route.ts │ │ ├── hello │ │ │ └── route.ts │ │ └── wiki │ │ │ └── route.ts │ ├── blog │ │ ├── layout.tsx │ │ └── page.tsx │ ├── docs │ │ ├── [...slug] │ │ │ ├── metadata.ts │ │ │ └── page.tsx │ │ ├── layout.tsx │ │ ├── metadata.ts │ │ └── page.tsx │ ├── error.tsx │ ├── files │ │ ├── [...slug] │ │ │ └── page.tsx │ │ ├── layout.tsx │ │ └── page.tsx │ ├── layout.tsx │ ├── page.tsx │ ├── providers.tsx │ └── search │ │ ├── layout.tsx │ │ └── page.tsx ├── components │ ├── MasonryGrid.tsx │ ├── counter.tsx │ ├── docs │ │ ├── BlogHeader.tsx │ │ ├── Card.tsx │ │ ├── Navigation.tsx │ │ ├── SideTreeItem.tsx │ │ ├── Sidebar.tsx │ │ ├── SidebarContent.tsx │ │ └── TableOfContents.tsx │ ├── fileList.tsx │ ├── galgame-icons.tsx │ ├── gameIntro.tsx │ ├── icons.tsx │ ├── navbar.tsx │ ├── primitives.ts │ ├── returnButton.tsx │ ├── search │ │ ├── search-answer.tsx │ │ ├── search-intro.tsx │ │ └── search.tsx │ ├── sidebar.tsx │ └── theme-switch.tsx ├── config │ ├── fonts.ts │ ├── indexList.tsx │ ├── root.ts │ └── site.ts ├── constants │ └── doc.ts ├── eslint.config.js ├── hooks │ └── useResizeObserver.ts ├── i18n │ ├── en-us.ts │ ├── index.ts │ ├── zh-cn.ts │ └── zh-tw.ts ├── lib │ └── mdx │ │ ├── CustomMDX.tsx │ │ ├── directoryTree.ts │ │ ├── element │ │ ├── KunCode.tsx │ │ ├── KunLink.tsx │ │ ├── KunTable.tsx │ │ └── kunHeading.ts │ │ ├── getPosts.ts │ │ └── types.d.ts ├── next.config.js ├── package.json ├── pnpm-lock.yaml ├── postcss.config.js ├── posts │ └── notice │ │ ├── about.mdx │ │ └── tech-stack.mdx ├── public │ ├── assets │ │ ├── 81320307_p0.jpg │ │ ├── GT5Bjdba4AAbCkU.jpeg │ │ ├── shinnku-logo.png │ │ └── upsetgal-logo.png │ ├── favicon.ico │ ├── japan.svg │ ├── next.svg │ └── vercel.svg ├── styles │ ├── blog.css │ ├── globals.css │ ├── index.css │ └── prose.css ├── tailwind.config.js ├── tsconfig.json ├── types │ ├── index.ts │ └── wiki.ts └── utils │ ├── cn.ts │ ├── formatDistanceToNow.ts │ ├── markdownToText.ts │ └── time.ts └── requirements.txt /.editorconfig: -------------------------------------------------------------------------------- 1 | # stop .editorconfig files search on current file. 2 | root = true 3 | 4 | [*.ts, *.tsx] 5 | charset = utf-8 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | trim_trailing_whitespace = true 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | target/ 3 | .venv 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "frontend/node_modules/typescript/lib", 3 | "editor.formatOnSave": true 4 | } 5 | -------------------------------------------------------------------------------- /AGENTS.md: -------------------------------------------------------------------------------- 1 | # Repository Guidelines for Contributors 2 | 3 | This monorepo hosts a Next.js frontend and a Rust backend. 4 | 5 | ## Directory Overview 6 | - `frontend/` – Next.js 15 project written in TypeScript. 7 | - `backend/` – Rust web service using the Axum framework. 8 | 9 | ## Development Setup 10 | - Use **pnpm** for managing frontend dependencies. 11 | - Use **Cargo** for the Rust backend. 12 | 13 | ## Formatting and Linting 14 | - Format TypeScript/JavaScript and CSS using `pnpm run format`. 15 | - Lint frontend code with `pnpm run lint`. 16 | - Format Rust code with `cargo fmt` and verify builds with `cargo check`. 17 | 18 | ## Important Notes 19 | - `frontend/node_modules/` and `backend/target/` are intentionally ignored and should not be committed. 20 | - TypeScript/TSX files follow two‑space indentation as defined in `.editorconfig`. 21 | - Rust files use the default `rustfmt` style (four‑space indentation). 22 | - Update `README.md` if you change setup steps or add major features. 23 | 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Next UI 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Shinnku-com 2 | 3 | A modern galgame resource website built with Next.js and HeroUI. 4 | 5 | ## Project Overview 6 | 7 | Shinnku-com (真红小站) is a comprehensive galgame resource website that provides 8 | access to various visual novel resources, including translated and original 9 | Japanese games. The site features a clean, responsive interface with dark mode 10 | support and efficient content organization. 11 | 12 | [This site](https://www.shinnku.com) is one of the most popular galgame resource 13 | websites in China, with over 1 million monthly active users. And the subtopic 14 | website [https://galgame.dev](https://galgame.dev) also has over 1 million 15 | monthly active users. 16 | 17 | ## Features 18 | 19 | - **Responsive Design**: Optimized for desktop, tablet, and mobile experiences 20 | - **Dark/Light Mode**: Support for user theme preferences 21 | - **Content Management**: Organized catalog of galgame resources 22 | - **Search Functionality**: Find specific games or categories quickly 23 | - **Fast Loading**: Optimized performance using Next.js 24 | - **Internationalization**: Built-in routing for `zh-cn`, `zh-tw`, and `en-us` 25 | 26 | ## Technologies Used 27 | 28 | - [Next.js 14](https://nextjs.org/docs/getting-started) - React framework with 29 | app directory structure 30 | - [HeroUI v2](https://heroui.com/) - UI components for React 31 | - [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework 32 | - [Tailwind Variants](https://tailwind-variants.org) - Variant management for 33 | Tailwind CSS 34 | - [TypeScript](https://www.typescriptlang.org/) - Typed superset of JavaScript 35 | - [Framer Motion](https://www.framer.com/motion/) - Animation library for React 36 | - [next-themes](https://github.com/pacocoursey/next-themes) - Theme management 37 | for Next.js 38 | 39 | ## Getting Started 40 | 41 | Clone the repository 42 | 43 | ```bash 44 | git clone https://github.com/shinnku-nikaidou/shinnku-com.git 45 | cd shinnku-com 46 | ``` 47 | 48 | Install dependencies Choose your preferred package manager 49 | 50 | ```bash 51 | # Using npm 52 | npm install 53 | 54 | # Using yarn 55 | yarn 56 | 57 | # Using pnpm 58 | pnpm install 59 | ``` 60 | 61 | Setup pnpm (if using) If you're using `pnpm`, add the following to your `.npmrc` 62 | file: 63 | 64 | ```bash 65 | public-hoist-pattern[]=*@heroui/* 66 | ``` 67 | 68 | Run development server 69 | 70 | ```bash 71 | pnpm run dev 72 | ``` 73 | 74 | Open your browser and navigate to `http://localhost:3000` to see the app in 75 | action. 76 | 77 | ### Backend Setup 78 | 79 | Create a Python virtual environment and install the backend dependencies: 80 | 81 | ```bash 82 | python3 -m venv .venv 83 | source .venv/bin/activate 84 | pip install -r requirements.txt 85 | 86 | ``` 87 | 88 | ## Internationalization 89 | 90 | Next.js i18n routing generates localized paths for `zh-cn`, `zh-tw`, and `en-us`. The default locale is Simplified Chinese. 91 | 92 | ## License 93 | 94 | Licensed under the 95 | [MIT license](https://github.com/shinnku-nikaidou/shinnku-com/blob/main/LICENSE). 96 | -------------------------------------------------------------------------------- /ai/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | -------------------------------------------------------------------------------- /ai/bge_rag_train.py: -------------------------------------------------------------------------------- 1 | from langchain_community.document_loaders import JSONLoader 2 | from langchain.text_splitter import RecursiveCharacterTextSplitter 3 | from langchain_huggingface import HuggingFaceEmbeddings 4 | from langchain_chroma import Chroma 5 | from langchain_ollama import OllamaLLM 6 | from langchain.chains import RetrievalQA 7 | import re 8 | 9 | 10 | def metadata_func(record: dict, metadata: dict) -> dict: 11 | metadata["prompt"] = record.get("prompt") 12 | return metadata 13 | 14 | 15 | loader = JSONLoader( 16 | file_path="datal.jsonl", 17 | jq_schema=".", 18 | content_key="completion", 19 | metadata_func=metadata_func, 20 | text_content=True, 21 | json_lines=True, 22 | ) 23 | 24 | docs = loader.load() 25 | 26 | for doc in docs: 27 | doc.page_content = doc.metadata["prompt"] + "\n" + doc.page_content 28 | 29 | splitter = RecursiveCharacterTextSplitter(chunk_size=512, chunk_overlap=100) 30 | chunks = splitter.split_documents(docs) 31 | 32 | emb = HuggingFaceEmbeddings(model_name="BAAI/bge-large-zh-v1.5") 33 | 34 | vectorstore = Chroma.from_documents(chunks, emb, persist_directory="./beg_rag_chroma") 35 | 36 | vectorstore_generate = Chroma.from_documents( 37 | docs, emb, persist_directory="./beg_rag_chroma_generate" 38 | ) 39 | 40 | vectorstore = Chroma(persist_directory="./beg_rag_chroma", embedding_function=emb) 41 | 42 | llm = OllamaLLM(model="qwen3:8b") 43 | 44 | qa = RetrievalQA.from_chain_type( 45 | llm=llm, chain_type="stuff", retriever=vectorstore.as_retriever() 46 | ) 47 | 48 | 49 | def split_qwen3(answer) -> str: 50 | cleaned_result = re.sub( 51 | r".*?\s*", "", answer, flags=re.DOTALL 52 | ).strip() 53 | return cleaned_result 54 | 55 | 56 | split_qwen3(qa.invoke("秽翼的尤斯蒂娅")) 57 | split_qwen3(qa.invoke("千恋万花")) 58 | split_qwen3(qa.invoke("寒蝉鸣泣之时")) 59 | split_qwen3(qa.invoke("美少女万華鏡")) 60 | split_qwen3(qa.invoke("星空的记忆")) 61 | split_qwen3(qa.invoke("详细介绍夏空彼方")) 62 | 63 | 64 | retriever = vectorstore.as_retriever() 65 | -------------------------------------------------------------------------------- /ai/gcp_distill.py: -------------------------------------------------------------------------------- 1 | import json 2 | from google import genai 3 | from google.genai import types 4 | 5 | from google.oauth2 import service_account 6 | 7 | KEY_PATH = "yourproject-id-xxxxxxx.json" 8 | PROJECT_ID = "yourproject-id" 9 | LOCATION = "global" 10 | 11 | credentials = service_account.Credentials.from_service_account_file( 12 | KEY_PATH, scopes=["https://www.googleapis.com/auth/cloud-platform"] 13 | ) 14 | 15 | client = genai.Client( 16 | vertexai=True, project=PROJECT_ID, location=LOCATION, credentials=credentials 17 | ) 18 | 19 | 20 | def generate(text: str, client: genai.Client) -> str: 21 | print(f"Generating content for: {text}") 22 | model = "gemini-2.5-pro-preview-05-06" 23 | contents = [ 24 | types.Content( 25 | role="user", 26 | parts=[types.Part.from_text(text=text)], 27 | ), 28 | ] 29 | tools = [ 30 | types.Tool(google_search=types.GoogleSearch()), 31 | ] 32 | generate_content_config = types.GenerateContentConfig( 33 | temperature=1, 34 | top_p=1, 35 | seed=0, 36 | max_output_tokens=65535, 37 | safety_settings=[ 38 | types.SafetySetting(category="HARM_CATEGORY_HATE_SPEECH", threshold="OFF"), 39 | types.SafetySetting( 40 | category="HARM_CATEGORY_DANGEROUS_CONTENT", threshold="OFF" 41 | ), 42 | types.SafetySetting( 43 | category="HARM_CATEGORY_SEXUALLY_EXPLICIT", threshold="OFF" 44 | ), 45 | types.SafetySetting(category="HARM_CATEGORY_HARASSMENT", threshold="OFF"), 46 | ], 47 | tools=tools, 48 | ) 49 | full_text = "" 50 | for chunk in client.models.generate_content_stream( 51 | model=model, 52 | contents=contents, 53 | config=generate_content_config, 54 | ): 55 | if ( 56 | not chunk.candidates 57 | or not chunk.candidates[0].content 58 | or not chunk.candidates[0].content.parts 59 | ): 60 | continue 61 | print(chunk.text, end="") 62 | full_text += chunk.text 63 | print("\n") 64 | return full_text 65 | 66 | 67 | def intro_galgame(game_name: str) -> str: 68 | prompt = f"请用中文介绍一下galgame游戏:{game_name}" 69 | return prompt 70 | 71 | 72 | def intro_corporation(company_name: str) -> str: 73 | prompt = f"请用中文介绍一下这家游戏会社:{company_name}" 74 | return prompt 75 | 76 | 77 | generate(intro_galgame("GINKA"), client) 78 | generate(intro_galgame("D.C.IIP.C.~ダ・カーポII~プラスコミュニケーション"), client) 79 | generate(intro_corporation("ゆずソフト"), client) 80 | 81 | 82 | def export_to_jsonl( 83 | inputs: list[str], transmute: callable, output_path: str = "output.jsonl" 84 | ): 85 | """ 86 | make a jsonl file for fine-tune 87 | :param inputs: list of input strings 88 | :param output_path: path to save the jsonl file 89 | """ 90 | for prompt in inputs: 91 | completion = generate(transmute(prompt), client) 92 | if completion == "": 93 | print(f"Error: No completion generated for prompt: {prompt}") 94 | continue 95 | record = { 96 | "prompt": prompt, 97 | "completion": completion, 98 | } 99 | with open(output_path, "a", encoding="utf-8") as fout: 100 | fout.write(json.dumps(record, ensure_ascii=False) + "\n") 101 | print(f"Generated completion for: {prompt}") 102 | print("\n\n") 103 | 104 | 105 | def read_file(file_path): 106 | """ 107 | Read a file and return its content as a list of strings. 108 | :param file_path: Path to the input file. 109 | :return: List of strings, each representing a line in the file. 110 | """ 111 | with open(file_path, "r", encoding="utf-8") as f: 112 | lines = f.readlines() 113 | return [line.strip() for line in lines] 114 | 115 | 116 | if __name__ == "__main__": 117 | gal_inputs = read_file("galgames.txt") 118 | export_to_jsonl(gal_inputs, intro_galgame, "fine_tune_data.jsonl") 119 | -------------------------------------------------------------------------------- /ai/preload.py: -------------------------------------------------------------------------------- 1 | from langchain_huggingface import HuggingFaceEmbeddings 2 | from langchain_chroma import Chroma 3 | 4 | emb = HuggingFaceEmbeddings(model_name="BAAI/bge-large-zh-v1.5") 5 | 6 | vectorstore_intro = Chroma( 7 | persist_directory="../beg_rag_chroma_generate", embedding_function=emb 8 | ) 9 | retriever_intro = vectorstore_intro.as_retriever() 10 | 11 | vectorstore_findname = Chroma( 12 | persist_directory="../beg_rag_chroma", embedding_function=emb 13 | ) 14 | 15 | retriever_findname = vectorstore_findname.as_retriever() 16 | -------------------------------------------------------------------------------- /ai/serve.py: -------------------------------------------------------------------------------- 1 | # examples/things_asgi.py 2 | 3 | import falcon 4 | import falcon.asgi 5 | from langchain_huggingface import HuggingFaceEmbeddings 6 | from langchain_chroma import Chroma 7 | 8 | emb = HuggingFaceEmbeddings(model_name="BAAI/bge-large-zh-v1.5") 9 | 10 | vectorstore_intro = Chroma( 11 | persist_directory="../backend/database/beg_rag_chroma_generate", 12 | embedding_function=emb, 13 | ) 14 | retriever_intro = vectorstore_intro.as_retriever() 15 | 16 | vectorstore_findname = Chroma( 17 | persist_directory="../backend/database/beg_rag_chroma", embedding_function=emb 18 | ) 19 | 20 | retriever_findname = vectorstore_findname.as_retriever() 21 | 22 | ramdonshit = ( 23 | "Two things awe me most, the starry sky " 24 | "above me and the moral law within me." 25 | "\n" 26 | " ~ Immanuel Kant\n\n" 27 | ) 28 | 29 | 30 | class Intro: 31 | async def on_get(self, req, resp): 32 | """Handles GET requests""" 33 | name = req.get_param("name") 34 | resp.content_type = falcon.MEDIA_TEXT 35 | if name: 36 | try: 37 | results = await retriever_intro.ainvoke(name, k=1) 38 | if results: 39 | resp.status = falcon.HTTP_200 40 | resp.text = results[0].page_content 41 | else: 42 | resp.status = falcon.HTTP_200 43 | resp.text = "No results found." 44 | except Exception as e: 45 | resp.status = falcon.HTTP_500 46 | resp.text = f"An error occurred: {str(e)}" 47 | else: 48 | resp.status = falcon.HTTP_400 49 | resp.text = ramdonshit 50 | 51 | 52 | class FindName: 53 | async def on_get(self, req, resp): 54 | name = req.get_param("name") 55 | resp.content_type = falcon.MEDIA_JSON 56 | if name: 57 | try: 58 | results = await retriever_findname.ainvoke(name, k=12) 59 | if results: 60 | resp.status = falcon.HTTP_200 61 | resp.media = { 62 | "ans": [result.metadata.get("prompt", "") for result in results] 63 | } 64 | else: 65 | resp.status = falcon.HTTP_404 66 | resp.media = {"ans": []} 67 | except Exception as e: 68 | resp.status = falcon.HTTP_500 69 | resp.media = {"ans": [], "error": f"An error occurred: {str(e)}"} 70 | else: 71 | resp.status = falcon.HTTP_400 72 | resp.media = {"message": ramdonshit} 73 | 74 | 75 | app = falcon.asgi.App() 76 | 77 | intro = Intro() 78 | find_name = FindName() 79 | 80 | app.add_route("/intro", intro) 81 | app.add_route("/findname", find_name) 82 | -------------------------------------------------------------------------------- /backend/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [env] 2 | PYO3_PYTHON = { value = "../.venv/bin/python3", relative = true } 3 | -------------------------------------------------------------------------------- /backend/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /backend/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.24.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler2" 16 | version = "2.0.0" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 19 | 20 | [[package]] 21 | name = "anyhow" 22 | version = "1.0.98" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" 25 | 26 | [[package]] 27 | name = "atomic-waker" 28 | version = "1.1.2" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 31 | 32 | [[package]] 33 | name = "autocfg" 34 | version = "1.4.0" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 37 | 38 | [[package]] 39 | name = "axum" 40 | version = "0.8.4" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "021e862c184ae977658b36c4500f7feac3221ca5da43e3f25bd04ab6c79a29b5" 43 | dependencies = [ 44 | "axum-core", 45 | "bytes", 46 | "form_urlencoded", 47 | "futures-util", 48 | "http", 49 | "http-body", 50 | "http-body-util", 51 | "hyper", 52 | "hyper-util", 53 | "itoa", 54 | "matchit", 55 | "memchr", 56 | "mime", 57 | "percent-encoding", 58 | "pin-project-lite", 59 | "rustversion", 60 | "serde", 61 | "serde_json", 62 | "serde_path_to_error", 63 | "serde_urlencoded", 64 | "sync_wrapper", 65 | "tokio", 66 | "tower", 67 | "tower-layer", 68 | "tower-service", 69 | "tracing", 70 | ] 71 | 72 | [[package]] 73 | name = "axum-core" 74 | version = "0.5.2" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "68464cd0412f486726fb3373129ef5d2993f90c34bc2bc1c1e9943b2f4fc7ca6" 77 | dependencies = [ 78 | "bytes", 79 | "futures-core", 80 | "http", 81 | "http-body", 82 | "http-body-util", 83 | "mime", 84 | "pin-project-lite", 85 | "rustversion", 86 | "sync_wrapper", 87 | "tower-layer", 88 | "tower-service", 89 | "tracing", 90 | ] 91 | 92 | [[package]] 93 | name = "backtrace" 94 | version = "0.3.75" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" 97 | dependencies = [ 98 | "addr2line", 99 | "cfg-if", 100 | "libc", 101 | "miniz_oxide", 102 | "object", 103 | "rustc-demangle", 104 | "windows-targets 0.52.6", 105 | ] 106 | 107 | [[package]] 108 | name = "base64" 109 | version = "0.22.1" 110 | source = "registry+https://github.com/rust-lang/crates.io-index" 111 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 112 | 113 | [[package]] 114 | name = "bitflags" 115 | version = "2.9.1" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" 118 | 119 | [[package]] 120 | name = "bumpalo" 121 | version = "3.17.0" 122 | source = "registry+https://github.com/rust-lang/crates.io-index" 123 | checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" 124 | 125 | [[package]] 126 | name = "bytes" 127 | version = "1.10.1" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 130 | 131 | [[package]] 132 | name = "cc" 133 | version = "1.2.25" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "d0fc897dc1e865cc67c0e05a836d9d3f1df3cbe442aa4a9473b18e12624a4951" 136 | dependencies = [ 137 | "shlex", 138 | ] 139 | 140 | [[package]] 141 | name = "cfg-if" 142 | version = "1.0.0" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 145 | 146 | [[package]] 147 | name = "color-eyre" 148 | version = "0.6.5" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "e5920befb47832a6d61ee3a3a846565cfa39b331331e68a3b1d1116630f2f26d" 151 | dependencies = [ 152 | "backtrace", 153 | "color-spantrace", 154 | "eyre", 155 | "indenter", 156 | "once_cell", 157 | "owo-colors", 158 | "tracing-error", 159 | ] 160 | 161 | [[package]] 162 | name = "color-spantrace" 163 | version = "0.3.0" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "b8b88ea9df13354b55bc7234ebcce36e6ef896aca2e42a15de9e10edce01b427" 166 | dependencies = [ 167 | "once_cell", 168 | "owo-colors", 169 | "tracing-core", 170 | "tracing-error", 171 | ] 172 | 173 | [[package]] 174 | name = "core-foundation" 175 | version = "0.9.4" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 178 | dependencies = [ 179 | "core-foundation-sys", 180 | "libc", 181 | ] 182 | 183 | [[package]] 184 | name = "core-foundation-sys" 185 | version = "0.8.7" 186 | source = "registry+https://github.com/rust-lang/crates.io-index" 187 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 188 | 189 | [[package]] 190 | name = "displaydoc" 191 | version = "0.2.5" 192 | source = "registry+https://github.com/rust-lang/crates.io-index" 193 | checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" 194 | dependencies = [ 195 | "proc-macro2", 196 | "quote", 197 | "syn", 198 | ] 199 | 200 | [[package]] 201 | name = "encoding_rs" 202 | version = "0.8.35" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" 205 | dependencies = [ 206 | "cfg-if", 207 | ] 208 | 209 | [[package]] 210 | name = "equivalent" 211 | version = "1.0.2" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 214 | 215 | [[package]] 216 | name = "errno" 217 | version = "0.3.12" 218 | source = "registry+https://github.com/rust-lang/crates.io-index" 219 | checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" 220 | dependencies = [ 221 | "libc", 222 | "windows-sys 0.59.0", 223 | ] 224 | 225 | [[package]] 226 | name = "eyre" 227 | version = "0.6.12" 228 | source = "registry+https://github.com/rust-lang/crates.io-index" 229 | checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" 230 | dependencies = [ 231 | "indenter", 232 | "once_cell", 233 | ] 234 | 235 | [[package]] 236 | name = "fastrand" 237 | version = "2.3.0" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 240 | 241 | [[package]] 242 | name = "fnv" 243 | version = "1.0.7" 244 | source = "registry+https://github.com/rust-lang/crates.io-index" 245 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 246 | 247 | [[package]] 248 | name = "foreign-types" 249 | version = "0.3.2" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 252 | dependencies = [ 253 | "foreign-types-shared", 254 | ] 255 | 256 | [[package]] 257 | name = "foreign-types-shared" 258 | version = "0.1.1" 259 | source = "registry+https://github.com/rust-lang/crates.io-index" 260 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 261 | 262 | [[package]] 263 | name = "form_urlencoded" 264 | version = "1.2.1" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 267 | dependencies = [ 268 | "percent-encoding", 269 | ] 270 | 271 | [[package]] 272 | name = "futures-channel" 273 | version = "0.3.31" 274 | source = "registry+https://github.com/rust-lang/crates.io-index" 275 | checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 276 | dependencies = [ 277 | "futures-core", 278 | ] 279 | 280 | [[package]] 281 | name = "futures-core" 282 | version = "0.3.31" 283 | source = "registry+https://github.com/rust-lang/crates.io-index" 284 | checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 285 | 286 | [[package]] 287 | name = "futures-sink" 288 | version = "0.3.31" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 291 | 292 | [[package]] 293 | name = "futures-task" 294 | version = "0.3.31" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 297 | 298 | [[package]] 299 | name = "futures-util" 300 | version = "0.3.31" 301 | source = "registry+https://github.com/rust-lang/crates.io-index" 302 | checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 303 | dependencies = [ 304 | "futures-core", 305 | "futures-task", 306 | "pin-project-lite", 307 | "pin-utils", 308 | ] 309 | 310 | [[package]] 311 | name = "getrandom" 312 | version = "0.2.16" 313 | source = "registry+https://github.com/rust-lang/crates.io-index" 314 | checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 315 | dependencies = [ 316 | "cfg-if", 317 | "libc", 318 | "wasi 0.11.0+wasi-snapshot-preview1", 319 | ] 320 | 321 | [[package]] 322 | name = "getrandom" 323 | version = "0.3.3" 324 | source = "registry+https://github.com/rust-lang/crates.io-index" 325 | checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" 326 | dependencies = [ 327 | "cfg-if", 328 | "libc", 329 | "r-efi", 330 | "wasi 0.14.2+wasi-0.2.4", 331 | ] 332 | 333 | [[package]] 334 | name = "gimli" 335 | version = "0.31.1" 336 | source = "registry+https://github.com/rust-lang/crates.io-index" 337 | checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" 338 | 339 | [[package]] 340 | name = "h2" 341 | version = "0.4.10" 342 | source = "registry+https://github.com/rust-lang/crates.io-index" 343 | checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" 344 | dependencies = [ 345 | "atomic-waker", 346 | "bytes", 347 | "fnv", 348 | "futures-core", 349 | "futures-sink", 350 | "http", 351 | "indexmap", 352 | "slab", 353 | "tokio", 354 | "tokio-util", 355 | "tracing", 356 | ] 357 | 358 | [[package]] 359 | name = "hashbrown" 360 | version = "0.15.3" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" 363 | 364 | [[package]] 365 | name = "http" 366 | version = "1.3.1" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" 369 | dependencies = [ 370 | "bytes", 371 | "fnv", 372 | "itoa", 373 | ] 374 | 375 | [[package]] 376 | name = "http-body" 377 | version = "1.0.1" 378 | source = "registry+https://github.com/rust-lang/crates.io-index" 379 | checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" 380 | dependencies = [ 381 | "bytes", 382 | "http", 383 | ] 384 | 385 | [[package]] 386 | name = "http-body-util" 387 | version = "0.1.3" 388 | source = "registry+https://github.com/rust-lang/crates.io-index" 389 | checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" 390 | dependencies = [ 391 | "bytes", 392 | "futures-core", 393 | "http", 394 | "http-body", 395 | "pin-project-lite", 396 | ] 397 | 398 | [[package]] 399 | name = "httparse" 400 | version = "1.10.1" 401 | source = "registry+https://github.com/rust-lang/crates.io-index" 402 | checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" 403 | 404 | [[package]] 405 | name = "httpdate" 406 | version = "1.0.3" 407 | source = "registry+https://github.com/rust-lang/crates.io-index" 408 | checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 409 | 410 | [[package]] 411 | name = "hyper" 412 | version = "1.6.0" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" 415 | dependencies = [ 416 | "bytes", 417 | "futures-channel", 418 | "futures-util", 419 | "h2", 420 | "http", 421 | "http-body", 422 | "httparse", 423 | "httpdate", 424 | "itoa", 425 | "pin-project-lite", 426 | "smallvec", 427 | "tokio", 428 | "want", 429 | ] 430 | 431 | [[package]] 432 | name = "hyper-rustls" 433 | version = "0.27.6" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | checksum = "03a01595e11bdcec50946522c32dde3fc6914743000a68b93000965f2f02406d" 436 | dependencies = [ 437 | "http", 438 | "hyper", 439 | "hyper-util", 440 | "rustls", 441 | "rustls-pki-types", 442 | "tokio", 443 | "tokio-rustls", 444 | "tower-service", 445 | ] 446 | 447 | [[package]] 448 | name = "hyper-tls" 449 | version = "0.6.0" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" 452 | dependencies = [ 453 | "bytes", 454 | "http-body-util", 455 | "hyper", 456 | "hyper-util", 457 | "native-tls", 458 | "tokio", 459 | "tokio-native-tls", 460 | "tower-service", 461 | ] 462 | 463 | [[package]] 464 | name = "hyper-util" 465 | version = "0.1.13" 466 | source = "registry+https://github.com/rust-lang/crates.io-index" 467 | checksum = "b1c293b6b3d21eca78250dc7dbebd6b9210ec5530e038cbfe0661b5c47ab06e8" 468 | dependencies = [ 469 | "base64", 470 | "bytes", 471 | "futures-channel", 472 | "futures-core", 473 | "futures-util", 474 | "http", 475 | "http-body", 476 | "hyper", 477 | "ipnet", 478 | "libc", 479 | "percent-encoding", 480 | "pin-project-lite", 481 | "socket2", 482 | "system-configuration", 483 | "tokio", 484 | "tower-service", 485 | "tracing", 486 | "windows-registry", 487 | ] 488 | 489 | [[package]] 490 | name = "icu_collections" 491 | version = "2.0.0" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" 494 | dependencies = [ 495 | "displaydoc", 496 | "potential_utf", 497 | "yoke", 498 | "zerofrom", 499 | "zerovec", 500 | ] 501 | 502 | [[package]] 503 | name = "icu_locale_core" 504 | version = "2.0.0" 505 | source = "registry+https://github.com/rust-lang/crates.io-index" 506 | checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" 507 | dependencies = [ 508 | "displaydoc", 509 | "litemap", 510 | "tinystr", 511 | "writeable", 512 | "zerovec", 513 | ] 514 | 515 | [[package]] 516 | name = "icu_normalizer" 517 | version = "2.0.0" 518 | source = "registry+https://github.com/rust-lang/crates.io-index" 519 | checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" 520 | dependencies = [ 521 | "displaydoc", 522 | "icu_collections", 523 | "icu_normalizer_data", 524 | "icu_properties", 525 | "icu_provider", 526 | "smallvec", 527 | "zerovec", 528 | ] 529 | 530 | [[package]] 531 | name = "icu_normalizer_data" 532 | version = "2.0.0" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" 535 | 536 | [[package]] 537 | name = "icu_properties" 538 | version = "2.0.1" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" 541 | dependencies = [ 542 | "displaydoc", 543 | "icu_collections", 544 | "icu_locale_core", 545 | "icu_properties_data", 546 | "icu_provider", 547 | "potential_utf", 548 | "zerotrie", 549 | "zerovec", 550 | ] 551 | 552 | [[package]] 553 | name = "icu_properties_data" 554 | version = "2.0.1" 555 | source = "registry+https://github.com/rust-lang/crates.io-index" 556 | checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" 557 | 558 | [[package]] 559 | name = "icu_provider" 560 | version = "2.0.0" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" 563 | dependencies = [ 564 | "displaydoc", 565 | "icu_locale_core", 566 | "stable_deref_trait", 567 | "tinystr", 568 | "writeable", 569 | "yoke", 570 | "zerofrom", 571 | "zerotrie", 572 | "zerovec", 573 | ] 574 | 575 | [[package]] 576 | name = "idna" 577 | version = "1.0.3" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" 580 | dependencies = [ 581 | "idna_adapter", 582 | "smallvec", 583 | "utf8_iter", 584 | ] 585 | 586 | [[package]] 587 | name = "idna_adapter" 588 | version = "1.2.1" 589 | source = "registry+https://github.com/rust-lang/crates.io-index" 590 | checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" 591 | dependencies = [ 592 | "icu_normalizer", 593 | "icu_properties", 594 | ] 595 | 596 | [[package]] 597 | name = "indenter" 598 | version = "0.3.3" 599 | source = "registry+https://github.com/rust-lang/crates.io-index" 600 | checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" 601 | 602 | [[package]] 603 | name = "indexmap" 604 | version = "2.9.0" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" 607 | dependencies = [ 608 | "equivalent", 609 | "hashbrown", 610 | ] 611 | 612 | [[package]] 613 | name = "ipnet" 614 | version = "2.11.0" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" 617 | 618 | [[package]] 619 | name = "iri-string" 620 | version = "0.7.8" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" 623 | dependencies = [ 624 | "memchr", 625 | "serde", 626 | ] 627 | 628 | [[package]] 629 | name = "itoa" 630 | version = "1.0.15" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 633 | 634 | [[package]] 635 | name = "js-sys" 636 | version = "0.3.77" 637 | source = "registry+https://github.com/rust-lang/crates.io-index" 638 | checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 639 | dependencies = [ 640 | "once_cell", 641 | "wasm-bindgen", 642 | ] 643 | 644 | [[package]] 645 | name = "lazy_static" 646 | version = "1.5.0" 647 | source = "registry+https://github.com/rust-lang/crates.io-index" 648 | checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 649 | 650 | [[package]] 651 | name = "libc" 652 | version = "0.2.172" 653 | source = "registry+https://github.com/rust-lang/crates.io-index" 654 | checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" 655 | 656 | [[package]] 657 | name = "linux-raw-sys" 658 | version = "0.9.4" 659 | source = "registry+https://github.com/rust-lang/crates.io-index" 660 | checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" 661 | 662 | [[package]] 663 | name = "litemap" 664 | version = "0.8.0" 665 | source = "registry+https://github.com/rust-lang/crates.io-index" 666 | checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" 667 | 668 | [[package]] 669 | name = "lock_api" 670 | version = "0.4.13" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" 673 | dependencies = [ 674 | "autocfg", 675 | "scopeguard", 676 | ] 677 | 678 | [[package]] 679 | name = "log" 680 | version = "0.4.27" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 683 | 684 | [[package]] 685 | name = "matchit" 686 | version = "0.8.4" 687 | source = "registry+https://github.com/rust-lang/crates.io-index" 688 | checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" 689 | 690 | [[package]] 691 | name = "memchr" 692 | version = "2.7.4" 693 | source = "registry+https://github.com/rust-lang/crates.io-index" 694 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 695 | 696 | [[package]] 697 | name = "mime" 698 | version = "0.3.17" 699 | source = "registry+https://github.com/rust-lang/crates.io-index" 700 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 701 | 702 | [[package]] 703 | name = "miniz_oxide" 704 | version = "0.8.8" 705 | source = "registry+https://github.com/rust-lang/crates.io-index" 706 | checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" 707 | dependencies = [ 708 | "adler2", 709 | ] 710 | 711 | [[package]] 712 | name = "mio" 713 | version = "1.0.4" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" 716 | dependencies = [ 717 | "libc", 718 | "wasi 0.11.0+wasi-snapshot-preview1", 719 | "windows-sys 0.59.0", 720 | ] 721 | 722 | [[package]] 723 | name = "native-tls" 724 | version = "0.2.14" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" 727 | dependencies = [ 728 | "libc", 729 | "log", 730 | "openssl", 731 | "openssl-probe", 732 | "openssl-sys", 733 | "schannel", 734 | "security-framework", 735 | "security-framework-sys", 736 | "tempfile", 737 | ] 738 | 739 | [[package]] 740 | name = "object" 741 | version = "0.36.7" 742 | source = "registry+https://github.com/rust-lang/crates.io-index" 743 | checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" 744 | dependencies = [ 745 | "memchr", 746 | ] 747 | 748 | [[package]] 749 | name = "once_cell" 750 | version = "1.21.3" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 753 | 754 | [[package]] 755 | name = "openssl" 756 | version = "0.10.73" 757 | source = "registry+https://github.com/rust-lang/crates.io-index" 758 | checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" 759 | dependencies = [ 760 | "bitflags", 761 | "cfg-if", 762 | "foreign-types", 763 | "libc", 764 | "once_cell", 765 | "openssl-macros", 766 | "openssl-sys", 767 | ] 768 | 769 | [[package]] 770 | name = "openssl-macros" 771 | version = "0.1.1" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 774 | dependencies = [ 775 | "proc-macro2", 776 | "quote", 777 | "syn", 778 | ] 779 | 780 | [[package]] 781 | name = "openssl-probe" 782 | version = "0.1.6" 783 | source = "registry+https://github.com/rust-lang/crates.io-index" 784 | checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" 785 | 786 | [[package]] 787 | name = "openssl-sys" 788 | version = "0.9.109" 789 | source = "registry+https://github.com/rust-lang/crates.io-index" 790 | checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" 791 | dependencies = [ 792 | "cc", 793 | "libc", 794 | "pkg-config", 795 | "vcpkg", 796 | ] 797 | 798 | [[package]] 799 | name = "owo-colors" 800 | version = "4.2.1" 801 | source = "registry+https://github.com/rust-lang/crates.io-index" 802 | checksum = "26995317201fa17f3656c36716aed4a7c81743a9634ac4c99c0eeda495db0cec" 803 | 804 | [[package]] 805 | name = "parking_lot" 806 | version = "0.12.4" 807 | source = "registry+https://github.com/rust-lang/crates.io-index" 808 | checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" 809 | dependencies = [ 810 | "lock_api", 811 | "parking_lot_core", 812 | ] 813 | 814 | [[package]] 815 | name = "parking_lot_core" 816 | version = "0.9.11" 817 | source = "registry+https://github.com/rust-lang/crates.io-index" 818 | checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" 819 | dependencies = [ 820 | "cfg-if", 821 | "libc", 822 | "redox_syscall", 823 | "smallvec", 824 | "windows-targets 0.52.6", 825 | ] 826 | 827 | [[package]] 828 | name = "percent-encoding" 829 | version = "2.3.1" 830 | source = "registry+https://github.com/rust-lang/crates.io-index" 831 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 832 | 833 | [[package]] 834 | name = "pin-project-lite" 835 | version = "0.2.16" 836 | source = "registry+https://github.com/rust-lang/crates.io-index" 837 | checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 838 | 839 | [[package]] 840 | name = "pin-utils" 841 | version = "0.1.0" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 844 | 845 | [[package]] 846 | name = "pkg-config" 847 | version = "0.3.32" 848 | source = "registry+https://github.com/rust-lang/crates.io-index" 849 | checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 850 | 851 | [[package]] 852 | name = "potential_utf" 853 | version = "0.1.2" 854 | source = "registry+https://github.com/rust-lang/crates.io-index" 855 | checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" 856 | dependencies = [ 857 | "zerovec", 858 | ] 859 | 860 | [[package]] 861 | name = "proc-macro2" 862 | version = "1.0.95" 863 | source = "registry+https://github.com/rust-lang/crates.io-index" 864 | checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" 865 | dependencies = [ 866 | "unicode-ident", 867 | ] 868 | 869 | [[package]] 870 | name = "quote" 871 | version = "1.0.40" 872 | source = "registry+https://github.com/rust-lang/crates.io-index" 873 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 874 | dependencies = [ 875 | "proc-macro2", 876 | ] 877 | 878 | [[package]] 879 | name = "r-efi" 880 | version = "5.2.0" 881 | source = "registry+https://github.com/rust-lang/crates.io-index" 882 | checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" 883 | 884 | [[package]] 885 | name = "redox_syscall" 886 | version = "0.5.12" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" 889 | dependencies = [ 890 | "bitflags", 891 | ] 892 | 893 | [[package]] 894 | name = "reqwest" 895 | version = "0.12.19" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | checksum = "a2f8e5513d63f2e5b386eb5106dc67eaf3f84e95258e210489136b8b92ad6119" 898 | dependencies = [ 899 | "base64", 900 | "bytes", 901 | "encoding_rs", 902 | "futures-core", 903 | "h2", 904 | "http", 905 | "http-body", 906 | "http-body-util", 907 | "hyper", 908 | "hyper-rustls", 909 | "hyper-tls", 910 | "hyper-util", 911 | "ipnet", 912 | "js-sys", 913 | "log", 914 | "mime", 915 | "native-tls", 916 | "once_cell", 917 | "percent-encoding", 918 | "pin-project-lite", 919 | "rustls-pki-types", 920 | "serde", 921 | "serde_json", 922 | "serde_urlencoded", 923 | "sync_wrapper", 924 | "tokio", 925 | "tokio-native-tls", 926 | "tower", 927 | "tower-http", 928 | "tower-service", 929 | "url", 930 | "wasm-bindgen", 931 | "wasm-bindgen-futures", 932 | "web-sys", 933 | ] 934 | 935 | [[package]] 936 | name = "ring" 937 | version = "0.17.14" 938 | source = "registry+https://github.com/rust-lang/crates.io-index" 939 | checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" 940 | dependencies = [ 941 | "cc", 942 | "cfg-if", 943 | "getrandom 0.2.16", 944 | "libc", 945 | "untrusted", 946 | "windows-sys 0.52.0", 947 | ] 948 | 949 | [[package]] 950 | name = "rustc-demangle" 951 | version = "0.1.24" 952 | source = "registry+https://github.com/rust-lang/crates.io-index" 953 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 954 | 955 | [[package]] 956 | name = "rustix" 957 | version = "1.0.7" 958 | source = "registry+https://github.com/rust-lang/crates.io-index" 959 | checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" 960 | dependencies = [ 961 | "bitflags", 962 | "errno", 963 | "libc", 964 | "linux-raw-sys", 965 | "windows-sys 0.59.0", 966 | ] 967 | 968 | [[package]] 969 | name = "rustls" 970 | version = "0.23.27" 971 | source = "registry+https://github.com/rust-lang/crates.io-index" 972 | checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" 973 | dependencies = [ 974 | "once_cell", 975 | "rustls-pki-types", 976 | "rustls-webpki", 977 | "subtle", 978 | "zeroize", 979 | ] 980 | 981 | [[package]] 982 | name = "rustls-pki-types" 983 | version = "1.12.0" 984 | source = "registry+https://github.com/rust-lang/crates.io-index" 985 | checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" 986 | dependencies = [ 987 | "zeroize", 988 | ] 989 | 990 | [[package]] 991 | name = "rustls-webpki" 992 | version = "0.103.3" 993 | source = "registry+https://github.com/rust-lang/crates.io-index" 994 | checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" 995 | dependencies = [ 996 | "ring", 997 | "rustls-pki-types", 998 | "untrusted", 999 | ] 1000 | 1001 | [[package]] 1002 | name = "rustversion" 1003 | version = "1.0.21" 1004 | source = "registry+https://github.com/rust-lang/crates.io-index" 1005 | checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" 1006 | 1007 | [[package]] 1008 | name = "ryu" 1009 | version = "1.0.20" 1010 | source = "registry+https://github.com/rust-lang/crates.io-index" 1011 | checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 1012 | 1013 | [[package]] 1014 | name = "schannel" 1015 | version = "0.1.27" 1016 | source = "registry+https://github.com/rust-lang/crates.io-index" 1017 | checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" 1018 | dependencies = [ 1019 | "windows-sys 0.59.0", 1020 | ] 1021 | 1022 | [[package]] 1023 | name = "scopeguard" 1024 | version = "1.2.0" 1025 | source = "registry+https://github.com/rust-lang/crates.io-index" 1026 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1027 | 1028 | [[package]] 1029 | name = "security-framework" 1030 | version = "2.11.1" 1031 | source = "registry+https://github.com/rust-lang/crates.io-index" 1032 | checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 1033 | dependencies = [ 1034 | "bitflags", 1035 | "core-foundation", 1036 | "core-foundation-sys", 1037 | "libc", 1038 | "security-framework-sys", 1039 | ] 1040 | 1041 | [[package]] 1042 | name = "security-framework-sys" 1043 | version = "2.14.0" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" 1046 | dependencies = [ 1047 | "core-foundation-sys", 1048 | "libc", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "serde" 1053 | version = "1.0.219" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 1056 | dependencies = [ 1057 | "serde_derive", 1058 | ] 1059 | 1060 | [[package]] 1061 | name = "serde_derive" 1062 | version = "1.0.219" 1063 | source = "registry+https://github.com/rust-lang/crates.io-index" 1064 | checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 1065 | dependencies = [ 1066 | "proc-macro2", 1067 | "quote", 1068 | "syn", 1069 | ] 1070 | 1071 | [[package]] 1072 | name = "serde_json" 1073 | version = "1.0.140" 1074 | source = "registry+https://github.com/rust-lang/crates.io-index" 1075 | checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" 1076 | dependencies = [ 1077 | "itoa", 1078 | "memchr", 1079 | "ryu", 1080 | "serde", 1081 | ] 1082 | 1083 | [[package]] 1084 | name = "serde_path_to_error" 1085 | version = "0.1.17" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | checksum = "59fab13f937fa393d08645bf3a84bdfe86e296747b506ada67bb15f10f218b2a" 1088 | dependencies = [ 1089 | "itoa", 1090 | "serde", 1091 | ] 1092 | 1093 | [[package]] 1094 | name = "serde_urlencoded" 1095 | version = "0.7.1" 1096 | source = "registry+https://github.com/rust-lang/crates.io-index" 1097 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1098 | dependencies = [ 1099 | "form_urlencoded", 1100 | "itoa", 1101 | "ryu", 1102 | "serde", 1103 | ] 1104 | 1105 | [[package]] 1106 | name = "sharded-slab" 1107 | version = "0.1.7" 1108 | source = "registry+https://github.com/rust-lang/crates.io-index" 1109 | checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 1110 | dependencies = [ 1111 | "lazy_static", 1112 | ] 1113 | 1114 | [[package]] 1115 | name = "shinnku-com-backend" 1116 | version = "0.1.0" 1117 | dependencies = [ 1118 | "anyhow", 1119 | "axum", 1120 | "color-eyre", 1121 | "reqwest", 1122 | "serde", 1123 | "tokio", 1124 | ] 1125 | 1126 | [[package]] 1127 | name = "shlex" 1128 | version = "1.3.0" 1129 | source = "registry+https://github.com/rust-lang/crates.io-index" 1130 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1131 | 1132 | [[package]] 1133 | name = "signal-hook-registry" 1134 | version = "1.4.5" 1135 | source = "registry+https://github.com/rust-lang/crates.io-index" 1136 | checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" 1137 | dependencies = [ 1138 | "libc", 1139 | ] 1140 | 1141 | [[package]] 1142 | name = "slab" 1143 | version = "0.4.9" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 1146 | dependencies = [ 1147 | "autocfg", 1148 | ] 1149 | 1150 | [[package]] 1151 | name = "smallvec" 1152 | version = "1.15.0" 1153 | source = "registry+https://github.com/rust-lang/crates.io-index" 1154 | checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" 1155 | 1156 | [[package]] 1157 | name = "socket2" 1158 | version = "0.5.10" 1159 | source = "registry+https://github.com/rust-lang/crates.io-index" 1160 | checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" 1161 | dependencies = [ 1162 | "libc", 1163 | "windows-sys 0.52.0", 1164 | ] 1165 | 1166 | [[package]] 1167 | name = "stable_deref_trait" 1168 | version = "1.2.0" 1169 | source = "registry+https://github.com/rust-lang/crates.io-index" 1170 | checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 1171 | 1172 | [[package]] 1173 | name = "subtle" 1174 | version = "2.6.1" 1175 | source = "registry+https://github.com/rust-lang/crates.io-index" 1176 | checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 1177 | 1178 | [[package]] 1179 | name = "syn" 1180 | version = "2.0.101" 1181 | source = "registry+https://github.com/rust-lang/crates.io-index" 1182 | checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" 1183 | dependencies = [ 1184 | "proc-macro2", 1185 | "quote", 1186 | "unicode-ident", 1187 | ] 1188 | 1189 | [[package]] 1190 | name = "sync_wrapper" 1191 | version = "1.0.2" 1192 | source = "registry+https://github.com/rust-lang/crates.io-index" 1193 | checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 1194 | dependencies = [ 1195 | "futures-core", 1196 | ] 1197 | 1198 | [[package]] 1199 | name = "synstructure" 1200 | version = "0.13.2" 1201 | source = "registry+https://github.com/rust-lang/crates.io-index" 1202 | checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" 1203 | dependencies = [ 1204 | "proc-macro2", 1205 | "quote", 1206 | "syn", 1207 | ] 1208 | 1209 | [[package]] 1210 | name = "system-configuration" 1211 | version = "0.6.1" 1212 | source = "registry+https://github.com/rust-lang/crates.io-index" 1213 | checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" 1214 | dependencies = [ 1215 | "bitflags", 1216 | "core-foundation", 1217 | "system-configuration-sys", 1218 | ] 1219 | 1220 | [[package]] 1221 | name = "system-configuration-sys" 1222 | version = "0.6.0" 1223 | source = "registry+https://github.com/rust-lang/crates.io-index" 1224 | checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" 1225 | dependencies = [ 1226 | "core-foundation-sys", 1227 | "libc", 1228 | ] 1229 | 1230 | [[package]] 1231 | name = "tempfile" 1232 | version = "3.20.0" 1233 | source = "registry+https://github.com/rust-lang/crates.io-index" 1234 | checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" 1235 | dependencies = [ 1236 | "fastrand", 1237 | "getrandom 0.3.3", 1238 | "once_cell", 1239 | "rustix", 1240 | "windows-sys 0.59.0", 1241 | ] 1242 | 1243 | [[package]] 1244 | name = "thread_local" 1245 | version = "1.1.8" 1246 | source = "registry+https://github.com/rust-lang/crates.io-index" 1247 | checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" 1248 | dependencies = [ 1249 | "cfg-if", 1250 | "once_cell", 1251 | ] 1252 | 1253 | [[package]] 1254 | name = "tinystr" 1255 | version = "0.8.1" 1256 | source = "registry+https://github.com/rust-lang/crates.io-index" 1257 | checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" 1258 | dependencies = [ 1259 | "displaydoc", 1260 | "zerovec", 1261 | ] 1262 | 1263 | [[package]] 1264 | name = "tokio" 1265 | version = "1.45.1" 1266 | source = "registry+https://github.com/rust-lang/crates.io-index" 1267 | checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" 1268 | dependencies = [ 1269 | "backtrace", 1270 | "bytes", 1271 | "libc", 1272 | "mio", 1273 | "parking_lot", 1274 | "pin-project-lite", 1275 | "signal-hook-registry", 1276 | "socket2", 1277 | "tokio-macros", 1278 | "windows-sys 0.52.0", 1279 | ] 1280 | 1281 | [[package]] 1282 | name = "tokio-macros" 1283 | version = "2.5.0" 1284 | source = "registry+https://github.com/rust-lang/crates.io-index" 1285 | checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" 1286 | dependencies = [ 1287 | "proc-macro2", 1288 | "quote", 1289 | "syn", 1290 | ] 1291 | 1292 | [[package]] 1293 | name = "tokio-native-tls" 1294 | version = "0.3.1" 1295 | source = "registry+https://github.com/rust-lang/crates.io-index" 1296 | checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 1297 | dependencies = [ 1298 | "native-tls", 1299 | "tokio", 1300 | ] 1301 | 1302 | [[package]] 1303 | name = "tokio-rustls" 1304 | version = "0.26.2" 1305 | source = "registry+https://github.com/rust-lang/crates.io-index" 1306 | checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" 1307 | dependencies = [ 1308 | "rustls", 1309 | "tokio", 1310 | ] 1311 | 1312 | [[package]] 1313 | name = "tokio-util" 1314 | version = "0.7.15" 1315 | source = "registry+https://github.com/rust-lang/crates.io-index" 1316 | checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" 1317 | dependencies = [ 1318 | "bytes", 1319 | "futures-core", 1320 | "futures-sink", 1321 | "pin-project-lite", 1322 | "tokio", 1323 | ] 1324 | 1325 | [[package]] 1326 | name = "tower" 1327 | version = "0.5.2" 1328 | source = "registry+https://github.com/rust-lang/crates.io-index" 1329 | checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" 1330 | dependencies = [ 1331 | "futures-core", 1332 | "futures-util", 1333 | "pin-project-lite", 1334 | "sync_wrapper", 1335 | "tokio", 1336 | "tower-layer", 1337 | "tower-service", 1338 | "tracing", 1339 | ] 1340 | 1341 | [[package]] 1342 | name = "tower-http" 1343 | version = "0.6.6" 1344 | source = "registry+https://github.com/rust-lang/crates.io-index" 1345 | checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" 1346 | dependencies = [ 1347 | "bitflags", 1348 | "bytes", 1349 | "futures-util", 1350 | "http", 1351 | "http-body", 1352 | "iri-string", 1353 | "pin-project-lite", 1354 | "tower", 1355 | "tower-layer", 1356 | "tower-service", 1357 | ] 1358 | 1359 | [[package]] 1360 | name = "tower-layer" 1361 | version = "0.3.3" 1362 | source = "registry+https://github.com/rust-lang/crates.io-index" 1363 | checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 1364 | 1365 | [[package]] 1366 | name = "tower-service" 1367 | version = "0.3.3" 1368 | source = "registry+https://github.com/rust-lang/crates.io-index" 1369 | checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 1370 | 1371 | [[package]] 1372 | name = "tracing" 1373 | version = "0.1.41" 1374 | source = "registry+https://github.com/rust-lang/crates.io-index" 1375 | checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 1376 | dependencies = [ 1377 | "log", 1378 | "pin-project-lite", 1379 | "tracing-core", 1380 | ] 1381 | 1382 | [[package]] 1383 | name = "tracing-core" 1384 | version = "0.1.33" 1385 | source = "registry+https://github.com/rust-lang/crates.io-index" 1386 | checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" 1387 | dependencies = [ 1388 | "once_cell", 1389 | "valuable", 1390 | ] 1391 | 1392 | [[package]] 1393 | name = "tracing-error" 1394 | version = "0.2.1" 1395 | source = "registry+https://github.com/rust-lang/crates.io-index" 1396 | checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db" 1397 | dependencies = [ 1398 | "tracing", 1399 | "tracing-subscriber", 1400 | ] 1401 | 1402 | [[package]] 1403 | name = "tracing-subscriber" 1404 | version = "0.3.19" 1405 | source = "registry+https://github.com/rust-lang/crates.io-index" 1406 | checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" 1407 | dependencies = [ 1408 | "sharded-slab", 1409 | "thread_local", 1410 | "tracing-core", 1411 | ] 1412 | 1413 | [[package]] 1414 | name = "try-lock" 1415 | version = "0.2.5" 1416 | source = "registry+https://github.com/rust-lang/crates.io-index" 1417 | checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 1418 | 1419 | [[package]] 1420 | name = "unicode-ident" 1421 | version = "1.0.18" 1422 | source = "registry+https://github.com/rust-lang/crates.io-index" 1423 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 1424 | 1425 | [[package]] 1426 | name = "untrusted" 1427 | version = "0.9.0" 1428 | source = "registry+https://github.com/rust-lang/crates.io-index" 1429 | checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 1430 | 1431 | [[package]] 1432 | name = "url" 1433 | version = "2.5.4" 1434 | source = "registry+https://github.com/rust-lang/crates.io-index" 1435 | checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" 1436 | dependencies = [ 1437 | "form_urlencoded", 1438 | "idna", 1439 | "percent-encoding", 1440 | ] 1441 | 1442 | [[package]] 1443 | name = "utf8_iter" 1444 | version = "1.0.4" 1445 | source = "registry+https://github.com/rust-lang/crates.io-index" 1446 | checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 1447 | 1448 | [[package]] 1449 | name = "valuable" 1450 | version = "0.1.1" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 1453 | 1454 | [[package]] 1455 | name = "vcpkg" 1456 | version = "0.2.15" 1457 | source = "registry+https://github.com/rust-lang/crates.io-index" 1458 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1459 | 1460 | [[package]] 1461 | name = "want" 1462 | version = "0.3.1" 1463 | source = "registry+https://github.com/rust-lang/crates.io-index" 1464 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 1465 | dependencies = [ 1466 | "try-lock", 1467 | ] 1468 | 1469 | [[package]] 1470 | name = "wasi" 1471 | version = "0.11.0+wasi-snapshot-preview1" 1472 | source = "registry+https://github.com/rust-lang/crates.io-index" 1473 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1474 | 1475 | [[package]] 1476 | name = "wasi" 1477 | version = "0.14.2+wasi-0.2.4" 1478 | source = "registry+https://github.com/rust-lang/crates.io-index" 1479 | checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" 1480 | dependencies = [ 1481 | "wit-bindgen-rt", 1482 | ] 1483 | 1484 | [[package]] 1485 | name = "wasm-bindgen" 1486 | version = "0.2.100" 1487 | source = "registry+https://github.com/rust-lang/crates.io-index" 1488 | checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 1489 | dependencies = [ 1490 | "cfg-if", 1491 | "once_cell", 1492 | "rustversion", 1493 | "wasm-bindgen-macro", 1494 | ] 1495 | 1496 | [[package]] 1497 | name = "wasm-bindgen-backend" 1498 | version = "0.2.100" 1499 | source = "registry+https://github.com/rust-lang/crates.io-index" 1500 | checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 1501 | dependencies = [ 1502 | "bumpalo", 1503 | "log", 1504 | "proc-macro2", 1505 | "quote", 1506 | "syn", 1507 | "wasm-bindgen-shared", 1508 | ] 1509 | 1510 | [[package]] 1511 | name = "wasm-bindgen-futures" 1512 | version = "0.4.50" 1513 | source = "registry+https://github.com/rust-lang/crates.io-index" 1514 | checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" 1515 | dependencies = [ 1516 | "cfg-if", 1517 | "js-sys", 1518 | "once_cell", 1519 | "wasm-bindgen", 1520 | "web-sys", 1521 | ] 1522 | 1523 | [[package]] 1524 | name = "wasm-bindgen-macro" 1525 | version = "0.2.100" 1526 | source = "registry+https://github.com/rust-lang/crates.io-index" 1527 | checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 1528 | dependencies = [ 1529 | "quote", 1530 | "wasm-bindgen-macro-support", 1531 | ] 1532 | 1533 | [[package]] 1534 | name = "wasm-bindgen-macro-support" 1535 | version = "0.2.100" 1536 | source = "registry+https://github.com/rust-lang/crates.io-index" 1537 | checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 1538 | dependencies = [ 1539 | "proc-macro2", 1540 | "quote", 1541 | "syn", 1542 | "wasm-bindgen-backend", 1543 | "wasm-bindgen-shared", 1544 | ] 1545 | 1546 | [[package]] 1547 | name = "wasm-bindgen-shared" 1548 | version = "0.2.100" 1549 | source = "registry+https://github.com/rust-lang/crates.io-index" 1550 | checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 1551 | dependencies = [ 1552 | "unicode-ident", 1553 | ] 1554 | 1555 | [[package]] 1556 | name = "web-sys" 1557 | version = "0.3.77" 1558 | source = "registry+https://github.com/rust-lang/crates.io-index" 1559 | checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" 1560 | dependencies = [ 1561 | "js-sys", 1562 | "wasm-bindgen", 1563 | ] 1564 | 1565 | [[package]] 1566 | name = "windows-link" 1567 | version = "0.1.1" 1568 | source = "registry+https://github.com/rust-lang/crates.io-index" 1569 | checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" 1570 | 1571 | [[package]] 1572 | name = "windows-registry" 1573 | version = "0.4.0" 1574 | source = "registry+https://github.com/rust-lang/crates.io-index" 1575 | checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" 1576 | dependencies = [ 1577 | "windows-result", 1578 | "windows-strings", 1579 | "windows-targets 0.53.0", 1580 | ] 1581 | 1582 | [[package]] 1583 | name = "windows-result" 1584 | version = "0.3.4" 1585 | source = "registry+https://github.com/rust-lang/crates.io-index" 1586 | checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" 1587 | dependencies = [ 1588 | "windows-link", 1589 | ] 1590 | 1591 | [[package]] 1592 | name = "windows-strings" 1593 | version = "0.3.1" 1594 | source = "registry+https://github.com/rust-lang/crates.io-index" 1595 | checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" 1596 | dependencies = [ 1597 | "windows-link", 1598 | ] 1599 | 1600 | [[package]] 1601 | name = "windows-sys" 1602 | version = "0.52.0" 1603 | source = "registry+https://github.com/rust-lang/crates.io-index" 1604 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 1605 | dependencies = [ 1606 | "windows-targets 0.52.6", 1607 | ] 1608 | 1609 | [[package]] 1610 | name = "windows-sys" 1611 | version = "0.59.0" 1612 | source = "registry+https://github.com/rust-lang/crates.io-index" 1613 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 1614 | dependencies = [ 1615 | "windows-targets 0.52.6", 1616 | ] 1617 | 1618 | [[package]] 1619 | name = "windows-targets" 1620 | version = "0.52.6" 1621 | source = "registry+https://github.com/rust-lang/crates.io-index" 1622 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 1623 | dependencies = [ 1624 | "windows_aarch64_gnullvm 0.52.6", 1625 | "windows_aarch64_msvc 0.52.6", 1626 | "windows_i686_gnu 0.52.6", 1627 | "windows_i686_gnullvm 0.52.6", 1628 | "windows_i686_msvc 0.52.6", 1629 | "windows_x86_64_gnu 0.52.6", 1630 | "windows_x86_64_gnullvm 0.52.6", 1631 | "windows_x86_64_msvc 0.52.6", 1632 | ] 1633 | 1634 | [[package]] 1635 | name = "windows-targets" 1636 | version = "0.53.0" 1637 | source = "registry+https://github.com/rust-lang/crates.io-index" 1638 | checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" 1639 | dependencies = [ 1640 | "windows_aarch64_gnullvm 0.53.0", 1641 | "windows_aarch64_msvc 0.53.0", 1642 | "windows_i686_gnu 0.53.0", 1643 | "windows_i686_gnullvm 0.53.0", 1644 | "windows_i686_msvc 0.53.0", 1645 | "windows_x86_64_gnu 0.53.0", 1646 | "windows_x86_64_gnullvm 0.53.0", 1647 | "windows_x86_64_msvc 0.53.0", 1648 | ] 1649 | 1650 | [[package]] 1651 | name = "windows_aarch64_gnullvm" 1652 | version = "0.52.6" 1653 | source = "registry+https://github.com/rust-lang/crates.io-index" 1654 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 1655 | 1656 | [[package]] 1657 | name = "windows_aarch64_gnullvm" 1658 | version = "0.53.0" 1659 | source = "registry+https://github.com/rust-lang/crates.io-index" 1660 | checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" 1661 | 1662 | [[package]] 1663 | name = "windows_aarch64_msvc" 1664 | version = "0.52.6" 1665 | source = "registry+https://github.com/rust-lang/crates.io-index" 1666 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 1667 | 1668 | [[package]] 1669 | name = "windows_aarch64_msvc" 1670 | version = "0.53.0" 1671 | source = "registry+https://github.com/rust-lang/crates.io-index" 1672 | checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" 1673 | 1674 | [[package]] 1675 | name = "windows_i686_gnu" 1676 | version = "0.52.6" 1677 | source = "registry+https://github.com/rust-lang/crates.io-index" 1678 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 1679 | 1680 | [[package]] 1681 | name = "windows_i686_gnu" 1682 | version = "0.53.0" 1683 | source = "registry+https://github.com/rust-lang/crates.io-index" 1684 | checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" 1685 | 1686 | [[package]] 1687 | name = "windows_i686_gnullvm" 1688 | version = "0.52.6" 1689 | source = "registry+https://github.com/rust-lang/crates.io-index" 1690 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 1691 | 1692 | [[package]] 1693 | name = "windows_i686_gnullvm" 1694 | version = "0.53.0" 1695 | source = "registry+https://github.com/rust-lang/crates.io-index" 1696 | checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" 1697 | 1698 | [[package]] 1699 | name = "windows_i686_msvc" 1700 | version = "0.52.6" 1701 | source = "registry+https://github.com/rust-lang/crates.io-index" 1702 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 1703 | 1704 | [[package]] 1705 | name = "windows_i686_msvc" 1706 | version = "0.53.0" 1707 | source = "registry+https://github.com/rust-lang/crates.io-index" 1708 | checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" 1709 | 1710 | [[package]] 1711 | name = "windows_x86_64_gnu" 1712 | version = "0.52.6" 1713 | source = "registry+https://github.com/rust-lang/crates.io-index" 1714 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 1715 | 1716 | [[package]] 1717 | name = "windows_x86_64_gnu" 1718 | version = "0.53.0" 1719 | source = "registry+https://github.com/rust-lang/crates.io-index" 1720 | checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" 1721 | 1722 | [[package]] 1723 | name = "windows_x86_64_gnullvm" 1724 | version = "0.52.6" 1725 | source = "registry+https://github.com/rust-lang/crates.io-index" 1726 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 1727 | 1728 | [[package]] 1729 | name = "windows_x86_64_gnullvm" 1730 | version = "0.53.0" 1731 | source = "registry+https://github.com/rust-lang/crates.io-index" 1732 | checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" 1733 | 1734 | [[package]] 1735 | name = "windows_x86_64_msvc" 1736 | version = "0.52.6" 1737 | source = "registry+https://github.com/rust-lang/crates.io-index" 1738 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 1739 | 1740 | [[package]] 1741 | name = "windows_x86_64_msvc" 1742 | version = "0.53.0" 1743 | source = "registry+https://github.com/rust-lang/crates.io-index" 1744 | checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" 1745 | 1746 | [[package]] 1747 | name = "wit-bindgen-rt" 1748 | version = "0.39.0" 1749 | source = "registry+https://github.com/rust-lang/crates.io-index" 1750 | checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" 1751 | dependencies = [ 1752 | "bitflags", 1753 | ] 1754 | 1755 | [[package]] 1756 | name = "writeable" 1757 | version = "0.6.1" 1758 | source = "registry+https://github.com/rust-lang/crates.io-index" 1759 | checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" 1760 | 1761 | [[package]] 1762 | name = "yoke" 1763 | version = "0.8.0" 1764 | source = "registry+https://github.com/rust-lang/crates.io-index" 1765 | checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" 1766 | dependencies = [ 1767 | "serde", 1768 | "stable_deref_trait", 1769 | "yoke-derive", 1770 | "zerofrom", 1771 | ] 1772 | 1773 | [[package]] 1774 | name = "yoke-derive" 1775 | version = "0.8.0" 1776 | source = "registry+https://github.com/rust-lang/crates.io-index" 1777 | checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" 1778 | dependencies = [ 1779 | "proc-macro2", 1780 | "quote", 1781 | "syn", 1782 | "synstructure", 1783 | ] 1784 | 1785 | [[package]] 1786 | name = "zerofrom" 1787 | version = "0.1.6" 1788 | source = "registry+https://github.com/rust-lang/crates.io-index" 1789 | checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" 1790 | dependencies = [ 1791 | "zerofrom-derive", 1792 | ] 1793 | 1794 | [[package]] 1795 | name = "zerofrom-derive" 1796 | version = "0.1.6" 1797 | source = "registry+https://github.com/rust-lang/crates.io-index" 1798 | checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" 1799 | dependencies = [ 1800 | "proc-macro2", 1801 | "quote", 1802 | "syn", 1803 | "synstructure", 1804 | ] 1805 | 1806 | [[package]] 1807 | name = "zeroize" 1808 | version = "1.8.1" 1809 | source = "registry+https://github.com/rust-lang/crates.io-index" 1810 | checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 1811 | 1812 | [[package]] 1813 | name = "zerotrie" 1814 | version = "0.2.2" 1815 | source = "registry+https://github.com/rust-lang/crates.io-index" 1816 | checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" 1817 | dependencies = [ 1818 | "displaydoc", 1819 | "yoke", 1820 | "zerofrom", 1821 | ] 1822 | 1823 | [[package]] 1824 | name = "zerovec" 1825 | version = "0.11.2" 1826 | source = "registry+https://github.com/rust-lang/crates.io-index" 1827 | checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" 1828 | dependencies = [ 1829 | "yoke", 1830 | "zerofrom", 1831 | "zerovec-derive", 1832 | ] 1833 | 1834 | [[package]] 1835 | name = "zerovec-derive" 1836 | version = "0.11.1" 1837 | source = "registry+https://github.com/rust-lang/crates.io-index" 1838 | checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" 1839 | dependencies = [ 1840 | "proc-macro2", 1841 | "quote", 1842 | "syn", 1843 | ] 1844 | -------------------------------------------------------------------------------- /backend/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "shinnku-com-backend" 3 | version = "0.1.0" 4 | edition = "2024" 5 | 6 | [dependencies] 7 | axum = "0.8.4" 8 | serde = { version = "1.0.219", features = ["derive"] } 9 | tokio = { version = "1.45.0", features = ["full"] } 10 | reqwest = { version = "0.12.19", features = ["json"] } 11 | anyhow = "1" 12 | color-eyre = "0.6" 13 | -------------------------------------------------------------------------------- /backend/database/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore the directory where the RAG Chroma database is generated 2 | beg_rag_chroma_generate/ 3 | beg_rag_chroma/ 4 | -------------------------------------------------------------------------------- /backend/src/handlers.rs: -------------------------------------------------------------------------------- 1 | use axum::{extract::Query, http::StatusCode, response::IntoResponse}; 2 | use reqwest::Client; 3 | use serde::Deserialize; 4 | 5 | #[derive(Deserialize)] 6 | pub struct NameQuery { 7 | pub name: Option, 8 | } 9 | 10 | async fn proxy(path: &str, name: Option) -> impl IntoResponse { 11 | let client = Client::new(); 12 | let url = format!("http://127.0.0.1:2998{}", path); 13 | let req = if let Some(ref n) = name { 14 | client.get(&url).query(&[("name", n)]) 15 | } else { 16 | client.get(&url) 17 | }; 18 | match req.send().await { 19 | Ok(resp) => { 20 | let status = StatusCode::from_u16(resp.status().as_u16()) 21 | .unwrap_or(StatusCode::INTERNAL_SERVER_ERROR); 22 | match resp.bytes().await { 23 | Ok(body) => (status, body).into_response(), 24 | Err(_) => StatusCode::INTERNAL_SERVER_ERROR.into_response(), 25 | } 26 | } 27 | Err(_) => (StatusCode::BAD_GATEWAY, "Failed to proxy request").into_response(), 28 | } 29 | } 30 | 31 | pub async fn intro(Query(params): Query) -> impl IntoResponse { 32 | proxy("/intro", params.name).await 33 | } 34 | 35 | pub async fn find_name(Query(params): Query) -> impl IntoResponse { 36 | proxy("/findname", params.name).await 37 | } 38 | -------------------------------------------------------------------------------- /backend/src/main.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | use axum::{routing::get, Router}; 3 | 4 | mod handlers; 5 | 6 | use handlers::{find_name, intro}; 7 | 8 | #[tokio::main] 9 | async fn main() -> Result<()> { 10 | color_eyre::install().expect("Failed to install error reporting"); 11 | 12 | let app = Router::new() 13 | .route("/intro", get(intro)) 14 | .route("/findname", get(find_name)); 15 | 16 | let listener = tokio::net::TcpListener::bind(("127.0.0.1", 2999)).await?; 17 | let addr = listener.local_addr()?; 18 | println!("Listening on {}", addr); 19 | axum::serve(listener, app).await?; 20 | Ok(()) 21 | } 22 | -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | /.pnp 6 | .pnp.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/versions 12 | 13 | # testing 14 | /coverage 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | 20 | # production 21 | /build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | .pnpm-debug.log* 32 | 33 | # env files (can opt-in for committing if needed) 34 | .env* 35 | 36 | # vercel 37 | .vercel 38 | 39 | # typescript 40 | *.tsbuildinfo 41 | next-env.d.ts 42 | .cache 43 | /data 44 | 45 | tmp/ 46 | config.yaml 47 | log.txt 48 | start.sh 49 | *.zip 50 | config.toml 51 | *.db 52 | 53 | tmp.* 54 | 55 | -------------------------------------------------------------------------------- /frontend/.npmrc: -------------------------------------------------------------------------------- 1 | public-hoist-pattern[]=*@heroui/* 2 | package-lock=true 3 | -------------------------------------------------------------------------------- /frontend/.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | .next 4 | build 5 | -------------------------------------------------------------------------------- /frontend/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "bracketSpacing": true, 3 | "jsxSingleQuote": true, 4 | "printWidth": 80, 5 | "proseWrap": "always", 6 | "semi": false, 7 | "singleQuote": true, 8 | "tabWidth": 2, 9 | "trailingComma": "all", 10 | "plugins": ["prettier-plugin-tailwindcss"] 11 | } 12 | -------------------------------------------------------------------------------- /frontend/algorithm/search.ts: -------------------------------------------------------------------------------- 1 | import Fuse, { IFuseOptions } from 'fuse.js' 2 | import * as OpenCC from 'opencc-js' 3 | 4 | import { trim_file_path } from './url' 5 | 6 | import { BucketFiles, SearchItem, SearchList } from '@/types' 7 | import { search_index } from '@/config/root' 8 | 9 | // export const cn2tw = OpenCC.Converter({ from: 'cn', to: 'tw' }) 10 | // export const tw2cn = OpenCC.Converter({ from: 'tw', to: 'cn' }) 11 | export const cn2jp = OpenCC.Converter({ from: 'cn', to: 'jp' }) 12 | 13 | const options: IFuseOptions = { 14 | includeScore: true, 15 | ignoreLocation: true, 16 | ignoreFieldNorm: true, 17 | threshold: 0.78, 18 | keys: ['id'], 19 | } 20 | 21 | export function runsearch(query: string, files: SearchList): SearchList { 22 | const fuse = new Fuse(files, options) 23 | const tmp = fuse.search(query) 24 | 25 | return tmp.map((result) => result.item) 26 | } 27 | 28 | // function removeDuplicateCharacters(combinedQuery: string): string { 29 | // return Array.from(new Set(nodejieba.cut(combinedQuery, true))).join('') 30 | // } 31 | 32 | export function aggregate_builder(...b: Array) { 33 | return b.flat().map((item) => { 34 | return { 35 | id: trim_file_path(item.file_path), 36 | info: item, 37 | } 38 | }) 39 | } 40 | 41 | export async function ai_search(q: string, n: number): Promise { 42 | const queryjp = cn2jp(q) 43 | const serviceUrl = process.env.AI_SERVICE_URL || 'http://localhost:2999' 44 | const queryai = await fetch( 45 | `${serviceUrl}/findname?name=${encodeURIComponent(q)}`, 46 | ) 47 | .then((res) => res.json()) 48 | .then((data) => data.ans[0] || '') 49 | .catch((_error) => { 50 | return '' 51 | }) 52 | 53 | const fuse = new Fuse(search_index, options) 54 | const ai_res = fuse 55 | .search(q + ' ' + queryai) 56 | .map((result) => ({ item: result.item, score: result.score })) 57 | const traditional_results = fuse 58 | .search(q + ' ' + queryjp) 59 | .map((result) => ({ item: result.item, score: result.score })) 60 | 61 | const results: Array<{ item: SearchItem; score: number | undefined }> = [] 62 | 63 | for (const res of ai_res) { 64 | if (res.score) { 65 | results.push(res) 66 | } 67 | } 68 | for (const res of traditional_results) { 69 | if (res.score) { 70 | const existing_result_index = results.findIndex( 71 | (r) => r.item.id === res.item.id, 72 | ) 73 | 74 | if (existing_result_index !== -1) { 75 | if (results[existing_result_index].score && res.score) { 76 | results[existing_result_index].score = 77 | (results[existing_result_index].score ?? 0) / 2 + 78 | (res.score ?? 0) / 2 79 | } 80 | } else { 81 | results.push(res) 82 | } 83 | } 84 | } 85 | 86 | return results 87 | .sort((a, b) => { 88 | return (a.score ?? 0) - (b.score ?? 0) 89 | }) 90 | .slice(0, n) 91 | .map((result) => result.item) 92 | } 93 | 94 | export function default_search(q: string, n: number): SearchItem[] { 95 | const queryjp = cn2jp(q) 96 | // const query = removeDuplicateCharacters(q + queryjp) 97 | 98 | const results = runsearch(q + queryjp, search_index).slice(0, n) 99 | 100 | return results 101 | } 102 | -------------------------------------------------------------------------------- /frontend/algorithm/tree.ts: -------------------------------------------------------------------------------- 1 | import { BucketFiles, FileInfo, Inode, TreeNode, Variety } from '@/types' 2 | 3 | export function generateTree(fileList: BucketFiles): TreeNode { 4 | const root: TreeNode = {} 5 | 6 | for (const file of fileList) { 7 | const filePath = file.file_path 8 | const pathParts = filePath.split('/') 9 | let pointer: TreeNode = root 10 | const l = pathParts.length - 1 11 | 12 | for (let i = 0; i < l; i++) { 13 | const part = pathParts[i] 14 | 15 | if (pointer[part] === undefined) { 16 | pointer[part] = {} 17 | } 18 | pointer = pointer[part] as TreeNode 19 | } 20 | pointer[pathParts[l]] = file 21 | } 22 | 23 | return root 24 | } 25 | 26 | export function node2list(node: TreeNode): Inode { 27 | const inode: Inode = [] 28 | 29 | for (const child in node) { 30 | const value = node[child] 31 | 32 | if ((value as FileInfo).file_path) { 33 | inode.push({ 34 | type: 'file', 35 | name: child, 36 | info: value as FileInfo, 37 | }) 38 | } else { 39 | inode.push({ 40 | type: 'folder', 41 | name: child, 42 | }) 43 | } 44 | } 45 | 46 | return inode 47 | } 48 | 49 | export function checknodevariety( 50 | node: TreeNode | FileInfo | undefined, 51 | ): Variety { 52 | if (!node) { 53 | return '404' 54 | } 55 | 56 | if ((node as FileInfo).file_path) { 57 | return 'file' 58 | } 59 | 60 | return 'folder' 61 | } 62 | -------------------------------------------------------------------------------- /frontend/algorithm/url.ts: -------------------------------------------------------------------------------- 1 | import { GameType, Node } from '@/types' 2 | 3 | export function generateHref(item: Node, slug: string[]) { 4 | const a = ['', 'files', ...slug, item.name] 5 | 6 | return a.map(encodeURIComponent).join('/') 7 | } 8 | 9 | export function generate_download_url(file_path: string[]): string { 10 | if (file_path[0] == '合集系列') { 11 | let url = 'https://galgame0.shinnku.top/file/galgame0/' 12 | 13 | return `${url}${file_path.map(encodeURIComponent).join('/')}` 14 | } else { 15 | let url = 'https://dl.oo0o.ooo/file/shinnku/' 16 | 17 | return `${url}${file_path.map(encodeURIComponent).join('/')}` 18 | } 19 | } 20 | 21 | export function trim_file_path(file_path: string) { 22 | const prefix = '合集系列/' 23 | 24 | if (file_path.startsWith(prefix)) { 25 | return file_path.slice(prefix.length) 26 | } 27 | 28 | return file_path 29 | } 30 | 31 | export function get_game_type(file_path: string): GameType { 32 | if (file_path.startsWith('合集系列')) { 33 | return '生肉' 34 | } else if (file_path.startsWith('zd')) { 35 | return '熟肉' 36 | } else if (file_path.startsWith('0/win')) { 37 | return '熟肉' 38 | } else return '手机' 39 | } 40 | 41 | export function trim_wikipedia_ans(text: string) { 42 | const p1 = text.indexOf('== 參考') 43 | const t1 = p1 != -1 ? text.substring(0, p1) : text 44 | 45 | const p2 = t1.indexOf('== 参考') 46 | const t2 = p2 != -1 ? t1.substring(0, p2) : t1 47 | 48 | return t2 49 | } 50 | 51 | export function wikipediaToMarkdown(wikipediaText: string): string { 52 | const regex = /^(={2,})\s*(.*?)\s*(={2,})$/gm 53 | 54 | return wikipediaText.replace(regex, (match, startEquals, title) => { 55 | const level = startEquals.length 56 | const markdownHashes = '#'.repeat(level) 57 | 58 | return `${markdownHashes} ${title}` 59 | }) 60 | } 61 | -------------------------------------------------------------------------------- /frontend/algorithm/util.ts: -------------------------------------------------------------------------------- 1 | export const sizeUnit = [ 2 | ['B', Math.pow(2, 0)], 3 | ['KB', Math.pow(2, 10)], 4 | ['MB', Math.pow(2, 20)], 5 | ['GB', Math.pow(2, 30)], 6 | ['TB', Math.pow(2, 40)], 7 | ['PB', Math.pow(2, 50)], 8 | ['EB', Math.pow(2, 60)], 9 | ['ZB', Math.pow(2, 70)], 10 | ['YB', Math.pow(2, 80)], 11 | ] 12 | 13 | export function num2size(num: number): string { 14 | if (num === 0) return '0' 15 | let size = num 16 | let i = 0 17 | 18 | for (; i < sizeUnit.length; ++i) { 19 | const t = num / (sizeUnit[i][1] as number) 20 | 21 | if (t > 1) size = t 22 | else break 23 | } 24 | 25 | return `${size.toFixed(2)} ${sizeUnit[i - 1][0]}` 26 | } 27 | -------------------------------------------------------------------------------- /frontend/algorithm/wiki.ts: -------------------------------------------------------------------------------- 1 | import Redis from 'ioredis' 2 | 3 | import { config } from '@/config/root' 4 | import { WikipediaAnswer } from '@/types/wiki' 5 | 6 | export type Lang = 'ja' | 'zh' | 'en' 7 | 8 | const redisClient = new Redis({ 9 | host: config.redis.host, 10 | port: config.redis.port, 11 | password: config.redis.password, 12 | db: config.redis.database, 13 | }) 14 | 15 | const emptyanswer = { 16 | title: '', 17 | text: '', 18 | } 19 | 20 | function assertLang(lang: string): asserts lang is Lang { 21 | const validLangs: Lang[] = ['ja', 'zh', 'en'] 22 | 23 | if (!validLangs.includes(lang as Lang)) { 24 | throw new Error( 25 | `Invalid Lang type: ${lang}. Must be one of ${validLangs.join(', ')}`, 26 | ) 27 | } 28 | } 29 | 30 | export async function wikifullsearch( 31 | query: string, 32 | lang: Lang = 'zh', 33 | ): Promise { 34 | const queurl = `https://${lang}.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=${query}&srlimit=1` 35 | 36 | const res = await (await fetch(queurl)).json() 37 | 38 | try { 39 | assertLang(lang) 40 | const pageid: number = res['query']['search'][0]['pageid'] 41 | 42 | const quer = `https://${lang}.wikipedia.org/w/api.php?action=query&format=json&pageids=${pageid}&prop=info|categories|langlinks|extracts&explaintext=&` 43 | const ans = await (await fetch(quer)).json() 44 | 45 | const context = ans['query']['pages'][`${pageid}`] 46 | 47 | return { 48 | title: context['title'], 49 | text: context['extract'], 50 | } 51 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 52 | } catch (e) { 53 | return emptyanswer 54 | } 55 | } 56 | 57 | export async function wikisearchpicture(query: string): Promise { 58 | let pageid: number 59 | const ans = await redisClient.get(`cache:search:wiki:zh:${query}`) 60 | 61 | if (ans) { 62 | pageid = parseInt(ans, 10) 63 | const bg = await redisClient.get(`img:wiki:zh:${pageid}`) 64 | 65 | if (bg) { 66 | return bg 67 | } 68 | } 69 | 70 | return null 71 | } 72 | 73 | export async function wikiredissearch( 74 | query: string, 75 | lang: Lang = 'zh', 76 | ): Promise { 77 | let pageid: number 78 | 79 | try { 80 | assertLang(lang) 81 | const ans = await redisClient.get(`cache:search:wiki:${lang}:${query}`) 82 | 83 | if (ans) { 84 | pageid = parseInt(ans, 10) 85 | } else { 86 | const queurl = `https://${lang}.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=${query}&srlimit=1` 87 | const res = await (await fetch(queurl)).json() 88 | 89 | pageid = res['query']['search'][0]['pageid'] 90 | } 91 | } catch { 92 | return emptyanswer 93 | } 94 | 95 | try { 96 | const ans = await redisClient.hmget( 97 | `wikipedia:${lang}:${pageid}`, 98 | 'title', 99 | 'text', 100 | ) 101 | 102 | if (ans[0] && ans[1]) { 103 | const bg = await redisClient.get(`img:wiki:${lang}:${pageid}`) 104 | 105 | if (bg) { 106 | return { 107 | title: ans[0], 108 | text: ans[1], 109 | bg: bg, 110 | } 111 | } else 112 | return { 113 | title: ans[0], 114 | text: ans[1], 115 | } 116 | } else if (lang == 'ja') { 117 | return emptyanswer 118 | } else { 119 | return wikiredissearch(query, 'ja') 120 | } 121 | } catch { 122 | return emptyanswer 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /frontend/app/about/layout.tsx: -------------------------------------------------------------------------------- 1 | export default function AboutLayout({ 2 | children, 3 | }: { 4 | children: React.ReactNode 5 | }) { 6 | return ( 7 |
8 |
9 | {children} 10 |
11 |
12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /frontend/app/about/page.tsx: -------------------------------------------------------------------------------- 1 | import { title } from '@/components/primitives' 2 | import { t } from '@/i18n' 3 | 4 | export default function AboutPage() { 5 | return ( 6 |
7 |

About

8 |

{t('aboutUnderConstruction')}

9 |
10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /frontend/app/api/aiintro/route.ts: -------------------------------------------------------------------------------- 1 | import { NextResponse, NextRequest } from 'next/server' 2 | 3 | import { wikisearchpicture } from '@/algorithm/wiki' 4 | 5 | export async function GET(req: NextRequest) { 6 | const { searchParams } = new URL(req.url) 7 | const name = searchParams.get('name') as string 8 | const bg = await wikisearchpicture(name) 9 | const intro = await fetch(`http://localhost:2999/intro?name=${name}`) 10 | 11 | if (intro.ok) { 12 | const text = await intro.text() 13 | 14 | if (text.includes('No results found.')) { 15 | return NextResponse.json({ bg: bg || null }) 16 | } else { 17 | let title = text.split('\n')[0] 18 | 19 | return NextResponse.json({ 20 | bg: bg || null, 21 | title: title, 22 | text: text, 23 | }) 24 | } 25 | } 26 | 27 | return NextResponse.json({ bg: bg || null }) 28 | } 29 | -------------------------------------------------------------------------------- /frontend/app/api/hello/route.ts: -------------------------------------------------------------------------------- 1 | import { NextResponse, NextRequest } from 'next/server' 2 | 3 | type Data = { 4 | message: string 5 | } 6 | 7 | export async function GET(_req: NextRequest) { 8 | const data: Data = { message: 'Hello by shinnku' } 9 | 10 | return NextResponse.json(data) 11 | } 12 | -------------------------------------------------------------------------------- /frontend/app/api/wiki/route.ts: -------------------------------------------------------------------------------- 1 | import { NextResponse, NextRequest } from 'next/server' 2 | 3 | import { Lang, wikiredissearch } from '@/algorithm/wiki' 4 | import { WikipediaAnswer } from '@/types/wiki' 5 | 6 | export async function GET(req: NextRequest) { 7 | const { searchParams } = new URL(req.url) 8 | const name = searchParams.get('name') as string 9 | const lang = searchParams.get('lang') as Lang 10 | let ans: WikipediaAnswer 11 | 12 | if (lang) { 13 | ans = await wikiredissearch(name.substring(0, 40), lang) 14 | } else { 15 | ans = await wikiredissearch(name.substring(0, 40)) 16 | } 17 | 18 | return NextResponse.json(ans) 19 | } 20 | -------------------------------------------------------------------------------- /frontend/app/blog/layout.tsx: -------------------------------------------------------------------------------- 1 | export default function BlogLayout({ 2 | children, 3 | }: { 4 | children: React.ReactNode 5 | }) { 6 | return ( 7 |
8 |
9 | {children} 10 |
11 |
12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /frontend/app/blog/page.tsx: -------------------------------------------------------------------------------- 1 | import { title } from '@/components/primitives' 2 | 3 | export default function BlogPage() { 4 | return ( 5 |
6 |

Blog

7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /frontend/app/docs/[...slug]/metadata.ts: -------------------------------------------------------------------------------- 1 | import type { Metadata } from 'next' 2 | import type { KunBlog } from '@/lib/mdx/types' 3 | 4 | export const generateKunMetadataTemplate = (blog: KunBlog): Metadata => { 5 | const { frontmatter } = blog 6 | 7 | return { 8 | title: `${frontmatter.title}`, 9 | description: frontmatter.description, 10 | openGraph: { 11 | title: frontmatter.title, 12 | description: frontmatter.description, 13 | type: 'article', 14 | publishedTime: frontmatter.date, 15 | modifiedTime: frontmatter.date, 16 | images: [ 17 | { 18 | url: frontmatter.banner, 19 | width: 1920, 20 | height: 1080, 21 | alt: frontmatter.title, 22 | }, 23 | ], 24 | }, 25 | twitter: { 26 | card: 'summary_large_image', 27 | title: frontmatter.title, 28 | description: frontmatter.description, 29 | images: [frontmatter.banner], 30 | }, 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /frontend/app/docs/[...slug]/page.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from 'next' 2 | 3 | import { generateKunMetadataTemplate } from './metadata' 4 | 5 | import { 6 | getAdjacentPosts, 7 | getAllPosts, 8 | getPostBySlug, 9 | } from '@/lib/mdx/getPosts' 10 | import { CustomMDX } from '@/lib/mdx/CustomMDX' 11 | import { TableOfContents } from '@/components/docs/TableOfContents' 12 | import { KunBottomNavigation } from '@/components/docs/Navigation' 13 | import { BlogHeader } from '@/components/docs/BlogHeader' 14 | 15 | interface Props { 16 | params: Promise<{ 17 | slug: string[] 18 | }> 19 | } 20 | 21 | export const generateStaticParams = async () => { 22 | const posts = getAllPosts() 23 | 24 | return posts.map((post) => ({ 25 | slug: post.slug.split('/'), 26 | })) 27 | } 28 | 29 | export const generateMetadata = async ({ 30 | params, 31 | }: Props): Promise => { 32 | const { slug } = await params 33 | const url = slug.join('/') 34 | const blog = getPostBySlug(url) 35 | 36 | return generateKunMetadataTemplate(blog) 37 | } 38 | 39 | export default async function Kun({ params }: Props) { 40 | const { slug } = await params 41 | const url = slug.join('/') 42 | const { content, frontmatter } = getPostBySlug(url) 43 | const { prev, next } = getAdjacentPosts(url) 44 | 45 | return ( 46 |
47 |
48 | 49 |
50 | 51 |
52 | 53 |
54 | 55 |
56 |
57 | 58 |
59 |
60 |
61 | ) 62 | } 63 | -------------------------------------------------------------------------------- /frontend/app/docs/layout.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from 'react' 2 | 3 | import { KunSidebar } from '@/components/docs/Sidebar' 4 | import { getDirectoryTree } from '@/lib/mdx/directoryTree' 5 | 6 | interface LayoutProps { 7 | children: ReactNode 8 | } 9 | 10 | export default function Layout({ children }: LayoutProps) { 11 | const tree = getDirectoryTree() 12 | 13 | return ( 14 |
15 | 16 |
17 | {children} 18 |
19 |
20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /frontend/app/docs/metadata.ts: -------------------------------------------------------------------------------- 1 | import type { Metadata } from 'next' 2 | 3 | import { t } from '@/i18n' 4 | 5 | export const kunMetadata: Metadata = { 6 | title: t('docsTitle'), 7 | } 8 | -------------------------------------------------------------------------------- /frontend/app/docs/page.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from 'next' 2 | 3 | import { kunMetadata } from './metadata' 4 | 5 | import { getAllPosts } from '@/lib/mdx/getPosts' 6 | import { KunAboutCard } from '@/components/docs/Card' 7 | import { KunMasonryGrid } from '@/components/MasonryGrid' 8 | 9 | export const metadata: Metadata = kunMetadata 10 | 11 | export default function Kun() { 12 | const posts = getAllPosts() 13 | 14 | return ( 15 |
16 |
17 | 18 | {posts.map((post) => ( 19 | 20 | ))} 21 | 22 |
23 |
24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /frontend/app/error.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import { useEffect } from 'react' 4 | 5 | import { t } from '@/i18n' 6 | 7 | export default function Error({ 8 | error, 9 | reset, 10 | }: { 11 | error: Error 12 | reset: () => void 13 | }) { 14 | useEffect(() => { 15 | // Log the error to an error reporting service 16 | /* eslint-disable no-console */ 17 | console.error(error) 18 | }, [error]) 19 | 20 | return ( 21 |
22 |

{t('errorSomethingWrong')}

23 | 31 |
32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /frontend/app/files/[...slug]/page.tsx: -------------------------------------------------------------------------------- 1 | import { notFound } from 'next/navigation' 2 | 3 | import { checknodevariety, node2list } from '@/algorithm/tree' 4 | import { Sidebar } from '@/components/sidebar' 5 | import { FileList } from '@/components/fileList' 6 | import { tree } from '@/config/root' 7 | import { RoundArrowButton } from '@/components/returnButton' 8 | import { GameIntro } from '@/components/gameIntro' 9 | 10 | export default async function BrowserPage({ 11 | params, 12 | }: { 13 | params: Promise<{ slug: string[] }> 14 | }) { 15 | const origin_slug = (await params).slug 16 | const slug = origin_slug.map(decodeURIComponent) 17 | 18 | origin_slug.pop() 19 | let node: any = tree 20 | 21 | try { 22 | for (const key of slug) { 23 | node = node[key] 24 | } 25 | } catch { 26 | notFound() 27 | } 28 | 29 | let variety = checknodevariety(node) 30 | 31 | if (variety === '404') { 32 | notFound() 33 | } 34 | 35 | const inode = node2list(node) 36 | 37 | return ( 38 |
39 | 40 | 41 |
42 | {variety === 'file' ? ( 43 | 44 | ) : ( 45 | 46 | )} 47 |
48 |
49 | ) 50 | } 51 | -------------------------------------------------------------------------------- /frontend/app/files/layout.tsx: -------------------------------------------------------------------------------- 1 | export default function FilesLayout({ 2 | children, 3 | }: { 4 | children: React.ReactNode 5 | }) { 6 | return
{children}
7 | } 8 | -------------------------------------------------------------------------------- /frontend/app/files/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import Link from 'next/link' 4 | import { Card, CardBody } from '@heroui/react' 5 | 6 | import { title } from '@/components/primitives' 7 | import { IndexList } from '@/config/indexList' 8 | import { t } from '@/i18n' 9 | 10 | export default function FilesPage() { 11 | return ( 12 |
13 |

{t('allGames')}

14 |
15 | {IndexList.map((item, index) => ( 16 | 24 | 25 | {item.body} 26 | {item.title} 27 | 28 | 29 | ))} 30 |
31 |
32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /frontend/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import { Metadata, Viewport } from 'next' 2 | import { Link } from '@heroui/link' 3 | import Script from 'next/script' 4 | import '@/styles/index.css' 5 | 6 | import { Providers } from './providers' 7 | 8 | import { cn } from '@/utils/cn' 9 | import { siteConfig } from '@/config/site' 10 | import { fontSans } from '@/config/fonts' 11 | import { Navbar } from '@/components/navbar' 12 | 13 | export const metadata: Metadata = { 14 | title: { 15 | default: siteConfig.name, 16 | template: `%s - ${siteConfig.name}`, 17 | }, 18 | description: siteConfig.description, 19 | icons: { 20 | icon: '/favicon.ico', 21 | }, 22 | } 23 | 24 | export const viewport: Viewport = { 25 | themeColor: [ 26 | { media: '(prefers-color-scheme: light)', color: 'white' }, 27 | { media: '(prefers-color-scheme: dark)', color: 'black' }, 28 | ], 29 | } 30 | 31 | export default function RootLayout({ 32 | children, 33 | }: { 34 | children: React.ReactNode 35 | }) { 36 | return ( 37 | 38 | 39 | 51 |