Update to tauri v2
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
import { internalIpV4 } from "internal-ip";
|
||||
|
||||
// @ts-expect-error process is a nodejs global
|
||||
const mobile = !!/android|ios/.exec(process.env.TAURI_ENV_PLATFORM);
|
||||
|
||||
export default defineNuxtConfig({
|
||||
modules: [
|
||||
"@vueuse/nuxt",
|
||||
@@ -15,9 +20,6 @@ export default defineNuxtConfig({
|
||||
bodyAttrs: {
|
||||
class: "font-text antialiased"
|
||||
},
|
||||
link: [
|
||||
{ rel: "shortcut-icon", href: "/favicon.svg" }
|
||||
],
|
||||
noscript: [
|
||||
{ children: "JavaScript is required to run this project" }
|
||||
]
|
||||
@@ -36,15 +38,15 @@ export default defineNuxtConfig({
|
||||
imports: ["getName", "getVersion", "getTauriVersion"]
|
||||
},
|
||||
{
|
||||
from: "@tauri-apps/api/shell",
|
||||
from: "@tauri-apps/plugin-shell",
|
||||
imports: ["Command"]
|
||||
},
|
||||
{
|
||||
from: "@tauri-apps/api/os",
|
||||
from: "@tauri-apps/plugin-os",
|
||||
imports: ["platform"]
|
||||
},
|
||||
{
|
||||
from: "@tauri-apps/api/notification",
|
||||
from: "@tauri-apps/plugin-notification",
|
||||
imports: ["sendNotification", "requestPermission", "isPermissionGranted"]
|
||||
}
|
||||
]
|
||||
@@ -54,11 +56,11 @@ export default defineNuxtConfig({
|
||||
envPrefix: ["VITE_", "TAURI_"],
|
||||
server: {
|
||||
strictPort: true,
|
||||
hmr: {
|
||||
hmr: mobile ? {
|
||||
protocol: "ws",
|
||||
host: "0.0.0.0",
|
||||
port: 3001
|
||||
},
|
||||
host: await internalIpV4(),
|
||||
port: 3001,
|
||||
} : undefined,
|
||||
watch: {
|
||||
ignored: ["**/src-tauri/**"]
|
||||
}
|
||||
|
12
package.json
12
package.json
@@ -20,21 +20,25 @@
|
||||
"tauri:build": "tauri build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^1"
|
||||
"@tauri-apps/api": ">=2.0.0-beta.13",
|
||||
"@tauri-apps/plugin-notification": "2.0.0-beta.5",
|
||||
"@tauri-apps/plugin-os": "2.0.0-beta.5",
|
||||
"@tauri-apps/plugin-shell": "2.0.0-beta.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^2.21.1",
|
||||
"@iconify-json/heroicons-solid": "^1.1.11",
|
||||
"@nuxt/eslint": "^0.3.13",
|
||||
"@tauri-apps/cli": ">=2.0.0-beta.20",
|
||||
"@unocss/eslint-plugin": "^0.61.0",
|
||||
"@unocss/nuxt": "^0.61.0",
|
||||
"@vueuse/core": "^10.11.0",
|
||||
"@vueuse/nuxt": "^10.11.0",
|
||||
"eslint": "8.57.0",
|
||||
"@nuxt/eslint": "^0.3.13",
|
||||
"internal-ip": "^8.0.0",
|
||||
"nuxt": "^3.12.1",
|
||||
"sass": "^1.77.5",
|
||||
"typescript": "^5.4.5",
|
||||
"unplugin-auto-import": "^0.17.6",
|
||||
"@tauri-apps/cli": "^1"
|
||||
"unplugin-auto-import": "^0.17.6"
|
||||
}
|
||||
}
|
||||
|
200
pnpm-lock.yaml
generated
200
pnpm-lock.yaml
generated
@@ -9,8 +9,17 @@ importers:
|
||||
.:
|
||||
dependencies:
|
||||
'@tauri-apps/api':
|
||||
specifier: ^1
|
||||
version: 1.5.6
|
||||
specifier: '>=2.0.0-beta.0'
|
||||
version: 2.0.0-beta.13
|
||||
'@tauri-apps/plugin-notification':
|
||||
specifier: 2.0.0-beta.5
|
||||
version: 2.0.0-beta.5
|
||||
'@tauri-apps/plugin-os':
|
||||
specifier: 2.0.0-beta.5
|
||||
version: 2.0.0-beta.5
|
||||
'@tauri-apps/plugin-shell':
|
||||
specifier: 2.0.0-beta.6
|
||||
version: 2.0.0-beta.6
|
||||
devDependencies:
|
||||
'@antfu/eslint-config':
|
||||
specifier: ^2.21.1
|
||||
@@ -22,8 +31,8 @@ importers:
|
||||
specifier: ^0.3.13
|
||||
version: 0.3.13(eslint@8.57.0)(nuxt@3.12.1(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.61.0)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.12.1(rollup@4.14.3))(vue@3.4.29(typescript@5.4.5)))(ioredis@5.3.2)(optionator@0.9.3)(rollup@4.14.3)(sass@1.77.5)(terser@5.30.3)(typescript@5.4.5)(unocss@0.61.0(@unocss/webpack@0.61.0(rollup@4.14.3)(webpack@5.91.0(esbuild@0.21.5)))(postcss@8.4.38)(rollup@4.14.3)(vite@5.3.1(@types/node@20.12.7)(sass@1.77.5)(terser@5.30.3)))(vite@5.3.1(@types/node@20.12.7)(sass@1.77.5)(terser@5.30.3)))(rollup@4.14.3)(typescript@5.4.5)(vite@5.3.1(@types/node@20.12.7)(sass@1.77.5)(terser@5.30.3))
|
||||
'@tauri-apps/cli':
|
||||
specifier: ^1
|
||||
version: 1.5.14
|
||||
specifier: '>=2.0.0-beta.0'
|
||||
version: 2.0.0-beta.20
|
||||
'@unocss/eslint-plugin':
|
||||
specifier: ^0.61.0
|
||||
version: 0.61.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
@@ -39,6 +48,9 @@ importers:
|
||||
eslint:
|
||||
specifier: 8.57.0
|
||||
version: 8.57.0
|
||||
internal-ip:
|
||||
specifier: ^7.0.0
|
||||
version: 7.0.0
|
||||
nuxt:
|
||||
specifier: ^3.12.1
|
||||
version: 3.12.1(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.61.0)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.12.1(rollup@4.14.3))(vue@3.4.29(typescript@5.4.5)))(ioredis@5.3.2)(optionator@0.9.3)(rollup@4.14.3)(sass@1.77.5)(terser@5.30.3)(typescript@5.4.5)(unocss@0.61.0(@unocss/webpack@0.61.0(rollup@4.14.3)(webpack@5.91.0(esbuild@0.21.5)))(postcss@8.4.38)(rollup@4.14.3)(vite@5.3.1(@types/node@20.12.7)(sass@1.77.5)(terser@5.30.3)))(vite@5.3.1(@types/node@20.12.7)(sass@1.77.5)(terser@5.30.3))
|
||||
@@ -1304,75 +1316,84 @@ packages:
|
||||
peerDependencies:
|
||||
eslint: '>=8.40.0'
|
||||
|
||||
'@tauri-apps/api@1.5.6':
|
||||
resolution: {integrity: sha512-LH5ToovAHnDVe5Qa9f/+jW28I6DeMhos8bNDtBOmmnaDpPmJmYLyHdeDblAWWWYc7KKRDg9/66vMuKyq0WIeFA==}
|
||||
engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'}
|
||||
'@tauri-apps/api@2.0.0-beta.13':
|
||||
resolution: {integrity: sha512-Np1opKANzRMF3lgJ9gDquBCB9SxlE2lRmNpVx1+L6RyzAmigkuh0ZulT5jMnDA3JLsuSDU135r/s4t/Pmx4atg==}
|
||||
engines: {node: '>= 18', npm: '>= 6.6.0', yarn: '>= 1.19.1'}
|
||||
|
||||
'@tauri-apps/cli-darwin-arm64@1.5.14':
|
||||
resolution: {integrity: sha512-lxoSOp3KKSqzHJa7iT32dukPGMlfsTuja1xXSgwR8o/fqzpYJY7FY/3ZxesP8HR66FcK+vtqa//HNqeOQ0mHkA==}
|
||||
'@tauri-apps/cli-darwin-arm64@2.0.0-beta.20':
|
||||
resolution: {integrity: sha512-oCJOCib7GuYkwkBXx+ekamR8NZZU+2i3MLP+DHpDxK5gS2uhCE+CBkamJkNt6y1x6xdVnwyqZOm5RvN4SRtyIA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@tauri-apps/cli-darwin-x64@1.5.14':
|
||||
resolution: {integrity: sha512-EXSwN1n5spfG8FoXuyc90ACtmDJXzaZ1gxyENaq9xEpQoo7j/Q1vb6qXxmr6azKr8zmqY4h08ZFbv3exh93xJg==}
|
||||
'@tauri-apps/cli-darwin-x64@2.0.0-beta.20':
|
||||
resolution: {integrity: sha512-lC5QSnRExedYN4Ds6ZlSvC2PxP8qfIYBJQ5ktf+PJI5gQALdNeVtd6YnTG1ODCEklfLq9WKkGwp7JdALTU5wDA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@tauri-apps/cli-linux-arm-gnueabihf@1.5.14':
|
||||
resolution: {integrity: sha512-Yb8BH/KYR7Tl+de40sZPfrqbhcU3Jlu+UPIrnXt05sjn48xqIps74Xjz8zzVp0TuHxUp8FmIGtCVhQgsbrsvvg==}
|
||||
'@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.20':
|
||||
resolution: {integrity: sha512-nZCeBMHHye5DLOJV5k2w658hnCS+LYaOZ8y/G9l3ei+g0L/HBjlSy6r4simsAT5TG8+l3oCZzLBngfTMdDS/YA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@tauri-apps/cli-linux-arm64-gnu@1.5.14':
|
||||
resolution: {integrity: sha512-QrKHP4gRaHiup478rPBZ+BmNd88yze9jMmheoNy9mN1K/aECRmTHO+tWhsxv5moFHZzRhO0QDWxxvTtiaPXaGg==}
|
||||
'@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.20':
|
||||
resolution: {integrity: sha512-B79ISVLPVBgwnCchVqwTKU+vxnFYqxKomcR4rmsvxfs0NVtT5QuNzE1k4NUQnw3966yjwhYR3mnHsSJQSB4Eyw==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@tauri-apps/cli-linux-arm64-musl@1.5.14':
|
||||
resolution: {integrity: sha512-Hb1C1VMxmUcyGjW/K/INKF87zzzgLEVRmWZZnQd7M1P4uue4xPyIwUELSdX12Z2jREPgmLW4AXPD0m6wsNu7iw==}
|
||||
'@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.20':
|
||||
resolution: {integrity: sha512-ojIkv/1uZHhcrgfIN8xgn4BBeo/Xg+bnV0wer6lD78zyxkUMWeEZ+u3mae1ejCJNhhaZOxNaUQ67MvDOiGyr5Q==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@tauri-apps/cli-linux-x64-gnu@1.5.14':
|
||||
resolution: {integrity: sha512-kD9v/UwPDuhIgq2TJj/s2/7rqk+vmExVV6xHPKI8vVbIvlNAOZqmx3fpxjej1241vhJ/piGd/m6q6YMWGsL0oQ==}
|
||||
'@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.20':
|
||||
resolution: {integrity: sha512-xBy1FNbHKlc7T6pOmFQQPECxJaI5A9QWX7Kb9N64cNVusoOGlvc3xHYkXMS4PTr7xXOT0yiE1Ww2OwDRJ3lYsg==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@tauri-apps/cli-linux-x64-musl@1.5.14':
|
||||
resolution: {integrity: sha512-204Drgg9Zx0+THKndqASz4+iPCwqA3gQVF9C0CDIArNXrjPyJjVvW8VP5CHiZYaTNWxlz/ltyxluM6UFWbXNFw==}
|
||||
'@tauri-apps/cli-linux-x64-musl@2.0.0-beta.20':
|
||||
resolution: {integrity: sha512-+O6zq5jmtUxA1FUAAwF2ywPysy4NRo2Y6G+ESZDkY9XosRwdt5OUjqAsYktZA3AxDMZVei8r9buwTqUwi9ny/g==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@tauri-apps/cli-win32-arm64-msvc@1.5.14':
|
||||
resolution: {integrity: sha512-sqPSni2MnWNCm+8YZnLdWCclxfSHaYqKuPFSz8q7Tn1G1m/cA9gyPoC1G0esHftY7bu/ZM5lB4kM3I4U0KlLiA==}
|
||||
'@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.20':
|
||||
resolution: {integrity: sha512-RswgMbWyOQcv53CHvIuiuhAh4kKDqaGyZfWD4VlxqX/XhkoF5gsNgr0MxzrY7pmoL+89oVI+fiGVJz4nOQE5vA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@tauri-apps/cli-win32-ia32-msvc@1.5.14':
|
||||
resolution: {integrity: sha512-8xN8W0zTs8oFsQmvYLxHFeqhzVI7oTaPK1xQMc5gbpFP45jN41c21aCXfjnvzT+h90EfCHUF9EWj2HTEJSb7Iw==}
|
||||
'@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.20':
|
||||
resolution: {integrity: sha512-5lgWmDVXhX3SBGbiv5SduM1yajiRnUEJClWhSdRrEEJeXdsxpCsBEhxYnUnDCEzPKxLLn5fdBv3VrVctJ03csQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
|
||||
'@tauri-apps/cli-win32-x64-msvc@1.5.14':
|
||||
resolution: {integrity: sha512-U0slee5tNM2PYECBpPHavLSwkT3szGMZ+qhcikQQbDan84bQdLn/kHWjyXOgLJs4KSve4+KxcrN+AVqj0VyHnw==}
|
||||
'@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.20':
|
||||
resolution: {integrity: sha512-SuSiiVQTQPSzWlsxQp/NMzWbzDS9TdVDOw7CCfgiG5wnT2GsxzrcIAVN6i7ILsVFLxrjr0bIgPldSJcdcH84Yw==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@tauri-apps/cli@1.5.14':
|
||||
resolution: {integrity: sha512-JOSMKymlg116UdEXSj69eg5p1OtZnQkUE0qIGbtNDO1sk3X/KgBN6+oHBW0BzPStp/W0AjBgrMWCqjHPwEpOug==}
|
||||
'@tauri-apps/cli@2.0.0-beta.20':
|
||||
resolution: {integrity: sha512-707q9uIc2oNrYHd2dtMvxTrpZXVpart5EIktnRymNOpphkLlB6WUBjHD+ga45WqTU6cNGKbYvkKqTNfshNul9Q==}
|
||||
engines: {node: '>= 10'}
|
||||
hasBin: true
|
||||
|
||||
'@tauri-apps/plugin-notification@2.0.0-beta.5':
|
||||
resolution: {integrity: sha512-5zYK2aT1ZvR+LnuwsnTvg28iEhI7FiZSPvBqQ8y6fj28T4oIHVox19Pk4YRyTyfyJN1nZclXxVAqWLSXLI9SKQ==}
|
||||
|
||||
'@tauri-apps/plugin-os@2.0.0-beta.5':
|
||||
resolution: {integrity: sha512-Qfs/clZ9R05J+OVOGkko+9OaYaL+xJaGICeQ1G5CnLFpUdTfMV10D+1nBBauxDdiLU4ay5I0iprJ5aG5GJBunQ==}
|
||||
|
||||
'@tauri-apps/plugin-shell@2.0.0-beta.6':
|
||||
resolution: {integrity: sha512-g3nM9cQQGl7Iv4MvyFuco/aPTiwOI/MixcoKso3VQIg5Aqd64NqR0r+GfsB0qx52txItqzSXwmeaj1eZjO9Q6Q==}
|
||||
|
||||
'@trysound/sax@0.2.0':
|
||||
resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
@@ -2366,6 +2387,10 @@ packages:
|
||||
resolution: {integrity: sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
default-gateway@6.0.3:
|
||||
resolution: {integrity: sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==}
|
||||
engines: {node: '>= 10'}
|
||||
|
||||
define-lazy-prop@2.0.0:
|
||||
resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -3112,6 +3137,10 @@ packages:
|
||||
resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==}
|
||||
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
|
||||
|
||||
internal-ip@7.0.0:
|
||||
resolution: {integrity: sha512-qE4TeD4brqC45Vq/+VASeMiS1KRyfBkR6HT2sh9pZVVCzSjPkaCEfKFU+dL0PRv7NHJtvoKN2r82G6wTfzorkw==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
|
||||
ioredis@5.3.2:
|
||||
resolution: {integrity: sha512-1DKMMzlIHM02eBBVOFQ1+AolGjs6+xEcM4PDL7NqOS6szq7H9jSaEkIUH6/a5Hl241LzW6JLSiAbNvTQjUupUA==}
|
||||
engines: {node: '>=12.22.0'}
|
||||
@@ -3120,6 +3149,14 @@ packages:
|
||||
resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==}
|
||||
engines: {node: '>= 12'}
|
||||
|
||||
ip-regex@4.3.0:
|
||||
resolution: {integrity: sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
ipaddr.js@2.2.0:
|
||||
resolution: {integrity: sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==}
|
||||
engines: {node: '>= 10'}
|
||||
|
||||
iron-webcrypto@1.1.0:
|
||||
resolution: {integrity: sha512-5vgYsCakNlaQub1orZK5QmNYhwYtcllTkZBp5sfIaCqY93Cf6l+v2rtE+E4TMbcfjxDMCdrO8wmp7+ZvhDECLA==}
|
||||
|
||||
@@ -3180,6 +3217,10 @@ packages:
|
||||
resolution: {integrity: sha512-K55T22lfpQ63N4KEN57jZUAaAYqYHEe8veb/TycJRk9DdSCLLcovXz/mL6mOnhQaZsQGwPhuFopdQIlqGSEjiQ==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
is-ip@3.1.0:
|
||||
resolution: {integrity: sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
is-lambda@1.0.1:
|
||||
resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==}
|
||||
|
||||
@@ -3783,6 +3824,14 @@ packages:
|
||||
resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
|
||||
p-event@4.2.0:
|
||||
resolution: {integrity: sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
p-finally@1.0.0:
|
||||
resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==}
|
||||
engines: {node: '>=4'}
|
||||
|
||||
p-limit@2.3.0:
|
||||
resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -3811,6 +3860,10 @@ packages:
|
||||
resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
p-timeout@3.2.0:
|
||||
resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
p-try@2.2.0:
|
||||
resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -6651,50 +6704,62 @@ snapshots:
|
||||
- supports-color
|
||||
- typescript
|
||||
|
||||
'@tauri-apps/api@1.5.6': {}
|
||||
'@tauri-apps/api@2.0.0-beta.13': {}
|
||||
|
||||
'@tauri-apps/cli-darwin-arm64@1.5.14':
|
||||
'@tauri-apps/cli-darwin-arm64@2.0.0-beta.20':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-darwin-x64@1.5.14':
|
||||
'@tauri-apps/cli-darwin-x64@2.0.0-beta.20':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-linux-arm-gnueabihf@1.5.14':
|
||||
'@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.20':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-linux-arm64-gnu@1.5.14':
|
||||
'@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.20':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-linux-arm64-musl@1.5.14':
|
||||
'@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.20':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-linux-x64-gnu@1.5.14':
|
||||
'@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.20':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-linux-x64-musl@1.5.14':
|
||||
'@tauri-apps/cli-linux-x64-musl@2.0.0-beta.20':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-win32-arm64-msvc@1.5.14':
|
||||
'@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.20':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-win32-ia32-msvc@1.5.14':
|
||||
'@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.20':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-win32-x64-msvc@1.5.14':
|
||||
'@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.20':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli@1.5.14':
|
||||
'@tauri-apps/cli@2.0.0-beta.20':
|
||||
optionalDependencies:
|
||||
'@tauri-apps/cli-darwin-arm64': 1.5.14
|
||||
'@tauri-apps/cli-darwin-x64': 1.5.14
|
||||
'@tauri-apps/cli-linux-arm-gnueabihf': 1.5.14
|
||||
'@tauri-apps/cli-linux-arm64-gnu': 1.5.14
|
||||
'@tauri-apps/cli-linux-arm64-musl': 1.5.14
|
||||
'@tauri-apps/cli-linux-x64-gnu': 1.5.14
|
||||
'@tauri-apps/cli-linux-x64-musl': 1.5.14
|
||||
'@tauri-apps/cli-win32-arm64-msvc': 1.5.14
|
||||
'@tauri-apps/cli-win32-ia32-msvc': 1.5.14
|
||||
'@tauri-apps/cli-win32-x64-msvc': 1.5.14
|
||||
'@tauri-apps/cli-darwin-arm64': 2.0.0-beta.20
|
||||
'@tauri-apps/cli-darwin-x64': 2.0.0-beta.20
|
||||
'@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-beta.20
|
||||
'@tauri-apps/cli-linux-arm64-gnu': 2.0.0-beta.20
|
||||
'@tauri-apps/cli-linux-arm64-musl': 2.0.0-beta.20
|
||||
'@tauri-apps/cli-linux-x64-gnu': 2.0.0-beta.20
|
||||
'@tauri-apps/cli-linux-x64-musl': 2.0.0-beta.20
|
||||
'@tauri-apps/cli-win32-arm64-msvc': 2.0.0-beta.20
|
||||
'@tauri-apps/cli-win32-ia32-msvc': 2.0.0-beta.20
|
||||
'@tauri-apps/cli-win32-x64-msvc': 2.0.0-beta.20
|
||||
|
||||
'@tauri-apps/plugin-notification@2.0.0-beta.5':
|
||||
dependencies:
|
||||
'@tauri-apps/api': 2.0.0-beta.13
|
||||
|
||||
'@tauri-apps/plugin-os@2.0.0-beta.5':
|
||||
dependencies:
|
||||
'@tauri-apps/api': 2.0.0-beta.13
|
||||
|
||||
'@tauri-apps/plugin-shell@2.0.0-beta.6':
|
||||
dependencies:
|
||||
'@tauri-apps/api': 2.0.0-beta.13
|
||||
|
||||
'@trysound/sax@0.2.0': {}
|
||||
|
||||
@@ -6707,7 +6772,7 @@ snapshots:
|
||||
|
||||
'@types/eslint-scope@3.7.7':
|
||||
dependencies:
|
||||
'@types/eslint': 8.56.9
|
||||
'@types/eslint': 8.56.10
|
||||
'@types/estree': 1.0.5
|
||||
|
||||
'@types/eslint@8.56.10':
|
||||
@@ -8018,6 +8083,10 @@ snapshots:
|
||||
bundle-name: 4.1.0
|
||||
default-browser-id: 5.0.0
|
||||
|
||||
default-gateway@6.0.3:
|
||||
dependencies:
|
||||
execa: 5.1.1
|
||||
|
||||
define-lazy-prop@2.0.0: {}
|
||||
|
||||
define-lazy-prop@3.0.0: {}
|
||||
@@ -8919,6 +8988,13 @@ snapshots:
|
||||
|
||||
ini@4.1.1: {}
|
||||
|
||||
internal-ip@7.0.0:
|
||||
dependencies:
|
||||
default-gateway: 6.0.3
|
||||
ipaddr.js: 2.2.0
|
||||
is-ip: 3.1.0
|
||||
p-event: 4.2.0
|
||||
|
||||
ioredis@5.3.2:
|
||||
dependencies:
|
||||
'@ioredis/commands': 1.2.0
|
||||
@@ -8938,6 +9014,10 @@ snapshots:
|
||||
jsbn: 1.1.0
|
||||
sprintf-js: 1.1.3
|
||||
|
||||
ip-regex@4.3.0: {}
|
||||
|
||||
ipaddr.js@2.2.0: {}
|
||||
|
||||
iron-webcrypto@1.1.0: {}
|
||||
|
||||
is-alphabetical@1.0.4: {}
|
||||
@@ -8986,6 +9066,10 @@ snapshots:
|
||||
global-directory: 4.0.1
|
||||
is-path-inside: 4.0.0
|
||||
|
||||
is-ip@3.1.0:
|
||||
dependencies:
|
||||
ip-regex: 4.3.0
|
||||
|
||||
is-lambda@1.0.1: {}
|
||||
|
||||
is-module@1.0.0: {}
|
||||
@@ -9767,6 +9851,12 @@ snapshots:
|
||||
prelude-ls: 1.2.1
|
||||
type-check: 0.4.0
|
||||
|
||||
p-event@4.2.0:
|
||||
dependencies:
|
||||
p-timeout: 3.2.0
|
||||
|
||||
p-finally@1.0.0: {}
|
||||
|
||||
p-limit@2.3.0:
|
||||
dependencies:
|
||||
p-try: 2.2.0
|
||||
@@ -9795,6 +9885,10 @@ snapshots:
|
||||
dependencies:
|
||||
aggregate-error: 3.1.0
|
||||
|
||||
p-timeout@3.2.0:
|
||||
dependencies:
|
||||
p-finally: 1.0.0
|
||||
|
||||
p-try@2.2.0: {}
|
||||
|
||||
pacote@18.0.6:
|
||||
@@ -11070,7 +11164,7 @@ snapshots:
|
||||
acorn-import-assertions: 1.9.0(acorn@8.11.3)
|
||||
browserslist: 4.23.0
|
||||
chrome-trace-event: 1.0.3
|
||||
enhanced-resolve: 5.16.0
|
||||
enhanced-resolve: 5.17.0
|
||||
es-module-lexer: 1.5.0
|
||||
eslint-scope: 5.1.1
|
||||
events: 3.3.0
|
||||
|
2112
src-tauri/Cargo.lock
generated
2112
src-tauri/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -7,13 +7,15 @@ license = "MIT"
|
||||
repository = "https://github.com/NicolaSpadari/nuxtor"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "nuxtor_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib", "lib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "1", features = [] }
|
||||
tauri-build = { version = "2.0.0-beta", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "1", features = ["notification-all", "shell-all", "system-tray"] }
|
||||
tauri = { version = "2.0.0-beta", features = ["tray-icon"] }
|
||||
tauri-plugin-shell = "2.0.0-beta"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
|
||||
[features]
|
||||
custom-protocol = [ "tauri/custom-protocol" ]
|
||||
|
32
src-tauri/capabilities/main.json
Normal file
32
src-tauri/capabilities/main.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "main",
|
||||
"description": "Capabilities for the main window",
|
||||
"windows": [
|
||||
"main"
|
||||
],
|
||||
"permissions": [
|
||||
"path:default",
|
||||
"event:default",
|
||||
"window:default",
|
||||
"app:default",
|
||||
"resources:default",
|
||||
"menu:default",
|
||||
{
|
||||
"identifier": "shell:allow-execute",
|
||||
"allow": [
|
||||
{
|
||||
"name": "exec-sh",
|
||||
"cmd": "sh",
|
||||
"args": [
|
||||
"-c",
|
||||
{
|
||||
"validator": "\\S+"
|
||||
}
|
||||
],
|
||||
"sidecar": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
1
src-tauri/gen/schemas/acl-manifests.json
Normal file
1
src-tauri/gen/schemas/acl-manifests.json
Normal file
File diff suppressed because one or more lines are too long
1
src-tauri/gen/schemas/capabilities.json
Normal file
1
src-tauri/gen/schemas/capabilities.json
Normal file
@@ -0,0 +1 @@
|
||||
{"main":{"identifier":"main","description":"Capabilities for the main window","local":true,"windows":["main"],"permissions":["path:default","event:default","window:default","app:default","resources:default","menu:default",{"identifier":"shell:allow-execute","allow":[{"args":["-c",{"validator":"\\S+"}],"cmd":"sh","name":"exec-sh","sidecar":false}]}]}}
|
2409
src-tauri/gen/schemas/desktop-schema.json
Normal file
2409
src-tauri/gen/schemas/desktop-schema.json
Normal file
File diff suppressed because it is too large
Load Diff
2409
src-tauri/gen/schemas/macOS-schema.json
Normal file
2409
src-tauri/gen/schemas/macOS-schema.json
Normal file
File diff suppressed because it is too large
Load Diff
8
src-tauri/src/lib.rs
Normal file
8
src-tauri/src/lib.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
@@ -1,28 +1,5 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
use tauri::{CustomMenuItem, SystemTray, SystemTrayMenu, SystemTrayEvent};
|
||||
|
||||
fn main() {
|
||||
let opt_quit = CustomMenuItem::new("quit", "Quit");
|
||||
|
||||
let tray_menu = SystemTrayMenu::new()
|
||||
.add_item(opt_quit);
|
||||
let system_tray = SystemTray::new()
|
||||
.with_menu(tray_menu);
|
||||
|
||||
tauri::Builder::default()
|
||||
.system_tray(system_tray)
|
||||
.on_system_tray_event(| _app, event | match event {
|
||||
SystemTrayEvent::MenuItemClick { id, .. } => {
|
||||
match id.as_str() {
|
||||
"quit" => {
|
||||
std::process::exit(0)
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
})
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
nuxtor_lib::run();
|
||||
}
|
@@ -1,23 +1,12 @@
|
||||
{
|
||||
"package": {
|
||||
"productName": "nuxtor",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"build": {
|
||||
"distDir": "../dist",
|
||||
"devPath": "http://localhost:3000",
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
"beforeBuildCommand": "pnpm generate"
|
||||
},
|
||||
"tauri": {
|
||||
"systemTray": {
|
||||
"iconPath": "./icons/icon.png",
|
||||
"iconAsTemplate": true
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"identifier": "com.nicolaspadari.nuxtor",
|
||||
"windows": {
|
||||
"certificateThumbprint": null,
|
||||
"digestAlgorithm": "sha256",
|
||||
"timestampUrl": ""
|
||||
},
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
@@ -31,38 +20,22 @@
|
||||
"category": "DeveloperTool",
|
||||
"shortDescription": "",
|
||||
"longDescription": "",
|
||||
"deb": {},
|
||||
"macOS": {},
|
||||
"windows": {
|
||||
"certificateThumbprint": null,
|
||||
"digestAlgorithm": "sha256",
|
||||
"timestampUrl": ""
|
||||
"linux": {
|
||||
"deb": {}
|
||||
}
|
||||
},
|
||||
"updater": {
|
||||
"active": false
|
||||
},
|
||||
"allowlist": {
|
||||
"shell": {
|
||||
"all": true,
|
||||
"open": true,
|
||||
"scope": [
|
||||
{
|
||||
"name": "cmd",
|
||||
"cmd": "cmd",
|
||||
"args": ["/C", { "validator": "\\S+" }]
|
||||
},
|
||||
{
|
||||
"name": "pwsh",
|
||||
"cmd": "pwsh",
|
||||
"args": ["-Command", { "validator": "\\S+" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
"notification": {
|
||||
"all": true
|
||||
}
|
||||
"build": {
|
||||
"beforeBuildCommand": "pnpm generate",
|
||||
"frontendDist": "../dist",
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
"devUrl": "http://localhost:3000"
|
||||
},
|
||||
"productName": "nuxtor",
|
||||
"version": "1.0.0",
|
||||
"identifier": "com.nicolaspadari.nuxtor",
|
||||
"plugins": {},
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "Nuxtor",
|
||||
@@ -74,6 +47,10 @@
|
||||
],
|
||||
"security": {
|
||||
"csp": null
|
||||
},
|
||||
"trayIcon": {
|
||||
"iconPath": "./icons/icon.png",
|
||||
"iconAsTemplate": true
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,9 +1,16 @@
|
||||
<template>
|
||||
<div text-center space-y-5>
|
||||
Hello from Nuxtor {{ version }}
|
||||
Hello from Nuxtor - Tauri v{{ version }}
|
||||
|
||||
<p>Shell command result: {{ result }}</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const version = await getTauriVersion();
|
||||
|
||||
const result = await Command.create('exec-sh', [
|
||||
'-c',
|
||||
"echo 'Hello World!'",
|
||||
]).execute();
|
||||
</script>
|
Reference in New Issue
Block a user