Compare commits

..

77 Commits

Author SHA1 Message Date
MathieuG-P 4a977332c9 update to v1.4.12 2024-11-05 20:53:50 +01:00
MathieuG-P 81c5a7928a Merge pull request #645 from Zagrios/bugfix/fix-oneclick-download-playlist-broken
[bugfix] Fix broken oneclick playlist download + issue with specials chars in playlists filenames

(cherry picked from commit d5f2ba3b21)
2024-11-05 20:53:12 +01:00
MathieuG-P 4b60be5846 Merge pull request #640 from Zagrios/chore/remove-broken-models-notification
[chore] remove the "Broken models" notification

(cherry picked from commit 8181cb3eec)
2024-11-04 20:18:56 +01:00
MathieuG-P f07706c4f4 update to 1.4.11 2024-11-04 17:10:01 +01:00
MathieuG-P 64ed9d24b1 [chore] Add support for mapinfo v3 (which is essentially the same thing as version 2)
(cherry picked from commit 83f23c5c16)
2024-11-04 17:09:15 +01:00
MathieuG-P da40448ca1 Merge pull request #636 from Zagrios/bugfix/unable-to-load-bsm-files-if-path-to-bsm-contains-url-special-chars
[bugfix] Unable to load bsm's files if path to bsm contain url special chars

