réarganisation du back en services, mise de depot downloader dans les assets

This commit is contained in:
MathieuG-P
2022-05-15 15:14:02 +02:00
parent 62bc1c0926
commit 16ab71df55
26 changed files with 534 additions and 92 deletions
+4 -1
View File
@@ -4,6 +4,9 @@
"global-require": "off",
"import/no-dynamic-require": "off",
"prettier/prettier": 0,
"import/prefer-default-export": "off"
"import/prefer-default-export": "off",
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": "off",
"@angular-eslint/no-empty-lifecycle-method": "off"
}
}
+5 -1
View File
@@ -7,7 +7,11 @@ module.exports = {
// Since React 17 and typescript 4.1 you can safely disable the rule
'react/react-in-jsx-scope': 'off',
'prettier/prettier': 0,
"import/prefer-default-export": "off"
"global-require": 0
"import/prefer-default-export": "off",
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": "off",
"@angular-eslint/no-empty-lifecycle-method": "off"
},
parserOptions: {
ecmaVersion: 2020,
+278 -73
View File
@@ -8,6 +8,7 @@
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@node-steam/vdf": "^2.2.0",
"electron-debug": "^3.2.0",
"electron-log": "^4.4.6",
"electron-updater": "^4.6.5",
@@ -16,6 +17,7 @@
"react-dom": "^18.0.0",
"react-icons": "^4.3.1",
"react-router-dom": "^6.3.0",
"regedit": "^5.1.1",
"tailwind-scrollbar-hide": "^1.1.7"
},
"devDependencies": {
@@ -1469,6 +1471,15 @@
"dev": true,
"license": "CC0-1.0"
},
"node_modules/@node-steam/vdf": {
"version": "2.2.0",
"resolved": "https://npm.zone51.tf/@node-steam%2fvdf/-/vdf-2.2.0.tgz",
"integrity": "sha512-YCfIPsIpyrtOP5AdsarjPqjTElVFrXJlWedWNzjCaIeam06v9ebYgApRAcw9b93awNDboTEiHFMnCvlJJHqKcA==",
"license": "MIT",
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -5128,7 +5139,6 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
"dev": true,
"license": "MIT"
},
"node_modules/cosmiconfig": {
@@ -5736,16 +5746,20 @@
}
},
"node_modules/define-properties": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
"version": "1.1.4",
"resolved": "https://npm.zone51.tf/define-properties/-/define-properties-1.1.4.tgz",
"integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==",
"dev": true,
"license": "MIT",
"dependencies": {
"object-keys": "^1.0.12"
"has-property-descriptors": "^1.0.0",
"object-keys": "^1.1.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/defined": {
@@ -7183,32 +7197,35 @@
}
},
"node_modules/es-abstract": {
"version": "1.19.2",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.2.tgz",
"integrity": "sha512-gfSBJoZdlL2xRiOCy0g8gLMryhoe1TlimjzU99L/31Z8QEGIhVQI+EWwt5lT+AuU9SnorVupXFqqOGqGfsyO6w==",
"version": "1.20.0",
"resolved": "https://npm.zone51.tf/es-abstract/-/es-abstract-1.20.0.tgz",
"integrity": "sha512-URbD8tgRthKD3YcC39vbvSDrX23upXnPcnGAjQfgxXF5ID75YcENawc9ZX/9iTP9ptUyfCLIxTTuMYoRfiOVKA==",
"dev": true,
"license": "MIT",
"dependencies": {
"call-bind": "^1.0.2",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"function.prototype.name": "^1.1.5",
"get-intrinsic": "^1.1.1",
"get-symbol-description": "^1.0.0",
"has": "^1.0.3",
"has-property-descriptors": "^1.0.0",
"has-symbols": "^1.0.3",
"internal-slot": "^1.0.3",
"is-callable": "^1.2.4",
"is-negative-zero": "^2.0.2",
"is-regex": "^1.1.4",
"is-shared-array-buffer": "^1.0.1",
"is-shared-array-buffer": "^1.0.2",
"is-string": "^1.0.7",
"is-weakref": "^1.0.2",
"object-inspect": "^1.12.0",
"object-keys": "^1.1.1",
"object.assign": "^4.1.2",
"string.prototype.trimend": "^1.0.4",
"string.prototype.trimstart": "^1.0.4",
"unbox-primitive": "^1.0.1"
"regexp.prototype.flags": "^1.4.1",
"string.prototype.trimend": "^1.0.5",
"string.prototype.trimstart": "^1.0.5",
"unbox-primitive": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
@@ -9039,6 +9056,25 @@
"dev": true,
"license": "MIT"
},
"node_modules/function.prototype.name": {
"version": "1.1.5",
"resolved": "https://npm.zone51.tf/function.prototype.name/-/function.prototype.name-1.1.5.tgz",
"integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==",
"dev": true,
"license": "MIT",
"dependencies": {
"call-bind": "^1.0.2",
"define-properties": "^1.1.3",
"es-abstract": "^1.19.0",
"functions-have-names": "^1.2.2"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/functional-red-black-tree": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
@@ -9046,6 +9082,16 @@
"dev": true,
"license": "MIT"
},
"node_modules/functions-have-names": {
"version": "1.2.3",
"resolved": "https://npm.zone51.tf/functions-have-names/-/functions-have-names-1.2.3.tgz",
"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
"dev": true,
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/gauge": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",
@@ -9378,9 +9424,9 @@
}
},
"node_modules/has-bigints": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
"integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==",
"version": "1.0.2",
"resolved": "https://npm.zone51.tf/has-bigints/-/has-bigints-1.0.2.tgz",
"integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==",
"dev": true,
"license": "MIT",
"funding": {
@@ -9397,6 +9443,19 @@
"node": ">=8"
}
},
"node_modules/has-property-descriptors": {
"version": "1.0.0",
"resolved": "https://npm.zone51.tf/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
"integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"get-intrinsic": "^1.1.1"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-symbols": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
@@ -9810,6 +9869,12 @@
],
"license": "BSD-3-Clause"
},
"node_modules/if-async": {
"version": "3.7.4",
"resolved": "https://npm.zone51.tf/if-async/-/if-async-3.7.4.tgz",
"integrity": "sha1-VYaN6wCT08Z79xZudFNT+5vLIaI=",
"license": "MIT"
},
"node_modules/ignore": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
@@ -9946,7 +10011,6 @@
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true,
"license": "ISC"
},
"node_modules/ini": {
@@ -10007,7 +10071,7 @@
},
"node_modules/is-bigint": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
"resolved": "https://npm.zone51.tf/is-bigint/-/is-bigint-1.0.4.tgz",
"integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
"dev": true,
"license": "MIT",
@@ -10033,7 +10097,7 @@
},
"node_modules/is-boolean-object": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
"resolved": "https://npm.zone51.tf/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
"integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
"dev": true,
"license": "MIT",
@@ -10234,7 +10298,7 @@
},
"node_modules/is-number-object": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz",
"resolved": "https://npm.zone51.tf/is-number-object/-/is-number-object-1.0.7.tgz",
"integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==",
"dev": true,
"license": "MIT",
@@ -14694,6 +14758,18 @@
"node": ">=8"
}
},
"node_modules/regedit": {
"version": "5.1.1",
"resolved": "https://npm.zone51.tf/regedit/-/regedit-5.1.1.tgz",
"integrity": "sha512-NJ2OZ14czryt3RiQyMM/nptaiu0bF1CT+YVw0PBziMrLJyq8pdmIAvupi9E+NPWJLDJtyHDoKs5g5wcbP8ANIg==",
"license": "MIT",
"dependencies": {
"debug": "^4.1.0",
"if-async": "^3.7.4",
"stream-slicer": "0.0.6",
"through2": "^0.6.3"
}
},
"node_modules/regenerator-runtime": {
"version": "0.13.9",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
@@ -15777,6 +15853,12 @@
"node": ">= 0.6"
}
},
"node_modules/stream-slicer": {
"version": "0.0.6",
"resolved": "https://npm.zone51.tf/stream-slicer/-/stream-slicer-0.0.6.tgz",
"integrity": "sha1-+GsqxcJEC3oKh7cfM2ZcB4gEYTg=",
"license": "MIT"
},
"node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -15854,28 +15936,30 @@
}
},
"node_modules/string.prototype.trimend": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
"integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
"version": "1.0.5",
"resolved": "https://npm.zone51.tf/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz",
"integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==",
"dev": true,
"license": "MIT",
"dependencies": {
"call-bind": "^1.0.2",
"define-properties": "^1.1.3"
"define-properties": "^1.1.4",
"es-abstract": "^1.19.5"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/string.prototype.trimstart": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
"integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
"version": "1.0.5",
"resolved": "https://npm.zone51.tf/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz",
"integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==",
"dev": true,
"license": "MIT",
"dependencies": {
"call-bind": "^1.0.2",
"define-properties": "^1.1.3"
"define-properties": "^1.1.4",
"es-abstract": "^1.19.5"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -16343,6 +16427,40 @@
"dev": true,
"license": "MIT"
},
"node_modules/through2": {
"version": "0.6.5",
"resolved": "https://npm.zone51.tf/through2/-/through2-0.6.5.tgz",
"integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
"license": "MIT",
"dependencies": {
"readable-stream": ">=1.0.33-1 <1.1.0-0",
"xtend": ">=4.0.0 <4.1.0-0"
}
},
"node_modules/through2/node_modules/isarray": {
"version": "0.0.1",
"resolved": "https://npm.zone51.tf/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
"license": "MIT"
},
"node_modules/through2/node_modules/readable-stream": {
"version": "1.0.34",
"resolved": "https://npm.zone51.tf/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"license": "MIT",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
}
},
"node_modules/through2/node_modules/string_decoder": {
"version": "0.10.31",
"resolved": "https://npm.zone51.tf/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
"license": "MIT"
},
"node_modules/thunky": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",
@@ -16772,15 +16890,15 @@
}
},
"node_modules/unbox-primitive": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
"integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==",
"version": "1.0.2",
"resolved": "https://npm.zone51.tf/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
"integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==",
"dev": true,
"license": "MIT",
"dependencies": {
"function-bind": "^1.1.1",
"has-bigints": "^1.0.1",
"has-symbols": "^1.0.2",
"call-bind": "^1.0.2",
"has-bigints": "^1.0.2",
"has-symbols": "^1.0.3",
"which-boxed-primitive": "^1.0.2"
},
"funding": {
@@ -17679,7 +17797,7 @@
},
"node_modules/which-boxed-primitive": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
"resolved": "https://npm.zone51.tf/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
"integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
"dev": true,
"license": "MIT",
@@ -17833,7 +17951,6 @@
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.4"
@@ -18936,6 +19053,11 @@
"integrity": "sha512-OZx2PxHtJDc9NOHGR3T0ZtX1WYl5qH/xmiH3sKSmcd3o+vPMG1kVUYbZrMxH3fVKpkkkrQpwETCIDRXcMXAWTw==",
"dev": true
},
"@node-steam/vdf": {
"version": "2.2.0",
"resolved": "https://npm.zone51.tf/@node-steam%2fvdf/-/vdf-2.2.0.tgz",
"integrity": "sha512-YCfIPsIpyrtOP5AdsarjPqjTElVFrXJlWedWNzjCaIeam06v9ebYgApRAcw9b93awNDboTEiHFMnCvlJJHqKcA=="
},
"@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -21569,8 +21691,7 @@
"core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
"dev": true
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"cosmiconfig": {
"version": "7.0.1",
@@ -21979,12 +22100,13 @@
"dev": true
},
"define-properties": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
"version": "1.1.4",
"resolved": "https://npm.zone51.tf/define-properties/-/define-properties-1.1.4.tgz",
"integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==",
"dev": true,
"requires": {
"object-keys": "^1.0.12"
"has-property-descriptors": "^1.0.0",
"object-keys": "^1.1.1"
}
},
"defined": {
@@ -23025,31 +23147,34 @@
}
},
"es-abstract": {
"version": "1.19.2",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.2.tgz",
"integrity": "sha512-gfSBJoZdlL2xRiOCy0g8gLMryhoe1TlimjzU99L/31Z8QEGIhVQI+EWwt5lT+AuU9SnorVupXFqqOGqGfsyO6w==",
"version": "1.20.0",
"resolved": "https://npm.zone51.tf/es-abstract/-/es-abstract-1.20.0.tgz",
"integrity": "sha512-URbD8tgRthKD3YcC39vbvSDrX23upXnPcnGAjQfgxXF5ID75YcENawc9ZX/9iTP9ptUyfCLIxTTuMYoRfiOVKA==",
"dev": true,
"requires": {
"call-bind": "^1.0.2",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"function.prototype.name": "^1.1.5",
"get-intrinsic": "^1.1.1",
"get-symbol-description": "^1.0.0",
"has": "^1.0.3",
"has-property-descriptors": "^1.0.0",
"has-symbols": "^1.0.3",
"internal-slot": "^1.0.3",
"is-callable": "^1.2.4",
"is-negative-zero": "^2.0.2",
"is-regex": "^1.1.4",
"is-shared-array-buffer": "^1.0.1",
"is-shared-array-buffer": "^1.0.2",
"is-string": "^1.0.7",
"is-weakref": "^1.0.2",
"object-inspect": "^1.12.0",
"object-keys": "^1.1.1",
"object.assign": "^4.1.2",
"string.prototype.trimend": "^1.0.4",
"string.prototype.trimstart": "^1.0.4",
"unbox-primitive": "^1.0.1"
"regexp.prototype.flags": "^1.4.1",
"string.prototype.trimend": "^1.0.5",
"string.prototype.trimstart": "^1.0.5",
"unbox-primitive": "^1.0.2"
}
},
"es-module-lexer": {
@@ -24299,12 +24424,30 @@
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
"function.prototype.name": {
"version": "1.1.5",
"resolved": "https://npm.zone51.tf/function.prototype.name/-/function.prototype.name-1.1.5.tgz",
"integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==",
"dev": true,
"requires": {
"call-bind": "^1.0.2",
"define-properties": "^1.1.3",
"es-abstract": "^1.19.0",
"functions-have-names": "^1.2.2"
}
},
"functional-red-black-tree": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true
},
"functions-have-names": {
"version": "1.2.3",
"resolved": "https://npm.zone51.tf/functions-have-names/-/functions-have-names-1.2.3.tgz",
"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
"dev": true
},
"gauge": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",
@@ -24537,9 +24680,9 @@
}
},
"has-bigints": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
"integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==",
"version": "1.0.2",
"resolved": "https://npm.zone51.tf/has-bigints/-/has-bigints-1.0.2.tgz",
"integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==",
"dev": true
},
"has-flag": {
@@ -24548,6 +24691,15 @@
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"has-property-descriptors": {
"version": "1.0.0",
"resolved": "https://npm.zone51.tf/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
"integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",
"dev": true,
"requires": {
"get-intrinsic": "^1.1.1"
}
},
"has-symbols": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
@@ -24822,6 +24974,11 @@
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"dev": true
},
"if-async": {
"version": "3.7.4",
"resolved": "https://npm.zone51.tf/if-async/-/if-async-3.7.4.tgz",
"integrity": "sha1-VYaN6wCT08Z79xZudFNT+5vLIaI="
},
"ignore": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
@@ -24914,8 +25071,7 @@
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"ini": {
"version": "1.3.8",
@@ -24960,7 +25116,7 @@
},
"is-bigint": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
"resolved": "https://npm.zone51.tf/is-bigint/-/is-bigint-1.0.4.tgz",
"integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
"dev": true,
"requires": {
@@ -24978,7 +25134,7 @@
},
"is-boolean-object": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
"resolved": "https://npm.zone51.tf/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
"integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
"dev": true,
"requires": {
@@ -25094,7 +25250,7 @@
},
"is-number-object": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz",
"resolved": "https://npm.zone51.tf/is-number-object/-/is-number-object-1.0.7.tgz",
"integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==",
"dev": true,
"requires": {
@@ -28124,6 +28280,17 @@
"strip-indent": "^3.0.0"
}
},
"regedit": {
"version": "5.1.1",
"resolved": "https://npm.zone51.tf/regedit/-/regedit-5.1.1.tgz",
"integrity": "sha512-NJ2OZ14czryt3RiQyMM/nptaiu0bF1CT+YVw0PBziMrLJyq8pdmIAvupi9E+NPWJLDJtyHDoKs5g5wcbP8ANIg==",
"requires": {
"debug": "^4.1.0",
"if-async": "^3.7.4",
"stream-slicer": "0.0.6",
"through2": "^0.6.3"
}
},
"regenerator-runtime": {
"version": "0.13.9",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
@@ -28896,6 +29063,11 @@
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
"dev": true
},
"stream-slicer": {
"version": "0.0.6",
"resolved": "https://npm.zone51.tf/stream-slicer/-/stream-slicer-0.0.6.tgz",
"integrity": "sha1-+GsqxcJEC3oKh7cfM2ZcB4gEYTg="
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -28957,23 +29129,25 @@
}
},
"string.prototype.trimend": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
"integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
"version": "1.0.5",
"resolved": "https://npm.zone51.tf/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz",
"integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==",
"dev": true,
"requires": {
"call-bind": "^1.0.2",
"define-properties": "^1.1.3"
"define-properties": "^1.1.4",
"es-abstract": "^1.19.5"
}
},
"string.prototype.trimstart": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
"integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
"version": "1.0.5",
"resolved": "https://npm.zone51.tf/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz",
"integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==",
"dev": true,
"requires": {
"call-bind": "^1.0.2",
"define-properties": "^1.1.3"
"define-properties": "^1.1.4",
"es-abstract": "^1.19.5"
}
},
"strip-ansi": {
@@ -29290,6 +29464,38 @@
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
"dev": true
},
"through2": {
"version": "0.6.5",
"resolved": "https://npm.zone51.tf/through2/-/through2-0.6.5.tgz",
"integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
"requires": {
"readable-stream": ">=1.0.33-1 <1.1.0-0",
"xtend": ">=4.0.0 <4.1.0-0"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "https://npm.zone51.tf/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.0.34",
"resolved": "https://npm.zone51.tf/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
}
},
"string_decoder": {
"version": "0.10.31",
"resolved": "https://npm.zone51.tf/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"thunky": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",
@@ -29569,14 +29775,14 @@
"dev": true
},
"unbox-primitive": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
"integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==",
"version": "1.0.2",
"resolved": "https://npm.zone51.tf/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
"integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==",
"dev": true,
"requires": {
"function-bind": "^1.1.1",
"has-bigints": "^1.0.1",
"has-symbols": "^1.0.2",
"call-bind": "^1.0.2",
"has-bigints": "^1.0.2",
"has-symbols": "^1.0.3",
"which-boxed-primitive": "^1.0.2"
}
},
@@ -30208,7 +30414,7 @@
},
"which-boxed-primitive": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
"resolved": "https://npm.zone51.tf/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
"integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
"dev": true,
"requires": {
@@ -30313,8 +30519,7 @@
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"dev": true
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
},
"y18n": {
"version": "5.0.8",
+2
View File
@@ -233,6 +233,7 @@
"webpack-merge": "^5.8.0"
},
"dependencies": {
"@node-steam/vdf": "^2.2.0",
"electron-debug": "^3.2.0",
"electron-log": "^4.4.6",
"electron-updater": "^4.6.5",
@@ -241,6 +242,7 @@
"react-dom": "^18.0.0",
"react-icons": "^4.3.1",
"react-router-dom": "^6.3.0",
"regedit": "^5.1.1",
"tailwind-scrollbar-hide": "^1.1.7"
},
"devEngines": {
+3
View File
@@ -0,0 +1,3 @@
export const BS_EXECUTABLE = "Beat Saber.exe";
export const BS_APP_ID = "620980";
export const BS_DEPOT = "620981";
+4 -3
View File
@@ -12,7 +12,7 @@
import { ipcMain } from 'electron';
import path from 'path';
import { ChildProcessWithoutNullStreams, spawn } from 'child_process';
import { createFolderIfNotExist } from '../utils';
import { UtilsService } from '../services/utils.service';
export interface InitDownloadInfoInterface {
@@ -26,14 +26,15 @@ export interface InitDownloadInfoInterface {
}
const DEPOT_DOWNLOADER_EXE = 'DepotDownloader.exe';
const DEPOT_DOWNLOADER_PATH = path.join(path.dirname(__dirname), '..', 'extraResources', 'depot-downloader', DEPOT_DOWNLOADER_EXE);
let PROCESS: ChildProcessWithoutNullStreams;
ipcMain.on('bs-download.start', async (event, args: InitDownloadInfoInterface) => {
const DEPOT_DOWNLOADER_PATH = path.join(UtilsService.getInstance().getAssetsPath(), 'depot-downloader', DEPOT_DOWNLOADER_EXE);
console.log(UtilsService.getInstance().getAssetsPath());
console.log(DEPOT_DOWNLOADER_PATH);
console.log(args.cwd);
createFolderIfNotExist(args.cwd);
UtilsService.getInstance().createFolderIfNotExist(args.cwd);
PROCESS = spawn(DEPOT_DOWNLOADER_PATH, [`-app ${args.app}`, `-depot ${args.depot}`, `-manifest ${args.manifest}`, `-username ${args.username}`, `-dir ${args.folder}`, args.stay ? `-remember-password` : ''], {shell: true, cwd: args.cwd});
PROCESS.stdout.on('data', data => {
+36
View File
@@ -0,0 +1,36 @@
import { ipcMain } from 'electron';
import path from "path";
import { spawn } from 'child_process';
import { UtilsService } from '../services/utils.service'
import { SteamService } from '../services/steam.service';
import { BSVersionManagerService } from '../services/bs-version-manager.service';
import { BSInstallerService } from '../services/bs-installer.service'
import { BS_EXECUTABLE, BS_APP_ID } from '../constants';
ipcMain.on('test-launch', async () => {
console.log("steam "+ UtilsService.getInstance().taskRunning('steam.exe'));
console.log(await SteamService.getInstance().getSteamGameFolder());
console.log(BSInstallerService.getInstance().getBSInstallationFolder());
console.log((await BSVersionManagerService.getInstance().loadBsVersions()));
return;
const BS_EXE = "Beat Saber.exe"
const BS_PATH = path.join('C:', 'Users', 'Mathieu', 'Desktop', 'BSLegacyLauncher', 'Beat Saber')
let a = spawn(`\"${path.join(BS_PATH, BS_EXE)}\"`, ["-vrmode oculus", "--verbose"], { shell: true, cwd: BS_PATH, env: {...process.env ,"SteamAppId": "620980"}});
a.stdout.on('data', data => console.log(data.toString()));
a.stderr.on('data', data => console.log(data.toString()));
a.on('message', m => console.log(m));
a.on('error', err => console.log(err));
a.on('exit', e => console.log(e));
a.on('disconnect', (d: any) => console.log(d))
console.log('oui');
});
ipcMain.on('bs-launch.steam', async (event, args) => {
const steamService = SteamService.getInstance();
if(!steamService.isGameInstalled(BS_APP_ID)){ event.reply('bs-launch.not-installed'); }
const beatSaberSteamFolder = path.join(await steamService.getSteamPath(), "Beat Saber");
const beatSaberSteamExe = path.join(beatSaberSteamFolder, BS_EXECUTABLE);
const spawnProcess = spawn(`\"${beatSaberSteamExe}\"`, [], {shell: true, cwd: beatSaberSteamFolder, env: {...process.env, "SteamAppId": "620980"}});
})
+8
View File
@@ -0,0 +1,8 @@
import { ipcMain } from 'electron';
import { BSVersionManagerService } from '../services/bs-version-manager.service'
ipcMain.on('bs-version.request', async (event, args) => {
});
+1
View File
@@ -1,2 +1,3 @@
import './bs-download-ipcs';
import './window-controls-ipcs';
import './bs-launcher-ipcs';
+4 -4
View File
@@ -1,19 +1,19 @@
import { ipcMain } from 'electron';
import { getMainWindow } from '../main';
ipcMain.on('window.close', () => {
ipcMain.on('window.close', async () => {
getMainWindow()?.close();
});
ipcMain.on('window.maximize', () => {
ipcMain.on('window.maximize', async () => {
getMainWindow()?.maximize();
});
ipcMain.on('window.minimize', () => {
ipcMain.on('window.minimize', async () => {
getMainWindow()?.minimize();
});
ipcMain.on('window.reset', () => {
ipcMain.on('window.reset', async () => {
console.log('aaaaaa');
getMainWindow()?.restore();
});
+4 -3
View File
@@ -15,6 +15,7 @@ import log from 'electron-log';
import MenuBuilder from './menu';
import { resolveHtmlPath } from './util';
import './ipcs/custom-ipcs';
import { UtilsService } from './services/utils.service';
export default class AppUpdater {
constructor() {
@@ -66,9 +67,9 @@ const createWindow = async () => {
await installExtensions();
}
const RESOURCES_PATH = app.isPackaged
? path.join(process.resourcesPath, 'assets')
: path.join(__dirname, '../../assets');
const RESOURCES_PATH = app.isPackaged ? path.join(process.resourcesPath, 'assets') : path.join(__dirname, '../../assets');
UtilsService.getInstance().setAssetsPath(RESOURCES_PATH);
const getAssetPath = (...paths: string[]): string => {
return path.join(RESOURCES_PATH, ...paths);
+29
View File
@@ -0,0 +1,29 @@
import path from "path";
import { BSVersionManagerService } from "./bs-version-manager.service";
import { UtilsService } from "./utils.service";
export class BSInstallerService{
private static readonly INSTALLATION_FOLDER = "BSManager";
private static instance: BSInstallerService;
private readonly utils: UtilsService = UtilsService.getInstance();
private installationFolder: string;
private constructor(){
this.installationFolder = path.join(this.utils.getUserDocumentsFolder(), BSInstallerService.INSTALLATION_FOLDER)
}
public static getInstance(){
if(!BSInstallerService.instance){ BSInstallerService.instance = new BSInstallerService(); }
return BSInstallerService.instance;
}
public getBSInstallationFolder(): string{ return this.installationFolder; }
}
@@ -0,0 +1,38 @@
import { get } from 'https'
export class BSVersionManagerService{
private static readonly REMOTE_BS_VERSIONS_URL: string = "https://raw.githubusercontent.com/Zagrios/bs-manager/master/dynamic-resources/bs-versions.json"
private static instance: BSVersionManagerService;
private bsVersions: BSVersion[] = [];
private constructor(){}
public static getInstance(): BSVersionManagerService{
if(!BSVersionManagerService.instance){ BSVersionManagerService.instance = new BSVersionManagerService() }
return BSVersionManagerService.instance;
}
public loadBsVersions(): Promise<BSVersion[]>{
return new Promise<BSVersion[]>((resolve, reject) => {
let body = ''
get(BSVersionManagerService.REMOTE_BS_VERSIONS_URL, (res) => {
res.on('data', chunk => body += chunk);
res.on('end', () => {
this.bsVersions = JSON.parse(body);
resolve(this.bsVersions);
});
res.on('error', (err) => reject(err))
})
})
}
public getVersionDetailFromVersionNumber(version: string): BSVersion{
return this.bsVersions.find(v => v.BSVersion === version);
}
}
export interface BSVersion { BSVersion: string, BSManifest: string, ReleaseURL: string, year: string }
+62
View File
@@ -0,0 +1,62 @@
import { UtilsService } from "./utils.service";
import regedit from 'regedit'
import path from "path";
import { parse } from "@node-steam/vdf";
import { readFile } from "fs/promises";
export class SteamService{
private static instance: SteamService;
private readonly utils: UtilsService = UtilsService.getInstance();
private steamPath: string = '';
private constructor(){}
public static getInstance(){
if(!SteamService.instance){ SteamService.instance = new SteamService(); }
return SteamService.instance;
}
public steamRunning(): boolean{
return this.utils.taskRunning('steam.exe');
}
public async getSteamPath(): Promise<string>{
if(this.steamPath !== ''){ return this.steamPath; }
const [win32Res, win64Res] = await Promise.all([
regedit.promisified.list(['HKLM\\SOFTWARE\\Valve\\Steam']),
regedit.promisified.list(['HKLM\\SOFTWARE\\WOW6432Node\\Valve\\Steam'])
]);
const [win32, win64] = [win32Res["HKLM\\SOFTWARE\\Valve\\Steam"], win64Res["HKLM\\SOFTWARE\\WOW6432Node\\Valve\\Steam"]];
let res = ''
if(win64.values.InstallPath.value){ res = win64.values.InstallPath.value as string; }
else if(win32.values.InstallPath.value){ res = win32.values.InstallPath.value as string; }
this.steamPath = res;
return this.steamPath;
}
public async getSteamGameFolder(): Promise<string>{
const steamFolder = await this.getSteamPath();
return path.join(steamFolder, 'common');
}
public async isGameInstalled(gameId: string): Promise<boolean>{
const steamPath = await this.getSteamPath();
let libraryFolders: any = path.join(steamPath, 'steamapps', 'libraryfolders.vdf');
if(!this.utils.pathExist(libraryFolders)){ return false; }
libraryFolders = parse(await readFile(libraryFolders, {encoding: 'utf-8'}));
if(!libraryFolders.libraryfolders){ return false; }
libraryFolders = libraryFolders.libraryfolders
for(const libKey in Object.keys(libraryFolders)){
if(!libraryFolders[libKey]["apps"]){ continue; }
if(libraryFolders[libKey]["apps"][gameId]){ return true };
}
return false;
}
}
+46
View File
@@ -0,0 +1,46 @@
import { existsSync, mkdirSync } from "fs";
import { spawnSync } from "child_process";
import { homedir } from "os";
import path from "path";
export class UtilsService{
private static instance: UtilsService;
private assetsPath: string = '';
private constructor(){}
public static getInstance(){
if(!this.instance){ UtilsService.instance = new UtilsService(); }
return UtilsService.instance;
}
public setAssetsPath(path: string): void{ this.assetsPath = path; }
public getAssetsPath(): string{ return this.assetsPath; }
//à supprimer
public folderExist(path: string): boolean{ return existsSync(path); }
public pathExist(path: string): boolean{ return existsSync(path); }
public createFolderIfNotExist(path: string): void{
if(!this.folderExist(path)){ mkdirSync(path); }
}
public taskRunning(task: string): boolean{
const tasks = spawnSync('tasklist').stdout.toString();
return tasks.includes(task);
}
public getUserFolder(){ return homedir(); }
public getUserDocumentsFolder(): string{
return path.join(this.getUserFolder(), 'Documents');
}
}
-4
View File
@@ -1,4 +0,0 @@
export function createFolderIfNotExist(path: string){
const [existsSync, mkdirSync] = [require('fs').existsSync, require('fs').mkdirSync];
if (!existsSync(path)){ mkdirSync(path); }
}
+8 -2
View File
@@ -1,5 +1,5 @@
import { createRoot } from 'react-dom/client';
import { InitDownloadInfoInterface } from 'main/ipcs/bs-download-ipcs';
import { InitDownloadInfoInterface } from '../main/ipcs/bs-download-ipcs';
import App from './App';
import 'tailwindcss/tailwind.css';
import './index.css'
@@ -8,8 +8,14 @@ const container = document.getElementById('root')!;
const root = createRoot(container);
root.render(<App />);
// setTimeout(() => {
// window.electron.ipcRenderer.sendMessage('bs-download.start', {app: '620980', depot: '620981', manifest: '6222769774084748916', stay: true, username: 'lekilleur618', folder: 'test2', cwd: 'C:\\test'} as InitDownloadInfoInterface);
// }, 5000);
// window.electron.ipcRenderer.on('bs-download.ask-password', () => console.log('omg popup password'));
setTimeout(() => {
window.electron.ipcRenderer.sendMessage('bs-download.start', {app: '620980', depot: '620981', manifest: '6222769774084748916', stay: true, username: 'lekilleur618', folder: 'test2', cwd: 'C:\\test'} as InitDownloadInfoInterface);
window.electron.ipcRenderer.sendMessage('test-launch', null);
}, 5000);
window.electron.ipcRenderer.on('bs-download.ask-password', () => console.log('omg popup password'));
+2 -1
View File
@@ -19,7 +19,8 @@
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"allowJs": true,
"outDir": "release/app/dist"
"outDir": "release/app/dist",
"strictNullChecks": false
},
"exclude": ["test", "release/build", "release/app/dist", ".erb/dll"]
}