From d1740467e816c6bf5a657410f838f21d11735d02 Mon Sep 17 00:00:00 2001 From: Guyutongxue Date: Sun, 5 May 2024 16:23:40 +0800 Subject: [PATCH] add a service worker --- package.json | 2 +- pnpm-lock.yaml | 838 ++++++++++++++++++++++++++----------------------- public/sw.js | 71 +++++ src/main.ts | 10 +- 4 files changed, 523 insertions(+), 398 deletions(-) create mode 100644 public/sw.js diff --git a/package.json b/package.json index f5bce1a..595c629 100644 --- a/package.json +++ b/package.json @@ -29,5 +29,5 @@ "monaco-editor": "$monaco-editor", "vscode": "$vscode" }, - "packageManager": "pnpm@8.13.1" + "packageManager": "pnpm@9.0.6" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a652aa8..e865de8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,649 +1,394 @@ -lockfileVersion: '6.0' +lockfileVersion: '9.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false -dependencies: - '@codingame/monaco-vscode-language-pack-zh-hans': - specifier: ~1.85.6 - version: 1.85.6 - '@codingame/monaco-vscode-theme-defaults-default-extension': - specifier: ~1.85.6 - version: 1.85.6 - ansi_up: - specifier: ^6.0.2 - version: 6.0.2 - iframe-resizer: - specifier: ^4.3.9 - version: 4.3.9 - monaco-editor: - specifier: npm:@codingame/monaco-editor-treemended@>=1.85.0 <1.86.0 - version: /@codingame/monaco-editor-treemended@1.85.6 - monaco-languageclient: - specifier: '>= 7.3.0 < 7.4.0' - version: 7.3.0(@codingame/monaco-editor-treemended@1.85.6)(@codingame/monaco-vscode-api@1.85.6) - vscode: - specifier: npm:@codingame/monaco-vscode-api@>=1.85.0 <1.86.0 - version: /@codingame/monaco-vscode-api@1.85.6 - vscode-languageserver: - specifier: ~9.0.1 - version: 9.0.1 - -devDependencies: - '@types/emscripten': - specifier: ^1.39.10 - version: 1.39.10 - '@types/node': - specifier: ^20.4.0 - version: 20.11.7 - '@types/vscode': - specifier: ~1.85.0 - version: 1.85.0 - typescript: - specifier: ^5.2.2 - version: 5.3.3 - vite: - specifier: ^5.0.8 - version: 5.0.12(@types/node@20.11.7) +importers: + + .: + dependencies: + '@codingame/monaco-vscode-language-pack-zh-hans': + specifier: ~1.85.6 + version: 1.85.6 + '@codingame/monaco-vscode-theme-defaults-default-extension': + specifier: ~1.85.6 + version: 1.85.6 + ansi_up: + specifier: ^6.0.2 + version: 6.0.2 + iframe-resizer: + specifier: ^4.3.9 + version: 4.3.9 + monaco-editor: + specifier: npm:@codingame/monaco-editor-treemended@>=1.85.0 <1.86.0 + version: '@codingame/monaco-editor-treemended@1.85.6' + monaco-languageclient: + specifier: '>= 7.3.0 < 7.4.0' + version: 7.3.0(@codingame/monaco-editor-treemended@1.85.6)(@codingame/monaco-vscode-api@1.85.6) + vscode: + specifier: npm:@codingame/monaco-vscode-api@>=1.85.0 <1.86.0 + version: '@codingame/monaco-vscode-api@1.85.6' + vscode-languageserver: + specifier: ~9.0.1 + version: 9.0.1 + devDependencies: + '@types/emscripten': + specifier: ^1.39.10 + version: 1.39.10 + '@types/node': + specifier: ^20.4.0 + version: 20.11.7 + '@types/vscode': + specifier: ~1.85.0 + version: 1.85.0 + typescript: + specifier: ^5.2.2 + version: 5.3.3 + vite: + specifier: ^5.0.8 + version: 5.0.12(@types/node@20.11.7) packages: - /@codingame/monaco-editor-treemended@1.85.6: + '@codingame/monaco-editor-treemended@1.85.6': resolution: {integrity: sha512-gA48LPVzbKDHyrKbQ6qLgV0hE6BH+px5ZCfjLPzZnl9WQZ4iLhpHB8oqPdMLRr/0y73qzSkQdQ0T/iGxiDC+hw==} - dev: false - /@codingame/monaco-vscode-api@1.85.6: + '@codingame/monaco-vscode-api@1.85.6': resolution: {integrity: sha512-4udds/yfMRwrzRF6Yq5lI/vn4TEDT4r4nxSJXJ4KNpLoSWNV2p63NMItBGKmFBKCJQpIMtvO2O0IeX9gso2v2A==} hasBin: true - dependencies: - '@codingame/monaco-vscode-base-service-override': 1.85.6 - '@codingame/monaco-vscode-environment-service-override': 1.85.6 - '@codingame/monaco-vscode-extensions-service-override': 1.85.6 - '@codingame/monaco-vscode-files-service-override': 1.85.6 - '@codingame/monaco-vscode-host-service-override': 1.85.6 - '@codingame/monaco-vscode-layout-service-override': 1.85.6 - '@codingame/monaco-vscode-quickaccess-service-override': 1.85.6 - monaco-editor: 0.45.0 - vscode-semver: /semver@5.5.0 - dev: false - /@codingame/monaco-vscode-base-service-override@1.85.6: + '@codingame/monaco-vscode-base-service-override@1.85.6': resolution: {integrity: sha512-+/vkUTgmRr81sr0fs8Qa6M/swWqhqmy8S4mH5UZkhTUQdLBv7k3ogaRpPcIqvTaqiVnj3ADv77yeL3PGVyhHDA==} - dependencies: - monaco-editor: 0.45.0 - vscode: /@codingame/monaco-vscode-api@1.85.6 - dev: false - /@codingame/monaco-vscode-editor-service-override@1.85.6: + '@codingame/monaco-vscode-editor-service-override@1.85.6': resolution: {integrity: sha512-oVlZrob7zvSGyk5YdBtFdSQ0o8vDrbwNs/DXunfaKVai6l5NKvi5aGUzMdyPWOs+GUIQERbWuMfFtaNE73LrtQ==} - dependencies: - monaco-editor: 0.45.0 - vscode: /@codingame/monaco-vscode-api@1.85.6 - dev: false - /@codingame/monaco-vscode-environment-service-override@1.85.6: + '@codingame/monaco-vscode-environment-service-override@1.85.6': resolution: {integrity: sha512-J/Td0YnsqEnOortn5J0fVwvZ6fB89jXhKEuDR8o0iV9Eoyirji7c+RGvL+5KJARNsguelc7//b81WW8/o4wMFg==} - dependencies: - monaco-editor: 0.45.0 - vscode: /@codingame/monaco-vscode-api@1.85.6 - dev: false - /@codingame/monaco-vscode-extensions-service-override@1.85.6: + '@codingame/monaco-vscode-extensions-service-override@1.85.6': resolution: {integrity: sha512-TmjGSd1dDMm65KNlFg58zHNAD60KlpZXN1EExabezbEBHa/gMqLT5JyF3+bBe0tbPJ4R5zmWzvfunh73sgTbLw==} - dependencies: - '@codingame/monaco-vscode-files-service-override': 1.85.6 - monaco-editor: 0.45.0 - vscode: /@codingame/monaco-vscode-api@1.85.6 - vscode-semver: /semver@5.5.0 - dev: false - /@codingame/monaco-vscode-files-service-override@1.85.6: + '@codingame/monaco-vscode-files-service-override@1.85.6': resolution: {integrity: sha512-ptNqoLBJr/+8Z5gzgeuAZt4yaPK5Lm0i5okQTcgrzHLezKCs5XZXUk6ZVeCMoQqQiK9Mo4C5mWimPQ83Wf18ig==} - dependencies: - monaco-editor: 0.45.0 - vscode: /@codingame/monaco-vscode-api@1.85.6 - dev: false - /@codingame/monaco-vscode-host-service-override@1.85.6: + '@codingame/monaco-vscode-host-service-override@1.85.6': resolution: {integrity: sha512-ikmJyG7ev9ERafD7J+y/JtoTPjkibOHxE2OLKxFMMaJsoGQK8dV0DR3geS1xTrEZf8ecCEqC2z4XpnAXr9V9IA==} - dependencies: - monaco-editor: 0.45.0 - vscode: /@codingame/monaco-vscode-api@1.85.6 - dev: false - /@codingame/monaco-vscode-language-pack-zh-hans@1.85.6: + '@codingame/monaco-vscode-language-pack-zh-hans@1.85.6': resolution: {integrity: sha512-ipAIkLUM+15qjO8+ZVSTkHm4UlDJQGXFN3z5IQ70GlYdloXQEi/gAChgvQbnNLbC1aqsh6/wrTjobjT+f1acSg==} - dependencies: - vscode: /@codingame/monaco-vscode-api@1.85.6 - dev: false - /@codingame/monaco-vscode-languages-service-override@1.85.6: + '@codingame/monaco-vscode-languages-service-override@1.85.6': resolution: {integrity: sha512-gkV0CvL9NB03Ve9P0OOB9KplbWiedBeZvgc6NstICMiqT+opNAqcSbkceyWm+LhZoLq6ZsKNuTl4NrtJ4VnECg==} - dependencies: - '@codingame/monaco-vscode-files-service-override': 1.85.6 - monaco-editor: 0.45.0 - vscode: /@codingame/monaco-vscode-api@1.85.6 - dev: false - /@codingame/monaco-vscode-layout-service-override@1.85.6: + '@codingame/monaco-vscode-layout-service-override@1.85.6': resolution: {integrity: sha512-dWj01HuZRDfNIyqjY7py3tYElWaM7hLVkPokWM2/5tUtGr9xyLbKvi5JSeM96sbxpqHszzkR/hiv+4v4fSB+oQ==} - dependencies: - monaco-editor: 0.45.0 - vscode: /@codingame/monaco-vscode-api@1.85.6 - dev: false - /@codingame/monaco-vscode-model-service-override@1.85.6: + '@codingame/monaco-vscode-model-service-override@1.85.6': resolution: {integrity: sha512-DTIjWmP2Offsi5T8ZQxABnYK0lTNXdd+Vc9IpsXatFCmM6434JX48rz7QNnAP3eNUOaQemXUlTFYcj30R0arBA==} - dependencies: - monaco-editor: 0.45.0 - vscode: /@codingame/monaco-vscode-api@1.85.6 - dev: false - /@codingame/monaco-vscode-quickaccess-service-override@1.85.6: + '@codingame/monaco-vscode-quickaccess-service-override@1.85.6': resolution: {integrity: sha512-f9PfAg+pWemwBysCtr/MAUA6iwU6/JFvGDakd7N0Nf9o882ozJt9UOHH8SHerPZk5UdqSJtnl7yJsDbmxbUf2Q==} - dependencies: - monaco-editor: 0.45.0 - vscode: /@codingame/monaco-vscode-api@1.85.6 - dev: false - /@codingame/monaco-vscode-theme-defaults-default-extension@1.85.6: + '@codingame/monaco-vscode-theme-defaults-default-extension@1.85.6': resolution: {integrity: sha512-k8KsrIEKvQNlhoofN62TFtwyCdwuX+nTgX+LsK6GY8Uu5HpmUXyu0eZQFZYZy4D2h3HirPLSbQ02qUfjUwa6hw==} - dependencies: - vscode: /@codingame/monaco-vscode-api@1.85.6 - dev: false - /@esbuild/aix-ppc64@0.19.12: + '@esbuild/aix-ppc64@0.19.12': resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] - requiresBuild: true - dev: true - optional: true - /@esbuild/android-arm64@0.19.12: + '@esbuild/android-arm64@0.19.12': resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} engines: {node: '>=12'} cpu: [arm64] os: [android] - requiresBuild: true - dev: true - optional: true - /@esbuild/android-arm@0.19.12: + '@esbuild/android-arm@0.19.12': resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} engines: {node: '>=12'} cpu: [arm] os: [android] - requiresBuild: true - dev: true - optional: true - /@esbuild/android-x64@0.19.12: + '@esbuild/android-x64@0.19.12': resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} engines: {node: '>=12'} cpu: [x64] os: [android] - requiresBuild: true - dev: true - optional: true - /@esbuild/darwin-arm64@0.19.12: + '@esbuild/darwin-arm64@0.19.12': resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] - requiresBuild: true - dev: true - optional: true - /@esbuild/darwin-x64@0.19.12: + '@esbuild/darwin-x64@0.19.12': resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} engines: {node: '>=12'} cpu: [x64] os: [darwin] - requiresBuild: true - dev: true - optional: true - /@esbuild/freebsd-arm64@0.19.12: + '@esbuild/freebsd-arm64@0.19.12': resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] - requiresBuild: true - dev: true - optional: true - /@esbuild/freebsd-x64@0.19.12: + '@esbuild/freebsd-x64@0.19.12': resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-arm64@0.19.12: + '@esbuild/linux-arm64@0.19.12': resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-arm@0.19.12: + '@esbuild/linux-arm@0.19.12': resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} engines: {node: '>=12'} cpu: [arm] os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-ia32@0.19.12: + '@esbuild/linux-ia32@0.19.12': resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-loong64@0.19.12: + '@esbuild/linux-loong64@0.19.12': resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} engines: {node: '>=12'} cpu: [loong64] os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-mips64el@0.19.12: + '@esbuild/linux-mips64el@0.19.12': resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-ppc64@0.19.12: + '@esbuild/linux-ppc64@0.19.12': resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-riscv64@0.19.12: + '@esbuild/linux-riscv64@0.19.12': resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-s390x@0.19.12: + '@esbuild/linux-s390x@0.19.12': resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} engines: {node: '>=12'} cpu: [s390x] os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-x64@0.19.12: + '@esbuild/linux-x64@0.19.12': resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} engines: {node: '>=12'} cpu: [x64] os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/netbsd-x64@0.19.12: + '@esbuild/netbsd-x64@0.19.12': resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] - requiresBuild: true - dev: true - optional: true - /@esbuild/openbsd-x64@0.19.12: + '@esbuild/openbsd-x64@0.19.12': resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] - requiresBuild: true - dev: true - optional: true - /@esbuild/sunos-x64@0.19.12: + '@esbuild/sunos-x64@0.19.12': resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} engines: {node: '>=12'} cpu: [x64] os: [sunos] - requiresBuild: true - dev: true - optional: true - /@esbuild/win32-arm64@0.19.12: + '@esbuild/win32-arm64@0.19.12': resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} engines: {node: '>=12'} cpu: [arm64] os: [win32] - requiresBuild: true - dev: true - optional: true - /@esbuild/win32-ia32@0.19.12: + '@esbuild/win32-ia32@0.19.12': resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} engines: {node: '>=12'} cpu: [ia32] os: [win32] - requiresBuild: true - dev: true - optional: true - /@esbuild/win32-x64@0.19.12: + '@esbuild/win32-x64@0.19.12': resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} engines: {node: '>=12'} cpu: [x64] os: [win32] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-android-arm-eabi@4.9.6: + '@rollup/rollup-android-arm-eabi@4.9.6': resolution: {integrity: sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==} cpu: [arm] os: [android] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-android-arm64@4.9.6: + '@rollup/rollup-android-arm64@4.9.6': resolution: {integrity: sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==} cpu: [arm64] os: [android] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-darwin-arm64@4.9.6: + '@rollup/rollup-darwin-arm64@4.9.6': resolution: {integrity: sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==} cpu: [arm64] os: [darwin] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-darwin-x64@4.9.6: + '@rollup/rollup-darwin-x64@4.9.6': resolution: {integrity: sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==} cpu: [x64] os: [darwin] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.9.6: + '@rollup/rollup-linux-arm-gnueabihf@4.9.6': resolution: {integrity: sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==} cpu: [arm] os: [linux] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-linux-arm64-gnu@4.9.6: + '@rollup/rollup-linux-arm64-gnu@4.9.6': resolution: {integrity: sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==} cpu: [arm64] os: [linux] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-linux-arm64-musl@4.9.6: + '@rollup/rollup-linux-arm64-musl@4.9.6': resolution: {integrity: sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==} cpu: [arm64] os: [linux] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-linux-riscv64-gnu@4.9.6: + '@rollup/rollup-linux-riscv64-gnu@4.9.6': resolution: {integrity: sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==} cpu: [riscv64] os: [linux] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-linux-x64-gnu@4.9.6: + '@rollup/rollup-linux-x64-gnu@4.9.6': resolution: {integrity: sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==} cpu: [x64] os: [linux] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-linux-x64-musl@4.9.6: + '@rollup/rollup-linux-x64-musl@4.9.6': resolution: {integrity: sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==} cpu: [x64] os: [linux] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-win32-arm64-msvc@4.9.6: + '@rollup/rollup-win32-arm64-msvc@4.9.6': resolution: {integrity: sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==} cpu: [arm64] os: [win32] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-win32-ia32-msvc@4.9.6: + '@rollup/rollup-win32-ia32-msvc@4.9.6': resolution: {integrity: sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==} cpu: [ia32] os: [win32] - requiresBuild: true - dev: true - optional: true - /@rollup/rollup-win32-x64-msvc@4.9.6: + '@rollup/rollup-win32-x64-msvc@4.9.6': resolution: {integrity: sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==} cpu: [x64] os: [win32] - requiresBuild: true - dev: true - optional: true - /@types/emscripten@1.39.10: + '@types/emscripten@1.39.10': resolution: {integrity: sha512-TB/6hBkYQJxsZHSqyeuO1Jt0AB/bW6G7rHt9g7lML7SOF6lbgcHvw/Lr+69iqN0qxgXLhWKScAon73JNnptuDw==} - dev: true - /@types/estree@1.0.5: + '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - dev: true - /@types/node@20.11.7: + '@types/node@20.11.7': resolution: {integrity: sha512-GPmeN1C3XAyV5uybAf4cMLWT9fDWcmQhZVtMFu7OR32WjrqGG+Wnk2V1d0bmtUyE/Zy1QJ9BxyiTih9z8Oks8A==} - dependencies: - undici-types: 5.26.5 - dev: true - /@types/vscode@1.85.0: + '@types/vscode@1.85.0': resolution: {integrity: sha512-CF/RBon/GXwdfmnjZj0WTUMZN5H6YITOfBCP4iEZlOtVQXuzw6t7Le7+cR+7JzdMrnlm7Mfp49Oj2TuSXIWo3g==} - dev: true - /ansi_up@6.0.2: + ansi_up@6.0.2: resolution: {integrity: sha512-3G3vKvl1ilEp7J1u6BmULpMA0xVoW/f4Ekqhl8RTrJrhEBkonKn5k3bUc5Xt+qDayA6iDX0jyUh3AbZjB/l0tw==} - dev: false - /balanced-match@1.0.2: + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: false - /brace-expansion@2.0.1: + brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - dependencies: - balanced-match: 1.0.2 - dev: false - /esbuild@0.19.12: + esbuild@0.19.12: resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} engines: {node: '>=12'} hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/aix-ppc64': 0.19.12 - '@esbuild/android-arm': 0.19.12 - '@esbuild/android-arm64': 0.19.12 - '@esbuild/android-x64': 0.19.12 - '@esbuild/darwin-arm64': 0.19.12 - '@esbuild/darwin-x64': 0.19.12 - '@esbuild/freebsd-arm64': 0.19.12 - '@esbuild/freebsd-x64': 0.19.12 - '@esbuild/linux-arm': 0.19.12 - '@esbuild/linux-arm64': 0.19.12 - '@esbuild/linux-ia32': 0.19.12 - '@esbuild/linux-loong64': 0.19.12 - '@esbuild/linux-mips64el': 0.19.12 - '@esbuild/linux-ppc64': 0.19.12 - '@esbuild/linux-riscv64': 0.19.12 - '@esbuild/linux-s390x': 0.19.12 - '@esbuild/linux-x64': 0.19.12 - '@esbuild/netbsd-x64': 0.19.12 - '@esbuild/openbsd-x64': 0.19.12 - '@esbuild/sunos-x64': 0.19.12 - '@esbuild/win32-arm64': 0.19.12 - '@esbuild/win32-ia32': 0.19.12 - '@esbuild/win32-x64': 0.19.12 - dev: true - /fsevents@2.3.3: + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] - requiresBuild: true - dev: true - optional: true - /iframe-resizer@4.3.9: + iframe-resizer@4.3.9: resolution: {integrity: sha512-MCt+V/THB4a9OcAdrWo5NsI2CRpeMM4ijhTfiLtsdgDJXWYXf62Ve8yO8rKGmYNs991zty/EolYOxActlkfU+A==} engines: {node: '>=0.8.0'} - dev: false - /lru-cache@6.0.0: + lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} - dependencies: - yallist: 4.0.0 - dev: false - /minimatch@5.1.6: + minimatch@5.1.6: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} engines: {node: '>=10'} - dependencies: - brace-expansion: 2.0.1 - dev: false - /monaco-editor@0.45.0: + monaco-editor@0.45.0: resolution: {integrity: sha512-mjv1G1ZzfEE3k9HZN0dQ2olMdwIfaeAAjFiwNprLfYNRSz7ctv9XuCT7gPtBGrMUeV1/iZzYKj17Khu1hxoHOA==} - dev: false - /monaco-languageclient@7.3.0(@codingame/monaco-editor-treemended@1.85.6)(@codingame/monaco-vscode-api@1.85.6): + monaco-languageclient@7.3.0: resolution: {integrity: sha512-8mAl+qa1JhTv5Iwm8P4a08XAJoN2XrG7tyckOYLn0jipLLdXNCRuUA6HaaFkc/naTzjy/bgqpiMoFy9k5J6gKA==} engines: {node: '>=16.11.0', npm: '>=9.0.0'} peerDependencies: monaco-editor: 0.45.0 vscode: npm:@codingame/monaco-vscode-api@>=1.85.0 <1.86.0 - dependencies: - '@codingame/monaco-vscode-editor-service-override': 1.85.6 - '@codingame/monaco-vscode-languages-service-override': 1.85.6 - '@codingame/monaco-vscode-model-service-override': 1.85.6 - monaco-editor: /@codingame/monaco-editor-treemended@1.85.6 - vscode: /@codingame/monaco-vscode-api@1.85.6 - vscode-languageclient: 9.0.1 - dev: false - /nanoid@3.3.7: + nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - dev: true - /picocolors@1.0.0: + picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: true - /postcss@8.4.33: + postcss@8.4.33: resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==} engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.7 - picocolors: 1.0.0 - source-map-js: 1.0.2 - dev: true - /rollup@4.9.6: + rollup@4.9.6: resolution: {integrity: sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - dependencies: - '@types/estree': 1.0.5 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.9.6 - '@rollup/rollup-android-arm64': 4.9.6 - '@rollup/rollup-darwin-arm64': 4.9.6 - '@rollup/rollup-darwin-x64': 4.9.6 - '@rollup/rollup-linux-arm-gnueabihf': 4.9.6 - '@rollup/rollup-linux-arm64-gnu': 4.9.6 - '@rollup/rollup-linux-arm64-musl': 4.9.6 - '@rollup/rollup-linux-riscv64-gnu': 4.9.6 - '@rollup/rollup-linux-x64-gnu': 4.9.6 - '@rollup/rollup-linux-x64-musl': 4.9.6 - '@rollup/rollup-win32-arm64-msvc': 4.9.6 - '@rollup/rollup-win32-ia32-msvc': 4.9.6 - '@rollup/rollup-win32-x64-msvc': 4.9.6 - fsevents: 2.3.3 - dev: true - /semver@5.5.0: + semver@5.5.0: resolution: {integrity: sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==} hasBin: true - dev: false - /semver@7.5.4: + semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} hasBin: true - dependencies: - lru-cache: 6.0.0 - dev: false - /source-map-js@1.0.2: + source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} - dev: true - /typescript@5.3.3: + typescript@5.3.3: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} hasBin: true - dev: true - /undici-types@5.26.5: + undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - dev: true - /vite@5.0.12(@types/node@20.11.7): + vite@5.0.12: resolution: {integrity: sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -670,6 +415,323 @@ packages: optional: true terser: optional: true + + vscode-jsonrpc@8.2.0: + resolution: {integrity: sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==} + engines: {node: '>=14.0.0'} + + vscode-languageclient@9.0.1: + resolution: {integrity: sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==} + engines: {vscode: ^1.82.0} + + vscode-languageserver-protocol@3.17.5: + resolution: {integrity: sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==} + + vscode-languageserver-types@3.17.5: + resolution: {integrity: sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==} + + vscode-languageserver@9.0.1: + resolution: {integrity: sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==} + hasBin: true + + yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + +snapshots: + + '@codingame/monaco-editor-treemended@1.85.6': {} + + '@codingame/monaco-vscode-api@1.85.6': + dependencies: + '@codingame/monaco-vscode-base-service-override': 1.85.6 + '@codingame/monaco-vscode-environment-service-override': 1.85.6 + '@codingame/monaco-vscode-extensions-service-override': 1.85.6 + '@codingame/monaco-vscode-files-service-override': 1.85.6 + '@codingame/monaco-vscode-host-service-override': 1.85.6 + '@codingame/monaco-vscode-layout-service-override': 1.85.6 + '@codingame/monaco-vscode-quickaccess-service-override': 1.85.6 + monaco-editor: 0.45.0 + vscode-semver: semver@5.5.0 + + '@codingame/monaco-vscode-base-service-override@1.85.6': + dependencies: + monaco-editor: 0.45.0 + vscode: '@codingame/monaco-vscode-api@1.85.6' + + '@codingame/monaco-vscode-editor-service-override@1.85.6': + dependencies: + monaco-editor: 0.45.0 + vscode: '@codingame/monaco-vscode-api@1.85.6' + + '@codingame/monaco-vscode-environment-service-override@1.85.6': + dependencies: + monaco-editor: 0.45.0 + vscode: '@codingame/monaco-vscode-api@1.85.6' + + '@codingame/monaco-vscode-extensions-service-override@1.85.6': + dependencies: + '@codingame/monaco-vscode-files-service-override': 1.85.6 + monaco-editor: 0.45.0 + vscode: '@codingame/monaco-vscode-api@1.85.6' + vscode-semver: semver@5.5.0 + + '@codingame/monaco-vscode-files-service-override@1.85.6': + dependencies: + monaco-editor: 0.45.0 + vscode: '@codingame/monaco-vscode-api@1.85.6' + + '@codingame/monaco-vscode-host-service-override@1.85.6': + dependencies: + monaco-editor: 0.45.0 + vscode: '@codingame/monaco-vscode-api@1.85.6' + + '@codingame/monaco-vscode-language-pack-zh-hans@1.85.6': + dependencies: + vscode: '@codingame/monaco-vscode-api@1.85.6' + + '@codingame/monaco-vscode-languages-service-override@1.85.6': + dependencies: + '@codingame/monaco-vscode-files-service-override': 1.85.6 + monaco-editor: 0.45.0 + vscode: '@codingame/monaco-vscode-api@1.85.6' + + '@codingame/monaco-vscode-layout-service-override@1.85.6': + dependencies: + monaco-editor: 0.45.0 + vscode: '@codingame/monaco-vscode-api@1.85.6' + + '@codingame/monaco-vscode-model-service-override@1.85.6': + dependencies: + monaco-editor: 0.45.0 + vscode: '@codingame/monaco-vscode-api@1.85.6' + + '@codingame/monaco-vscode-quickaccess-service-override@1.85.6': + dependencies: + monaco-editor: 0.45.0 + vscode: '@codingame/monaco-vscode-api@1.85.6' + + '@codingame/monaco-vscode-theme-defaults-default-extension@1.85.6': + dependencies: + vscode: '@codingame/monaco-vscode-api@1.85.6' + + '@esbuild/aix-ppc64@0.19.12': + optional: true + + '@esbuild/android-arm64@0.19.12': + optional: true + + '@esbuild/android-arm@0.19.12': + optional: true + + '@esbuild/android-x64@0.19.12': + optional: true + + '@esbuild/darwin-arm64@0.19.12': + optional: true + + '@esbuild/darwin-x64@0.19.12': + optional: true + + '@esbuild/freebsd-arm64@0.19.12': + optional: true + + '@esbuild/freebsd-x64@0.19.12': + optional: true + + '@esbuild/linux-arm64@0.19.12': + optional: true + + '@esbuild/linux-arm@0.19.12': + optional: true + + '@esbuild/linux-ia32@0.19.12': + optional: true + + '@esbuild/linux-loong64@0.19.12': + optional: true + + '@esbuild/linux-mips64el@0.19.12': + optional: true + + '@esbuild/linux-ppc64@0.19.12': + optional: true + + '@esbuild/linux-riscv64@0.19.12': + optional: true + + '@esbuild/linux-s390x@0.19.12': + optional: true + + '@esbuild/linux-x64@0.19.12': + optional: true + + '@esbuild/netbsd-x64@0.19.12': + optional: true + + '@esbuild/openbsd-x64@0.19.12': + optional: true + + '@esbuild/sunos-x64@0.19.12': + optional: true + + '@esbuild/win32-arm64@0.19.12': + optional: true + + '@esbuild/win32-ia32@0.19.12': + optional: true + + '@esbuild/win32-x64@0.19.12': + optional: true + + '@rollup/rollup-android-arm-eabi@4.9.6': + optional: true + + '@rollup/rollup-android-arm64@4.9.6': + optional: true + + '@rollup/rollup-darwin-arm64@4.9.6': + optional: true + + '@rollup/rollup-darwin-x64@4.9.6': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.9.6': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.9.6': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.9.6': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.9.6': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.9.6': + optional: true + + '@rollup/rollup-linux-x64-musl@4.9.6': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.9.6': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.9.6': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.9.6': + optional: true + + '@types/emscripten@1.39.10': {} + + '@types/estree@1.0.5': {} + + '@types/node@20.11.7': + dependencies: + undici-types: 5.26.5 + + '@types/vscode@1.85.0': {} + + ansi_up@6.0.2: {} + + balanced-match@1.0.2: {} + + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + + esbuild@0.19.12: + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.12 + '@esbuild/android-arm': 0.19.12 + '@esbuild/android-arm64': 0.19.12 + '@esbuild/android-x64': 0.19.12 + '@esbuild/darwin-arm64': 0.19.12 + '@esbuild/darwin-x64': 0.19.12 + '@esbuild/freebsd-arm64': 0.19.12 + '@esbuild/freebsd-x64': 0.19.12 + '@esbuild/linux-arm': 0.19.12 + '@esbuild/linux-arm64': 0.19.12 + '@esbuild/linux-ia32': 0.19.12 + '@esbuild/linux-loong64': 0.19.12 + '@esbuild/linux-mips64el': 0.19.12 + '@esbuild/linux-ppc64': 0.19.12 + '@esbuild/linux-riscv64': 0.19.12 + '@esbuild/linux-s390x': 0.19.12 + '@esbuild/linux-x64': 0.19.12 + '@esbuild/netbsd-x64': 0.19.12 + '@esbuild/openbsd-x64': 0.19.12 + '@esbuild/sunos-x64': 0.19.12 + '@esbuild/win32-arm64': 0.19.12 + '@esbuild/win32-ia32': 0.19.12 + '@esbuild/win32-x64': 0.19.12 + + fsevents@2.3.3: + optional: true + + iframe-resizer@4.3.9: {} + + lru-cache@6.0.0: + dependencies: + yallist: 4.0.0 + + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.1 + + monaco-editor@0.45.0: {} + + monaco-languageclient@7.3.0(@codingame/monaco-editor-treemended@1.85.6)(@codingame/monaco-vscode-api@1.85.6): + dependencies: + '@codingame/monaco-vscode-editor-service-override': 1.85.6 + '@codingame/monaco-vscode-languages-service-override': 1.85.6 + '@codingame/monaco-vscode-model-service-override': 1.85.6 + monaco-editor: '@codingame/monaco-editor-treemended@1.85.6' + vscode: '@codingame/monaco-vscode-api@1.85.6' + vscode-languageclient: 9.0.1 + + nanoid@3.3.7: {} + + picocolors@1.0.0: {} + + postcss@8.4.33: + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.0 + source-map-js: 1.0.2 + + rollup@4.9.6: + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.9.6 + '@rollup/rollup-android-arm64': 4.9.6 + '@rollup/rollup-darwin-arm64': 4.9.6 + '@rollup/rollup-darwin-x64': 4.9.6 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.6 + '@rollup/rollup-linux-arm64-gnu': 4.9.6 + '@rollup/rollup-linux-arm64-musl': 4.9.6 + '@rollup/rollup-linux-riscv64-gnu': 4.9.6 + '@rollup/rollup-linux-x64-gnu': 4.9.6 + '@rollup/rollup-linux-x64-musl': 4.9.6 + '@rollup/rollup-win32-arm64-msvc': 4.9.6 + '@rollup/rollup-win32-ia32-msvc': 4.9.6 + '@rollup/rollup-win32-x64-msvc': 4.9.6 + fsevents: 2.3.3 + + semver@5.5.0: {} + + semver@7.5.4: + dependencies: + lru-cache: 6.0.0 + + source-map-js@1.0.2: {} + + typescript@5.3.3: {} + + undici-types@5.26.5: {} + + vite@5.0.12(@types/node@20.11.7): dependencies: '@types/node': 20.11.7 esbuild: 0.19.12 @@ -677,40 +739,24 @@ packages: rollup: 4.9.6 optionalDependencies: fsevents: 2.3.3 - dev: true - /vscode-jsonrpc@8.2.0: - resolution: {integrity: sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==} - engines: {node: '>=14.0.0'} - dev: false + vscode-jsonrpc@8.2.0: {} - /vscode-languageclient@9.0.1: - resolution: {integrity: sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==} - engines: {vscode: ^1.82.0} + vscode-languageclient@9.0.1: dependencies: minimatch: 5.1.6 semver: 7.5.4 vscode-languageserver-protocol: 3.17.5 - dev: false - /vscode-languageserver-protocol@3.17.5: - resolution: {integrity: sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==} + vscode-languageserver-protocol@3.17.5: dependencies: vscode-jsonrpc: 8.2.0 vscode-languageserver-types: 3.17.5 - dev: false - /vscode-languageserver-types@3.17.5: - resolution: {integrity: sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==} - dev: false + vscode-languageserver-types@3.17.5: {} - /vscode-languageserver@9.0.1: - resolution: {integrity: sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==} - hasBin: true + vscode-languageserver@9.0.1: dependencies: vscode-languageserver-protocol: 3.17.5 - dev: false - /yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - dev: false + yallist@4.0.0: {} diff --git a/public/sw.js b/public/sw.js new file mode 100644 index 0000000..4185308 --- /dev/null +++ b/public/sw.js @@ -0,0 +1,71 @@ +// @ts-check + +/// +/// +/// + +var self_ = /** @type {ServiceWorkerGlobalScope & typeof globalThis} */ (self); + +const CACHE_KEY = "v1"; + +/** + * + * @param {string[]} resources + */ +const addResourcesToCache = async (resources) => { + const cache = await caches.open(CACHE_KEY); + await cache.addAll(resources); +}; + +/** + * @param {Request} request + * @param {Response} response + */ +const putInCache = async (request, response) => { + const url = new URL(request.url); + if (url.protocol === "chrome-extension:") { + return; + } + const cache = await caches.open(CACHE_KEY); + await cache.put(request, response); +}; + +const deleteCache = async (key) => { + await caches.delete(key); +}; + +const deleteOldCaches = async () => { + const cacheKeepList = [CACHE_KEY]; + const keyList = await caches.keys(); + const cachesToDelete = keyList.filter((key) => !cacheKeepList.includes(key)); + await Promise.all(cachesToDelete.map(deleteCache)); +}; + +/** + * @param {Request} request + */ +const cacheFirst = async (request) => { + const cache = await caches.open(CACHE_KEY); + const responseFromCache = await cache.match(request); + if (responseFromCache) { + return responseFromCache; + } + const responseFromNetwork = await fetch(request); + putInCache(request, responseFromNetwork.clone()); + return responseFromNetwork; +}; + +self_.addEventListener("activate", (event) => { + event.waitUntil(self_.registration?.navigationPreload.enable()); + event.waitUntil(deleteOldCaches()); +}); + +self_.addEventListener("install", (event) => { + event.waitUntil( + addResourcesToCache(["/wasm/clangd.js", "/wasm/clangd.wasm"]) + ); +}); + +self_.addEventListener("fetch", (event) => { + event.respondWith(cacheFirst(event.request)); +}); diff --git a/src/main.ts b/src/main.ts index f21e824..c48ce65 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,10 +4,18 @@ import { ExtendedSearchParams } from "./search_params"; if (!globalThis.crossOriginIsolated) { document.body.innerHTML = - "This page requires cross-origin isolation to work properly. You may forget to set server's COOP/COEP headers. If you are using this page as an