diff --git a/manifest.json b/manifest.json index 12963f5..99cd5b0 100755 --- a/manifest.json +++ b/manifest.json @@ -1,10 +1,10 @@ { "id": "attachment-uploader", "name": "Attachment Uploader", - "version": "1.0.4", + "version": "1.0.5", "minAppVersion": "0.15.0", "description": "Attachment uploader plugin, which allows you customize the upload command, customize upload file type.", "author": "zhuxining", "authorUrl": "https://github.com/zhuxining", "isDesktopOnly": true -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c9af614..1f8c2ac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,28 +10,28 @@ importers: devDependencies: '@types/node': specifier: latest - version: 20.14.2 + version: 22.4.0 '@typescript-eslint/eslint-plugin': specifier: latest - version: 7.13.0(@typescript-eslint/parser@7.13.0(eslint@8.56.0)(typescript@5.4.5))(eslint@8.56.0)(typescript@5.4.5) + version: 8.1.0(@typescript-eslint/parser@8.1.0(eslint@8.56.0)(typescript@5.5.4))(eslint@8.56.0)(typescript@5.5.4) '@typescript-eslint/parser': specifier: latest - version: 7.13.0(eslint@8.56.0)(typescript@5.4.5) + version: 8.1.0(eslint@8.56.0)(typescript@5.5.4) builtin-modules: specifier: latest version: 4.0.0 esbuild: specifier: latest - version: 0.21.5 + version: 0.23.1 obsidian: specifier: latest - version: 1.5.7-1(@codemirror/state@6.3.3)(@codemirror/view@6.22.3) + version: 1.6.6(@codemirror/state@6.3.3)(@codemirror/view@6.22.3) tslib: specifier: latest version: 2.6.3 typescript: specifier: latest - version: 5.4.5 + version: 5.5.4 packages: @@ -41,141 +41,147 @@ packages: '@codemirror/view@6.22.3': resolution: {integrity: sha512-rqnq+Zospwoi3x1vZ8BGV1MlRsaGljX+6qiGYmIpJ++M+LCC+wjfDaPklhwpWSgv7pr/qx29KiAKQBH5+DOn4w==} - '@esbuild/aix-ppc64@0.21.5': - resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} - engines: {node: '>=12'} + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.21.5': - resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} - engines: {node: '>=12'} + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.21.5': - resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} - engines: {node: '>=12'} + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.21.5': - resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} - engines: {node: '>=12'} + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.21.5': - resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} - engines: {node: '>=12'} + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.21.5': - resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} - engines: {node: '>=12'} + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.21.5': - resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} - engines: {node: '>=12'} + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.21.5': - resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} - engines: {node: '>=12'} + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.21.5': - resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} - engines: {node: '>=12'} + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.21.5': - resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} - engines: {node: '>=12'} + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.21.5': - resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} - engines: {node: '>=12'} + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.21.5': - resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} - engines: {node: '>=12'} + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.21.5': - resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} - engines: {node: '>=12'} + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.21.5': - resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} - engines: {node: '>=12'} + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.21.5': - resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} - engines: {node: '>=12'} + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.21.5': - resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} - engines: {node: '>=12'} + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.21.5': - resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} - engines: {node: '>=12'} + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-x64@0.21.5': - resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} - engines: {node: '>=12'} + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-x64@0.21.5': - resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} - engines: {node: '>=12'} + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.21.5': - resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} - engines: {node: '>=12'} + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.21.5': - resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} - engines: {node: '>=12'} + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.21.5': - resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} - engines: {node: '>=12'} + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.21.5': - resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} - engines: {node: '>=12'} + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -185,8 +191,8 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.10.1': - resolution: {integrity: sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==} + '@eslint-community/regexpp@4.11.0': + resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} '@eslint/eslintrc@2.1.4': @@ -200,6 +206,7 @@ packages: '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -207,6 +214,7 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -226,69 +234,68 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - '@types/node@20.14.2': - resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==} + '@types/node@22.4.0': + resolution: {integrity: sha512-49AbMDwYUz7EXxKU/r7mXOsxwFr4BYbvB7tWYxVuLdb2ibd30ijjXINSMAHiEEZk5PCRBmW1gUeisn2VMKt3cQ==} '@types/tern@0.23.9': resolution: {integrity: sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw==} - '@typescript-eslint/eslint-plugin@7.13.0': - resolution: {integrity: sha512-FX1X6AF0w8MdVFLSdqwqN/me2hyhuQg4ykN6ZpVhh1ij/80pTvDKclX1sZB9iqex8SjQfVhwMKs3JtnnMLzG9w==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/eslint-plugin@8.1.0': + resolution: {integrity: sha512-LlNBaHFCEBPHyD4pZXb35mzjGkuGKXU5eeCA1SxvHfiRES0E82dOounfVpL4DCqYvJEKab0bZIA0gCRpdLKkCw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/parser@7.13.0': - resolution: {integrity: sha512-EjMfl69KOS9awXXe83iRN7oIEXy9yYdqWfqdrFAYAAr6syP8eLEFI7ZE4939antx2mNgPRW/o1ybm2SFYkbTVA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/parser@8.1.0': + resolution: {integrity: sha512-U7iTAtGgJk6DPX9wIWPPOlt1gO57097G06gIcl0N0EEnNw8RGD62c+2/DiP/zL7KrkqnnqF7gtFGR7YgzPllTA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/scope-manager@7.13.0': - resolution: {integrity: sha512-ZrMCe1R6a01T94ilV13egvcnvVJ1pxShkE0+NDjDzH4nvG1wXpwsVI5bZCvE7AEDH1mXEx5tJSVR68bLgG7Dng==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@8.1.0': + resolution: {integrity: sha512-DsuOZQji687sQUjm4N6c9xABJa7fjvfIdjqpSIIVOgaENf2jFXiM9hIBZOL3hb6DHK9Nvd2d7zZnoMLf9e0OtQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@7.13.0': - resolution: {integrity: sha512-xMEtMzxq9eRkZy48XuxlBFzpVMDurUAfDu5Rz16GouAtXm0TaAoTFzqWUFPPuQYXI/CDaH/Bgx/fk/84t/Bc9A==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/type-utils@8.1.0': + resolution: {integrity: sha512-oLYvTxljVvsMnldfl6jIKxTaU7ok7km0KDrwOt1RHYu6nxlhN3TIx8k5Q52L6wR33nOwDgM7VwW1fT1qMNfFIA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/types@7.13.0': - resolution: {integrity: sha512-QWuwm9wcGMAuTsxP+qz6LBBd3Uq8I5Nv8xb0mk54jmNoCyDspnMvVsOxI6IsMmway5d1S9Su2+sCKv1st2l6eA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@8.1.0': + resolution: {integrity: sha512-q2/Bxa0gMOu/2/AKALI0tCKbG2zppccnRIRCW6BaaTlRVaPKft4oVYPp7WOPpcnsgbr0qROAVCVKCvIQ0tbWog==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@7.13.0': - resolution: {integrity: sha512-cAvBvUoobaoIcoqox1YatXOnSl3gx92rCZoMRPzMNisDiM12siGilSM4+dJAekuuHTibI2hVC2fYK79iSFvWjw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/typescript-estree@8.1.0': + resolution: {integrity: sha512-NTHhmufocEkMiAord/g++gWKb0Fr34e9AExBRdqgWdVBaKoei2dIyYKD9Q0jBnvfbEA5zaf8plUFMUH6kQ0vGg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/utils@7.13.0': - resolution: {integrity: sha512-jceD8RgdKORVnB4Y6BqasfIkFhl4pajB1wVxrF4akxD2QPM8GNYjgGwEzYS+437ewlqqrg7Dw+6dhdpjMpeBFQ==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/utils@8.1.0': + resolution: {integrity: sha512-ypRueFNKTIFwqPeJBfeIpxZ895PQhNyH4YID6js0UoBImWYoSjBsahUn9KMiJXh94uOjVBgHD9AmkyPsPnFwJA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@7.13.0': - resolution: {integrity: sha512-nxn+dozQx+MK61nn/JP+M4eCkHDSxSLDpgE3WcQo0+fkjEolnaB5jswvIKC4K56By8MMgIho7f1PVxERHEo8rw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@8.1.0': + resolution: {integrity: sha512-ba0lNI19awqZ5ZNKh6wCModMwoZs457StTebQ0q1NP58zSi2F6MOZRXwfKZy+jB78JNJ/WH8GSh2IQNzXX8Nag==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -298,8 +305,8 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} engines: {node: '>=0.4.0'} hasBin: true @@ -360,8 +367,8 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} - debug@4.3.5: - resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} + debug@4.3.6: + resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -380,9 +387,9 @@ packages: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} - esbuild@0.21.5: - resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} - engines: {node: '>=12'} + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} hasBin: true escape-string-regexp@4.0.0: @@ -406,8 +413,8 @@ packages: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} esrecurse@4.3.0: @@ -487,8 +494,8 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} import-fresh@3.3.0: @@ -563,8 +570,8 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - minimatch@9.0.4: - resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} moment@2.29.4: @@ -576,8 +583,8 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - obsidian@1.5.7-1: - resolution: {integrity: sha512-T5ZRuQ1FnfXqEoakTTHVDYvzUEEoT8zSPnQCW31PVgYwG4D4tZCQfKHN2hTz1ifnCe8upvwa6mBTAP2WUA5Vng==} + obsidian@1.6.6: + resolution: {integrity: sha512-GZHzeOiwmw/wBjB5JwrsxAZBLqxGQmqtEKSvJJvT0LtTcqeOFnV8jv0ZK5kO7hBb44WxJc+LdS7mZgLXbb+qXQ==} peerDependencies: '@codemirror/state': ^6.0.0 '@codemirror/view': ^6.0.0 @@ -648,8 +655,8 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - semver@7.6.2: - resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} hasBin: true @@ -704,13 +711,13 @@ packages: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} - typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} hasBin: true - undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.19.6: + resolution: {integrity: sha512-e/vggGopEfTKSvj4ihnOLTsqhrKRN3LeO6qSN/GxohhuRv8qH9bNQ4B8W7e/vFL+0XTnmHPB4/kegunZGA4Org==} uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -744,73 +751,76 @@ snapshots: style-mod: 4.1.2 w3c-keyname: 2.2.8 - '@esbuild/aix-ppc64@0.21.5': + '@esbuild/aix-ppc64@0.23.1': optional: true - '@esbuild/android-arm64@0.21.5': + '@esbuild/android-arm64@0.23.1': optional: true - '@esbuild/android-arm@0.21.5': + '@esbuild/android-arm@0.23.1': optional: true - '@esbuild/android-x64@0.21.5': + '@esbuild/android-x64@0.23.1': optional: true - '@esbuild/darwin-arm64@0.21.5': + '@esbuild/darwin-arm64@0.23.1': optional: true - '@esbuild/darwin-x64@0.21.5': + '@esbuild/darwin-x64@0.23.1': optional: true - '@esbuild/freebsd-arm64@0.21.5': + '@esbuild/freebsd-arm64@0.23.1': optional: true - '@esbuild/freebsd-x64@0.21.5': + '@esbuild/freebsd-x64@0.23.1': optional: true - '@esbuild/linux-arm64@0.21.5': + '@esbuild/linux-arm64@0.23.1': optional: true - '@esbuild/linux-arm@0.21.5': + '@esbuild/linux-arm@0.23.1': optional: true - '@esbuild/linux-ia32@0.21.5': + '@esbuild/linux-ia32@0.23.1': optional: true - '@esbuild/linux-loong64@0.21.5': + '@esbuild/linux-loong64@0.23.1': optional: true - '@esbuild/linux-mips64el@0.21.5': + '@esbuild/linux-mips64el@0.23.1': optional: true - '@esbuild/linux-ppc64@0.21.5': + '@esbuild/linux-ppc64@0.23.1': optional: true - '@esbuild/linux-riscv64@0.21.5': + '@esbuild/linux-riscv64@0.23.1': optional: true - '@esbuild/linux-s390x@0.21.5': + '@esbuild/linux-s390x@0.23.1': optional: true - '@esbuild/linux-x64@0.21.5': + '@esbuild/linux-x64@0.23.1': optional: true - '@esbuild/netbsd-x64@0.21.5': + '@esbuild/netbsd-x64@0.23.1': optional: true - '@esbuild/openbsd-x64@0.21.5': + '@esbuild/openbsd-arm64@0.23.1': optional: true - '@esbuild/sunos-x64@0.21.5': + '@esbuild/openbsd-x64@0.23.1': optional: true - '@esbuild/win32-arm64@0.21.5': + '@esbuild/sunos-x64@0.23.1': optional: true - '@esbuild/win32-ia32@0.21.5': + '@esbuild/win32-arm64@0.23.1': optional: true - '@esbuild/win32-x64@0.21.5': + '@esbuild/win32-ia32@0.23.1': + optional: true + + '@esbuild/win32-x64@0.23.1': optional: true '@eslint-community/eslint-utils@4.4.0(eslint@8.56.0)': @@ -818,15 +828,15 @@ snapshots: eslint: 8.56.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.10.1': {} + '@eslint-community/regexpp@4.11.0': {} '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.5 + debug: 4.3.6 espree: 9.6.1 globals: 13.24.0 - ignore: 5.3.1 + ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -839,7 +849,7 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.5 + debug: 4.3.6 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -866,102 +876,102 @@ snapshots: '@types/estree@1.0.5': {} - '@types/node@20.14.2': + '@types/node@22.4.0': dependencies: - undici-types: 5.26.5 + undici-types: 6.19.6 '@types/tern@0.23.9': dependencies: '@types/estree': 1.0.5 - '@typescript-eslint/eslint-plugin@7.13.0(@typescript-eslint/parser@7.13.0(eslint@8.56.0)(typescript@5.4.5))(eslint@8.56.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0(eslint@8.56.0)(typescript@5.5.4))(eslint@8.56.0)(typescript@5.5.4)': dependencies: - '@eslint-community/regexpp': 4.10.1 - '@typescript-eslint/parser': 7.13.0(eslint@8.56.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.13.0 - '@typescript-eslint/type-utils': 7.13.0(eslint@8.56.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.13.0(eslint@8.56.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.13.0 + '@eslint-community/regexpp': 4.11.0 + '@typescript-eslint/parser': 8.1.0(eslint@8.56.0)(typescript@5.5.4) + '@typescript-eslint/scope-manager': 8.1.0 + '@typescript-eslint/type-utils': 8.1.0(eslint@8.56.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.1.0(eslint@8.56.0)(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.1.0 eslint: 8.56.0 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.4.5) + ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.13.0(eslint@8.56.0)(typescript@5.4.5)': + '@typescript-eslint/parser@8.1.0(eslint@8.56.0)(typescript@5.5.4)': dependencies: - '@typescript-eslint/scope-manager': 7.13.0 - '@typescript-eslint/types': 7.13.0 - '@typescript-eslint/typescript-estree': 7.13.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.13.0 - debug: 4.3.5 + '@typescript-eslint/scope-manager': 8.1.0 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.1.0 + debug: 4.3.6 eslint: 8.56.0 optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.13.0': + '@typescript-eslint/scope-manager@8.1.0': dependencies: - '@typescript-eslint/types': 7.13.0 - '@typescript-eslint/visitor-keys': 7.13.0 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/visitor-keys': 8.1.0 - '@typescript-eslint/type-utils@7.13.0(eslint@8.56.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@8.1.0(eslint@8.56.0)(typescript@5.5.4)': dependencies: - '@typescript-eslint/typescript-estree': 7.13.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.13.0(eslint@8.56.0)(typescript@5.4.5) - debug: 4.3.5 - eslint: 8.56.0 - ts-api-utils: 1.3.0(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) + '@typescript-eslint/utils': 8.1.0(eslint@8.56.0)(typescript@5.5.4) + debug: 4.3.6 + ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.4 transitivePeerDependencies: + - eslint - supports-color - '@typescript-eslint/types@7.13.0': {} + '@typescript-eslint/types@8.1.0': {} - '@typescript-eslint/typescript-estree@7.13.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@8.1.0(typescript@5.5.4)': dependencies: - '@typescript-eslint/types': 7.13.0 - '@typescript-eslint/visitor-keys': 7.13.0 - debug: 4.3.5 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/visitor-keys': 8.1.0 + debug: 4.3.6 globby: 11.1.0 is-glob: 4.0.3 - minimatch: 9.0.4 - semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.4.5) + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.13.0(eslint@8.56.0)(typescript@5.4.5)': + '@typescript-eslint/utils@8.1.0(eslint@8.56.0)(typescript@5.5.4)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) - '@typescript-eslint/scope-manager': 7.13.0 - '@typescript-eslint/types': 7.13.0 - '@typescript-eslint/typescript-estree': 7.13.0(typescript@5.4.5) + '@typescript-eslint/scope-manager': 8.1.0 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) eslint: 8.56.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.13.0': + '@typescript-eslint/visitor-keys@8.1.0': dependencies: - '@typescript-eslint/types': 7.13.0 + '@typescript-eslint/types': 8.1.0 eslint-visitor-keys: 3.4.3 '@ungap/structured-clone@1.2.0': {} - acorn-jsx@5.3.2(acorn@8.11.3): + acorn-jsx@5.3.2(acorn@8.12.1): dependencies: - acorn: 8.11.3 + acorn: 8.12.1 - acorn@8.11.3: {} + acorn@8.12.1: {} ajv@6.12.6: dependencies: @@ -1018,7 +1028,7 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - debug@4.3.5: + debug@4.3.6: dependencies: ms: 2.1.2 @@ -1032,31 +1042,32 @@ snapshots: dependencies: esutils: 2.0.3 - esbuild@0.21.5: + esbuild@0.23.1: optionalDependencies: - '@esbuild/aix-ppc64': 0.21.5 - '@esbuild/android-arm': 0.21.5 - '@esbuild/android-arm64': 0.21.5 - '@esbuild/android-x64': 0.21.5 - '@esbuild/darwin-arm64': 0.21.5 - '@esbuild/darwin-x64': 0.21.5 - '@esbuild/freebsd-arm64': 0.21.5 - '@esbuild/freebsd-x64': 0.21.5 - '@esbuild/linux-arm': 0.21.5 - '@esbuild/linux-arm64': 0.21.5 - '@esbuild/linux-ia32': 0.21.5 - '@esbuild/linux-loong64': 0.21.5 - '@esbuild/linux-mips64el': 0.21.5 - '@esbuild/linux-ppc64': 0.21.5 - '@esbuild/linux-riscv64': 0.21.5 - '@esbuild/linux-s390x': 0.21.5 - '@esbuild/linux-x64': 0.21.5 - '@esbuild/netbsd-x64': 0.21.5 - '@esbuild/openbsd-x64': 0.21.5 - '@esbuild/sunos-x64': 0.21.5 - '@esbuild/win32-arm64': 0.21.5 - '@esbuild/win32-ia32': 0.21.5 - '@esbuild/win32-x64': 0.21.5 + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 escape-string-regexp@4.0.0: {} @@ -1070,7 +1081,7 @@ snapshots: eslint@8.56.0: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) - '@eslint-community/regexpp': 4.10.1 + '@eslint-community/regexpp': 4.11.0 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.56.0 '@humanwhocodes/config-array': 0.11.14 @@ -1080,13 +1091,13 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.5 + debug: 4.3.6 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - esquery: 1.5.0 + esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 @@ -1094,7 +1105,7 @@ snapshots: glob-parent: 6.0.2 globals: 13.24.0 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -1112,11 +1123,11 @@ snapshots: espree@9.6.1: dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 3.4.3 - esquery@1.5.0: + esquery@1.6.0: dependencies: estraverse: 5.3.0 @@ -1195,7 +1206,7 @@ snapshots: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.1 + ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 @@ -1203,7 +1214,7 @@ snapshots: has-flag@4.0.0: {} - ignore@5.3.1: {} + ignore@5.3.2: {} import-fresh@3.3.0: dependencies: @@ -1267,7 +1278,7 @@ snapshots: dependencies: brace-expansion: 1.1.11 - minimatch@9.0.4: + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -1277,7 +1288,7 @@ snapshots: natural-compare@1.4.0: {} - obsidian@1.5.7-1(@codemirror/state@6.3.3)(@codemirror/view@6.22.3): + obsidian@1.6.6(@codemirror/state@6.3.3)(@codemirror/view@6.22.3): dependencies: '@codemirror/state': 6.3.3 '@codemirror/view': 6.22.3 @@ -1337,7 +1348,7 @@ snapshots: dependencies: queue-microtask: 1.2.3 - semver@7.6.2: {} + semver@7.6.3: {} shebang-command@2.0.0: dependencies: @@ -1365,9 +1376,9 @@ snapshots: dependencies: is-number: 7.0.0 - ts-api-utils@1.3.0(typescript@5.4.5): + ts-api-utils@1.3.0(typescript@5.5.4): dependencies: - typescript: 5.4.5 + typescript: 5.5.4 tslib@2.6.3: {} @@ -1377,9 +1388,9 @@ snapshots: type-fest@0.20.2: {} - typescript@5.4.5: {} + typescript@5.5.4: {} - undici-types@5.26.5: {} + undici-types@6.19.6: {} uri-js@4.4.1: dependencies: diff --git a/src/main.ts b/src/main.ts index 2eb1266..afbecbe 100755 --- a/src/main.ts +++ b/src/main.ts @@ -1,3 +1,4 @@ +// biome-ignore lint/style/useNodejsImportProtocol: import { exec } from "child_process"; import { type App, @@ -7,11 +8,14 @@ import { Plugin, PluginSettingTab, Setting, + TFile, normalizePath, } from "obsidian"; +// biome-ignore lint/style/useNodejsImportProtocol: import { join, parse } from "path"; -import { format, promisify } from "util"; +// biome-ignore lint/style/useNodejsImportProtocol: +import { promisify } from "util"; import { t } from "./lang/helpers"; @@ -21,199 +25,185 @@ interface Attachment { name: string; ext: string; source: string; - existenceState: string; //"network" | "local" | "missing" + existenceState: "network" | "local" | "missing"; inVaultPath: string; inSystemPath: string; } + interface PluginSettings { uploadService: string; uploadCommand: string; testFilePath: string; - uploadFileFormat: string; + uploadFileFormat: Set; isDeleteSourceFile: boolean; } -interface uploadCommandDict { - [service: string]: string; -} -const uploadCommandDict: uploadCommandDict = { - uPic: "/Applications/uPic.app/Contents/MacOS/uPic -o url -u %s", - Picsee: "/Applications/Picsee.app/Contents/MacOS/Picsee -u %s", - custom: "", -}; + const DEFAULT_SETTINGS: PluginSettings = { uploadService: "uPic", - uploadCommand: uploadCommandDict.uPic, - uploadFileFormat: ".png\n.jpg\n.jpeg\n.gif\n.webp\n.ico\n.svg\n.bmp", + uploadCommand: "/Applications/uPic.app/Contents/MacOS/uPic -o url -u %s", + uploadFileFormat: new Set([".png", ".jpg", ".jpeg", ".gif", ".webp", ".ico", ".svg", ".bmp"]), testFilePath: "", isDeleteSourceFile: false, }; export default class AttachmentUploader extends Plugin { settings!: PluginSettings; + async onload() { await this.loadSettings(); - // 侧栏上传按钮 - this.addRibbonIcon("upload", t("Upload attachments"), (evt: MouseEvent) => { - this.uploadEditorAttachment(); - }); + + this.addRibbonIcon("upload", t("Upload attachments"), this.uploadEditorAttachment.bind(this)); + this.addCommand({ id: "upload-editor-attachments", name: "Upload editor attachments", editorCallback: () => this.uploadEditorAttachment(), }); + this.addSettingTab(new SettingTab(this.app, this)); } - /** - * 上传编辑器内符合条件的附件 - */ - private uploadEditorAttachment() { + private async uploadEditorAttachment() { const activeEditor = this.app.workspace.activeEditor; - if (activeEditor) { - const attachments = this.getEditorAttachments(activeEditor); + if (!activeEditor) return; + + const attachments = this.getEditorAttachments(activeEditor); + if (attachments.length === 0) { + new Notice(t("No local attachment matching the upload conditions was found.")); + return; + } + + new Notice( + `${attachments.length} ${t("attachments that matched the upload conditions \n Start uploading replacement...")}`, + ); + + for (const attachment of attachments) { + await this.processAttachment(attachment, activeEditor); + } + } + + private async processAttachment(attachment: Attachment, activeEditor: MarkdownFileInfo) { + const sourceFile = this.app.vault.getAbstractFileByPath(attachment.inVaultPath); + const uploadResult = await this.uploadServe(attachment.inSystemPath); + + if (uploadResult.success && uploadResult.url) { + this.updateEditorContent(activeEditor, attachment, uploadResult.url); + if (this.settings.isDeleteSourceFile && sourceFile instanceof TFile) { + await this.app.vault.delete(sourceFile); + } + this.showSuccessNotice(attachment, uploadResult.url, sourceFile instanceof TFile); + } else { new Notice( - attachments.length > 0 - ? `${attachments.length} + - ${t("attachments that matched the upload conditions \n Start uploading replacement...")}` - : `${t("No local attachment matching the upload conditions was found.")}`, + `${t("Upload failed:")}${attachment.inVaultPath}\n\n${t("Error message:")}\n${uploadResult.errorMessage}`, ); - // biome-ignore lint/complexity/noForEach: - attachments.forEach(async (attachment) => { - // 获取附件在 vault 中的路径,配置需要删除时传入文件删除文件 - const sourceFile = this.app.vault.getAbstractFileByPath(attachment.inVaultPath); - // 调用上传服务进行上传 - const uploadResult = await this.uploadServe(attachment.inSystemPath); - if (uploadResult.success) { - // 更新编辑器中的内容,将源文件地址替换为上传后附件的网络地址 - activeEditor?.editor?.setValue( - activeEditor?.editor?.getValue().replace(attachment.source, `![${attachment.alt}](${uploadResult.url})`), - ); - // 如果设置为删除源文件且源文件存在,则删除源文件 - if (this.settings.isDeleteSourceFile && sourceFile) { - this.app.vault.delete(sourceFile); - } - new Notice( - `${t("Uploaded attachment:")}${attachment.inVaultPath}\n - ${t("Replace with:")}${uploadResult.url}\n - ${this.settings.isDeleteSourceFile && sourceFile ? `${t("Local attachment deleted")}` : ""}`, - ); - } else { - new Notice( - `${t("Upload failed:")}${attachment.inVaultPath}\n\n${t("Error message:")}\n${uploadResult.errorMessage}`, - ); - } - }); } } - /** - * 获取编辑器中的附件信息 - * - * @param markdownFile - Markdown 文件信息对象 - * @returns 附件数组 - */ + private updateEditorContent(editor: MarkdownFileInfo, attachment: Attachment, newUrl: string) { + const content = editor.editor?.getValue() ?? ""; + const updatedContent = content.replace(attachment.source, `![${attachment.alt}](${newUrl})`); + editor.editor?.setValue(updatedContent); + } + + private showSuccessNotice(attachment: Attachment, newUrl: string, fileDeleted: boolean) { + new Notice( + `${t("Uploaded attachment:")}${attachment.inVaultPath}\n${t("Replace with:")}${newUrl}\n${ + fileDeleted ? `${t("Local attachment deleted")}` : "" + }`, + ); + } + private getEditorAttachments(markdownFile: MarkdownFileInfo): Attachment[] { - const attachments: Attachment[] = []; - const regex = /!\[(.*?)\]\((.*?)\)/g; // 用于匹配 Markdown 格式的图片链接的正则表达式 - const matches = markdownFile?.editor?.getValue().match(regex); // 从编辑器中获取 Markdown 文件的内容,并使用正则表达式匹配图片链接 - // 获取文件所在的 vault 路径 - const vaultSystemPath = (markdownFile?.file?.vault.adapter as FileSystemAdapter).getBasePath(); - - if (matches) { - // biome-ignore lint/complexity/noForEach: - matches.forEach((match) => { - const attSourcePath = match.match(/\((.*?)\)/)?.[1]; // 从匹配结果中提取图片链接的路径部分 - const alt = match.match(/\[(.*?)\]/)?.[1]; // 从匹配结果中提取图片的 alt 文本 - - if (attSourcePath) { - // 将图片链接路径进行解码、规范化和解析,得到文件的信息 - const file = parse(normalizePath(decodeURI(attSourcePath))); - // 在 Vault 中查找与该文件名称和扩展名匹配的文件 - const searchFile = this.app.vault.getFiles().find((f) => f.name === file.name + file.ext.toLowerCase()); - - const attachment = { - source: match, - alt: alt ? alt : file.name, // 如果有指定 alt 文本,则使用指定的 alt 文本,否则使用文件名称作为 alt 文本 - basename: file.base, - name: file.name, - ext: file.ext, - existenceState: attSourcePath.startsWith("http") - ? "network" // 图片链接是网络地址 - : searchFile - ? "local" // 图片链接是本地地址 - : "missing", // 图片链接未找到 - inVaultPath: searchFile ? searchFile?.path : normalizePath(attSourcePath), // 在 Vault 中找到对应的文件获取其 Vault 路径,否则为绝为原附件路径/图片网络链接 - inSystemPath: searchFile - ? encodeURI(join(vaultSystemPath, searchFile?.path)) // 如果找到对应的文件,则拼接出系统路径,否则为原附件路径/图片网络链接 - : encodeURI(normalizePath(attSourcePath)), - }; - - if ( - this.settings.uploadFileFormat - .split("\n") - .includes(attachment.ext.toLowerCase()) && // 检查文件扩展名是否在允许上传的文件格式中 - attachment.existenceState === "local" // 检查图片链接是否存在本地 - ) { - attachments.push(attachment); // 将符合条件的附件添加到附件数组中 - } - } - }); - } + const content = markdownFile.editor?.getValue() ?? ""; + const regex = /!\[(.*?)\]\((.*?)\)/g; + const matches = content.match(regex); + if (!matches) return []; + + const vaultSystemPath = (this.app.vault.adapter as FileSystemAdapter).getBasePath(); + return matches + .map((match) => this.parseAttachment(match, vaultSystemPath)) + .filter( + (attachment): attachment is Attachment => + attachment !== null && + this.settings.uploadFileFormat.has(attachment.ext.toLowerCase()) && + attachment.existenceState === "local", + ); + } + + private parseAttachment(match: string, vaultSystemPath: string): Attachment | null { + const attSourcePath = match.match(/\((.*?)\)/)?.[1]; + const alt = match.match(/\[(.*?)\]/)?.[1]; + if (!attSourcePath) return null; - return attachments; // 返回附件数组 + const file = parse(normalizePath(decodeURI(attSourcePath))); + const searchFile = this.app.vault.getFiles().find((f) => f.name === file.name + file.ext.toLowerCase()); + + return { + source: match, + alt: alt ?? file.name, + basename: file.base, + name: file.name, + ext: file.ext, + existenceState: attSourcePath.startsWith("http") ? "network" : searchFile ? "local" : "missing", + inVaultPath: searchFile ? searchFile.path : normalizePath(attSourcePath), + inSystemPath: searchFile + ? encodeURI(join(vaultSystemPath, searchFile.path)) + : encodeURI(normalizePath(attSourcePath)), + }; } - /** 上传命令执行后从 shell 输出中提取上传后的链接 - * - * @param path 要上传的文件在系统内的路径 - */ async uploadServe(path: string): Promise<{ success: boolean; url?: string; errorMessage?: string }> { const execPromise = promisify(exec); - // 构建 shell 命令 - const command = format(this.settings.uploadCommand, path); try { - const { stdout } = await execPromise(command); + const { stdout } = await execPromise(this.settings.uploadCommand.replace("%s", path)); const urlMatch = stdout.match(/\s+(https?:\/\/\S+)/); - if (urlMatch) { - const decodeUrl = decodeURIComponent(urlMatch[1]); - return { - success: true, - url: decodeUrl, - }; - } - return { - success: false, - errorMessage: stdout, - }; - } catch (err: unknown) { - const error = err as Error; - console.error(`err: ${error}`); - new Notice(error.message.toString()); - throw err; + return urlMatch + ? { success: true, url: decodeURIComponent(urlMatch[1]) } + : { success: false, errorMessage: stdout }; + } catch (err) { + console.error(`Upload error: ${err}`); + return { success: false, errorMessage: (err as Error).message }; } } + async loadSettings() { - this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); + const loadedData = await this.loadData(); + this.settings = { ...DEFAULT_SETTINGS, ...loadedData }; + + if (loadedData?.uploadService === "custom" && loadedData?.uploadCommand) { + this.settings.uploadCommand = loadedData.uploadCommand; + } } + async saveSettings() { - await this.saveData(this.settings); + await this.saveData({ + ...this.settings, + uploadFileFormat: Array.from(this.settings.uploadFileFormat).join("\n"), + }); } - onunload() { } } class SettingTab extends PluginSettingTab { plugin: AttachmentUploader; + constructor(app: App, plugin: AttachmentUploader) { super(app, plugin); this.plugin = plugin; } + display(): void { const { containerEl } = this; containerEl.empty(); + this.addUploadCommandSettings(containerEl); + this.addUploadRulesSettings(containerEl); + } + + private addUploadCommandSettings(containerEl: HTMLElement): void { containerEl.createEl("h2", { text: t("Upload command") }); - new Setting(containerEl).setName(t("Upload service")).addDropdown((dropdown) => { - return dropdown + + new Setting(containerEl).setName(t("Upload service")).addDropdown((dropdown) => + dropdown .addOptions({ uPic: "uPic", Picsee: "Picsee", @@ -222,36 +212,43 @@ class SettingTab extends PluginSettingTab { .setValue(this.plugin.settings.uploadService) .onChange(async (value) => { this.plugin.settings.uploadService = value; - this.plugin.settings.uploadCommand = uploadCommandDict[this.plugin.settings.uploadService]; - this.display(); + this.plugin.settings.uploadCommand = + value === "custom" ? this.plugin.settings.uploadCommand : DEFAULT_SETTINGS.uploadCommand; await this.plugin.saveSettings(); - }); - }); + this.display(); + }), + ); + new Setting(containerEl) .setName(t("Executed command")) .setDesc( `${t( "The command is executed using the exec method of child_process. %s indicates the path of the file to be uploaded, reserve it. Extract the uploaded link from the shell output after execution,", - )}‘urlMatch = stdout.match(/s+(https?:/ / S +) /)’`, + )} 'urlMatch = stdout.match(/s+(https?:/ / S +) /)'`, ) - .addTextArea((textArea) => { + .addTextArea((textArea) => textArea - .setValue(uploadCommandDict[this.plugin.settings.uploadService]) + .setValue(this.plugin.settings.uploadCommand) .onChange(async (value) => { this.plugin.settings.uploadCommand = value; await this.plugin.saveSettings(); }) - .setDisabled(this.plugin.settings.uploadService !== "custom"); + .setDisabled(this.plugin.settings.uploadService !== "custom"), + ); - textArea.inputEl.style.height = "80px"; - }); + this.addTestFilePathSetting(containerEl); + } - new Setting(containerEl).setName(t("Test file path")).addText((text) => { - text.onChange(async (value) => { - this.plugin.settings.testFilePath = value; - await this.plugin.saveSettings(); - }); - new Setting(containerEl).addButton((btn) => { + private addTestFilePathSetting(containerEl: HTMLElement): void { + new Setting(containerEl) + .setName(t("Test file path")) + .addText((text) => + text.onChange(async (value) => { + this.plugin.settings.testFilePath = value; + await this.plugin.saveSettings(); + }), + ) + .addButton((btn) => btn.setButtonText(t("Upload test")).onClick(async () => { if (!this.plugin.settings.testFilePath) { new Notice(t("Enter the test file path")); @@ -259,11 +256,13 @@ class SettingTab extends PluginSettingTab { } const uploadResult = await this.plugin.uploadServe(this.plugin.settings.testFilePath); new Notice(uploadResult.success ? t("Upload successful") : t("Upload failed") + uploadResult.errorMessage); - }); - }); - }); + }), + ); + } + private addUploadRulesSettings(containerEl: HTMLElement): void { containerEl.createEl("h2", { text: t("Upload rules") }); + new Setting(containerEl) .setName(t("Attachment format to be uploaded")) .setDesc( @@ -271,18 +270,18 @@ class SettingTab extends PluginSettingTab { "The file in the configuration format will be uploaded when the command is executed and the original address will be replaced with the network address. The format will be separated by carriage returns.", ), ) - .addTextArea((textArea) => { - textArea.setValue(this.plugin.settings.uploadFileFormat).onChange(async (value) => { - this.plugin.settings.uploadFileFormat = value; + .addTextArea((textArea) => + textArea.setValue(Array.from(this.plugin.settings.uploadFileFormat).join("\n")).onChange(async (value) => { + this.plugin.settings.uploadFileFormat = new Set(value.split("\n").filter(Boolean)); await this.plugin.saveSettings(); - }); - textArea.inputEl.style.height = "150px"; - }); - new Setting(containerEl).setName(t("Delete local files after successful upload")).addToggle((toggle) => { + }), + ); + + new Setting(containerEl).setName(t("Delete local files after successful upload")).addToggle((toggle) => toggle.setValue(this.plugin.settings.isDeleteSourceFile).onChange(async (value) => { this.plugin.settings.isDeleteSourceFile = value; await this.plugin.saveSettings(); - }); - }); + }), + ); } } diff --git a/versions.json b/versions.json index b4784e3..cee3416 100755 --- a/versions.json +++ b/versions.json @@ -1,4 +1,4 @@ { "1.0.0": "0.15.0", - "1.0.4": "0.15.0" -} \ No newline at end of file + "1.0.5": "0.15.0" +}