-
-
-
-
-
+
+
+
+ Egzamin teorytyczny
+ {{ examStore.category }}
+ {{ points }}
+ {{ resultTrueFalse }}
+
+
+
+
+
+
+
+
+
+
+ {{ points }}
+ {{ resultTrueFalse }}
+
-
-
- {{ points }}
- {{ resultTrueFalse }}
-
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f24e149..af1dd98 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -8,12 +8,15 @@ importers:
.:
dependencies:
+ '@libsql/client':
+ specifier: ^0.15.15
+ version: 0.15.15
'@nuxt/fonts':
specifier: 0.11.1
- version: 0.11.1(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)(magicast@0.3.5)(vite@6.2.6(@types/node@22.14.1)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))
+ version: 0.11.1(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)(magicast@0.3.5)(vite@6.2.6(@types/node@22.14.1)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))
'@nuxt/image':
specifier: 1.10.0
- version: 1.10.0(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)(magicast@0.3.5)
+ version: 1.10.0(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)(magicast@0.3.5)
'@nuxtjs/tailwindcss':
specifier: 6.13.2
version: 6.13.2(magicast@0.3.5)
@@ -24,8 +27,8 @@ importers:
specifier: ^3.0.0
version: 3.0.0
daisyui:
- specifier: ^5.0.23
- version: 5.0.23
+ specifier: ^5.0.27
+ version: 5.2.3
date-fns:
specifier: ^4.1.0
version: 4.1.0
@@ -37,7 +40,7 @@ importers:
version: 0.31.0
drizzle-orm:
specifier: ^0.42.0
- version: 0.42.0(@types/pg@8.11.13)(pg@8.14.1)
+ version: 0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)
eslint:
specifier: ^9.24.0
version: 9.24.0(jiti@2.4.2)
@@ -46,13 +49,13 @@ importers:
version: 4.17.21
nuxt:
specifier: ~3.16.2
- version: 3.16.2(@parcel/watcher@2.5.1)(@types/node@22.14.1)(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1))(eslint@9.24.0(jiti@2.4.2))(ioredis@5.6.1)(lightningcss@1.29.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.40.0)(terser@5.39.0)(tsx@4.19.3)(typescript@5.8.3)(vite@6.2.6(@types/node@22.14.1)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(yaml@2.7.1)
- pg:
- specifier: ^8.14.1
- version: 8.14.1
+ version: 3.16.2(@libsql/client@0.15.15)(@parcel/watcher@2.5.1)(@types/node@22.14.1)(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1))(eslint@9.24.0(jiti@2.4.2))(ioredis@5.6.1)(lightningcss@1.29.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.40.0)(terser@5.39.0)(tsx@4.19.3)(typescript@5.8.3)(vite@6.2.6(@types/node@22.14.1)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(yaml@2.7.1)
pinia:
specifier: ^3.0.2
version: 3.0.2(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3))
+ pinia-plugin-persistedstate:
+ specifier: ^4.7.1
+ version: 4.7.1(@nuxt/kit@3.16.2(magicast@0.3.5))(@pinia/nuxt@0.11.0(magicast@0.3.5)(pinia@3.0.2(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3))))(pinia@3.0.2(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3)))
ufo:
specifier: ^1.6.1
version: 1.6.1
@@ -69,9 +72,6 @@ importers:
'@types/lodash':
specifier: ^4.17.16
version: 4.17.16
- '@types/pg':
- specifier: ^8.11.13
- version: 8.11.13
eslint-config-prettier:
specifier: ^10.1.2
version: 10.1.2(eslint@9.24.0(jiti@2.4.2))
@@ -678,6 +678,67 @@ packages:
'@kwsites/promise-deferred@1.1.1':
resolution: {integrity: sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==}
+ '@libsql/client@0.15.15':
+ resolution: {integrity: sha512-twC0hQxPNHPKfeOv3sNT6u2pturQjLcI+CnpTM0SjRpocEGgfiZ7DWKXLNnsothjyJmDqEsBQJ5ztq9Wlu470w==}
+
+ '@libsql/core@0.15.15':
+ resolution: {integrity: sha512-C88Z6UKl+OyuKKPwz224riz02ih/zHYI3Ho/LAcVOgjsunIRZoBw7fjRfaH9oPMmSNeQfhGklSG2il1URoOIsA==}
+
+ '@libsql/darwin-arm64@0.5.22':
+ resolution: {integrity: sha512-4B8ZlX3nIDPndfct7GNe0nI3Yw6ibocEicWdC4fvQbSs/jdq/RC2oCsoJxJ4NzXkvktX70C1J4FcmmoBy069UA==}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@libsql/darwin-x64@0.5.22':
+ resolution: {integrity: sha512-ny2HYWt6lFSIdNFzUFIJ04uiW6finXfMNJ7wypkAD8Pqdm6nAByO+Fdqu8t7sD0sqJGeUCiOg480icjyQ2/8VA==}
+ cpu: [x64]
+ os: [darwin]
+
+ '@libsql/hrana-client@0.7.0':
+ resolution: {integrity: sha512-OF8fFQSkbL7vJY9rfuegK1R7sPgQ6kFMkDamiEccNUvieQ+3urzfDFI616oPl8V7T9zRmnTkSjMOImYCAVRVuw==}
+
+ '@libsql/isomorphic-fetch@0.3.1':
+ resolution: {integrity: sha512-6kK3SUK5Uu56zPq/Las620n5aS9xJq+jMBcNSOmjhNf/MUvdyji4vrMTqD7ptY7/4/CAVEAYDeotUz60LNQHtw==}
+ engines: {node: '>=18.0.0'}
+
+ '@libsql/isomorphic-ws@0.1.5':
+ resolution: {integrity: sha512-DtLWIH29onUYR00i0GlQ3UdcTRC6EP4u9w/h9LxpUZJWRMARk6dQwZ6Jkd+QdwVpuAOrdxt18v0K2uIYR3fwFg==}
+
+ '@libsql/linux-arm-gnueabihf@0.5.22':
+ resolution: {integrity: sha512-3Uo3SoDPJe/zBnyZKosziRGtszXaEtv57raWrZIahtQDsjxBVjuzYQinCm9LRCJCUT5t2r5Z5nLDPJi2CwZVoA==}
+ cpu: [arm]
+ os: [linux]
+
+ '@libsql/linux-arm-musleabihf@0.5.22':
+ resolution: {integrity: sha512-LCsXh07jvSojTNJptT9CowOzwITznD+YFGGW+1XxUr7fS+7/ydUrpDfsMX7UqTqjm7xG17eq86VkWJgHJfvpNg==}
+ cpu: [arm]
+ os: [linux]
+
+ '@libsql/linux-arm64-gnu@0.5.22':
+ resolution: {integrity: sha512-KSdnOMy88c9mpOFKUEzPskSaF3VLflfSUCBwas/pn1/sV3pEhtMF6H8VUCd2rsedwoukeeCSEONqX7LLnQwRMA==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@libsql/linux-arm64-musl@0.5.22':
+ resolution: {integrity: sha512-mCHSMAsDTLK5YH//lcV3eFEgiR23Ym0U9oEvgZA0667gqRZg/2px+7LshDvErEKv2XZ8ixzw3p1IrBzLQHGSsw==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@libsql/linux-x64-gnu@0.5.22':
+ resolution: {integrity: sha512-kNBHaIkSg78Y4BqAdgjcR2mBilZXs4HYkAmi58J+4GRwDQZh5fIUWbnQvB9f95DkWUIGVeenqLRFY2pcTmlsew==}
+ cpu: [x64]
+ os: [linux]
+
+ '@libsql/linux-x64-musl@0.5.22':
+ resolution: {integrity: sha512-UZ4Xdxm4pu3pQXjvfJiyCzZop/9j/eA2JjmhMaAhe3EVLH2g11Fy4fwyUp9sT1QJYR1kpc2JLuybPM0kuXv/Tg==}
+ cpu: [x64]
+ os: [linux]
+
+ '@libsql/win32-x64-msvc@0.5.22':
+ resolution: {integrity: sha512-Fj0j8RnBpo43tVZUVoNK6BV/9AtDUM5S7DF3LB4qTYg1LMSZqi3yeCneUTLJD6XomQJlZzbI4mst89yspVSAnA==}
+ cpu: [x64]
+ os: [win32]
+
'@mapbox/node-pre-gyp@2.0.0':
resolution: {integrity: sha512-llMXd39jtP0HpQLVI37Bf1m2ADlEb35GYSh1SDSLsBhR+5iCxiNGlT31yqbNtVHygHAtMy6dWFERpU2JgufhPg==}
engines: {node: '>=18'}
@@ -686,6 +747,9 @@ packages:
'@napi-rs/wasm-runtime@0.2.8':
resolution: {integrity: sha512-OBlgKdX7gin7OIq4fadsjpg+cp2ZphvAIKucHsNfTdJiqdOmOEwQd/bHi0VwNrcw5xpBJyUw6cK/QilCqy1BSg==}
+ '@neon-rs/load@0.0.4':
+ resolution: {integrity: sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw==}
+
'@netlify/functions@3.0.4':
resolution: {integrity: sha512-Ox8+ABI+nsLK+c4/oC5dpquXuEIjzfTlJrdQKgQijCsDQoje7inXFAtKDLvvaGvuvE+PVpMLwQcIUL6P9Ob1hQ==}
engines: {node: '>=18.0.0'}
@@ -1209,6 +1273,9 @@ packages:
'@types/resolve@1.20.2':
resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}
+ '@types/ws@8.18.1':
+ resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==}
+
'@typescript-eslint/eslint-plugin@8.30.1':
resolution: {integrity: sha512-v+VWphxMjn+1t48/jO4t950D6KR8JaJuNXzi33Ve6P8sEmPr5k6CEXjdGwT6+LodVnEa91EQCtwjWNUCPweo+Q==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -1911,8 +1978,12 @@ packages:
csstype@3.1.3:
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
- daisyui@5.0.23:
- resolution: {integrity: sha512-SIR8yAneeNxvrpaR5kREG1DrPK8XFyfmyvqyZEUTJ2e6tv4Pp56/w+52Vdv34hmSmtAyDldTCEPWx+GvPyp0Yg==}
+ daisyui@5.2.3:
+ resolution: {integrity: sha512-sldBQUIFCsSPoF4LvoHhIi9GnvBX/3aZD9NoTOvpTSX8sDjO484wQx7yEvRyREMpn4rZMvQSKKskHAHdM8+B4Q==}
+
+ data-uri-to-buffer@4.0.1:
+ resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==}
+ engines: {node: '>= 12'}
date-fns@4.1.0:
resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==}
@@ -2021,6 +2092,10 @@ packages:
engines: {node: '>=0.10'}
hasBin: true
+ detect-libc@2.0.2:
+ resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==}
+ engines: {node: '>=8'}
+
detect-libc@2.0.3:
resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==}
engines: {node: '>=8'}
@@ -2423,6 +2498,10 @@ packages:
picomatch:
optional: true
+ fetch-blob@3.2.0:
+ resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==}
+ engines: {node: ^12.20 || >= 14.13}
+
file-entry-cache@8.0.0:
resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==}
engines: {node: '>=16.0.0'}
@@ -2463,6 +2542,10 @@ packages:
resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}
engines: {node: '>=14'}
+ formdata-polyfill@4.0.10:
+ resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==}
+ engines: {node: '>=12.20.0'}
+
fraction.js@4.3.7:
resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==}
@@ -2819,6 +2902,9 @@ packages:
resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==}
hasBin: true
+ js-base64@3.7.8:
+ resolution: {integrity: sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow==}
+
js-tokens@4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
@@ -2915,6 +3001,10 @@ packages:
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
engines: {node: '>= 0.8.0'}
+ libsql@0.5.22:
+ resolution: {integrity: sha512-NscWthMQt7fpU8lqd7LXMvT9pi+KhhmTHAJWUB/Lj6MWa0MKFv0F2V4C6WKKpjCVZl0VwcDz4nOI3CyaT1DDiA==}
+ os: [darwin, linux, win32]
+
lightningcss-darwin-arm64@1.29.2:
resolution: {integrity: sha512-cK/eMabSViKn/PG8U/a7aCorpeKLMlK0bQeNHmdb7qUnBkNPnL+oV5DjJUo0kqWsJUapZsM4jCfYItbqBDvlcA==}
engines: {node: '>= 12.0.0'}
@@ -3209,6 +3299,11 @@ packages:
node-addon-api@7.1.1:
resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==}
+ node-domexception@1.0.0:
+ resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
+ engines: {node: '>=10.5.0'}
+ deprecated: Use your platform's native DOMException instead
+
node-fetch-native@1.6.6:
resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==}
@@ -3221,6 +3316,10 @@ packages:
encoding:
optional: true
+ node-fetch@3.3.2:
+ resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+
node-forge@1.3.1:
resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==}
engines: {node: '>= 6.13.0'}
@@ -3490,6 +3589,20 @@ packages:
resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==}
engines: {node: '>=0.10.0'}
+ pinia-plugin-persistedstate@4.7.1:
+ resolution: {integrity: sha512-WHOqh2esDlR3eAaknPbqXrkkj0D24h8shrDPqysgCFR6ghqP/fpFfJmMPJp0gETHsvrh9YNNg6dQfo2OEtDnIQ==}
+ peerDependencies:
+ '@nuxt/kit': '>=3.0.0'
+ '@pinia/nuxt': '>=0.10.0'
+ pinia: '>=3.0.0'
+ peerDependenciesMeta:
+ '@nuxt/kit':
+ optional: true
+ '@pinia/nuxt':
+ optional: true
+ pinia:
+ optional: true
+
pinia@3.0.2:
resolution: {integrity: sha512-sH2JK3wNY809JOeiiURUR0wehJ9/gd9qFN2Y828jCbxEzKEmEt0pzCXwqiSTfuRsK9vQsOflSdnbdBOGrhtn+g==}
peerDependencies:
@@ -3790,6 +3903,9 @@ packages:
resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==}
engines: {node: '>= 0.6.0'}
+ promise-limit@2.7.0:
+ resolution: {integrity: sha512-7nJ6v5lnJsXwGprnGXga4wx6d1POjvi5Qmf1ivTRxTjH4Z/9Czja/UCMLVmB9N93GeWOU93XaFaEt6jbuoagNw==}
+
prompts@2.4.2:
resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==}
engines: {node: '>= 6'}
@@ -4625,6 +4741,10 @@ packages:
typescript:
optional: true
+ web-streams-polyfill@3.3.3:
+ resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==}
+ engines: {node: '>= 8'}
+
webidl-conversions@3.0.1:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
@@ -5273,6 +5393,68 @@ snapshots:
'@kwsites/promise-deferred@1.1.1': {}
+ '@libsql/client@0.15.15':
+ dependencies:
+ '@libsql/core': 0.15.15
+ '@libsql/hrana-client': 0.7.0
+ js-base64: 3.7.8
+ libsql: 0.5.22
+ promise-limit: 2.7.0
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
+
+ '@libsql/core@0.15.15':
+ dependencies:
+ js-base64: 3.7.8
+
+ '@libsql/darwin-arm64@0.5.22':
+ optional: true
+
+ '@libsql/darwin-x64@0.5.22':
+ optional: true
+
+ '@libsql/hrana-client@0.7.0':
+ dependencies:
+ '@libsql/isomorphic-fetch': 0.3.1
+ '@libsql/isomorphic-ws': 0.1.5
+ js-base64: 3.7.8
+ node-fetch: 3.3.2
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
+
+ '@libsql/isomorphic-fetch@0.3.1': {}
+
+ '@libsql/isomorphic-ws@0.1.5':
+ dependencies:
+ '@types/ws': 8.18.1
+ ws: 8.18.1
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
+
+ '@libsql/linux-arm-gnueabihf@0.5.22':
+ optional: true
+
+ '@libsql/linux-arm-musleabihf@0.5.22':
+ optional: true
+
+ '@libsql/linux-arm64-gnu@0.5.22':
+ optional: true
+
+ '@libsql/linux-arm64-musl@0.5.22':
+ optional: true
+
+ '@libsql/linux-x64-gnu@0.5.22':
+ optional: true
+
+ '@libsql/linux-x64-musl@0.5.22':
+ optional: true
+
+ '@libsql/win32-x64-msvc@0.5.22':
+ optional: true
+
'@mapbox/node-pre-gyp@2.0.0':
dependencies:
consola: 3.4.2
@@ -5293,6 +5475,8 @@ snapshots:
'@tybys/wasm-util': 0.9.0
optional: true
+ '@neon-rs/load@0.0.4': {}
+
'@netlify/functions@3.0.4':
dependencies:
'@netlify/serverless-functions-api': 1.36.0
@@ -5480,7 +5664,7 @@ snapshots:
- utf-8-validate
- vite
- '@nuxt/fonts@0.11.1(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)(magicast@0.3.5)(vite@6.2.6(@types/node@22.14.1)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))':
+ '@nuxt/fonts@0.11.1(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)(magicast@0.3.5)(vite@6.2.6(@types/node@22.14.1)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))':
dependencies:
'@nuxt/devtools-kit': 2.4.0(magicast@0.3.5)(vite@6.2.6(@types/node@22.14.1)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))
'@nuxt/kit': 3.16.2(magicast@0.3.5)
@@ -5501,7 +5685,7 @@ snapshots:
ufo: 1.6.1
unifont: 0.1.7
unplugin: 2.3.2
- unstorage: 1.15.0(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)
+ unstorage: 1.15.0(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)
transitivePeerDependencies:
- '@azure/app-configuration'
- '@azure/cosmos'
@@ -5525,7 +5709,7 @@ snapshots:
- uploadthing
- vite
- '@nuxt/image@1.10.0(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)(magicast@0.3.5)':
+ '@nuxt/image@1.10.0(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)(magicast@0.3.5)':
dependencies:
'@nuxt/kit': 3.16.2(magicast@0.3.5)
consola: 3.4.2
@@ -5538,7 +5722,7 @@ snapshots:
std-env: 3.9.0
ufo: 1.6.1
optionalDependencies:
- ipx: 2.1.0(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)
+ ipx: 2.1.0(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)
transitivePeerDependencies:
- '@azure/app-configuration'
- '@azure/cosmos'
@@ -5999,9 +6183,14 @@ snapshots:
'@types/node': 22.14.1
pg-protocol: 1.8.0
pg-types: 4.0.2
+ optional: true
'@types/resolve@1.20.2': {}
+ '@types/ws@8.18.1':
+ dependencies:
+ '@types/node': 22.14.1
+
'@typescript-eslint/eslint-plugin@8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)':
dependencies:
'@eslint-community/regexpp': 4.12.1
@@ -6791,13 +6980,16 @@ snapshots:
csstype@3.1.3: {}
- daisyui@5.0.23: {}
+ daisyui@5.2.3: {}
+
+ data-uri-to-buffer@4.0.1: {}
date-fns@4.1.0: {}
- db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)):
+ db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)):
optionalDependencies:
- drizzle-orm: 0.42.0(@types/pg@8.11.13)(pg@8.14.1)
+ '@libsql/client': 0.15.15
+ drizzle-orm: 0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)
debug@3.2.7:
dependencies:
@@ -6848,6 +7040,8 @@ snapshots:
detect-libc@1.0.3: {}
+ detect-libc@2.0.2: {}
+
detect-libc@2.0.3: {}
devalue@5.1.1: {}
@@ -6897,8 +7091,9 @@ snapshots:
transitivePeerDependencies:
- supports-color
- drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1):
+ drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1):
optionalDependencies:
+ '@libsql/client': 0.15.15
'@types/pg': 8.11.13
pg: 8.14.1
@@ -7267,6 +7462,11 @@ snapshots:
optionalDependencies:
picomatch: 4.0.2
+ fetch-blob@3.2.0:
+ dependencies:
+ node-domexception: 1.0.0
+ web-streams-polyfill: 3.3.3
+
file-entry-cache@8.0.0:
dependencies:
flat-cache: 4.0.1
@@ -7326,6 +7526,10 @@ snapshots:
cross-spawn: 7.0.6
signal-exit: 4.1.0
+ formdata-polyfill@4.0.10:
+ dependencies:
+ fetch-blob: 3.2.0
+
fraction.js@4.3.7: {}
fresh@0.5.2: {}
@@ -7585,7 +7789,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- ipx@2.1.0(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1):
+ ipx@2.1.0(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1):
dependencies:
'@fastify/accept-negotiator': 1.1.0
citty: 0.1.6
@@ -7601,7 +7805,7 @@ snapshots:
sharp: 0.32.6
svgo: 3.3.2
ufo: 1.6.1
- unstorage: 1.15.0(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)
+ unstorage: 1.15.0(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)
xss: 1.0.15
transitivePeerDependencies:
- '@azure/app-configuration'
@@ -7725,6 +7929,8 @@ snapshots:
jiti@2.4.2: {}
+ js-base64@3.7.8: {}
+
js-tokens@4.0.0: {}
js-tokens@9.0.1: {}
@@ -7838,6 +8044,21 @@ snapshots:
prelude-ls: 1.2.1
type-check: 0.4.0
+ libsql@0.5.22:
+ dependencies:
+ '@neon-rs/load': 0.0.4
+ detect-libc: 2.0.2
+ optionalDependencies:
+ '@libsql/darwin-arm64': 0.5.22
+ '@libsql/darwin-x64': 0.5.22
+ '@libsql/linux-arm-gnueabihf': 0.5.22
+ '@libsql/linux-arm-musleabihf': 0.5.22
+ '@libsql/linux-arm64-gnu': 0.5.22
+ '@libsql/linux-arm64-musl': 0.5.22
+ '@libsql/linux-x64-gnu': 0.5.22
+ '@libsql/linux-x64-musl': 0.5.22
+ '@libsql/win32-x64-msvc': 0.5.22
+
lightningcss-darwin-arm64@1.29.2:
optional: true
@@ -8075,7 +8296,7 @@ snapshots:
negotiator@0.6.3: {}
- nitropack@2.11.9(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)):
+ nitropack@2.11.9(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)):
dependencies:
'@cloudflare/kv-asset-handler': 0.4.0
'@netlify/functions': 3.0.4
@@ -8097,7 +8318,7 @@ snapshots:
cookie-es: 2.0.0
croner: 9.0.0
crossws: 0.3.4
- db0: 0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1))
+ db0: 0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1))
defu: 6.1.4
destr: 2.0.5
dot-prop: 9.0.0
@@ -8143,7 +8364,7 @@ snapshots:
unenv: 2.0.0-rc.15
unimport: 5.0.0
unplugin-utils: 0.2.4
- unstorage: 1.15.0(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)
+ unstorage: 1.15.0(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)
untyped: 2.0.0
unwasm: 0.3.9
youch: 4.1.0-beta.7
@@ -8185,12 +8406,20 @@ snapshots:
node-addon-api@7.1.1: {}
+ node-domexception@1.0.0: {}
+
node-fetch-native@1.6.6: {}
node-fetch@2.7.0:
dependencies:
whatwg-url: 5.0.0
+ node-fetch@3.3.2:
+ dependencies:
+ data-uri-to-buffer: 4.0.1
+ fetch-blob: 3.2.0
+ formdata-polyfill: 4.0.10
+
node-forge@1.3.1: {}
node-gyp-build@4.8.4: {}
@@ -8226,7 +8455,7 @@ snapshots:
dependencies:
boolbase: 1.0.0
- nuxt@3.16.2(@parcel/watcher@2.5.1)(@types/node@22.14.1)(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1))(eslint@9.24.0(jiti@2.4.2))(ioredis@5.6.1)(lightningcss@1.29.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.40.0)(terser@5.39.0)(tsx@4.19.3)(typescript@5.8.3)(vite@6.2.6(@types/node@22.14.1)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(yaml@2.7.1):
+ nuxt@3.16.2(@libsql/client@0.15.15)(@parcel/watcher@2.5.1)(@types/node@22.14.1)(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1))(eslint@9.24.0(jiti@2.4.2))(ioredis@5.6.1)(lightningcss@1.29.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.40.0)(terser@5.39.0)(tsx@4.19.3)(typescript@5.8.3)(vite@6.2.6(@types/node@22.14.1)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(yaml@2.7.1):
dependencies:
'@nuxt/cli': 3.24.1(magicast@0.3.5)
'@nuxt/devalue': 2.0.2
@@ -8263,7 +8492,7 @@ snapshots:
mlly: 1.7.4
mocked-exports: 0.1.1
nanotar: 0.2.0
- nitropack: 2.11.9(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1))
+ nitropack: 2.11.9(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1))
nypm: 0.6.0
ofetch: 1.4.1
ohash: 2.0.11
@@ -8285,7 +8514,7 @@ snapshots:
unimport: 4.2.0
unplugin: 2.3.2
unplugin-vue-router: 0.12.0(vue-router@4.5.0(vue@3.5.13(typescript@5.8.3)))(vue@3.5.13(typescript@5.8.3))
- unstorage: 1.15.0(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)
+ unstorage: 1.15.0(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1)
untyped: 2.0.0
vue: 3.5.13(typescript@5.8.3)
vue-bundle-renderer: 2.1.1
@@ -8359,7 +8588,8 @@ snapshots:
object-hash@3.0.0: {}
- obuf@1.1.2: {}
+ obuf@1.1.2:
+ optional: true
ofetch@1.4.1:
dependencies:
@@ -8511,17 +8741,22 @@ snapshots:
pg-cloudflare@1.1.1:
optional: true
- pg-connection-string@2.7.0: {}
+ pg-connection-string@2.7.0:
+ optional: true
- pg-int8@1.0.1: {}
+ pg-int8@1.0.1:
+ optional: true
- pg-numeric@1.0.2: {}
+ pg-numeric@1.0.2:
+ optional: true
pg-pool@3.8.0(pg@8.14.1):
dependencies:
pg: 8.14.1
+ optional: true
- pg-protocol@1.8.0: {}
+ pg-protocol@1.8.0:
+ optional: true
pg-types@2.2.0:
dependencies:
@@ -8530,6 +8765,7 @@ snapshots:
postgres-bytea: 1.0.0
postgres-date: 1.0.7
postgres-interval: 1.2.0
+ optional: true
pg-types@4.0.2:
dependencies:
@@ -8540,6 +8776,7 @@ snapshots:
postgres-date: 2.1.0
postgres-interval: 3.0.0
postgres-range: 1.1.4
+ optional: true
pg@8.14.1:
dependencies:
@@ -8550,10 +8787,12 @@ snapshots:
pgpass: 1.0.5
optionalDependencies:
pg-cloudflare: 1.1.1
+ optional: true
pgpass@1.0.5:
dependencies:
split2: 4.2.0
+ optional: true
picocolors@1.1.1: {}
@@ -8563,6 +8802,14 @@ snapshots:
pify@2.3.0: {}
+ pinia-plugin-persistedstate@4.7.1(@nuxt/kit@3.16.2(magicast@0.3.5))(@pinia/nuxt@0.11.0(magicast@0.3.5)(pinia@3.0.2(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3))))(pinia@3.0.2(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3))):
+ dependencies:
+ defu: 6.1.4
+ optionalDependencies:
+ '@nuxt/kit': 3.16.2(magicast@0.3.5)
+ '@pinia/nuxt': 0.11.0(magicast@0.3.5)(pinia@3.0.2(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3)))
+ pinia: 3.0.2(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3))
+
pinia@3.0.2(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3)):
dependencies:
'@vue/devtools-api': 7.7.2
@@ -8791,27 +9038,36 @@ snapshots:
picocolors: 1.1.1
source-map-js: 1.2.1
- postgres-array@2.0.0: {}
+ postgres-array@2.0.0:
+ optional: true
- postgres-array@3.0.4: {}
+ postgres-array@3.0.4:
+ optional: true
- postgres-bytea@1.0.0: {}
+ postgres-bytea@1.0.0:
+ optional: true
postgres-bytea@3.0.0:
dependencies:
obuf: 1.1.2
+ optional: true
- postgres-date@1.0.7: {}
+ postgres-date@1.0.7:
+ optional: true
- postgres-date@2.1.0: {}
+ postgres-date@2.1.0:
+ optional: true
postgres-interval@1.2.0:
dependencies:
xtend: 4.0.2
+ optional: true
- postgres-interval@3.0.0: {}
+ postgres-interval@3.0.0:
+ optional: true
- postgres-range@1.1.4: {}
+ postgres-range@1.1.4:
+ optional: true
prebuild-install@7.1.3:
dependencies:
@@ -8839,6 +9095,8 @@ snapshots:
process@0.11.10: {}
+ promise-limit@2.7.0: {}
+
prompts@2.4.2:
dependencies:
kleur: 3.0.3
@@ -9177,7 +9435,8 @@ snapshots:
speakingurl@14.0.1: {}
- split2@4.2.0: {}
+ split2@4.2.0:
+ optional: true
stable-hash@0.0.5: {}
@@ -9590,7 +9849,7 @@ snapshots:
'@unrs/resolver-binding-win32-ia32-msvc': 1.5.0
'@unrs/resolver-binding-win32-x64-msvc': 1.5.0
- unstorage@1.15.0(db0@0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1):
+ unstorage@1.15.0(db0@0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1)))(ioredis@5.6.1):
dependencies:
anymatch: 3.1.3
chokidar: 4.0.3
@@ -9601,7 +9860,7 @@ snapshots:
ofetch: 1.4.1
ufo: 1.6.1
optionalDependencies:
- db0: 0.3.1(drizzle-orm@0.42.0(@types/pg@8.11.13)(pg@8.14.1))
+ db0: 0.3.1(@libsql/client@0.15.15)(drizzle-orm@0.42.0(@libsql/client@0.15.15)(@types/pg@8.11.13)(pg@8.14.1))
ioredis: 5.6.1
untun@0.1.3:
@@ -9788,6 +10047,8 @@ snapshots:
optionalDependencies:
typescript: 5.8.3
+ web-streams-polyfill@3.3.3: {}
+
webidl-conversions@3.0.1: {}
webpack-virtual-modules@0.6.2: {}
@@ -9831,7 +10092,8 @@ snapshots:
cssfilter: 0.0.10
optional: true
- xtend@4.0.2: {}
+ xtend@4.0.2:
+ optional: true
y18n@5.0.8: {}
diff --git a/server/api/advanced.get.ts b/server/api/advanced.get.ts
index 61f3527..7046123 100644
--- a/server/api/advanced.get.ts
+++ b/server/api/advanced.get.ts
@@ -1,12 +1,8 @@
import 'dotenv/config';
-import { drizzle } from 'drizzle-orm/node-postgres';
+import { drizzle } from 'drizzle-orm/libsql';
import { sql, eq, and } from 'drizzle-orm';
import arrayShuffle from 'array-shuffle';
-import {
- tasks_advanced,
- questions_advanced,
- categories_db,
-} from '@/src/db/schema';
+import { tasks_advanced, questions_advanced, categories_db } from '~/db/schema';
import type { AdvancedQuestion } from '~/types';
import categories from '~/categories';
diff --git a/server/api/basic.get.ts b/server/api/basic.get.ts
index 603c3bd..1f2e564 100644
--- a/server/api/basic.get.ts
+++ b/server/api/basic.get.ts
@@ -1,8 +1,8 @@
import 'dotenv/config';
-import { drizzle } from 'drizzle-orm/node-postgres';
+import { drizzle } from 'drizzle-orm/libsql';
import { sql, eq, and } from 'drizzle-orm';
import arrayShuffle from 'array-shuffle';
-import { tasks, questions, categories_db } from '@/src/db/schema';
+import { tasks, questions, categories_db } from '~/db/schema';
import type { BasicQuestion } from '~/types';
import categories from '~/categories';
diff --git a/src/db/schema.ts b/src/db/schema.ts
deleted file mode 100644
index 2bd21ef..0000000
--- a/src/db/schema.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { integer, pgTable, text, smallint, char } from 'drizzle-orm/pg-core';
-
-export const tasks = pgTable('tasks', {
- id: integer().notNull(),
- correct_answer: text(),
- media_url: text(),
- weight: smallint(),
-});
-
-export const questions = pgTable('questions', {
- task_id: integer(),
- lang: char({ length: 2 }),
- text: text(),
-});
-
-export const tasks_advanced = pgTable('tasks_advanced', {
- id: integer().notNull(),
- correct_answer: char({ length: 1 }),
- media_url: text(),
- weight: smallint(),
-});
-
-export const questions_advanced = pgTable('questions_advanced', {
- task_id: integer(),
- lang: char({ length: 2 }),
- text: text(),
- answer_a: text(),
- answer_b: text(),
- answer_c: text(),
-});
-
-export const categories_db = pgTable('categories', {
- name: text(),
- task_id: integer(),
-});
diff --git a/store/examStore.ts b/store/examStore.ts
index 59d685f..96a4c24 100644
--- a/store/examStore.ts
+++ b/store/examStore.ts
@@ -1,43 +1,60 @@
-import { defineStore } from 'pinia';
-
-export const useExamStore = defineStore('exam-store', () => {
- const category = ref('');
- const end = ref(false);
- const result: Ref
= ref({
- basic: [],
- advanced: [],
- });
- function resetExam() {
- category.value = '';
- mildReset();
- }
- function mildReset() {
- end.value = false;
- result.value = {
- basic: [],
- advanced: [],
- };
- }
- function setEnd(value: boolean) {
- end.value = value;
- return end.value;
- }
- function setCategory(value: string) {
- category.value = value;
- return category.value;
- }
- function setResult(value: ResultEndType) {
- result.value = value;
- return result.value;
- }
- return {
- category,
- end,
- result,
- resetExam,
- mildReset,
- setEnd,
- setCategory,
- setResult,
- };
+export const useBasicStore = defineStore('basicStore', {
+ state: () => ({
+ basic: [] as ResultType[],
+ }),
+ actions: {
+ async set(basic: ResultType[]) {
+ this.basic = basic;
+ },
+ },
+ persist: {
+ storage: piniaPluginPersistedstate.localStorage(),
+ },
+});
+
+export const useAdvancedStore = defineStore('advancedStore', {
+ state: () => ({
+ advanced: [] as ResultType[],
+ }),
+ actions: {
+ async set(advanced: ResultType[]) {
+ this.advanced = advanced;
+ },
+ },
+ persist: {
+ storage: piniaPluginPersistedstate.localStorage(),
+ },
+});
+
+export const useExamStore = defineStore('examStore', {
+ state: () => ({
+ category: '',
+ end: false,
+ }),
+ actions: {
+ async setCategory(category: string) {
+ this.category = category;
+ },
+ async setEnd(end: boolean) {
+ this.end = end;
+ },
+ async setBasic(basic: ResultType[]) {
+ useBasicStore().set(basic);
+ },
+ async setAdvanced(advanced: ResultType[]) {
+ useAdvancedStore().set(advanced);
+ },
+ async mildReset() {
+ this.end = false;
+ this.setBasic([]);
+ this.setAdvanced([]);
+ },
+ async resetExam() {
+ this.category = '';
+ this.mildReset();
+ },
+ },
+ persist: {
+ storage: piniaPluginPersistedstate.cookies(),
+ },
});
diff --git a/types/index.ts b/types/index.ts
index f8f250f..3ca6b79 100644
--- a/types/index.ts
+++ b/types/index.ts
@@ -12,13 +12,16 @@ export interface AdvancedQuestion extends BasicQuestion {
answer_c: string | null;
}
-export interface ResultType {
- question: T | undefined;
+export type Question = BasicQuestion | AdvancedQuestion | null | undefined;
+
+export interface ResultType {
+ question: Question;
chosen_answer: string;
+ correct_answer: string | null;
chosen_is_correct: boolean | undefined;
}
export interface ResultEndType {
- basic: ResultType[];
- advanced: ResultType[];
+ basic: ResultType[];
+ advanced: ResultType[];
}