Compare commits
No commits in common. "ce7d75f15a87c0662e173e8ae1b434875223fc90" and "8c668e51a632211cb2491dbf352b83f5ff5118ba" have entirely different histories.
ce7d75f15a
...
8c668e51a6
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" data-theme="creddy">
|
<html lang="en" data-theme="dark">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
|
222
package-lock.json
generated
222
package-lock.json
generated
@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "creddy",
|
"name": "creddy",
|
||||||
"version": "0.4.9",
|
"version": "0.4.7",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "creddy",
|
"name": "creddy",
|
||||||
"version": "0.4.9",
|
"version": "0.4.7",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.0.0-beta.13",
|
"@tauri-apps/api": "^2.0.0-beta.13",
|
||||||
"@tauri-apps/plugin-dialog": "^2.0.0-beta.5",
|
"@tauri-apps/plugin-dialog": "^2.0.0-beta.5",
|
||||||
"@tauri-apps/plugin-os": "^2.0.0-beta.5",
|
"@tauri-apps/plugin-os": "^2.0.0-beta.5",
|
||||||
"daisyui": "^4.12.8"
|
"daisyui": "^2.51.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/vite-plugin-svelte": "^1.0.1",
|
"@sveltejs/vite-plugin-svelte": "^1.0.1",
|
||||||
@ -27,7 +27,6 @@
|
|||||||
"version": "5.2.0",
|
"version": "5.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
|
||||||
"integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==",
|
"integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
},
|
},
|
||||||
@ -71,7 +70,6 @@
|
|||||||
"version": "8.0.2",
|
"version": "8.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
||||||
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
|
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"string-width": "^5.1.2",
|
"string-width": "^5.1.2",
|
||||||
"string-width-cjs": "npm:string-width@^4.2.0",
|
"string-width-cjs": "npm:string-width@^4.2.0",
|
||||||
@ -88,7 +86,6 @@
|
|||||||
"version": "0.3.5",
|
"version": "0.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
|
||||||
"integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
|
"integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/set-array": "^1.2.1",
|
"@jridgewell/set-array": "^1.2.1",
|
||||||
"@jridgewell/sourcemap-codec": "^1.4.10",
|
"@jridgewell/sourcemap-codec": "^1.4.10",
|
||||||
@ -102,7 +99,6 @@
|
|||||||
"version": "3.1.2",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
|
||||||
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
|
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0.0"
|
"node": ">=6.0.0"
|
||||||
}
|
}
|
||||||
@ -111,7 +107,6 @@
|
|||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
|
||||||
"integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
|
"integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0.0"
|
"node": ">=6.0.0"
|
||||||
}
|
}
|
||||||
@ -119,14 +114,12 @@
|
|||||||
"node_modules/@jridgewell/sourcemap-codec": {
|
"node_modules/@jridgewell/sourcemap-codec": {
|
||||||
"version": "1.4.15",
|
"version": "1.4.15",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
||||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
|
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/trace-mapping": {
|
"node_modules/@jridgewell/trace-mapping": {
|
||||||
"version": "0.3.25",
|
"version": "0.3.25",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
|
||||||
"integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
|
"integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/resolve-uri": "^3.1.0",
|
"@jridgewell/resolve-uri": "^3.1.0",
|
||||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||||
@ -136,7 +129,6 @@
|
|||||||
"version": "2.1.5",
|
"version": "2.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||||
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
|
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nodelib/fs.stat": "2.0.5",
|
"@nodelib/fs.stat": "2.0.5",
|
||||||
"run-parallel": "^1.1.9"
|
"run-parallel": "^1.1.9"
|
||||||
@ -149,7 +141,6 @@
|
|||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
|
||||||
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
|
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
@ -158,7 +149,6 @@
|
|||||||
"version": "1.2.8",
|
"version": "1.2.8",
|
||||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
|
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
|
||||||
"integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
|
"integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nodelib/fs.scandir": "2.1.5",
|
"@nodelib/fs.scandir": "2.1.5",
|
||||||
"fastq": "^1.6.0"
|
"fastq": "^1.6.0"
|
||||||
@ -171,7 +161,6 @@
|
|||||||
"version": "0.11.0",
|
"version": "0.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
|
||||||
"integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
|
"integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
@ -420,7 +409,6 @@
|
|||||||
"version": "6.0.1",
|
"version": "6.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
|
||||||
"integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
|
"integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
},
|
},
|
||||||
@ -432,7 +420,6 @@
|
|||||||
"version": "6.2.1",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
|
||||||
"integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
|
"integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
},
|
},
|
||||||
@ -443,14 +430,12 @@
|
|||||||
"node_modules/any-promise": {
|
"node_modules/any-promise": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
|
||||||
"integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
|
"integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/anymatch": {
|
"node_modules/anymatch": {
|
||||||
"version": "3.1.3",
|
"version": "3.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
||||||
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
|
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"normalize-path": "^3.0.0",
|
"normalize-path": "^3.0.0",
|
||||||
"picomatch": "^2.0.4"
|
"picomatch": "^2.0.4"
|
||||||
@ -462,14 +447,12 @@
|
|||||||
"node_modules/arg": {
|
"node_modules/arg": {
|
||||||
"version": "5.0.2",
|
"version": "5.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
|
||||||
"integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
|
"integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/autoprefixer": {
|
"node_modules/autoprefixer": {
|
||||||
"version": "10.4.19",
|
"version": "10.4.19",
|
||||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz",
|
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz",
|
||||||
"integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==",
|
"integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==",
|
||||||
"dev": true,
|
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@ -505,14 +488,12 @@
|
|||||||
"node_modules/balanced-match": {
|
"node_modules/balanced-match": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/binary-extensions": {
|
"node_modules/binary-extensions": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
|
||||||
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
|
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
},
|
},
|
||||||
@ -524,7 +505,6 @@
|
|||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"balanced-match": "^1.0.0"
|
"balanced-match": "^1.0.0"
|
||||||
}
|
}
|
||||||
@ -533,7 +513,6 @@
|
|||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fill-range": "^7.1.1"
|
"fill-range": "^7.1.1"
|
||||||
},
|
},
|
||||||
@ -545,7 +524,6 @@
|
|||||||
"version": "4.23.0",
|
"version": "4.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz",
|
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz",
|
||||||
"integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==",
|
"integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==",
|
||||||
"dev": true,
|
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@ -585,7 +563,6 @@
|
|||||||
"version": "1.0.30001625",
|
"version": "1.0.30001625",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001625.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001625.tgz",
|
||||||
"integrity": "sha512-4KE9N2gcRH+HQhpeiRZXd+1niLB/XNLAhSy4z7fI8EzcbcPoAqjNInxVHTiTwWfTIV4w096XG8OtCOCQQKPv3w==",
|
"integrity": "sha512-4KE9N2gcRH+HQhpeiRZXd+1niLB/XNLAhSy4z7fI8EzcbcPoAqjNInxVHTiTwWfTIV4w096XG8OtCOCQQKPv3w==",
|
||||||
"dev": true,
|
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@ -605,7 +582,6 @@
|
|||||||
"version": "3.6.0",
|
"version": "3.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
|
||||||
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
|
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"anymatch": "~3.1.2",
|
"anymatch": "~3.1.2",
|
||||||
"braces": "~3.0.2",
|
"braces": "~3.0.2",
|
||||||
@ -629,7 +605,6 @@
|
|||||||
"version": "5.1.2",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"is-glob": "^4.0.1"
|
"is-glob": "^4.0.1"
|
||||||
},
|
},
|
||||||
@ -637,11 +612,22 @@
|
|||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/color": {
|
||||||
|
"version": "4.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
|
||||||
|
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
|
||||||
|
"dependencies": {
|
||||||
|
"color-convert": "^2.0.1",
|
||||||
|
"color-string": "^1.9.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.5.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/color-convert": {
|
"node_modules/color-convert": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"color-name": "~1.1.4"
|
"color-name": "~1.1.4"
|
||||||
},
|
},
|
||||||
@ -652,14 +638,21 @@
|
|||||||
"node_modules/color-name": {
|
"node_modules/color-name": {
|
||||||
"version": "1.1.4",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||||
"dev": true
|
},
|
||||||
|
"node_modules/color-string": {
|
||||||
|
"version": "1.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
|
||||||
|
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
|
||||||
|
"dependencies": {
|
||||||
|
"color-name": "^1.0.0",
|
||||||
|
"simple-swizzle": "^0.2.2"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"node_modules/commander": {
|
"node_modules/commander": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
|
||||||
"integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
|
"integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
@ -668,7 +661,6 @@
|
|||||||
"version": "7.0.3",
|
"version": "7.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||||
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"path-key": "^3.1.0",
|
"path-key": "^3.1.0",
|
||||||
"shebang-command": "^2.0.0",
|
"shebang-command": "^2.0.0",
|
||||||
@ -698,30 +690,23 @@
|
|||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/culori": {
|
|
||||||
"version": "3.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/culori/-/culori-3.3.0.tgz",
|
|
||||||
"integrity": "sha512-pHJg+jbuFsCjz9iclQBqyL3B2HLCBF71BwVNujUYEvCeQMvV97R59MNK3R2+jgJ3a1fcZgI9B3vYgz8lzr/BFQ==",
|
|
||||||
"engines": {
|
|
||||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/daisyui": {
|
"node_modules/daisyui": {
|
||||||
"version": "4.12.8",
|
"version": "2.52.0",
|
||||||
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-4.12.8.tgz",
|
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-2.52.0.tgz",
|
||||||
"integrity": "sha512-FDdh0z9BsWMI0VeUSwZy6rwp9frEuUgd83SCPOaCYV3iULPzcgTEQT3IlcAbMCrsriu2ziDYZfGOUwPYHkHrfw==",
|
"integrity": "sha512-LQTA5/IVXAJHBMFoeaEMfd7/akAFPPcdQPR3O9fzzcFiczneJFM73CFPnScmW2sOgn/D83cvkP854ep2T9OfTg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"css-selector-tokenizer": "^0.8",
|
"color": "^4.2",
|
||||||
"culori": "^3",
|
"css-selector-tokenizer": "^0.8.0",
|
||||||
"picocolors": "^1",
|
"postcss-js": "^4.0.0",
|
||||||
"postcss-js": "^4"
|
"tailwindcss": "^3"
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.9.0"
|
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
"url": "https://opencollective.com/daisyui"
|
"url": "https://opencollective.com/daisyui"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"autoprefixer": "^10.0.2",
|
||||||
|
"postcss": "^8.1.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/debug": {
|
"node_modules/debug": {
|
||||||
@ -753,32 +738,27 @@
|
|||||||
"node_modules/didyoumean": {
|
"node_modules/didyoumean": {
|
||||||
"version": "1.2.2",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
||||||
"integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
|
"integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/dlv": {
|
"node_modules/dlv": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
|
||||||
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
|
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/eastasianwidth": {
|
"node_modules/eastasianwidth": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
|
||||||
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
|
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.4.787",
|
"version": "1.4.787",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.787.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.787.tgz",
|
||||||
"integrity": "sha512-d0EFmtLPjctczO3LogReyM2pbBiiZbnsKnGF+cdZhsYzHm/A0GV7W94kqzLD8SN4O3f3iHlgLUChqghgyznvCQ==",
|
"integrity": "sha512-d0EFmtLPjctczO3LogReyM2pbBiiZbnsKnGF+cdZhsYzHm/A0GV7W94kqzLD8SN4O3f3iHlgLUChqghgyznvCQ=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/emoji-regex": {
|
"node_modules/emoji-regex": {
|
||||||
"version": "9.2.2",
|
"version": "9.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
|
||||||
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
|
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/esbuild": {
|
"node_modules/esbuild": {
|
||||||
"version": "0.15.18",
|
"version": "0.15.18",
|
||||||
@ -1141,7 +1121,6 @@
|
|||||||
"version": "3.1.2",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
|
||||||
"integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
|
"integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
@ -1150,7 +1129,6 @@
|
|||||||
"version": "3.3.2",
|
"version": "3.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
|
||||||
"integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
|
"integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nodelib/fs.stat": "^2.0.2",
|
"@nodelib/fs.stat": "^2.0.2",
|
||||||
"@nodelib/fs.walk": "^1.2.3",
|
"@nodelib/fs.walk": "^1.2.3",
|
||||||
@ -1166,7 +1144,6 @@
|
|||||||
"version": "5.1.2",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"is-glob": "^4.0.1"
|
"is-glob": "^4.0.1"
|
||||||
},
|
},
|
||||||
@ -1183,7 +1160,6 @@
|
|||||||
"version": "1.17.1",
|
"version": "1.17.1",
|
||||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",
|
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",
|
||||||
"integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==",
|
"integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"reusify": "^1.0.4"
|
"reusify": "^1.0.4"
|
||||||
}
|
}
|
||||||
@ -1192,7 +1168,6 @@
|
|||||||
"version": "7.1.1",
|
"version": "7.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"to-regex-range": "^5.0.1"
|
"to-regex-range": "^5.0.1"
|
||||||
},
|
},
|
||||||
@ -1204,7 +1179,6 @@
|
|||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
|
||||||
"integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",
|
"integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cross-spawn": "^7.0.0",
|
"cross-spawn": "^7.0.0",
|
||||||
"signal-exit": "^4.0.1"
|
"signal-exit": "^4.0.1"
|
||||||
@ -1220,7 +1194,6 @@
|
|||||||
"version": "4.3.7",
|
"version": "4.3.7",
|
||||||
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
|
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
|
||||||
"integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==",
|
"integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "*"
|
"node": "*"
|
||||||
},
|
},
|
||||||
@ -1233,7 +1206,6 @@
|
|||||||
"version": "2.3.3",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||||
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||||
"dev": true,
|
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@ -1247,7 +1219,6 @@
|
|||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||||
"dev": true,
|
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
@ -1256,7 +1227,6 @@
|
|||||||
"version": "10.4.1",
|
"version": "10.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz",
|
||||||
"integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==",
|
"integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"foreground-child": "^3.1.0",
|
"foreground-child": "^3.1.0",
|
||||||
"jackspeak": "^3.1.2",
|
"jackspeak": "^3.1.2",
|
||||||
@ -1278,7 +1248,6 @@
|
|||||||
"version": "6.0.2",
|
"version": "6.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
|
||||||
"integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
|
"integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"is-glob": "^4.0.3"
|
"is-glob": "^4.0.3"
|
||||||
},
|
},
|
||||||
@ -1290,7 +1259,6 @@
|
|||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"function-bind": "^1.1.2"
|
"function-bind": "^1.1.2"
|
||||||
},
|
},
|
||||||
@ -1298,11 +1266,15 @@
|
|||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/is-arrayish": {
|
||||||
|
"version": "0.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
||||||
|
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
|
||||||
|
},
|
||||||
"node_modules/is-binary-path": {
|
"node_modules/is-binary-path": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"binary-extensions": "^2.0.0"
|
"binary-extensions": "^2.0.0"
|
||||||
},
|
},
|
||||||
@ -1314,7 +1286,6 @@
|
|||||||
"version": "2.13.1",
|
"version": "2.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
|
||||||
"integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
|
"integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"hasown": "^2.0.0"
|
"hasown": "^2.0.0"
|
||||||
},
|
},
|
||||||
@ -1326,7 +1297,6 @@
|
|||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||||
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
|
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
@ -1335,7 +1305,6 @@
|
|||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
@ -1344,7 +1313,6 @@
|
|||||||
"version": "4.0.3",
|
"version": "4.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
||||||
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
|
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"is-extglob": "^2.1.1"
|
"is-extglob": "^2.1.1"
|
||||||
},
|
},
|
||||||
@ -1356,7 +1324,6 @@
|
|||||||
"version": "7.0.0",
|
"version": "7.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.12.0"
|
"node": ">=0.12.0"
|
||||||
}
|
}
|
||||||
@ -1364,14 +1331,12 @@
|
|||||||
"node_modules/isexe": {
|
"node_modules/isexe": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/jackspeak": {
|
"node_modules/jackspeak": {
|
||||||
"version": "3.1.2",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.1.2.tgz",
|
||||||
"integrity": "sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ==",
|
"integrity": "sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@isaacs/cliui": "^8.0.2"
|
"@isaacs/cliui": "^8.0.2"
|
||||||
},
|
},
|
||||||
@ -1389,7 +1354,6 @@
|
|||||||
"version": "1.21.0",
|
"version": "1.21.0",
|
||||||
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",
|
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",
|
||||||
"integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==",
|
"integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==",
|
||||||
"dev": true,
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"jiti": "bin/jiti.js"
|
"jiti": "bin/jiti.js"
|
||||||
}
|
}
|
||||||
@ -1407,7 +1371,6 @@
|
|||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz",
|
||||||
"integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==",
|
"integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
}
|
}
|
||||||
@ -1415,14 +1378,12 @@
|
|||||||
"node_modules/lines-and-columns": {
|
"node_modules/lines-and-columns": {
|
||||||
"version": "1.2.4",
|
"version": "1.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
||||||
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
|
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/lru-cache": {
|
"node_modules/lru-cache": {
|
||||||
"version": "10.2.2",
|
"version": "10.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz",
|
||||||
"integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==",
|
"integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "14 || >=16.14"
|
"node": "14 || >=16.14"
|
||||||
}
|
}
|
||||||
@ -1443,7 +1404,6 @@
|
|||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
||||||
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
|
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
@ -1452,7 +1412,6 @@
|
|||||||
"version": "4.0.7",
|
"version": "4.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz",
|
||||||
"integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==",
|
"integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"braces": "^3.0.3",
|
"braces": "^3.0.3",
|
||||||
"picomatch": "^2.3.1"
|
"picomatch": "^2.3.1"
|
||||||
@ -1465,7 +1424,6 @@
|
|||||||
"version": "9.0.4",
|
"version": "9.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
|
||||||
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
|
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brace-expansion": "^2.0.1"
|
"brace-expansion": "^2.0.1"
|
||||||
},
|
},
|
||||||
@ -1480,7 +1438,6 @@
|
|||||||
"version": "7.1.2",
|
"version": "7.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
|
||||||
"integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
|
"integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16 || 14 >=14.17"
|
"node": ">=16 || 14 >=14.17"
|
||||||
}
|
}
|
||||||
@ -1495,7 +1452,6 @@
|
|||||||
"version": "2.7.0",
|
"version": "2.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
||||||
"integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
|
"integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"any-promise": "^1.0.0",
|
"any-promise": "^1.0.0",
|
||||||
"object-assign": "^4.0.1",
|
"object-assign": "^4.0.1",
|
||||||
@ -1522,14 +1478,12 @@
|
|||||||
"node_modules/node-releases": {
|
"node_modules/node-releases": {
|
||||||
"version": "2.0.14",
|
"version": "2.0.14",
|
||||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
|
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
|
||||||
"integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==",
|
"integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/normalize-path": {
|
"node_modules/normalize-path": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||||
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
|
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
@ -1538,7 +1492,6 @@
|
|||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
|
||||||
"integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
|
"integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
@ -1547,7 +1500,6 @@
|
|||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
@ -1556,7 +1508,6 @@
|
|||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
|
||||||
"integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
|
"integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
@ -1565,7 +1516,6 @@
|
|||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||||
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
@ -1573,14 +1523,12 @@
|
|||||||
"node_modules/path-parse": {
|
"node_modules/path-parse": {
|
||||||
"version": "1.0.7",
|
"version": "1.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||||
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/path-scurry": {
|
"node_modules/path-scurry": {
|
||||||
"version": "1.11.1",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
|
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
|
||||||
"integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
|
"integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lru-cache": "^10.2.0",
|
"lru-cache": "^10.2.0",
|
||||||
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
|
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
|
||||||
@ -1601,7 +1549,6 @@
|
|||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
||||||
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.6"
|
"node": ">=8.6"
|
||||||
},
|
},
|
||||||
@ -1613,7 +1560,6 @@
|
|||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||||
"integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
|
"integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
@ -1622,7 +1568,6 @@
|
|||||||
"version": "4.0.6",
|
"version": "4.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz",
|
||||||
"integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==",
|
"integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
@ -1658,7 +1603,6 @@
|
|||||||
"version": "15.1.0",
|
"version": "15.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz",
|
||||||
"integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==",
|
"integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"postcss-value-parser": "^4.0.0",
|
"postcss-value-parser": "^4.0.0",
|
||||||
"read-cache": "^1.0.0",
|
"read-cache": "^1.0.0",
|
||||||
@ -1693,7 +1637,6 @@
|
|||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz",
|
||||||
"integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==",
|
"integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==",
|
||||||
"dev": true,
|
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@ -1728,7 +1671,6 @@
|
|||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz",
|
||||||
"integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==",
|
"integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
@ -1740,7 +1682,6 @@
|
|||||||
"version": "6.0.1",
|
"version": "6.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz",
|
||||||
"integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==",
|
"integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"postcss-selector-parser": "^6.0.11"
|
"postcss-selector-parser": "^6.0.11"
|
||||||
},
|
},
|
||||||
@ -1759,7 +1700,6 @@
|
|||||||
"version": "6.1.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz",
|
||||||
"integrity": "sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==",
|
"integrity": "sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cssesc": "^3.0.0",
|
"cssesc": "^3.0.0",
|
||||||
"util-deprecate": "^1.0.2"
|
"util-deprecate": "^1.0.2"
|
||||||
@ -1771,14 +1711,12 @@
|
|||||||
"node_modules/postcss-value-parser": {
|
"node_modules/postcss-value-parser": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
|
||||||
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
|
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/queue-microtask": {
|
"node_modules/queue-microtask": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
||||||
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
|
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
|
||||||
"dev": true,
|
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
@ -1798,7 +1736,6 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
|
||||||
"integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==",
|
"integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pify": "^2.3.0"
|
"pify": "^2.3.0"
|
||||||
}
|
}
|
||||||
@ -1807,7 +1744,6 @@
|
|||||||
"version": "3.6.0",
|
"version": "3.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||||
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"picomatch": "^2.2.1"
|
"picomatch": "^2.2.1"
|
||||||
},
|
},
|
||||||
@ -1819,7 +1755,6 @@
|
|||||||
"version": "1.22.8",
|
"version": "1.22.8",
|
||||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
|
||||||
"integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
|
"integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"is-core-module": "^2.13.0",
|
"is-core-module": "^2.13.0",
|
||||||
"path-parse": "^1.0.7",
|
"path-parse": "^1.0.7",
|
||||||
@ -1836,7 +1771,6 @@
|
|||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
|
||||||
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
|
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"iojs": ">=1.0.0",
|
"iojs": ">=1.0.0",
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
@ -1861,7 +1795,6 @@
|
|||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
|
||||||
"integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
|
"integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
|
||||||
"dev": true,
|
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
@ -1884,7 +1817,6 @@
|
|||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||||
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"shebang-regex": "^3.0.0"
|
"shebang-regex": "^3.0.0"
|
||||||
},
|
},
|
||||||
@ -1896,7 +1828,6 @@
|
|||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||||
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
@ -1905,7 +1836,6 @@
|
|||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
|
||||||
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
|
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
@ -1913,6 +1843,14 @@
|
|||||||
"url": "https://github.com/sponsors/isaacs"
|
"url": "https://github.com/sponsors/isaacs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/simple-swizzle": {
|
||||||
|
"version": "0.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
||||||
|
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
|
||||||
|
"dependencies": {
|
||||||
|
"is-arrayish": "^0.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/source-map-js": {
|
"node_modules/source-map-js": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
||||||
@ -1932,7 +1870,6 @@
|
|||||||
"version": "5.1.2",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
|
||||||
"integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
|
"integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"eastasianwidth": "^0.2.0",
|
"eastasianwidth": "^0.2.0",
|
||||||
"emoji-regex": "^9.2.2",
|
"emoji-regex": "^9.2.2",
|
||||||
@ -1950,7 +1887,6 @@
|
|||||||
"version": "4.2.3",
|
"version": "4.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"emoji-regex": "^8.0.0",
|
"emoji-regex": "^8.0.0",
|
||||||
"is-fullwidth-code-point": "^3.0.0",
|
"is-fullwidth-code-point": "^3.0.0",
|
||||||
@ -1964,7 +1900,6 @@
|
|||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
@ -1972,14 +1907,12 @@
|
|||||||
"node_modules/string-width-cjs/node_modules/emoji-regex": {
|
"node_modules/string-width-cjs/node_modules/emoji-regex": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/string-width-cjs/node_modules/strip-ansi": {
|
"node_modules/string-width-cjs/node_modules/strip-ansi": {
|
||||||
"version": "6.0.1",
|
"version": "6.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-regex": "^5.0.1"
|
"ansi-regex": "^5.0.1"
|
||||||
},
|
},
|
||||||
@ -1991,7 +1924,6 @@
|
|||||||
"version": "7.1.0",
|
"version": "7.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
|
||||||
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
|
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-regex": "^6.0.1"
|
"ansi-regex": "^6.0.1"
|
||||||
},
|
},
|
||||||
@ -2007,7 +1939,6 @@
|
|||||||
"version": "6.0.1",
|
"version": "6.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-regex": "^5.0.1"
|
"ansi-regex": "^5.0.1"
|
||||||
},
|
},
|
||||||
@ -2019,7 +1950,6 @@
|
|||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
@ -2028,7 +1958,6 @@
|
|||||||
"version": "3.35.0",
|
"version": "3.35.0",
|
||||||
"resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz",
|
||||||
"integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==",
|
"integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/gen-mapping": "^0.3.2",
|
"@jridgewell/gen-mapping": "^0.3.2",
|
||||||
"commander": "^4.0.0",
|
"commander": "^4.0.0",
|
||||||
@ -2050,7 +1979,6 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
|
||||||
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
|
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
},
|
},
|
||||||
@ -2083,7 +2011,6 @@
|
|||||||
"version": "3.4.3",
|
"version": "3.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz",
|
||||||
"integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==",
|
"integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alloc/quick-lru": "^5.2.0",
|
"@alloc/quick-lru": "^5.2.0",
|
||||||
"arg": "^5.0.2",
|
"arg": "^5.0.2",
|
||||||
@ -2120,7 +2047,6 @@
|
|||||||
"version": "3.3.1",
|
"version": "3.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
|
||||||
"integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
|
"integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"any-promise": "^1.0.0"
|
"any-promise": "^1.0.0"
|
||||||
}
|
}
|
||||||
@ -2129,7 +2055,6 @@
|
|||||||
"version": "1.6.0",
|
"version": "1.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
|
||||||
"integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",
|
"integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"thenify": ">= 3.1.0 < 4"
|
"thenify": ">= 3.1.0 < 4"
|
||||||
},
|
},
|
||||||
@ -2141,7 +2066,6 @@
|
|||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"is-number": "^7.0.0"
|
"is-number": "^7.0.0"
|
||||||
},
|
},
|
||||||
@ -2152,14 +2076,12 @@
|
|||||||
"node_modules/ts-interface-checker": {
|
"node_modules/ts-interface-checker": {
|
||||||
"version": "0.1.13",
|
"version": "0.1.13",
|
||||||
"resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
|
"resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
|
||||||
"integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",
|
"integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/update-browserslist-db": {
|
"node_modules/update-browserslist-db": {
|
||||||
"version": "1.0.16",
|
"version": "1.0.16",
|
||||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz",
|
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz",
|
||||||
"integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==",
|
"integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==",
|
||||||
"dev": true,
|
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@ -2188,8 +2110,7 @@
|
|||||||
"node_modules/util-deprecate": {
|
"node_modules/util-deprecate": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "3.2.10",
|
"version": "3.2.10",
|
||||||
@ -2258,7 +2179,6 @@
|
|||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"isexe": "^2.0.0"
|
"isexe": "^2.0.0"
|
||||||
},
|
},
|
||||||
@ -2273,7 +2193,6 @@
|
|||||||
"version": "8.1.0",
|
"version": "8.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
|
||||||
"integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
|
"integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-styles": "^6.1.0",
|
"ansi-styles": "^6.1.0",
|
||||||
"string-width": "^5.0.1",
|
"string-width": "^5.0.1",
|
||||||
@ -2291,7 +2210,6 @@
|
|||||||
"version": "7.0.0",
|
"version": "7.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
||||||
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-styles": "^4.0.0",
|
"ansi-styles": "^4.0.0",
|
||||||
"string-width": "^4.1.0",
|
"string-width": "^4.1.0",
|
||||||
@ -2308,7 +2226,6 @@
|
|||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
@ -2317,7 +2234,6 @@
|
|||||||
"version": "4.3.0",
|
"version": "4.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"color-convert": "^2.0.1"
|
"color-convert": "^2.0.1"
|
||||||
},
|
},
|
||||||
@ -2331,14 +2247,12 @@
|
|||||||
"node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {
|
"node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/wrap-ansi-cjs/node_modules/string-width": {
|
"node_modules/wrap-ansi-cjs/node_modules/string-width": {
|
||||||
"version": "4.2.3",
|
"version": "4.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"emoji-regex": "^8.0.0",
|
"emoji-regex": "^8.0.0",
|
||||||
"is-fullwidth-code-point": "^3.0.0",
|
"is-fullwidth-code-point": "^3.0.0",
|
||||||
@ -2352,7 +2266,6 @@
|
|||||||
"version": "6.0.1",
|
"version": "6.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-regex": "^5.0.1"
|
"ansi-regex": "^5.0.1"
|
||||||
},
|
},
|
||||||
@ -2364,7 +2277,6 @@
|
|||||||
"version": "2.4.2",
|
"version": "2.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz",
|
||||||
"integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==",
|
"integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==",
|
||||||
"dev": true,
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"yaml": "bin.mjs"
|
"yaml": "bin.mjs"
|
||||||
},
|
},
|
||||||
|
@ -20,6 +20,6 @@
|
|||||||
"@tauri-apps/api": "^2.0.0-beta.13",
|
"@tauri-apps/api": "^2.0.0-beta.13",
|
||||||
"@tauri-apps/plugin-dialog": "^2.0.0-beta.5",
|
"@tauri-apps/plugin-dialog": "^2.0.0-beta.5",
|
||||||
"@tauri-apps/plugin-os": "^2.0.0-beta.5",
|
"@tauri-apps/plugin-os": "^2.0.0-beta.5",
|
||||||
"daisyui": "^4.12.8"
|
"daisyui": "^2.51.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,14 +41,13 @@ CREATE TABLE credentials (
|
|||||||
-- id is a UUID so we can generate it on the frontend
|
-- id is a UUID so we can generate it on the frontend
|
||||||
id BLOB UNIQUE NOT NULL,
|
id BLOB UNIQUE NOT NULL,
|
||||||
name TEXT UNIQUE NOT NULL,
|
name TEXT UNIQUE NOT NULL,
|
||||||
credential_type TEXT NOT NULL,
|
type TEXT NOT NULL,
|
||||||
is_default BOOLEAN NOT NULL,
|
|
||||||
created_at INTEGER NOT NULL
|
created_at INTEGER NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
-- populate with basic data from existing AWS credential
|
-- populate with basic data from existing AWS credential
|
||||||
INSERT INTO credentials (id, name, credential_type, is_default, created_at)
|
INSERT INTO credentials (id, name, type, created_at)
|
||||||
SELECT id, 'default', 'aws', 1, created_at FROM aws_tmp;
|
SELECT id, 'default', 'aws', created_at FROM aws_tmp;
|
||||||
|
|
||||||
-- new AWS-specific table
|
-- new AWS-specific table
|
||||||
CREATE TABLE aws_credentials (
|
CREATE TABLE aws_credentials (
|
||||||
|
@ -12,26 +12,19 @@ use serde::{
|
|||||||
};
|
};
|
||||||
use serde::de::{self, Visitor};
|
use serde::de::{self, Visitor};
|
||||||
use sqlx::{
|
use sqlx::{
|
||||||
FromRow,
|
SqlitePool,
|
||||||
Sqlite,
|
|
||||||
Transaction,
|
|
||||||
types::Uuid,
|
types::Uuid,
|
||||||
};
|
};
|
||||||
|
use sqlx::error::{
|
||||||
|
Error as SqlxError,
|
||||||
|
};
|
||||||
|
use tokio_stream::StreamExt;
|
||||||
|
|
||||||
use super::{Crypto, PersistentCredential};
|
use super::{Credential, Crypto, SaveCredential, PersistentCredential};
|
||||||
|
|
||||||
use crate::errors::*;
|
use crate::errors::*;
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, FromRow)]
|
|
||||||
pub struct AwsRow {
|
|
||||||
pub id: Uuid,
|
|
||||||
access_key_id: String,
|
|
||||||
secret_key_enc: Vec<u8>,
|
|
||||||
nonce: Vec<u8>,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
|
||||||
#[serde(rename_all = "PascalCase")]
|
#[serde(rename_all = "PascalCase")]
|
||||||
pub struct AwsBaseCredential {
|
pub struct AwsBaseCredential {
|
||||||
@ -49,123 +42,85 @@ impl AwsBaseCredential {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl PersistentCredential for AwsBaseCredential {
|
impl PersistentCredential for AwsBaseCredential {
|
||||||
type Row = AwsRow;
|
async fn save(&self, id: &Uuid, name: &str, crypto: &Crypto, pool: &SqlitePool) -> Result<(), SaveCredentialsError> {
|
||||||
|
|
||||||
fn type_name() -> &'static str { "aws" }
|
|
||||||
|
|
||||||
fn from_row(row: AwsRow, crypto: &Crypto) -> Result<Self, LoadCredentialsError> {
|
|
||||||
let nonce = XNonce::clone_from_slice(&row.nonce);
|
|
||||||
let secret_key_bytes = crypto.decrypt(&nonce, &row.secret_key_enc)?;
|
|
||||||
let secret_key = String::from_utf8(secret_key_bytes)
|
|
||||||
.map_err(|_| LoadCredentialsError::InvalidData)?;
|
|
||||||
|
|
||||||
Ok(Self::new(row.access_key_id, secret_key))
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn save_details(&self, id: &Uuid, crypto: &Crypto, txn: &mut Transaction<'_, Sqlite>) -> Result<(), SaveCredentialsError> {
|
|
||||||
let (nonce, ciphertext) = crypto.encrypt(self.secret_access_key.as_bytes())?;
|
let (nonce, ciphertext) = crypto.encrypt(self.secret_access_key.as_bytes())?;
|
||||||
let nonce_bytes = &nonce.as_slice();
|
let nonce_bytes = &nonce.as_slice();
|
||||||
|
let res = sqlx::query!(
|
||||||
|
"INSERT INTO credentials (id, name, type, created_at)
|
||||||
|
VALUES (?, ?, 'aws', strftime('%s'))
|
||||||
|
ON CONFLICT(id) DO UPDATE SET
|
||||||
|
name = excluded.name,
|
||||||
|
type = excluded.type,
|
||||||
|
created_at = excluded.created_at;
|
||||||
|
|
||||||
sqlx::query!(
|
INSERT OR REPLACE INTO aws_credentials (
|
||||||
"INSERT OR REPLACE INTO aws_credentials (
|
|
||||||
id,
|
id,
|
||||||
access_key_id,
|
access_key_id,
|
||||||
secret_key_enc,
|
secret_key_enc,
|
||||||
nonce
|
nonce
|
||||||
)
|
)
|
||||||
VALUES (?, ?, ?, ?);",
|
VALUES (?, ?, ?, ?);",
|
||||||
id, self.access_key_id, ciphertext, nonce_bytes,
|
id,
|
||||||
).execute(&mut **txn).await?;
|
name,
|
||||||
|
id, // for the second query
|
||||||
|
self.access_key_id,
|
||||||
|
ciphertext,
|
||||||
|
nonce_bytes,
|
||||||
|
).execute(pool).await;
|
||||||
|
|
||||||
Ok(())
|
match res {
|
||||||
|
Err(SqlxError::Database(e)) if e.code().as_deref() == Some("2067") => Err(SaveCredentialsError::Duplicate),
|
||||||
|
Err(e) => Err(SaveCredentialsError::DbError(e)),
|
||||||
|
Ok(_) => Ok(())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// async fn save(&self, record: CredentialRecord, &Crypto, pool: &SqlitePool) -> Result<(), CredentialRecordsError> {
|
async fn load(name: &str, crypto: &Crypto, pool: &SqlitePool) -> Result<Self, LoadCredentialsError> {
|
||||||
// let (nonce, ciphertext) = crypto.encrypt(self.secret_access_key.as_bytes())?;
|
let row = sqlx::query!(
|
||||||
// let nonce_bytes = &nonce.as_slice();
|
"SELECT c.name, a.access_key_id, a.secret_key_enc, a.nonce
|
||||||
|
FROM credentials c JOIN aws_credentials a ON a.id = c.id
|
||||||
|
WHERE c.name = ?",
|
||||||
|
name
|
||||||
|
).fetch_optional(pool)
|
||||||
|
.await?
|
||||||
|
.ok_or(LoadCredentialsError::NoCredentials)?;
|
||||||
|
|
||||||
// let res = sqlx::query!(
|
let nonce = XNonce::clone_from_slice(&row.nonce);
|
||||||
// "INSERT INTO credentials (id, name, type, created_at)
|
let secret_key_bytes = crypto.decrypt(&nonce, &row.secret_key_enc)?;
|
||||||
// VALUES (?, ?, 'aws', strftime('%s'))
|
let secret_key = String::from_utf8(secret_key_bytes)
|
||||||
// ON CONFLICT(id) DO UPDATE SET
|
.map_err(|_| LoadCredentialsError::InvalidData)?;
|
||||||
// name = excluded.name,
|
|
||||||
// type = excluded.type,
|
|
||||||
// created_at = excluded.created_at;
|
|
||||||
|
|
||||||
// INSERT OR REPLACE INTO aws_credentials (
|
Ok(AwsBaseCredential::new(row.access_key_id, secret_key))
|
||||||
// id,
|
}
|
||||||
// access_key_id,
|
|
||||||
// secret_key_enc,
|
|
||||||
// nonce
|
|
||||||
// )
|
|
||||||
// VALUES (?, ?, ?, ?);",
|
|
||||||
// id,
|
|
||||||
// name,
|
|
||||||
// id, // for the second query
|
|
||||||
// self.access_key_id,
|
|
||||||
// ciphertext,
|
|
||||||
// nonce_bytes,
|
|
||||||
// ).execute(pool).await;
|
|
||||||
|
|
||||||
// match res {
|
async fn list(crypto: &Crypto, pool: &SqlitePool) -> Result<Vec<SaveCredential>, LoadCredentialsError> {
|
||||||
// Err(SqlxError::Database(e)) if e.code().as_deref() == Some("2067") => Err(CredentialRecordsError::Duplicate),
|
let mut rows = sqlx::query!(
|
||||||
// Err(e) => Err(SaveCredentialsError::DbError(e)),
|
"SELECT c.id, c.name, a.access_key_id, a.secret_key_enc, a.nonce
|
||||||
// Ok(_) => Ok(())
|
FROM credentials c JOIN aws_credentials a ON a.id = c.id"
|
||||||
// }
|
).fetch(pool);
|
||||||
// }
|
|
||||||
|
|
||||||
// async fn load(name: &str, crypto: &Crypto, pool: &SqlitePool) -> Result<Self, LoadCredentialsError> {
|
let mut creds = Vec::new();
|
||||||
// let record: AwsRecord = sqlx::query_as(
|
|
||||||
// "SELECT c.id, c.name, c.is_default, a.access_key_id, a.secret_key_enc, a.nonce
|
|
||||||
// FROM credentials c JOIN aws_credentials a ON a.id = c.id
|
|
||||||
// WHERE c.name = ?"
|
|
||||||
// ).bind(name)
|
|
||||||
// .fetch_optional(pool)
|
|
||||||
// .await?
|
|
||||||
// .ok_or(LoadCredentialsError::NoCredentials)?;
|
|
||||||
|
|
||||||
// let key = record.decrypt_key(crypto)?;
|
while let Some(row) = rows.try_next().await? {
|
||||||
// let credential = AwsBaseCredential::new(record.access_key_id, key);
|
let nonce = XNonce::clone_from_slice(&row.nonce);
|
||||||
// Ok(credential)
|
let secret_key_bytes = crypto.decrypt(&nonce, &row.secret_key_enc)?;
|
||||||
// }
|
let secret_key = String::from_utf8(secret_key_bytes)
|
||||||
|
.map_err(|_| LoadCredentialsError::InvalidData)?;
|
||||||
|
let aws = AwsBaseCredential::new(row.access_key_id, secret_key);
|
||||||
|
|
||||||
// async fn load_default(crypto: &Crypto, pool: &SqlitePool) -> Result<Self, LoadCredentialsError> {
|
let id = Uuid::from_slice(&row.id)
|
||||||
// let record: AwsRecord = sqlx::query_as(
|
.map_err(|_| LoadCredentialsError::InvalidData)?;
|
||||||
// "SELECT c.id, c.name, c.is_default, a.access_key_id, a.secret_key_enc, a.nonce
|
|
||||||
// FROM credentials c JOIN aws_credentials a ON a.id = c.id
|
|
||||||
// WHERE c.type = 'aws' AND c.is_default = 1"
|
|
||||||
// ).fetch_optional(pool)
|
|
||||||
// .await?
|
|
||||||
// .ok_or(LoadCredentialsError::NoCredentials)?;
|
|
||||||
|
|
||||||
// let key = record.decrypt_key(crypto)?;
|
let cred = SaveCredential {
|
||||||
// let credential = AwsBaseCredential::new(record.access_key_id, key);
|
id,
|
||||||
// Ok(credential)
|
name: row.name,
|
||||||
// }
|
credential: Credential::AwsBase(aws),
|
||||||
|
};
|
||||||
|
creds.push(cred);
|
||||||
|
}
|
||||||
|
|
||||||
// async fn list(crypto: &Crypto, pool: &SqlitePool) -> Result<Vec<SaveCredential>, LoadCredentialsError> {
|
Ok(creds)
|
||||||
// let mut rows = sqlx::query_as::<_, AwsRecord>(
|
}
|
||||||
// "SELECT c.id, c.name, c.is_default, a.access_key_id, a.secret_key_enc, a.nonce
|
|
||||||
// FROM credentials c JOIN aws_credentials a ON a.id = c.id"
|
|
||||||
// ).fetch(pool);
|
|
||||||
|
|
||||||
// let mut creds = Vec::new();
|
|
||||||
|
|
||||||
// while let Some(record) = rows.try_next().await? {
|
|
||||||
// let key = record.decrypt_key(crypto)?;
|
|
||||||
// let aws = AwsBaseCredential::new(record.access_key_id, key);
|
|
||||||
|
|
||||||
// let cred = SaveCredential {
|
|
||||||
// id: record.id,
|
|
||||||
// name: record.name,
|
|
||||||
// is_default: record.is_default,
|
|
||||||
// credential: Credential::AwsBase(aws),
|
|
||||||
// };
|
|
||||||
// creds.push(cred);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Ok(creds)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -268,17 +223,16 @@ where S: Serializer
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use sqlx::SqlitePool;
|
|
||||||
|
|
||||||
|
|
||||||
fn creds() -> AwsBaseCredential {
|
fn test_creds() -> AwsBaseCredential {
|
||||||
AwsBaseCredential::new(
|
AwsBaseCredential::new(
|
||||||
"AKIAIOSFODNN7EXAMPLE".into(),
|
"AKIAIOSFODNN7EXAMPLE".into(),
|
||||||
"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY".into(),
|
"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY".into(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn creds_2() -> AwsBaseCredential {
|
fn test_creds_2() -> AwsBaseCredential {
|
||||||
AwsBaseCredential::new(
|
AwsBaseCredential::new(
|
||||||
"AKIAIOSFODNN7EXAMPL2".into(),
|
"AKIAIOSFODNN7EXAMPL2".into(),
|
||||||
"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKE2".into(),
|
"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKE2".into(),
|
||||||
@ -299,41 +253,93 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[sqlx::test]
|
||||||
|
async fn test_save(pool: SqlitePool) {
|
||||||
|
let crypt = Crypto::random();
|
||||||
|
test_creds().save(&test_uuid_random(), "test", &crypt, &pool).await
|
||||||
|
.expect("Failed to save AWS credentials");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[sqlx::test(fixtures("aws_credentials"))]
|
||||||
|
async fn test_overwrite(pool: SqlitePool) {
|
||||||
|
let crypt = Crypto::fixed();
|
||||||
|
|
||||||
|
let creds = test_creds_2();
|
||||||
|
// overwite original creds with different test data
|
||||||
|
creds.save(&test_uuid(), "test", &crypt, &pool).await
|
||||||
|
.expect("Failed to update AWS credentials");
|
||||||
|
|
||||||
|
// make sure update went through
|
||||||
|
let loaded = AwsBaseCredential::load("test", &crypt, &pool).await.unwrap();
|
||||||
|
assert_eq!(creds, loaded);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[sqlx::test(fixtures("aws_credentials"))]
|
||||||
|
async fn test_duplicate_name(pool: SqlitePool) {
|
||||||
|
let crypt = Crypto::random();
|
||||||
|
|
||||||
|
let id = test_uuid_random();
|
||||||
|
let resp = test_creds().save(&id, "test", &crypt, &pool).await;
|
||||||
|
|
||||||
|
if !matches!(resp, Err(SaveCredentialsError::Duplicate)) {
|
||||||
|
panic!("Attempt to create duplicate entry returned {resp:?}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#[sqlx::test(fixtures("aws_credentials"))]
|
#[sqlx::test(fixtures("aws_credentials"))]
|
||||||
async fn test_load(pool: SqlitePool) {
|
async fn test_load(pool: SqlitePool) {
|
||||||
let crypt = Crypto::fixed();
|
let crypt = Crypto::fixed();
|
||||||
let loaded = AwsBaseCredential::load(&test_uuid(), &crypt, &pool).await.unwrap();
|
let loaded = AwsBaseCredential::load("test", &crypt, &pool).await.unwrap();
|
||||||
assert_eq!(creds(), loaded);
|
assert_eq!(test_creds(), loaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[sqlx::test(fixtures("aws_credentials"))]
|
#[sqlx::test]
|
||||||
async fn test_load_by_name(pool: SqlitePool) {
|
async fn test_save_load(pool: SqlitePool) {
|
||||||
let crypt = Crypto::fixed();
|
let crypt = Crypto::random();
|
||||||
let loaded = AwsBaseCredential::load_by_name("test2", &crypt, &pool).await.unwrap();
|
let creds = test_creds();
|
||||||
assert_eq!(creds_2(), loaded);
|
creds.save(&test_uuid_random(), "test", &crypt, &pool).await.unwrap();
|
||||||
|
let loaded = AwsBaseCredential::load("test", &crypt, &pool).await.unwrap();
|
||||||
|
|
||||||
|
assert_eq!(creds, loaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[sqlx::test(fixtures("aws_credentials"))]
|
|
||||||
async fn test_load_default(pool: SqlitePool) {
|
|
||||||
let crypt = Crypto::fixed();
|
|
||||||
let loaded = AwsBaseCredential::load_default(&crypt, &pool).await.unwrap();
|
|
||||||
assert_eq!(creds(), loaded)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#[sqlx::test(fixtures("aws_credentials"))]
|
#[sqlx::test(fixtures("aws_credentials"))]
|
||||||
async fn test_list(pool: SqlitePool) {
|
async fn test_list(pool: SqlitePool) {
|
||||||
let crypt = Crypto::fixed();
|
let crypt = Crypto::fixed();
|
||||||
let list: Vec<_> = AwsBaseCredential::list(&pool)
|
let list = AwsBaseCredential::list(&crypt, &pool).await
|
||||||
.await
|
.expect("Failed to list AWS credentials");
|
||||||
.expect("Failed to load credentials")
|
|
||||||
.into_iter()
|
|
||||||
.map(|r| AwsBaseCredential::from_row(r, &crypt).unwrap())
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
assert_eq!(&creds(), &list[0]);
|
let first = SaveCredential {
|
||||||
assert_eq!(&creds_2(), &list[1]);
|
id: test_uuid(),
|
||||||
|
name: "test".into(),
|
||||||
|
credential: Credential::AwsBase(test_creds()),
|
||||||
|
};
|
||||||
|
assert_eq!(&first, &list[0]);
|
||||||
|
|
||||||
|
let second = SaveCredential {
|
||||||
|
id: test_uuid_2(),
|
||||||
|
name: "test2".into(),
|
||||||
|
credential: Credential::AwsBase(test_creds_2()),
|
||||||
|
};
|
||||||
|
assert_eq!(&second, &list[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[sqlx::test(fixtures("aws_credentials"))]
|
||||||
|
async fn test_rekey(pool: SqlitePool) {
|
||||||
|
let old_crypt = Crypto::fixed();
|
||||||
|
let orig = AwsBaseCredential::list(&old_crypt, &pool).await.unwrap();
|
||||||
|
|
||||||
|
let new_crypt = Crypto::random();
|
||||||
|
AwsBaseCredential::rekey(&old_crypt, &new_crypt, &pool).await
|
||||||
|
.expect("Failed to re-key AWS credentials");
|
||||||
|
|
||||||
|
let rekeyed = AwsBaseCredential::list(&new_crypt, &pool).await.unwrap();
|
||||||
|
for (before, after) in orig.iter().zip(rekeyed.iter()) {
|
||||||
|
assert_eq!(before, after);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,116 +0,0 @@
|
|||||||
use std::fmt::{Debug, Formatter};
|
|
||||||
use argon2::{
|
|
||||||
Argon2,
|
|
||||||
Algorithm,
|
|
||||||
Version,
|
|
||||||
ParamsBuilder,
|
|
||||||
password_hash::rand_core::{RngCore, OsRng},
|
|
||||||
};
|
|
||||||
use chacha20poly1305::{
|
|
||||||
XChaCha20Poly1305,
|
|
||||||
XNonce,
|
|
||||||
aead::{
|
|
||||||
Aead,
|
|
||||||
AeadCore,
|
|
||||||
KeyInit,
|
|
||||||
generic_array::GenericArray,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::errors::*;
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Clone)]
|
|
||||||
pub struct Crypto {
|
|
||||||
cipher: XChaCha20Poly1305,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Crypto {
|
|
||||||
/// Argon2 params rationale:
|
|
||||||
///
|
|
||||||
/// m_cost is measured in KiB, so 128 * 1024 gives us 128MiB.
|
|
||||||
/// This should roughly double the memory usage of the application
|
|
||||||
/// while deriving the key.
|
|
||||||
///
|
|
||||||
/// p_cost is irrelevant since (at present) there isn't any parallelism
|
|
||||||
/// implemented, so we leave it at 1.
|
|
||||||
///
|
|
||||||
/// With the above m_cost, t_cost = 8 results in about 800ms to derive
|
|
||||||
/// a key on my (somewhat older) CPU. This is probably overkill, but
|
|
||||||
/// given that it should only have to happen ~once a day for most
|
|
||||||
/// usage, it should be acceptable.
|
|
||||||
#[cfg(not(debug_assertions))]
|
|
||||||
const MEM_COST: u32 = 128 * 1024;
|
|
||||||
#[cfg(not(debug_assertions))]
|
|
||||||
const TIME_COST: u32 = 8;
|
|
||||||
|
|
||||||
/// But since this takes a million years without optimizations,
|
|
||||||
/// we turn it way down in debug builds.
|
|
||||||
#[cfg(debug_assertions)]
|
|
||||||
const MEM_COST: u32 = 48 * 1024;
|
|
||||||
#[cfg(debug_assertions)]
|
|
||||||
const TIME_COST: u32 = 1;
|
|
||||||
|
|
||||||
|
|
||||||
pub fn new(passphrase: &str, salt: &[u8]) -> argon2::Result<Crypto> {
|
|
||||||
let params = ParamsBuilder::new()
|
|
||||||
.m_cost(Self::MEM_COST)
|
|
||||||
.p_cost(1)
|
|
||||||
.t_cost(Self::TIME_COST)
|
|
||||||
.build()
|
|
||||||
.unwrap(); // only errors if the given params are invalid
|
|
||||||
|
|
||||||
let hasher = Argon2::new(
|
|
||||||
Algorithm::Argon2id,
|
|
||||||
Version::V0x13,
|
|
||||||
params,
|
|
||||||
);
|
|
||||||
|
|
||||||
let mut key = [0; 32];
|
|
||||||
hasher.hash_password_into(passphrase.as_bytes(), &salt, &mut key)?;
|
|
||||||
let cipher = XChaCha20Poly1305::new(GenericArray::from_slice(&key));
|
|
||||||
Ok(Crypto { cipher })
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
pub fn random() -> Crypto {
|
|
||||||
// salt and key are the same length, so we can just use this
|
|
||||||
let key = Crypto::salt();
|
|
||||||
let cipher = XChaCha20Poly1305::new(GenericArray::from_slice(&key));
|
|
||||||
Crypto { cipher }
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
pub fn fixed() -> Crypto {
|
|
||||||
let key = [
|
|
||||||
1u8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
|
|
||||||
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
|
|
||||||
];
|
|
||||||
|
|
||||||
let cipher = XChaCha20Poly1305::new(GenericArray::from_slice(&key));
|
|
||||||
Crypto { cipher }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn salt() -> [u8; 32] {
|
|
||||||
let mut salt = [0; 32];
|
|
||||||
OsRng.fill_bytes(&mut salt);
|
|
||||||
salt
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn encrypt(&self, data: &[u8]) -> Result<(XNonce, Vec<u8>), CryptoError> {
|
|
||||||
let nonce = XChaCha20Poly1305::generate_nonce(&mut OsRng);
|
|
||||||
let ciphertext = self.cipher.encrypt(&nonce, data)?;
|
|
||||||
Ok((nonce, ciphertext))
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn decrypt(&self, nonce: &XNonce, data: &[u8]) -> Result<Vec<u8>, CryptoError> {
|
|
||||||
let plaintext = self.cipher.decrypt(nonce, data)?;
|
|
||||||
Ok(plaintext)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Debug for Crypto {
|
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), std::fmt::Error> {
|
|
||||||
write!(f, "Crypto {{ [...] }}")
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +1,7 @@
|
|||||||
INSERT INTO credentials (id, name, credential_type, is_default, created_at)
|
INSERT INTO credentials (id, name, type, created_at)
|
||||||
VALUES
|
VALUES
|
||||||
(X'00000000000000000000000000000000', 'test', 'aws', 1, strftime('%s')),
|
(X'00000000000000000000000000000000', 'test', 'aws', strftime('%s')),
|
||||||
(X'ffffffffffffffffffffffffffffffff', 'test2', 'aws', 0, strftime('%s'));
|
(X'ffffffffffffffffffffffffffffffff', 'test2', 'aws', strftime('%s'));
|
||||||
|
|
||||||
INSERT INTO aws_credentials (id, access_key_id, secret_key_enc, nonce)
|
INSERT INTO aws_credentials (id, access_key_id, secret_key_enc, nonce)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1,95 +1,313 @@
|
|||||||
use std::fmt::Formatter;
|
use std::fmt::{self, Debug, Formatter};
|
||||||
|
|
||||||
use serde::{Serialize, Deserialize};
|
use argon2::{
|
||||||
use sqlx::{
|
Argon2,
|
||||||
FromRow,
|
Algorithm,
|
||||||
Sqlite,
|
Version,
|
||||||
SqlitePool,
|
ParamsBuilder,
|
||||||
sqlite::SqliteRow,
|
password_hash::rand_core::{RngCore, OsRng},
|
||||||
Transaction,
|
|
||||||
types::Uuid,
|
|
||||||
};
|
};
|
||||||
|
use chacha20poly1305::{
|
||||||
|
XChaCha20Poly1305,
|
||||||
|
XNonce,
|
||||||
|
aead::{
|
||||||
|
Aead,
|
||||||
|
AeadCore,
|
||||||
|
KeyInit,
|
||||||
|
generic_array::GenericArray,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
use serde::{
|
||||||
|
Serialize,
|
||||||
|
Deserialize,
|
||||||
|
Serializer,
|
||||||
|
Deserializer,
|
||||||
|
};
|
||||||
|
use serde::de::{self, Visitor};
|
||||||
|
use sqlx::SqlitePool;
|
||||||
|
use sqlx::types::Uuid;
|
||||||
|
|
||||||
use crate::errors::*;
|
use crate::errors::*;
|
||||||
|
use crate::kv;
|
||||||
|
|
||||||
mod aws;
|
mod aws;
|
||||||
pub use aws::{AwsBaseCredential, AwsSessionCredential};
|
pub use aws::{AwsBaseCredential, AwsSessionCredential};
|
||||||
|
|
||||||
mod record;
|
|
||||||
pub use record::CredentialRecord;
|
|
||||||
|
|
||||||
mod session;
|
|
||||||
pub use session::AppSession;
|
|
||||||
|
|
||||||
mod crypto;
|
|
||||||
pub use crypto::Crypto;
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
|
||||||
#[serde(tag = "type")]
|
|
||||||
pub enum Credential {
|
pub enum Credential {
|
||||||
AwsBase(AwsBaseCredential),
|
AwsBase(AwsBaseCredential),
|
||||||
AwsSession(AwsSessionCredential),
|
AwsSession(AwsSessionCredential),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// we need a special type for listing structs because
|
||||||
|
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct SaveCredential {
|
||||||
|
#[serde(serialize_with = "serialize_uuid")]
|
||||||
|
#[serde(deserialize_with = "deserialize_uuid")]
|
||||||
|
id: Uuid, // UUID so it can be generated on the frontend
|
||||||
|
name: String, // user-facing identifier so it can be changed
|
||||||
|
credential: Credential,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl SaveCredential {
|
||||||
|
pub async fn save(&self, crypt: &Crypto, pool: &SqlitePool) -> Result<(), SaveCredentialsError> {
|
||||||
|
let cred = match &self.credential {
|
||||||
|
Credential::AwsBase(b) => b,
|
||||||
|
Credential::AwsSession(_) => return Err(SaveCredentialsError::NotPersistent),
|
||||||
|
};
|
||||||
|
|
||||||
|
cred.save(&self.id, &self.name, crypt, pool).await
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn serialize_uuid<S: Serializer>(u: &Uuid, s: S) -> Result<S::Ok, S::Error> {
|
||||||
|
let mut buf = Vec::new();
|
||||||
|
s.serialize_str(u.as_hyphenated().encode_lower(&mut buf))
|
||||||
|
}
|
||||||
|
|
||||||
|
struct UuidVisitor;
|
||||||
|
|
||||||
|
impl<'de> Visitor<'de> for UuidVisitor {
|
||||||
|
type Value = Uuid;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut Formatter) -> fmt::Result {
|
||||||
|
write!(formatter, "a hyphenated UUID")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_str<E: de::Error>(self, v: &str) -> Result<Uuid, E> {
|
||||||
|
Uuid::try_parse(v)
|
||||||
|
.map_err(|_| E::custom(format!("Could not interpret string as UUID: {v}")))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn deserialize_uuid<'de, D: Deserializer<'de>>(ds: D) -> Result<Uuid, D::Error> {
|
||||||
|
ds.deserialize_str(UuidVisitor)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
pub trait PersistentCredential: for<'a> Deserialize<'a> + Sized {
|
pub trait PersistentCredential: for<'a> Deserialize<'a> + Sized {
|
||||||
type Row: Send + Unpin + for<'r> FromRow<'r, SqliteRow>;
|
async fn load(name: &str, crypt: &Crypto, pool: &SqlitePool) -> Result<Self, LoadCredentialsError>;
|
||||||
|
async fn list(crypt: &Crypto, pool: &SqlitePool) -> Result<Vec<SaveCredential>, LoadCredentialsError>;
|
||||||
|
async fn save(&self, id: &Uuid, name: &str, crypt: &Crypto, pool: &SqlitePool) -> Result<(), SaveCredentialsError>;
|
||||||
|
|
||||||
fn type_name() -> &'static str;
|
async fn rekey(old: &Crypto, new: &Crypto, pool: &SqlitePool) -> Result<(), SaveCredentialsError> {
|
||||||
fn from_row(row: Self::Row, crypto: &Crypto) -> Result<Self, LoadCredentialsError>;
|
for cred in Self::list(old, pool).await? {
|
||||||
// save_details needs to be implemented per-type because we don't know the number of parameters in advance
|
cred.save(new, pool).await?;
|
||||||
async fn save_details(&self, id: &Uuid, crypto: &Crypto, txn: &mut Transaction<'_, Sqlite>) -> Result<(), SaveCredentialsError>;
|
}
|
||||||
|
Ok(())
|
||||||
fn table_name() -> String {
|
}
|
||||||
format!("{}_credentials", Self::type_name())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn load(id: &Uuid, crypto: &Crypto, pool: &SqlitePool) -> Result<Self, LoadCredentialsError> {
|
|
||||||
let q = format!("SELECT * FROM {} WHERE id = ?", Self::table_name());
|
|
||||||
let row: Self::Row = sqlx::query_as(&q)
|
|
||||||
.bind(id)
|
|
||||||
.fetch_optional(pool)
|
|
||||||
.await?
|
|
||||||
.ok_or(LoadCredentialsError::NoCredentials)?;
|
|
||||||
|
|
||||||
Self::from_row(row, crypto)
|
#[derive(Clone, Debug)]
|
||||||
|
pub enum AppSession {
|
||||||
|
Unlocked {
|
||||||
|
salt: [u8; 32],
|
||||||
|
crypto: Crypto,
|
||||||
|
},
|
||||||
|
Locked {
|
||||||
|
salt: [u8; 32],
|
||||||
|
verify_nonce: XNonce,
|
||||||
|
verify_blob: Vec<u8>
|
||||||
|
},
|
||||||
|
Empty,
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn load_by_name(name: &str, crypto: &Crypto, pool: &SqlitePool) -> Result<Self, LoadCredentialsError> {
|
impl AppSession {
|
||||||
let q = format!(
|
pub fn new(passphrase: &str) -> Result<Self, CryptoError> {
|
||||||
"SELECT * FROM {} WHERE id = (SELECT id FROM credentials WHERE name = ?)",
|
let salt = Crypto::salt();
|
||||||
Self::table_name(),
|
let crypto = Crypto::new(passphrase, &salt)?;
|
||||||
|
Ok(Self::Unlocked {salt, crypto})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn unlock(&mut self, passphrase: &str) -> Result<(), UnlockError> {
|
||||||
|
let (salt, nonce, blob) = match self {
|
||||||
|
Self::Empty => return Err(UnlockError::NoCredentials),
|
||||||
|
Self::Unlocked {..} => return Err(UnlockError::NotLocked),
|
||||||
|
Self::Locked {salt, verify_nonce, verify_blob} => (salt, verify_nonce, verify_blob),
|
||||||
|
};
|
||||||
|
|
||||||
|
let crypto = Crypto::new(passphrase, salt)
|
||||||
|
.map_err(|e| CryptoError::Argon2(e))?;
|
||||||
|
|
||||||
|
// if passphrase is incorrect, this will fail
|
||||||
|
let _verify = crypto.decrypt(&nonce, &blob)?;
|
||||||
|
|
||||||
|
*self = Self::Unlocked {crypto, salt: *salt};
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub async fn load(pool: &SqlitePool) -> Result<Self, LoadCredentialsError> {
|
||||||
|
match kv::load_bytes_multi!(pool, "salt", "verify_nonce", "verify_blob").await? {
|
||||||
|
Some((salt, nonce, blob)) => {
|
||||||
|
|
||||||
|
Ok(Self::Locked {
|
||||||
|
salt: salt.try_into().map_err(|_| LoadCredentialsError::InvalidData)?,
|
||||||
|
// note: replace this with try_from at some point
|
||||||
|
verify_nonce: XNonce::clone_from_slice(&nonce),
|
||||||
|
verify_blob: blob,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
None => Ok(Self::Empty),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub async fn save(&self, pool: &SqlitePool) -> Result<(), SaveCredentialsError> {
|
||||||
|
match self {
|
||||||
|
Self::Unlocked {salt, crypto} => {
|
||||||
|
let (nonce, blob) = crypto.encrypt(b"correct horse battery staple")?;
|
||||||
|
kv::save_bytes(pool, "salt", salt).await?;
|
||||||
|
kv::save_bytes(pool, "verify_nonce", &nonce.as_slice()).await?;
|
||||||
|
kv::save_bytes(pool, "verify_blob", &blob).await?;
|
||||||
|
},
|
||||||
|
Self::Locked {salt, verify_nonce, verify_blob} => {
|
||||||
|
kv::save_bytes(pool, "salt", salt).await?;
|
||||||
|
kv::save_bytes(pool, "verify_nonce", &verify_nonce.as_slice()).await?;
|
||||||
|
kv::save_bytes(pool, "verify_blob", verify_blob).await?;
|
||||||
|
},
|
||||||
|
// "saving" an empty session just means doing nothing
|
||||||
|
Self::Empty => (),
|
||||||
|
};
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn try_get_crypto(&self) -> Result<&Crypto, GetCredentialsError> {
|
||||||
|
match self {
|
||||||
|
Self::Empty => Err(GetCredentialsError::Empty),
|
||||||
|
Self::Locked {..} => Err(GetCredentialsError::Locked),
|
||||||
|
Self::Unlocked {crypto, ..} => Ok(crypto),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn try_encrypt(&self, data: &[u8]) -> Result<(XNonce, Vec<u8>), GetCredentialsError> {
|
||||||
|
let crypto = match self {
|
||||||
|
Self::Empty => return Err(GetCredentialsError::Empty),
|
||||||
|
Self::Locked {..} => return Err(GetCredentialsError::Locked),
|
||||||
|
Self::Unlocked {crypto, ..} => crypto,
|
||||||
|
};
|
||||||
|
let res = crypto.encrypt(data)?;
|
||||||
|
Ok(res)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn try_decrypt(&self, nonce: XNonce, data: &[u8]) -> Result<Vec<u8>, GetCredentialsError> {
|
||||||
|
let crypto = match self {
|
||||||
|
Self::Empty => return Err(GetCredentialsError::Empty),
|
||||||
|
Self::Locked {..} => return Err(GetCredentialsError::Locked),
|
||||||
|
Self::Unlocked {crypto, ..} => crypto,
|
||||||
|
};
|
||||||
|
let res = crypto.decrypt(&nonce, data)?;
|
||||||
|
Ok(res)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
|
pub struct Crypto {
|
||||||
|
cipher: XChaCha20Poly1305,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Crypto {
|
||||||
|
/// Argon2 params rationale:
|
||||||
|
///
|
||||||
|
/// m_cost is measured in KiB, so 128 * 1024 gives us 128MiB.
|
||||||
|
/// This should roughly double the memory usage of the application
|
||||||
|
/// while deriving the key.
|
||||||
|
///
|
||||||
|
/// p_cost is irrelevant since (at present) there isn't any parallelism
|
||||||
|
/// implemented, so we leave it at 1.
|
||||||
|
///
|
||||||
|
/// With the above m_cost, t_cost = 8 results in about 800ms to derive
|
||||||
|
/// a key on my (somewhat older) CPU. This is probably overkill, but
|
||||||
|
/// given that it should only have to happen ~once a day for most
|
||||||
|
/// usage, it should be acceptable.
|
||||||
|
#[cfg(not(debug_assertions))]
|
||||||
|
const MEM_COST: u32 = 128 * 1024;
|
||||||
|
#[cfg(not(debug_assertions))]
|
||||||
|
const TIME_COST: u32 = 8;
|
||||||
|
|
||||||
|
/// But since this takes a million years without optimizations,
|
||||||
|
/// we turn it way down in debug builds.
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
|
const MEM_COST: u32 = 48 * 1024;
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
|
const TIME_COST: u32 = 1;
|
||||||
|
|
||||||
|
|
||||||
|
fn new(passphrase: &str, salt: &[u8]) -> argon2::Result<Crypto> {
|
||||||
|
let params = ParamsBuilder::new()
|
||||||
|
.m_cost(Self::MEM_COST)
|
||||||
|
.p_cost(1)
|
||||||
|
.t_cost(Self::TIME_COST)
|
||||||
|
.build()
|
||||||
|
.unwrap(); // only errors if the given params are invalid
|
||||||
|
|
||||||
|
let hasher = Argon2::new(
|
||||||
|
Algorithm::Argon2id,
|
||||||
|
Version::V0x13,
|
||||||
|
params,
|
||||||
);
|
);
|
||||||
let row: Self::Row = sqlx::query_as(&q)
|
|
||||||
.bind(name)
|
|
||||||
.fetch_optional(pool)
|
|
||||||
.await?
|
|
||||||
.ok_or(LoadCredentialsError::NoCredentials)?;
|
|
||||||
|
|
||||||
Self::from_row(row, crypto)
|
let mut key = [0; 32];
|
||||||
|
hasher.hash_password_into(passphrase.as_bytes(), &salt, &mut key)?;
|
||||||
|
let cipher = XChaCha20Poly1305::new(GenericArray::from_slice(&key));
|
||||||
|
Ok(Crypto { cipher })
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn load_default(crypto: &Crypto, pool: &SqlitePool) -> Result<Self, LoadCredentialsError> {
|
#[cfg(test)]
|
||||||
let q = format!(
|
pub fn random() -> Crypto {
|
||||||
"SELECT details.*
|
// salt and key are the same length, so we can just use this
|
||||||
FROM {} details
|
let key = Crypto::salt();
|
||||||
JOIN credentials c
|
let cipher = XChaCha20Poly1305::new(GenericArray::from_slice(&key));
|
||||||
ON c.id = details.id
|
Crypto { cipher }
|
||||||
AND c.is_default = 1",
|
|
||||||
Self::table_name(),
|
|
||||||
);
|
|
||||||
let row: Self::Row = sqlx::query_as(&q)
|
|
||||||
.fetch_optional(pool)
|
|
||||||
.await?
|
|
||||||
.ok_or(LoadCredentialsError::NoCredentials)?;
|
|
||||||
|
|
||||||
Self::from_row(row, crypto)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn list(pool: &SqlitePool) -> Result<Vec<Self::Row>, LoadCredentialsError> {
|
#[cfg(test)]
|
||||||
let q = format!("SELECT * FROM {}", Self::table_name());
|
pub fn fixed() -> Crypto {
|
||||||
let rows: Vec<Self::Row> = sqlx::query_as(&q).fetch_all(pool).await?;
|
let key = [
|
||||||
Ok(rows)
|
1u8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
|
||||||
|
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
|
||||||
|
];
|
||||||
|
|
||||||
|
let cipher = XChaCha20Poly1305::new(GenericArray::from_slice(&key));
|
||||||
|
Crypto { cipher }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn salt() -> [u8; 32] {
|
||||||
|
let mut salt = [0; 32];
|
||||||
|
OsRng.fill_bytes(&mut salt);
|
||||||
|
salt
|
||||||
|
}
|
||||||
|
|
||||||
|
fn encrypt(&self, data: &[u8]) -> Result<(XNonce, Vec<u8>), CryptoError> {
|
||||||
|
let nonce = XChaCha20Poly1305::generate_nonce(&mut OsRng);
|
||||||
|
let ciphertext = self.cipher.encrypt(&nonce, data)?;
|
||||||
|
Ok((nonce, ciphertext))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn decrypt(&self, nonce: &XNonce, data: &[u8]) -> Result<Vec<u8>, CryptoError> {
|
||||||
|
let plaintext = self.cipher.decrypt(nonce, data)?;
|
||||||
|
Ok(plaintext)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Debug for Crypto {
|
||||||
|
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), std::fmt::Error> {
|
||||||
|
write!(f, "Crypto {{ [...] }}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #[cfg(test)]
|
||||||
|
// mod tests {
|
||||||
|
// use super::*;
|
||||||
|
|
||||||
|
// #[sqlx::test(fixtures("uuid_test"))]
|
||||||
|
// async fn save_uuid(pool: SqlitePool) {
|
||||||
|
// let u = Uuid::try_parse("7140b90c-bfbd-4394-9008-01b94f94ecf8").unwrap();
|
||||||
|
// sqlx::query!("INSERT INTO uuids (uuid) VALUES (?)", u).execute(pool).unwrap();
|
||||||
|
// panic!("done, go check db");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
@ -1,381 +0,0 @@
|
|||||||
use std::collections::HashMap;
|
|
||||||
use std::fmt::{self, Debug, Formatter};
|
|
||||||
use serde::{
|
|
||||||
Serialize,
|
|
||||||
Deserialize,
|
|
||||||
Serializer,
|
|
||||||
Deserializer,
|
|
||||||
};
|
|
||||||
use serde::de::{self, Visitor};
|
|
||||||
use sqlx::{
|
|
||||||
Error as SqlxError,
|
|
||||||
FromRow,
|
|
||||||
SqlitePool,
|
|
||||||
types::Uuid,
|
|
||||||
};
|
|
||||||
use tokio_stream::StreamExt;
|
|
||||||
|
|
||||||
use crate::errors::*;
|
|
||||||
use super::{
|
|
||||||
AwsBaseCredential,
|
|
||||||
aws::AwsRow,
|
|
||||||
Credential,
|
|
||||||
Crypto,
|
|
||||||
PersistentCredential,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, FromRow)]
|
|
||||||
struct CredentialRow {
|
|
||||||
id: Uuid,
|
|
||||||
name: String,
|
|
||||||
credential_type: String,
|
|
||||||
is_default: bool,
|
|
||||||
created_at: i64,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct CredentialRecord {
|
|
||||||
#[serde(serialize_with = "serialize_uuid")]
|
|
||||||
#[serde(deserialize_with = "deserialize_uuid")]
|
|
||||||
id: Uuid, // UUID so it can be generated on the frontend
|
|
||||||
name: String, // user-facing identifier so it can be changed
|
|
||||||
is_default: bool,
|
|
||||||
credential: Credential,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl CredentialRecord {
|
|
||||||
pub async fn save(&self, crypto: &Crypto, pool: &SqlitePool) -> Result<(), SaveCredentialsError> {
|
|
||||||
let type_name = match &self.credential {
|
|
||||||
Credential::AwsBase(_) => AwsBaseCredential::type_name(),
|
|
||||||
_ => return Err(SaveCredentialsError::NotPersistent),
|
|
||||||
};
|
|
||||||
|
|
||||||
// if the credential being saved is default, make sure it's the only default of its type
|
|
||||||
let mut txn = pool.begin().await?;
|
|
||||||
if self.is_default {
|
|
||||||
sqlx::query!(
|
|
||||||
"UPDATE credentials SET is_default = 0 WHERE credential_type = ?",
|
|
||||||
type_name
|
|
||||||
).execute(&mut *txn).await?;
|
|
||||||
}
|
|
||||||
|
|
||||||
// save to parent credentials table
|
|
||||||
let res = sqlx::query!(
|
|
||||||
"INSERT INTO credentials (id, name, credential_type, is_default, created_at)
|
|
||||||
VALUES (?, ?, ?, ?, strftime('%s'))
|
|
||||||
ON CONFLICT(id) DO UPDATE SET
|
|
||||||
name = excluded.name,
|
|
||||||
credential_type = excluded.credential_type,
|
|
||||||
is_default = excluded.is_default",
|
|
||||||
self.id, self.name, type_name, self.is_default
|
|
||||||
).execute(&mut *txn).await;
|
|
||||||
|
|
||||||
// if id is unique, but name is not, we will get an error
|
|
||||||
// (if id is not unique, this becomes an upsert due to ON CONFLICT clause)
|
|
||||||
match res {
|
|
||||||
Err(SqlxError::Database(e)) if e.is_unique_violation() => Err(SaveCredentialsError::Duplicate),
|
|
||||||
Err(e) => Err(SaveCredentialsError::DbError(e)),
|
|
||||||
Ok(_) => Ok(())
|
|
||||||
}?;
|
|
||||||
|
|
||||||
// save credential details to child table
|
|
||||||
match &self.credential {
|
|
||||||
Credential::AwsBase(b) => b.save_details(&self.id, crypto, &mut txn).await,
|
|
||||||
_ => Err(SaveCredentialsError::NotPersistent),
|
|
||||||
}?;
|
|
||||||
|
|
||||||
// make it real
|
|
||||||
txn.commit().await?;
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn from_parts(row: CredentialRow, credential: Credential) -> Self {
|
|
||||||
CredentialRecord {
|
|
||||||
id: row.id,
|
|
||||||
name: row.name,
|
|
||||||
is_default: row.is_default,
|
|
||||||
credential,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn load_details(row: CredentialRow, crypto: &Crypto, pool: &SqlitePool) -> Result<Self, LoadCredentialsError> {
|
|
||||||
let credential = match row.credential_type.as_str() {
|
|
||||||
"aws" => Credential::AwsBase(AwsBaseCredential::load(&row.id, crypto, pool).await?),
|
|
||||||
_ => return Err(LoadCredentialsError::InvalidData),
|
|
||||||
};
|
|
||||||
|
|
||||||
Ok(Self::from_parts(row, credential))
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn load(id: &Uuid, crypto: &Crypto, pool: &SqlitePool) -> Result<Self, LoadCredentialsError> {
|
|
||||||
let row: CredentialRow = sqlx::query_as("SELECT * FROM credentials WHERE id = ?")
|
|
||||||
.bind(id)
|
|
||||||
.fetch_optional(pool)
|
|
||||||
.await?
|
|
||||||
.ok_or(LoadCredentialsError::NoCredentials)?;
|
|
||||||
|
|
||||||
Self::load_details(row, crypto, pool).await
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn load_default(credential_type: &str, crypto: &Crypto, pool: &SqlitePool) -> Result<Self, LoadCredentialsError> {
|
|
||||||
let row: CredentialRow = sqlx::query_as(
|
|
||||||
"SELECT * FROM credentials
|
|
||||||
WHERE credential_type = ? AND is_default = 1"
|
|
||||||
).bind(credential_type)
|
|
||||||
.fetch_optional(pool)
|
|
||||||
.await?
|
|
||||||
.ok_or(LoadCredentialsError::NoCredentials)?;
|
|
||||||
|
|
||||||
Self::load_details(row, crypto, pool).await
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn list(crypto: &Crypto, pool: &SqlitePool) -> Result<Vec<Self>, LoadCredentialsError> {
|
|
||||||
let mut parent_rows = sqlx::query_as::<_, CredentialRow>(
|
|
||||||
"SELECT * FROM credentials"
|
|
||||||
).fetch(pool);
|
|
||||||
|
|
||||||
let mut parent_map = HashMap::new();
|
|
||||||
while let Some(row) = parent_rows.try_next().await? {
|
|
||||||
parent_map.insert(row.id, row);
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut records = Vec::with_capacity(parent_map.len());
|
|
||||||
|
|
||||||
for row in AwsBaseCredential::list(&pool).await? {
|
|
||||||
let parent = parent_map.remove(&row.id)
|
|
||||||
.ok_or(LoadCredentialsError::InvalidData)?;
|
|
||||||
let credential = Credential::AwsBase(AwsBaseCredential::from_row(row, crypto)?);
|
|
||||||
records.push(Self::from_parts(parent, credential));
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(records)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[allow(unused_variables)]
|
|
||||||
pub async fn rekey(old: &Crypto, new: &Crypto, pool: &SqlitePool) -> Result<(), SaveCredentialsError> {
|
|
||||||
todo!()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fn serialize_uuid<S: Serializer>(u: &Uuid, s: S) -> Result<S::Ok, S::Error> {
|
|
||||||
let mut buf = Uuid::encode_buffer();
|
|
||||||
s.serialize_str(u.as_hyphenated().encode_lower(&mut buf))
|
|
||||||
}
|
|
||||||
|
|
||||||
struct UuidVisitor;
|
|
||||||
|
|
||||||
impl<'de> Visitor<'de> for UuidVisitor {
|
|
||||||
type Value = Uuid;
|
|
||||||
|
|
||||||
fn expecting(&self, formatter: &mut Formatter) -> fmt::Result {
|
|
||||||
write!(formatter, "a hyphenated UUID")
|
|
||||||
}
|
|
||||||
|
|
||||||
fn visit_str<E: de::Error>(self, v: &str) -> Result<Uuid, E> {
|
|
||||||
Uuid::try_parse(v)
|
|
||||||
.map_err(|_| E::custom(format!("Could not interpret string as UUID: {v}")))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn deserialize_uuid<'de, D: Deserializer<'de>>(ds: D) -> Result<Uuid, D::Error> {
|
|
||||||
ds.deserialize_str(UuidVisitor)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
use super::*;
|
|
||||||
use sqlx::types::uuid::uuid;
|
|
||||||
|
|
||||||
|
|
||||||
fn aws_record() -> CredentialRecord {
|
|
||||||
let id = uuid!("00000000-0000-0000-0000-000000000000");
|
|
||||||
let aws = AwsBaseCredential::new(
|
|
||||||
"AKIAIOSFODNN7EXAMPLE".into(),
|
|
||||||
"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY".into(),
|
|
||||||
);
|
|
||||||
|
|
||||||
CredentialRecord {
|
|
||||||
id,
|
|
||||||
name: "test".into(),
|
|
||||||
is_default: true,
|
|
||||||
credential: Credential::AwsBase(aws),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn aws_record_2() -> CredentialRecord {
|
|
||||||
let id = uuid!("ffffffff-ffff-ffff-ffff-ffffffffffff");
|
|
||||||
let aws = AwsBaseCredential::new(
|
|
||||||
"AKIAIOSFODNN7EXAMPL2".into(),
|
|
||||||
"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKE2".into(),
|
|
||||||
);
|
|
||||||
|
|
||||||
CredentialRecord {
|
|
||||||
id,
|
|
||||||
name: "test2".into(),
|
|
||||||
is_default: false,
|
|
||||||
credential: Credential::AwsBase(aws),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn random_uuid() -> Uuid {
|
|
||||||
let bytes = Crypto::salt();
|
|
||||||
Uuid::from_slice(&bytes[..16]).unwrap()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#[sqlx::test(fixtures("aws_credentials"))]
|
|
||||||
async fn test_load_aws(pool: SqlitePool) {
|
|
||||||
let crypt = Crypto::fixed();
|
|
||||||
let id = uuid!("00000000-0000-0000-0000-000000000000");
|
|
||||||
let loaded = CredentialRecord::load(&id, &crypt, &pool).await
|
|
||||||
.expect("Failed to load record");
|
|
||||||
|
|
||||||
assert_eq!(aws_record(), loaded);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#[sqlx::test(fixtures("aws_credentials"))]
|
|
||||||
async fn test_load_aws_default(pool: SqlitePool) {
|
|
||||||
let crypt = Crypto::fixed();
|
|
||||||
let loaded = CredentialRecord::load_default("aws", &crypt, &pool).await
|
|
||||||
.expect("Failed to load record");
|
|
||||||
|
|
||||||
assert_eq!(aws_record(), loaded);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#[sqlx::test]
|
|
||||||
async fn test_save_aws(pool: SqlitePool) {
|
|
||||||
let crypt = Crypto::random();
|
|
||||||
let mut record = aws_record();
|
|
||||||
record.id = random_uuid();
|
|
||||||
|
|
||||||
aws_record().save(&crypt, &pool).await
|
|
||||||
.expect("Failed to save record");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#[sqlx::test]
|
|
||||||
async fn test_save_load(pool: SqlitePool) {
|
|
||||||
let crypt = Crypto::random();
|
|
||||||
let mut record = aws_record();
|
|
||||||
record.id = random_uuid();
|
|
||||||
|
|
||||||
record.save(&crypt, &pool).await
|
|
||||||
.expect("Failed to save record");
|
|
||||||
let loaded = CredentialRecord::load(&record.id, &crypt, &pool).await
|
|
||||||
.expect("Failed to load record");
|
|
||||||
|
|
||||||
assert_eq!(record, loaded);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
async fn test_overwrite_aws(pool: SqlitePool) {
|
|
||||||
let crypt = Crypto::fixed();
|
|
||||||
|
|
||||||
let original = aws_record();
|
|
||||||
original.save(&crypt, &pool).await
|
|
||||||
.expect("Failed to save first record");
|
|
||||||
|
|
||||||
let mut updated = aws_record_2();
|
|
||||||
updated.id = original.id;
|
|
||||||
updated.save(&crypt, &pool).await
|
|
||||||
.expect("Failed to overwrite first record with second record");
|
|
||||||
|
|
||||||
// make sure update went through
|
|
||||||
let loaded = CredentialRecord::load(&updated.id, &crypt, &pool).await.unwrap();
|
|
||||||
assert_eq!(updated, loaded);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#[sqlx::test(fixtures("aws_credentials"))]
|
|
||||||
async fn test_duplicate_name(pool: SqlitePool) {
|
|
||||||
let crypt = Crypto::random();
|
|
||||||
|
|
||||||
let mut record = aws_record();
|
|
||||||
record.id = random_uuid();
|
|
||||||
let resp = record.save(&crypt, &pool).await;
|
|
||||||
|
|
||||||
if !matches!(resp, Err(SaveCredentialsError::Duplicate)) {
|
|
||||||
panic!("Attempt to create duplicate entry returned {resp:?}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#[sqlx::test(fixtures("aws_credentials"))]
|
|
||||||
async fn test_change_default(pool: SqlitePool) {
|
|
||||||
let crypt = Crypto::fixed();
|
|
||||||
let id = uuid!("ffffffff-ffff-ffff-ffff-ffffffffffff");
|
|
||||||
|
|
||||||
// confirm that record as it currently exists in the database is not default
|
|
||||||
let mut record = CredentialRecord::load(&id, &crypt, &pool).await
|
|
||||||
.expect("Failed to load record");
|
|
||||||
assert!(!record.is_default);
|
|
||||||
|
|
||||||
record.is_default = true;
|
|
||||||
record.save(&crypt, &pool).await
|
|
||||||
.expect("Failed to save record");
|
|
||||||
|
|
||||||
let loaded = CredentialRecord::load(&id, &crypt, &pool).await
|
|
||||||
.expect("Failed to re-load record");
|
|
||||||
assert!(loaded.is_default);
|
|
||||||
|
|
||||||
let other_id = uuid!("00000000-0000-0000-0000-000000000000");
|
|
||||||
let other_loaded = CredentialRecord::load(&other_id, &crypt, &pool).await
|
|
||||||
.expect("Failed to load other credential");
|
|
||||||
assert!(!other_loaded.is_default);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod uuid_tests {
|
|
||||||
use super::*;
|
|
||||||
use sqlx::types::uuid::uuid;
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Serialize, Deserialize)]
|
|
||||||
struct UuidWrapper {
|
|
||||||
#[serde(serialize_with = "serialize_uuid")]
|
|
||||||
#[serde(deserialize_with = "deserialize_uuid")]
|
|
||||||
id: Uuid,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_serialize_uuid() {
|
|
||||||
let u = UuidWrapper {
|
|
||||||
id: uuid!("693f84d2-4c1b-41e5-8483-cbe178324e04")
|
|
||||||
};
|
|
||||||
let computed = serde_json::to_string(&u).unwrap();
|
|
||||||
assert_eq!(
|
|
||||||
"{\"id\":\"693f84d2-4c1b-41e5-8483-cbe178324e04\"}",
|
|
||||||
&computed,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_deserialize_uuid() {
|
|
||||||
let s = "{\"id\":\"045bd359-8630-4b76-9b7d-e4a86ed2222c\"}";
|
|
||||||
let computed = serde_json::from_str(s).unwrap();
|
|
||||||
let expected = UuidWrapper {
|
|
||||||
id: uuid!("045bd359-8630-4b76-9b7d-e4a86ed2222c"),
|
|
||||||
};
|
|
||||||
assert_eq!(expected, computed);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_serialize_deserialize_uuid() {
|
|
||||||
let buf = Crypto::salt();
|
|
||||||
let expected = UuidWrapper{
|
|
||||||
id: Uuid::from_slice(&buf[..16]).unwrap()
|
|
||||||
};
|
|
||||||
let serialized = serde_json::to_string(&expected).unwrap();
|
|
||||||
let computed = serde_json::from_str(&serialized).unwrap();
|
|
||||||
assert_eq!(expected, computed)
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,109 +0,0 @@
|
|||||||
use chacha20poly1305::XNonce;
|
|
||||||
use sqlx::SqlitePool;
|
|
||||||
|
|
||||||
use crate::errors::*;
|
|
||||||
use crate::kv;
|
|
||||||
use super::Crypto;
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
|
||||||
pub enum AppSession {
|
|
||||||
Unlocked {
|
|
||||||
salt: [u8; 32],
|
|
||||||
crypto: Crypto,
|
|
||||||
},
|
|
||||||
Locked {
|
|
||||||
salt: [u8; 32],
|
|
||||||
verify_nonce: XNonce,
|
|
||||||
verify_blob: Vec<u8>
|
|
||||||
},
|
|
||||||
Empty,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl AppSession {
|
|
||||||
pub fn new(passphrase: &str) -> Result<Self, CryptoError> {
|
|
||||||
let salt = Crypto::salt();
|
|
||||||
let crypto = Crypto::new(passphrase, &salt)?;
|
|
||||||
Ok(Self::Unlocked {salt, crypto})
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn unlock(&mut self, passphrase: &str) -> Result<(), UnlockError> {
|
|
||||||
let (salt, nonce, blob) = match self {
|
|
||||||
Self::Empty => return Err(UnlockError::NoCredentials),
|
|
||||||
Self::Unlocked {..} => return Err(UnlockError::NotLocked),
|
|
||||||
Self::Locked {salt, verify_nonce, verify_blob} => (salt, verify_nonce, verify_blob),
|
|
||||||
};
|
|
||||||
|
|
||||||
let crypto = Crypto::new(passphrase, salt)
|
|
||||||
.map_err(|e| CryptoError::Argon2(e))?;
|
|
||||||
|
|
||||||
// if passphrase is incorrect, this will fail
|
|
||||||
let _verify = crypto.decrypt(&nonce, &blob)?;
|
|
||||||
|
|
||||||
*self = Self::Unlocked {crypto, salt: *salt};
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn load(pool: &SqlitePool) -> Result<Self, LoadCredentialsError> {
|
|
||||||
match kv::load_bytes_multi!(pool, "salt", "verify_nonce", "verify_blob").await? {
|
|
||||||
Some((salt, nonce, blob)) => {
|
|
||||||
|
|
||||||
Ok(Self::Locked {
|
|
||||||
salt: salt.try_into().map_err(|_| LoadCredentialsError::InvalidData)?,
|
|
||||||
// note: replace this with try_from at some point
|
|
||||||
verify_nonce: XNonce::clone_from_slice(&nonce),
|
|
||||||
verify_blob: blob,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
None => Ok(Self::Empty),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn save(&self, pool: &SqlitePool) -> Result<(), SaveCredentialsError> {
|
|
||||||
match self {
|
|
||||||
Self::Unlocked {salt, crypto} => {
|
|
||||||
let (nonce, blob) = crypto.encrypt(b"correct horse battery staple")?;
|
|
||||||
kv::save_bytes(pool, "salt", salt).await?;
|
|
||||||
kv::save_bytes(pool, "verify_nonce", &nonce.as_slice()).await?;
|
|
||||||
kv::save_bytes(pool, "verify_blob", &blob).await?;
|
|
||||||
},
|
|
||||||
Self::Locked {salt, verify_nonce, verify_blob} => {
|
|
||||||
kv::save_bytes(pool, "salt", salt).await?;
|
|
||||||
kv::save_bytes(pool, "verify_nonce", &verify_nonce.as_slice()).await?;
|
|
||||||
kv::save_bytes(pool, "verify_blob", verify_blob).await?;
|
|
||||||
},
|
|
||||||
// "saving" an empty session just means doing nothing
|
|
||||||
Self::Empty => (),
|
|
||||||
};
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn try_get_crypto(&self) -> Result<&Crypto, GetCredentialsError> {
|
|
||||||
match self {
|
|
||||||
Self::Empty => Err(GetCredentialsError::Empty),
|
|
||||||
Self::Locked {..} => Err(GetCredentialsError::Locked),
|
|
||||||
Self::Unlocked {crypto, ..} => Ok(crypto),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn try_encrypt(&self, data: &[u8]) -> Result<(XNonce, Vec<u8>), GetCredentialsError> {
|
|
||||||
let crypto = match self {
|
|
||||||
Self::Empty => return Err(GetCredentialsError::Empty),
|
|
||||||
Self::Locked {..} => return Err(GetCredentialsError::Locked),
|
|
||||||
Self::Unlocked {crypto, ..} => crypto,
|
|
||||||
};
|
|
||||||
let res = crypto.encrypt(data)?;
|
|
||||||
Ok(res)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn try_decrypt(&self, nonce: XNonce, data: &[u8]) -> Result<Vec<u8>, GetCredentialsError> {
|
|
||||||
let crypto = match self {
|
|
||||||
Self::Empty => return Err(GetCredentialsError::Empty),
|
|
||||||
Self::Locked {..} => return Err(GetCredentialsError::Locked),
|
|
||||||
Self::Unlocked {crypto, ..} => crypto,
|
|
||||||
};
|
|
||||||
let res = crypto.decrypt(&nonce, data)?;
|
|
||||||
Ok(res)
|
|
||||||
}
|
|
||||||
}
|
|
@ -5,7 +5,7 @@ use tauri::State;
|
|||||||
use crate::config::AppConfig;
|
use crate::config::AppConfig;
|
||||||
use crate::credentials::{
|
use crate::credentials::{
|
||||||
AppSession,
|
AppSession,
|
||||||
CredentialRecord
|
SaveCredential
|
||||||
};
|
};
|
||||||
use crate::errors::*;
|
use crate::errors::*;
|
||||||
use crate::clientinfo::Client;
|
use crate::clientinfo::Client;
|
||||||
@ -107,10 +107,10 @@ pub async fn signal_activity(app_state: State<'_, AppState>) -> Result<(), ()> {
|
|||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub async fn save_credential(
|
pub async fn save_credential(
|
||||||
record: CredentialRecord,
|
cred: SaveCredential,
|
||||||
app_state: State<'_, AppState>
|
app_state: State<'_, AppState>
|
||||||
) -> Result<(), SaveCredentialsError> {
|
) -> Result<(), SaveCredentialsError> {
|
||||||
app_state.save_credential(record).await
|
app_state.save_credential(cred).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ pub async fn delete_credential(id: &str, app_state: State<'_, AppState>) -> Resu
|
|||||||
|
|
||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub async fn list_credentials(app_state: State<'_, AppState>) -> Result<Vec<CredentialRecord>, GetCredentialsError> {
|
pub async fn list_credentials(app_state: State<'_, AppState>) -> Result<Vec<SaveCredential>, GetCredentialsError> {
|
||||||
app_state.list_credentials().await
|
app_state.list_credentials().await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ use crate::credentials::{
|
|||||||
use crate::{config, config::AppConfig};
|
use crate::{config, config::AppConfig};
|
||||||
use crate::credentials::{
|
use crate::credentials::{
|
||||||
AwsBaseCredential,
|
AwsBaseCredential,
|
||||||
CredentialRecord,
|
SaveCredential,
|
||||||
PersistentCredential
|
PersistentCredential
|
||||||
};
|
};
|
||||||
use crate::ipc::{self, RequestResponse};
|
use crate::ipc::{self, RequestResponse};
|
||||||
@ -142,10 +142,10 @@ impl AppState {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn save_credential(&self, record: CredentialRecord) -> Result<(), SaveCredentialsError> {
|
pub async fn save_credential(&self, cred: SaveCredential) -> Result<(), SaveCredentialsError> {
|
||||||
let session = self.app_session.read().await;
|
let session = self.app_session.read().await;
|
||||||
let crypto = session.try_get_crypto()?;
|
let crypto = session.try_get_crypto()?;
|
||||||
record.save(crypto, &self.pool).await
|
cred.save(crypto, &self.pool).await
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn delete_credential(&self, id: &Uuid) -> Result<(), SaveCredentialsError> {
|
pub async fn delete_credential(&self, id: &Uuid) -> Result<(), SaveCredentialsError> {
|
||||||
@ -155,11 +155,12 @@ impl AppState {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn list_credentials(&self) -> Result<Vec<CredentialRecord>, GetCredentialsError> {
|
pub async fn list_credentials(&self) -> Result<Vec<SaveCredential>, GetCredentialsError> {
|
||||||
let session = self.app_session.read().await;
|
let session = self.app_session.read().await;
|
||||||
let crypto = session.try_get_crypto()?;
|
let crypto = session.try_get_crypto()?;
|
||||||
let list = CredentialRecord::list(crypto, &self.pool).await?;
|
let creds = AwsBaseCredential::list(crypto, &self.pool).await?;
|
||||||
Ok(list)
|
// eventual extend this vec with other credential types
|
||||||
|
Ok(creds)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn set_passphrase(&self, passphrase: &str) -> Result<(), SaveCredentialsError> {
|
pub async fn set_passphrase(&self, passphrase: &str) -> Result<(), SaveCredentialsError> {
|
||||||
@ -170,7 +171,7 @@ impl AppState {
|
|||||||
|
|
||||||
let new_session = AppSession::new(passphrase)?;
|
let new_session = AppSession::new(passphrase)?;
|
||||||
if let AppSession::Unlocked {salt: _, ref crypto} = *cur_session {
|
if let AppSession::Unlocked {salt: _, ref crypto} = *cur_session {
|
||||||
CredentialRecord::rekey(
|
AwsBaseCredential::rekey(
|
||||||
crypto,
|
crypto,
|
||||||
new_session.try_get_crypto().expect("AppSession::new() should always return Unlocked"),
|
new_session.try_get_crypto().expect("AppSession::new() should always return Unlocked"),
|
||||||
&self.pool,
|
&self.pool,
|
||||||
@ -257,7 +258,7 @@ impl AppState {
|
|||||||
pub async fn get_aws_base(&self, name: &str) -> Result<AwsBaseCredential, GetCredentialsError> {
|
pub async fn get_aws_base(&self, name: &str) -> Result<AwsBaseCredential, GetCredentialsError> {
|
||||||
let app_session = self.app_session.read().await;
|
let app_session = self.app_session.read().await;
|
||||||
let crypto = app_session.try_get_crypto()?;
|
let crypto = app_session.try_get_crypto()?;
|
||||||
let creds = AwsBaseCredential::load_by_name(name, crypto, &self.pool).await?;
|
let creds = AwsBaseCredential::load(name, crypto, &self.pool).await?;
|
||||||
Ok(creds)
|
Ok(creds)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,7 +345,12 @@ mod tests {
|
|||||||
state.delete_credential(&id).await.unwrap();
|
state.delete_credential(&id).await.unwrap();
|
||||||
|
|
||||||
// ensure delete-cascade went through correctly
|
// ensure delete-cascade went through correctly
|
||||||
let res = AwsBaseCredential::load(&id, &Crypto::fixed(), &state.pool).await;
|
let res = AwsBaseCredential::load(
|
||||||
|
"test",
|
||||||
|
&Crypto::fixed(),
|
||||||
|
&state.pool,
|
||||||
|
).await;
|
||||||
|
|
||||||
assert!(matches!(res, Err(LoadCredentialsError::NoCredentials)));
|
assert!(matches!(res, Err(LoadCredentialsError::NoCredentials)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,22 +7,15 @@ import { getVersion } from '@tauri-apps/api/app';
|
|||||||
import { appState, acceptRequest, cleanupRequest } from './lib/state.js';
|
import { appState, acceptRequest, cleanupRequest } from './lib/state.js';
|
||||||
import { views, currentView, navigate } from './lib/routing.js';
|
import { views, currentView, navigate } from './lib/routing.js';
|
||||||
|
|
||||||
import Approve from './views/Approve.svelte';
|
|
||||||
import CreatePassphrase from './views/CreatePassphrase.svelte';
|
|
||||||
import Unlock from './views/Unlock.svelte';
|
|
||||||
|
|
||||||
// set up app state
|
$views = import.meta.glob('./views/*.svelte', {eager: true});
|
||||||
|
navigate('Home');
|
||||||
|
|
||||||
invoke('get_config').then(config => $appState.config = config);
|
invoke('get_config').then(config => $appState.config = config);
|
||||||
invoke('get_session_status').then(status => $appState.sessionStatus = status);
|
invoke('get_session_status').then(status => $appState.credentialStatus = status);
|
||||||
getVersion().then(version => $appState.appVersion = version);
|
getVersion().then(version => $appState.appVersion = version);
|
||||||
invoke('get_setup_errors')
|
|
||||||
.then(errs => {
|
|
||||||
$appState.setupErrors = errs.map(e => ({msg: e, show: true}));
|
|
||||||
});
|
|
||||||
|
|
||||||
|
listen('credentials-request', (tauriEvent) => {
|
||||||
// set up event handlers
|
|
||||||
listen('credential-request', (tauriEvent) => {
|
|
||||||
$appState.pendingRequests.put(tauriEvent.payload);
|
$appState.pendingRequests.put(tauriEvent.payload);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -36,17 +29,29 @@ listen('request-cancelled', (tauriEvent) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
listen('locked', () => {
|
listen('launch-terminal-request', async (tauriEvent) => {
|
||||||
$appState.sessionStatus = 'locked';
|
if ($appState.currentRequest === null) {
|
||||||
|
let status = await invoke('get_session_status');
|
||||||
|
if (status === 'locked') {
|
||||||
|
navigate('Unlock');
|
||||||
|
}
|
||||||
|
else if (status === 'empty') {
|
||||||
|
navigate('EnterCredentials');
|
||||||
|
}
|
||||||
|
// else, session is unlocked, so do nothing
|
||||||
|
// (although we shouldn't even get the event in that case)
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
listen('locked', () => {
|
||||||
|
$appState.credentialStatus = 'locked';
|
||||||
|
});
|
||||||
|
|
||||||
// set up navigation
|
invoke('get_setup_errors')
|
||||||
$views = import.meta.glob('./views/*.svelte', {eager: true});
|
.then(errs => {
|
||||||
navigate('Home');
|
$appState.setupErrors = errs.map(e => ({msg: e, show: true}));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// ready to rock and roll
|
|
||||||
acceptRequest();
|
acceptRequest();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -56,17 +61,4 @@ acceptRequest();
|
|||||||
on:keydown={() => invoke('signal_activity')}
|
on:keydown={() => invoke('signal_activity')}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
{#if $appState.sessionStatus === 'empty'}
|
|
||||||
<!-- Empty state (no passphrase) takes precedence over everything -->
|
|
||||||
<CreatePassphrase />
|
|
||||||
{:else if $appState.currentRequest !== null}
|
|
||||||
<!-- if a request is pending, show approval flow (will include unlock if necessary) -->
|
|
||||||
<Approve />
|
|
||||||
{:else if $appState.sessionStatus === 'locked'}
|
|
||||||
<!-- if session is locked and no request is pending, show unlock screen -->
|
|
||||||
<Unlock />
|
|
||||||
{:else}
|
|
||||||
<!-- normal operation -->
|
|
||||||
<svelte:component this="{$currentView}" />
|
<svelte:component this="{$currentView}" />
|
||||||
{/if}
|
|
||||||
|
@ -7,7 +7,7 @@ import { navigate, currentView, previousView } from './routing.js';
|
|||||||
export let appState = writable({
|
export let appState = writable({
|
||||||
currentRequest: null,
|
currentRequest: null,
|
||||||
pendingRequests: queue(),
|
pendingRequests: queue(),
|
||||||
sessionStatus: 'locked',
|
credentialStatus: 'locked',
|
||||||
setupErrors: [],
|
setupErrors: [],
|
||||||
appVersion: '',
|
appVersion: '',
|
||||||
});
|
});
|
||||||
@ -25,11 +25,11 @@ export async function acceptRequest() {
|
|||||||
|
|
||||||
|
|
||||||
export function cleanupRequest() {
|
export function cleanupRequest() {
|
||||||
currentView.set(get(previousView));
|
|
||||||
previousView.set(null);
|
|
||||||
appState.update($appState => {
|
appState.update($appState => {
|
||||||
$appState.currentRequest = null;
|
$appState.currentRequest = null;
|
||||||
return $appState;
|
return $appState;
|
||||||
});
|
});
|
||||||
|
currentView.set(get(previousView));
|
||||||
|
previousView.set(null);
|
||||||
acceptRequest();
|
acceptRequest();
|
||||||
}
|
}
|
||||||
|
@ -52,10 +52,12 @@
|
|||||||
|
|
||||||
|
|
||||||
<div in:slide="{{duration: slideDuration}}" class="alert alert-error shadow-lg {animationClass} {extraClasses}">
|
<div in:slide="{{duration: slideDuration}}" class="alert alert-error shadow-lg {animationClass} {extraClasses}">
|
||||||
|
<div>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current flex-shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current flex-shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
||||||
<span>
|
<span>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
{#if $$slots.buttons}
|
{#if $$slots.buttons}
|
||||||
<div>
|
<div>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
let classes = "";
|
let classes = "";
|
||||||
export {classes as class};
|
export {classes as class};
|
||||||
|
|
||||||
$: svg = ICONS[`./icons/${name}.svelte`].default;
|
let svg = ICONS[`./icons/${name}.svelte`].default;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:component this={svg} class={classes} />
|
<svelte:component this={svg} class={classes} />
|
@ -31,7 +31,6 @@
|
|||||||
&& shift === event.shiftKey
|
&& shift === event.shiftKey
|
||||||
) {
|
) {
|
||||||
click();
|
click();
|
||||||
event.preventDefault();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
<script>
|
|
||||||
import Icon from './Icon.svelte';
|
|
||||||
|
|
||||||
export let value = '';
|
|
||||||
export let placeholder = '';
|
|
||||||
export let autofocus = false;
|
|
||||||
|
|
||||||
let show = false;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
|
||||||
button {
|
|
||||||
border: 1px solid oklch(var(--bc) / 0.2);
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="join w-full">
|
|
||||||
<input
|
|
||||||
type={show ? 'text' : 'password'}
|
|
||||||
{value} {placeholder} {autofocus}
|
|
||||||
on:input on:change on:focus on:blur
|
|
||||||
class="input input-bordered flex-grow join-item placeholder:text-gray-500"
|
|
||||||
on:input={e => value = e.target.value}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-ghost join-item swap swap-rotate"
|
|
||||||
class:swap-active={show}
|
|
||||||
on:click={() => show = !show}
|
|
||||||
>
|
|
||||||
<Icon
|
|
||||||
name="eye"
|
|
||||||
class="w-5 h-5 swap-off"
|
|
||||||
/>
|
|
||||||
<Icon
|
|
||||||
name="eye-slash"
|
|
||||||
class="w-5 h-5 swap-on"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
@ -1,9 +0,0 @@
|
|||||||
<script>
|
|
||||||
let classes = "";
|
|
||||||
export {classes as class};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class={classes}>
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88" />
|
|
||||||
</svg>
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
<script>
|
|
||||||
let classes = "";
|
|
||||||
export {classes as class};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class={classes}>
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
||||||
</svg>
|
|
@ -1,8 +0,0 @@
|
|||||||
<script>
|
|
||||||
let classes = '';
|
|
||||||
export {classes as class};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class={classes}>
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" />
|
|
||||||
</svg>
|
|
@ -1,9 +0,0 @@
|
|||||||
<script>
|
|
||||||
let classes = "";
|
|
||||||
export {classes as class};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class={classes}>
|
|
||||||
<path fill-rule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5Z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
<script>
|
|
||||||
let classes = '';
|
|
||||||
export {classes as class};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class={classes}>
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
|
|
||||||
</svg>
|
|
@ -1,23 +1,24 @@
|
|||||||
<script>
|
<script>
|
||||||
import { appState, cleanupRequest } from '../lib/state.js';
|
import { onMount } from 'svelte';
|
||||||
import { invoke } from '@tauri-apps/api/core';
|
import { invoke } from '@tauri-apps/api/core';
|
||||||
|
|
||||||
|
import { navigate } from '../lib/routing.js';
|
||||||
|
import { appState, cleanupRequest } from '../lib/state.js';
|
||||||
import ErrorAlert from '../ui/ErrorAlert.svelte';
|
import ErrorAlert from '../ui/ErrorAlert.svelte';
|
||||||
import CollectResponse from './approve/CollectResponse.svelte';
|
import Link from '../ui/Link.svelte';
|
||||||
import ShowResponse from './approve/ShowResponse.svelte';
|
import KeyCombo from '../ui/KeyCombo.svelte';
|
||||||
import Unlock from './Unlock.svelte';
|
|
||||||
|
|
||||||
|
|
||||||
// Extra 50ms so the window can finish disappearing before the redraw
|
// Send response to backend, display error if applicable
|
||||||
const rehideDelay = Math.min(5000, $appState.config.rehide_ms + 50);
|
|
||||||
|
|
||||||
let error, alert;
|
let error, alert;
|
||||||
let success = false;
|
async function respond() {
|
||||||
async function sendResponse() {
|
const response = {
|
||||||
|
id: $appState.currentRequest.id,
|
||||||
|
...$appState.currentRequest.response,
|
||||||
|
};
|
||||||
try {
|
try {
|
||||||
await invoke('respond', {response: $appState.currentRequest.response});
|
await invoke('respond', {response});
|
||||||
success = true;
|
navigate('ShowResponse');
|
||||||
window.setTimeout(cleanupRequest, rehideDelay);
|
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (error) {
|
if (error) {
|
||||||
@ -27,41 +28,118 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleResponse() {
|
// Approval has one of several outcomes depending on current credential state
|
||||||
if (
|
async function approve(base) {
|
||||||
$appState.sessionStatus === 'unlocked'
|
$appState.currentRequest.response = {approval: 'Approved', base};
|
||||||
|| $appState.currentRequest.response.approval === 'Denied'
|
let status = await invoke('get_session_status');
|
||||||
) {
|
if (status === 'unlocked') {
|
||||||
await sendResponse();
|
await respond();
|
||||||
|
}
|
||||||
|
else if (status === 'locked') {
|
||||||
|
navigate('Unlock');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
navigate('EnterCredentials');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Denial has only one
|
||||||
|
async function deny() {
|
||||||
|
$appState.currentRequest.response = {approval: 'Denied', base: false};
|
||||||
|
await respond();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extract executable name from full path
|
||||||
|
const client = $appState.currentRequest.client;
|
||||||
|
const m = client.exe?.match(/\/([^/]+?$)|\\([^\\]+?$)/);
|
||||||
|
const appName = m[1] || m[2];
|
||||||
|
|
||||||
|
// Executable paths can be long, so ensure they only break on \ or /
|
||||||
|
function breakPath(path) {
|
||||||
|
return path.replace(/(\\|\/)/g, '$1<wbr>');
|
||||||
|
}
|
||||||
|
|
||||||
|
// if the request has already been approved/denied, send response immediately
|
||||||
|
onMount(async () => {
|
||||||
|
if ($appState.currentRequest.response) {
|
||||||
|
await respond();
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
{#if success}
|
<!-- Don't render at all if we're just going to immediately proceed to the next screen -->
|
||||||
<!-- if we have successfully sent a response, show it -->
|
{#if error || !$appState.currentRequest?.response}
|
||||||
<ShowResponse />
|
|
||||||
{:else if !$appState.currentRequest?.response || error}
|
|
||||||
<!-- if there's no response, or if there was an error sending it, ask for response -->
|
|
||||||
<div class="flex flex-col space-y-4 p-4 m-auto max-w-xl h-screen items-center justify-center">
|
<div class="flex flex-col space-y-4 p-4 m-auto max-w-xl h-screen items-center justify-center">
|
||||||
{#if error}
|
{#if error}
|
||||||
<ErrorAlert bind:this={alert}>
|
<ErrorAlert bind:this={alert}>
|
||||||
{error.msg}
|
{error.msg}
|
||||||
<svelte:fragment slot="buttons">
|
<svelte:fragment slot="buttons">
|
||||||
<button class="btn btn-sm btn-alert-error" on:click={cleanupRequest}>Cancel</button>
|
<button class="btn btn-sm btn-alert-error" on:click={cleanupRequest}>Cancel</button>
|
||||||
<button class="btn btn-sm btn-alert-error" on:click={sendResponse}>Retry</button>
|
<button class="btn btn-sm btn-alert-error" on:click={respond}>Retry</button>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
</ErrorAlert>
|
</ErrorAlert>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<CollectResponse on:response={handleResponse} />
|
{#if $appState.currentRequest?.base}
|
||||||
|
<div class="alert alert-warning shadow-lg">
|
||||||
|
<div>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current flex-shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /></svg>
|
||||||
|
<span>
|
||||||
|
WARNING: This application is requesting your base AWS credentials.
|
||||||
|
These credentials are less secure than session credentials, since they don't expire automatically.
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<div class="space-y-1 mb-4">
|
||||||
|
<h2 class="text-xl font-bold">{appName ? `"${appName}"` : 'An appplication'} would like to access your AWS credentials.</h2>
|
||||||
|
|
||||||
|
<div class="grid grid-cols-[auto_1fr] gap-x-3">
|
||||||
|
<div class="text-right">Path:</div>
|
||||||
|
<code class="">{@html client.exe ? breakPath(client.exe) : 'Unknown'}</code>
|
||||||
|
<div class="text-right">PID:</div>
|
||||||
|
<code>{client.pid}</code>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-full grid grid-cols-[1fr_auto] items-center gap-y-6">
|
||||||
|
<!-- Don't display the option to approve with session credentials if base was specifically requested -->
|
||||||
|
{#if !$appState.currentRequest?.base}
|
||||||
|
<h3 class="font-semibold">
|
||||||
|
Approve with session credentials
|
||||||
|
</h3>
|
||||||
|
<Link target={() => approve(false)} hotkey="Enter" shift={true}>
|
||||||
|
<button class="w-full btn btn-success">
|
||||||
|
<KeyCombo keys={['Shift', 'Enter']} />
|
||||||
|
</button>
|
||||||
|
</Link>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<h3 class="font-semibold">
|
||||||
|
<span class="mr-2">
|
||||||
|
{#if $appState.currentRequest?.base}
|
||||||
|
Approve
|
||||||
|
{:else}
|
||||||
|
Approve with base credentials
|
||||||
|
{/if}
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
<Link target={() => approve(true)} hotkey="Enter" shift={true} ctrl={true}>
|
||||||
|
<button class="w-full btn btn-warning">
|
||||||
|
<KeyCombo keys={['Ctrl', 'Shift', 'Enter']} />
|
||||||
|
</button>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<h3 class="font-semibold">
|
||||||
|
<span class="mr-2">Deny</span>
|
||||||
|
</h3>
|
||||||
|
<Link target={deny} hotkey="Escape">
|
||||||
|
<button class="w-full btn btn-error">
|
||||||
|
<KeyCombo keys={['Esc']} />
|
||||||
|
</button>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else if $appState.sessionStatus === 'locked'}
|
|
||||||
<!-- if session is locked and we do have a response, we must be waiting for unlock -->
|
|
||||||
<Unlock on:unlocked={sendResponse} />
|
|
||||||
{:else}
|
|
||||||
<!-- failsafe sanity check -->
|
|
||||||
<ErrorAlert>
|
|
||||||
Something is wrong. This message should never show up during normal operation.
|
|
||||||
</ErrorAlert>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { navigate } from '../lib/routing.js';
|
|
||||||
|
|
||||||
import EnterPassphrase from './passphrase/EnterPassphrase.svelte';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="flex flex-col h-screen max-w-sm m-auto gap-y-8 justify-center">
|
|
||||||
<h1 class="text-2xl font-bold text-center">
|
|
||||||
Change passphrase
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<EnterPassphrase cancellable={true} on:save={() => navigate('Home')}/>
|
|
||||||
</div>
|
|
@ -1,21 +0,0 @@
|
|||||||
<script>
|
|
||||||
import EnterPassphrase from './passphrase/EnterPassphrase.svelte';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="flex flex-col h-screen max-w-lg m-auto justify-center">
|
|
||||||
<div class="space-y-8">
|
|
||||||
<h1 class="text-2xl font-bold text-center">Welcome to Creddy!</h1>
|
|
||||||
|
|
||||||
<div class="space-y-4">
|
|
||||||
<p> Create a passphrase to get started.</p>
|
|
||||||
|
|
||||||
<p>Please note that if you forget your passphrase, there is no way to recover
|
|
||||||
your stored credentials. You will have to start over with a new passphrase.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="max-w-sm mx-auto">
|
|
||||||
<EnterPassphrase />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -33,6 +33,7 @@
|
|||||||
saving = true;
|
saving = true;
|
||||||
await invoke('save_credentials', {credentials, passphrase});
|
await invoke('save_credentials', {credentials, passphrase});
|
||||||
emit('credentials-event', 'entered');
|
emit('credentials-event', 'entered');
|
||||||
|
$appState.credentialStatus = 'unlocked';
|
||||||
if ($appState.currentRequest) {
|
if ($appState.currentRequest) {
|
||||||
navigate('Approve');
|
navigate('Approve');
|
||||||
}
|
}
|
@ -8,21 +8,13 @@
|
|||||||
import Icon from '../ui/Icon.svelte';
|
import Icon from '../ui/Icon.svelte';
|
||||||
import Link from '../ui/Link.svelte';
|
import Link from '../ui/Link.svelte';
|
||||||
|
|
||||||
|
import vaultDoorSvg from '../assets/vault_door.svg?raw';
|
||||||
|
|
||||||
let launchBase = false;
|
let launchBase = false;
|
||||||
function launchTerminal() {
|
function launchTerminal() {
|
||||||
invoke('launch_terminal', {base: launchBase});
|
invoke('launch_terminal', {base: launchBase});
|
||||||
launchBase = false;
|
launchBase = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function lock() {
|
|
||||||
try {
|
|
||||||
await invoke('lock');
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@ -32,6 +24,15 @@
|
|||||||
|
|
||||||
<div class="flex flex-col h-screen items-center justify-center p-4 space-y-4">
|
<div class="flex flex-col h-screen items-center justify-center p-4 space-y-4">
|
||||||
<div class="flex flex-col items-center space-y-4">
|
<div class="flex flex-col items-center space-y-4">
|
||||||
|
{@html vaultDoorSvg}
|
||||||
|
{#if $appState.credentialStatus === 'locked'}
|
||||||
|
|
||||||
|
<h2 class="text-2xl font-bold">Creddy is locked</h2>
|
||||||
|
<Link target="Unlock" hotkey="Enter" class="w-64">
|
||||||
|
<button class="btn btn-primary w-full">Unlock</button>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
{:else if $appState.credentialStatus === 'unlocked'}
|
||||||
<h2 class="text-2xl font-bold">Waiting for requests</h2>
|
<h2 class="text-2xl font-bold">Waiting for requests</h2>
|
||||||
<button class="btn btn-primary w-full" on:click={launchTerminal}>
|
<button class="btn btn-primary w-full" on:click={launchTerminal}>
|
||||||
Launch Terminal
|
Launch Terminal
|
||||||
@ -40,15 +41,13 @@
|
|||||||
<span class="label-text">Launch with long-lived credentials</span>
|
<span class="label-text">Launch with long-lived credentials</span>
|
||||||
<input type="checkbox" class="checkbox checkbox-sm" bind:checked={launchBase}>
|
<input type="checkbox" class="checkbox checkbox-sm" bind:checked={launchBase}>
|
||||||
</label>
|
</label>
|
||||||
<button class="btn btn-primary w-full" on:click={lock}>
|
|
||||||
Lock Creddy
|
{:else if $appState.credentialStatus === 'empty'}
|
||||||
</button>
|
<h2 class="text-2xl font-bold">No credentials found</h2>
|
||||||
<Link target="ChangePassphrase" class="w-full">
|
<Link target="EnterCredentials" hotkey="Enter" class="w-64">
|
||||||
<button class="btn btn-primary w-full">Change passphrase</button>
|
<button class="btn btn-primary w-full">Enter Credentials</button>
|
||||||
</Link>
|
|
||||||
<Link target="ManageCredentials" class="w-full">
|
|
||||||
<button class="btn btn-primary w-full">Manage credentials</button>
|
|
||||||
</Link>
|
</Link>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { onMount } from 'svelte';
|
|
||||||
import { slide, fade } from 'svelte/transition';
|
|
||||||
import { invoke } from '@tauri-apps/api/core';
|
|
||||||
|
|
||||||
import AwsCredential from './credentials/AwsCredential.svelte';
|
|
||||||
import Icon from '../ui/Icon.svelte';
|
|
||||||
import Nav from '../ui/Nav.svelte';
|
|
||||||
|
|
||||||
let show = false;
|
|
||||||
|
|
||||||
let records = []
|
|
||||||
async function loadCreds() {
|
|
||||||
records = await invoke('list_credentials');
|
|
||||||
console.log(records);
|
|
||||||
}
|
|
||||||
onMount(loadCreds);
|
|
||||||
|
|
||||||
function newCred() {
|
|
||||||
console.log('hello!');
|
|
||||||
records.push({
|
|
||||||
id: crypto.randomUUID(),
|
|
||||||
name: '',
|
|
||||||
is_default: false,
|
|
||||||
credential: {type: 'AwsBase', AccessKeyId: '', SecretAccessKey: ''},
|
|
||||||
isNew: true,
|
|
||||||
});
|
|
||||||
records = records;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<Nav>
|
|
||||||
<h1 slot="title" class="text-2xl font-bold">Credentials</h1>
|
|
||||||
</Nav>
|
|
||||||
|
|
||||||
<div class="max-w-xl mx-auto flex flex-col gap-y-4 justify-center">
|
|
||||||
<div class="divider">
|
|
||||||
<h2 class="text-xl font-bold">AWS Access Keys</h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{#if records.length > 0}
|
|
||||||
<div class="rounded-box border-2 border-neutral-content/30 divide-y-2 divide-neutral-content/30">
|
|
||||||
{#each records as record (record.id)}
|
|
||||||
<AwsCredential {record} on:update={loadCreds} />
|
|
||||||
{/each}
|
|
||||||
</div>
|
|
||||||
<button class="btn btn-primary btn-wide mx-auto" on:click={newCred}>
|
|
||||||
<Icon name="plus-circle-mini" class="size-5" />
|
|
||||||
Add
|
|
||||||
</button>
|
|
||||||
{:else}
|
|
||||||
<div class="flex flex-col gap-6 items-center rounded-box border-2 border-dashed border-neutral-content/30 p-6">
|
|
||||||
<div>You have no saved AWS credentials.</div>
|
|
||||||
<button class="btn btn-primary btn-wide mx-auto" on:click={newCred}>
|
|
||||||
<Icon name="plus-circle-mini" />
|
|
||||||
Add
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
</div>
|
|
@ -38,7 +38,6 @@
|
|||||||
<h1 slot="title" class="text-2xl font-bold">Settings</h1>
|
<h1 slot="title" class="text-2xl font-bold">Settings</h1>
|
||||||
</Nav>
|
</Nav>
|
||||||
|
|
||||||
<form on:submit|preventDefault={save}>
|
|
||||||
<div class="max-w-lg mx-auto my-1.5 p-4 space-y-16">
|
<div class="max-w-lg mx-auto my-1.5 p-4 space-y-16">
|
||||||
<SettingsGroup name="General">
|
<SettingsGroup name="General">
|
||||||
<ToggleSetting title="Start on login" bind:value={config.start_on_login}>
|
<ToggleSetting title="Start on login" bind:value={config.start_on_login}>
|
||||||
@ -76,8 +75,8 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<Setting title="Update credentials">
|
<Setting title="Update credentials">
|
||||||
<Link slot="input" target="EnterAwsCredential">
|
<Link slot="input" target="EnterCredentials">
|
||||||
<button type="button" class="btn btn-sm btn-primary">Update</button>
|
<button class="btn btn-sm btn-primary">Update</button>
|
||||||
</Link>
|
</Link>
|
||||||
<svelte:fragment slot="description">
|
<svelte:fragment slot="description">
|
||||||
Update or re-enter your encrypted credentials.
|
Update or re-enter your encrypted credentials.
|
||||||
@ -87,6 +86,7 @@
|
|||||||
<FileSetting
|
<FileSetting
|
||||||
title="Terminal emulator"
|
title="Terminal emulator"
|
||||||
bind:value={config.terminal.exec}
|
bind:value={config.terminal.exec}
|
||||||
|
|
||||||
>
|
>
|
||||||
<svelte:fragment slot="description">
|
<svelte:fragment slot="description">
|
||||||
Choose your preferred terminal emulator (e.g. <code>gnome-terminal</code> or <code>wt.exe</code>.) May be an absolute path or an executable discoverable on <code>$PATH</code>.
|
Choose your preferred terminal emulator (e.g. <code>gnome-terminal</code> or <code>wt.exe</code>.) May be an absolute path or an executable discoverable on <code>$PATH</code>.
|
||||||
@ -109,7 +109,6 @@
|
|||||||
Creddy {$appState.appVersion}
|
Creddy {$appState.appVersion}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
|
|
||||||
{#if error}
|
{#if error}
|
||||||
<div transition:fly={{y: 100, easing: backInOut, duration: 400}} class="toast">
|
<div transition:fly={{y: 100, easing: backInOut, duration: 400}} class="toast">
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import { onMount } from 'svelte';
|
||||||
import { draw, fade } from 'svelte/transition';
|
import { draw, fade } from 'svelte/transition';
|
||||||
|
|
||||||
import { appState } from '../../lib/state.js';
|
import { appState, cleanupRequest } from '../lib/state.js';
|
||||||
|
|
||||||
let success = false;
|
let success = false;
|
||||||
let error = null;
|
let error = null;
|
||||||
@ -9,6 +10,14 @@
|
|||||||
let drawDuration = $appState.config.rehide_ms >= 750 ? 500 : 0;
|
let drawDuration = $appState.config.rehide_ms >= 750 ? 500 : 0;
|
||||||
let fadeDuration = drawDuration * 0.6;
|
let fadeDuration = drawDuration * 0.6;
|
||||||
let fadeDelay = drawDuration * 0.4;
|
let fadeDelay = drawDuration * 0.4;
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
window.setTimeout(
|
||||||
|
cleanupRequest,
|
||||||
|
// Extra 50ms so the window can finish disappearing before the redraw
|
||||||
|
Math.min(5000, $appState.config.rehide_ms + 50),
|
||||||
|
)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -1,32 +1,39 @@
|
|||||||
<script>
|
<script>
|
||||||
import { invoke } from '@tauri-apps/api/core';
|
import { invoke } from '@tauri-apps/api/core';
|
||||||
import { emit } from '@tauri-apps/api/event';
|
import { emit } from '@tauri-apps/api/event';
|
||||||
import { onMount, createEventDispatcher } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
|
|
||||||
import { appState } from '../lib/state.js';
|
import { appState } from '../lib/state.js';
|
||||||
import { navigate } from '../lib/routing.js';
|
import { navigate } from '../lib/routing.js';
|
||||||
import { getRootCause } from '../lib/errors.js';
|
import { getRootCause } from '../lib/errors.js';
|
||||||
|
|
||||||
import ErrorAlert from '../ui/ErrorAlert.svelte';
|
import ErrorAlert from '../ui/ErrorAlert.svelte';
|
||||||
import Link from '../ui/Link.svelte';
|
import Link from '../ui/Link.svelte';
|
||||||
import PassphraseInput from '../ui/PassphraseInput.svelte';
|
|
||||||
import Spinner from '../ui/Spinner.svelte';
|
import Spinner from '../ui/Spinner.svelte';
|
||||||
import vaultDoorSvg from '../assets/vault_door.svg?raw';
|
|
||||||
|
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
|
||||||
|
|
||||||
let errorMsg = null;
|
let errorMsg = null;
|
||||||
let alert;
|
let alert;
|
||||||
let passphrase = '';
|
let passphrase = '';
|
||||||
|
let loadTime = 0;
|
||||||
let saving = false;
|
let saving = false;
|
||||||
async function unlock() {
|
async function unlock() {
|
||||||
|
// The hotkey for navigating here from homepage is Enter, which also
|
||||||
|
// happens to trigger the form submit event
|
||||||
|
if (Date.now() - loadTime < 10) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
saving = true;
|
saving = true;
|
||||||
let r = await invoke('unlock', {passphrase});
|
let r = await invoke('unlock', {passphrase});
|
||||||
$appState.sessionStatus = 'unlocked';
|
$appState.credentialStatus = 'unlocked';
|
||||||
emit('unlocked');
|
emit('credentials-event', 'unlocked');
|
||||||
dispatch('unlocked');
|
if ($appState.currentRequest) {
|
||||||
|
navigate('Approve');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
navigate('Home');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
const root = getRootCause(e);
|
const root = getRootCause(e);
|
||||||
@ -45,28 +52,34 @@
|
|||||||
saving = false;
|
saving = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cancel() {
|
||||||
|
emit('credentials-event', 'unlock-canceled');
|
||||||
|
if ($appState.currentRequest !== null) {
|
||||||
|
// dirty hack to prevent spurious error when returning to approve screen
|
||||||
|
delete $appState.currentRequest.response;
|
||||||
|
navigate('Approve');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
navigate('Home');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
loadTime = Date.now();
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<div class="fixed top-0 w-full p-2 text-center">
|
|
||||||
<h1 class="text-3xl font-bold">Creddy is locked</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form action="#" on:submit|preventDefault="{unlock}" class="form-control space-y-4 max-w-sm m-auto p-4 h-screen justify-center">
|
<form action="#" on:submit|preventDefault="{unlock}" class="form-control space-y-4 max-w-sm m-auto p-4 h-screen justify-center">
|
||||||
<div class="mx-auto">
|
<h2 class="font-bold text-2xl text-center">Enter your passphrase</h2>
|
||||||
{@html vaultDoorSvg}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<label class="space-y-4">
|
|
||||||
<h2 class="font-bold text-xl text-center">Please enter your passphrase</h2>
|
|
||||||
|
|
||||||
{#if errorMsg}
|
{#if errorMsg}
|
||||||
<ErrorAlert bind:this="{alert}">{errorMsg}</ErrorAlert>
|
<ErrorAlert bind:this="{alert}">{errorMsg}</ErrorAlert>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- svelte-ignore a11y-autofocus -->
|
<!-- svelte-ignore a11y-autofocus -->
|
||||||
<PassphraseInput autofocus="true" bind:value={passphrase} placeholder="correct horse battery staple" />
|
<input autofocus name="password" type="password" placeholder="correct horse battery staple" bind:value="{passphrase}" class="input input-bordered" />
|
||||||
</label>
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">
|
<button type="submit" class="btn btn-primary">
|
||||||
{#if saving}
|
{#if saving}
|
||||||
@ -75,4 +88,8 @@
|
|||||||
Submit
|
Submit
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<Link target={cancel} hotkey="Escape">
|
||||||
|
<button class="btn btn-sm btn-outline w-full">Cancel</button>
|
||||||
|
</Link>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,91 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { createEventDispatcher } from 'svelte';
|
|
||||||
import { appState, cleanupRequest } from '../../lib/state.js';
|
|
||||||
|
|
||||||
import Link from '../../ui/Link.svelte';
|
|
||||||
import KeyCombo from '../../ui/KeyCombo.svelte';
|
|
||||||
|
|
||||||
|
|
||||||
// Executable paths can be long, so ensure they only break on \ or /
|
|
||||||
function breakPath(path) {
|
|
||||||
return path.replace(/(\\|\/)/g, '$1<wbr>');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Extract executable name from full path
|
|
||||||
const client = $appState.currentRequest.client;
|
|
||||||
const m = client.exe?.match(/\/([^/]+?$)|\\([^\\]+?$)/);
|
|
||||||
const appName = m[1] || m[2];
|
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
|
||||||
|
|
||||||
function setResponse(approval, base) {
|
|
||||||
$appState.currentRequest.response = {
|
|
||||||
id: $appState.currentRequest.id,
|
|
||||||
approval,
|
|
||||||
base,
|
|
||||||
};
|
|
||||||
dispatch('response');
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
{#if $appState.currentRequest?.base}
|
|
||||||
<div class="alert alert-warning shadow-lg">
|
|
||||||
<div>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current flex-shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /></svg>
|
|
||||||
<span>
|
|
||||||
WARNING: This application is requesting your base AWS credentials.
|
|
||||||
These credentials are less secure than session credentials, since they don't expire automatically.
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div class="space-y-1 mb-4">
|
|
||||||
<h2 class="text-xl font-bold">{appName ? `"${appName}"` : 'An appplication'} would like to access your AWS credentials.</h2>
|
|
||||||
|
|
||||||
<div class="grid grid-cols-[auto_1fr] gap-x-3">
|
|
||||||
<div class="text-right">Path:</div>
|
|
||||||
<code class="">{@html client.exe ? breakPath(client.exe) : 'Unknown'}</code>
|
|
||||||
<div class="text-right">PID:</div>
|
|
||||||
<code>{client.pid}</code>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="w-full grid grid-cols-[1fr_auto] items-center gap-y-6">
|
|
||||||
<!-- Don't display the option to approve with session credentials if base was specifically requested -->
|
|
||||||
{#if !$appState.currentRequest?.base}
|
|
||||||
<h3 class="font-semibold">
|
|
||||||
Approve with session credentials
|
|
||||||
</h3>
|
|
||||||
<Link target={() => setResponse('Approved', false)} hotkey="Enter" shift={true}>
|
|
||||||
<button class="w-full btn btn-success">
|
|
||||||
<KeyCombo keys={['Shift', 'Enter']} />
|
|
||||||
</button>
|
|
||||||
</Link>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<h3 class="font-semibold">
|
|
||||||
<span class="mr-2">
|
|
||||||
{#if $appState.currentRequest?.base}
|
|
||||||
Approve
|
|
||||||
{:else}
|
|
||||||
Approve with base credentials
|
|
||||||
{/if}
|
|
||||||
</span>
|
|
||||||
</h3>
|
|
||||||
<Link target={() => setResponse('Approved', true)} hotkey="Enter" shift={true} ctrl={true}>
|
|
||||||
<button class="w-full btn btn-warning">
|
|
||||||
<KeyCombo keys={['Ctrl', 'Shift', 'Enter']} />
|
|
||||||
</button>
|
|
||||||
</Link>
|
|
||||||
|
|
||||||
<h3 class="font-semibold">
|
|
||||||
<span class="mr-2">Deny</span>
|
|
||||||
</h3>
|
|
||||||
<Link target={() => setResponse('Denied', false)} hotkey="Escape">
|
|
||||||
<button class="w-full btn btn-error">
|
|
||||||
<KeyCombo keys={['Esc']} />
|
|
||||||
</button>
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
@ -1,157 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { createEventDispatcher } from 'svelte';
|
|
||||||
import { fade, slide } from 'svelte/transition';
|
|
||||||
import { invoke } from '@tauri-apps/api/core';
|
|
||||||
|
|
||||||
import ErrorAlert from '../../ui/ErrorAlert.svelte';
|
|
||||||
import Icon from '../../ui/Icon.svelte';
|
|
||||||
|
|
||||||
export let record
|
|
||||||
|
|
||||||
import PassphraseInput from '../../ui/PassphraseInput.svelte';
|
|
||||||
|
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
|
||||||
|
|
||||||
// if record.credential is blank when component is first instantiated, this is
|
|
||||||
// a newly-added credential, so show details so that data can be filled out
|
|
||||||
let showDetails = record.isNew ? true : false;
|
|
||||||
|
|
||||||
let localName = name;
|
|
||||||
let local = JSON.parse(JSON.stringify(record));
|
|
||||||
$: isModified = JSON.stringify(local) !== JSON.stringify(record);
|
|
||||||
|
|
||||||
let error, alert;
|
|
||||||
async function saveCredential() {
|
|
||||||
try {
|
|
||||||
await invoke('save_credential', {cred: local});
|
|
||||||
dispatch('update');
|
|
||||||
showDetails = false;
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
if (error) alert.shake();
|
|
||||||
error = e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
let confirmDelete;
|
|
||||||
function conditionalDelete() {
|
|
||||||
if (!record.isNew) {
|
|
||||||
confirmDelete.showModal();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
deleteCredential();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function deleteCredential() {
|
|
||||||
try {
|
|
||||||
if (!record.isNew) {
|
|
||||||
|
|
||||||
await invoke('delete_credential', {id: record.id});
|
|
||||||
}
|
|
||||||
dispatch('update');
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
if (error) alert.shake();
|
|
||||||
error = e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<div transition:slide|local={{duration: record.isNew ? 300 : 0}} class="px-6 py-4 space-y-4">
|
|
||||||
<div class="flex items-center gap-x-4">
|
|
||||||
<h3 class="text-lg font-bold">{record.name}</h3>
|
|
||||||
|
|
||||||
{#if record.is_default}
|
|
||||||
<span class="badge badge-secondary">Default</span>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div class="join ml-auto">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-sm btn-primary join-item"
|
|
||||||
on:click={() => showDetails = !showDetails}
|
|
||||||
>
|
|
||||||
<Icon name="pencil" class="w-5 h-5" />
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-sm btn-error join-item"
|
|
||||||
on:click={conditionalDelete}
|
|
||||||
>
|
|
||||||
<Icon name="trash" class="w-5 h-5" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{#if showDetails}
|
|
||||||
{#if error}
|
|
||||||
<ErrorAlert bind:this={alert}>{error}</ErrorAlert>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<form
|
|
||||||
transition:slide|local={{duration: 200}}
|
|
||||||
class="space-y-4"
|
|
||||||
on:submit|preventDefault={saveCredential}
|
|
||||||
>
|
|
||||||
<div class="grid grid-cols-[auto_1fr] items-center gap-4">
|
|
||||||
{#if record.isNew}
|
|
||||||
<span class="justify-self-end">Name</span>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
class="input input-bordered"
|
|
||||||
bind:value={local.name}
|
|
||||||
>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<span class="justify-self-end">Key ID</span>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
class="input input-bordered font-mono"
|
|
||||||
bind:value={local.credential.AccessKeyId}
|
|
||||||
>
|
|
||||||
|
|
||||||
<span>Secret key</span>
|
|
||||||
<div class="font-mono">
|
|
||||||
<PassphraseInput bind:value={local.credential.SecretAccessKey} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex justify-between">
|
|
||||||
<label class="label cursor-pointer justify-self-start space-x-4">
|
|
||||||
<span class="label-text">Default for type</span>
|
|
||||||
<input type="checkbox" class="toggle toggle-secondary" bind:checked={local.is_default}>
|
|
||||||
</label>
|
|
||||||
{#if isModified}
|
|
||||||
<button
|
|
||||||
transition:fade={{duration: 100}}
|
|
||||||
type="submit"
|
|
||||||
class="btn btn-primary"
|
|
||||||
>
|
|
||||||
Save
|
|
||||||
</button>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<dialog bind:this={confirmDelete} class="modal">
|
|
||||||
<div class="modal-box">
|
|
||||||
<h3 class="text-lg font-bold">Delete AWS credential "{record.name}"?</h3>
|
|
||||||
<div class="modal-action">
|
|
||||||
<form method="dialog" class="flex gap-x-4">
|
|
||||||
<button class="btn btn-outline">Cancel</button>
|
|
||||||
<button
|
|
||||||
autofocus
|
|
||||||
class="btn btn-error"
|
|
||||||
on:click={deleteCredential}
|
|
||||||
>Delete</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</dialog>
|
|
||||||
</div>
|
|
@ -1,84 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { createEventDispatcher } from 'svelte';
|
|
||||||
import { invoke } from '@tauri-apps/api/core';
|
|
||||||
import { appState } from '../../lib/state.js';
|
|
||||||
|
|
||||||
import ErrorAlert from '../../ui/ErrorAlert.svelte';
|
|
||||||
import Link from '../../ui/Link.svelte';
|
|
||||||
import PassphraseInput from '../../ui/PassphraseInput.svelte';
|
|
||||||
import Spinner from '../../ui/Spinner.svelte';
|
|
||||||
|
|
||||||
export let cancellable = false;
|
|
||||||
|
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
|
||||||
|
|
||||||
let alert, saving;
|
|
||||||
let passphrase = '';
|
|
||||||
let confirmPassphrase = '';
|
|
||||||
let error = null;
|
|
||||||
|
|
||||||
function confirm() {
|
|
||||||
if (passphrase !== confirmPassphrase) {
|
|
||||||
error = 'Passphrases do not match.';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function save() {
|
|
||||||
if (passphrase === '' || passphrase !== confirmPassphrase) {
|
|
||||||
alert.shake();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
saving = true;
|
|
||||||
try {
|
|
||||||
await invoke('set_passphrase', {passphrase});
|
|
||||||
$appState.sessionStatus = 'unlocked';
|
|
||||||
dispatch('save');
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
if (error) alert.shake();
|
|
||||||
error = e;
|
|
||||||
}
|
|
||||||
saving = false;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<form class="form-control gap-y-4" on:submit|preventDefault={save}>
|
|
||||||
{#if error}
|
|
||||||
<ErrorAlert bind:this={alert}>{error}</ErrorAlert>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<label class="form-control w-full">
|
|
||||||
<div class="label">
|
|
||||||
<span class="label-text">Passphrase</span>
|
|
||||||
</div>
|
|
||||||
<PassphraseInput bind:value={passphrase} placeholder="correct horse battery staple" />
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label class="form-control w-full">
|
|
||||||
<div class="label">
|
|
||||||
<span class="label-text">Re-enter passphrase</span>
|
|
||||||
</div>
|
|
||||||
<PassphraseInput
|
|
||||||
bind:value={confirmPassphrase}
|
|
||||||
placeholder="correct horse battery staple"
|
|
||||||
on:change={confirm}
|
|
||||||
/>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">
|
|
||||||
{#if saving}
|
|
||||||
<Spinner class="w-5 h-5" thickness="12"/>
|
|
||||||
{:else}
|
|
||||||
Submit
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
{#if cancellable}
|
|
||||||
<Link target="Home" hotkey="Escape">
|
|
||||||
<button type="button" class="btn btn-outline btn-sm w-full">Cancel</button>
|
|
||||||
</Link>
|
|
||||||
{/if}
|
|
||||||
</form>
|
|
@ -10,23 +10,4 @@ module.exports = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
require('daisyui'),
|
require('daisyui'),
|
||||||
],
|
],
|
||||||
daisyui: {
|
|
||||||
themes: [
|
|
||||||
{
|
|
||||||
creddy: {
|
|
||||||
"primary": "#115e59",
|
|
||||||
"secondary": "#8b5cf6",
|
|
||||||
"accent": "#0ea5e9",
|
|
||||||
"neutral": "#2f292c",
|
|
||||||
"base-100": "#252e3a",
|
|
||||||
"info": "#3aa8ff",
|
|
||||||
"success": "#52bf73",
|
|
||||||
"warning": "#d97706",
|
|
||||||
"error": "#f87171",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"dark",
|
|
||||||
"light"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user