(cherry picked from commit 6666685c43)
2024-11-04 16:41:29 +01:00
MathieuG-P 2e6224825f [bugfix] Linking a folder was not possible if the folder contained files (already in master) 2024-11-04 16:38:27 +01:00
MathieuG-P 8caea035ed [bugfix] fix black screen under certain condition when loading maps 2024-11-04 16:22:19 +01:00
MathieuG-P 507e8e04f2 Fix missing import + update node types 2024-10-27 16:07:53 +01:00
MathieuG-P 02c856b5d6 Apply PR #564 (Sometime mods using manifests were not recognised as installed + remove dead code) 2024-10-27 14:00:43 +01:00
MathieuG-P d8cb6a3892 Apply PR #535 (Do not reselect default mods when mods are already installed) 2024-10-27 13:28:27 +01:00
MathieuG-P b763a909b7 Apply PR #619 (updated tags to the correct names) 2024-10-27 13:17:49 +01:00
MathieuG-P 4bbfe72381 [chore] updating naming sheme of downloaded maps to avoid duplication when downloading maps from other tools
+ updating naming sheme of downloading playlists
+ updating download models due to function changes
2024-10-26 21:22:35 +02:00
MathieuG-P 27f36dfa54 Fix post cherry pick issues 2024-10-24 20:47:40 +02:00
MathieuG-P f70df59e21 [bugfix] dont move the folder if all subitem in the folder already exist in the destination 2024-10-24 20:04:01 +02:00
MathieuG-P 844ca12b9c [bugfix] Improve folder linking reliability 2024-10-24 20:03:57 +02:00
MathieuG-P ee9e10170c [chore] remove DLC folder from default shared folders 2024-10-24 19:44:23 +02:00
MathieuG-P 40365b44e3 [bugfix] bsipa installation never show error even if bsipa throw errors 2024-10-24 19:42:04 +02:00
MathieuG-P 6c29081d84 v1.4.10 2024-10-24 19:31:14 +02:00
MathieuG-P 1c9bf7dab0 [bugfix] new code sign certificate to resolve auto update loop 2024-10-15 15:08:00 +02:00
MathieuG-P dd572226bb [chore] new code sign certificate 2024-10-14 13:29:18 +02:00
MathieuG-P 5e33efbb06 [feat] add support for the 'info.dat' v4 format 2024-10-14 13:29:18 +02:00
MathieuG-P 99d125d35d [bugfix] Update DepotDownloader to fix connection to Steam errors 2024-10-14 13:29:10 +02:00
MathieuG-P ce6fb95aa2 v1.4.9 2024-10-12 16:10:33 +02:00
MathieuG-P 499956d3b3 update to 1.4.8 2024-08-01 00:23:32 +02:00
MathieuG-P c313685f6f [chore] filter potential oculus token in logs 2024-08-01 00:20:02 +02:00
MathieuG-P 88a1691d4b bumb to 1.4.7 2024-03-13 15:04:45 +01:00
MathieuG-P cdd25b458c Merge pull request #436 from Zagrios/bugfix/downloading-models-with-bsm-no-longer-works
[bugfix] fix downloading models not working
2024-03-13 14:55:42 +01:00
MathieuG-P 30a53c013f [bugfix] fix downloading models not working
Add useragent to requests to not being rejected
2024-03-13 14:51:51 +01:00
MathieuG-P 1db3db7bdd Merge branch 'master' of https://github.com/Zagrios/bs-manager 2024-03-07 18:09:18 +01:00
MathieuG-P e0e647b22a add version 1.35.0 2024-03-07 18:08:15 +01:00
MathieuG-P 69914e3063 Merge pull request #435 from fllppi/bugfix/fixed-typo-in-german-translation/434
fixed typo in german translation for map installation
2024-03-07 05:59:44 +01:00
Flippi 0c2624ed37 fixed typo in german translation for map installation 2024-03-06 21:58:06 +01:00
MathieuG-P cf11277541 bumb to 1.4.6 2024-03-06 12:30:26 +01:00
MathieuG-P d028e144fc [chore] Oculus backup is now automatically restored when Beat Saber closes 2024-03-06 10:06:27 +01:00
MathieuG-P 59c624d58d Merge pull request #432 from Zagrios/bugfix/oculus-versions-being-deleted-by-oculus-auto-updates
[bugfix] Added a Beat Saber ends watcher to delete created symlink to avoid Oculus version getting wiped by Oculus auto updates
2024-03-05 13:54:32 +01:00
MathieuG-P 2d67876ee1 [bugfix] Added a Beat Saber ends watcher to delete created symlink to avoid Oculus version getting wiped by Oculus auto updates 2024-03-05 13:33:04 +01:00
MathieuG-P 6b30d74628 Merge pull request #431 from Zagrios/bugfix/handle-unable-to-get-documents-path
[bugfix] handle unable to get documents path error
2024-03-04 13:35:26 +01:00
MathieuG-P eb76bb5df0 [bugfix] handle unable to get documents path error 2024-03-04 13:29:23 +01:00
MathieuG-P 590daf3be2 add patreon 2024-02-27 18:26:27 +01:00
MathieuG-P ecf18b9967 Update translations and disable "exclude installed" filters in list of installed maps 2024-02-26 13:44:04 +01:00
MathieuG-P bc26f329a5 Merge pull request #426 from Liborsaf/feature/exclude-installed
[feature] Implement exclude of installed maps as filter
2024-02-26 13:05:01 +01:00
Libor Šafář 030df21619 Implement exclude of installed maps as filter 2024-02-24 22:49:25 +01:00
MathieuG-P d61588c09f add patreon 2024-02-18 22:22:41 +01:00
MathieuG-P 7ed2b5c820 add OculusBinaryId 2024-02-16 16:07:20 +01:00
Iluhadesu 239a68821e Add 1.34.6 2024-02-16 15:53:59 +01:00
MathieuG-P fc512091e4 add patreon 2024-02-14 10:27:42 +01:00
MathieuG-P f71c29da58 bumb to 1.4.5 2024-02-12 16:35:04 +01:00
Iluhadesu 60c656b45b Add 1.34.5 2024-02-12 16:04:28 +01:00
MathieuG-P bec8e1f571 Merge pull request #417 from slinkstr/bugfix/fpfc-restore/416
[bugfix-416] Wait for SteamVR folder rename before exit
2024-02-12 15:22:57 +01:00
MathieuG-P 20d0cd7ee6 Merge pull request #421 from Zagrios/bugfix/unable-to-launch-oculus-version-when-backup-already-exists
[bugfix] Fixed unable to launch downgraded oculus version when backup already exist
2024-02-12 14:30:55 +01:00
MathieuG-P 3f37c2ee34 [bugfix] Fixed unable to launch downgraded oculus version when backup already exists 2024-02-12 14:19:59 +01:00
slinky 0b24a5ceb2 [bugfix-416] Wait for SteamVR folder rename before exit 2024-02-08 11:55:57 -08:00
MathieuG-P 318a6b5afa add patreon 2024-02-06 22:30:08 +01:00
MathieuG-P c80685065e Merge pull request #415 from Zagrios/bugfix/cannot-launch-bs-steam-is-elevated-error
[bugfix] handle errors when cheking if steam is running as admin
2024-02-02 20:23:19 +01:00
MathieuG-P cdc589f602 [bugfix] handle error when cheking if steam is running as admin 2024-02-02 20:18:33 +01:00
MathieuG-P ee6acb7980 bumb to 1.4.4 2024-02-01 10:48:28 +01:00
MathieuG-P 515ef06589 add patreon 2024-01-27 20:12:10 +01:00
MathieuG-P 344cce9461 Merge pull request #412 from Zagrios/bugfix/regedit-rs-broke-linux-support/411
[bugfix-411] dynamically import regedit-rs depending on the os
2024-01-27 13:53:05 +01:00
MathieuG-P 536690dc55 [bugfix-411] dynamically import regedit-rs depending on the os 2024-01-27 13:46:44 +01:00
MathieuG-P 4fc5a87c13 [chore] add checks and args whitelist for launching BS as admin 2024-01-25 21:44:58 +01:00
MathieuG-P 263061e7ce bumb to 1.4.4-alpha.2 2024-01-25 00:39:31 +01:00
MathieuG-P 0b7cad82d5 Merge pull request #408 from Zagrios/feature/admin-confirm-modal
[feature] Added admin launch information modal
2024-01-24 23:16:17 +01:00
MathieuG-P 63d35f678d [feature] Added admin launch information modal 2024-01-24 23:07:49 +01:00
MathieuG-P 16b9ca79f2 bumb version to 1.4.4-alpha.1 2024-01-21 16:55:26 +01:00
MathieuG-P 792ad9d777 [chore] fix lint error 2024-01-21 16:54:53 +01:00
MathieuG-P b6ecaa3934 bumb version to 1.4.4 2024-01-21 16:15:50 +01:00
MathieuG-P bb4ce5505a [chore] add @Log decorator + add logs for LivShortcuts 2024-01-21 15:22:09 +01:00
MathieuG-P d6aad2690c Merge pull request #405 from Zagrios/bugfix/launch-oculus-to-avoid-bs-crashs
[bugfix] Launch Oculus when launching Oculus BS version to avoid crashs
2024-01-20 16:49:02 +01:00
MathieuG-P cfb2b35bf7 [bugfix] Fix reject error message in OculusService 2024-01-20 16:38:52 +01:00
MathieuG-P 40f6803b90 [bugfix] Launch Oculus when launching Oculus BS version to avoid crashs 2024-01-20 16:36:59 +01:00
MathieuG-P d2c1d815a1 Merge pull request #404 from Zagrios/bugfix/bs-crash-when-steam-run-as-admin
[bugfix] Start BS as Admin when Steam is running as admin but BSM is not
2024-01-20 15:55:18 +01:00
MathieuG-P 4c8617a419 [bugfix] Start BS as Admin when Steam is running as admin but BSM is not 2024-01-20 15:42:30 +01:00
MathieuG-P 444db56d90 indent_size to 4 2024-01-14 02:33:09 +01:00
MathieuG-P 4b94b11b53 add patreon 2024-01-14 02:31:58 +01:00
MathieuG-P 1a9ed04cc2 Merge pull request #400 from Zagrios/bugfix/update-regedit-rs-for-static-link-dll
[bugfix] update regedit-rs for static link dll
2024-01-13 14:57:22 +01:00
MathieuG-P f3d4c64118 [bugfix] update regedit-rs for static link dll 2024-01-13 14:55:26 +01:00
116 changed files with 3308 additions and 1487 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ root = true
[*]
indent_style = space
indent_size = 2
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
+6 -1
View File
@@ -46,7 +46,12 @@ module.exports = {
"react/prop-types": "off",
"import/no-cycle": "off",
"prefer-promise-reject-errors": "off",
"react/jsx-no-target-blank": "off"
"react/jsx-no-target-blank": "off",
"@typescript-eslint/ban-types": ["error", {
types: {
Function: false,
}
}]
},
parserOptions: {
ecmaVersion: 2020,
-48
View File
@@ -1,48 +0,0 @@
name : e2e-tests
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
workflow_dispatch:
jobs:
e2e-tests-windows:
runs-on: windows-latest
steps:
- name: Cleanup files
run: cmd /r dir
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Install Playwright deps
run: npx playwright install --with-deps
- name: Build
run: npm run build
- name: Package
run: npm exec -c 'electron-builder build --publish "never" --win --x64'
- name: Run e2e tests
run: npm run e2e-test-ci
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: playwright-output
path: test-results/
+2 -1
View File
@@ -28,4 +28,5 @@ npm-debug.log.*
*.sass.d.ts
*.scss.d.ts
test-results
# externals
externals/**/target/*
+108 -2
View File
@@ -598,8 +598,7 @@
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/6169409105101272202",
"ReleaseImg": "https://cdn.akamai.steamstatic.com/steamcommunity/public/images/clans/32055887/c328e407367e9914abaf92f609501877ee5abb63.png",
"ReleaseDate": "1680623885",
"year": "2023",
"recommended": true
"year": "2023"
},
{
"BSVersion": "1.29.4",
@@ -681,5 +680,112 @@
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/ae11d195bbe41a0f244d7b4d055a0ab89f88e5bb.png",
"ReleaseDate": "1702309893",
"year": "2023"
},
{
"BSVersion": "1.34.5",
"BSManifest": "7413405154512822201",
"OculusBinaryId": "6639053626194360",
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/4036983137766828694",
"ReleaseImg": "https://clan.cloudflare.steamstatic.com/images/32055887/925e60f14c6815f7617fde11a894ed20f54a0846.png",
"ReleaseDate": "1707745958",
"year": "2024"
},
{
"BSVersion": "1.34.6",
"BSManifest": "4398761375819224126",
"OculusBinaryId": "6682206641879058",
"ReleaseURL": "https://store.steampowered.com/news/app/620980/view/7595953477644376720",
"ReleaseImg": "https://clan.cloudflare.steamstatic.com/images/32055887/e7c75bdfc76d00713adc3fbdf221c9ce8ab3620d.png",
"ReleaseDate": "1708091473",
"year": "2024"
},
{
"BSVersion": "1.35.0",
"BSManifest": "1490986193481243578",
"OculusBinaryId": "6720809361352119",
"ReleaseURL": "https://store.steampowered.com/news/app/620980/view/4142820264819707009",
"ReleaseImg": "https://clan.cloudflare.steamstatic.com/images//32055887/9a141be5c44ca6fc81551a2c7e7f28407df413ed.png",
"ReleaseDate": "1709831174",
"year": "2024"
},
{
"BSVersion": "1.36.0",
"BSManifest": "8533509040167838423",
"OculusBinaryId": "6863072637125790",
"ReleaseURL": "https://store.steampowered.com/news/app/620980/view/4205873192610459250",
"ReleaseImg": "https://clan.akamai.steamstatic.com/images//32055887/b8bd8a050e2bc3903cf18a277c5489ade01f7e75.png",
"ReleaseDate": "1712681263",
"year": "2024"
},
{
"BSVersion": "1.36.2",
"BSManifest": "4832237377879752064",
"OculusBinaryId": "6983660338400352",
"ReleaseURL": "https://store.steampowered.com/news/app/620980/view/4181105931135110118",
"ReleaseImg": "https://clan.cloudflare.steamstatic.com/images//32055887/74541417f14dee210bcfd89eefeabd7c0cc27c7d.png",
"ReleaseDate": "1715008020",
"year": "2024"
},
{
"BSVersion": "1.37.0",
"BSManifest": "7270690075584855288",
"OculusBinaryId": "7062062833893435",
"ReleaseURL": "https://store.steampowered.com/news/app/620980/view/4161968170153497460",
"ReleaseImg": "https://clan.akamai.steamstatic.com/images//32055887/f82d34c7582137a6748a28c5b02670ff4b235356.png",
"ReleaseDate": "1717513346",
"year": "2024"
},
{
"BSVersion": "1.37.1",
"BSManifest": "9129356330007601179",
"OculusBinaryId": "7313068492126200",
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/4253168598913260422",
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/039be718c1494f948257cd5b09f0082986484a58.png",
"ReleaseDate": "1720710529",
"year": "2024"
},
{
"BSVersion": "1.37.2",
"BSManifest": "6848299977215652352",
"OculusBinaryId": "7438773609555687",
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/4349999161850643744",
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/7c03af6d12fad23f1d439666d4be86b492d40003.png",
"ReleaseDate": "1722945814",
"year": "2024"
},
{
"BSVersion": "1.37.3",
"BSManifest": "5834150512217183366",
"OculusBinaryId": "7553569971409383",
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/6808965920900622902",
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/a1c9a6737cc5182fca8cddc7c8088eda6dd4d82d.png",
"ReleaseDate": "1724061712",
"year": "2024"
},
{
"BSVersion": "1.37.4",
"BSManifest": "7585106640515547731",
"OculusBinaryId": "7630971613669218",
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/4601078012425941968",
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/23e6e6f219a56d2f9ea4a27b560c54ac1214aec3.png",
"ReleaseDate": "1725548547",
"year": "2024"
},
{
"BSVersion": "1.37.5",
"BSManifest": "3122533396458693889",
"OculusBinaryId": "7685108391588873",
"ReleaseDate": "1725628356",
"year": "2024"
},
{
"BSVersion": "1.38.0",
"BSManifest": "3482902979520746178",
"OculusBinaryId": "7834818833284494",
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/4669760442595134838",
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/57cfa043407c091e67b7e0a8ae86fe5590deae33.png",
"ReleaseDate": "1728399815",
"year": "2024",
"recommended": true
}
]
+23 -1
View File
@@ -67,5 +67,27 @@
"username": "Lumberjack462",
"type": "diamond",
"link": "https://www.youtube.com/@lumberjack462"
},
{
"username": "Xero"
},
{
"username": "Minescence"
},
{
"username": "Finlay"
},
{
"username": "mereknom"
},
{
"username": "Jascha"
},
{
"username": "Celldweller",
"type": "gold"
},
{
"username": "rhythmshade"
}
]
]
+67 -51
View File
@@ -94,8 +94,7 @@
"edit": "Bearbeiten",
"uninstall": "Entfernen",
"create-shortcut": "Verknüpfung erstellen",
"shared-folders": "Geteilte Ordner",
"restore-oculus-folder": "Ordner wiederherstellen"
"shared-folders": "Geteilte Ordner"
}
},
"available-versions": {
@@ -236,7 +235,7 @@
},
"errors": {
"titles": {
"dotnet-required": ".NET 6 Benötigt"
"dotnet-required": ".NET 8 Benötigt"
},
"msg": {
"401": "Steam scheint uns BeatSaber nicht herunterladen zu lassen 😢",
@@ -261,10 +260,10 @@
"RateLimitExceeded": "Du hast es zu oft versucht, warte eine Weile und versuche es später erneut.",
"TokenRejected": "Ihr Anmeldetoken wurde abgelehnt 😕 Bitte versuchen Sie es erneut.",
"AccessDenied": "Der Zugang zu Steam wurde verweigert.",
"dotnet-required": ".NET 6 Runtime muss installiert sein, um eine Version von BeatSaber herunterzuladen. Lade es herunter, indem Du auf die Schaltfläche unten klickst."
"dotnet-required": ".NET 8 Runtime muss installiert sein, um eine Version von BeatSaber herunterzuladen. Lade es herunter, indem Du auf die Schaltfläche unten klickst."
},
"actions": {
"download-dotnet": ".NET 6 Herunterladen"
"download-dotnet": ".NET 8 Herunterladen"
}
}
},
@@ -460,7 +459,7 @@
},
"maps": {
"one-click-install": {
"success": "Map installation abegschlossen",
"success": "Map installation abgeschlossen",
"error": "Ein Fehler ist aufgetreten während der installation der Map"
}
},
@@ -482,6 +481,15 @@
"title": "Sicherung erstellt",
"msg": "Das Freigeben des Ordners „UserData“ kann zu Fehlern führen. Bei Problemen trenne den Ordner, um die Sicherung wiederherzustellen"
}
},
"linking-error": {
"title": "Fehler beim Verknüpfen des Ordners",
"msg": {
"EPERM": "BSManager hat nicht die erforderlichen Berechtigungen, um den Ordner zu verknüpfen.",
"EACCES": "BSManager hat nicht die erforderlichen Berechtigungen, um den Ordner zu verknüpfen.",
"ENOSPC": "Die Festplatte ist voll, machen Sie Platz und versuchen Sie es erneut.",
"UNKNOWN_ERROR": "Ein unbekannter Fehler ist beim Verknüpfen des Ordners aufgetreten."
}
}
},
"create-launch-shortcut": {
@@ -695,9 +703,7 @@
"title": "Achtung",
"body": {
"must-be-installed-once": "Sie müssen Beat Saber mindestens einmal aus dem Oculus Store installiert haben, sonst könnte sich Beat Saber nach dem Start automatisch schließen.",
"need-backup": "Um diese Version zu starten, wird der Installationsordner von Beat Saber in Ihrer Oculus-Bibliothek umbenannt.",
"can-restore-later": "Bei Bedarf können Sie ihn vom BSManager aus wiederherstellen, indem Sie zu den Optionen der originalen Oculus-Version gehen und auf 'Ordner wiederherstellen' klicken",
"tips-launch-oculus": "Tipp: Sie können diese Version direkt über Oculus starten, solange die Originalversion nicht wiederhergestellt ist."
"will-backup": "Um diese Version zu starten, wird der ursprüngliche Installationsordner von Beat Saber in Ihrer Oculus-Bibliothek umbenannt und beim Schließen von Beat Saber automatisch wiederhergestellt."
},
"not-remind-me": "Nicht mehr erinnern",
"understood": "Verstanden"
@@ -719,6 +725,16 @@
"enter-oculus-token": "Ein Oculus-Token eingeben"
},
"valid-btn": "Validieren"
},
"launch-as-admin": {
"title": "Administratorberechtigungen",
"body": {
"info": "Es wurde festgestellt, dass Steam mit Administratorrechten ausgeführt wird. Um mit Steam zu kommunizieren, muss auch Beat Saber als Administrator gestartet werden. Andernfalls könnte Beat Saber Probleme haben und nach dem Starten schließen.",
"info-2": "Das Starten von Beat Saber im Administratormodus gibt auch den installierten Mods Administratorrechte. Daher wird empfohlen, Steam ohne Administratorrechte neu zu starten.",
"info-3": "Beachten Sie, dass es nicht ratsam ist, Steam Administratorrechte zu geben, da dies auch die installierten Spiele und Mods betrifft und ein Sicherheitsrisiko darstellt."
},
"launch-as-admin": "Als Administrator starten",
"not-remind-me": "Nicht mehr erinnern"
}
},
"maps": {
@@ -727,54 +743,55 @@
"nps" : "Noten Pro Sekunde",
"tags": "Stichworte",
"specificities": "Allgemein",
"requirements": "Anforderungen"
"requirements": "Anforderungen",
"exclude": "ausschließen"
},
"map-types": {
"accuracy": "Präzision",
"balanced": "Ausgeglichen",
"challenge": "Herausforderung",
"dancestyle": "Tanz",
"dance-style": "Tanz",
"fitness": "Fitness",
"speed": "Geschwindigkeit",
"tech": "Tech"
},
"map-styles": {
"dance": "Tanz",
"swing": "Swing",
"nightcore": "Nightcore",
"folk": "Folk",
"family": "Familie",
"ambient": "umgebung",
"funk": "Funk",
"jazz": "Jazz",
"soul": "Soul",
"speedcore": "Speedcore",
"punk": "Punk",
"rb": "R&B",
"holiday": "Urlaub",
"vocaloid": "Vokaloid",
"jrock": "J-Rock",
"trance": "Trance",
"drumbass": "Basstrommel",
"comedy": "Komödie",
"instrumental": "Instrumental",
"hardcore": "Hardcore",
"kpop": "K-Pop",
"indie": "Indie",
"techno": "Techno",
"house": "House",
"game": "Videospiele",
"film": "Filme",
"alt": "Alternativ",
"dubstep": "Dubstep",
"metal": "Metal",
"anime": "Anime",
"hiphop": "HipHop",
"jpop": "J-Pop",
"rock": "Rock",
"pop": "Pop",
"electronic": "Elektronisch",
"classical-orchestral": "Klassisch & Orchestra"
"dance": "tanz",
"swing": "swing",
"nightcore": "nightcore",
"folk-acoustic": "folk & akustisch",
"kids-family": "kinder & familie",
"ambient": "ambient",
"funk-disco": "funk & disco",
"jazz": "jazz",
"soul": "soul",
"speedcore": "speedcore",
"punk": "punk",
"rb": "r&b",
"holiday": "urlaub",
"vocaloid": "vocaloid",
"j-rock": "j-rock",
"trance": "trance",
"drum-and-bass": "drum & bass",
"comedy-meme": "komödie & meme",
"instrumental": "instrumental",
"hardcore": "hardcore",
"k-pop": "k-pop",
"indie": "indie",
"techno": "techno",
"house": "house",
"video-game-soundtrack": "videospiel",
"tv-movie-soundtrack": "TV & film",
"alternative": "alternativ",
"dubstep": "dubstep",
"metal": "metal",
"anime": "anime",
"hip-hop-rap": "hip hop & rap",
"j-pop": "j-pop",
"rock": "rock",
"pop": "pop",
"electronic": "elektronisch",
"classical-orchestral": "Klassisch & Orchestral"
},
"map-specificities": {
"automapper": "KI",
@@ -783,6 +800,9 @@
"verified": "verifiziert",
"fullSpread": "full spread"
},
"map-excludes": {
"installed": "installiert"
},
"difficulties": {
"Easy": "einfach",
"Normal": "normal",
@@ -955,10 +975,6 @@
"go-to-mods": "Gehe zu Mods",
"not-remind": "Erinnere mich nicht"
},
"prevent-for-models-breaks": {
"title": "Gebrochene Modelle",
"desc": "Seit dem Update der Beat Saber Engine sind alle benutzerdefinierten Modellmods defekt und müssen aktualisiert werden. Sie wurden noch nicht aktualisiert."
},
"export-success": {
"title": "Export abgeschlossen 🎉"
}
+42 -26
View File
@@ -94,8 +94,7 @@
"edit": "Edit",
"uninstall": "Uninstall",
"create-shortcut": "Create a shortcut",
"shared-folders": "Shared Folders",
"restore-oculus-folder": "Restore the folder"
"shared-folders": "Shared Folders"
}
},
"available-versions": {
@@ -236,7 +235,7 @@
},
"errors": {
"titles": {
"dotnet-required": ".NET 6 Required"
"dotnet-required": ".NET 8 Required"
},
"msg": {
"401": "Steam doesn't seem to want to let us download Beat Saber 😢",
@@ -261,10 +260,10 @@
"RateLimitExceeded": "You've tried too many times, wait a while and try again later.",
"TokenRejected": "Your login token has been rejected 😕 Please try again.",
"AccessDenied": "Access to Steam has been denied.",
"dotnet-required": ".NET 6 Runtime must be installed in order to download a version of Beat Saber. Download it by clicking the button below."
"dotnet-required": ".NET 8 Runtime must be installed in order to download a version of Beat Saber. Download it by clicking the button below."
},
"actions": {
"download-dotnet": "Download .NET 6"
"download-dotnet": "Download .NET 8"
}
}
},
@@ -482,6 +481,15 @@
"title": "Backup created",
"msg": "Sharing the 'UserData' folder can generate errors, in case of problems unlink the folder to restore the backup"
}
},
"linking-error": {
"title": "Error while linking folder",
"msg": {
"EPERM": "BSManager does not have the necessary permissions to link the folder.",
"EACCES": "BSManager does not have the necessary permissions to link the folder.",
"ENOSPC": "The disk is full, make some space and try again.",
"UNKNOWN_ERROR":"An unknown error has occurred while linking the folder."
}
}
},
"create-launch-shortcut": {
@@ -695,9 +703,7 @@
"title": "Warning",
"body": {
"must-be-installed-once": "You must have installed Beat Saber at least once from the Oculus Store, otherwise Beat Saber might automatically close after launching.",
"need-backup": "To launch this version, the Beat Saber installation folder located in your Oculus library will be renamed.",
"can-restore-later": "If needed, you can restore it from BSManager by going to the options of the original Oculus version and clicking on 'Restore the folder'",
"tips-launch-oculus": "Tip: You can launch this version directly from Oculus, as long as the original version is not restored."
"will-backup": "To launch this version, the original installation folder of Beat Saber located in your Oculus library will be renamed and will be automatically restored when Beat Saber is closed."
},
"not-remind-me": "Do not remind me",
"understood": "Understood"
@@ -719,6 +725,16 @@
"enter-oculus-token": "Enter an Oculus token"
},
"valid-btn": "Validate"
},
"launch-as-admin": {
"title": "Administrator Permissions",
"body": {
"info": "Steam has been detected as running with administrator permissions. To communicate with Steam, Beat Saber must also be launched as an administrator. Otherwise, Beat Saber might experience problems and close after launching.",
"info-2": "Launching Beat Saber in administrator mode will also give administrator rights to the installed mods. Therefore, it is recommended to restart Steam without administrator permissions.",
"info-3": "Note that it is advised against giving administrator rights to Steam, as this affects the installed games and mods, presenting a security risk."
},
"launch-as-admin": "Launch as Administrator",
"not-remind-me": "Do not remind me"
}
},
"maps": {
@@ -727,13 +743,14 @@
"nps" : "Notes Per Second",
"tags": "tags",
"specificities": "general",
"requirements": "requirements"
"requirements": "requirements",
"exclude": "exclude"
},
"map-types": {
"accuracy": "accuracy",
"balanced": "balanced",
"challenge": "challenge",
"dancestyle": "dance",
"dance-style": "dance",
"fitness": "fitness",
"speed": "speed",
"tech": "tech"
@@ -742,10 +759,10 @@
"dance": "dance",
"swing": "swing",
"nightcore": "nightcore",
"folk": "folk",
"family": "family",
"folk-acoustic": "folk & acoustic",
"kids-family": "kids & family",
"ambient": "ambient",
"funk": "funk",
"funk-disco": "funk & disco",
"jazz": "jazz",
"soul": "soul",
"speedcore": "speedcore",
@@ -753,24 +770,24 @@
"rb": "r&b",
"holiday": "holiday",
"vocaloid": "vocaloid",
"jrock": "j-rock",
"j-rock": "j-rock",
"trance": "trance",
"drumbass": "drum & bass",
"comedy": "comedy",
"drum-and-bass": "drum & bass",
"comedy-meme": "comedy & meme",
"instrumental": "instrumental",
"hardcore": "hardcore",
"kpop": "k-pop",
"k-pop": "k-pop",
"indie": "indie",
"techno": "techno",
"house": "house",
"game": "video game",
"film": "film",
"alt": "alternative",
"video-game-soundtrack": "video game",
"tv-movie-soundtrack": "TV & film",
"alternative": "alternative",
"dubstep": "dubstep",
"metal": "metal",
"anime": "anime",
"hiphop": "hiphop",
"jpop": "j-pop",
"hip-hop-rap": "hip hop & rap",
"j-pop": "j-pop",
"rock": "rock",
"pop": "pop",
"electronic": "electronic",
@@ -783,6 +800,9 @@
"verified": "verified",
"fullSpread": "full spread"
},
"map-excludes": {
"installed": "installed"
},
"difficulties": {
"Easy": "easy",
"Normal": "normal",
@@ -955,10 +975,6 @@
"go-to-mods": "Go to mods",
"not-remind": "Don't remind me"
},
"prevent-for-models-breaks": {
"title": "Broken models",
"desc": "Since the Beat Saber engine update, all custom model mods have broken and need to be updated. They have not been updated yet."
},
"export-success": {
"title": "Export completed 🎉"
}
+47 -31
View File
@@ -94,8 +94,7 @@
"edit": "Editar",
"uninstall": "Desinstalar",
"create-shortcut": "Crear un atajo",
"shared-folders": "Carpetas Compartidas",
"restore-oculus-folder": "Restaurar la carpeta"
"shared-folders": "Carpetas Compartidas"
}
},
"available-versions": {
@@ -236,7 +235,7 @@
},
"errors": {
"titles": {
"dotnet-required": ".NET 6 Requerido"
"dotnet-required": ".NET 8 Requerido"
},
"msg": {
"401": "Parece que Steam no quiere dejarnos descargar Beat Saber 😢",
@@ -261,10 +260,10 @@
"RateLimitExceeded": "Lo has intentado demasiadas veces, espera un poco y vuelve a intentarlo más tarde.",
"TokenRejected": "Tu token de inicio de sesión ha sido rechazada 😕 Por favor, inténtalo de nuevo.",
"AccessDenied": "El acceso a Steam ha sido denegado.",
"dotnet-required": "Se debe instalar el tiempo de ejecución de .NET 6 para descargar una versión de Beat Saber. Descárgalo haciendo clic en el botón de abajo."
"dotnet-required": "Se debe instalar el tiempo de ejecución de .NET 8 para descargar una versión de Beat Saber. Descárgalo haciendo clic en el botón de abajo."
},
"actions": {
"download-dotnet": "Descargar .NET 6"
"download-dotnet": "Descargar .NET 8"
}
}
},
@@ -482,6 +481,15 @@
"title": "Backup creado",
"msg": "Compartir la carpeta 'UserData' puede generar errores, en caso de problemas desvincula la carpeta para restaurar la copia de seguridad"
}
},
"linking-error": {
"title": "Error al enlazar la carpeta",
"msg": {
"EPERM": "BSManager no tiene los permisos necesarios para enlazar la carpeta.",
"EACCES": "BSManager no tiene los permisos necesarios para enlazar la carpeta.",
"ENOSPC": "El disco está lleno, libera espacio e inténtalo de nuevo.",
"UNKNOWN_ERROR": "Se ha producido un error desconocido al enlazar la carpeta."
}
}
},
"create-launch-shortcut": {
@@ -695,9 +703,7 @@
"title": "Atención",
"body": {
"must-be-installed-once": "Debes haber instalado Beat Saber al menos una vez desde la Oculus Store, de lo contrario, Beat Saber podría cerrarse automáticamente después de iniciar.",
"need-backup": "Para iniciar esta versión, la carpeta de instalación de Beat Saber que se encuentra en tu biblioteca de Oculus será renombrada.",
"can-restore-later": "Si es necesario, podrás restaurarla desde el BSManager accediendo a las opciones de la versión original de Oculus y haciendo clic en 'Restaurar la carpeta'",
"tips-launch-oculus": "Consejo: Podrás iniciar esta versión directamente desde Oculus, siempre que la versión original no haya sido restaurada."
"will-backup": "Para lanzar esta versión, la carpeta de instalación original de Beat Saber ubicada en tu biblioteca de Oculus será renombrada y se restaurará automáticamente al cerrar Beat Saber."
},
"not-remind-me": "No volver a recordármelo",
"understood": "Entendido"
@@ -719,6 +725,16 @@
"enter-oculus-token": "Introducir un token de Oculus"
},
"valid-btn": "Validar"
},
"launch-as-admin": {
"title": "Permisos Administrador",
"body": {
"info": "Se ha detectado que Steam está funcionando con permisos de administrador. Para comunicarse con Steam, Beat Saber también debe iniciarse como administrador. De lo contrario, Beat Saber podría experimentar problemas y cerrarse después de iniciar.",
"info-2": "Iniciar Beat Saber en modo administrador también otorgará derechos de administrador a los mods instalados. Por lo tanto, se recomienda reiniciar Steam sin permisos de administrador.",
"info-3": "Tenga en cuenta que se desaconseja otorgar derechos de administrador a Steam, ya que esto afecta a los juegos y mods instalados, presentando un riesgo de seguridad."
},
"launch-as-admin": "Iniciar como Administrador",
"not-remind-me": "No volver a recordármelo"
}
},
"maps": {
@@ -727,25 +743,26 @@
"nps" : "Notas Por Segundo",
"tags": "tags",
"specificities": "general",
"requirements": "requisitos"
"requirements": "requisitos",
"exclude": "excluir"
},
"map-types": {
"accuracy": "precisión",
"balanced": "equilibrado",
"challenge": "desafío",
"dancestyle": "baile",
"dance-style": "baile",
"fitness": "fitness",
"speed": "speed",
"tech": "tech"
},
"map-styles": {
"dance": "baile",
"dance": "danza",
"swing": "swing",
"nightcore": "nightcore",
"folk": "folk",
"family": "familia",
"ambient": "ambiente",
"funk": "funk",
"folk-acoustic": "folk & acústico",
"kids-family": "niños & familia",
"ambient": "ambiental",
"funk-disco": "funk & disco",
"jazz": "jazz",
"soul": "soul",
"speedcore": "speedcore",
@@ -753,28 +770,28 @@
"rb": "r&b",
"holiday": "vacaciones",
"vocaloid": "vocaloid",
"jrock": "j-rock",
"j-rock": "j-rock",
"trance": "trance",
"drumbass": "drum & bass",
"comedy": "comedia",
"drum-and-bass": "drum & bass",
"comedy-meme": "comedia & meme",
"instrumental": "instrumental",
"hardcore": "hardcore",
"kpop": "k-pop",
"k-pop": "k-pop",
"indie": "indie",
"techno": "tecno",
"techno": "techno",
"house": "house",
"game": "videojuego",
"film": "film",
"alt": "alternativa",
"video-game-soundtrack": "videojuego",
"tv-movie-soundtrack": "TV & cine",
"alternative": "alternativo",
"dubstep": "dubstep",
"metal": "metal",
"anime": "anime",
"hiphop": "hiphop",
"jpop": "j-pop",
"hip-hop-rap": "hip hop & rap",
"j-pop": "j-pop",
"rock": "rock",
"pop": "pop",
"electronic": "electrónico",
"classical-orchestral": "Clásico y orquestal"
"electronic": "electrónica",
"classical-orchestral": "Clásica & Orquestal"
},
"map-specificities": {
"automapper": "IA",
@@ -783,6 +800,9 @@
"verified": "verificado",
"fullSpread": "panel completo"
},
"map-excludes": {
"installed": "instalado"
},
"difficulties": {
"Easy": "fácil",
"Normal": "normal",
@@ -955,10 +975,6 @@
"go-to-mods": "Ir a mods",
"not-remind": "No volver a recordarme"
},
"prevent-for-models-breaks": {
"title": "Modelos rotos",
"desc": "Desde la actualización del motor de Beat Saber, todos los mods de modelos personalizados se han roto y necesitan ser actualizados. Todavía no han sido actualizados."
},
"export-success": {
"title": "Exportación completada 🎉"
}
+49 -32
View File
@@ -94,8 +94,7 @@
"edit": "Modifier",
"uninstall": "Désinstaller",
"create-shortcut": "Créer un raccourci",
"shared-folders": "Dossiers partagés",
"restore-oculus-folder": "Restaurer le dossier"
"shared-folders": "Dossiers partagés"
}
},
"available-versions": {
@@ -236,7 +235,7 @@
},
"errors": {
"titles": {
"dotnet-required": ".NET 6 Requis"
"dotnet-required": ".NET 8 Requis"
},
"msg": {
"401": "Steam ne semble pas vouloir nous laisser télécharger Beat Saber 😢",
@@ -261,10 +260,10 @@
"RateLimitExceeded": "Tu as essayé trop de fois attends un peu et recommence plus tard.",
"TokenRejected": "Votre token de connexion a été rejeté 😕 Veuillez réessayer.",
"AccessDenied": "L'accès à Steam a été refusé.",
"dotnet-required": ".NET 6 Runtime doit être installé pour pouvoir télécharger une version de Beat Saber. Télécharge-le en cliquant sur le bouton ci-dessous."
"dotnet-required": ".NET 8 Runtime doit être installé pour pouvoir télécharger une version de Beat Saber. Télécharge-le en cliquant sur le bouton ci-dessous."
},
"actions": {
"download-dotnet": "Télécharger .NET 6"
"download-dotnet": "Télécharger .NET 8"
}
}
},
@@ -482,7 +481,17 @@
"title": "Sauvegarde créée",
"msg": "Le partage du dossier 'UserData' peut générer des erreurs, en cas de soucis déliez le dossier pour restaurer la sauvegarde"
}
},
"linking-error": {
"title": "Erreur lors de la liaison du dossier",
"msg": {
"EPERM": "BSManager n'a pas les autorisations nécessaires pour lier le dossier.",
"EACCES": "BSManager n'a pas les autorisations nécessaires pour lier le dossier.",
"ENOSPC": "Le disque est plein, faites de la place et réessayez.",
"UNKNOWN_ERROR": "Une erreur inconnue est survenue lors de la liaison du dossier."
}
}
},
"create-launch-shortcut": {
"success": {
@@ -695,9 +704,7 @@
"title": "Attention",
"body": {
"must-be-installed-once": "Vous devez avoir installé au moins une fois Beat Saber depuis l'Oculus Store, sinon Beat Saber pourrait se fermer automatiquement après son lancement.",
"need-backup": "Pour lancer cette version, le dossier d'installation de Beat Saber se trouvant dans votre librairie Oculus va être renommé.",
"can-restore-later": "Au besoin, vous pourrez le restaurer depuis BSManager en vous rendant dans les options de la version originale Oculus et en cliquant sur \"Restaurer le dossier\"",
"tips-launch-oculus": "Astuce : Vous pourrez lancer cette version directement depuis Oculus, tant que la version originale n'est pas restaurée."
"will-backup": "Afin de lancer cette version, le dossier d'installation original de Beat Saber se trouvant dans votre bibliothèque Oculus va être renommé et sera automatiquement restauré à l'arrêt de Beat Saber."
},
"not-remind-me": "Ne plus me rappeler",
"understood": "J'ai compris"
@@ -719,6 +726,16 @@
"enter-oculus-token": "Entrer un token Oculus"
},
"valid-btn": "Valider"
},
"launch-as-admin": {
"title": "Permissions Administrateur",
"body": {
"info": "Steam a été détecté comme fonctionnant avec des permissions administrateur. Afin communiquer avec Steam, Beat Saber doit également être lancé en tant qu'administrateur. Dans le cas contraire, Beat Saber pourrait rencontrer des problèmes et se fermer après son lancement.",
"info-2": "Lancer Beat Saber en mode administrateur donnera également les droits administrateur aux mods installés. Il est donc plutôt recommandé de redémarrer Steam sans permissions administrateur.",
"info-3": "Notez qu'il est déconseillé de donner des droits d'administrateur à Steam, car cela affecte également les jeux et mods installés, présentant un risque pour la sécurité."
},
"launch-as-admin": "Lancer en administateur",
"not-remind-me": "Ne plus me rappeler"
}
},
"maps": {
@@ -727,54 +744,55 @@
"nps" : "Notes Par Seconde",
"tags": "tags",
"specificities": "général",
"requirements": "requis"
"requirements": "requis",
"exclude": "exclure"
},
"map-types": {
"accuracy": "précision",
"balanced": "équilibrée",
"challenge": "challenge",
"dancestyle": "dance",
"dance-style": "dance",
"fitness": "fitness",
"speed": "vitesse",
"tech": "tech"
},
"map-styles": {
"dance": "dance",
"dance": "danse",
"swing": "swing",
"nightcore": "nightcore",
"folk": "folk",
"family": "famille",
"ambient": "ambiante",
"funk": "funk",
"folk-acoustic": "folk & acoustique",
"kids-family": "enfants & famille",
"ambient": "ambiant",
"funk-disco": "funk & disco",
"jazz": "jazz",
"soul": "soul",
"speedcore": "speedcore",
"punk": "punk",
"rb": "r&b",
"holiday": "vacance",
"holiday": "vacances",
"vocaloid": "vocaloid",
"jrock": "j-rock",
"j-rock": "j-rock",
"trance": "trance",
"drumbass": "drum & bass",
"comedy": "comédie",
"drum-and-bass": "drum & bass",
"comedy-meme": "comédie & meme",
"instrumental": "instrumental",
"hardcore": "hardcore",
"kpop": "k-pop",
"indie": "indé",
"k-pop": "k-pop",
"indie": "indie",
"techno": "techno",
"house": "house",
"game": "jeu vidéo",
"film": "film",
"alt": "alternative",
"video-game-soundtrack": "jeu vidéo",
"tv-movie-soundtrack": "TV & film",
"alternative": "alternatif",
"dubstep": "dubstep",
"metal": "metal",
"metal": "métal",
"anime": "anime",
"hiphop": "hiphop",
"jpop": "j-pop",
"hip-hop-rap": "hip hop & rap",
"j-pop": "j-pop",
"rock": "rock",
"pop": "pop",
"electronic": "électronique",
"classical-orchestral": "classique & orchestrale"
"classical-orchestral": "Classique & Orchestral"
},
"map-specificities": {
"automapper": "IA",
@@ -783,6 +801,9 @@
"verified": "vérifiée",
"fullSpread": "panel complet"
},
"map-excludes": {
"installed": "installé"
},
"difficulties": {
"Easy": "facile",
"Normal": "normal",
@@ -955,10 +976,6 @@
"go-to-mods": "Aller aux mods",
"not-remind": "Ne plus me rappeler"
},
"prevent-for-models-breaks": {
"title": "Modèles cassés",
"desc": "Depuis la mise à jour du moteur Beat Saber, tous les mods de modèles personnalisés ne sont plus fonctionnels et doivent être mis à jour. Ils n'ont pas encore été mis à jour."
},
"export-success": {
"title": "Export terminé 🎉"
}
+46 -30
View File
@@ -94,8 +94,7 @@
"edit": "編集",
"uninstall": "アンインストール",
"create-shortcut": "ショートカットを作成",
"shared-folders": "共有フォルダー",
"restore-oculus-folder": "フォルダーの復元"
"shared-folders": "共有フォルダー"
}
},
"available-versions": {
@@ -236,7 +235,7 @@
},
"errors": {
"titles": {
"dotnet-required": ".NET 6が必要です!"
"dotnet-required": ".NET 8が必要です!"
},
"msg": {
"401": "SteamがBeat Saberのダウンロードを許可してくれないようだ。😢",
@@ -261,10 +260,10 @@
"RateLimitExceeded": "何度も試しているのでしばらくたって、もう一度お試しください。",
"TokenRejected": "ログイントークンが拒否されました 😕 もう一度お試しください。",
"AccessDenied": "Steamへのアクセスが拒否されました。",
"dotnet-required": "Beat Saberをダウンロードするには、.NET 6 Runtimeがインストールされている必要があります。下のボタンをクリックしてダウンロードしてください。"
"dotnet-required": "Beat Saberをダウンロードするには、.NET 8 Runtimeがインストールされている必要があります。下のボタンをクリックしてダウンロードしてください。"
},
"actions": {
"download-dotnet": ".NET 6をダウンロード"
"download-dotnet": ".NET 8をダウンロード"
}
}
},
@@ -482,6 +481,15 @@
"title": "バックアップを作成しました",
"msg": "'UserData'フォルダを共有するとエラーが発生する可能性があります。問題が発生した場合は、フォルダをリンク解除してバックアップを復元してください。"
}
},
"linking-error": {
"title": "フォルダのリンク中にエラーが発生しました",
"msg": {
"EPERM": "BSManagerにはフォルダをリンクするための必要な権限がありません。",
"EACCES": "BSManagerにはフォルダをリンクするための必要な権限がありません。",
"ENOSPC": "ディスクがいっぱいです。空き容量を作ってもう一度試してください。",
"UNKNOWN_ERROR": "フォルダをリンク中に不明なエラーが発生しました。"
}
}
},
"create-launch-shortcut": {
@@ -695,9 +703,7 @@
"title": "注意",
"body": {
"must-be-installed-once": "少なくとも一度はOculus StoreからBeat Saberをインストールしている必要があります。そうしないとBeat Saberは起動後に自動的に終了する可能性があります。",
"need-backup": "このバージョンを起動するに、OculusライブラリにあるBeat Saberインストールフォルダ名前変更ます。",
"can-restore-later": "必要であれば、BSManagerから元のOculusバージョンのオプションに行き、'フォルダを復元'をクリックして復元することができます。",
"tips-launch-oculus": "ヒント: 元のバージョンが復元されない限り、Oculusから直接このバージョンを起動することができます。"
"will-backup": "このバージョンを起動するために、OculusライブラリにあるBeat Saberの元のインストールフォルダ名前変更され、Beat Saberの終了時に自動的に復元されます。"
},
"not-remind-me": "二度と表示しないでください",
"understood": "分かった"
@@ -719,6 +725,16 @@
"enter-oculus-token": "オキュラストークンを入力する"
},
"valid-btn": "確認"
},
"launch-as-admin": {
"title": "管理者権限",
"body": {
"info": "Steamが管理者権限で動作していることが検出されました。Steamと通信するためには、Beat Saberも管理者として起動する必要があります。そうでない場合、Beat Saberは問題が発生し、起動後に終了する可能性があります。",
"info-2": "管理者モードでBeat Saberを起動すると、インストールされたMODにも管理者権限が与えられます。そのため、管理者権限なしでSteamを再起動することをお勧めします。",
"info-3": "Steamに管理者権限を与えることはお勧めできません。これはインストールされたゲームやMODにも影響を与え、セキュリティリスクをもたらすからです。"
},
"launch-as-admin": "管理者として起動",
"not-remind-me": "Больше не напоминать"
}
},
"maps": {
@@ -727,7 +743,8 @@
"nps" : "秒間ノート数",
"tags": "タグ",
"specificities": "一般",
"requirements": "要Mod"
"requirements": "要Mod",
"exclude": "除外する"
},
"map-types": {
"accuracy": "正確",
@@ -742,39 +759,39 @@
"dance": "ダンス",
"swing": "スウィング",
"nightcore": "ナイトコア",
"folk": "フォーク",
"family": "ファミリー",
"folk-acoustic": "フォーク & アコースティック",
"kids-family": "キッズ & ファミリー",
"ambient": "アンビエント",
"funk": "ファンク",
"funk-disco": "ファンク & ディスコ",
"jazz": "ジャズ",
"soul": "ソウル",
"speedcore": "スピードコア ",
"speedcore": "スピードコア",
"punk": "パンク",
"rb": "r&b",
"holiday": "休日",
"holiday": "ホリデー",
"vocaloid": "ボーカロイド",
"jrock": "j-rock",
"j-rock": "J-ロック",
"trance": "トランス",
"drumbass": "ドラムベース",
"comedy": "コメディ",
"instrumental": "器楽",
"drum-and-bass": "ドラム & ベース",
"comedy-meme": "コメディ & ミーム",
"instrumental": "インストゥルメンタル",
"hardcore": "ハードコア",
"kpop": "k-pop",
"k-pop": "k-pop",
"indie": "インディー",
"techno": "テクノ",
"house": "",
"game": "ビデオゲーム",
"film": "映画音楽",
"alt": "オルタナティ",
"house": "ハウス",
"video-game-soundtrack": "ゲーム音楽",
"tv-movie-soundtrack": "TV & 映画",
"alternative": "オルタナティ",
"dubstep": "ダブステップ",
"metal": "メタル",
"anime": "アニメ",
"hiphop": "ヒップップ",
"jpop": "j-pop",
"hip-hop-rap": "ヒップホップ & ラップ",
"j-pop": "J-ポップ",
"rock": "ロック",
"pop": "ポップ",
"electronic": "エレクトロニック",
"classical-orchestral": "Classical & Orchestral"
"classical-orchestral": "クラシック & オーケストラ"
},
"map-specificities": {
"automapper": "AI",
@@ -783,6 +800,9 @@
"verified": "認証済み",
"fullSpread": "フルスプレッド"
},
"map-excludes": {
"installed": "インストール済み"
},
"difficulties": {
"Easy": "easy",
"Normal": "normal",
@@ -955,10 +975,6 @@
"go-to-mods": "Modインストーラーに移動",
"not-remind": "二度と表示しないで"
},
"prevent-for-models-breaks": {
"title": "モデルが壊れています!",
"desc": "Beat Saberのエンジンアップデート以来、すべてのカスタムモデルのMODが壊れており、更新が必要です。まだ更新されていません。"
},
"export-success": {
"title": "エクスポート完了🎉"
}
+47 -32
View File
@@ -94,8 +94,7 @@
"edit": "Редактировать",
"uninstall": "Удалить",
"create-shortcut": "Создать ярлык",
"shared-folders": "Общие папки",
"restore-oculus-folder": "Восстановить папку"
"shared-folders": "Общие папки"
}
},
"available-versions": {
@@ -236,7 +235,7 @@
},
"errors": {
"titles": {
"dotnet-required": "Требуется .NET 6"
"dotnet-required": "Требуется .NET 8"
},
"msg": {
"401": "Похоже Steam не хочет, чтобы мы скачали Beat Saber 😢",
@@ -261,10 +260,10 @@
"RateLimitExceeded": "Слишком много попыток, вернитесь позже и попробуйте снова.",
"TokenRejected": "Ваш токен для входа был отклонен 😕 Пожалуйста, попробуйте снова.",
"AccessDenied": "Доступ к Steam был отклонен.",
"dotnet-required": "Среда запуска .NET 6 должна быть установлена, чтобы скачать Beat Saber. Скачайте её с помощью кнопки ниже."
"dotnet-required": "Среда запуска .NET 8 должна быть установлена, чтобы скачать Beat Saber. Скачайте её с помощью кнопки ниже."
},
"actions": {
"download-dotnet": "Скачать .NET 6"
"download-dotnet": "Скачать .NET 8"
}
}
},
@@ -482,6 +481,15 @@
"title": "Бэкап создан",
"msg": "Общая папка 'UserData' может создавать ошибки. В случае проблем отвяжите папку, чтобы восстановить бэкап."
}
},
"linking-error": {
"title": "Ошибка при связывании папки",
"msg": {
"EPERM": "BSManager не имеет необходимых прав для связывания папки.",
"EACCES": "BSManager не имеет необходимых прав для связывания папки.",
"ENOSPC": "Диск заполнен, освободите место и попробуйте снова.",
"UNKNOWN_ERROR": "Произошла неизвестная ошибка при связывании папки."
}
}
},
"create-launch-shortcut": {
@@ -695,9 +703,7 @@
"title": "Внимание",
"body": {
"must-be-installed-once": "Вы должны были установить Beat Saber хотя бы один раз из Oculus Store, иначе Beat Saber может автоматически закрыться после запуска.",
"need-backup": "Для запуска этой версии папка установки Beat Saber в вашей библиотеке Oculus будет переименована.",
"can-restore-later": "При необходимости вы можете восстановить её через BSManager, перейдя в опции оригинальной версии Oculus и нажав на 'Восстановить папку'",
"tips-launch-oculus": "Совет: Вы можете запустить эту версию напрямую через Oculus, пока оригинальная версия не восстановлена."
"will-backup": "Для запуска этой версии исходная папка установки Beat Saber, находящаяся в вашей библиотеке Oculus, будет переименована и автоматически восстановлена при выходе из Beat Saber."
},
"not-remind-me": "Больше не напоминать",
"understood": "Понял"
@@ -719,6 +725,15 @@
"enter-oculus-token": "Введите токен Oculus"
},
"valid-btn": "Подтвердить"
},
"launch-as-admin": {
"title": "Права Администратора",
"body": {
"info": "Обнаружено, что Steam работает с правами администратора. Чтобы связаться со Steam, Beat Saber также должен быть запущен от имени администратора. В противном случае Beat Saber может столкнуться с проблемами и закрыться после запуска.",
"info-2": "Запуск Beat Saber в режиме администратора также даст права администратора установленным модам. Поэтому рекомендуется перезапустить Steam без прав администратора.",
"info-3": "Обратите внимание, что не рекомендуется предоставлять права администратора Steam, так как это также влияет на установленные игры и моды, представляя угрозу безопасности."
},
"launch-as-admin": "Запустить от имени администратора"
}
},
"maps": {
@@ -727,13 +742,14 @@
"nps" : "Нот в Секунду",
"tags": "тэги",
"specificities": "основное",
"requirements": "требуемые моды"
"requirements": "требуемые моды",
"exclude": "исключить"
},
"map-types": {
"accuracy": "точность",
"balanced": "баланс",
"challenge": "испытание",
"dancestyle": "танец",
"dance-style": "танец",
"fitness": "фитнес",
"speed": "скорость",
"tech": "техника"
@@ -742,36 +758,36 @@
"dance": "танец",
"swing": "свинг",
"nightcore": "найткор",
"folk": "народные",
"family": "семейные",
"folk-acoustic": "фолк и акустика",
"kids-family": "дети и семья",
"ambient": "эмбиент",
"funk": "фанк",
"funk-disco": "фанк и диско",
"jazz": "джаз",
"soul": "соул",
"speedcore": "спидкор",
"punk": "панк",
"rb": "ар-н-би",
"holiday": "праздник",
"vocaloid": "вокалоиды",
"jrock": "джей-рок",
"rb": "r&b",
"holiday": "праздники",
"vocaloid": "вокалоид",
"j-rock": "джей-рок",
"trance": "транс",
"drumbass": "драм-н-бейс",
"comedy": "комедия",
"instrumental": "инструментальные",
"drum-and-bass": "драм-н-бейс",
"comedy-meme": "комедия и мемы",
"instrumental": "инструментал",
"hardcore": "хардкор",
"kpop": "кей-поп",
"k-pop": "k-pop",
"indie": "инди",
"techno": "техно",
"house": "хаус",
"game": "видеоигры",
"film": "фильмы",
"alt": "альтернативные",
"dubstep": "дапстеп",
"video-game-soundtrack": "видеоигра",
"tv-movie-soundtrack": "ТВ и кино",
"alternative": "альтернатива",
"dubstep": "дабстеп",
"metal": "метал",
"anime": "аниме",
"hiphop": "хипхоп",
"jpop": "джей-поп",
"rock": "прк",
"hip-hop-rap": "хип-хоп и рэп",
"j-pop": "j-pop",
"rock": "рок",
"pop": "поп",
"electronic": "электроника",
"classical-orchestral": "Классика и Оркестр"
@@ -783,6 +799,9 @@
"verified": "проверенные авторы",
"fullSpread": "полный набор"
},
"map-excludes": {
"installed": "установленный"
},
"difficulties": {
"Easy": "легко",
"Normal": "нормально",
@@ -955,10 +974,6 @@
"go-to-mods": "Перейти к модам",
"not-remind": "Больше не напоминать"
},
"prevent-for-models-breaks": {
"title": "Сломанные модели",
"desc": "С момента обновления движка Beat Saber, все пользовательские модификации моделей сломались и требуют обновления. Они еще не были обновлены."
},
"export-success": {
"title": "Экспорт завершен 🎉"
}
+66 -50
View File
@@ -94,8 +94,7 @@
"edit": "編輯",
"uninstall": "移除",
"create-shortcut": "創建捷徑",
"shared-folders": "Shared Folders",
"restore-oculus-folder": "Restore the folder"
"shared-folders": "Shared Folders"
}
},
"available-versions": {
@@ -236,7 +235,7 @@
},
"errors": {
"titles": {
"dotnet-required": "需要 .NET 6"
"dotnet-required": "需要 .NET 8"
},
"msg": {
"401": "Steam 似乎不想讓我們下載 Beat Saber😢",
@@ -261,10 +260,10 @@
"RateLimitExceeded": "你已經嘗試了太多次,請稍等片刻,稍後再試。",
"TokenRejected": "你的登錄令牌已被拒絕 😕 請重試。",
"AccessDenied": "訪問 Steam 被拒絕。",
"dotnet-required": "必須安裝 .NET 6 Runtime 才能下載 Beat Saber 版本。單擊下面的按鈕下載它。"
"dotnet-required": "必須安裝 .NET 8 Runtime 才能下載 Beat Saber 版本。單擊下面的按鈕下載它。"
},
"actions": {
"download-dotnet": "下載 .NET 6"
"download-dotnet": "下載 .NET 8"
}
}
},
@@ -482,6 +481,15 @@
"title": "備份已創建",
"msg": "共享 “UserData” 文件夾可能會產生錯誤,如果出現問題,請取消關聯該文件夾以恢復備份"
}
},
"linking-error": {
"title": "連結文件夾時出錯",
"msg": {
"EPERM": "BSManager沒有必要的權限來連結文件夾。",
"EACCES": "BSManager沒有必要的權限來連結文件夾。",
"ENOSPC": "磁碟已滿,請騰出空間後再試。",
"UNKNOWN_ERROR": "連結文件夾時發生未知錯誤。"
}
}
},
"create-launch-shortcut": {
@@ -695,9 +703,7 @@
"title": "警告",
"body": {
"must-be-installed-once": "你必須至少從 Oculus 商店安裝過一次 BeatSaber,否則 BeatSaber 可能會在啟動後自動關閉。",
"need-backup": "要啟動該版本,位於你的 Oculus 庫中的 BeatSaber 安裝文件夾將被重命名。",
"can-restore-later": "如果需要,你可以通過前往 BSManager 的原始 Oculus 版本選項並點擊'恢復文件夾'來恢復它。",
"tips-launch-oculus": "提示:只要原始版本沒有被恢復,你就可以直接從 Oculus 啟動該版本。"
"will-backup": "為了啟動這個版本,位於您的Oculus庫中的Beat Saber的原始安裝文件夾將被重命名,並且在Beat Saber關閉時會自動恢復。"
},
"not-remind-me": "不再提醒我",
"understood": "明白了"
@@ -719,6 +725,16 @@
"enter-oculus-token": "輸入Oculus令牌"
},
"valid-btn": "驗證"
},
"launch-as-admin": {
"title": "管理員權限",
"body": {
"info": "檢測到Steam正在以管理員權限運行。為了與Steam通信,Beat Saber也必須以管理員身份啟動。否則,Beat Saber可能會遇到問題並在啟動後關閉。",
"info-2": "以管理員模式啟動Beat Saber還會將管理員權限賦予已安裝的模組。因此,建議重啟Steam,不使用管理員權限。",
"info-3": "請注意,不建議給Steam管理員權限,因為這也會影響已安裝的遊戲和模組,帶來安全風險。"
},
"launch-as-admin": "以管理員身份啟動",
"not-remind-me": "不再提醒我"
}
},
"maps": {
@@ -727,54 +743,55 @@
"nps" : "每秒音符數",
"tags": "標籤",
"specificities": "general",
"requirements": "要求"
"requirements": "要求",
"exclude": "排除"
},
"map-types": {
"accuracy": "精確度",
"balanced": "平衡",
"challenge": "挑戰",
"dancestyle": "舞蹈",
"dance-style": "舞蹈",
"fitness": "健身",
"speed": "速度",
"tech": "技術"
},
"map-styles": {
"dance": "Dance",
"swing": "Swing",
"nightcore": "Nightcore",
"folk": "Folk",
"family": "Family",
"ambient": "Ambient",
"funk": "Funk",
"jazz": "Jazz",
"soul": "Soul",
"speedcore": "Speedcore",
"punk": "Punk",
"rb": "R&B",
"holiday": "Holiday",
"vocaloid": "Vocaloid",
"jrock": "J-rock",
"trance": "Trance",
"drumbass": "Drum & Bass",
"comedy": "Comedy",
"instrumental": "Instrumental",
"hardcore": "Hardcore",
"kpop": "K-pop",
"indie": "Indie",
"techno": "Techno",
"house": "House",
"game": "Video game",
"film": "Film",
"alt": "Alternative",
"dubstep": "Dubstep",
"metal": "Metal",
"anime": "Anime",
"hiphop": "Hiphop",
"jpop": "J-pop",
"rock": "Rock",
"pop": "Pop",
"electronic": "Electronic",
"classical-orchestral": "Classical & Orchestral"
"dance": "舞蹈",
"swing": "搖擺",
"nightcore": "夜核",
"folk-acoustic": "民謠 & 原聲",
"kids-family": "兒童 & 家庭",
"ambient": "氛圍音樂",
"funk-disco": "放克 & 迪斯科",
"jazz": "爵士",
"soul": "靈魂",
"speedcore": "極速核",
"punk": "龐克",
"rb": "r&b",
"holiday": "假日",
"vocaloid": "聲庫",
"j-rock": "日式搖滾",
"trance": "迷幻",
"drum-and-bass": "鼓 & 貝斯",
"comedy-meme": "喜劇 & 表情包",
"instrumental": "純音樂",
"hardcore": "硬核",
"k-pop": "k-pop",
"indie": "獨立",
"techno": "電子舞曲",
"house": "浩室音樂",
"video-game-soundtrack": "遊戲音樂",
"tv-movie-soundtrack": "電視 & 電影",
"alternative": "另類",
"dubstep": "電音鼓",
"metal": "金屬",
"anime": "動漫",
"hip-hop-rap": "嘻哈 & 說唱",
"j-pop": "日式流行",
"rock": "搖滾",
"pop": "流行",
"electronic": "電子",
"classical-orchestral": "古典 & 管弦樂"
},
"map-specificities": {
"automapper": "AI",
@@ -783,6 +800,9 @@
"verified": "Verified",
"fullSpread": "Full spread"
},
"map-excludes": {
"installed": "已安裝"
},
"difficulties": {
"Easy": "Easy",
"Normal": "Normal",
@@ -955,10 +975,6 @@
"go-to-mods": "前往 Mod 頁",
"not-remind": "不再提醒我"
},
"prevent-for-models-breaks": {
"title": "已損壞的模型",
"desc": "自從Beat Saber引擎更新以來,所有自定義模型的MOD都已損壞,需要更新。它們還沒有被更新。"
},
"export-success": {
"title": "導出成功 🎉"
}
+65 -49
View File
@@ -94,8 +94,7 @@
"edit": "编辑",
"uninstall": "卸载",
"create-shortcut": "创建快捷方式",
"shared-folders": "Shared Folders",
"restore-oculus-folder": "Restore the folder"
"shared-folders": "Shared Folders"
}
},
"available-versions": {
@@ -236,7 +235,7 @@
},
"errors": {
"titles": {
"dotnet-required": "需要 .NET 6"
"dotnet-required": "需要 .NET 8"
},
"msg": {
"401": "Steam 似乎不想让我们下载 Beat Saber😢",
@@ -261,10 +260,10 @@
"RateLimitExceeded": "你已经尝试了太多次,请稍等片刻,稍后再试。",
"TokenRejected": "你的登录令牌已被拒绝 😕 请重试。",
"AccessDenied": "访问 Steam 被拒绝。",
"dotnet-required": "必须安装 .NET 6 Runtime 才能下载 Beat Saber 版本。单击下面的按钮下载它。"
"dotnet-required": "必须安装 .NET 8 Runtime 才能下载 Beat Saber 版本。单击下面的按钮下载它。"
},
"actions": {
"download-dotnet": "下载 .NET 6"
"download-dotnet": "下载 .NET 8"
}
}
},
@@ -482,6 +481,15 @@
"title": "备份已创建",
"msg": "共享 “UserData” 文件夹可能会产生错误,如果出现问题,请取消关联该文件夹以恢复备份"
}
},
"linking-error": {
"title": "链接文件夹时出错",
"msg": {
"EPERM": "BSManager没有必要的权限来链接文件夹。",
"EACCES": "BSManager没有必要的权限来链接文件夹。",
"ENOSPC": "磁盘已满,请腾出空间后再试。",
"UNKNOWN_ERROR": "链接文件夹时发生未知错误。"
}
}
},
"create-launch-shortcut": {
@@ -695,9 +703,7 @@
"title": "警告",
"body": {
"must-be-installed-once": "你必须至少从 Oculus 商店安装过一次 BeatSaber,否则 BeatSaber 可能会在启动后自动关闭。",
"need-backup": "要启动该版本,位于你的 Oculus 库中的 BeatSaber 安装文件夹将被重命名。",
"can-restore-later": "如果需要,你可以通过前往 BSManager 的原始 Oculus 版本选项并点击'恢复文件夹'来恢复它。",
"tips-launch-oculus": "提示:只要原始版本没有被恢复,你就可以直接从 Oculus 启动该版本。"
"will-backup": "为了启动这个版本,位于您的Oculus库中的Beat Saber的原始安装文件夹将被重命名,并且在Beat Saber关闭时会自动恢复。"
},
"not-remind-me": "不再提醒我",
"understood": "明白了"
@@ -719,6 +725,16 @@
"enter-oculus-token": "输入Oculus令牌"
},
"valid-btn": "验证"
},
"launch-as-admin": {
"title": "管理员权限",
"body": {
"info": "检测到Steam正在以管理员权限运行。为了与Steam通信,Beat Saber也必须以管理员身份启动。否则,Beat Saber可能会遇到问题并在启动后关闭。",
"info-2": "以管理员模式启动Beat Saber还会将管理员权限赋予已安装的模组。因此,建议重启Steam,不使用管理员权限。",
"info-3": "请注意,不建议给Steam管理员权限,因为这也会影响已安装的游戏和模组,带来安全风险。"
},
"launch-as-admin": "以管理员身份启动",
"not-remind-me": "不再提醒我"
}
},
"maps": {
@@ -727,54 +743,55 @@
"nps" : "每秒音符数",
"tags": "标签",
"specificities": "general",
"requirements": "要求"
"requirements": "要求",
"exclude": "排除"
},
"map-types": {
"accuracy": "精确度",
"balanced": "平衡",
"challenge": "挑战",
"dancestyle": "舞蹈",
"dance-style": "舞蹈",
"fitness": "健身",
"speed": "速度",
"tech": "技术"
},
"map-styles": {
"dance": "dance",
"swing": "swing",
"nightcore": "nightcore",
"folk": "folk",
"family": "family",
"ambient": "ambient",
"funk": "funk",
"jazz": "jazz",
"soul": "soul",
"speedcore": "speedcore",
"punk": "punk",
"dance": "舞蹈",
"swing": "摇摆",
"nightcore": "夜核",
"folk-acoustic": "民谣 & 原声",
"kids-family": "儿童 & 家庭",
"ambient": "氛围音乐",
"funk-disco": "放克 & 迪斯科",
"jazz": "爵士",
"soul": "灵魂",
"speedcore": "极速核",
"punk": "朋克",
"rb": "r&b",
"holiday": "holiday",
"vocaloid": "vocaloid",
"jrock": "j-rock",
"trance": "trance",
"drumbass": "drum & bass",
"comedy": "comedy",
"instrumental": "instrumental",
"hardcore": "hardcore",
"kpop": "k-pop",
"indie": "indie",
"techno": "techno",
"house": "house",
"game": "video game",
"film": "film",
"alt": "alternative",
"dubstep": "dubstep",
"metal": "metal",
"anime": "anime",
"hiphop": "hiphop",
"jpop": "j-pop",
"rock": "rock",
"pop": "pop",
"electronic": "electronic",
"classical-orchestral": "Classical & Orchestral"
"holiday": "假日",
"vocaloid": "声库",
"j-rock": "日式摇滚",
"trance": "迷幻",
"drum-and-bass": "鼓 & 贝斯",
"comedy-meme": "喜剧 & 表情包",
"instrumental": "纯音乐",
"hardcore": "硬核",
"k-pop": "k-pop",
"indie": "独立",
"techno": "电子舞曲",
"house": "浩室音乐",
"video-game-soundtrack": "游戏音乐",
"tv-movie-soundtrack": "电视 & 电影",
"alternative": "另类",
"dubstep": "电音鼓",
"metal": "金属",
"anime": "动漫",
"hip-hop-rap": "嘻哈 & 说唱",
"j-pop": "日式流行",
"rock": "摇滚",
"pop": "流行",
"electronic": "电子",
"classical-orchestral": "古典 & 管弦乐"
},
"map-specificities": {
"automapper": "AI",
@@ -783,6 +800,9 @@
"verified": "verified",
"fullSpread": "full spread"
},
"map-excludes": {
"installed": "已安装"
},
"difficulties": {
"Easy": "easy",
"Normal": "normal",
@@ -955,10 +975,6 @@
"go-to-mods": "前往 Mod 页",
"not-remind": "不再提醒我"
},
"prevent-for-models-breaks": {
"title": "已损坏的模型",
"desc": "自从Beat Saber引擎更新以来,所有自定义模型的MOD都已损坏,需要更新。它们还没有被更新。"
},
"export-success": {
"title": "导出成功 🎉"
}
@@ -1,16 +1,17 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"name": ".NETCoreApp,Version=v8.0/win-x64",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"DepotDownloader/2.5.0": {
".NETCoreApp,Version=v8.0": {},
".NETCoreApp,Version=v8.0/win-x64": {
"DepotDownloader/2.7.3": {
"dependencies": {
"QRCoder": "1.4.3",
"SteamKit2": "2.5.0-Beta.1",
"protobuf-net": "3.2.16"
"Microsoft.Windows.CsWin32": "0.3.106",
"SteamKit2": "3.0.0-Beta.4",
"protobuf-net": "3.2.30"
},
"runtime": {
"DepotDownloader.dll": {}
@@ -23,60 +24,64 @@
"System.Security.Principal.Windows": "5.0.0"
}
},
"protobuf-net/3.2.16": {
"Microsoft.Windows.CsWin32/0.3.106": {
"dependencies": {
"protobuf-net.Core": "3.2.16"
"Microsoft.Windows.SDK.Win32Docs": "0.1.42-alpha",
"Microsoft.Windows.SDK.Win32Metadata": "60.0.34-preview",
"Microsoft.Windows.WDK.Win32Metadata": "0.11.4-experimental"
}
},
"Microsoft.Windows.SDK.Win32Docs/0.1.42-alpha": {},
"Microsoft.Windows.SDK.Win32Metadata/60.0.34-preview": {},
"Microsoft.Windows.WDK.Win32Metadata/0.11.4-experimental": {
"dependencies": {
"Microsoft.Windows.SDK.Win32Metadata": "60.0.34-preview"
}
},
"protobuf-net/3.2.30": {
"dependencies": {
"protobuf-net.Core": "3.2.30"
},
"runtime": {
"lib/net6.0/protobuf-net.dll": {
"assemblyVersion": "3.0.0.0",
"fileVersion": "3.2.16.54102"
"fileVersion": "3.2.30.709"
}
}
},
"protobuf-net.Core/3.2.16": {
"protobuf-net.Core/3.2.30": {
"dependencies": {
"System.Collections.Immutable": "7.0.0"
},
"runtime": {
"lib/net6.0/protobuf-net.Core.dll": {
"assemblyVersion": "3.0.0.0",
"fileVersion": "3.2.16.54102"
"fileVersion": "3.2.30.709"
}
}
},
"QRCoder/1.4.3": {
"runtime": {
"lib/net6.0/QRCoder.dll": {
"assemblyVersion": "1.4.3.0",
"fileVersion": "1.4.3.0"
}
}
},
"SteamKit2/2.5.0-Beta.1": {
"SteamKit2/3.0.0-Beta.4": {
"dependencies": {
"Microsoft.Win32.Registry": "5.0.0",
"protobuf-net": "3.2.16"
"System.IO.Hashing": "8.0.0",
"protobuf-net": "3.2.30"
},
"runtime": {
"lib/net6.0/SteamKit2.dll": {
"assemblyVersion": "2.5.0.0",
"fileVersion": "2.5.0.0"
"lib/net8.0/SteamKit2.dll": {
"assemblyVersion": "3.0.0.0",
"fileVersion": "3.0.0.0"
}
}
},
"System.Collections.Immutable/7.0.0": {
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
},
"System.Collections.Immutable/7.0.0": {},
"System.IO.Hashing/8.0.0": {
"runtime": {
"lib/net6.0/System.Collections.Immutable.dll": {
"assemblyVersion": "7.0.0.0",
"fileVersion": "7.0.22.51805"
"lib/net8.0/System.IO.Hashing.dll": {
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
}
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {},
"System.Security.AccessControl/5.0.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
@@ -87,7 +92,7 @@
}
},
"libraries": {
"DepotDownloader/2.5.0": {
"DepotDownloader/2.7.3": {
"type": "project",
"serviceable": false,
"sha512": ""
@@ -106,33 +111,54 @@
"path": "microsoft.win32.registry/5.0.0",
"hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512"
},
"protobuf-net/3.2.16": {
"Microsoft.Windows.CsWin32/0.3.106": {
"type": "package",
"serviceable": true,
"sha512": "sha512-W6RM2B2f5O7SigBGfkXFYzI/a7Mks+rCHtuGlE/b5O3NMupDon7I0akjCLhrfcnqIfdWDkDafseav/MnIzUSHA==",
"path": "protobuf-net/3.2.16",
"hashPath": "protobuf-net.3.2.16.nupkg.sha512"
"sha512": "sha512-Mx5fK7uN6fwLR4wUghs6//HonAnwPBNmC2oonyJVhCUlHS/r6SUS3NkBc3+gaQiv+0/9bqdj1oSCKQFkNI+21Q==",
"path": "microsoft.windows.cswin32/0.3.106",
"hashPath": "microsoft.windows.cswin32.0.3.106.nupkg.sha512"
},
"protobuf-net.Core/3.2.16": {
"Microsoft.Windows.SDK.Win32Docs/0.1.42-alpha": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ZFoY0lfMUWGJ4RoyI0oNj2o2l8t08n3k27YyDD0kYWQ+vXj0hTbWEwYWOpGAfCWvyUPkq9Jcc/4uR74GICZL2g==",
"path": "protobuf-net.core/3.2.16",
"hashPath": "protobuf-net.core.3.2.16.nupkg.sha512"
"sha512": "sha512-Z/9po23gUA9aoukirh2ItMU2ZS9++Js9Gdds9fu5yuMojDrmArvY2y+tq9985tR3cxFxpZO1O35Wjfo0khj5HA==",
"path": "microsoft.windows.sdk.win32docs/0.1.42-alpha",
"hashPath": "microsoft.windows.sdk.win32docs.0.1.42-alpha.nupkg.sha512"
},
"QRCoder/1.4.3": {
"Microsoft.Windows.SDK.Win32Metadata/60.0.34-preview": {
"type": "package",
"serviceable": true,
"sha512": "sha512-fWuFqjm8GTlEb2GqBl3Hi8HZZeZQwBSHxvRPtPjyNbT82H0ff0JwavKRBmMaXCno1Av6McPC8aJzri0Mj2w9Jw==",
"path": "qrcoder/1.4.3",
"hashPath": "qrcoder.1.4.3.nupkg.sha512"
"sha512": "sha512-TA3DUNi4CTeo+ItTXBnGZFt2159XOGSl0UOlG5vjDj4WHqZjhwYyyUnzOtrbCERiSaP2Hzg7otJNWwOSZgutyA==",
"path": "microsoft.windows.sdk.win32metadata/60.0.34-preview",
"hashPath": "microsoft.windows.sdk.win32metadata.60.0.34-preview.nupkg.sha512"
},
"SteamKit2/2.5.0-Beta.1": {
"Microsoft.Windows.WDK.Win32Metadata/0.11.4-experimental": {
"type": "package",
"serviceable": true,
"sha512": "sha512-fwwdF0cZZEIdNpcUc1+B9zbP5Q48A3DFOAclPhBh2dMTU03aROaIDktFW+Ww/NN1Z/Emp/LwVqHB+hCM8uxS4Q==",
"path": "steamkit2/2.5.0-beta.1",
"hashPath": "steamkit2.2.5.0-beta.1.nupkg.sha512"
"sha512": "sha512-bf5MCmUyZf0gBlYQjx9UpRAZWBkRndyt9XicR+UNLvAUAFTZQbu6YaX/sNKZlR98Grn0gydfh/yT4I3vc0AIQA==",
"path": "microsoft.windows.wdk.win32metadata/0.11.4-experimental",
"hashPath": "microsoft.windows.wdk.win32metadata.0.11.4-experimental.nupkg.sha512"
},
"protobuf-net/3.2.30": {
"type": "package",
"serviceable": true,
"sha512": "sha512-C/UTlmxEJHAHpqm8xQK1UyJKaIynVCSNG4mVrbLgnZ7ccH28nN49O8iMJvKEodTgVbnimvy+3mIiAdW6mATwnw==",
"path": "protobuf-net/3.2.30",
"hashPath": "protobuf-net.3.2.30.nupkg.sha512"
},
"protobuf-net.Core/3.2.30": {
"type": "package",
"serviceable": true,
"sha512": "sha512-v2ZxxYrz+X212ukSx+uqkLuPu414bvmSAnTyf+PBUKR9ENJxO4P/csorA/27456MCp1JNoMssDj/f91RDiwBfQ==",
"path": "protobuf-net.core/3.2.30",
"hashPath": "protobuf-net.core.3.2.30.nupkg.sha512"
},
"SteamKit2/3.0.0-Beta.4": {
"type": "package",
"serviceable": true,
"sha512": "sha512-gDLccGTbvg5RzqQE75uqL3z2Z0F8MTOnier97DdbBGi9F6DDbZQvquHf0INOAEyN7S5Ku+CgaKnkm409UD7avA==",
"path": "steamkit2/3.0.0-beta.4",
"hashPath": "steamkit2.3.0.0-beta.4.nupkg.sha512"
},
"System.Collections.Immutable/7.0.0": {
"type": "package",
@@ -141,12 +167,12 @@
"path": "system.collections.immutable/7.0.0",
"hashPath": "system.collections.immutable.7.0.0.nupkg.sha512"
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"System.IO.Hashing/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
"path": "system.runtime.compilerservices.unsafe/6.0.0",
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
"sha512": "sha512-ne1843evDugl0md7Fjzy6QjJrzsjh46ZKbhf8GwBXb5f/gw97J4bxMs0NQKifDuThh/f0bZ0e62NPl1jzTuRqA==",
"path": "system.io.hashing/8.0.0",
"hashPath": "system.io.hashing.8.0.0.nupkg.sha512"
},
"System.Security.AccessControl/5.0.0": {
"type": "package",
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,13 +1,16 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"tfm": "net8.0",
"rollForward": "LatestMajor",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
"version": "8.0.0"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
"System.Globalization.Invariant": true,
"System.Globalization.PredefinedCulturesOnly": true,
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}
+339
View File
@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-243
View File
@@ -1,243 +0,0 @@
/**
* Code taken from https://github.com/kubeshop/monokle/blob/main/tests/electronHelpers.ts
* don't tunch unless you know what you're doing
*/
import { Page } from "@playwright/test";
import path from "path";
import {ElectronApplication, _electron as electron} from 'playwright-core';
import { pause } from "shared/helpers/promise.helpers";
import log from "electron-log";
import * as fs from 'fs';
import * as ASAR from 'asar';
export const TEST_OUTPUT_DIR = 'test-results';
export async function startApp(): Promise<StartAppResponse> {
const latestBuild = findLatestBuild();
const appInfo = parseElectronApp(latestBuild);
const electronApp = await electron.launch({
args: [appInfo.main],
env: {
...process.env,
E2E_BUILD: "true",
},
executablePath: appInfo.executable,
recordVideo: {
dir: getRecordingPath(appInfo.platform),
size: {
width: 1200,
height: 800,
},
},
});
const appWindow = await electronApp.firstWindow();
if (!appWindow) {
throw new Error('Unable to get main window');
}
await pause(3000);
appWindow.on('console', log.info);
appWindow.screenshot({path: path.join(TEST_OUTPUT_DIR, "initial-screen.png")});
return {appWindow, appInfo, electronApp};
}
export function findLatestBuild(): string {
const rootDir = path.resolve('./');
const outDir = path.join(rootDir, 'release', 'build');
const builds = fs.readdirSync(outDir);
const platforms = ['win32', 'win', 'windows', 'darwin', 'mac', 'macos', 'osx', 'linux', 'ubuntu'];
const latestBuild = builds
.map(fileName => {
// make sure it's a directory with "-" delimited platform in its name
const stats = fs.statSync(path.join(outDir, fileName));
const isBuild = fileName.toLocaleLowerCase().split('-').some(part => platforms.includes(part));
if(!stats.isDirectory() || !isBuild){ return undefined; }
return {
name: fileName,
time: fs.statSync(path.join(outDir, fileName)).mtimeMs,
};
})
.sort((a, b) => b.time - a.time)
.map(file => file?.name)[0];
if (!latestBuild) {
throw new Error('No build found in out directory');
}
return path.join(outDir, latestBuild);
}
/**
* Given a directory containing an Electron app build,
* return the path to the app's executable and the path to the app's main file.
*/
export function parseElectronApp(buildDir: string): ElectronAppInfo {
log.info(`Parsing Electron app in ${buildDir}`);
let platform: string | undefined;
if (buildDir.endsWith('.app')) {
buildDir = path.dirname(buildDir);
platform = 'darwin';
}
else if (buildDir.endsWith('.exe')) {
buildDir = path.dirname(buildDir);
platform = 'win32';
}
const baseName = path.basename(buildDir).toLowerCase();
if (!platform) {
// parse the directory name to figure out the platform
if (baseName.includes('win')) {
platform = 'win32';
}
if (baseName.includes('linux') || baseName.includes('ubuntu') || baseName.includes('debian')) {
platform = 'linux';
}
if (baseName.includes('darwin') || baseName.includes('mac') || baseName.includes('osx')) {
platform = 'darwin';
}
}
if (!platform) {
throw new Error(`Platform not found in directory name: ${baseName}`);
}
let arch: Architecture;
if (baseName.includes('x32') || baseName.includes('i386')) {
arch = 'x32';
}
if (baseName.includes('x64')) {
arch = 'x64';
}
if (baseName.includes('arm64')) {
arch = 'arm64';
}
let executable: string;
let main: string;
let name: string;
let asar: boolean;
let resourcesDir: string;
if (platform === 'darwin') {
// MacOS Structure
// <buildDir>/
// <appName>.app/
// Contents/
// MacOS/
// <appName> (executable)
// Info.plist
// PkgInfo
// Resources/
// electron.icns
// file.icns
// app.asar (asar bundle) - or -
// app
// package.json
// (your app structure)
const list = fs.readdirSync(buildDir);
const appBundle = list.find(fileName => {
return fileName.endsWith('.app');
});
const appDir = path.join(buildDir, appBundle, 'Contents', 'MacOS');
const appName = fs.readdirSync(appDir)[0];
executable = path.join(appDir, appName);
resourcesDir = path.join(buildDir, appBundle, 'Contents', 'Resources');
const resourcesList = fs.readdirSync(resourcesDir);
asar = resourcesList.includes('app.asar');
let packageJson: {main: string; name: string};
if (asar) {
const asarPath = path.join(resourcesDir, 'app.asar');
packageJson = JSON.parse(ASAR.extractFile(asarPath, 'package.json').toString('utf8'));
main = path.join(asarPath, packageJson.main);
} else {
packageJson = JSON.parse(fs.readFileSync(path.join(resourcesDir, 'app', 'package.json'), 'utf8'));
main = path.join(resourcesDir, 'app', packageJson.main);
}
name = packageJson.name;
}
else if (platform === 'win32') {
// Windows Structure
// <buildDir>/
// <appName>.exe (executable)
// resources/
// app.asar (asar bundle) - or -
// app
// package.json
// (your app structure)
const list = fs.readdirSync(buildDir);
const exe = list.find(fileName => {
return fileName.endsWith('.exe');
});
executable = path.join(buildDir, exe);
resourcesDir = path.join(buildDir, 'resources');
const resourcesList = fs.readdirSync(resourcesDir);
asar = resourcesList.includes('app.asar');
let packageJson: {main: string; name: string};
if (asar) {
const asarPath = path.join(resourcesDir, 'app.asar');
packageJson = JSON.parse(ASAR.extractFile(asarPath, 'package.json').toString('utf8'));
main = path.join(asarPath, packageJson.main);
} else {
packageJson = JSON.parse(fs.readFileSync(path.join(resourcesDir, 'app', 'package.json'), 'utf8'));
main = path.join(resourcesDir, 'app', packageJson.main);
}
name = packageJson.name;
}
else {
/** @todo add support for linux */
throw new Error(`Platform not supported: ${platform}`);
}
return { executable, main, asar, name, platform, resourcesDir, arch };
}
export function getRecordingPath(...paths: string[]): string {
return path.join(TEST_OUTPUT_DIR, ...paths);
}
export function getMainWindow(windows: Page[]): Page {
const mainWindow = windows.find(w => w.url().includes('index.html'));
return mainWindow;
}
type Architecture = 'x64' | 'x32' | 'arm64';
export interface ElectronAppInfo {
/** Path to the app's executable file */
executable: string;
/** Path to the app's main (JS) file */
main: string;
/** Name of the app */
name: string;
/** Resources directory */
resourcesDir: string;
/** True if the app is using asar */
asar: boolean;
/** OS platform */
platform: 'darwin' | 'win32' | 'linux';
arch: Architecture;
}
interface StartAppResponse {
electronApp: ElectronApplication;
appWindow: Page;
appInfo: ElectronAppInfo;
}
-55
View File
@@ -1,55 +0,0 @@
import {Page} from 'playwright';
import { test, expect } from '@playwright/test';
import { getRecordingPath, startApp } from './helpers/electron.helpers';
import { pause } from 'shared/helpers/promise.helpers';
import { MainWindow } from './models/main-window.class';
import { AddVersionPanel } from './models/add-version-panel.class';
let appWindow: Page;
let mainWindow: MainWindow;
let addVersionPanel: AddVersionPanel;
test.beforeAll(async () => {
const startAppResponse = await startApp();
appWindow = startAppResponse.appWindow;
mainWindow = new MainWindow(appWindow);
addVersionPanel = new AddVersionPanel(appWindow);
});
test.beforeEach(async () => {
await pause(1000);
await mainWindow.clickAddVersionButton();
});
test.afterEach(async () => {
await pause(1000);
});
test('should be able to select then unselect a bs version', async () => {
const versionManifest = "8948172000430595334";
await addVersionPanel.selectYear("2021");
await pause(1000);
await addVersionPanel.clickVersion(versionManifest); // select version 0.12.2
await pause(1000);
expect(await addVersionPanel.downloadVersionButton.isVisible()).toBeTruthy();
await addVersionPanel.clickVersion(versionManifest); // deselect version 0.12.2
await pause(3000);
expect(await addVersionPanel.downloadVersionButton.isVisible()).toBeFalsy();
// sadly we can't test if the download works or not :( (Steam ids, dot-net, etc)
});
test('should be able to download a map then delete it', async () => {
// TODO: implement this test
});
test.afterAll(async () => {
await pause(3000);
await appWindow.screenshot({path: getRecordingPath("final-screen.png")});
await appWindow.close();
});
@@ -1,26 +0,0 @@
import { Page, Locator } from "playwright";
import { MainWindow } from "./main-window.class";
export class AddVersionPanel extends MainWindow {
private readonly _yearsTabBar: Locator;
private readonly _downloadVersionButton: Locator;
constructor(page: Page) {
super(page);
this._yearsTabBar = page.locator("#version-years-tab-bar");
this._downloadVersionButton = page.locator("#download-version-btn");
}
selectYear(year: string): Promise<void>{
return this._yearsTabBar.getByText(year).click();
}
clickVersion(manifest: string): Promise<void>{
return this._page.locator(`#version-item-${manifest}`).click();
}
get downloadVersionButton(): Locator { return this._downloadVersionButton; }
}
-36
View File
@@ -1,36 +0,0 @@
import { Page, Locator } from "playwright"
export class MainWindow {
protected readonly _page: Page;
private readonly _bsmLogo: Locator;
private readonly _addVersionButton: Locator;
private readonly _settingsButton: Locator;
private readonly _sharedContentButton: Locator;
constructor(page: Page) {
this._page = page;
this._bsmLogo = page.locator("#bsm-logo");
this._addVersionButton = page.locator("#add-version-btn");
this._settingsButton = page.locator("#settings-btn");
this._sharedContentButton = page.locator("#shared-contents-btn");
}
public async clickBsmLogo(): Promise<void> {
return this._bsmLogo.click();
}
public async clickAddVersionButton(): Promise<void> {
return this._addVersionButton.click();
}
public async clickSettingsButton(): Promise<void> {
return this._settingsButton.click();
}
public async clickSharedContentButton(): Promise<void> {
return this._sharedContentButton.click();
}
}
+2
View File
@@ -0,0 +1,2 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
+83
View File
@@ -0,0 +1,83 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "proc-macro2"
version = "1.0.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
dependencies = [
"proc-macro2",
]
[[package]]
name = "serde"
version = "1.0.195"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.195"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "start_beat_saber_admin"
version = "0.1.0"
dependencies = [
"winres",
]
[[package]]
name = "syn"
version = "2.0.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "toml"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
dependencies = [
"serde",
]
[[package]]
name = "unicode-ident"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "winres"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c"
dependencies = [
"toml",
]
+18
View File
@@ -0,0 +1,18 @@
[package]
name = "start_beat_saber_admin"
version = "0.1.0"
edition = "2021"
build = "build.rs"
[build-dependencies]
winres = "0.1.12"
[profile.release]
codegen-units = 1
lto = true
opt-level = "z"
[package.metadata.winres]
FileDescription = "Start Beat Saber as Admin"
LegalCopyright = "Copyright © 2024 Zagrios"
CompanyName = "Zagrios"
+20
View File
@@ -0,0 +1,20 @@
extern crate winres;
fn main() {
if cfg!(target_os = "windows") {
let mut res = winres::WindowsResource::new();
res.set_manifest(r#"
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
"#);
res.set_icon("./icon.ico");
res.compile().unwrap();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

+47
View File
@@ -0,0 +1,47 @@
use std::{process::Command, path::Path};
const EXECUTABLE_NAME: &str = "Beat Saber.exe";
const AUTORIZED_ARGS: [&str; 8] = [
"fpfc",
"-vrmode",
"oculus",
"--verbose",
"--no-yeet",
"--disable-autoupdate",
"--combine-logs",
"editor"
];
fn main() {
let args: Vec<String> = std::env::args().collect();
let executable_path = Path::new(&args[1]);
if executable_path.file_name().unwrap() != EXECUTABLE_NAME {
eprintln!("Executable path is not Beat Saber.exe.");
return;
}
if !executable_path.exists() || !executable_path.is_file() {
eprintln!("Executable path is not valid.");
return;
}
let mut command = Command::new(executable_path);
if let Some(parent_dir) = executable_path.parent() {
command.current_dir(parent_dir);
}
for arg in args.iter().skip(2) {
if !AUTORIZED_ARGS.contains(&arg.as_str()) {
continue;
}
command.arg(arg);
}
command.env("SteamAppId", "620980");
let _ = command.spawn();
}
+2
View File
@@ -0,0 +1,2 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
+281
View File
@@ -0,0 +1,281 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "core-foundation-sys"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
[[package]]
name = "crossbeam-deque"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
[[package]]
name = "either"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
[[package]]
name = "libc"
version = "0.2.153"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
[[package]]
name = "ntapi"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4"
dependencies = [
"winapi",
]
[[package]]
name = "oculus_symlink_cleaner"
version = "0.1.0"
dependencies = [
"sysinfo",
"winres",
]
[[package]]
name = "once_cell"
version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
[[package]]
name = "proc-macro2"
version = "1.0.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rayon"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
]
[[package]]
name = "serde"
version = "1.0.197"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.197"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "syn"
version = "2.0.52"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "sysinfo"
version = "0.30.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6746919caf9f2a85bff759535664c060109f21975c5ac2e8652e60102bd4d196"
dependencies = [
"cfg-if",
"core-foundation-sys",
"libc",
"ntapi",
"once_cell",
"rayon",
"windows",
]
[[package]]
name = "toml"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
dependencies = [
"serde",
]
[[package]]
name = "unicode-ident"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be"
dependencies = [
"windows-core",
"windows-targets",
]
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675"
[[package]]
name = "windows_i686_gnu"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3"
[[package]]
name = "windows_i686_msvc"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
[[package]]
name = "winres"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c"
dependencies = [
"toml",
]
+22
View File
@@ -0,0 +1,22 @@
[package]
name = "oculus_symlink_cleaner"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
winres = "0.1.12"
[dependencies]
sysinfo = "0.30.6"
[profile.release]
codegen-units = 1
lto = true
opt-level = "z"
[package.metadata.winres]
FileDescription = "Clean Oculus Symlink after Beat Saber ends"
LegalCopyright = "Copyright © 2024 Zagrios"
CompanyName = "Zagrios"
+9
View File
@@ -0,0 +1,9 @@
extern crate winres;
fn main() {
if cfg!(target_os = "windows") {
let mut res = winres::WindowsResource::new();
res.set_icon("./icon.ico");
res.compile().unwrap();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

+78
View File
@@ -0,0 +1,78 @@
use sysinfo::{Pid, ProcessRefreshKind, System};
use std::{env, thread, time::Duration, fs};
use std::ffi::OsStr;
use std::path::Path;
use std::str::FromStr;
const BEAT_SABER_OCULUS_FOLDER_NAME: &str = "hyperbolic-magnetism-beat-saber";
fn main() {
let args: Vec<String> = env::args().collect();
if args.len() != 3 {
eprintln!("Usage: {} <pid> <path_to_directory>", args[0]);
std::process::exit(1);
}
let pid: Pid = Pid::from_str(&args[1]).expect("Invalid pid");
let directory_path = Path::new(&args[2]);
if directory_path.file_name() != Some(OsStr::new(BEAT_SABER_OCULUS_FOLDER_NAME)) {
eprintln!("Directory name is not {}", BEAT_SABER_OCULUS_FOLDER_NAME);
std::process::exit(1);
}
// we want to monitor only processes
let mut system = System::new_with_specifics(sysinfo::RefreshKind::new().with_processes(ProcessRefreshKind::everything()));
loop {
system.refresh_processes();
let process = system.process(pid);
match process {
Some(_) => {
println!("Process {} is still running.", pid);
thread::sleep(Duration::from_secs(2));
},
None => {
println!("Process {} has stopped, deleting directory {:?}", pid, directory_path);
match delete_dir_if_is_symlink(directory_path) {
Ok(_) => {
println!("Directory {:?} deleted successfully.", directory_path);
if let Err(e) = rename_specific_backup_directory(directory_path.parent().unwrap()) {
eprintln!("Failed to rename backup directory: {}", e);
}
},
Err(e) => eprintln!("Failed to delete directory {:?}: {}", directory_path, e),
}
break;
}
}
}
}
fn delete_dir_if_is_symlink(path: &Path) -> Result<(), Box<dyn std::error::Error>>{
match path.symlink_metadata()?.file_type().is_symlink() {
true => {
fs::remove_dir_all(path)?;
Ok(())
},
false => {
eprintln!("Path {:?} is not a symlink.", path);
Err("Path is not a symlink.".into())
}
}
}
fn rename_specific_backup_directory(parent_path: &Path) -> Result<(), Box<dyn std::error::Error>> {
let backup_dir_name = format!("{}.bsmbak", BEAT_SABER_OCULUS_FOLDER_NAME);
let backup_path = parent_path.join(&backup_dir_name);
if backup_path.exists() && backup_path.is_dir() {
let new_path = parent_path.join(BEAT_SABER_OCULUS_FOLDER_NAME);
fs::rename(&backup_path, &new_path)?;
println!("Renamed {:?} to {:?}", backup_path, new_path);
Ok(())
} else {
Err(format!("Backup directory {:?} does not exist or is not a directory.", backup_path).into())
}
}
+312 -289
View File
@@ -24,6 +24,7 @@
"framer-motion": "^10.16.16",
"fs-extra": "^11.2.0",
"history": "^5.3.0",
"is-elevated": "^3.0.0",
"jszip": "^3.10.1",
"md5-file": "^5.0.0",
"node-abi": "^3.47.0",
@@ -55,7 +56,6 @@
},
"devDependencies": {
"@electron/rebuild": "^3.2.13",
"@playwright/test": "^1.38.1",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
"@teamsupercell/typings-for-css-modules-loader": "^2.5.1",
"@testing-library/jest-dom": "^5.16.5",
@@ -65,7 +65,7 @@
"@types/crypto-js": "^4.2.1",
"@types/dateformat": "^5.0.0",
"@types/jest": "^27.5.2",
"@types/node": "17.0.23",
"@types/node": "^20",
"@types/node-fetch": "^2.6.3",
"@types/pako": "^2.0.1",
"@types/react": "^18.0.33",
@@ -82,7 +82,6 @@
"@types/webpack-env": "^1.18.0",
"@typescript-eslint/eslint-plugin": "^5.34.0",
"@typescript-eslint/parser": "^5.34.0",
"asar": "^3.2.0",
"autoprefixer": "^10.4.8",
"browserslist-config-erb": "^0.0.3",
"chalk": "^4.1.2",
@@ -116,8 +115,6 @@
"lint-staged": "^12.5.0",
"mini-css-extract-plugin": "^2.6.1",
"opencollective-postinstall": "^2.0.3",
"playwright": "^1.38.1",
"playwright-core": "^1.38.1",
"postcss": "^8.4.16",
"postcss-loader": "^6.2.1",
"prettier": "^2.7.1",
@@ -141,8 +138,7 @@
"webpack-bundle-analyzer": "^4.6.1",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.10.0",
"webpack-merge": "^5.8.0",
"xvfb-maybe": "^0.2.1"
"webpack-merge": "^5.8.0"
}
},
"node_modules/@adobe/css-tools": {
@@ -2020,21 +2016,6 @@
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/@playwright/test": {
"version": "1.38.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.38.1.tgz",
"integrity": "sha512-NqRp8XMwj3AK+zKLbZShl0r/9wKgzqI/527bkptKXomtuo+dOjU9NdMASQ8DNC9z9zLOMbG53T4eihYr3XR+BQ==",
"dev": true,
"dependencies": {
"playwright": "1.38.1"
},
"bin": {
"playwright": "cli.js"
},
"engines": {
"node": ">=16"
}
},
"node_modules/@pmmmwh/react-refresh-webpack-plugin": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.5.tgz",
@@ -2497,12 +2478,6 @@
"@types/responselike": "^1.0.0"
}
},
"node_modules/@types/cacheable-request/node_modules/@types/node": {
"version": "18.11.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
"integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
"dev": true
},
"node_modules/@types/color": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/color/-/color-3.0.3.tgz",
@@ -2720,12 +2695,6 @@
"@types/node": "*"
}
},
"node_modules/@types/keyv/node_modules/@types/node": {
"version": "18.11.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
"integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
"dev": true
},
"node_modules/@types/mime": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz",
@@ -2745,10 +2714,14 @@
"dev": true
},
"node_modules/@types/node": {
"version": "17.0.23",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==",
"devOptional": true
"version": "20.17.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.1.tgz",
"integrity": "sha512-j2VlPv1NnwPJbaCNv69FO/1z4lId0QmGvpT41YxitRtWlg96g/j8qcv2RKsLKe2F6OJgyXhupN1Xo17b2m139Q==",
"devOptional": true,
"license": "MIT",
"dependencies": {
"undici-types": "~6.19.2"
}
},
"node_modules/@types/node-fetch": {
"version": "2.6.3",
@@ -2906,12 +2879,6 @@
"@types/node": "*"
}
},
"node_modules/@types/responselike/node_modules/@types/node": {
"version": "18.11.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
"integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
"dev": true
},
"node_modules/@types/retry": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz",
@@ -4143,48 +4110,6 @@
"node": ">=0.10.0"
}
},
"node_modules/asar": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/asar/-/asar-3.2.0.tgz",
"integrity": "sha512-COdw2ZQvKdFGFxXwX3oYh2/sOsJWJegrdJCGxnN4MZ7IULgRBp9P6665aqj9z1v9VwP4oP1hRBojRDQ//IGgAg==",
"deprecated": "Please use @electron/asar moving forward. There is no API change, just a package name change",
"dev": true,
"dependencies": {
"chromium-pickle-js": "^0.2.0",
"commander": "^5.0.0",
"glob": "^7.1.6",
"minimatch": "^3.0.4"
},
"bin": {
"asar": "bin/asar.js"
},
"engines": {
"node": ">=10.12.0"
},
"optionalDependencies": {
"@types/glob": "^7.1.1"
}
},
"node_modules/asar/node_modules/@types/glob": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
"integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==",
"dev": true,
"optional": true,
"dependencies": {
"@types/minimatch": "*",
"@types/node": "*"
}
},
"node_modules/asar/node_modules/commander": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
"integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==",
"dev": true,
"engines": {
"node": ">= 6"
}
},
"node_modules/asn1": {
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
@@ -7109,7 +7034,6 @@
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
"dependencies": {
"once": "^1.4.0"
}
@@ -10353,6 +10277,125 @@
"node": ">= 10"
}
},
"node_modules/is-admin": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-admin/-/is-admin-3.0.0.tgz",
"integrity": "sha512-wOa3CXFJAu8BZ2BDtG9xYOOrsq6oiSvc2jFPy4X/HINx5bmJUcW8e+apItVbU2E7GIfBVaFVO7Zit4oAWtTJcw==",
"dependencies": {
"execa": "^1.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/is-admin/node_modules/cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"dependencies": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
"semver": "^5.5.0",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
},
"engines": {
"node": ">=4.8"
}
},
"node_modules/is-admin/node_modules/execa": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
"dependencies": {
"cross-spawn": "^6.0.0",
"get-stream": "^4.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"signal-exit": "^3.0.0",
"strip-eof": "^1.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/is-admin/node_modules/get-stream": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
"dependencies": {
"pump": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/is-admin/node_modules/is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-admin/node_modules/npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==",
"dependencies": {
"path-key": "^2.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/is-admin/node_modules/path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==",
"engines": {
"node": ">=4"
}
},
"node_modules/is-admin/node_modules/semver": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"bin": {
"semver": "bin/semver"
}
},
"node_modules/is-admin/node_modules/shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
"dependencies": {
"shebang-regex": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-admin/node_modules/shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-admin/node_modules/which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"which": "bin/which"
}
},
"node_modules/is-arguments": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
@@ -10493,6 +10536,18 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-elevated": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-elevated/-/is-elevated-3.0.0.tgz",
"integrity": "sha512-wjcp6RkouU9jpg55zERl+BglvV5j4jx5c/EMvQ+d12j/+nIEenNWPu+qc0tCg3JkLodbKZMg1qhJzEwG4qjclg==",
"dependencies": {
"is-admin": "^3.0.0",
"is-root": "^2.1.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
@@ -10657,6 +10712,14 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-root": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz",
"integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==",
"engines": {
"node": ">=6"
}
},
"node_modules/is-set": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz",
@@ -10822,8 +10885,7 @@
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"dev": true
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="
},
"node_modules/isobject": {
"version": "3.0.1",
@@ -13634,6 +13696,11 @@
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true
},
"node_modules/nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
},
"node_modules/no-case": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
@@ -14142,6 +14209,14 @@
"node": ">=8"
}
},
"node_modules/p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
"integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==",
"engines": {
"node": ">=4"
}
},
"node_modules/p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
@@ -14513,36 +14588,6 @@
"node": ">=8"
}
},
"node_modules/playwright": {
"version": "1.38.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.38.1.tgz",
"integrity": "sha512-oRMSJmZrOu1FP5iu3UrCx8JEFRIMxLDM0c/3o4bpzU5Tz97BypefWf7TuTNPWeCe279TPal5RtPPZ+9lW/Qkow==",
"dev": true,
"dependencies": {
"playwright-core": "1.38.1"
},
"bin": {
"playwright": "cli.js"
},
"engines": {
"node": ">=16"
},
"optionalDependencies": {
"fsevents": "2.3.2"
}
},
"node_modules/playwright-core": {
"version": "1.38.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.38.1.tgz",
"integrity": "sha512-tQqNFUKa3OfMf4b2jQ7aGLB8o9bS3bOY0yMEtldtC2+spf8QXG9zvXLTXUeRsoNuxEYMgLYR+NXfAa1rjKRcrg==",
"dev": true,
"bin": {
"playwright-core": "cli.js"
},
"engines": {
"node": ">=16"
}
},
"node_modules/plist": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz",
@@ -15481,7 +15526,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dev": true,
"dependencies": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
@@ -16721,8 +16765,7 @@
"node_modules/signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"dev": true
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
},
"node_modules/simple-swizzle": {
"version": "0.2.2",
@@ -17183,6 +17226,14 @@
"node": ">=4"
}
},
"node_modules/strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
"integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/strip-final-newline": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
@@ -18137,6 +18188,13 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/undici-types": {
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"devOptional": true,
"license": "MIT"
},
"node_modules/unique-filename": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz",
@@ -19173,46 +19231,6 @@
"node": ">=0.4"
}
},
"node_modules/xvfb-maybe": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/xvfb-maybe/-/xvfb-maybe-0.2.1.tgz",
"integrity": "sha512-9IyRz3l6Qyhl6LvnGRF5jMPB4oBEepQnuzvVAFTynP6ACLLSevqigICJ9d/+ofl29m2daeaVBChnPYUnaeJ7yA==",
"dev": true,
"dependencies": {
"debug": "^2.2.0",
"which": "^1.2.4"
},
"bin": {
"xvfb-maybe": "src/xvfb-maybe.js"
}
},
"node_modules/xvfb-maybe/node_modules/debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"dependencies": {
"ms": "2.0.0"
}
},
"node_modules/xvfb-maybe/node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
"dev": true
},
"node_modules/xvfb-maybe/node_modules/which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"dev": true,
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"which": "bin/which"
}
},
"node_modules/y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
@@ -20807,15 +20825,6 @@
"rimraf": "^3.0.2"
}
},
"@playwright/test": {
"version": "1.38.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.38.1.tgz",
"integrity": "sha512-NqRp8XMwj3AK+zKLbZShl0r/9wKgzqI/527bkptKXomtuo+dOjU9NdMASQ8DNC9z9zLOMbG53T4eihYr3XR+BQ==",
"dev": true,
"requires": {
"playwright": "1.38.1"
}
},
"@pmmmwh/react-refresh-webpack-plugin": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.5.tgz",
@@ -21163,14 +21172,6 @@
"@types/keyv": "^3.1.4",
"@types/node": "*",
"@types/responselike": "^1.0.0"
},
"dependencies": {
"@types/node": {
"version": "18.11.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
"integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
"dev": true
}
}
},
"@types/color": {
@@ -21388,14 +21389,6 @@
"dev": true,
"requires": {
"@types/node": "*"
},
"dependencies": {
"@types/node": {
"version": "18.11.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
"integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
"dev": true
}
}
},
"@types/mime": {
@@ -21417,10 +21410,13 @@
"dev": true
},
"@types/node": {
"version": "17.0.23",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==",
"devOptional": true
"version": "20.17.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.1.tgz",
"integrity": "sha512-j2VlPv1NnwPJbaCNv69FO/1z4lId0QmGvpT41YxitRtWlg96g/j8qcv2RKsLKe2F6OJgyXhupN1Xo17b2m139Q==",
"devOptional": true,
"requires": {
"undici-types": "~6.19.2"
}
},
"@types/node-fetch": {
"version": "2.6.3",
@@ -21577,14 +21573,6 @@
"dev": true,
"requires": {
"@types/node": "*"
},
"dependencies": {
"@types/node": {
"version": "18.11.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
"integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
"dev": true
}
}
},
"@types/retry": {
@@ -22541,38 +22529,6 @@
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
"integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA=="
},
"asar": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/asar/-/asar-3.2.0.tgz",
"integrity": "sha512-COdw2ZQvKdFGFxXwX3oYh2/sOsJWJegrdJCGxnN4MZ7IULgRBp9P6665aqj9z1v9VwP4oP1hRBojRDQ//IGgAg==",
"dev": true,
"requires": {
"@types/glob": "^7.1.1",
"chromium-pickle-js": "^0.2.0",
"commander": "^5.0.0",
"glob": "^7.1.6",
"minimatch": "^3.0.4"
},
"dependencies": {
"@types/glob": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
"integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==",
"dev": true,
"optional": true,
"requires": {
"@types/minimatch": "*",
"@types/node": "*"
}
},
"commander": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
"integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==",
"dev": true
}
}
},
"asn1": {
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
@@ -24783,7 +24739,6 @@
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
"requires": {
"once": "^1.4.0"
}
@@ -27151,6 +27106,94 @@
"integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==",
"dev": true
},
"is-admin": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-admin/-/is-admin-3.0.0.tgz",
"integrity": "sha512-wOa3CXFJAu8BZ2BDtG9xYOOrsq6oiSvc2jFPy4X/HINx5bmJUcW8e+apItVbU2E7GIfBVaFVO7Zit4oAWtTJcw==",
"requires": {
"execa": "^1.0.0"
},
"dependencies": {
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"requires": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
"semver": "^5.5.0",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
},
"execa": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
"requires": {
"cross-spawn": "^6.0.0",
"get-stream": "^4.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"signal-exit": "^3.0.0",
"strip-eof": "^1.0.0"
}
},
"get-stream": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
"requires": {
"pump": "^3.0.0"
}
},
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ=="
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==",
"requires": {
"path-key": "^2.0.0"
}
},
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw=="
},
"semver": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="
},
"shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
"requires": {
"shebang-regex": "^1.0.0"
}
},
"shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ=="
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
}
}
},
"is-arguments": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
@@ -27246,6 +27289,15 @@
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
"dev": true
},
"is-elevated": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-elevated/-/is-elevated-3.0.0.tgz",
"integrity": "sha512-wjcp6RkouU9jpg55zERl+BglvV5j4jx5c/EMvQ+d12j/+nIEenNWPu+qc0tCg3JkLodbKZMg1qhJzEwG4qjclg==",
"requires": {
"is-admin": "^3.0.0",
"is-root": "^2.1.0"
}
},
"is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
@@ -27356,6 +27408,11 @@
"has-tostringtag": "^1.0.0"
}
},
"is-root": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz",
"integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg=="
},
"is-set": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz",
@@ -27467,8 +27524,7 @@
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"dev": true
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="
},
"isobject": {
"version": "3.0.1",
@@ -29756,6 +29812,11 @@
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true
},
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
},
"no-case": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
@@ -30127,6 +30188,11 @@
"integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",
"dev": true
},
"p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
"integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow=="
},
"p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
@@ -30409,22 +30475,6 @@
"find-up": "^3.0.0"
}
},
"playwright": {
"version": "1.38.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.38.1.tgz",
"integrity": "sha512-oRMSJmZrOu1FP5iu3UrCx8JEFRIMxLDM0c/3o4bpzU5Tz97BypefWf7TuTNPWeCe279TPal5RtPPZ+9lW/Qkow==",
"dev": true,
"requires": {
"fsevents": "2.3.2",
"playwright-core": "1.38.1"
}
},
"playwright-core": {
"version": "1.38.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.38.1.tgz",
"integrity": "sha512-tQqNFUKa3OfMf4b2jQ7aGLB8o9bS3bOY0yMEtldtC2+spf8QXG9zvXLTXUeRsoNuxEYMgLYR+NXfAa1rjKRcrg==",
"dev": true
},
"plist": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz",
@@ -31033,7 +31083,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dev": true,
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
@@ -31976,8 +32025,7 @@
"signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"dev": true
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
},
"simple-swizzle": {
"version": "0.2.2",
@@ -32341,6 +32389,11 @@
"integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
"dev": true
},
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
"integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q=="
},
"strip-final-newline": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
@@ -33033,6 +33086,12 @@
"which-boxed-primitive": "^1.0.2"
}
},
"undici-types": {
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"devOptional": true
},
"unique-filename": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz",
@@ -33789,42 +33848,6 @@
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
},
"xvfb-maybe": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/xvfb-maybe/-/xvfb-maybe-0.2.1.tgz",
"integrity": "sha512-9IyRz3l6Qyhl6LvnGRF5jMPB4oBEepQnuzvVAFTynP6ACLLSevqigICJ9d/+ofl29m2daeaVBChnPYUnaeJ7yA==",
"dev": true,
"requires": {
"debug": "^2.2.0",
"which": "^1.2.4"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
"dev": true
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"dev": true,
"requires": {
"isexe": "^2.0.0"
}
}
}
},
"y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+10 -10
View File
@@ -14,9 +14,7 @@
"start:preload": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.preload.dev.ts",
"start:renderer": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts",
"test": "jest",
"publish": "npm run build && electron-builder -c.win.certificateSha1=842a817a51e2a1d360fcd62f54bf5f9193e919e1 --publish always --win --x64",
"e2e-test": "npm run package && xvfb-maybe npx playwright test --workers=1",
"e2e-test-ci": "xvfb-maybe npx playwright test --workers=1"
"publish": "npm run build && electron-builder -c.win.certificateSha1=206941d969c4fa8a0e04d9427def361e13b02fd0 --publish always --win --x64"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
@@ -78,6 +76,9 @@
]
},
"win": {
"signingHashAlgorithms": [
"sha256"
],
"target": [
"nsis",
"nsis-web"
@@ -151,7 +152,6 @@
},
"devDependencies": {
"@electron/rebuild": "^3.2.13",
"@playwright/test": "^1.38.1",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
"@teamsupercell/typings-for-css-modules-loader": "^2.5.1",
"@testing-library/jest-dom": "^5.16.5",
@@ -161,7 +161,7 @@
"@types/crypto-js": "^4.2.1",
"@types/dateformat": "^5.0.0",
"@types/jest": "^27.5.2",
"@types/node": "17.0.23",
"@types/node": "^20",
"@types/node-fetch": "^2.6.3",
"@types/pako": "^2.0.1",
"@types/react": "^18.0.33",
@@ -178,7 +178,6 @@
"@types/webpack-env": "^1.18.0",
"@typescript-eslint/eslint-plugin": "^5.34.0",
"@typescript-eslint/parser": "^5.34.0",
"asar": "^3.2.0",
"autoprefixer": "^10.4.8",
"browserslist-config-erb": "^0.0.3",
"chalk": "^4.1.2",
@@ -212,8 +211,6 @@
"lint-staged": "^12.5.0",
"mini-css-extract-plugin": "^2.6.1",
"opencollective-postinstall": "^2.0.3",
"playwright": "^1.38.1",
"playwright-core": "^1.38.1",
"postcss": "^8.4.16",
"postcss-loader": "^6.2.1",
"prettier": "^2.7.1",
@@ -237,8 +234,7 @@
"webpack-bundle-analyzer": "^4.6.1",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.10.0",
"webpack-merge": "^5.8.0",
"xvfb-maybe": "^0.2.1"
"webpack-merge": "^5.8.0"
},
"dependencies": {
"@electron/fuses": "^1.6.2",
@@ -257,6 +253,7 @@
"framer-motion": "^10.16.16",
"fs-extra": "^11.2.0",
"history": "^5.3.0",
"is-elevated": "^3.0.0",
"jszip": "^3.10.1",
"md5-file": "^5.0.0",
"node-abi": "^3.47.0",
@@ -323,5 +320,8 @@
"!assets/**"
],
"logLevel": "quiet"
},
"volta": {
"node": "20.18.0"
}
}
-18
View File
@@ -1,18 +0,0 @@
import { defineConfig, devices } from '@playwright/test';
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./e2e-tests",
testMatch: "**/*.test.ts",
timeout: 200000,
fullyParallel: true,
retries: 1,
});
+258 -33
View File
@@ -1,17 +1,18 @@
{
"name": "bs-manager",
"version": "1.4.3",
"version": "1.4.12",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "bs-manager",
"version": "1.4.3",
"version": "1.4.12",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"ps-list": "^7.2.0",
"regedit-rs": "^1.0.1",
"query-process": "^0.0.3",
"regedit-rs": "^1.0.2",
"sharp": "^0.32.6"
}
},
@@ -344,6 +345,160 @@
"once": "^1.3.1"
}
},
"node_modules/query-process": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process/-/query-process-0.0.3.tgz",
"integrity": "sha512-6WRue0P+c84abP0o8MkDvigoS/gkkJzsSBt10PsOoBkP7Yodo4DducFsn9XyS4S+LuVYPAE5Hr4+kVNR5Onykg==",
"engines": {
"node": ">= 10"
},
"optionalDependencies": {
"query-process-android-arm-eabi": "0.0.3",
"query-process-android-arm64": "0.0.3",
"query-process-linux-arm-gnueabihf": "0.0.3",
"query-process-linux-arm64-gnu": "0.0.3",
"query-process-linux-arm64-musl": "0.0.3",
"query-process-linux-x64-gnu": "0.0.3",
"query-process-linux-x64-musl": "0.0.3",
"query-process-win32-arm64-msvc": "0.0.3",
"query-process-win32-x64-msvc": "0.0.3"
}
},
"node_modules/query-process-android-arm-eabi": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-android-arm-eabi/-/query-process-android-arm-eabi-0.0.3.tgz",
"integrity": "sha512-NB+9T+/poBcygDiG+7d2lJSeioP5ZyLT0HwUBdnLgNWvNCpzbJxydup1SLpnt5G2NF6nlTgbUZlH4hvxY7t/bw==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/query-process-android-arm64": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-android-arm64/-/query-process-android-arm64-0.0.3.tgz",
"integrity": "sha512-TiAw2yO62vQzM0s02471LToHyUs/PRkLGGlA715z10BPIM5NckzIe245AI45CDyH6tE/3nVHUd0LX/dfjQtTcw==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/query-process-linux-arm-gnueabihf": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-linux-arm-gnueabihf/-/query-process-linux-arm-gnueabihf-0.0.3.tgz",
"integrity": "sha512-w7NLHBKt7qselCDoh/PVWyeuEb2NiiDDf1A9UB4K3Ns/H24hK3NbfMMBm8mCFxUnFUqoVX8O+VMs7dD/FNlTxA==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/query-process-linux-arm64-gnu": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-linux-arm64-gnu/-/query-process-linux-arm64-gnu-0.0.3.tgz",
"integrity": "sha512-nrPHjnSqCBuuN7IZkZWOnBpiJjyKOjfpT0Xt2EjSGp+I7C0CHbnhCL/vG1hBzaWZn0mxJ5nf0c5N0Fja7krnpQ==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/query-process-linux-arm64-musl": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-linux-arm64-musl/-/query-process-linux-arm64-musl-0.0.3.tgz",
"integrity": "sha512-vk8xMYTnS1PRKhwJgqLKyBAGIFP2CYZW2BsaKuNgQKUrDv7NnBaG7yukZT8niHNO1ycSrFpR/xqeJ8R23hO07A==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/query-process-linux-x64-gnu": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-linux-x64-gnu/-/query-process-linux-x64-gnu-0.0.3.tgz",
"integrity": "sha512-j1tGcNnGyVCABJ1PHZD1gKuyuomNzsPow3NDuZzUGjPqvKu67RsmKJJJOhMyT1SvUkcqdLFdtS1KTD20I4GS5Q==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/query-process-linux-x64-musl": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-linux-x64-musl/-/query-process-linux-x64-musl-0.0.3.tgz",
"integrity": "sha512-AOGrrI/Qcb30iKFstiW60zNG/HQevCY0Q38eMHGd7LrBZ5sEN7NzZOjzKp43KeNHejuZBDMxf0gdGAqDznOAng==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/query-process-win32-arm64-msvc": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-win32-arm64-msvc/-/query-process-win32-arm64-msvc-0.0.3.tgz",
"integrity": "sha512-LHvxbzMFwPPUXHe4bDCAqs1bYbp8j0bMW8XyJGPZnIYrnwHz6g8VE5WQEtXQxSznsbfVxAKJXUtn088EjDVazw==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/query-process-win32-x64-msvc": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-win32-x64-msvc/-/query-process-win32-x64-msvc-0.0.3.tgz",
"integrity": "sha512-LfHAKmfqyKCgl9K+sTz0KyNwMwB79VcXZUy/Et9iQKLuZt7PDYpHWcFdhrfHw2qqIdKWTED8KmnmsOLhUn/2OA==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/queue-tick": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz",
@@ -377,22 +532,22 @@
}
},
"node_modules/regedit-rs": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/regedit-rs/-/regedit-rs-1.0.1.tgz",
"integrity": "sha512-wsvoGP5JDevIcx3q52aATW1c1dY86bQx7/tJ32gqV+L98OHRJykobKkjYqGzROtz9c2Pr+wGJZr0glFyc2dpvQ==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regedit-rs/-/regedit-rs-1.0.2.tgz",
"integrity": "sha512-4vEgiZNO1FCG8z/Zx3v/6PU1+eZ+ELe6R0ca+VB96Vw+Mi3M0IVHAjtMFbl97lUSX11dJqpyousX/wY8QcI1lA==",
"engines": {
"node": ">= 10"
},
"optionalDependencies": {
"regedit-rs-win32-arm64-msvc": "1.0.1",
"regedit-rs-win32-ia32-msvc": "1.0.1",
"regedit-rs-win32-x64-msvc": "1.0.1"
"regedit-rs-win32-arm64-msvc": "1.0.2",
"regedit-rs-win32-ia32-msvc": "1.0.2",
"regedit-rs-win32-x64-msvc": "1.0.2"
}
},
"node_modules/regedit-rs-win32-arm64-msvc": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/regedit-rs-win32-arm64-msvc/-/regedit-rs-win32-arm64-msvc-1.0.1.tgz",
"integrity": "sha512-QA46d/wiUHlW2h0ZlHKrtDhnwoxMpVle+EbFziEbLYC7dimtAiWCeXu4zNymaFClDimYSifQkWgza5GBmD8etg==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regedit-rs-win32-arm64-msvc/-/regedit-rs-win32-arm64-msvc-1.0.2.tgz",
"integrity": "sha512-hM1sxazOJWKmiC9DM8QXW9Iqm50Mh/Y9G4/rRYQpWXjMzq7lTqjwVZRkAoBrHliFS6d1Lt4qkm5+Ybt6GkbDpw==",
"cpu": [
"arm64"
],
@@ -405,9 +560,9 @@
}
},
"node_modules/regedit-rs-win32-ia32-msvc": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/regedit-rs-win32-ia32-msvc/-/regedit-rs-win32-ia32-msvc-1.0.1.tgz",
"integrity": "sha512-V2NisvicQqiozl0yMas9tjDYmBwHWf48M/dMJUWMQxxkJaDCNoHW8PljL59A/h8ew2NBFsJK5RYkYfxW1o+OyQ==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regedit-rs-win32-ia32-msvc/-/regedit-rs-win32-ia32-msvc-1.0.2.tgz",
"integrity": "sha512-FLINrCJ30wm6NYw7skQUDET8NP1N46kH77dqesCiU+/FjWzzPE5luZYY+j4uf+hKjPY6/MCj2CB9l9VdPhaBVQ==",
"cpu": [
"ia32"
],
@@ -420,9 +575,9 @@
}
},
"node_modules/regedit-rs-win32-x64-msvc": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/regedit-rs-win32-x64-msvc/-/regedit-rs-win32-x64-msvc-1.0.1.tgz",
"integrity": "sha512-qhQawjYPzXGrz0xODJiviwrzw0eytGP9+quuQJUQAiLEw2P1tQ0LCyID3jOvNltLH+tqJChSV4JaQcPVleohZg==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regedit-rs-win32-x64-msvc/-/regedit-rs-win32-x64-msvc-1.0.2.tgz",
"integrity": "sha512-ccCSyd5vWBKVWftBKLKzegqwwPMWcQtIW0ub66dCFFuv2s+x2EcZZWGdD9dVXX2Z6V9DU2JRPKgWUNjVPaj6Xg==",
"cpu": [
"x64"
],
@@ -851,6 +1006,76 @@
"once": "^1.3.1"
}
},
"query-process": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process/-/query-process-0.0.3.tgz",
"integrity": "sha512-6WRue0P+c84abP0o8MkDvigoS/gkkJzsSBt10PsOoBkP7Yodo4DducFsn9XyS4S+LuVYPAE5Hr4+kVNR5Onykg==",
"requires": {
"query-process-android-arm-eabi": "0.0.3",
"query-process-android-arm64": "0.0.3",
"query-process-linux-arm-gnueabihf": "0.0.3",
"query-process-linux-arm64-gnu": "0.0.3",
"query-process-linux-arm64-musl": "0.0.3",
"query-process-linux-x64-gnu": "0.0.3",
"query-process-linux-x64-musl": "0.0.3",
"query-process-win32-arm64-msvc": "0.0.3",
"query-process-win32-x64-msvc": "0.0.3"
}
},
"query-process-android-arm-eabi": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-android-arm-eabi/-/query-process-android-arm-eabi-0.0.3.tgz",
"integrity": "sha512-NB+9T+/poBcygDiG+7d2lJSeioP5ZyLT0HwUBdnLgNWvNCpzbJxydup1SLpnt5G2NF6nlTgbUZlH4hvxY7t/bw==",
"optional": true
},
"query-process-android-arm64": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-android-arm64/-/query-process-android-arm64-0.0.3.tgz",
"integrity": "sha512-TiAw2yO62vQzM0s02471LToHyUs/PRkLGGlA715z10BPIM5NckzIe245AI45CDyH6tE/3nVHUd0LX/dfjQtTcw==",
"optional": true
},
"query-process-linux-arm-gnueabihf": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-linux-arm-gnueabihf/-/query-process-linux-arm-gnueabihf-0.0.3.tgz",
"integrity": "sha512-w7NLHBKt7qselCDoh/PVWyeuEb2NiiDDf1A9UB4K3Ns/H24hK3NbfMMBm8mCFxUnFUqoVX8O+VMs7dD/FNlTxA==",
"optional": true
},
"query-process-linux-arm64-gnu": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-linux-arm64-gnu/-/query-process-linux-arm64-gnu-0.0.3.tgz",
"integrity": "sha512-nrPHjnSqCBuuN7IZkZWOnBpiJjyKOjfpT0Xt2EjSGp+I7C0CHbnhCL/vG1hBzaWZn0mxJ5nf0c5N0Fja7krnpQ==",
"optional": true
},
"query-process-linux-arm64-musl": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-linux-arm64-musl/-/query-process-linux-arm64-musl-0.0.3.tgz",
"integrity": "sha512-vk8xMYTnS1PRKhwJgqLKyBAGIFP2CYZW2BsaKuNgQKUrDv7NnBaG7yukZT8niHNO1ycSrFpR/xqeJ8R23hO07A==",
"optional": true
},
"query-process-linux-x64-gnu": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-linux-x64-gnu/-/query-process-linux-x64-gnu-0.0.3.tgz",
"integrity": "sha512-j1tGcNnGyVCABJ1PHZD1gKuyuomNzsPow3NDuZzUGjPqvKu67RsmKJJJOhMyT1SvUkcqdLFdtS1KTD20I4GS5Q==",
"optional": true
},
"query-process-linux-x64-musl": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-linux-x64-musl/-/query-process-linux-x64-musl-0.0.3.tgz",
"integrity": "sha512-AOGrrI/Qcb30iKFstiW60zNG/HQevCY0Q38eMHGd7LrBZ5sEN7NzZOjzKp43KeNHejuZBDMxf0gdGAqDznOAng==",
"optional": true
},
"query-process-win32-arm64-msvc": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-win32-arm64-msvc/-/query-process-win32-arm64-msvc-0.0.3.tgz",
"integrity": "sha512-LHvxbzMFwPPUXHe4bDCAqs1bYbp8j0bMW8XyJGPZnIYrnwHz6g8VE5WQEtXQxSznsbfVxAKJXUtn088EjDVazw==",
"optional": true
},
"query-process-win32-x64-msvc": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/query-process-win32-x64-msvc/-/query-process-win32-x64-msvc-0.0.3.tgz",
"integrity": "sha512-LfHAKmfqyKCgl9K+sTz0KyNwMwB79VcXZUy/Et9iQKLuZt7PDYpHWcFdhrfHw2qqIdKWTED8KmnmsOLhUn/2OA==",
"optional": true
},
"queue-tick": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz",
@@ -878,31 +1103,31 @@
}
},
"regedit-rs": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/regedit-rs/-/regedit-rs-1.0.1.tgz",
"integrity": "sha512-wsvoGP5JDevIcx3q52aATW1c1dY86bQx7/tJ32gqV+L98OHRJykobKkjYqGzROtz9c2Pr+wGJZr0glFyc2dpvQ==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regedit-rs/-/regedit-rs-1.0.2.tgz",
"integrity": "sha512-4vEgiZNO1FCG8z/Zx3v/6PU1+eZ+ELe6R0ca+VB96Vw+Mi3M0IVHAjtMFbl97lUSX11dJqpyousX/wY8QcI1lA==",
"requires": {
"regedit-rs-win32-arm64-msvc": "1.0.1",
"regedit-rs-win32-ia32-msvc": "1.0.1",
"regedit-rs-win32-x64-msvc": "1.0.1"
"regedit-rs-win32-arm64-msvc": "1.0.2",
"regedit-rs-win32-ia32-msvc": "1.0.2",
"regedit-rs-win32-x64-msvc": "1.0.2"
}
},
"regedit-rs-win32-arm64-msvc": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/regedit-rs-win32-arm64-msvc/-/regedit-rs-win32-arm64-msvc-1.0.1.tgz",
"integrity": "sha512-QA46d/wiUHlW2h0ZlHKrtDhnwoxMpVle+EbFziEbLYC7dimtAiWCeXu4zNymaFClDimYSifQkWgza5GBmD8etg==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regedit-rs-win32-arm64-msvc/-/regedit-rs-win32-arm64-msvc-1.0.2.tgz",
"integrity": "sha512-hM1sxazOJWKmiC9DM8QXW9Iqm50Mh/Y9G4/rRYQpWXjMzq7lTqjwVZRkAoBrHliFS6d1Lt4qkm5+Ybt6GkbDpw==",
"optional": true
},
"regedit-rs-win32-ia32-msvc": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/regedit-rs-win32-ia32-msvc/-/regedit-rs-win32-ia32-msvc-1.0.1.tgz",
"integrity": "sha512-V2NisvicQqiozl0yMas9tjDYmBwHWf48M/dMJUWMQxxkJaDCNoHW8PljL59A/h8ew2NBFsJK5RYkYfxW1o+OyQ==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regedit-rs-win32-ia32-msvc/-/regedit-rs-win32-ia32-msvc-1.0.2.tgz",
"integrity": "sha512-FLINrCJ30wm6NYw7skQUDET8NP1N46kH77dqesCiU+/FjWzzPE5luZYY+j4uf+hKjPY6/MCj2CB9l9VdPhaBVQ==",
"optional": true
},
"regedit-rs-win32-x64-msvc": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/regedit-rs-win32-x64-msvc/-/regedit-rs-win32-x64-msvc-1.0.1.tgz",
"integrity": "sha512-qhQawjYPzXGrz0xODJiviwrzw0eytGP9+quuQJUQAiLEw2P1tQ0LCyID3jOvNltLH+tqJChSV4JaQcPVleohZg==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regedit-rs-win32-x64-msvc/-/regedit-rs-win32-x64-msvc-1.0.2.tgz",
"integrity": "sha512-ccCSyd5vWBKVWftBKLKzegqwwPMWcQtIW0ub66dCFFuv2s+x2EcZZWGdD9dVXX2Z6V9DU2JRPKgWUNjVPaj6Xg==",
"optional": true
},
"safe-buffer": {
+3 -2
View File
@@ -1,6 +1,6 @@
{
"name": "bs-manager",
"version": "1.4.3",
"version": "1.4.12",
"description": "BSManager",
"main": "./dist/main/main.js",
"author": {
@@ -15,7 +15,8 @@
},
"dependencies": {
"ps-list": "^7.2.0",
"regedit-rs": "^1.0.1",
"query-process": "^0.0.3",
"regedit-rs": "^1.0.2",
"sharp": "^0.32.6"
},
"license": "MIT"
+67
View File
@@ -0,0 +1,67 @@
import log from "electron-log";
import { isPromise } from "../../shared/helpers/promise.helpers";
import { tryit } from "../../shared/helpers/error.helpers";
type LogOptions = {
logInput?: boolean;
logOutput?: boolean;
logArgs?: boolean;
};
const stringifyArgs = (args: unknown[]) => {
return args?.map(a => JSON.stringify(a)).join(', ');
};
const logInfo = (message: string, propertyKey: string, args: unknown[], logArgs: boolean, result: unknown) => {
log.info(`[${message}] ${propertyKey}(${logArgs ? stringifyArgs(args) : ''})`, result);
};
const logError = (propertyKey: string, args: unknown[], logArgs: boolean, error: unknown) => {
log.error(`[ERROR] ${propertyKey}(${logArgs ? stringifyArgs(args) : ''})`, error);
throw error;
};
export function Log(options?: LogOptions){
const logInput = options?.logInput ?? false;
const logOutput = options?.logOutput ?? true;
const logArgs = options?.logArgs ?? true;
return (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => {
const originalMethod = descriptor.value;
descriptor.value = function(...args: unknown[]) {
if (logInput) {
logInfo('INPUT', propertyKey, args, logArgs, null);
}
const outcome = tryit(() => originalMethod.apply(this, args));
if (isPromise(outcome)) {
return outcome.then(({ result, error }) => {
if (error) {
logError(propertyKey, args, logArgs, error);
}
if (logOutput) {
logInfo('OUTPUT', propertyKey, args, logArgs, result);
}
return result;
});
}
const { result, error } = outcome;
if (error) {
logError(propertyKey, args, logArgs, error);
}
if (logOutput) {
logInfo('OUTPUT', propertyKey, args, logArgs, result);
}
return result;
};
};
}
+19 -18
View File
@@ -1,4 +1,4 @@
import { CopyOptions, copy, createReadStream, ensureDir, move, realpath, stat, symlink } from "fs-extra";
import { CopyOptions, MoveOptions, copy, createReadStream, ensureDir, move, pathExists, pathExistsSync, realpath, stat, symlink } from "fs-extra";
import { access, mkdir, rm, readdir, unlink, lstat, readlink } from "fs/promises";
import path from "path";
import { Observable, concatMap, from } from "rxjs";
@@ -7,6 +7,7 @@ import { BsmException } from "shared/models/bsm-exception.model";
import crypto from "crypto";
import { execSync } from "child_process";
import { tryit } from "../../shared/helpers/error.helpers";
import { CustomError } from "../../shared/models/exceptions/custom-error.class"
export async function pathExist(path: string): Promise<boolean> {
try {
@@ -77,37 +78,37 @@ export async function getFilesInFolder(folderPath: string): Promise<string[]> {
return dirEntries.filter(entry => entry.isFile()).map(file => path.join(folderPath, file.name));
}
export function moveFolderContent(src: string, dest: string): Observable<Progression> {
export function moveFolderContent(src: string, dest: string, option?: MoveOptions): Observable<Progression> {
const progress: Progression = { current: 0, total: 0 };
return new Observable<Progression>(subscriber => {
subscriber.next(progress);
(async () => {
const srcExist = await pathExist(src);
const srcExist = await pathExists(src);
if (!srcExist) {
return subscriber.complete();
}
ensureFolderExist(dest);
await ensureFolderExist(dest);
const files = await readdir(src, { encoding: "utf-8" });
const files = await readdir(src, { encoding: "utf-8", withFileTypes: true });
progress.total = files.length;
const promises = files.map(async file => {
const srcFullPath = path.join(src, file);
const destFullPath = path.join(dest, file);
if (await pathExist(destFullPath)) {
progress.current++;
return subscriber.next(progress);
for(const file of files){
const srcFullPath = path.join(src, file.name);
const destFullPath = path.join(dest, file.name);
const srcChilds = file.isDirectory() ? await readdir(srcFullPath, { encoding: "utf-8", recursive: true }) : [];
const allChildsAlreadyExist = srcChilds.every(child => pathExistsSync(path.join(destFullPath, child)));
if(file.isFile() || !allChildsAlreadyExist){
await move(srcFullPath, destFullPath, option);
}
await move(srcFullPath, destFullPath);
progress.current++;
subscriber.next(progress);
});
Promise.allSettled(promises).then(() => subscriber.complete());
})();
}
})().catch(err => subscriber.error(CustomError.fromError(err, err?.code))).finally(() => subscriber.complete());
});
}
@@ -175,7 +176,7 @@ export async function dirSize(dirPath: string): Promise<number>{
const realPath = await realpath(fullPath);
const stat = await lstat(realPath);
if (stat.isDirectory()) {
if (stat.isDirectory()) {
return dirSize(fullPath);
}
+13 -1
View File
@@ -10,4 +10,16 @@ export async function taskRunning(task: string): Promise<boolean> {
log.error(error);
return false;
}
}
}
export async function getProcessPid(task: string): Promise<number> {
try {
const processes = await psList();
const process = processes.find(process => process.name?.includes(task) || process.cmd?.includes(task));
return process?.pid;
}
catch(error){
log.error(error);
return null;
}
}
+14 -7
View File
@@ -5,6 +5,9 @@ import { IpcService } from '../services/ipc.service';
import { from } from "rxjs";
import { SteamLauncherService } from "../services/bs-launcher/steam-launcher.service";
import { OculusLauncherService } from "../services/bs-launcher/oculus-launcher.service";
import { SteamService } from "../services/steam.service";
import log from "electron-log";
import isElevated from "is-elevated";
const ipc = IpcService.getInstance();
@@ -13,6 +16,17 @@ ipc.on<LaunchOption>('bs-launch.launch', (req, reply) => {
reply(bsLauncher.launch(req.args));
});
ipc.on<boolean>("bs-launch.need-start-as-admin", (_, reply) => {
const steam = SteamService.getInstance();
reply(from(isElevated().then(elevated => {
if(elevated){ return false; }
return steam.isElevated().catch(e => {
log.error("Error while checking if Steam is running as admin", e);
return false;
});
})));
});
ipc.on<LaunchOption>("create-launch-shortcut", (req, reply) => {
const bsLauncher = BSLauncherService.getInstance();
reply(from(bsLauncher.createLaunchShortcut(req.args)));
@@ -23,10 +37,3 @@ ipc.on<void>("bs-launch.restore-steamvr", (_, reply) => {
const steamLauncher = SteamLauncherService.getInstance();
reply(from(steamLauncher.restoreSteamVR()));
});
ipc.on<void>("restore-original-oculus-folder", (_, reply) => {
const oculusLauncher = OculusLauncherService.getInstance();
reply(from(
oculusLauncher.deleteBsSymlinks().then(() => oculusLauncher.restoreOriginalBeatSaber())
));
})
@@ -12,11 +12,11 @@ ipc.on<ImportVersionOptions>("import-version", (req, reply) => {
reply(versionManager.importVersion(req.args));
});
// #region Steam
// #region Steam
ipc.on("is-dotnet-6-installed", (_, reply) => {
ipc.on("is-dotnet-installed", (_, reply) => {
const installer = BsSteamDownloaderService.getInstance();
reply(from(installer.isDotNet6Installed()));
reply(from(installer.isDotNetInstalled()));
});
ipc.on("bs-download.installation-folder", (_, reply) => {
@@ -83,4 +83,4 @@ ipc.on("bs-oculus-clear-auth-token", async (_, reply) => {
reply(from(oculusDownloader.clearAuthToken()));
});
// #endregion
// #endregion
+136 -14
View File
@@ -21,17 +21,20 @@ import { BSLauncherService } from "./services/bs-launcher/bs-launcher.service";
import { IpcRequest } from "shared/models/ipc";
import { LivShortcut } from "./services/liv/liv-shortcut.service";
import { SteamLauncherService } from "./services/bs-launcher/steam-launcher.service";
import { readdirSync, statSync, unlinkSync } from "fs-extra";
export const filterStrings = new Set<string>();
export const filterPatterns = new Set<RegExp>();
const isDebug = process.env.NODE_ENV === "development" || process.env.DEBUG_PROD === "true";
const isE2E = process.env.E2E_BUILD === "true";
log.transports.file.level = "info";
log.transports.file.resolvePath = () => {
const now = new Date();
return path.join(app.getPath("logs"), `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}-v${app.getVersion()}.log`);
};
// Filter all occulus tokens
filterPatterns.add(/FRL\S{10,}/g);
initLogger();
deleteOlestLogs();
deleteOldLogs();
log.catchErrors();
if (process.env.NODE_ENV === "production") {
const sourceMapSupport = require("source-map-support");
@@ -55,7 +58,7 @@ const installExtensions = async () => {
.catch(log.error);
};
const createWindow = async (window: AppWindow) => {
const createWindow = async (window: AppWindow = "launcher.html") => {
if (isDebug) {
await installExtensions();
}
@@ -91,25 +94,144 @@ if (!gotTheLock) {
})
app.whenReady().then(() => {
app.setAppUserModelId(APP_NAME);
initServicesMustBeInitialized();
const deepLink = process.argv.find(arg => DeepLinkService.getInstance().isDeepLink(arg));
if (!deepLink) {
createWindow(!isE2E ? "launcher.html" : "index.html");
createWindow();
} else {
DeepLinkService.getInstance().dispatchLinkOpened(deepLink);
}
SteamLauncherService.getInstance().restoreSteamVR();
// Log renderer errors
ipcMain.on("log-error", (_, args: IpcRequest<unknown>) => {
log.error(args?.args);
});
ipcMain.on("add-filter-string", (_, args: IpcRequest<string>) => {
filterStrings.add(args?.args);
});
ipcMain.on("add-filter-pattern", (_, args: IpcRequest<string>) => {
filterPatterns.add(new RegExp(args?.args));
});
}).catch(log.error);
}
function initLogger(){
log.transports.file.level = "info";
log.transports.file.resolvePath = () => {
const now = new Date();
return path.join(app.getPath("logs"), `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}-v${app.getVersion()}.log`);
};
log.hooks.push((message) => {
const filterMessage = (filter: string|RegExp, ...param: unknown[]): unknown[] => {
return param.map(data => {
if(typeof data === "string"){
return data.replaceAll(filter, "****");
}
if(data instanceof Error){
data.message = data.message?.replaceAll(filter, "****");
data.stack = data.stack?.replaceAll(filter, "****");
}
if(data instanceof Array){
return filterMessage(filter, ...data);
}
return data;
});
}
filterStrings.forEach(filter => {
if(filter && message.data.length){
message.data = filterMessage(filter, ...message.data);
}
});
filterPatterns.forEach(filter => {
if(filter && message.data.length){
message.data = filterMessage(filter, ...message.data);
}
});
return message;
});
log.catchErrors();
}
function getLogFilesEntries() {
try {
const logsFolder = app.getPath("logs");
let logs = readdirSync(logsFolder, { withFileTypes: true });
logs = logs.filter(file => file.isFile() && path.extname(file.name) === ".log");
logs.sort((a, b) => {
const aStat = statSync(path.join(logsFolder, a.name));
const bStat = statSync(path.join(logsFolder, b.name));
return bStat.mtime.getTime() - aStat.mtime.getTime();
});
return logs.map(file => {
const filePath = path.join(logsFolder, file.name);
const stat = statSync(filePath);
return {
path: filePath,
name: file.name,
stats: stat
};
});
} catch (err) {
log.error('Error while retrieving log files entries:', err);
return [];
}
}
// keep only the last 5 logs
function deleteOldLogs(): void{
try {
let logs = getLogFilesEntries();
logs = logs.slice(5);
logs.forEach(file => {
try {
unlinkSync(file.path);
log.info(`Deleted log file: ${file.path}`);
} catch (err) {
log.error(`Error deleting file ${file.path}:`, err);
}
});
} catch (err) {
log.error("Error while deleting old logs:", err);
}
}
// Temporary function to delete logs before 2024-07-31
function deleteOlestLogs(): void{
// delete all logs before 2024-07-31
const date = new Date(2024, 6, 31); // month is 0-based
const logs = getLogFilesEntries().filter(file => file.stats.mtime.getTime() < date.getTime());
logs.forEach(file => {
try {
unlinkSync(file.path);
log.info(`Deleted log file: ${file.path}`);
} catch (err) {
log.error(`Error deleting file ${file.path}:`, err);
}
});
}
@@ -1,6 +1,6 @@
import path from "path";
import { BSVersion } from "shared/bs-version.interface";
import { BsvMapDetail, RawMapInfoData } from "shared/models/maps";
import { BsvMapDetail } from "shared/models/maps";
import { BsmLocalMap, BsmLocalMapsProgress, DeleteMapsProgress } from "shared/models/maps/bsm-local-map.interface";
import { BSLocalVersionService } from "../bs-local-version.service";
import { InstallationLocationService } from "../installation-location.service";
@@ -22,6 +22,7 @@ import { FolderLinkerService } from "../folder-linker.service";
import { allSettled } from "../../../shared/helpers/promise.helpers";
import { splitIntoChunk } from "../../../shared/helpers/array.helpers";
import { IpcService } from "../ipc.service";
import { parseMapInfoDat } from "../../../shared/parsers/maps/map-info.parser";
export class LocalMapsManagerService {
private static instance: LocalMapsManagerService;
@@ -84,27 +85,37 @@ export class LocalMapsManagerService {
}
private async computeMapHash(mapPath: string, rawInfoString: string): Promise<string> {
const mapRawInfo: RawMapInfoData = JSON.parse(rawInfoString);
const mapInfo = parseMapInfoDat(JSON.parse(rawInfoString));
const shasum = crypto.createHash("sha1");
shasum.update(rawInfoString);
const hashFile = (filePath: string): Promise<void> => {
return new Promise<void>((resolve, reject) => {
const stream = createReadStream(filePath);
stream.on("data", data => shasum.update(data));
stream.on("data", (data: Buffer) => shasum.update(data as unknown as Uint8Array));
stream.on("error", reject);
stream.on("close", resolve);
});
};
for (const set of mapRawInfo._difficultyBeatmapSets) {
for (const diff of set._difficultyBeatmaps) {
const diffFilePath = path.join(mapPath, diff._beatmapFilename);
for (const diff of mapInfo.difficulties) {
if(diff.beatmapFilename){
const diffFilePath = path.join(mapPath, diff.beatmapFilename);
await hashFile(diffFilePath);
}
if(diff.lightshowDataFilename) {
const lightshowFilePath = path.join(mapPath, diff.lightshowDataFilename);
await hashFile(lightshowFilePath);
}
}
return shasum.digest("hex");
const hash = shasum.digest("hex");
console.log(mapPath, hash);
return hash;
}
private async loadMapInfoFromPath(mapPath: string): Promise<BsmLocalMap> {
@@ -116,23 +127,25 @@ export class LocalMapsManagerService {
}
const rawInfoString = await readFile(infoFile, { encoding: "utf-8" });
const mapInfo = parseMapInfoDat(JSON.parse(rawInfoString));
const rawInfo: RawMapInfoData = JSON.parse(rawInfoString);
const coverUrl = new URL(`file:///${path.join(mapPath, rawInfo._coverImageFilename)}`).href;
const songUrl = new URL(`file:///${path.join(mapPath, rawInfo._songFilename)}`).href;
const coverUrl = new URL(`file:///${path.join(mapPath, mapInfo.coverImageFilename)}`).href;
const songUrl = new URL(`file:///${path.join(mapPath, mapInfo.songFilename)}`).href;
const hash = await this.computeMapHash(mapPath, rawInfoString);
return { rawInfo, coverUrl, songUrl, hash, path: mapPath };
return { mapInfo, coverUrl, songUrl, hash, path: mapPath };
}
private async downloadMapZip(zipUrl: string): Promise<{ zip: StreamZip.StreamZipAsync; zipPath: string }> {
const fileName = `${path.basename(zipUrl, ".zip")}-${crypto.randomUUID()}.zip`;
const tempPath = this.utils.getTempPath();
await ensureFolderExist(this.utils.getTempPath());
const dest = path.join(tempPath, fileName);
const zipPath = (await lastValueFrom(this.reqService.downloadFile(zipUrl, dest))).data;
const zipPath = (await lastValueFrom(this.reqService.downloadFile(zipUrl, {
destFolder: tempPath,
filename: fileName
}))).data;
const zip = new StreamZip.async({ file: zipPath });
return { zip, zipPath };
@@ -147,7 +160,7 @@ export class LocalMapsManagerService {
});
}
public getMaps(version?: BSVersion): Observable<BsmLocalMapsProgress> {
@@ -252,7 +265,7 @@ export class LocalMapsManagerService {
}
const zipUrl = map.versions.at(0).downloadURL;
const mapFolderName = sanitize(`${map.id}-${map.name}`);
const mapFolderName = sanitize(`${map.id} (${map.metadata.songName} - ${map.metadata.levelAuthorName})`);
const mapsFolder = await this.getMapsFolderPath(version);
const mapPath = path.join(mapsFolder, mapFolderName);
@@ -261,7 +274,7 @@ export class LocalMapsManagerService {
if(!exists){ return null; }
return this.loadMapInfoFromPath(mapPath);
}).catch(() => null);
if(map.versions.every(version => version.hash === installedMap?.hash)) {
return installedMap;
}
@@ -87,12 +87,14 @@ export class LocalModelsManagerService {
(async () => {
const modelFolder = await this.getModelFolderPath(model.type, version);
const modelDest = path.join(modelFolder, sanitize(path.basename(model.download)));
const url = model.download.split("/");
url[url.length - 1] = encodeURIComponent(url[url.length - 1]);
const download$ = this.request.downloadFile(url.join("/"), modelDest);
const download$ = this.request.downloadFile(url.join("/"), {
destFolder: modelFolder,
filename: sanitize(path.basename(model.download))
});
subs.push(download$.subscribe({ next: value => subscriber.next({ ...value, data: undefined }), error: e => subscriber.error(e) }));
@@ -13,6 +13,7 @@ import { BeatSaverService } from "../thrid-party/beat-saver/beat-saver.service";
import { copy, copyFile, pathExists, realpath } from "fs-extra";
import { Progression, ensureFolderExist, pathExist } from "../../helpers/fs.helpers";
import { IpcService } from "../ipc.service";
import sanitize from "sanitize-filename";
export class LocalPlaylistsManagerService {
private static instance: LocalPlaylistsManagerService;
@@ -71,15 +72,20 @@ export class LocalPlaylistsManagerService {
private async installBPListFile(bslistSource: string, version: BSVersion): Promise<string> {
const playlistFolder = await this.getPlaylistsFolder(version);
const isLocalFile = await pathExists(bslistSource).catch(e => { log.error(e); return false; });
const filename = isLocalFile ? path.basename(bslistSource) : new URL(bslistSource).pathname.split('/').pop()
const filename = isLocalFile ? path.basename(bslistSource) : sanitize(new URL(bslistSource).pathname.split('/').pop())
const destFile = path.join(playlistFolder, filename);
if (isLocalFile) {
return copyFile(bslistSource, destFile).then(() => destFile);
}
return lastValueFrom(this.request.downloadFile(bslistSource, destFile)).then(res => res.data);
return lastValueFrom(this.request.downloadFile(bslistSource, {
destFolder: playlistFolder,
filename,
preferContentDisposition: true,
})).then(res => res.data);
}
private async readPlaylistFile(path: string): Promise<BPList> {
if (!(await pathExist(path))) {
@@ -102,8 +108,8 @@ export class LocalPlaylistsManagerService {
const bpListFilePath = await this.installBPListFile(bpListUrl, version);
const bpList = await this.readPlaylistFile(bpListFilePath);
const progress: Progression<DownloadPlaylistProgressionData> = {
const progress: Progression<DownloadPlaylistProgressionData> = {
total: bpList.songs.length,
current: 0,
data: {
@@ -5,9 +5,9 @@ import path from "path";
import log from "electron-log";
export abstract class AbstractLauncherService {
protected readonly localVersions = BSLocalVersionService.getInstance();
constructor(){
this.localVersions = BSLocalVersionService.getInstance();
}
@@ -46,18 +46,20 @@ export abstract class AbstractLauncherService {
}
protected launchBs(bsExePath: string, args: string[], options?: SpawnOptionsWithoutStdio): Promise<number> {
return new Promise<number>((resolve, reject) => {
const bsProcess = this.launchBSProcess(bsExePath, args, options);
protected launchBs(bsExePath: string, args: string[], options?: SpawnOptionsWithoutStdio): {process: ChildProcessWithoutNullStreams, exit: Promise<number>} {
const process = this.launchBSProcess(bsExePath, args, options);
bsProcess.on("error", reject);
bsProcess.on("exit", resolve);
setTimeout(() => {
bsProcess.removeAllListeners("error");
bsProcess.removeAllListeners("exit");
resolve(-1);
}, 30_000);
const exit = new Promise<number>((resolve, reject) => {
process.on("error", (err) => {
log.error(`Error while launching BS`, err);
reject(err);
});
process.on("exit", (code) => {
log.info(`BS process exit with code ${code}`);
resolve(code);
});
});
return { process, exit };
}
}
}
@@ -11,6 +11,10 @@ import { AbstractLauncherService } from "./abstract-launcher.service";
import { taskRunning } from "../../helpers/os.helpers";
import { CustomError } from "../../../shared/models/exceptions/custom-error.class";
import { InstallationLocationService } from "../installation-location.service";
import { ensurePathNotAlreadyExist } from "../../helpers/fs.helpers";
import { UtilsService } from "../utils.service";
import { spawn } from "child_process";
import { tryit } from "../../../shared/helpers/error.helpers";
export class OculusLauncherService extends AbstractLauncherService implements StoreLauncherInterface {
@@ -25,6 +29,7 @@ export class OculusLauncherService extends AbstractLauncherService implements St
private readonly oculus: OculusService;
private readonly pathsService: InstallationLocationService;
private readonly util: UtilsService;
private readonly oculusLib$ = new ReplaySubject<string>();
@@ -32,6 +37,7 @@ export class OculusLauncherService extends AbstractLauncherService implements St
super();
this.oculus = OculusService.getInstance();
this.pathsService = InstallationLocationService.getInstance();
this.util = UtilsService.getInstance();
this.oculus.tryGetGameFolder([OCULUS_BS_DIR, OCULUS_BS_BACKUP_DIR]).then(async dirPath => {
if(dirPath){
@@ -61,13 +67,13 @@ export class OculusLauncherService extends AbstractLauncherService implements St
log.info("Symlinks found in Oculus library", symlinks);
const bsSymlinks = symlinks.filter(dirent => dirent.startsWith(OCULUS_BS_DIR));
const bsmSymlinks = (await Promise.all(bsSymlinks.map(async symlink => {
const symlinkPath = path.join(oculusLibPath, symlink);
const targetPath = await readlink(symlinkPath).catch(err => log.error(err));
log.info("Oculus Symlink", symlink, "target", targetPath);
if(!targetPath){ return null; }
const bsmVersionsDir = path.join(this.pathsService.INSTALLATION_FOLDER, this.pathsService.VERSIONS_FOLDER);
@@ -86,7 +92,7 @@ export class OculusLauncherService extends AbstractLauncherService implements St
private async backupOriginalBeatSaber(): Promise<void>{
const bsFolder = await this.oculus.getGameFolder(OCULUS_BS_DIR);
if(!bsFolder){ return; }
const backupPath = path.join(bsFolder, "..", OCULUS_BS_BACKUP_DIR);
const backupPath = await ensurePathNotAlreadyExist(path.join(bsFolder, "..", OCULUS_BS_BACKUP_DIR));
log.info("Backing up original Beat Saber", bsFolder, backupPath);
return rename(bsFolder, backupPath);
}
@@ -99,6 +105,15 @@ export class OculusLauncherService extends AbstractLauncherService implements St
return rename(bsFolderBackupPath, originalPath);
}
private launchSymlinkCleaner(pid: number, symlinkPath: string){
log.info("Launch Symlink Cleaner", pid, symlinkPath);
const exeName = "oculus_symlink_cleaner.exe";
const scriptPath = this.util.getAssetsScriptsPath();
spawn(path.join(scriptPath, exeName), [`${pid}`, symlinkPath], { detached: true, stdio: "ignore" });
}
public launch(launchOptions: LaunchOption): Observable<BSLaunchEventData> {
const prepareOriginalVersion: () => Promise<string> = async () => {
@@ -138,21 +153,34 @@ export class OculusLauncherService extends AbstractLauncherService implements St
if(bsRunning){
throw CustomError.fromError(new Error("Cannot start two instance of Beat Saber for Oculus"), BSLaunchError.BS_ALREADY_RUNNING);
}
// Remove previously symlinks created by BSM
await this.deleteBsSymlinks().catch(err => log.error("Error while deleting BSM symlinks", err));
const bsPath = await (launchOptions.version.oculus ? prepareOriginalVersion() : prepareDowngradedVersion());
// Launch Beat Saber
const exePath = path.join(bsPath, BS_EXECUTABLE);
if(!(await pathExists(exePath))){
throw CustomError.fromError(new Error(`BS Path not exist ${bsPath}`), BSLaunchError.BS_NOT_FOUND);
}
// Make sure Oculus is running
await this.oculus.startOculus().catch(err => log.error("Error while starting Oculus", err));
obs.next({type: BSLaunchEvent.BS_LAUNCHING});
return this.launchBs(exePath, this.buildBsLaunchArgs(launchOptions)).catch(err => {
// Launch Beat Saber
const process = this.launchBs(exePath, this.buildBsLaunchArgs(launchOptions));
if(launchOptions.version.oculus !== true && process?.process?.pid){
const { error } = tryit(() => this.launchSymlinkCleaner(process.process.pid, bsPath));
if(error){
log.error("Error while launching symlink cleaner", error);
}
}
return process.exit.catch(err => {
throw CustomError.fromError(err, BSLaunchError.BS_EXIT_ERROR);
});
@@ -170,4 +198,4 @@ export class OculusLauncherService extends AbstractLauncherService implements St
});
}
}
}
@@ -8,6 +8,9 @@ import { BS_APP_ID, BS_EXECUTABLE, STEAMVR_APP_ID } from "../../constants";
import log from "electron-log";
import { AbstractLauncherService } from "./abstract-launcher.service";
import { CustomError } from "../../../shared/models/exceptions/custom-error.class";
import isElevated from "is-elevated";
import { UtilsService } from "../utils.service";
import { exec } from "child_process";
export class SteamLauncherService extends AbstractLauncherService implements StoreLauncherInterface{
@@ -21,10 +24,12 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
}
private readonly steam: SteamService;
private readonly util: UtilsService;
private constructor(){
super();
this.steam = SteamService.getInstance();
this.util = UtilsService.getInstance();
}
private getSteamVRPath(): Promise<string> {
@@ -41,6 +46,17 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
});
}
private needStartBsAsAdmin(): Promise<boolean> {
return isElevated().then(elevated => {
if(elevated){ return false; }
return this.steam.isElevated();
})
}
private getStartBsAsAdminExePath(): string {
return path.join(this.util.getAssetsScriptsPath(), "start_beat_saber_admin.exe");
}
public async restoreSteamVR(): Promise<void> {
const steamVrFolder = await this.getSteamVRPath();
const steamVrBackup = `${steamVrFolder}.bak`;
@@ -53,7 +69,7 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
log.error("Error while restoring SteamVR", err);
});
}
public launch(launchOptions: LaunchOption): Observable<BSLaunchEventData>{
return new Observable<BSLaunchEventData>(obs => {(async () => {
@@ -90,13 +106,33 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
obs.next({type: BSLaunchEvent.BS_LAUNCHING});
await this.launchBs(exePath, launchArgs, { env: {...process.env, "SteamAppId": BS_APP_ID} }).then(exitCode => {
const launchPromise = !launchOptions.admin ? (
this.launchBs(exePath, launchArgs, { env: {...process.env, "SteamAppId": BS_APP_ID} }).exit
) : (
new Promise<number>(resolve => {
const adminProcess = exec(`"${this.getStartBsAsAdminExePath()}" "${exePath}" ${launchArgs.join(" ")}`, { env: {...process.env, "SteamAppId": BS_APP_ID} });
adminProcess.on("error", err => {
log.error("Error while starting BS as Admin", err);
resolve(-1)
});
setTimeout(() => {
adminProcess.removeAllListeners("error");
resolve(-1);
}, 35_000);
})
);
try {
const exitCode = await launchPromise;
log.info("BS process exit code", exitCode);
}).catch(err => {
}
catch(err: any) {
throw CustomError.fromError(err, BSLaunchError.BS_EXIT_ERROR);
}).finally(() => {
this.restoreSteamVR().catch(log.error);
});
}
finally {
await this.restoreSteamVR().catch(log.error);
}
})().then(() => {
obs.complete();
@@ -109,4 +145,4 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
})});
}
}
}
@@ -44,7 +44,7 @@ export class BsSteamDownloaderService {
return path.join(this.utils.getAssetsScriptsPath(), "depot-downloader", `DepotDownloader.${process.platform === 'linux' ? 'dll' : 'exe'}`);
}
public async isDotNet6Installed(): Promise<boolean> {
public async isDotNetInstalled(): Promise<boolean> {
try {
const proc = process.platform === 'linux'
? spawnSync('dotnet', [this.getDepotDownloaderExePath()])
@@ -55,7 +55,7 @@ export class BsSteamDownloaderService {
}
return true;
} catch (e) {
log.error("Error while checking .NET 6", e);
log.error("Error while checking .NET 8", e);
return false;
}
}
+4 -4
View File
@@ -4,6 +4,8 @@ import { deleteFolder, ensureFolderExist, moveFolderContent, pathExist, unlinkPa
import { lstat, symlink } from "fs/promises";
import path from "path";
import { copy, readlink } from "fs-extra";
import { lastValueFrom } from "rxjs";
import { noop } from "../../shared/helpers/function.helpers";
export class FolderLinkerService {
private static instance: FolderLinkerService;
@@ -72,7 +74,7 @@ export class FolderLinkerService {
await ensureFolderExist(folderPath);
if (options?.keepContents !== false) {
await moveFolderContent(folderPath, sharedPath).toPromise();
await lastValueFrom(moveFolderContent(folderPath, sharedPath, { overwrite: true }));
}
await deleteFolder(folderPath);
@@ -95,9 +97,7 @@ export class FolderLinkerService {
}
if (options.moveContents === true) {
return moveFolderContent(sharedPath, folderPath)
.toPromise()
.then(() => {});
return lastValueFrom(moveFolderContent(sharedPath, folderPath, { overwrite: true })).then(noop);
}
if (options?.keepContents === false) {
@@ -2,6 +2,8 @@ import path from "path";
import { app } from "electron";
import ElectronStore from "electron-store";
import { copyDirectoryWithJunctions, deleteFolder, ensureFolderExist, pathExist } from "../helpers/fs.helpers";
import { tryit } from "../../shared/helpers/error.helpers";
import { pathExistsSync } from "fs-extra";
export class InstallationLocationService {
private static instance: InstallationLocationService;
@@ -67,8 +69,8 @@ export class InstallationLocationService {
return this.installPathConfig.get(this.STORE_INSTALLATION_PATH_KEY) as string;
}
const oldPath = path.join(app.getPath("documents"), this.INSTALLATION_FOLDER);
if(await pathExist(oldPath)){
const { result: oldPath } = tryit(() => path.join(app.getPath("documents"), this.INSTALLATION_FOLDER));
if(oldPath && pathExistsSync(oldPath)){
return app.getPath("documents");
}
+9 -2
View File
@@ -1,6 +1,8 @@
import { execOnOs } from "../../helpers/env.helpers";
import { list, createKey, putValue, deleteKey, RegSzValue } from "regedit-rs";
import path from "path";
import { Log } from "../../decorators/log.decorator";
const { list, createKey, putValue, deleteKey, RegSzValue } = (execOnOs({ win32: () => require("regedit-rs") }, true) ?? {}) as typeof import("regedit-rs");
export class LivService {
@@ -20,6 +22,7 @@ export class LivService {
}
@Log()
public async isLivInstalled(): Promise<boolean> {
return execOnOs({
win32: async () => {
@@ -29,6 +32,7 @@ export class LivService {
}, true);
}
@Log()
public async createLivShortcut(entry: LivEntry): Promise<void> {
return execOnOs({
win32: async () => {
@@ -46,6 +50,7 @@ export class LivService {
});
}
@Log()
public async deleteLivShortcuts(ids: string[]): Promise<void> {
return execOnOs({
win32: async () => {
@@ -55,11 +60,13 @@ export class LivService {
})
}
@Log()
public getLivShortcuts(): Promise<LivEntry[]> {
return execOnOs({
win32: async () => {
const regRes = await list(this.livExternalAppsRegeditKey).then(res => res[this.livExternalAppsRegeditKey]);
if(!regRes.exists){
return [];
}
@@ -14,8 +14,8 @@ import { lastValueFrom } from "rxjs";
import JSZip from "jszip";
import { extractZip } from "../../helpers/zip.helpers";
import recursiveReadDir from "recursive-readdir";
import { minToMs } from "../../../shared/helpers/time.helpers";
import { ensureDir } from "fs-extra";
import { sToMs } from "../../../shared/helpers/time.helpers";
import { ensureDir, pathExistsSync } from "fs-extra";
export class BsModsManagerService {
private static instance: BsModsManagerService;
@@ -71,7 +71,7 @@ export class BsModsManagerService {
const bsPath = await this.bsLocalService.getVersionPath(version);
const modsPath = path.join(bsPath, modsDir);
if (!(await pathExist(modsPath))) {
if (!pathExistsSync(modsPath)) {
return [];
}
@@ -90,19 +90,22 @@ export class BsModsManagerService {
if (!mod) {
return undefined;
}
if (ext === ".manifest") {
this.manifestMatches.push(mod);
return undefined;
}
if (filePath.includes("Libs")) {
if (!this.manifestMatches.some(m => m.name === mod.name)) {
if (filePath.toLowerCase().includes("libs")) {
const manifestIndex = this.manifestMatches.findIndex(m => m.name === mod.name);
if (manifestIndex < 0) {
return undefined;
}
const modIndex = this.manifestMatches.indexOf(mod);
if (modIndex > -1) {
this.manifestMatches.splice(modIndex, 1);
}
this.manifestMatches.splice(manifestIndex, 1);
}
return mod;
});
@@ -155,9 +158,26 @@ export class BsModsManagerService {
}
return new Promise<boolean>(resolve => {
log.info("START IPA PROCESS", `start /wait /min "" "${ipaPath}" ${args.join(" ")}`);
const processIPA = spawn(`start /wait /min "" "${ipaPath}" ${args.join(" ")}`, { cwd: versionPath, detached: true, shell: true });
log.info("START IPA PROCESS", `"${ipaPath}"`, args);
const processIPA = spawn(`"${ipaPath}"`, args, { cwd: versionPath, detached: true, shell: true });
const timemout = setTimeout(() => {
log.info("Ipa process timeout");
resolve(false)
}, sToMs(30));
processIPA.on("error", e => {
log.error("Ipa process error", e);
resolve(false);
})
processIPA.stderr.on("data", data => {
log.error("Ipa process stderr", data.toString());
});
processIPA.once("exit", code => {
clearTimeout(timemout);
if (code === 0) {
log.info("Ipa process exist with code 0");
return resolve(true);
@@ -166,10 +186,7 @@ export class BsModsManagerService {
resolve(false);
});
setTimeout(() => {
log.info("Ipa process timeout");
resolve(false)
}, minToMs(1));
});
}
@@ -230,7 +247,7 @@ export class BsModsManagerService {
log.error("Error while extracting mod zip", e);
return false;
});
log.info("Mod zip extraction end", mod.name, "to", destDir, "success:", extracted);
const res = isBSIPA
@@ -317,22 +334,26 @@ export class BsModsManagerService {
this.manifestMatches = [];
await this.beatModsApi.getAllMods();
const bsipa = await this.getBsipaInstalled(version);
return Promise.all([this.getModsInDir(version, ModsInstallFolder.PLUGINS_PENDING), this.getModsInDir(version, ModsInstallFolder.LIBS_PENDING), this.getModsInDir(version, ModsInstallFolder.PLUGINS), this.getModsInDir(version, ModsInstallFolder.LIBS)]).then(dirMods => {
const modsDict = new Map<string, Mod>();
if (bsipa) {
modsDict.set(bsipa.name, bsipa);
const pluginsMods = await Promise.all([this.getModsInDir(version, ModsInstallFolder.PLUGINS), this.getModsInDir(version, ModsInstallFolder.PLUGINS_PENDING)]);
const libsMods = await Promise.all([this.getModsInDir(version, ModsInstallFolder.LIBS), this.getModsInDir(version, ModsInstallFolder.LIBS_PENDING)]);
const dirMods = pluginsMods.flat().concat(libsMods.flat());
const modsDict = new Map<string, Mod>();
if (bsipa) {
modsDict.set(bsipa.name, bsipa);
}
for (const mod of dirMods.flat()) {
if (modsDict.has(mod.name)) {
continue;
}
modsDict.set(mod.name, mod);
}
for (const mod of dirMods.flat()) {
if (modsDict.has(mod.name)) {
continue;
}
modsDict.set(mod.name, mod);
}
return Array.from(modsDict.values());
});
return Array.from(modsDict.values());
}
public async installMods(mods: Mod[], version: BSVersion): Promise<InstallModsResult> {
+33 -5
View File
@@ -1,9 +1,14 @@
import { list } from "regedit-rs";
import path from "path";
import { pathExist, resolveGUIDPath } from "../helpers/fs.helpers";
import log from "electron-log";
import { lstat } from "fs-extra";
import { tryit } from "../../shared/helpers/error.helpers";
import { shell } from "electron";
import { taskRunning } from "../helpers/os.helpers";
import { sToMs } from "../../shared/helpers/time.helpers";
import { execOnOs } from "../helpers/env.helpers";
const { list } = (execOnOs({ win32: () => require("regedit-rs") }, true) ?? {}) as typeof import("regedit-rs");
export class OculusService {
private static instance: OculusService;
@@ -42,11 +47,11 @@ export class OculusService {
const libsPath: OculusLibrary[] = (
await Promise.all(libsRegData.keys.map(async key => {
const originalPath = await list([`${oculusLibsRegKey}\\${key}`]).then(res => res[`${oculusLibsRegKey}\\${key}`]);
if (originalPath.values?.OriginalPath) {
return { id: key, path: originalPath.values.OriginalPath.value, isDefault: defaultLibraryId === key } as OculusLibrary;
}
}
if(originalPath.values?.Path) {
const { result } = tryit(() => resolveGUIDPath(originalPath.values.Path.value as string));
return result ? { id: key, path: result, isDefault: defaultLibraryId === key } as OculusLibrary : null;
@@ -82,7 +87,7 @@ export class OculusService {
/**
* Return the first game folder found in the list
* @param {string[]} gameFolders
* @param {string[]} gameFolders
*/
public async tryGetGameFolder(gameFolders: string[]): Promise<string> {
for(const gameFolder of gameFolders){
@@ -92,6 +97,29 @@ export class OculusService {
return null;
}
public oculusRunning(): Promise<boolean> {
return taskRunning("OculusClient");
}
public async startOculus(): Promise<void>{
if(await this.oculusRunning()){ return; }
await shell.openPath("oculus://view/homepage");
return new Promise((resolve, reject) => {
const interval = setInterval(async () => {
if(!(await this.oculusRunning())){ return; }
clearInterval(interval);
resolve();
}, sToMs(3));
setTimeout(() => {
clearInterval(interval);
reject(new Error("Unable to open Oculus"));
}, sToMs(30));
});
}
}
export interface OculusLibrary {
+83 -18
View File
@@ -1,9 +1,14 @@
import { Agent, get } from "https";
import { createWriteStream, unlink } from "fs";
import { Progression } from "main/helpers/fs.helpers";
import { Agent, RequestOptions, get } from "https";
import { createWriteStream } from "fs";
import { Progression, unlinkPath } from "../helpers/fs.helpers";
import { Observable, shareReplay, tap } from "rxjs";
import log from "electron-log";
import fetch, { RequestInfo, RequestInit } from "node-fetch";
import { app } from "electron";
import os from "os";
import path from "path";
import { tryit } from "../../shared/helpers/error.helpers";
import sanitize from "sanitize-filename";
export class RequestService {
private static instance: RequestService;
@@ -15,16 +20,33 @@ export class RequestService {
return RequestService.instance;
}
private constructor() {}
private readonly defaultRequestInit: RequestInit;
private get ipv4Agent(){
return new Agent({ family: 4 });
private constructor() {
this.defaultRequestInit = {
headers: {
"User-Agent": `BSManager/${app.getVersion()} (${os.type()} ${os.release()})`
},
agent: new Agent({ family: 4 }),
};
}
private getInitWithOptions(options?: RequestInit): RequestInit {
return { ...this.defaultRequestInit, ...(options || {}) };
}
private requestOptionsFromDefaultInit(): RequestOptions {
return {
headers: this.defaultRequestInit.headers as Record<string, string>,
agent: this.defaultRequestInit.agent as Agent,
};
}
public async getJSON<T = unknown>(url: RequestInfo, options?: RequestInit): Promise<T> {
try {
const response = await fetch(url, {...options, agent: this.ipv4Agent});
const response = await fetch(url, this.getInitWithOptions(options));
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status} ${url}`);
@@ -37,22 +59,65 @@ export class RequestService {
}
}
public downloadFile(url: string, dest: string): Observable<Progression<string>> {
private getFilenameFromContentDisposition(disposition: string): string | null {
if(!disposition) {
return null;
}
const utf8FilenameRegex = /filename\*=UTF-8''([\w%\-\.]+)(?:; ?|$)/i;
const asciiFilenameRegex = /^filename=(["']?)(.*?[^\\])\1(?:; ?|$)/i;
const utf8Match = utf8FilenameRegex.exec(disposition);
if (utf8Match) {
return decodeURIComponent(utf8Match[1]);
}
const filenameStart = disposition.toLowerCase().indexOf('filename=');
if (filenameStart >= 0) {
const partialDisposition = disposition.slice(filenameStart);
const asciiMatch = asciiFilenameRegex.exec(partialDisposition);
if (asciiMatch && asciiMatch[2]) {
return asciiMatch[2];
}
}
return null;
}
public downloadFile(url: string, opt: { destFolder: string, filename: string, preferContentDisposition?: boolean }): Observable<Progression<string>> {
return new Observable<Progression<string>>(subscriber => {
const progress: Progression<string> = { current: 0, total: 0 };
const file = createWriteStream(dest);
const req = get(url, this.requestOptionsFromDefaultInit(), res => {
file.on("close", () => {
progress.data = dest;
subscriber.next(progress);
subscriber.complete();
});
file.on("error", err => unlink(dest, () => subscriber.error(err)));
const filePath = (() => {
if(opt.preferContentDisposition && res.headers["content-disposition"]) {
const filename = this.getFilenameFromContentDisposition(res.headers["content-disposition"]);
return path.join(opt.destFolder, sanitize(filename || opt.filename));
}
return path.join(opt.destFolder, opt.filename);
})();
const req = get(url, { agent: this.ipv4Agent }, res => {
const file = createWriteStream(filePath);
file.on("close", () => {
subscriber.next(progress);
subscriber.complete();
});
file.on("error", async err => {
log.error(err);
const res = await tryit(() => unlinkPath(filePath));
if(res.error) {
log.error(res.error);
}
});
progress.data = filePath;
progress.total = parseInt(res.headers?.["content-length"] || "0", 10);
subscriber.next(progress);
res.on("data", chunk => {
progress.current += chunk.length;
subscriber.next(progress);
@@ -64,7 +129,7 @@ export class RequestService {
req.on("error", err => {
subscriber.error(err);
});
}).pipe(tap({ error: e => log.error(e, url, dest) }), shareReplay(1));
}).pipe(tap({ error: e => log.error(e, url) }), shareReplay(1));
}
public downloadBuffer(url: string): Observable<Progression<Buffer>> {
@@ -77,7 +142,7 @@ export class RequestService {
const allChunks: Buffer[] = [];
const req = get(url, { agent: this.ipv4Agent }, res => {
const req = get(url, this.requestOptionsFromDefaultInit(), res => {
progress.total = parseInt(res.headers?.["content-length"] || "0", 10);
res.on("data", chunk => {
+31 -6
View File
@@ -1,15 +1,22 @@
import { list, RegDwordValue } from "regedit-rs"
import { RegDwordValue } from "regedit-rs"
import path from "path";
import { parse } from "@node-steam/vdf";
import { readFile } from "fs/promises";
import { pathExist } from "../helpers/fs.helpers";
import log from "electron-log";
import { app, shell } from "electron";
import { taskRunning } from "../helpers/os.helpers";
import { getProcessPid, taskRunning } from "../helpers/os.helpers";
import { isElevated } from "query-process";
import { execOnOs } from "../helpers/env.helpers";
const { list } = (execOnOs({ win32: () => require("regedit-rs") }, true) ?? {}) as typeof import("regedit-rs");
export class SteamService {
private static readonly PROCESS_NAME = "steam";
private static instance: SteamService;
private steamPath: string = '';
private constructor(){}
@@ -29,12 +36,30 @@ export class SteamService {
}
public async steamRunning(): Promise<boolean>{
const steamProcessRunning = await taskRunning("steam");
const steamProcessRunning = await taskRunning(SteamService.PROCESS_NAME);
if(process.platform === "linux") { return steamProcessRunning; }
const activeUser = await this.getActiveUser().catch(err => log.error(err));
return steamProcessRunning && !!activeUser;
}
public async getSteamPid(): Promise<number>{
return getProcessPid(SteamService.PROCESS_NAME);
}
/**
* Check if the Steam process is running as administrator
* @throws Can throw an error if the Steam process is running as admin
* @returns true if the Steam process is running as administrator
*/
public async isElevated(): Promise<boolean>{
if(process.platform === "linux"){ return true; }
const steamPid = await this.getSteamPid();
if(!steamPid){ return false; }
return isElevated(steamPid);
}
public async getSteamPath(): Promise<string>{
if(this.steamPath){ return this.steamPath; }
@@ -68,7 +93,7 @@ export class SteamService {
let libraryFolders: any = path.join(steamPath, "steamapps", "libraryfolders.vdf");
if (!(await pathExist(libraryFolders))) { return null; }
libraryFolders = parse(await readFile(libraryFolders, { encoding: "utf-8" }));
if (!libraryFolders.libraryfolders) { return null; }
@@ -83,7 +108,7 @@ export class SteamService {
}
return null;
} catch (e) {
log.error(e);
return null;
@@ -91,7 +116,7 @@ export class SteamService {
}
public async openSteam(): Promise<void> {
await shell.openPath("steam://open/games");
return new Promise((resolve, reject) => {
@@ -49,6 +49,9 @@ export class BeatSaverApiService {
...(filter.maxNps && { maxNps: String(filter.maxNps) }),
};
delete params.enabledTags;
delete params.excludedTags;
return new URLSearchParams(params);
}
@@ -1,6 +1,6 @@
import { getFoldersInFolder } from "../helpers/fs.helpers";
import path from "path";
import { VersionLinkerAction, VersionLinkFolderAction, VersionUnlinkFolderAction } from "renderer/services/version-folder-linker.service";
import { VersionLinkerAction, VersionUnlinkFolderAction } from "renderer/services/version-folder-linker.service";
import { BSVersion } from "shared/bs-version.interface";
import { LocalMapsManagerService } from "./additional-content/local-maps-manager.service";
import { BSLocalVersionService } from "./bs-local-version.service";
@@ -58,17 +58,14 @@ export class VersionFolderLinkerService {
return path.join(parentPath, relativePath);
}
public async linkVersionFolder(action: VersionLinkerAction): Promise<boolean> {
public async linkVersionFolder(action: VersionLinkerAction): Promise<void> {
action.options = this.specialFolderOption(action.relativeFolder, action.options);
const versionPath = await this.localVersion.getVersionPath(action.version);
const folderPath = this.relativeToFullPath(versionPath, action.relativeFolder);
return this.folderLinker
.linkFolder(folderPath, action.options)
.catch(() => false)
.then(() => true);
return this.folderLinker.linkFolder(folderPath, action.options)
}
public async unlinkVersionFolder(action: VersionUnlinkFolderAction): Promise<boolean> {
public async unlinkVersionFolder(action: VersionUnlinkFolderAction): Promise<void> {
action.options = this.specialFolderOption(action.relativeFolder, action.options);
const versionPath = await this.localVersion.getVersionPath(action.version);
@@ -76,13 +73,10 @@ export class VersionFolderLinkerService {
action.options.moveContents = !(await this.isOtherVersionHaveFolderLinked(action.relativeFolder, folderPath));
return this.folderLinker
.unlinkFolder(folderPath, action.options)
.catch(() => false)
.then(() => true);
return this.folderLinker.unlinkFolder(folderPath, action.options);
}
public async doAction(action: VersionLinkerAction): Promise<boolean> {
public doAction(action: VersionLinkerAction): Promise<void> {
if (action.type === "link") {
return this.linkVersionFolder(action);
}
@@ -123,7 +117,7 @@ export class VersionFolderLinkerService {
for (const version of versions) {
const linkedFolders = await this.getLinkedFolders(version, { relative: true, ignoreSymlinkTargetError: true });
const actions = linkedFolders.map(folder => ({ type: "link", version, relativeFolder: folder } as VersionLinkFolderAction));
const actions = linkedFolders.map(folder => ({ type: "link", version, relativeFolder: folder } as VersionLinkerAction));
await Promise.all(actions.map(action => this.doAction(action)));
}
}
+11 -12
View File
@@ -1,17 +1,16 @@
/* eslint import/prefer-default-export: off, import/no-mutable-exports: off */
import { URL } from "url";
import { pathToFileURL, URL } from "url";
import path from "path";
export let resolveHtmlPath: (htmlFileName: string) => string;
if (process.env.NODE_ENV === "development") {
const port = process.env.PORT || 1212;
resolveHtmlPath = (htmlFileName: string) => {
export function resolveHtmlPath (htmlFileName: string) {
if (process.env.NODE_ENV === "development") {
const port = process.env.PORT || 1212;
const url = new URL(`http://localhost:${port}/${htmlFileName}`);
return url.toString();
};
} else {
resolveHtmlPath = (htmlFileName: string) => {
return `file://${path.resolve(__dirname, "../renderer/", htmlFileName)}`;
};
}
}
const filePath = path.resolve(__dirname, "..", "renderer");
return pathToFileURL(filePath).toString().concat("/", htmlFileName);
};
@@ -23,7 +23,7 @@ export const AvailableVersionItem = memo(function AvailableVersionItem({version,
const formatedDate = useConstant(() => dateFormat(+version.ReleaseDate * 1000, "ddd. d mmm yyyy"));
return (
<motion.li id={`version-item-${version.BSManifest}`} className="group relative w-72 h-60 active:scale-[.98]" onClick={onClick} onHoverStart={() => setHovered(true)} onHoverEnd={() => setHovered(false)}>
<motion.li className="group relative w-72 h-60 active:scale-[.98]" onClick={onClick} onHoverStart={() => setHovered(true)} onHoverEnd={() => setHovered(false)}>
<GlowEffect visible={hovered || selected} className="absolute" />
<div className={`relative flex flex-col overflow-hidden rounded-md w-72 h-60 cursor-pointer group-hover:shadow-none duration-300 bg-light-main-color-2 dark:bg-main-color-2 ${!selected && "shadow-lg shadow-gray-900"}`}>
{version.recommended && (
@@ -29,7 +29,7 @@ export function AvailableVersionsSlide({ versions }: Props) {
}
return (
<ol id={`version-slide-${versions}`} className="w-full flex items-start justify-center gap-6 shrink-0 content-start flex-wrap px-3.5 py-4 overflow-x-hidden overflow-y-scroll scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-neutral-900">
<ol className="w-full flex items-start justify-center gap-6 shrink-0 content-start flex-wrap px-3.5 py-4 overflow-x-hidden overflow-y-scroll scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-neutral-900">
{getVersions().map(version => (
<AvailableVersionItem key={version.BSManifest} version={version} selected={equal(version, context.selectedVersion)} onClick={() => setSelectedVersion(version)}/>
))}
@@ -26,7 +26,7 @@ export function AvailableVersionsSlider() {
return (
<div className="w-full h-fit max-h-full flex flex-col items-center grow min-h-0 gap-3">
<TabNavBar id="version-years-tab-bar" tabIndex={yearIndex} tabsText={availableYears} onTabChange={setSelectedYear} />
<TabNavBar tabIndex={yearIndex} tabsText={availableYears} onTabChange={setSelectedYear} />
<ol className="w-full min-h-0 flex transition-transform duration-300" style={{ transform: `translate(${-(yearIndex * 100)}%, 0)` }}>
{availableYears.map(year => (
<AvailableVersionsSlide key={year} versions={getVersionOfYear(year)} />
@@ -1,15 +1,11 @@
import { MapFilter, MapSpecificity, MapStyle, MapTag, MapType } from "shared/models/maps/beat-saver.model";
import { MapFilter, MapRequirement, MapSpecificity, MapStyle, MapTag, MapType } from "shared/models/maps/beat-saver.model";
import { motion } from "framer-motion";
import { MutableRefObject, useEffect, useRef, useState } from "react";
import { MAP_TYPES } from "renderer/partials/maps/map-tags/map-types";
import { MAP_STYLES } from "renderer/partials/maps/map-tags/map-styles";
import { BsmCheckbox } from "../shared/bsm-checkbox.component";
import { minToS } from "../../../shared/helpers/time.helpers";
import dateFormat from "dateformat";
import { BsmRange } from "../shared/bsm-range.component";
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { MAP_SPECIFICITIES } from "renderer/partials/maps/map-general/map-specificity";
import { MAP_REQUIREMENTS } from "renderer/partials/maps/map-requirements/map-requirements";
import { MAP_DIFFICULTIES_COLORS } from "renderer/partials/maps/map-difficulties/map-difficulties-colors";
import { BsmButton } from "../shared/bsm-button.component";
import equal from "fast-deep-equal/es6";
@@ -21,12 +17,13 @@ export type Props = {
ref?: MutableRefObject<undefined>;
playlist?: boolean;
filter: MapFilter;
localData?: boolean;
onChange?: (filter: MapFilter) => void;
onApply?: (filter: MapFilter) => void;
onClose?: (filter: MapFilter) => void;
};
export function FilterPanel({ className, ref, playlist = false, filter, onChange, onApply, onClose }: Props) {
export function FilterPanel({ className, ref, playlist = false, filter, localData = true, onChange, onApply, onClose }: Props) {
const t = useTranslation();
const [haveChanged, setHaveChanged] = useState(false);
@@ -176,31 +173,40 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange
<div className="w-full h-full flex gap-x-2">
<section className="shrink-0">
<h2 className="mb-1 uppercase text-sm">{t("maps.map-filter-panel.specificities")}</h2>
{MAP_SPECIFICITIES.map(specificity => (
{Object.values(MapSpecificity).map(specificity => (
<div key={specificity} className="flex justify-start items-center h-[22px] z-20 relative py-0.5 cursor-pointer" onClick={() => handleCheckbox(specificity)}>
<BsmCheckbox className="h-full aspect-square relative bg-inherit mr-1" checked={filter?.[specificity]} onChange={() => handleCheckbox(specificity)} />
<span className="grow capitalize">{translateMapSpecificity(specificity)}</span>
</div>
))}
<h2 className="my-1 uppercase text-sm">{t("maps.map-filter-panel.requirements")}</h2>
{MAP_REQUIREMENTS.map(requirement => (
{Object.values(MapRequirement).map(requirement => (
<div key={requirement} className="flex justify-start items-center h-[22px] z-20 relative py-0.5 cursor-pointer" onClick={() => handleCheckbox(requirement)}>
<BsmCheckbox className="h-full aspect-square relative bg-inherit mr-1" checked={filter?.[requirement]} onChange={() => handleCheckbox(requirement)} />
<span className="grow capitalize">{requirement}</span>
</div>
))}
{ !localData && (
<>
<h2 className="my-1 uppercase text-sm">{t("maps.map-filter-panel.exclude")}</h2>
<div className="flex justify-start items-center h-[22px] z-20 relative py-0.5 cursor-pointer" onClick={() => handleCheckbox("installed")}>
<BsmCheckbox className="h-full aspect-square relative bg-inherit mr-1" checked={filter?.installed} onChange={() => handleCheckbox("installed")} />
<span className="grow capitalize">{t("maps.map-excludes.installed")}</span>
</div>
</>
)}
</section>
<section className="grow capitalize">
<h2 className="uppercase text-sm mb-1">{t("maps.map-filter-panel.tags")}</h2>
<div className="w-full flex flex-row flex-wrap items-start justify-start content-start gap-1 mb-2">
{MAP_TYPES.map(tag => (
{Object.values(MapType).map(tag => (
<span key={tag} onClick={() => handleTagClick(tag)} className={`text-[12.5px] text-black rounded-md px-1 font-bold cursor-pointer ${!isTagActivated(tag) && "opacity-40 hover:opacity-90"}`} style={{ backgroundColor: isTagExcluded(tag) ? MAP_DIFFICULTIES_COLORS.Expert : MAP_DIFFICULTIES_COLORS.Normal }}>
{translateMapType(tag)}
</span>
))}
</div>
<div className="w-full flex flex-row flex-wrap items-start justify-start content-start gap-1">
{MAP_STYLES.map(tag => (
{Object.values(MapStyle).map(tag => (
<span key={tag} onClick={() => handleTagClick(tag)} className={`text-[12.5px] text-black rounded-md px-1 font-bold cursor-pointer ${!isTagActivated(tag) && "opacity-40 hover:opacity-90"}`} style={{ backgroundColor: isTagExcluded(tag) ? MAP_DIFFICULTIES_COLORS.Expert : MAP_DIFFICULTIES_COLORS.Easy }}>
{translateMapStyle(tag)}
</span>
@@ -358,7 +358,7 @@ export const LocalMapsListPanel = forwardRef(({ version, className, filter, sear
}
const searchCheck = (() => {
return ((map.rawInfo?._songName ?? map.bsaverInfo?.name) || "")?.toLowerCase().includes(search.toLowerCase()) || ((map.rawInfo?._songAuthorName ?? map.bsaverInfo?.metadata?.songAuthorName) || "")?.toLowerCase().includes(search.toLowerCase()) || ((map.rawInfo?._levelAuthorName ?? map.bsaverInfo?.metadata?.levelAuthorName) || "")?.toLowerCase().includes(search.toLowerCase());
return ((map.mapInfo?.songName ?? map.bsaverInfo?.name) || "")?.toLowerCase().includes(search.toLowerCase()) || ((map.mapInfo?.songAuthorName ?? map.bsaverInfo?.metadata?.songAuthorName) || "")?.toLowerCase().includes(search.toLowerCase()) || ((map.mapInfo?.levelMappers.at(0) ?? map.bsaverInfo?.metadata?.levelAuthorName) || "")?.toLowerCase().includes(search.toLowerCase());
})();
if (!searchCheck) {
@@ -26,43 +26,40 @@ export const MapsRow = memo(({ maps, style, selectedMaps$, onMapSelect, onMapDel
if (map.bsaverInfo?.versions[0]?.diffs) {
map.bsaverInfo.versions[0].diffs.forEach(diff => {
const arr = res.get(diff.characteristic) || [];
const diffName = map.rawInfo._difficultyBeatmapSets.find(set => set._beatmapCharacteristicName === diff.characteristic)._difficultyBeatmaps.find(rawDiff => rawDiff._difficulty === diff.difficulty)?._customData?._difficultyLabel || diff.difficulty;
const diffName = map.mapInfo.difficulties.find(set => set.characteristic === diff.characteristic && set.difficulty === diff.difficulty)?.difficultyLabel || diff.difficulty;
arr.push({ name: diffName, type: diff.difficulty, stars: diff.stars });
res.set(diff.characteristic, arr);
});
return res;
}
map.rawInfo._difficultyBeatmapSets.forEach(set => {
set._difficultyBeatmaps.forEach(diff => {
const arr = res.get(set._beatmapCharacteristicName) || [];
arr.push({ name: diff._customData?._difficultyLabel || diff._difficulty, type: diff._difficulty, stars: null });
res.set(set._beatmapCharacteristicName, arr);
});
map.mapInfo.difficulties.forEach(diff => {
const arr = res.get(diff.characteristic) || [];
arr.push({ name: diff?.difficultyLabel || diff.difficulty, type: diff.difficulty, stars: null });
});
return res;
};
const renderMapItem = (map: BsmLocalMap) => {
return <MapItem
key={map.hash}
hash={map.hash}
title={map.rawInfo._songName}
coverUrl={map.coverUrl}
songUrl={map.songUrl}
autor={map.rawInfo._levelAuthorName}
songAutor={map.rawInfo._songAuthorName}
bpm={map.rawInfo._beatsPerMinute}
duration={map.bsaverInfo?.metadata?.duration}
selected={selectedMaps.some(selected => selected.hash === map.hash)}
diffs={extractMapDiffs(map)} mapId={map.bsaverInfo?.id}
ranked={map.bsaverInfo?.ranked}
autorId={map.bsaverInfo?.uploader?.id}
likes={map.bsaverInfo?.stats?.upvotes}
createdAt={map.bsaverInfo?.createdAt}
onDelete={onMapDelete}
onSelected={onMapSelect}
return <MapItem
key={map.hash}
hash={map.hash}
title={map.mapInfo.songName}
coverUrl={map.coverUrl}
songUrl={map.songUrl}
autor={map.mapInfo.levelMappers.at(0)}
songAutor={map.mapInfo.songAuthorName}
bpm={map.mapInfo.beatsPerMinute}
duration={map.bsaverInfo?.metadata?.duration}
selected={selectedMaps.some(selected => selected.hash === map.hash)}
diffs={extractMapDiffs(map)} mapId={map.bsaverInfo?.id}
ranked={map.bsaverInfo?.ranked}
autorId={map.bsaverInfo?.uploader?.id}
likes={map.bsaverInfo?.stats?.upvotes}
createdAt={map.bsaverInfo?.createdAt}
onDelete={onMapDelete}
onSelected={onMapSelect}
callBackParam={map}
/>;
};
@@ -30,7 +30,7 @@ export const EnterMetaTokenModal: ModalComponent<string> = ({resolver}) => {
const cancel = () => {
resolver({exitCode: ModalExitCode.CANCELED});
}
return (
<form className="flex flex-col w-80 gap-4">
<h1 className="text-3xl uppercase tracking-wide w-full text-center">{t("modals.enter-meta-token.title")}</h1>
@@ -205,7 +205,7 @@ const PasswordInput = ({onChange, value}: {onChange: (value : {password: string,
<input className="grow px-1 py-[2px] outline-none bg-transparent" onChange={e => onChange({password: e.target.value, valid: isPasswordValid(e.target.value)})} value={value} type={showPassword ? "text" : "password"} name="password" id="password" placeholder={t("modals.enter-meta-token.body.password")} />
<BsmButton className="shrink-0 m-1 rounded-md p-0.5 !bg-light-main-color-3 dark:!bg-main-color-3" icon={showPassword ? "eye-cross" : "eye"} withBar={false} onClick={() => setShowPassword(prev => !prev)} />
</div>
</>
</>
)
}
@@ -11,7 +11,7 @@ import BeatConflict from "../../../../../assets/images/apngs/beat-conflict.png";
import { useService } from "renderer/hooks/use-service.hook";
export const DeleteMapsModal: ModalComponent<void, { linked: boolean; maps: BsmLocalMap[] }> = ({ resolver, data: { linked, maps } }) => {
const config = useService(ConfigurationService);
const t = useTranslation();
@@ -34,7 +34,7 @@ export const DeleteMapsModal: ModalComponent<void, { linked: boolean; maps: BsmL
<form className="text-gray-800 dark:text-gray-200">
<h1 className="text-3xl uppercase tracking-wide w-full text-center">{t(titleText)}</h1>
<BsmImage className="mx-auto h-24" image={BeatConflict} />
<p className="max-w-sm w-full">{t(descText, multiple ? { nb: maps.length.toString() } : { name: maps.at(0).rawInfo._songName })}</p>
<p className="max-w-sm w-full">{t(descText, multiple ? { nb: maps.length.toString() } : { name: maps.at(0).mapInfo.songName })}</p>
{linked && (
<p className="text-sm italic mt-2 cursor-help w-fit" title={t(infoTitleText)}>
{t(infoText)}
@@ -76,12 +76,48 @@ export const DownloadMapsModal: ModalComponent<void, { version: BSVersion; owned
};
}, []);
const loadMaps = (params: SearchParams) => {
const applyInstalledFilter = (maps: BsvMapDetail[]): BsvMapDetail[] => {
return maps.filter(map => {
if (!filter.installed) {
return true;
}
return !map.versions.some(version => ownedMapHashs.includes(version.hash));
});
}
const loadMaps = (params: SearchParams, tryToLoad = 5) => {
setLoading(() => true);
beatSaver
.searchMaps(params)
.then(maps => setMaps(prev => [...prev, ...maps]))
.finally(() => setLoading(() => false));
const searchResult = beatSaver.searchMaps(params);
if (!filter.installed) {
searchResult
.then(maps => setMaps(prev => [...prev, ...maps]))
.finally(() => setLoading(() => false));
return;
}
searchResult
.then(maps => {
if (!maps.length) {
setLoading(() => false);
return;
}
maps = applyInstalledFilter(maps);
setMaps(prev => [...prev, ...maps])
if (maps.length < tryToLoad) {
handleLoadMore();
return;
}
setLoading(() => false);
})
};
const extractMapDiffs = (map: BsvMapDetail): Map<BsvMapCharacteristic, ParsedMapDiff[]> => {
@@ -146,7 +182,7 @@ export const DownloadMapsModal: ModalComponent<void, { version: BSVersion; owned
>
<div className="flex h-9 gap-2 shrink-0">
<BsmDropdownButton ref={filterContainerRef} className="shrink-0 h-full relative z-[1] flex justify-start" buttonClassName="flex items-center justify-center h-full rounded-full px-2 py-1 !bg-light-main-color-1 dark:!bg-main-color-1" icon="filter" text="pages.version-viewer.maps.search-bar.filters-btn" withBar={false}>
<FilterPanel className="absolute top-[calc(100%+3px)] origin-top w-[450px] h-fit p-2 rounded-md shadow-md shadow-black" filter={filter} onChange={setFilter} onApply={handleSearch} onClose={() => filterContainerRef.current.close()} />
<FilterPanel className="absolute top-[calc(100%+3px)] origin-top w-[450px] h-fit p-2 rounded-md shadow-md shadow-black" localData={false} filter={filter} onChange={setFilter} onApply={handleSearch} onClose={() => filterContainerRef.current.close()} />
</BsmDropdownButton>
<input className="h-full bg-light-main-color-1 dark:bg-main-color-1 rounded-full px-2 grow pb-0.5" type="text" name="" id="" placeholder={t("pages.version-viewer.maps.search-bar.search-placeholder")} value={query} onChange={e => setQuery(e.target.value)} />
<BsmButton
@@ -0,0 +1,34 @@
import { BsmButton } from "renderer/components/shared/bsm-button.component"
import { BsmImage } from "renderer/components/shared/bsm-image.component"
import { ModalComponent, ModalExitCode } from "renderer/services/modale.service"
import BeatConflict from "../../../../../assets/images/apngs/beat-conflict.png";
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { BsmCheckbox } from "renderer/components/shared/bsm-checkbox.component";
import { useState } from "react";
export const NeedLaunchAdminModal: ModalComponent<boolean, void> = ({resolver}) => {
const t = useTranslation();
const [dontShowAgain, setDontShowAgain] = useState(false);
return (
<form className="text-gray-800 dark:text-gray-200 flex flex-col min-w-[350px]">
<h1 className="text-3xl uppercase tracking-wide w-full text-center">{t("modals.launch-as-admin.title")}</h1>
<BsmImage className="mx-auto h-24" image={BeatConflict} />
<div className="flex flex-col gap-3">
<p className="w-0 min-w-full">{t("modals.launch-as-admin.body.info")}</p>
<p className="w-0 min-w-full">{t("modals.launch-as-admin.body.info-2")}</p>
<p className="w-0 min-w-full text-sm italic">{t("modals.launch-as-admin.body.info-3")}</p>
</div>
<div className="flex flex-row justify-start items-center gap-1.5 my-4">
<BsmCheckbox className="relative z-[1] w-6 aspect-square" checked={dontShowAgain} onChange={setDontShowAgain} />
<span>{t("modals.launch-as-admin.not-remind-me")}</span>
</div>
<div className="grid grid-flow-col grid-cols-2 gap-4">
<BsmButton typeColor="cancel" className="rounded-md text-center flex items-center justify-center transition-all h-8" onClick={() => resolver({ exitCode: ModalExitCode.CANCELED })} withBar={false} text="misc.cancel" />
<BsmButton typeColor="primary" className="rounded-md text-center flex items-center justify-center transition-all h-8" onClick={() => resolver({ exitCode: ModalExitCode.COMPLETED, data: dontShowAgain })} withBar={false} text="modals.launch-as-admin.launch-as-admin" />
</div>
</form>
)
}
@@ -19,11 +19,9 @@ export const OriginalOculusVersionBackupModal: ModalComponent<boolean, void> = (
<form className="max-w-[450px] text-gray-800 dark:text-gray-200">
<h1 className="text-3xl uppercase tracking-wide w-full text-center text-gray-800 dark:text-gray-200">{t("modals.original-version-backup-oculus.title")}</h1>
<BsmImage className="mx-auto h-20" image={BeatConflict} />
<p className="text-sm italic mb-4 font-bold">{t("modals.original-version-backup-oculus.body.must-be-installed-once")}</p>
<p className="mb-4">{t("modals.original-version-backup-oculus.body.need-backup")}</p>
<p className="mb-4">{t("modals.original-version-backup-oculus.body.can-restore-later")}</p>
<p className="text-sm italic mb-4">{t("modals.original-version-backup-oculus.body.tips-launch-oculus")}</p>
<p className="mb-4">{t("modals.original-version-backup-oculus.body.will-backup")}</p>
<div className="flex flex-row justify-start items-center gap-1.5 my-4" >
<BsmCheckbox className="relative z-[1] w-6 aspect-square" checked={dontShowAgain} onChange={setDontShowAgain} />
@@ -12,7 +12,6 @@ import { useOnUpdate } from "renderer/hooks/use-on-update.hook";
import { NotificationService } from "renderer/services/notification.service";
import { ConfigurationService } from "renderer/services/configuration.service";
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { lt } from "semver";
import { lastValueFrom, of, take } from "rxjs";
import { FolderLinkState } from "renderer/services/version-folder-linker.service";
import { BsContentTabItemProps } from "../shared/bs-content-tab-panel/bs-content-tab-item.component";
@@ -74,20 +73,6 @@ export function ModelsPanel({ version, isActive, goToMods }: { version?: BSVersi
});
}, [isActive]);
useOnUpdate(() => {
if (!isActive || !version || lt(version.BSVersion, "1.29.4")) {
return;
}
if (config.get("not-remind-models-breaks")) {
return;
}
notification.notifyInfo({ title: "models.notifications.prevent-for-models-breaks.title", desc: "models.notifications.prevent-for-models-breaks.desc", actions: [{ id: "0", title: "models.notifications.prevent-for-mods.not-remind", cancel: true }], duration: 12_000 }).then(res => {
if (res === "0") {
config.set("not-remind-models-breaks", true);
}
});
}, [isActive, version]);
const exportModels = () => {
const selectedModels = modelsGridRefs.map(ref => ref.current?.getSelectedModels() as BsmLocalModel[]).flat();
modelsManager.exportModels(selectedModels, version);
@@ -31,7 +31,7 @@ export const BsManagerIcon = memo(({ className }: { className?: string }) => {
};
return (
<motion.div id="bsm-logo" className="cursor-pointer" whileTap={{ rotate: -10 }} variants={transitions} animate={playing && bpm > 0 ? "playing" : "idle"} onClick={clickAction}>
<motion.div className="cursor-pointer" whileTap={{ rotate: -10 }} variants={transitions} animate={playing && bpm > 0 ? "playing" : "idle"} onClick={clickAction}>
<svg className={className} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000">
<g fill={firstColor}>
<path d="M626.75,485.91l20.82,351.94a35.21,35.21,0,0,1-15.49,31.36L487.37,965.35l-.06,0A35.56,35.56,0,0,1,476,970.12a34.85,34.85,0,0,1-23.51-2.87L136.58,809.9a115.45,115.45,0,0,1-63.75-96.49L52,361.46a35.26,35.26,0,0,1,15.23-31.21l145.05-96.36a35.72,35.72,0,0,1,11.27-4.7,34.87,34.87,0,0,1,23.51,2.87L563,389.42a115.41,115.41,0,0,1,63.75,96.49Z" />
@@ -7,14 +7,13 @@ type Props = {
progress?: number;
isActive?: boolean;
onCancel?: (e: React.MouseEvent) => void;
id?: string;
};
export function NavBarItem({ progress, isDownloading, children, isActive, onCancel, id }: Props) {
export function NavBarItem({ progress, isDownloading, children, isActive, onCancel }: Props) {
const { firstColor, secondColor } = useThemeColor();
return (
<li id={id} className={`outline-none relative p-[1px] overflow-hidden rounded-xl flex justify-center items-center mb-1 ${isDownloading && "nav-item-download"} active:translate-y-[1px]`}>
<li className={`outline-none relative p-[1px] overflow-hidden rounded-xl flex justify-center items-center mb-1 ${isDownloading && "nav-item-download"} active:translate-y-[1px]`}>
{isDownloading && <div className="download-progress absolute top-0 w-full h-full" style={{ transform: `translate(${-(100 - progress)}%, 0)`, background: `linear-gradient(90deg, ${firstColor}, ${secondColor}, ${firstColor}, ${secondColor})` }} />}
<div className={`wrapper z-[1] px-1 py-[3px] w-full rounded-xl ${isDownloading && "bg-white dark:bg-black"} ${!isDownloading && "hover:bg-light-main-color-3 dark:hover:bg-main-color-3"} ${isActive && !isDownloading && "bg-light-main-color-3 dark:bg-main-color-3"}`}>
{children}
@@ -16,7 +16,7 @@ export function SharedNavBarItem() {
const color = useThemeColor("first-color");
return (
<NavBarItem id="shared-contents-btn" isActive={route === "/shared"}>
<NavBarItem isActive={route === "/shared"}>
<Tippy content={t("nav-bar.shared.tooltip")} className="font-bold !bg-neutral-900" placement="right-end" arrow={false} duration={[100, 0]} animation="shift-away-subtle">
<Link to="shared" className="w-full flex items-center justify-start content-center max-w-full h-[30px]">
<BsmIcon className="w-[19px] h-[19px] mr-[5px] shrink-0 brightness-125" icon="link" style={{ color }} />
@@ -48,12 +48,12 @@ export function NavBar() {
<NavBarSpliter />
<div className="w-full pb-2 flex flex-col items-center content-center justify-start gap-1">
<Tippy placement="right" content={t("nav-bar.add-version")} className="!bg-neutral-900" arrow={false}>
<Link id="add-version-btn" className="rounded-md w-9 h-9 flex justify-center items-center hover:bg-light-main-color-3 dark:hover:bg-main-color-3" to="blah">
<Link className="rounded-md w-9 h-9 flex justify-center items-center hover:bg-light-main-color-3 dark:hover:bg-main-color-3" to="blah">
<BsmIcon icon="add" className="text-blue-500 h-[34px]" style={{ color }} />
</Link>
</Tippy>
<Tippy placement="right" content={t("nav-bar.settings")} className="!bg-neutral-900" arrow={false}>
<Link id="settings-btn" className="rounded-md w-9 h-9 flex justify-center items-center hover:bg-light-main-color-3 dark:hover:bg-main-color-3" to="settings">
<Link className="rounded-md w-9 h-9 flex justify-center items-center hover:bg-light-main-color-3 dark:hover:bg-main-color-3" to="settings">
<BsmIcon icon="settings" className="text-blue-500 h-7" style={{ color }} />
</Link>
</Tippy>
@@ -9,7 +9,6 @@ import { getCorrectTextColor } from "renderer/helpers/correct-text-color";
type BsmButtonType = "primary" | "secondary" | "success" | "cancel" | "error";
type Props = {
id?: string;
className?: string;
style?: CSSProperties;
imgClassName?: string;
@@ -30,7 +29,7 @@ type Props = {
textClassName?: string;
};
export function BsmButton({ id, className, style, imgClassName, iconClassName, icon, image, text, type, active, withBar = true, disabled, onClickOutside, onClick, typeColor, color, title, iconColor, textClassName }: Props) {
export function BsmButton({ className, style, imgClassName, iconClassName, icon, image, text, type, active, withBar = true, disabled, onClickOutside, onClick, typeColor, color, title, iconColor, textClassName }: Props) {
const t = useTranslation();
const { firstColor, secondColor } = useThemeColor();
const ref = useRef(null);
@@ -73,7 +72,7 @@ export function BsmButton({ id, className, style, imgClassName, iconClassName, i
const handleClick = (e: MouseEvent<HTMLDivElement>) => !disabled && onClick?.(e);
return (
<div id={id} ref={ref} onClick={handleClick} title={t(title)} className={`${className} overflow-hidden group ${!withBar && !disabled && (!!typeColor || !!color) && "hover:brightness-[1.15]"} ${disabled ? "brightness-75 cursor-not-allowed" : "cursor-pointer"} ${renderTypeColor}`} style={{ ...style, backgroundColor: primaryColor || color }}>
<div ref={ref} onClick={handleClick} title={t(title)} className={`${className} overflow-hidden group ${!withBar && !disabled && (!!typeColor || !!color) && "hover:brightness-[1.15]"} ${disabled ? "brightness-75 cursor-not-allowed" : "cursor-pointer"} ${renderTypeColor}`} style={{ ...style, backgroundColor: primaryColor || color }}>
{image && <BsmImage image={image} className={imgClassName} />}
{icon && <BsmIcon icon={icon} className={iconClassName ?? "h-full w-full text-gray-800 dark:text-white"} style={{ color: iconColor || textColor }} />}
{text &&
@@ -4,7 +4,6 @@ import { useTranslation } from "renderer/hooks/use-translation.hook";
import { LaserSlider } from "./laser-slider.component";
type Props = {
id?: string,
tabIndex: number;
tabsText: string[];
onTabChange: (index: number) => void;
@@ -23,7 +22,7 @@ export function TabNavBar(props: Props) {
};
return (
<nav id={props.id} className={`relative h-8 shrink-0 cursor-pointer rounded-md overflow-hidden shadow-md shadow-black bg-light-main-color-2 dark:bg-main-color-2 ${props.className}`}>
<nav className={`relative h-8 shrink-0 cursor-pointer rounded-md overflow-hidden shadow-md shadow-black bg-light-main-color-2 dark:bg-main-color-2 ${props.className}`}>
<LaserSlider className="absolute w-full h-1 bottom-0" mode="horizontal" color={secondColor} nbSteps={props.tabsText.length} step={currentIndex} />
<ul className="grid" style={{ gridTemplateColumns: `repeat(${props.tabsText.length}, minmax(0, 1fr))` }}>
{props.tabsText.map((text, index) =>
@@ -109,7 +109,7 @@ export function ModsSlide({ version, onDisclamerDecline }: { version: BSVersion;
lastValueFrom(modsManager.getAvailableMods(version)),
lastValueFrom(modsManager.getInstalledMods(version))
]).then(([available, installed]) => {
const defaultMods = configService.get<string[]>("default_mods" as DefaultConfigKey);
const defaultMods = installed?.length ? [] : configService.get<string[]>("default_mods" as DefaultConfigKey);
setModsAvailable(modsToCategoryMap(available));
setModsSelected(available.filter(m => m.required || defaultMods.some(d => m.name.toLowerCase() === d.toLowerCase()) || installed.some(i => m.name === i.name)));
setModsInstalled(modsToCategoryMap(installed));
@@ -120,7 +120,7 @@ export function ModsSlide({ version, onDisclamerDecline }: { version: BSVersion;
const subs: Subscription[] = [];
if (isVisible && isOnline) {
(async () => {
if (configService.get<boolean>(ACCEPTED_DISCLAIMER_KEY)) {
return true;
@@ -138,7 +138,7 @@ export function ModsSlide({ version, onDisclamerDecline }: { version: BSVersion;
if (!canLoad) {
return onDisclamerDecline?.();
}
loadMods();
subs.push(
@@ -8,7 +8,6 @@ export const defaultConfiguration: { [key in DefaultConfigKey]: any } = {
"default-shared-folders": [
window.electron.path.join("Beat Saber_Data", "CustomLevels"),
window.electron.path.join("Beat Saber_Data", "CustomWIPLevels"),
"DLC"
],
};
+8
View File
@@ -62,4 +62,12 @@ export function logRenderError(...params: unknown[]){
ipc.sendLazy("log-error", { args: params });
}
export function addFilterStringLog(str: string){
ipc.sendLazy("add-filter-string", { args: str });
}
export function addFilterPatternLog(pattern: string){
ipc.sendLazy("add-filter-pattern", { args: pattern });
}
@@ -56,7 +56,7 @@ export function AvailableVersionsList() {
<AnimatePresence>
{selectedVersion && !downloading && (
<motion.div initial={{ y: "150%" }} animate={{ y: "0%" }} exit={{ y: "150%" }} className="absolute bottom-5" onClick={startDownload}>
<BsmButton id="download-version-btn" text="misc.download" className="relative text-gray-800 dark:text-gray-100 rounded-md text-3xl font-bold italic tracking-wide px-3 pb-2 pt-1 shadow-md shadow-black" />
<BsmButton text="misc.download" className="relative text-gray-800 dark:text-gray-100 rounded-md text-3xl font-bold italic tracking-wide px-3 pb-2 pt-1 shadow-md shadow-black" />
</motion.div>
)}
</AnimatePresence>
@@ -99,20 +99,6 @@ export function VersionViewer() {
});
}
const restoreOriginalOculusFolder = () => {
lastValueFrom(ipcService.sendV2("restore-original-oculus-folder")).then(() => {
notification.notifySuccess({
title: "Restauration réussie",
desc: "Le dossier a été restauré avec succès"
});
}).catch(() => {
notification.notifyError({
title: "Erreur lors de la restauration",
desc: "Le dossier n'a pas pu être restauré"
});
});
}
return (
<>
<BsmImage className="absolute w-full h-full top-0 left-0 object-cover" image={state.ReleaseImg || DefautVersionImage} errorImage={DefautVersionImage} />
@@ -131,7 +117,6 @@ export function VersionViewer() {
</div>
<BsmDropdownButton className="absolute top-3 right-4 h-9 w-9 bg-light-main-color-2 dark:bg-main-color-2 rounded-md" items={[
{ text: "pages.version-viewer.dropdown.open-folder", icon: "folder", onClick: openFolder },
state.oculus && { text: "pages.version-viewer.dropdown.restore-oculus-folder", icon: "backup-restore", onClick: restoreOriginalOculusFolder},
{ text: "pages.version-viewer.dropdown.verify-files", icon: "task", onClick: verifyFiles },
!state.steam && !state.oculus && { text: "pages.version-viewer.dropdown.edit", icon: "edit", onClick: edit },
!state.oculus && { text: "pages.version-viewer.dropdown.clone", icon: "copy", onClick: clone },
@@ -1,3 +0,0 @@
import { MapSpecificity } from "shared/models/maps/beat-saver.model";
export const MAP_SPECIFICITIES: MapSpecificity[] = ["automapper", "ranked", "curated", "verified", "fullSpread"];
@@ -1,3 +0,0 @@
import { MapRequirement } from "shared/models/maps/beat-saver.model";
export const MAP_REQUIREMENTS: MapRequirement[] = ["chroma", "noodle", "me", "cinema"];
@@ -1,3 +0,0 @@
import { MapStyle } from "shared/models/maps/beat-saver.model";
export const MAP_STYLES: MapStyle[] = ["dance", "swing", "nightcore", "folk", "family", "ambient", "funk", "jazz", "soul", "speedcore", "punk", "rb", "holiday", "vocaloid", "jrock", "trance", "drumbass", "comedy", "instrumental", "hardcore", "kpop", "indie", "techno", "house", "game", "film", "alt", "dubstep", "metal", "anime", "hiphop", "jpop", "rock", "pop", "electronic", "classical-orchestral"];
@@ -1,3 +0,0 @@
import { MapType } from "shared/models/maps/beat-saver.model";
export const MAP_TYPES: MapType[] = ["accuracy", "balanced", "challenge", "dancestyle", "fitness", "speed", "tech"];
+20 -5
View File
@@ -10,6 +10,7 @@ import { ModalExitCode, ModalService } from "./modale.service";
import { OriginalOculusVersionBackupModal } from "renderer/components/modal/modal-types/original-oculus-version-backup.modal";
import { CustomError } from "shared/models/exceptions/custom-error.class";
import { sToMs } from "shared/helpers/time.helpers";
import { NeedLaunchAdminModal } from "renderer/components/modal/modal-types/need-launch-admin-modal.component";
export class BSLauncherService {
private static instance: BSLauncherService;
@@ -21,7 +22,7 @@ export class BSLauncherService {
private readonly modals: ModalService;
public readonly versionRunning$: BehaviorSubject<BSVersion> = new BehaviorSubject(null);
public static getInstance(){
if(!BSLauncherService.instance){ BSLauncherService.instance = new BSLauncherService(); }
return BSLauncherService.instance;
@@ -70,7 +71,17 @@ export class BSLauncherService {
}
}))
}
private async doMustStartAsAdmin(): Promise<boolean> {
const needAdmin = await lastValueFrom(this.ipcService.sendV2<boolean, void>("bs-launch.need-start-as-admin"));
if(!needAdmin){ return false; }
if(this.config.get("dont-remind-admin")){ return true; }
const modalRes = await this.modals.openModal(NeedLaunchAdminModal);
if(modalRes.exitCode !== ModalExitCode.COMPLETED){ throw new Error("Admin launch canceled"); }
this.config.set("dont-remind-admin", modalRes.data);
return true;
}
public doLaunch(launchOptions: LaunchOption): Observable<BSLaunchEventData>{
return this.ipcService.sendV2<BSLaunchEventData, LaunchOption>("bs-launch.launch", {args: launchOptions});
}
@@ -79,17 +90,21 @@ export class BSLauncherService {
return new Observable<BSLaunchEventData>(obs => {
(async () => {
if(launchOptions.version.metadata?.store === BsStore.OCULUS && !this.notRewindBackupOculus()){
const { exitCode, data: notRewind } = await this.modals.openModal(OriginalOculusVersionBackupModal);
if(exitCode !== ModalExitCode.COMPLETED){ return; }
this.setNotRewindBackupOculus(notRewind);
}
if(launchOptions.version.metadata?.store !== BsStore.OCULUS){
launchOptions.admin = await this.doMustStartAsAdmin();
}
const launch$ = this.handleLaunchEvents(this.doLaunch(launchOptions));
await lastValueFrom(launch$);
})().then(() => {
obs.complete();
}).catch(err => {

Some files were not shown because too many files have changed in this diff Show More