From 379d8601d29e3caa7f16e591422974e979dce40b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Mon, 9 Oct 2023 08:49:41 +0200 Subject: [PATCH] v1.0.32 - Upgrade `unplugin` template - Add some fixes for Nuxt --- README.md | 2 +- package.json | 38 +++- pnpm-lock.yaml | 593 ++----------------------------------------------- src/esbuild.ts | 5 +- src/index.ts | 71 +++--- src/nuxt.ts | 151 +++++++------ src/rollup.ts | 5 +- src/vite.ts | 5 +- src/webpack.ts | 5 +- 9 files changed, 184 insertions(+), 691 deletions(-) diff --git a/README.md b/README.md index b097af1..ef67f1e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Banner with unplugin logo and unplugin-svg-transformer title, a SVG logo inserted for svg in title](docs/banner.jpg) +![Banner with unplugin logo and unplugin-svg-transformer title, a SVG logo inserted for svg in title](https://raw.githubusercontent.com/kiwilan/unplugin-svg-transformer/main/docs/banner.jpg) # unplugin-svg-transformer diff --git a/package.json b/package.json index a8383f8..81527e9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "name": "unplugin-svg-transformer", "type": "module", - "version": "1.0.31", + "version": "1.0.32", + "packageManager": "pnpm@8.6.12", "description": "Import easily your SVG with Vite.", "author": "kiwilan ", "license": "MIT", @@ -62,11 +63,6 @@ "import": "./dist/types.js", "require": "./dist/types.cjs" }, - "./components": { - "types": "./dist/components.d.ts", - "import": "./dist/components.js", - "require": "./dist/components.cjs" - }, "./vue": { "types": "./dist/vue.d.ts", "import": "./dist/vue.js", @@ -122,12 +118,41 @@ "release": "npm run clean && npm run build && npm pack --dry-run && npm publish --access public", "prepare": "husky install" }, + "peerDependencies": { + "@nuxt/kit": "^3", + "@nuxt/schema": "^3", + "esbuild": "*", + "rollup": "^3", + "vite": ">=3", + "webpack": "^4 || ^5" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + }, + "rollup": { + "optional": true + }, + "vite": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "@nuxt/kit": { + "optional": true + }, + "@nuxt/schema": { + "optional": true + } + }, "dependencies": { "unplugin": "^1.5.0" }, "devDependencies": { "@antfu/eslint-config": "1.0.0-beta.18", "@nuxt/kit": "^3.7.4", + "@nuxt/schema": "^3.6.5", "@types/node": "^20.8.0", "@types/react": "^18.2.23", "@vitejs/plugin-vue": "^4.3.4", @@ -139,7 +164,6 @@ "fast-glob": "^3.3.1", "husky": "^8.0.0", "nodemon": "^3.0.1", - "nuxt": "^3.7.4", "react": "^18.2.0", "rimraf": "^5.0.5", "rollup": "^3.29.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3230749..95b7b33 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + esbuild: + specifier: '*' + version: 0.19.4 unplugin: specifier: ^1.5.0 version: 1.5.0 @@ -18,6 +21,9 @@ importers: '@nuxt/kit': specifier: ^3.7.4 version: 3.7.4(rollup@3.29.4) + '@nuxt/schema': + specifier: ^3.6.5 + version: 3.7.4(rollup@3.29.4) '@types/node': specifier: ^20.8.0 version: 20.8.0 @@ -51,9 +57,6 @@ importers: nodemon: specifier: ^3.0.1 version: 3.0.1 - nuxt: - specifier: ^3.7.4 - version: 3.7.4(@types/node@20.8.0)(eslint@8.50.0)(rollup@3.29.4)(typescript@5.2.2) react: specifier: ^18.2.0 version: 18.2.0 @@ -68,7 +71,7 @@ importers: version: 4.2.1 tsup: specifier: ^7.2.0 - version: 7.2.0(postcss@8.4.31)(typescript@5.2.2) + version: 7.2.0(typescript@5.2.2) typescript: specifier: ^5.2.2 version: 5.2.2 @@ -83,7 +86,7 @@ importers: version: 3.3.4 webpack: specifier: ^5.88.2 - version: 5.88.2(esbuild@0.18.20) + version: 5.88.2(esbuild@0.19.4) examples/js: devDependencies: @@ -159,7 +162,7 @@ importers: version: 4.2.0 svelte-check: specifier: ^3.4.6 - version: 3.5.2(@babel/core@7.23.0)(postcss@8.4.31)(svelte@4.2.0) + version: 3.5.2(@babel/core@7.23.0)(svelte@4.2.0) tslib: specifier: ^2.6.0 version: 2.6.2 @@ -855,22 +858,12 @@ packages: dev: true optional: true - /@esbuild/android-arm64@0.19.3: - resolution: {integrity: sha512-w+Akc0vv5leog550kjJV9Ru+MXMR2VuMrui3C61mnysim0gkFCPOUTAfzTP0qX+HpN9Syu3YA3p1hf3EPqObRw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - /@esbuild/android-arm64@0.19.4: resolution: {integrity: sha512-mRsi2vJsk4Bx/AFsNBqOH2fqedxn5L/moT58xgg51DjX1la64Z3Npicut2VbhvDFO26qjWtPMsVxCd80YTFVeg==} engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/android-arm@0.17.19: @@ -900,22 +893,12 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.19.3: - resolution: {integrity: sha512-Lemgw4io4VZl9GHJmjiBGzQ7ONXRfRPHcUEerndjwiSkbxzrpq0Uggku5MxxrXdwJ+pTj1qyw4jwTu7hkPsgIA==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - /@esbuild/android-arm@0.19.4: resolution: {integrity: sha512-uBIbiYMeSsy2U0XQoOGVVcpIktjLMEKa7ryz2RLr7L/vTnANNEsPVAh4xOv7ondGz6ac1zVb0F8Jx20rQikffQ==} engines: {node: '>=12'} cpu: [arm] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/android-x64@0.17.19: @@ -945,22 +928,12 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.19.3: - resolution: {integrity: sha512-FKQJKkK5MXcBHoNZMDNUAg1+WcZlV/cuXrWCoGF/TvdRiYS4znA0m5Il5idUwfxrE20bG/vU1Cr5e1AD6IEIjQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - /@esbuild/android-x64@0.19.4: resolution: {integrity: sha512-4iPufZ1TMOD3oBlGFqHXBpa3KFT46aLl6Vy7gwed0ZSYgHaZ/mihbYb4t7Z9etjkC9Al3ZYIoOaHrU60gcMy7g==} engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/darwin-arm64@0.17.19: @@ -990,22 +963,12 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.19.3: - resolution: {integrity: sha512-kw7e3FXU+VsJSSSl2nMKvACYlwtvZB8RUIeVShIEY6PVnuZ3c9+L9lWB2nWeeKWNNYDdtL19foCQ0ZyUL7nqGw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /@esbuild/darwin-arm64@0.19.4: resolution: {integrity: sha512-Lviw8EzxsVQKpbS+rSt6/6zjn9ashUZ7Tbuvc2YENgRl0yZTktGlachZ9KMJUsVjZEGFVu336kl5lBgDN6PmpA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@esbuild/darwin-x64@0.17.19: @@ -1035,22 +998,12 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.19.3: - resolution: {integrity: sha512-tPfZiwF9rO0jW6Jh9ipi58N5ZLoSjdxXeSrAYypy4psA2Yl1dAMhM71KxVfmjZhJmxRjSnb29YlRXXhh3GqzYw==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /@esbuild/darwin-x64@0.19.4: resolution: {integrity: sha512-YHbSFlLgDwglFn0lAO3Zsdrife9jcQXQhgRp77YiTDja23FrC2uwnhXMNkAucthsf+Psr7sTwYEryxz6FPAVqw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@esbuild/freebsd-arm64@0.17.19: @@ -1080,22 +1033,12 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.19.3: - resolution: {integrity: sha512-ERDyjOgYeKe0Vrlr1iLrqTByB026YLPzTytDTz1DRCYM+JI92Dw2dbpRHYmdqn6VBnQ9Bor6J8ZlNwdZdxjlSg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - /@esbuild/freebsd-arm64@0.19.4: resolution: {integrity: sha512-vz59ijyrTG22Hshaj620e5yhs2dU1WJy723ofc+KUgxVCM6zxQESmWdMuVmUzxtGqtj5heHyB44PjV/HKsEmuQ==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true - dev: true optional: true /@esbuild/freebsd-x64@0.17.19: @@ -1125,22 +1068,12 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.19.3: - resolution: {integrity: sha512-nXesBZ2Ad1qL+Rm3crN7NmEVJ5uvfLFPLJev3x1j3feCQXfAhoYrojC681RhpdOph8NsvKBBwpYZHR7W0ifTTA==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - /@esbuild/freebsd-x64@0.19.4: resolution: {integrity: sha512-3sRbQ6W5kAiVQRBWREGJNd1YE7OgzS0AmOGjDmX/qZZecq8NFlQsQH0IfXjjmD0XtUYqr64e0EKNFjMUlPL3Cw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true - dev: true optional: true /@esbuild/linux-arm64@0.17.19: @@ -1170,22 +1103,12 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.19.3: - resolution: {integrity: sha512-qXvYKmXj8GcJgWq3aGvxL/JG1ZM3UR272SdPU4QSTzD0eymrM7leiZH77pvY3UetCy0k1xuXZ+VPvoJNdtrsWQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-arm64@0.19.4: resolution: {integrity: sha512-ZWmWORaPbsPwmyu7eIEATFlaqm0QGt+joRE9sKcnVUG3oBbr/KYdNE2TnkzdQwX6EDRdg/x8Q4EZQTXoClUqqA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-arm@0.17.19: @@ -1215,22 +1138,12 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.19.3: - resolution: {integrity: sha512-zr48Cg/8zkzZCzDHNxXO/89bf9e+r4HtzNUPoz4GmgAkF1gFAFmfgOdCbR8zMbzFDGb1FqBBhdXUpcTQRYS1cQ==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-arm@0.19.4: resolution: {integrity: sha512-z/4ArqOo9EImzTi4b6Vq+pthLnepFzJ92BnofU1jgNlcVb+UqynVFdoXMCFreTK7FdhqAzH0vmdwW5373Hm9pg==} engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-ia32@0.17.19: @@ -1260,22 +1173,12 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.19.3: - resolution: {integrity: sha512-7XlCKCA0nWcbvYpusARWkFjRQNWNGlt45S+Q18UeS///K6Aw8bB2FKYe9mhVWy/XLShvCweOLZPrnMswIaDXQA==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-ia32@0.19.4: resolution: {integrity: sha512-EGc4vYM7i1GRUIMqRZNCTzJh25MHePYsnQfKDexD8uPTCm9mK56NIL04LUfX2aaJ+C9vyEp2fJ7jbqFEYgO9lQ==} engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-loong64@0.17.19: @@ -1305,22 +1208,12 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.19.3: - resolution: {integrity: sha512-qGTgjweER5xqweiWtUIDl9OKz338EQqCwbS9c2Bh5jgEH19xQ1yhgGPNesugmDFq+UUSDtWgZ264st26b3de8A==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-loong64@0.19.4: resolution: {integrity: sha512-WVhIKO26kmm8lPmNrUikxSpXcgd6HDog0cx12BUfA2PkmURHSgx9G6vA19lrlQOMw+UjMZ+l3PpbtzffCxFDRg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-mips64el@0.17.19: @@ -1350,22 +1243,12 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.19.3: - resolution: {integrity: sha512-gy1bFskwEyxVMFRNYSvBauDIWNggD6pyxUksc0MV9UOBD138dKTzr8XnM2R4mBsHwVzeuIH8X5JhmNs2Pzrx+A==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-mips64el@0.19.4: resolution: {integrity: sha512-keYY+Hlj5w86hNp5JJPuZNbvW4jql7c1eXdBUHIJGTeN/+0QFutU3GrS+c27L+NTmzi73yhtojHk+lr2+502Mw==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-ppc64@0.17.19: @@ -1395,22 +1278,12 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.19.3: - resolution: {integrity: sha512-UrYLFu62x1MmmIe85rpR3qou92wB9lEXluwMB/STDzPF9k8mi/9UvNsG07Tt9AqwPQXluMQ6bZbTzYt01+Ue5g==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-ppc64@0.19.4: resolution: {integrity: sha512-tQ92n0WMXyEsCH4m32S21fND8VxNiVazUbU4IUGVXQpWiaAxOBvtOtbEt3cXIV3GEBydYsY8pyeRMJx9kn3rvw==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-riscv64@0.17.19: @@ -1440,22 +1313,12 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.19.3: - resolution: {integrity: sha512-9E73TfyMCbE+1AwFOg3glnzZ5fBAFK4aawssvuMgCRqCYzE0ylVxxzjEfut8xjmKkR320BEoMui4o/t9KA96gA==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-riscv64@0.19.4: resolution: {integrity: sha512-tRRBey6fG9tqGH6V75xH3lFPpj9E8BH+N+zjSUCnFOX93kEzqS0WdyJHkta/mmJHn7MBaa++9P4ARiU4ykjhig==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-s390x@0.17.19: @@ -1485,22 +1348,12 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.19.3: - resolution: {integrity: sha512-LlmsbuBdm1/D66TJ3HW6URY8wO6IlYHf+ChOUz8SUAjVTuaisfuwCOAgcxo3Zsu3BZGxmI7yt//yGOxV+lHcEA==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-s390x@0.19.4: resolution: {integrity: sha512-152aLpQqKZYhThiJ+uAM4PcuLCAOxDsCekIbnGzPKVBRUDlgaaAfaUl5NYkB1hgY6WN4sPkejxKlANgVcGl9Qg==} engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-x64@0.17.19: @@ -1530,22 +1383,12 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.19.3: - resolution: {integrity: sha512-ogV0+GwEmvwg/8ZbsyfkYGaLACBQWDvO0Kkh8LKBGKj9Ru8VM39zssrnu9Sxn1wbapA2qNS6BiLdwJZGouyCwQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-x64@0.19.4: resolution: {integrity: sha512-Mi4aNA3rz1BNFtB7aGadMD0MavmzuuXNTaYL6/uiYIs08U7YMPETpgNn5oue3ICr+inKwItOwSsJDYkrE9ekVg==} engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/netbsd-x64@0.17.19: @@ -1575,22 +1418,12 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.19.3: - resolution: {integrity: sha512-o1jLNe4uzQv2DKXMlmEzf66Wd8MoIhLNO2nlQBHLtWyh2MitDG7sMpfCO3NTcoTMuqHjfufgUQDFRI5C+xsXQw==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - /@esbuild/netbsd-x64@0.19.4: resolution: {integrity: sha512-9+Wxx1i5N/CYo505CTT7T+ix4lVzEdz0uCoYGxM5JDVlP2YdDC1Bdz+Khv6IbqmisT0Si928eAxbmGkcbiuM/A==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true - dev: true optional: true /@esbuild/openbsd-x64@0.17.19: @@ -1620,22 +1453,12 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.19.3: - resolution: {integrity: sha512-AZJCnr5CZgZOdhouLcfRdnk9Zv6HbaBxjcyhq0StNcvAdVZJSKIdOiPB9az2zc06ywl0ePYJz60CjdKsQacp5Q==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - /@esbuild/openbsd-x64@0.19.4: resolution: {integrity: sha512-MFsHleM5/rWRW9EivFssop+OulYVUoVcqkyOkjiynKBCGBj9Lihl7kh9IzrreDyXa4sNkquei5/DTP4uCk25xw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true - dev: true optional: true /@esbuild/sunos-x64@0.17.19: @@ -1665,22 +1488,12 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.19.3: - resolution: {integrity: sha512-Acsujgeqg9InR4glTRvLKGZ+1HMtDm94ehTIHKhJjFpgVzZG9/pIcWW/HA/DoMfEyXmANLDuDZ2sNrWcjq1lxw==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - /@esbuild/sunos-x64@0.19.4: resolution: {integrity: sha512-6Xq8SpK46yLvrGxjp6HftkDwPP49puU4OF0hEL4dTxqCbfx09LyrbUj/D7tmIRMj5D5FCUPksBbxyQhp8tmHzw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true - dev: true optional: true /@esbuild/win32-arm64@0.17.19: @@ -1710,22 +1523,12 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.19.3: - resolution: {integrity: sha512-FSrAfjVVy7TifFgYgliiJOyYynhQmqgPj15pzLyJk8BUsnlWNwP/IAy6GAiB1LqtoivowRgidZsfpoYLZH586A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@esbuild/win32-arm64@0.19.4: resolution: {integrity: sha512-PkIl7Jq4mP6ke7QKwyg4fD4Xvn8PXisagV/+HntWoDEdmerB2LTukRZg728Yd1Fj+LuEX75t/hKXE2Ppk8Hh1w==} engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@esbuild/win32-ia32@0.17.19: @@ -1755,22 +1558,12 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.19.3: - resolution: {integrity: sha512-xTScXYi12xLOWZ/sc5RBmMN99BcXp/eEf7scUC0oeiRoiT5Vvo9AycuqCp+xdpDyAU+LkrCqEpUS9fCSZF8J3Q==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@esbuild/win32-ia32@0.19.4: resolution: {integrity: sha512-ga676Hnvw7/ycdKB53qPusvsKdwrWzEyJ+AtItHGoARszIqvjffTwaaW3b2L6l90i7MO9i+dlAW415INuRhSGg==} engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@esbuild/win32-x64@0.17.19: @@ -1800,22 +1593,12 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.19.3: - resolution: {integrity: sha512-FbUN+0ZRXsypPyWE2IwIkVjDkDnJoMJARWOcFZn4KPPli+QnKqF0z1anvfaYe3ev5HFCpRDLLBDHyOALLppWHw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@esbuild/win32-x64@0.19.4: resolution: {integrity: sha512-HP0GDNla1T3ZL8Ko/SHAS2GgtjOg+VmWnnYLhuTksr++EnduYB0f3Y2LzHsUwb2iQ13JGoY6G3R8h6Du/WG6uA==} engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true /@eslint-community/eslint-utils@4.4.0(eslint@8.44.0): @@ -2372,35 +2155,6 @@ packages: - supports-color dev: true - /@nuxt/telemetry@2.5.0(rollup@3.29.4): - resolution: {integrity: sha512-7vZyOHfCAZg1PuCwy3B87MQOezW4pf8BC3gNDL92FW24BuLF0dl/BbFfxPeRxvjivuj5kkNM78x/qzNRCKfZgw==} - hasBin: true - dependencies: - '@nuxt/kit': 3.7.4(rollup@3.29.4) - chalk: 5.3.0 - ci-info: 3.8.0 - consola: 3.2.3 - create-require: 1.1.1 - defu: 6.1.2 - destr: 2.0.1 - dotenv: 16.3.1 - fs-extra: 11.1.1 - git-url-parse: 13.1.0 - is-docker: 3.0.0 - jiti: 1.20.0 - mri: 1.2.0 - nanoid: 4.0.2 - node-fetch: 3.3.2 - ofetch: 1.3.3 - parse-git-config: 3.0.0 - pathe: 1.1.1 - rc9: 2.1.1 - std-env: 3.4.3 - transitivePeerDependencies: - - rollup - - supports-color - dev: true - /@nuxt/ui-templates@1.3.1: resolution: {integrity: sha512-5gc02Pu1HycOVUWJ8aYsWeeXcSTPe8iX8+KIrhyEtEoOSkY0eMBuo0ssljB8wALuEmepv31DlYe5gpiRwkjESA==} dev: true @@ -2420,7 +2174,7 @@ packages: consola: 3.2.3 cssnano: 6.0.1(postcss@8.4.31) defu: 6.1.2 - esbuild: 0.19.3 + esbuild: 0.19.4 escape-string-regexp: 5.0.0 estree-walker: 3.0.3 externality: 1.0.2 @@ -2467,68 +2221,6 @@ packages: - vue-tsc dev: true - /@nuxt/vite-builder@3.7.4(@types/node@20.8.0)(eslint@8.50.0)(rollup@3.29.4)(typescript@5.2.2)(vue@3.3.4): - resolution: {integrity: sha512-EWZlUzYvkSfIZPA0pQoi7P++68Mlvf5s/G3GBPksS5JB/9l3yZTX+ZqGvLeORSBmoEpJ6E2oMn2WvCHV0W5y6Q==} - engines: {node: ^14.18.0 || >=16.10.0} - peerDependencies: - vue: ^3.3.4 - dependencies: - '@nuxt/kit': 3.7.4(rollup@3.29.4) - '@rollup/plugin-replace': 5.0.2(rollup@3.29.4) - '@vitejs/plugin-vue': 4.3.4(vite@4.4.9)(vue@3.3.4) - '@vitejs/plugin-vue-jsx': 3.0.2(vite@4.4.9)(vue@3.3.4) - autoprefixer: 10.4.16(postcss@8.4.31) - clear: 0.1.0 - consola: 3.2.3 - cssnano: 6.0.1(postcss@8.4.31) - defu: 6.1.2 - esbuild: 0.19.4 - escape-string-regexp: 5.0.0 - estree-walker: 3.0.3 - externality: 1.0.2 - fs-extra: 11.1.1 - get-port-please: 3.1.1 - h3: 1.8.2 - knitwork: 1.0.0 - magic-string: 0.30.4 - mlly: 1.4.2 - ohash: 1.1.3 - pathe: 1.1.1 - perfect-debounce: 1.0.0 - pkg-types: 1.0.3 - postcss: 8.4.31 - postcss-import: 15.1.0(postcss@8.4.31) - postcss-url: 10.1.3(postcss@8.4.31) - rollup-plugin-visualizer: 5.9.2(rollup@3.29.4) - std-env: 3.4.3 - strip-literal: 1.3.0 - ufo: 1.3.1 - unplugin: 1.5.0 - vite: 4.4.9(@types/node@20.8.0) - vite-node: 0.33.0(@types/node@20.8.0) - vite-plugin-checker: 0.6.2(eslint@8.50.0)(typescript@5.2.2)(vite@4.4.9) - vue: 3.3.4 - vue-bundle-renderer: 2.0.0 - transitivePeerDependencies: - - '@types/node' - - eslint - - less - - lightningcss - - meow - - optionator - - rollup - - sass - - stylelint - - stylus - - sugarss - - supports-color - - terser - - typescript - - vls - - vti - - vue-tsc - dev: true - /@parcel/watcher-android-arm64@2.3.0: resolution: {integrity: sha512-f4o9eA3dgk0XRT3XhB0UWpWpLnKgrh1IwNJKJ7UJek7eTYccQ8LR7XUWFKqw6aEq5KUNlCcGvSzKqSX/vtWVVA==} engines: {node: '>= 10.0.0'} @@ -3472,7 +3164,7 @@ packages: '@babel/core': 7.23.0 '@babel/plugin-transform-typescript': 7.22.15(@babel/core@7.23.0) '@vue/babel-plugin-jsx': 1.1.5(@babel/core@7.23.0) - vite: 4.4.9(@types/node@20.8.0) + vite: 4.4.9(@types/node@18.16.19) vue: 3.3.4 transitivePeerDependencies: - supports-color @@ -4058,17 +3750,6 @@ packages: - rollup dev: true - /ast-kit@0.9.5(rollup@3.29.4): - resolution: {integrity: sha512-kbL7ERlqjXubdDd+szuwdlQ1xUxEz9mCz1+m07ftNVStgwRb2RWw+U6oKo08PAvOishMxiqz1mlJyLl8yQx2Qg==} - engines: {node: '>=16.14.0'} - dependencies: - '@babel/parser': 7.23.0 - '@rollup/pluginutils': 5.0.4(rollup@3.29.4) - pathe: 1.1.1 - transitivePeerDependencies: - - rollup - dev: true - /ast-walker-scope@0.4.2: resolution: {integrity: sha512-vdCU9JvpsrxWxvJiRHAr8If8cu07LWJXDPhkqLiP4ErbN1fu/mK623QGmU4Qbn2Nq4Mx0vR/Q017B6+HcHg1aQ==} engines: {node: '>=16.14.0'} @@ -4077,16 +3758,6 @@ packages: '@babel/types': 7.22.19 dev: true - /ast-walker-scope@0.5.0(rollup@3.29.4): - resolution: {integrity: sha512-NsyHMxBh4dmdEHjBo1/TBZvCKxffmZxRYhmclfu0PP6Aftre47jOHYaYaNqJcV0bxihxFXhDkzLHUwHc0ocd0Q==} - engines: {node: '>=16.14.0'} - dependencies: - '@babel/parser': 7.23.0 - ast-kit: 0.9.5(rollup@3.29.4) - transitivePeerDependencies: - - rollup - dev: true - /async-sema@3.1.1: resolution: {integrity: sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==} dev: true @@ -4115,22 +3786,6 @@ packages: postcss-value-parser: 4.2.0 dev: true - /autoprefixer@10.4.16(postcss@8.4.31): - resolution: {integrity: sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==} - engines: {node: ^10 || ^12 || >=14} - hasBin: true - peerDependencies: - postcss: ^8.1.0 - dependencies: - browserslist: 4.22.1 - caniuse-lite: 1.0.30001541 - fraction.js: 4.3.6 - normalize-range: 0.1.2 - picocolors: 1.0.0 - postcss: 8.4.31 - postcss-value-parser: 4.2.0 - dev: true - /axios@0.27.2: resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} dependencies: @@ -5169,36 +4824,6 @@ packages: '@esbuild/win32-x64': 0.18.20 dev: true - /esbuild@0.19.3: - resolution: {integrity: sha512-UlJ1qUUA2jL2nNib1JTSkifQTcYTroFqRjwCFW4QYEKEsixXD5Tik9xML7zh2gTxkYTBKGHNH9y7txMwVyPbjw==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/android-arm': 0.19.3 - '@esbuild/android-arm64': 0.19.3 - '@esbuild/android-x64': 0.19.3 - '@esbuild/darwin-arm64': 0.19.3 - '@esbuild/darwin-x64': 0.19.3 - '@esbuild/freebsd-arm64': 0.19.3 - '@esbuild/freebsd-x64': 0.19.3 - '@esbuild/linux-arm': 0.19.3 - '@esbuild/linux-arm64': 0.19.3 - '@esbuild/linux-ia32': 0.19.3 - '@esbuild/linux-loong64': 0.19.3 - '@esbuild/linux-mips64el': 0.19.3 - '@esbuild/linux-ppc64': 0.19.3 - '@esbuild/linux-riscv64': 0.19.3 - '@esbuild/linux-s390x': 0.19.3 - '@esbuild/linux-x64': 0.19.3 - '@esbuild/netbsd-x64': 0.19.3 - '@esbuild/openbsd-x64': 0.19.3 - '@esbuild/sunos-x64': 0.19.3 - '@esbuild/win32-arm64': 0.19.3 - '@esbuild/win32-ia32': 0.19.3 - '@esbuild/win32-x64': 0.19.3 - dev: true - /esbuild@0.19.4: resolution: {integrity: sha512-x7jL0tbRRpv4QUyuDMjONtWFciygUxWaUM1kMX2zWxI0X2YWOt7MSA0g4UdeSiHM8fcYVzpQhKYOycZwxTdZkA==} engines: {node: '>=12'} @@ -5227,7 +4852,6 @@ packages: '@esbuild/win32-arm64': 0.19.4 '@esbuild/win32-ia32': 0.19.4 '@esbuild/win32-x64': 0.19.4 - dev: true /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -7707,14 +7331,6 @@ packages: fsevents: 2.3.3 dev: true - /nuxi@3.9.0: - resolution: {integrity: sha512-roCfCnQsp/oaHm6PL3HFvvGrwm1d2y1n7G9KzIx+i91eiO4P7fBuaVKibB2e8uqEJBgTwN52KxFha6MJnDykJQ==} - engines: {node: ^14.18.0 || >=16.10.0} - hasBin: true - optionalDependencies: - fsevents: 2.3.3 - dev: true - /nuxt@3.7.3(@types/node@18.16.19)(eslint@8.50.0)(rollup@3.29.4)(typescript@5.2.2): resolution: {integrity: sha512-fh3l3PhL79pHJckHVGebTFYlqXDq1jHAXUcNmS3RTfmJRb1s4qi5kSRgmYUWEI5I4Iu+S0u8wWh2ChvnZMQRog==} engines: {node: ^14.18.0 || >=16.10.0} @@ -7746,7 +7362,7 @@ packages: defu: 6.1.2 destr: 2.0.1 devalue: 4.3.2 - esbuild: 0.19.3 + esbuild: 0.19.4 escape-string-regexp: 5.0.0 estree-walker: 3.0.3 fs-extra: 11.1.1 @@ -7815,106 +7431,6 @@ packages: - xml2js dev: true - /nuxt@3.7.4(@types/node@20.8.0)(eslint@8.50.0)(rollup@3.29.4)(typescript@5.2.2): - resolution: {integrity: sha512-voXN2kheEpi7DJd0hkikfLuA41UiP9IwDDol65dvoJiHnRseWfaw1MyJl6FLHHDHwRzisX9QXWIyMfa9YF4nGg==} - engines: {node: ^14.18.0 || >=16.10.0} - hasBin: true - peerDependencies: - '@parcel/watcher': ^2.1.0 - '@types/node': ^14.18.0 || >=16.10.0 - peerDependenciesMeta: - '@parcel/watcher': - optional: true - '@types/node': - optional: true - dependencies: - '@nuxt/devalue': 2.0.2 - '@nuxt/kit': 3.7.4(rollup@3.29.4) - '@nuxt/schema': 3.7.4(rollup@3.29.4) - '@nuxt/telemetry': 2.5.0(rollup@3.29.4) - '@nuxt/ui-templates': 1.3.1 - '@nuxt/vite-builder': 3.7.4(@types/node@20.8.0)(eslint@8.50.0)(rollup@3.29.4)(typescript@5.2.2)(vue@3.3.4) - '@types/node': 20.8.0 - '@unhead/dom': 1.7.4 - '@unhead/ssr': 1.7.4 - '@unhead/vue': 1.7.4(vue@3.3.4) - '@vue/shared': 3.3.4 - acorn: 8.10.0 - c12: 1.4.2 - chokidar: 3.5.3 - cookie-es: 1.0.0 - defu: 6.1.2 - destr: 2.0.1 - devalue: 4.3.2 - esbuild: 0.19.4 - escape-string-regexp: 5.0.0 - estree-walker: 3.0.3 - fs-extra: 11.1.1 - globby: 13.2.2 - h3: 1.8.2 - hookable: 5.5.3 - jiti: 1.20.0 - klona: 2.0.6 - knitwork: 1.0.0 - magic-string: 0.30.4 - mlly: 1.4.2 - nitropack: 2.6.3 - nuxi: 3.9.0 - nypm: 0.3.3 - ofetch: 1.3.3 - ohash: 1.1.3 - pathe: 1.1.1 - perfect-debounce: 1.0.0 - pkg-types: 1.0.3 - radix3: 1.1.0 - scule: 1.0.0 - std-env: 3.4.3 - strip-literal: 1.3.0 - ufo: 1.3.1 - ultrahtml: 1.5.2 - uncrypto: 0.1.3 - unctx: 2.3.1 - unenv: 1.7.4 - unimport: 3.4.0(rollup@3.29.4) - unplugin: 1.5.0 - unplugin-vue-router: 0.7.0(rollup@3.29.4)(vue-router@4.2.5)(vue@3.3.4) - untyped: 1.4.0 - vue: 3.3.4 - vue-bundle-renderer: 2.0.0 - vue-devtools-stub: 0.1.0 - vue-router: 4.2.5(vue@3.3.4) - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@planetscale/database' - - '@upstash/redis' - - '@vercel/kv' - - encoding - - eslint - - idb-keyval - - less - - lightningcss - - meow - - optionator - - rollup - - sass - - stylelint - - stylus - - sugarss - - supports-color - - terser - - typescript - - vls - - vti - - vue-tsc - - xml2js - dev: true - /nypm@0.3.3: resolution: {integrity: sha512-FHoxtTscAE723e80d2M9cJRb4YVjL82Ra+ZV+YqC6rfNZUWahi+ZhPF+krnR+bdMvibsfHCtgKXnZf5R6kmEPA==} engines: {node: ^14.16.0 || >=16.10.0} @@ -8322,7 +7838,7 @@ packages: resolve: 1.22.6 dev: true - /postcss-load-config@4.0.1(postcss@8.4.31): + /postcss-load-config@4.0.1: resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} engines: {node: '>= 14'} peerDependencies: @@ -8335,7 +7851,6 @@ packages: optional: true dependencies: lilconfig: 2.1.0 - postcss: 8.4.31 yaml: 2.3.2 dev: true @@ -9408,7 +8923,7 @@ packages: engines: {node: '>= 0.4'} dev: true - /svelte-check@3.5.2(@babel/core@7.23.0)(postcss@8.4.31)(svelte@4.2.0): + /svelte-check@3.5.2(@babel/core@7.23.0)(svelte@4.2.0): resolution: {integrity: sha512-5a/YWbiH4c+AqAUP+0VneiV5bP8YOk9JL3jwvN+k2PEPLgpu85bjQc5eE67+eIZBBwUEJzmO3I92OqKcqbp3fw==} hasBin: true peerDependencies: @@ -9421,7 +8936,7 @@ packages: picocolors: 1.0.0 sade: 1.8.1 svelte: 4.2.0 - svelte-preprocess: 5.0.4(@babel/core@7.23.0)(postcss@8.4.31)(svelte@4.2.0)(typescript@5.2.2) + svelte-preprocess: 5.0.4(@babel/core@7.23.0)(svelte@4.2.0)(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: - '@babel/core' @@ -9444,7 +8959,7 @@ packages: svelte: 4.2.0 dev: true - /svelte-preprocess@5.0.4(@babel/core@7.23.0)(postcss@8.4.31)(svelte@4.2.0)(typescript@5.2.2): + /svelte-preprocess@5.0.4(@babel/core@7.23.0)(svelte@4.2.0)(typescript@5.2.2): resolution: {integrity: sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==} engines: {node: '>= 14.10.0'} requiresBuild: true @@ -9486,7 +9001,6 @@ packages: '@types/pug': 2.0.7 detect-indent: 6.1.0 magic-string: 0.27.0 - postcss: 8.4.31 sorcery: 0.11.0 strip-indent: 3.0.0 svelte: 4.2.0 @@ -9578,7 +9092,7 @@ packages: yallist: 4.0.0 dev: true - /terser-webpack-plugin@5.3.9(esbuild@0.18.20)(webpack@5.88.2): + /terser-webpack-plugin@5.3.9(esbuild@0.19.4)(webpack@5.88.2): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -9595,12 +9109,12 @@ packages: optional: true dependencies: '@jridgewell/trace-mapping': 0.3.19 - esbuild: 0.18.20 + esbuild: 0.19.4 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.1 terser: 5.20.0 - webpack: 5.88.2(esbuild@0.18.20) + webpack: 5.88.2(esbuild@0.19.4) dev: true /terser@5.17.7: @@ -9737,7 +9251,7 @@ packages: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: true - /tsup@7.2.0(postcss@8.4.31)(typescript@5.2.2): + /tsup@7.2.0(typescript@5.2.2): resolution: {integrity: sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ==} engines: {node: '>=16.14'} hasBin: true @@ -9761,8 +9275,7 @@ packages: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss: 8.4.31 - postcss-load-config: 4.0.1(postcss@8.4.31) + postcss-load-config: 4.0.1 resolve-from: 5.0.0 rollup: 3.29.4 source-map: 0.8.0-beta.0 @@ -9998,33 +9511,6 @@ packages: - vue dev: true - /unplugin-vue-router@0.7.0(rollup@3.29.4)(vue-router@4.2.5)(vue@3.3.4): - resolution: {integrity: sha512-ddRreGq0t5vlSB7OMy4e4cfU1w2AwBQCwmvW3oP/0IHQiokzbx4hd3TpwBu3eIAFVuhX2cwNQwp1U32UybTVCw==} - peerDependencies: - vue-router: ^4.1.0 - peerDependenciesMeta: - vue-router: - optional: true - dependencies: - '@babel/types': 7.23.0 - '@rollup/pluginutils': 5.0.4(rollup@3.29.4) - '@vue-macros/common': 1.8.0(rollup@3.29.4)(vue@3.3.4) - ast-walker-scope: 0.5.0(rollup@3.29.4) - chokidar: 3.5.3 - fast-glob: 3.3.1 - json5: 2.2.3 - local-pkg: 0.4.3 - mlly: 1.4.2 - pathe: 1.1.1 - scule: 1.0.0 - unplugin: 1.5.0 - vue-router: 4.2.5(vue@3.3.4) - yaml: 2.3.2 - transitivePeerDependencies: - - rollup - - vue - dev: true - /unplugin@1.5.0: resolution: {integrity: sha512-9ZdRwbh/4gcm1JTOkp9lAkIDrtOyOxgHmY7cjuwI8L/2RTikMcVG25GsZwNAgRuap3iDw2jeq7eoqtAsz5rW3A==} dependencies: @@ -10200,28 +9686,6 @@ packages: - terser dev: true - /vite-node@0.33.0(@types/node@20.8.0): - resolution: {integrity: sha512-19FpHYbwWWxDr73ruNahC+vtEdza52kA90Qb3La98yZ0xULqV8A5JLNPUff0f5zID4984tW7l3DH2przTJUZSw==} - engines: {node: '>=v14.18.0'} - hasBin: true - dependencies: - cac: 6.7.14 - debug: 4.3.4 - mlly: 1.4.2 - pathe: 1.1.1 - picocolors: 1.0.0 - vite: 4.4.9(@types/node@20.8.0) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - dev: true - /vite-node@0.34.6(@types/node@20.8.0): resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} engines: {node: '>=v14.18.0'} @@ -10290,7 +9754,7 @@ packages: strip-ansi: 6.0.1 tiny-invariant: 1.3.1 typescript: 5.2.2 - vite: 4.4.9(@types/node@20.8.0) + vite: 4.4.9(@types/node@18.16.19) vscode-languageclient: 7.0.0 vscode-languageserver: 7.0.0 vscode-languageserver-textdocument: 1.0.11 @@ -10654,15 +10118,6 @@ packages: vue: 3.3.4 dev: true - /vue-router@4.2.5(vue@3.3.4): - resolution: {integrity: sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==} - peerDependencies: - vue: ^3.2.0 - dependencies: - '@vue/devtools-api': 6.5.0 - vue: 3.3.4 - dev: true - /vue-template-compiler@2.7.14: resolution: {integrity: sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==} dependencies: @@ -10733,7 +10188,7 @@ packages: /webpack-virtual-modules@0.5.0: resolution: {integrity: sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==} - /webpack@5.88.2(esbuild@0.18.20): + /webpack@5.88.2(esbuild@0.19.4): resolution: {integrity: sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==} engines: {node: '>=10.13.0'} hasBin: true @@ -10764,7 +10219,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(esbuild@0.18.20)(webpack@5.88.2) + terser-webpack-plugin: 5.3.9(esbuild@0.19.4)(webpack@5.88.2) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: diff --git a/src/esbuild.ts b/src/esbuild.ts index 71f1e09..66489ed 100644 --- a/src/esbuild.ts +++ b/src/esbuild.ts @@ -1,3 +1,4 @@ -import unplugin from '.' +import { createEsbuildPlugin } from 'unplugin' +import { unpluginFactory } from '.' -export default unplugin.esbuild +export default createEsbuildPlugin(unpluginFactory) diff --git a/src/index.ts b/src/index.ts index f564d76..febd905 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +import type { UnpluginFactory } from 'unplugin' import { createUnplugin } from 'unplugin' import type { PluginOptions } from './types' import { Path } from './lib/Path' @@ -13,30 +14,14 @@ const DEFAULT_OPTIONS: PluginOptions = { warning: true, } -async function isTesting(): Promise { - const packagePath = Path.packagePath({ dist: false }) - const testing = `${packagePath}/LICENSE` - - if (!await Path.fileExists(testing)) { - const packageJsonLocalPath = `${packagePath}/package.json` - const distPath = '../../dist' - const packageJsonPath = '../../package.json' - if (!await Path.fileExists(distPath)) - return false - - const localDistPath = `${packagePath}/dist` - await Path.ensureDirectoryExists(localDistPath) - await Path.copyRecursive(distPath, localDistPath) - await Path.copy(packageJsonPath, packageJsonLocalPath) - - return true - } - - return false -} - -export default createUnplugin(options => ({ +export const unpluginFactory: UnpluginFactory = options => ({ name: 'unplugin-svg-transformer', + // transformInclude(id) { + // return id.endsWith('main.ts') + // }, + // transform(code) { + // return code.replace('__UNPLUGIN__', `Hello Unplugin! ${options}`) + // }, async buildStart() { const opts = Path.convertOptions(DEFAULT_OPTIONS, options) opts.isTesting = await isTesting() @@ -57,16 +42,30 @@ export default createUnplugin(options => ({ server.watcher.on('unlink', onWatchChange) }, }, - rollup: { - // - }, - webpack() { - // - }, - rspack() { - // - }, - esbuild: { - // - }, -})) +}) + +export const unplugin = /* #__PURE__ */ createUnplugin(unpluginFactory) + +export default unplugin + +async function isTesting(): Promise { + const packagePath = Path.packagePath({ dist: false }) + const testing = `${packagePath}/LICENSE` + + if (!await Path.fileExists(testing)) { + const packageJsonLocalPath = `${packagePath}/package.json` + const distPath = '../../dist' + const packageJsonPath = '../../package.json' + if (!await Path.fileExists(distPath)) + return false + + const localDistPath = `${packagePath}/dist` + await Path.ensureDirectoryExists(localDistPath) + await Path.copyRecursive(distPath, localDistPath) + await Path.copy(packageJsonPath, packageJsonLocalPath) + + return true + } + + return false +} diff --git a/src/nuxt.ts b/src/nuxt.ts index e90cbc9..55cf718 100644 --- a/src/nuxt.ts +++ b/src/nuxt.ts @@ -1,11 +1,14 @@ -import { addComponent, addImports, addTemplate, addTypeTemplate, createResolver, defineNuxtModule } from '@nuxt/kit' -import type { Configuration } from 'webpack' -import type { InlineConfig } from 'vite' -import type { WatchEvent } from '@nuxt/schema' +// import type { InlineConfig } from 'vite' +// import type { WatchEvent } from '@nuxt/schema' +// import type { Configuration } from 'webpack' + +import { addComponent, addImports, addTemplate, addTypeTemplate, addVitePlugin, addWebpackPlugin, createResolver, defineNuxtModule } from '@nuxt/kit' +import type { Nuxt } from '@nuxt/schema' import { name, version } from '../package.json' +import vite from './vite' +import webpack from './webpack' import type { NuxtOptions, OptionsExtended } from './types' import { Path } from './lib/Path' -import unplugin from '.' const DEFAULT_OPTIONS: NuxtOptions = { svgDir: './assets/svg', @@ -13,14 +16,8 @@ const DEFAULT_OPTIONS: NuxtOptions = { warning: true, } -async function readTypes(opts: OptionsExtended): Promise { - const path = `${opts.nuxtDir}/types/icons.d.ts` - if (!await Path.fileExists(path)) - return '' - - return await Path.read(path) -} - +// https://nuxt.com/docs/guide/going-further/hooks +// https://nuxt.com/docs/api/advanced/hooks#lifecycle-hooks export default defineNuxtModule({ meta: { name, @@ -31,66 +28,80 @@ export default defineNuxtModule({ }, }, defaults: DEFAULT_OPTIONS, - async setup(options, nuxt) { + setup(options, nuxt) { const opts: OptionsExtended = options - opts.isNuxt = true opts.nuxtDir = nuxt.options.buildDir - nuxt.hook('webpack:config', async (config: Configuration[]) => { - const c: Configuration = {} - c.plugins = c.plugins || [] - c.plugins.unshift(unplugin.webpack(opts)) - config.push(c) - }) - - nuxt.hook('vite:extendConfig', async (config: InlineConfig) => { - config.plugins = config.plugins || [] - config.plugins.push(unplugin.vite(opts)) - }) - - nuxt.hook('build:done', async () => { - unplugin.vite(opts) - }) - - nuxt.hook('builder:watch', async (event: WatchEvent, path: string) => { - if (path.endsWith('.svg')) - unplugin.vite(opts) - }) - - nuxt.hook('vite:serverCreated', async (viteServer) => { - viteServer.watcher.on('unlink', async (path: string) => { - if (path.endsWith('.svg')) - unplugin.vite(opts) - }) - }) - - const resolver = createResolver(import.meta.url) - - nuxt.options.alias['#svg-transformer-options'] = addTemplate({ - filename: 'svg-transformer-options.mjs', - getContents: () => Object.entries(opts) - .map(([key, value]) => `export const ${key} = ${JSON.stringify(value, null, 2)}`) - .join('\n'), - }).dst - - const path = resolver.resolve(`${opts.nuxtDir}/icons.ts`) - nuxt.options.alias['#icons'] = path - - addComponent({ - name: 'SvgIcon', - filePath: resolver.resolve('./render/NuxtSvg.ts'), - }) - - addImports({ - from: '#icons', - name: 'SvgName, svgList, importSvg', - }) - - addTypeTemplate({ - dst: 'types/icons.d.ts', // resolver.resolve(`${opts.nuxtLibraryDir}/icons.d.ts`) - filename: 'icons.d.ts', - getContents: async () => await readTypes(opts), - }) + addVitePlugin(() => vite(opts)) + addWebpackPlugin(() => webpack(opts)) + + // nuxt.hook('webpack:config', async (config: Configuration[]) => { + // const c: Configuration = {} + // c.plugins = c.plugins || [] + // c.plugins.unshift(unplugin.webpack(opts)) + // config.push(c) + // }) + + // nuxt.hook('vite:extendConfig', async (config: InlineConfig) => { + // config.plugins = config.plugins || [] + // config.plugins.push(unplugin.vite(opts)) + // }) + + // nuxt.hook('build:done', async () => { + // unplugin.vite(opts) + // }) + + // nuxt.hook('builder:watch', async (event: WatchEvent, path: string) => { + // if (path.endsWith('.svg')) + // unplugin.vite(opts) + // }) + + // nuxt.hook('vite:serverCreated', async (viteServer) => { + // viteServer.watcher.on('unlink', async (path: string) => { + // if (path.endsWith('.svg')) + // unplugin.vite(opts) + // }) + // }) + + nuxtAddon(nuxt, opts) }, }) + +async function nuxtAddon(nuxt: Nuxt, opts: OptionsExtended): Promise { + const resolver = createResolver(import.meta.url) + + nuxt.options.alias['#svg-transformer-options'] = addTemplate({ + filename: 'svg-transformer-options.mjs', + getContents: () => Object.entries(opts) + .map(([key, value]) => `export const ${key} = ${JSON.stringify(value, null, 2)}`) + .join('\n'), + }).dst + + const path = resolver.resolve(`${opts.nuxtDir}/icons.ts`) + nuxt.options.alias['#icons'] = path + + addComponent({ + name: 'SvgIcon', + filePath: resolver.resolve('./render/NuxtSvg.ts'), + }) + + addImports({ + from: '#icons', + name: 'SvgName, svgList, importSvg', + }) + + addTypeTemplate({ + dst: 'types/icons.d.ts', // resolver.resolve(`${opts.nuxtLibraryDir}/icons.d.ts`) + filename: 'icons.d.ts', + getContents: async () => await readTypes(opts), + }) +} + +async function readTypes(opts: OptionsExtended): Promise { + const path = `${opts.nuxtDir}/types/icons.d.ts` + if (!await Path.fileExists(path)) + return '' + + return await Path.read(path) +} diff --git a/src/rollup.ts b/src/rollup.ts index ed6909c..771cd33 100644 --- a/src/rollup.ts +++ b/src/rollup.ts @@ -1,3 +1,4 @@ -import unplugin from '.' +import { createRollupPlugin } from 'unplugin' +import { unpluginFactory } from '.' -export default unplugin.rollup +export default createRollupPlugin(unpluginFactory) diff --git a/src/vite.ts b/src/vite.ts index 589f4b9..151a5ce 100644 --- a/src/vite.ts +++ b/src/vite.ts @@ -1,3 +1,4 @@ -import unplugin from '.' +import { createVitePlugin } from 'unplugin' +import { unpluginFactory } from '.' -export default unplugin.vite +export default createVitePlugin(unpluginFactory) diff --git a/src/webpack.ts b/src/webpack.ts index 83091ee..ce9ebdc 100644 --- a/src/webpack.ts +++ b/src/webpack.ts @@ -1,3 +1,4 @@ -import unplugin from '.' +import { createWebpackPlugin } from 'unplugin' +import { unpluginFactory } from '.' -export default unplugin.webpack +export default createWebpackPlugin(unpluginFactory)