diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eadcf24..3bfd4b0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,53 +1,60 @@ -lockfileVersion: 5.3 - -specifiers: - '@tsconfig/node12': ^1.0.9 - '@types/fs-extra': ^9.0.13 - '@types/node': ^12.0.0 - chalk: ^4.1.2 - fs-extra: ^10.0.0 - narrowing: ^1.4.0 - prettier: ^2.4.1 - typescript: ^4.4.4 - vite: 2.6.14 +lockfileVersion: '6.0' dependencies: - chalk: 4.1.2 - fs-extra: 10.0.1 - narrowing: 1.4.0 + chalk: + specifier: ^4.1.2 + version: 4.1.2 + fs-extra: + specifier: ^10.0.0 + version: 10.0.1 + narrowing: + specifier: ^1.4.0 + version: 1.4.0 devDependencies: - '@tsconfig/node12': 1.0.9 - '@types/fs-extra': 9.0.13 - '@types/node': 12.20.47 - prettier: 2.6.2 - typescript: 4.6.3 - vite: 2.6.14 + '@tsconfig/node12': + specifier: ^1.0.9 + version: 1.0.9 + '@types/fs-extra': + specifier: ^9.0.13 + version: 9.0.13 + '@types/node': + specifier: ^12.0.0 + version: 12.20.47 + prettier: + specifier: ^2.4.1 + version: 2.6.2 + typescript: + specifier: ^4.4.4 + version: 4.6.3 + vite: + specifier: 2.6.14 + version: 2.6.14 packages: - /@tsconfig/node12/1.0.9: + /@tsconfig/node12@1.0.9: resolution: {integrity: sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==} dev: true - /@types/fs-extra/9.0.13: + /@types/fs-extra@9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: '@types/node': 12.20.47 dev: true - /@types/node/12.20.47: + /@types/node@12.20.47: resolution: {integrity: sha512-BzcaRsnFuznzOItW1WpQrDHM7plAa7GIDMZ6b5pnMbkqEtM/6WCOhvZar39oeMQP79gwvFUWjjptE7/KGcNqFg==} dev: true - /ansi-styles/4.3.0: + /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} dependencies: color-convert: 2.0.1 dev: false - /chalk/4.1.2: + /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} dependencies: @@ -55,18 +62,18 @@ packages: supports-color: 7.2.0 dev: false - /color-convert/2.0.1: + /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 dev: false - /color-name/1.1.4: + /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: false - /esbuild-android-arm64/0.13.15: + /esbuild-android-arm64@0.13.15: resolution: {integrity: sha512-m602nft/XXeO8YQPUDVoHfjyRVPdPgjyyXOxZ44MK/agewFFkPa8tUo6lAzSWh5Ui5PB4KR9UIFTSBKh/RrCmg==} cpu: [arm64] os: [android] @@ -74,7 +81,7 @@ packages: dev: true optional: true - /esbuild-darwin-64/0.13.15: + /esbuild-darwin-64@0.13.15: resolution: {integrity: sha512-ihOQRGs2yyp7t5bArCwnvn2Atr6X4axqPpEdCFPVp7iUj4cVSdisgvEKdNR7yH3JDjW6aQDw40iQFoTqejqxvQ==} cpu: [x64] os: [darwin] @@ -82,7 +89,7 @@ packages: dev: true optional: true - /esbuild-darwin-arm64/0.13.15: + /esbuild-darwin-arm64@0.13.15: resolution: {integrity: sha512-i1FZssTVxUqNlJ6cBTj5YQj4imWy3m49RZRnHhLpefFIh0To05ow9DTrXROTE1urGTQCloFUXTX8QfGJy1P8dQ==} cpu: [arm64] os: [darwin] @@ -90,7 +97,7 @@ packages: dev: true optional: true - /esbuild-freebsd-64/0.13.15: + /esbuild-freebsd-64@0.13.15: resolution: {integrity: sha512-G3dLBXUI6lC6Z09/x+WtXBXbOYQZ0E8TDBqvn7aMaOCzryJs8LyVXKY4CPnHFXZAbSwkCbqiPuSQ1+HhrNk7EA==} cpu: [x64] os: [freebsd] @@ -98,7 +105,7 @@ packages: dev: true optional: true - /esbuild-freebsd-arm64/0.13.15: + /esbuild-freebsd-arm64@0.13.15: resolution: {integrity: sha512-KJx0fzEDf1uhNOZQStV4ujg30WlnwqUASaGSFPhznLM/bbheu9HhqZ6mJJZM32lkyfGJikw0jg7v3S0oAvtvQQ==} cpu: [arm64] os: [freebsd] @@ -106,7 +113,7 @@ packages: dev: true optional: true - /esbuild-linux-32/0.13.15: + /esbuild-linux-32@0.13.15: resolution: {integrity: sha512-ZvTBPk0YWCLMCXiFmD5EUtB30zIPvC5Itxz0mdTu/xZBbbHJftQgLWY49wEPSn2T/TxahYCRDWun5smRa0Tu+g==} cpu: [ia32] os: [linux] @@ -114,7 +121,7 @@ packages: dev: true optional: true - /esbuild-linux-64/0.13.15: + /esbuild-linux-64@0.13.15: resolution: {integrity: sha512-eCKzkNSLywNeQTRBxJRQ0jxRCl2YWdMB3+PkWFo2BBQYC5mISLIVIjThNtn6HUNqua1pnvgP5xX0nHbZbPj5oA==} cpu: [x64] os: [linux] @@ -122,23 +129,23 @@ packages: dev: true optional: true - /esbuild-linux-arm/0.13.15: - resolution: {integrity: sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA==} - cpu: [arm] + /esbuild-linux-arm64@0.13.15: + resolution: {integrity: sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA==} + cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /esbuild-linux-arm64/0.13.15: - resolution: {integrity: sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA==} - cpu: [arm64] + /esbuild-linux-arm@0.13.15: + resolution: {integrity: sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA==} + cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /esbuild-linux-mips64le/0.13.15: + /esbuild-linux-mips64le@0.13.15: resolution: {integrity: sha512-KlVjIG828uFPyJkO/8gKwy9RbXhCEUeFsCGOJBepUlpa7G8/SeZgncUEz/tOOUJTcWMTmFMtdd3GElGyAtbSWg==} cpu: [mips64el] os: [linux] @@ -146,7 +153,7 @@ packages: dev: true optional: true - /esbuild-linux-ppc64le/0.13.15: + /esbuild-linux-ppc64le@0.13.15: resolution: {integrity: sha512-h6gYF+OsaqEuBjeesTBtUPw0bmiDu7eAeuc2OEH9S6mV9/jPhPdhOWzdeshb0BskRZxPhxPOjqZ+/OqLcxQwEQ==} cpu: [ppc64] os: [linux] @@ -154,7 +161,7 @@ packages: dev: true optional: true - /esbuild-netbsd-64/0.13.15: + /esbuild-netbsd-64@0.13.15: resolution: {integrity: sha512-3+yE9emwoevLMyvu+iR3rsa+Xwhie7ZEHMGDQ6dkqP/ndFzRHkobHUKTe+NCApSqG5ce2z4rFu+NX/UHnxlh3w==} cpu: [x64] os: [netbsd] @@ -162,7 +169,7 @@ packages: dev: true optional: true - /esbuild-openbsd-64/0.13.15: + /esbuild-openbsd-64@0.13.15: resolution: {integrity: sha512-wTfvtwYJYAFL1fSs8yHIdf5GEE4NkbtbXtjLWjM3Cw8mmQKqsg8kTiqJ9NJQe5NX/5Qlo7Xd9r1yKMMkHllp5g==} cpu: [x64] os: [openbsd] @@ -170,7 +177,7 @@ packages: dev: true optional: true - /esbuild-sunos-64/0.13.15: + /esbuild-sunos-64@0.13.15: resolution: {integrity: sha512-lbivT9Bx3t1iWWrSnGyBP9ODriEvWDRiweAs69vI+miJoeKwHWOComSRukttbuzjZ8r1q0mQJ8Z7yUsDJ3hKdw==} cpu: [x64] os: [sunos] @@ -178,7 +185,7 @@ packages: dev: true optional: true - /esbuild-windows-32/0.13.15: + /esbuild-windows-32@0.13.15: resolution: {integrity: sha512-fDMEf2g3SsJ599MBr50cY5ve5lP1wyVwTe6aLJsM01KtxyKkB4UT+fc5MXQFn3RLrAIAZOG+tHC+yXObpSn7Nw==} cpu: [ia32] os: [win32] @@ -186,7 +193,7 @@ packages: dev: true optional: true - /esbuild-windows-64/0.13.15: + /esbuild-windows-64@0.13.15: resolution: {integrity: sha512-9aMsPRGDWCd3bGjUIKG/ZOJPKsiztlxl/Q3C1XDswO6eNX/Jtwu4M+jb6YDH9hRSUflQWX0XKAfWzgy5Wk54JQ==} cpu: [x64] os: [win32] @@ -194,7 +201,7 @@ packages: dev: true optional: true - /esbuild-windows-arm64/0.13.15: + /esbuild-windows-arm64@0.13.15: resolution: {integrity: sha512-zzvyCVVpbwQQATaf3IG8mu1IwGEiDxKkYUdA4FpoCHi1KtPa13jeScYDjlW0Qh+ebWzpKfR2ZwvqAQkSWNcKjA==} cpu: [arm64] os: [win32] @@ -202,7 +209,7 @@ packages: dev: true optional: true - /esbuild/0.13.15: + /esbuild@0.13.15: resolution: {integrity: sha512-raCxt02HBKv8RJxE8vkTSCXGIyKHdEdGfUmiYb8wnabnaEmHzyW7DCHb5tEN0xU8ryqg5xw54mcwnYkC4x3AIw==} hasBin: true requiresBuild: true @@ -226,7 +233,7 @@ packages: esbuild-windows-arm64: 0.13.15 dev: true - /fs-extra/10.0.1: + /fs-extra@10.0.1: resolution: {integrity: sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==} engines: {node: '>=12'} dependencies: @@ -235,7 +242,7 @@ packages: universalify: 2.0.0 dev: false - /fsevents/2.3.2: + /fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] @@ -243,33 +250,33 @@ packages: dev: true optional: true - /function-bind/1.1.1: + /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true - /graceful-fs/4.2.10: + /graceful-fs@4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: false - /has-flag/4.0.0: + /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} dev: false - /has/1.0.3: + /has@1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} dependencies: function-bind: 1.1.1 dev: true - /is-core-module/2.8.1: + /is-core-module@2.8.1: resolution: {integrity: sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==} dependencies: has: 1.0.3 dev: true - /jsonfile/6.1.0: + /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} dependencies: universalify: 2.0.0 @@ -277,25 +284,25 @@ packages: graceful-fs: 4.2.10 dev: false - /nanoid/3.3.2: + /nanoid@3.3.2: resolution: {integrity: sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true dev: true - /narrowing/1.4.0: + /narrowing@1.4.0: resolution: {integrity: sha512-TYkWGGMWqyiEhTx0KdGtf+dukZAc1fcY0sOpXWOFxvdBXsVpfdtYUnsfZtpPax3REgD7BxcBWkGByWgYrSkC9A==} dev: false - /path-parse/1.0.7: + /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true - /picocolors/1.0.0: + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: true - /postcss/8.4.12: + /postcss@8.4.12: resolution: {integrity: sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg==} engines: {node: ^10 || ^12 || >=14} dependencies: @@ -304,13 +311,13 @@ packages: source-map-js: 1.0.2 dev: true - /prettier/2.6.2: + /prettier@2.6.2: resolution: {integrity: sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==} engines: {node: '>=10.13.0'} hasBin: true dev: true - /resolve/1.22.0: + /resolve@1.22.0: resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==} hasBin: true dependencies: @@ -319,7 +326,7 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: true - /rollup/2.70.1: + /rollup@2.70.1: resolution: {integrity: sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==} engines: {node: '>=10.0.0'} hasBin: true @@ -327,35 +334,35 @@ packages: fsevents: 2.3.2 dev: true - /source-map-js/1.0.2: + /source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} dev: true - /supports-color/7.2.0: + /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} dependencies: has-flag: 4.0.0 dev: false - /supports-preserve-symlinks-flag/1.0.0: + /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} dev: true - /typescript/4.6.3: + /typescript@4.6.3: resolution: {integrity: sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==} engines: {node: '>=4.2.0'} hasBin: true dev: true - /universalify/2.0.0: + /universalify@2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} dev: false - /vite/2.6.14: + /vite@2.6.14: resolution: {integrity: sha512-2HA9xGyi+EhY2MXo0+A2dRsqsAG3eFNEVIo12olkWhOmc8LfiM+eMdrXf+Ruje9gdXgvSqjLI9freec1RUM5EA==} engines: {node: '>=12.2.0'} hasBin: true diff --git a/src/index.ts b/src/index.ts index de11496..2bba917 100644 --- a/src/index.ts +++ b/src/index.ts @@ -163,7 +163,7 @@ function vitePluginWasmPack( // send 'root/pkg/xxx.wasm' file to user middlewares.use((req, res, next) => { if (isString(req.url)) { - const basename = path.basename(req.url); + const basename = path.basename(req.url).replace(/\?.*$/, ''); // remove ?t=abc and similar from basename res.setHeader( 'Cache-Control', 'no-cache, no-store, must-revalidate'