diff --git a/package.json b/package.json index 00210d5..592ab9c 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "eslint": "^9.9.0", "eslint-plugin-vue": "^9.27.0", + "pyodide": "^0.26.2", "vue": "^3.4.37", "vue-router": "4" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 775fd7a..fc915be 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,9 +14,9 @@ importers: eslint-plugin-vue: specifier: ^9.27.0 version: 9.27.0(eslint@9.9.0) - rd-a: - specifier: 'file:' - version: file:(typescript@5.5.4) + pyodide: + specifier: ^0.26.2 + version: 0.26.2 vue: specifier: ^3.4.37 version: 3.4.38(typescript@5.5.4) @@ -729,12 +729,13 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + pyodide@0.26.2: + resolution: {integrity: sha512-8VCRdFX83gBsWs6XP2rhG8HMaB+JaVyyav4q/EMzoV8fXH8HN6T5IISC92SNma6i1DRA3SVXA61S1rJcB8efgA==} + engines: {node: '>=18.0.0'} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - 'rd-a@file:': - resolution: {directory: '', type: directory} - resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -877,6 +878,18 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + xml-name-validator@4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} @@ -1515,18 +1528,14 @@ snapshots: punycode@2.3.1: {} - queue-microtask@1.2.3: {} - - rd-a@file:(typescript@5.5.4): + pyodide@0.26.2: dependencies: - eslint: 9.9.0 - eslint-plugin-vue: 9.27.0(eslint@9.9.0) - vue: 3.4.38(typescript@5.5.4) - vue-router: 4.4.3(vue@3.4.38(typescript@5.5.4)) + ws: 8.18.0 transitivePeerDependencies: - - jiti - - supports-color - - typescript + - bufferutil + - utf-8-validate + + queue-microtask@1.2.3: {} resolve-from@4.0.0: {} @@ -1650,6 +1659,8 @@ snapshots: word-wrap@1.2.5: {} + ws@8.18.0: {} + xml-name-validator@4.0.0: {} yocto-queue@0.1.0: {} diff --git a/public/micropip-0.6.0-py3-none-any.whl b/public/micropip-0.6.0-py3-none-any.whl new file mode 100644 index 0000000..06d0c89 Binary files /dev/null and b/public/micropip-0.6.0-py3-none-any.whl differ diff --git a/public/packaging-24.1-py3-none-any.whl b/public/packaging-24.1-py3-none-any.whl new file mode 100644 index 0000000..7db6e56 Binary files /dev/null and b/public/packaging-24.1-py3-none-any.whl differ diff --git a/src/router/router.ts b/src/router/router.ts index c9225d6..60530db 100644 --- a/src/router/router.ts +++ b/src/router/router.ts @@ -13,6 +13,18 @@ const routes = [ }, { path: '/source', component: () => import('@/views/source/source.vue') + }, { + path: '/tools', + children: [ + { + path: 'acacia', + component: () => import('@/views/tools/AcaciaMCView.vue') + }, + { + path: 'rssearch', + component: () => import('@/views/tools/RSSearchView.vue') + } + ] } ] diff --git a/src/views/tools/AcaciaMCView.vue b/src/views/tools/AcaciaMCView.vue new file mode 100644 index 0000000..b409338 --- /dev/null +++ b/src/views/tools/AcaciaMCView.vue @@ -0,0 +1,176 @@ + + + + + diff --git a/src/views/tools/RSSearchView.vue b/src/views/tools/RSSearchView.vue new file mode 100644 index 0000000..690c231 --- /dev/null +++ b/src/views/tools/RSSearchView.vue @@ -0,0 +1,193 @@ + + + + + diff --git a/vite.config.ts b/vite.config.ts index 2fb3bb3..690b01c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,9 +1,34 @@ +import { copyFile, mkdir } from "fs/promises"; +import { join } from "path"; + import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import path from 'path' export default defineConfig({ - plugins: [vue()], + optimizeDeps: { exclude: ["pyodide"] }, // For Pyodide + plugins: [ + { // For Pyodide + name: "vite-plugin-pyodide", + generateBundle: async () => { + const assetsDir = "dist/assets"; + await mkdir(assetsDir, { recursive: true }); + const files = [ + "pyodide-lock.json", + "pyodide.asm.js", + "pyodide.asm.wasm", + "python_stdlib.zip", + ]; + for (const file of files) { + await copyFile( + join("node_modules/pyodide", file), + join(assetsDir, file) + ); + } + }, + }, + vue(), + ], resolve: { alias: { '@': path.resolve(__dirname, './src'),