mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-05 00:38:56 +08:00
修改同步逻辑
This commit is contained in:
parent
2bd130315f
commit
5a69be8c7b
@ -48,6 +48,15 @@ module.exports = {
|
||||
allowBoolean: true,
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-misused-promises': [
|
||||
'error',
|
||||
{
|
||||
checksVoidReturn: {
|
||||
arguments: false,
|
||||
attributes: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/naming-convention': 'off',
|
||||
'@typescript-eslint/return-await': 'off',
|
||||
'@typescript-eslint/comma-dangle': 'off',
|
||||
|
374
package-lock.json
generated
374
package-lock.json
generated
@ -1,21 +1,21 @@
|
||||
{
|
||||
"name": "lx-music-mobile",
|
||||
"version": "1.1.0-beta.1",
|
||||
"version": "1.1.0-beta.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "lx-music-mobile",
|
||||
"version": "1.1.0-beta.1",
|
||||
"version": "1.1.0-beta.2",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@craftzdog/react-native-buffer": "^6.0.5",
|
||||
"@react-native-async-storage/async-storage": "^1.19.2",
|
||||
"@react-native-async-storage/async-storage": "^1.19.3",
|
||||
"@react-native-clipboard/clipboard": "^1.11.2",
|
||||
"@react-native-community/slider": "^4.4.3",
|
||||
"iconv-lite": "^0.6.3",
|
||||
"lrc-file-parser": "^2.4.1",
|
||||
"message2call": "^0.1.0",
|
||||
"message2call": "^0.1.2",
|
||||
"pako": "^2.1.0",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.72.4",
|
||||
@ -30,25 +30,25 @@
|
||||
"react-native-vector-icons": "^10.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.10",
|
||||
"@babel/eslint-parser": "^7.22.10",
|
||||
"@babel/core": "^7.22.11",
|
||||
"@babel/eslint-parser": "^7.22.11",
|
||||
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
||||
"@babel/preset-env": "^7.22.10",
|
||||
"@babel/runtime": "^7.22.10",
|
||||
"@babel/runtime": "^7.22.11",
|
||||
"@react-native/metro-config": "^0.72.11",
|
||||
"@tsconfig/react-native": "^3.0.2",
|
||||
"@types/react": "^18.2.20",
|
||||
"@types/react": "^18.2.21",
|
||||
"@types/react-native": "^0.70.14",
|
||||
"@types/react-native-background-timer": "^2.0.0",
|
||||
"@types/react-native-vector-icons": "^6.4.14",
|
||||
"babel-plugin-module-resolver": "^5.0.0",
|
||||
"changelog-parser": "^3.0.1",
|
||||
"eslint-config-standard": "^17.1.0",
|
||||
"eslint-config-standard-with-typescript": "^38.0.0",
|
||||
"eslint-config-standard-with-typescript": "^39.0.0",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"metro-react-native-babel-preset": "0.76.8",
|
||||
"typescript": "^5.1.6"
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 16",
|
||||
@ -157,24 +157,24 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/core": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz",
|
||||
"integrity": "sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.11.tgz",
|
||||
"integrity": "sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ==",
|
||||
"dependencies": {
|
||||
"@ampproject/remapping": "^2.2.0",
|
||||
"@babel/code-frame": "^7.22.10",
|
||||
"@babel/generator": "^7.22.10",
|
||||
"@babel/helper-compilation-targets": "^7.22.10",
|
||||
"@babel/helper-module-transforms": "^7.22.9",
|
||||
"@babel/helpers": "^7.22.10",
|
||||
"@babel/parser": "^7.22.10",
|
||||
"@babel/helpers": "^7.22.11",
|
||||
"@babel/parser": "^7.22.11",
|
||||
"@babel/template": "^7.22.5",
|
||||
"@babel/traverse": "^7.22.10",
|
||||
"@babel/types": "^7.22.10",
|
||||
"@babel/traverse": "^7.22.11",
|
||||
"@babel/types": "^7.22.11",
|
||||
"convert-source-map": "^1.7.0",
|
||||
"debug": "^4.1.0",
|
||||
"gensync": "^1.0.0-beta.2",
|
||||
"json5": "^2.2.2",
|
||||
"json5": "^2.2.3",
|
||||
"semver": "^6.3.1"
|
||||
},
|
||||
"engines": {
|
||||
@ -186,9 +186,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/eslint-parser": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.22.10.tgz",
|
||||
"integrity": "sha512-0J8DNPRXQRLeR9rPaUMM3fA+RbixjnVLe/MRMYCkp3hzgsSuxCHQ8NN8xQG1wIHKJ4a1DTROTvFJdW+B5/eOsg==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.22.11.tgz",
|
||||
"integrity": "sha512-YjOYZ3j7TjV8OhLW6NCtyg8G04uStATEUe5eiLuCZaXz2VSDQ3dsAtm2D+TuQyAqNMUK2WacGo0/uma9Pein1w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1",
|
||||
@ -531,13 +531,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helpers": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.10.tgz",
|
||||
"integrity": "sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.11.tgz",
|
||||
"integrity": "sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg==",
|
||||
"dependencies": {
|
||||
"@babel/template": "^7.22.5",
|
||||
"@babel/traverse": "^7.22.10",
|
||||
"@babel/types": "^7.22.10"
|
||||
"@babel/traverse": "^7.22.11",
|
||||
"@babel/types": "^7.22.11"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@ -613,9 +613,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz",
|
||||
"integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.11.tgz",
|
||||
"integrity": "sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==",
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
},
|
||||
@ -2163,9 +2163,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.10.tgz",
|
||||
"integrity": "sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.11.tgz",
|
||||
"integrity": "sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==",
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
},
|
||||
@ -2193,9 +2193,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/traverse": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz",
|
||||
"integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz",
|
||||
"integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==",
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.22.10",
|
||||
"@babel/generator": "^7.22.10",
|
||||
@ -2203,8 +2203,8 @@
|
||||
"@babel/helper-function-name": "^7.22.5",
|
||||
"@babel/helper-hoist-variables": "^7.22.5",
|
||||
"@babel/helper-split-export-declaration": "^7.22.6",
|
||||
"@babel/parser": "^7.22.10",
|
||||
"@babel/types": "^7.22.10",
|
||||
"@babel/parser": "^7.22.11",
|
||||
"@babel/types": "^7.22.11",
|
||||
"debug": "^4.1.0",
|
||||
"globals": "^11.1.0"
|
||||
},
|
||||
@ -2213,9 +2213,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/types": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
|
||||
"integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz",
|
||||
"integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==",
|
||||
"dependencies": {
|
||||
"@babel/helper-string-parser": "^7.22.5",
|
||||
"@babel/helper-validator-identifier": "^7.22.5",
|
||||
@ -2588,9 +2588,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@react-native-async-storage/async-storage": {
|
||||
"version": "1.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.19.2.tgz",
|
||||
"integrity": "sha512-7jTQKbT3BdhFHQMnfElsLeeyVqNICv72lPKbeNHnNgLP9eH3+Yk1GFMWWb7A8qRMYianSmwmx1cYofNe9H9hLQ==",
|
||||
"version": "1.19.3",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.19.3.tgz",
|
||||
"integrity": "sha512-CwGfoHCWdPOTPS+2fW6YRE1fFBpT9++ahLEroX5hkgwyoQ+TkmjOaUxixdEIoVua9Pz5EF2pGOIJzqOTMWfBlA==",
|
||||
"dependencies": {
|
||||
"merge-options": "^3.0.4"
|
||||
},
|
||||
@ -3536,9 +3536,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "18.2.20",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.20.tgz",
|
||||
"integrity": "sha512-WKNtmsLWJM/3D5mG4U84cysVY31ivmyw85dE84fOCk5Hx78wezB/XEjVPWl2JTZ5FkEeaTJf+VgUAUn3PE7Isw==",
|
||||
"version": "18.2.21",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.21.tgz",
|
||||
"integrity": "sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
@ -3607,17 +3607,17 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.0.tgz",
|
||||
"integrity": "sha512-62o2Hmc7Gs3p8SLfbXcipjWAa6qk2wZGChXG2JbBtYpwSRmti/9KHLqfbLs9uDigOexG+3PaQ9G2g3201FWLKg==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.1.tgz",
|
||||
"integrity": "sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.5.1",
|
||||
"@typescript-eslint/scope-manager": "6.4.0",
|
||||
"@typescript-eslint/type-utils": "6.4.0",
|
||||
"@typescript-eslint/utils": "6.4.0",
|
||||
"@typescript-eslint/visitor-keys": "6.4.0",
|
||||
"@typescript-eslint/scope-manager": "6.4.1",
|
||||
"@typescript-eslint/type-utils": "6.4.1",
|
||||
"@typescript-eslint/utils": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.2.4",
|
||||
@ -3679,15 +3679,15 @@
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.0.tgz",
|
||||
"integrity": "sha512-I1Ah1irl033uxjxO9Xql7+biL3YD7w9IU8zF+xlzD/YxY6a4b7DYA08PXUUCbm2sEljwJF6ERFy2kTGAGcNilg==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.1.tgz",
|
||||
"integrity": "sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "6.4.0",
|
||||
"@typescript-eslint/types": "6.4.0",
|
||||
"@typescript-eslint/typescript-estree": "6.4.0",
|
||||
"@typescript-eslint/visitor-keys": "6.4.0",
|
||||
"@typescript-eslint/scope-manager": "6.4.1",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/typescript-estree": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@ -3707,13 +3707,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.0.tgz",
|
||||
"integrity": "sha512-TUS7vaKkPWDVvl7GDNHFQMsMruD+zhkd3SdVW0d7b+7Zo+bd/hXJQ8nsiUZMi1jloWo6c9qt3B7Sqo+flC1nig==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.1.tgz",
|
||||
"integrity": "sha512-p/OavqOQfm4/Hdrr7kvacOSFjwQ2rrDVJRPxt/o0TOWdFnjJptnjnZ+sYDR7fi4OimvIuKp+2LCkc+rt9fIW+A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.4.0",
|
||||
"@typescript-eslint/visitor-keys": "6.4.0"
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
@ -3724,14 +3724,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.0.tgz",
|
||||
"integrity": "sha512-TvqrUFFyGY0cX3WgDHcdl2/mMCWCDv/0thTtx/ODMY1QhEiyFtv/OlLaNIiYLwRpAxAtOLOY9SUf1H3Q3dlwAg==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.1.tgz",
|
||||
"integrity": "sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "6.4.0",
|
||||
"@typescript-eslint/utils": "6.4.0",
|
||||
"@typescript-eslint/typescript-estree": "6.4.1",
|
||||
"@typescript-eslint/utils": "6.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"ts-api-utils": "^1.0.1"
|
||||
},
|
||||
@ -3752,9 +3752,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.0.tgz",
|
||||
"integrity": "sha512-+FV9kVFrS7w78YtzkIsNSoYsnOtrYVnKWSTVXoL1761CsCRv5wpDOINgsXpxD67YCLZtVQekDDyaxfjVWUJmmg==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.1.tgz",
|
||||
"integrity": "sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
@ -3765,13 +3765,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.0.tgz",
|
||||
"integrity": "sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.1.tgz",
|
||||
"integrity": "sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.4.0",
|
||||
"@typescript-eslint/visitor-keys": "6.4.0",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@ -3825,18 +3825,18 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.0.tgz",
|
||||
"integrity": "sha512-BvvwryBQpECPGo8PwF/y/q+yacg8Hn/2XS+DqL/oRsOPK+RPt29h5Ui5dqOKHDlbXrAeHUTnyG3wZA0KTDxRZw==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.1.tgz",
|
||||
"integrity": "sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@types/json-schema": "^7.0.12",
|
||||
"@types/semver": "^7.5.0",
|
||||
"@typescript-eslint/scope-manager": "6.4.0",
|
||||
"@typescript-eslint/types": "6.4.0",
|
||||
"@typescript-eslint/typescript-estree": "6.4.0",
|
||||
"@typescript-eslint/scope-manager": "6.4.1",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/typescript-estree": "6.4.1",
|
||||
"semver": "^7.5.4"
|
||||
},
|
||||
"engines": {
|
||||
@ -3887,12 +3887,12 @@
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.0.tgz",
|
||||
"integrity": "sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.1.tgz",
|
||||
"integrity": "sha512-y/TyRJsbZPkJIZQXrHfdnxVnxyKegnpEvnRGNam7s3TRR2ykGefEWOhaef00/UUN3IZxizS7BTO3svd3lCOJRQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.4.0",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"eslint-visitor-keys": "^3.4.1"
|
||||
},
|
||||
"engines": {
|
||||
@ -5424,16 +5424,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-config-standard-with-typescript": {
|
||||
"version": "38.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-38.0.0.tgz",
|
||||
"integrity": "sha512-G7JR6I8tmWEQjzbESo/9gVq4AQctbVO4J8PINQj8l2lgbJF/W9KCJ4uDLiKmLMjWszW/F5SsucoA/5VpHvfwOQ==",
|
||||
"version": "39.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-39.0.0.tgz",
|
||||
"integrity": "sha512-CiV2LS4NUeeRmDTDf1ocUMpMxitSyW0g+Y/N7ecElwGj188GahbcQgqfBNyVsIXQxHlZVBlOjkbg3oUI0R3KBg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/parser": "^6.1.0",
|
||||
"@typescript-eslint/parser": "^6.4.0",
|
||||
"eslint-config-standard": "17.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
||||
"eslint": "^8.0.1",
|
||||
"eslint-plugin-import": "^2.25.2",
|
||||
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
|
||||
@ -7865,9 +7865,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/message2call": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/message2call/-/message2call-0.1.0.tgz",
|
||||
"integrity": "sha512-10zubfIMTkxevtenynScyYN6GdWUgROrGqi9rU06tg+WY8SJIPwvKaDFuoKF8d2pbaFXD4hlOON2vf0ptCIN/A=="
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/message2call/-/message2call-0.1.2.tgz",
|
||||
"integrity": "sha512-jUYYyrVwhd5PWKtQXp1qTKKMxllm3lRZ/Vka1pzSZ0zT957YY6c4Vg1mp3YXsU7cukrZkjXXvQJrteJwBzrKsQ=="
|
||||
},
|
||||
"node_modules/metro": {
|
||||
"version": "0.76.7",
|
||||
@ -10792,9 +10792,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.1.6",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
|
||||
"integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
|
||||
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
@ -11314,31 +11314,31 @@
|
||||
"integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ=="
|
||||
},
|
||||
"@babel/core": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz",
|
||||
"integrity": "sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.11.tgz",
|
||||
"integrity": "sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ==",
|
||||
"requires": {
|
||||
"@ampproject/remapping": "^2.2.0",
|
||||
"@babel/code-frame": "^7.22.10",
|
||||
"@babel/generator": "^7.22.10",
|
||||
"@babel/helper-compilation-targets": "^7.22.10",
|
||||
"@babel/helper-module-transforms": "^7.22.9",
|
||||
"@babel/helpers": "^7.22.10",
|
||||
"@babel/parser": "^7.22.10",
|
||||
"@babel/helpers": "^7.22.11",
|
||||
"@babel/parser": "^7.22.11",
|
||||
"@babel/template": "^7.22.5",
|
||||
"@babel/traverse": "^7.22.10",
|
||||
"@babel/types": "^7.22.10",
|
||||
"@babel/traverse": "^7.22.11",
|
||||
"@babel/types": "^7.22.11",
|
||||
"convert-source-map": "^1.7.0",
|
||||
"debug": "^4.1.0",
|
||||
"gensync": "^1.0.0-beta.2",
|
||||
"json5": "^2.2.2",
|
||||
"json5": "^2.2.3",
|
||||
"semver": "^6.3.1"
|
||||
}
|
||||
},
|
||||
"@babel/eslint-parser": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.22.10.tgz",
|
||||
"integrity": "sha512-0J8DNPRXQRLeR9rPaUMM3fA+RbixjnVLe/MRMYCkp3hzgsSuxCHQ8NN8xQG1wIHKJ4a1DTROTvFJdW+B5/eOsg==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.22.11.tgz",
|
||||
"integrity": "sha512-YjOYZ3j7TjV8OhLW6NCtyg8G04uStATEUe5eiLuCZaXz2VSDQ3dsAtm2D+TuQyAqNMUK2WacGo0/uma9Pein1w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1",
|
||||
@ -11564,13 +11564,13 @@
|
||||
}
|
||||
},
|
||||
"@babel/helpers": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.10.tgz",
|
||||
"integrity": "sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.11.tgz",
|
||||
"integrity": "sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg==",
|
||||
"requires": {
|
||||
"@babel/template": "^7.22.5",
|
||||
"@babel/traverse": "^7.22.10",
|
||||
"@babel/types": "^7.22.10"
|
||||
"@babel/traverse": "^7.22.11",
|
||||
"@babel/types": "^7.22.11"
|
||||
}
|
||||
},
|
||||
"@babel/highlight": {
|
||||
@ -11630,9 +11630,9 @@
|
||||
}
|
||||
},
|
||||
"@babel/parser": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz",
|
||||
"integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ=="
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.11.tgz",
|
||||
"integrity": "sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g=="
|
||||
},
|
||||
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
|
||||
"version": "7.22.5",
|
||||
@ -12565,9 +12565,9 @@
|
||||
"integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA=="
|
||||
},
|
||||
"@babel/runtime": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.10.tgz",
|
||||
"integrity": "sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.11.tgz",
|
||||
"integrity": "sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==",
|
||||
"requires": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
},
|
||||
@ -12590,9 +12590,9 @@
|
||||
}
|
||||
},
|
||||
"@babel/traverse": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz",
|
||||
"integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz",
|
||||
"integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==",
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.22.10",
|
||||
"@babel/generator": "^7.22.10",
|
||||
@ -12600,16 +12600,16 @@
|
||||
"@babel/helper-function-name": "^7.22.5",
|
||||
"@babel/helper-hoist-variables": "^7.22.5",
|
||||
"@babel/helper-split-export-declaration": "^7.22.6",
|
||||
"@babel/parser": "^7.22.10",
|
||||
"@babel/types": "^7.22.10",
|
||||
"@babel/parser": "^7.22.11",
|
||||
"@babel/types": "^7.22.11",
|
||||
"debug": "^4.1.0",
|
||||
"globals": "^11.1.0"
|
||||
}
|
||||
},
|
||||
"@babel/types": {
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
|
||||
"integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz",
|
||||
"integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==",
|
||||
"requires": {
|
||||
"@babel/helper-string-parser": "^7.22.5",
|
||||
"@babel/helper-validator-identifier": "^7.22.5",
|
||||
@ -12874,9 +12874,9 @@
|
||||
}
|
||||
},
|
||||
"@react-native-async-storage/async-storage": {
|
||||
"version": "1.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.19.2.tgz",
|
||||
"integrity": "sha512-7jTQKbT3BdhFHQMnfElsLeeyVqNICv72lPKbeNHnNgLP9eH3+Yk1GFMWWb7A8qRMYianSmwmx1cYofNe9H9hLQ==",
|
||||
"version": "1.19.3",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.19.3.tgz",
|
||||
"integrity": "sha512-CwGfoHCWdPOTPS+2fW6YRE1fFBpT9++ahLEroX5hkgwyoQ+TkmjOaUxixdEIoVua9Pz5EF2pGOIJzqOTMWfBlA==",
|
||||
"requires": {
|
||||
"merge-options": "^3.0.4"
|
||||
}
|
||||
@ -13667,9 +13667,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/react": {
|
||||
"version": "18.2.20",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.20.tgz",
|
||||
"integrity": "sha512-WKNtmsLWJM/3D5mG4U84cysVY31ivmyw85dE84fOCk5Hx78wezB/XEjVPWl2JTZ5FkEeaTJf+VgUAUn3PE7Isw==",
|
||||
"version": "18.2.21",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.21.tgz",
|
||||
"integrity": "sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/prop-types": "*",
|
||||
@ -13734,17 +13734,17 @@
|
||||
"integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA=="
|
||||
},
|
||||
"@typescript-eslint/eslint-plugin": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.0.tgz",
|
||||
"integrity": "sha512-62o2Hmc7Gs3p8SLfbXcipjWAa6qk2wZGChXG2JbBtYpwSRmti/9KHLqfbLs9uDigOexG+3PaQ9G2g3201FWLKg==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.1.tgz",
|
||||
"integrity": "sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@eslint-community/regexpp": "^4.5.1",
|
||||
"@typescript-eslint/scope-manager": "6.4.0",
|
||||
"@typescript-eslint/type-utils": "6.4.0",
|
||||
"@typescript-eslint/utils": "6.4.0",
|
||||
"@typescript-eslint/visitor-keys": "6.4.0",
|
||||
"@typescript-eslint/scope-manager": "6.4.1",
|
||||
"@typescript-eslint/type-utils": "6.4.1",
|
||||
"@typescript-eslint/utils": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.2.4",
|
||||
@ -13783,55 +13783,55 @@
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/parser": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.0.tgz",
|
||||
"integrity": "sha512-I1Ah1irl033uxjxO9Xql7+biL3YD7w9IU8zF+xlzD/YxY6a4b7DYA08PXUUCbm2sEljwJF6ERFy2kTGAGcNilg==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.1.tgz",
|
||||
"integrity": "sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/scope-manager": "6.4.0",
|
||||
"@typescript-eslint/types": "6.4.0",
|
||||
"@typescript-eslint/typescript-estree": "6.4.0",
|
||||
"@typescript-eslint/visitor-keys": "6.4.0",
|
||||
"@typescript-eslint/scope-manager": "6.4.1",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/typescript-estree": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1",
|
||||
"debug": "^4.3.4"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/scope-manager": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.0.tgz",
|
||||
"integrity": "sha512-TUS7vaKkPWDVvl7GDNHFQMsMruD+zhkd3SdVW0d7b+7Zo+bd/hXJQ8nsiUZMi1jloWo6c9qt3B7Sqo+flC1nig==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.1.tgz",
|
||||
"integrity": "sha512-p/OavqOQfm4/Hdrr7kvacOSFjwQ2rrDVJRPxt/o0TOWdFnjJptnjnZ+sYDR7fi4OimvIuKp+2LCkc+rt9fIW+A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "6.4.0",
|
||||
"@typescript-eslint/visitor-keys": "6.4.0"
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/type-utils": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.0.tgz",
|
||||
"integrity": "sha512-TvqrUFFyGY0cX3WgDHcdl2/mMCWCDv/0thTtx/ODMY1QhEiyFtv/OlLaNIiYLwRpAxAtOLOY9SUf1H3Q3dlwAg==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.1.tgz",
|
||||
"integrity": "sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/typescript-estree": "6.4.0",
|
||||
"@typescript-eslint/utils": "6.4.0",
|
||||
"@typescript-eslint/typescript-estree": "6.4.1",
|
||||
"@typescript-eslint/utils": "6.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"ts-api-utils": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.0.tgz",
|
||||
"integrity": "sha512-+FV9kVFrS7w78YtzkIsNSoYsnOtrYVnKWSTVXoL1761CsCRv5wpDOINgsXpxD67YCLZtVQekDDyaxfjVWUJmmg==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.1.tgz",
|
||||
"integrity": "sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.0.tgz",
|
||||
"integrity": "sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.1.tgz",
|
||||
"integrity": "sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "6.4.0",
|
||||
"@typescript-eslint/visitor-keys": "6.4.0",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@ -13866,18 +13866,18 @@
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/utils": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.0.tgz",
|
||||
"integrity": "sha512-BvvwryBQpECPGo8PwF/y/q+yacg8Hn/2XS+DqL/oRsOPK+RPt29h5Ui5dqOKHDlbXrAeHUTnyG3wZA0KTDxRZw==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.1.tgz",
|
||||
"integrity": "sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@types/json-schema": "^7.0.12",
|
||||
"@types/semver": "^7.5.0",
|
||||
"@typescript-eslint/scope-manager": "6.4.0",
|
||||
"@typescript-eslint/types": "6.4.0",
|
||||
"@typescript-eslint/typescript-estree": "6.4.0",
|
||||
"@typescript-eslint/scope-manager": "6.4.1",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/typescript-estree": "6.4.1",
|
||||
"semver": "^7.5.4"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -13911,12 +13911,12 @@
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.0.tgz",
|
||||
"integrity": "sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.1.tgz",
|
||||
"integrity": "sha512-y/TyRJsbZPkJIZQXrHfdnxVnxyKegnpEvnRGNam7s3TRR2ykGefEWOhaef00/UUN3IZxizS7BTO3svd3lCOJRQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "6.4.0",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"eslint-visitor-keys": "^3.4.1"
|
||||
}
|
||||
},
|
||||
@ -15080,12 +15080,12 @@
|
||||
"requires": {}
|
||||
},
|
||||
"eslint-config-standard-with-typescript": {
|
||||
"version": "38.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-38.0.0.tgz",
|
||||
"integrity": "sha512-G7JR6I8tmWEQjzbESo/9gVq4AQctbVO4J8PINQj8l2lgbJF/W9KCJ4uDLiKmLMjWszW/F5SsucoA/5VpHvfwOQ==",
|
||||
"version": "39.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-39.0.0.tgz",
|
||||
"integrity": "sha512-CiV2LS4NUeeRmDTDf1ocUMpMxitSyW0g+Y/N7ecElwGj188GahbcQgqfBNyVsIXQxHlZVBlOjkbg3oUI0R3KBg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/parser": "^6.1.0",
|
||||
"@typescript-eslint/parser": "^6.4.0",
|
||||
"eslint-config-standard": "17.1.0"
|
||||
}
|
||||
},
|
||||
@ -16708,9 +16708,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"message2call": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/message2call/-/message2call-0.1.0.tgz",
|
||||
"integrity": "sha512-10zubfIMTkxevtenynScyYN6GdWUgROrGqi9rU06tg+WY8SJIPwvKaDFuoKF8d2pbaFXD4hlOON2vf0ptCIN/A=="
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/message2call/-/message2call-0.1.2.tgz",
|
||||
"integrity": "sha512-jUYYyrVwhd5PWKtQXp1qTKKMxllm3lRZ/Vka1pzSZ0zT957YY6c4Vg1mp3YXsU7cukrZkjXXvQJrteJwBzrKsQ=="
|
||||
},
|
||||
"metro": {
|
||||
"version": "0.76.7",
|
||||
@ -18864,9 +18864,9 @@
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "5.1.6",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
|
||||
"integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
|
||||
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
|
||||
"dev": true
|
||||
},
|
||||
"uglify-es": {
|
||||
|
18
package.json
18
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lx-music-mobile",
|
||||
"version": "1.1.0-beta.1",
|
||||
"version": "1.1.0-beta.2",
|
||||
"versionCode": 60,
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@ -44,12 +44,12 @@
|
||||
"homepage": "https://github.com/lyswhut/lx-music-mobile#readme",
|
||||
"dependencies": {
|
||||
"@craftzdog/react-native-buffer": "^6.0.5",
|
||||
"@react-native-async-storage/async-storage": "^1.19.2",
|
||||
"@react-native-async-storage/async-storage": "^1.19.3",
|
||||
"@react-native-clipboard/clipboard": "^1.11.2",
|
||||
"@react-native-community/slider": "^4.4.3",
|
||||
"iconv-lite": "^0.6.3",
|
||||
"lrc-file-parser": "^2.4.1",
|
||||
"message2call": "^0.1.0",
|
||||
"message2call": "^0.1.2",
|
||||
"pako": "^2.1.0",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.72.4",
|
||||
@ -64,24 +64,24 @@
|
||||
"react-native-vector-icons": "^10.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.10",
|
||||
"@babel/eslint-parser": "^7.22.10",
|
||||
"@babel/core": "^7.22.11",
|
||||
"@babel/eslint-parser": "^7.22.11",
|
||||
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
||||
"@babel/preset-env": "^7.22.10",
|
||||
"@babel/runtime": "^7.22.10",
|
||||
"@babel/runtime": "^7.22.11",
|
||||
"@react-native/metro-config": "^0.72.11",
|
||||
"@tsconfig/react-native": "^3.0.2",
|
||||
"@types/react": "^18.2.20",
|
||||
"@types/react": "^18.2.21",
|
||||
"@types/react-native": "^0.70.14",
|
||||
"@types/react-native-background-timer": "^2.0.0",
|
||||
"@types/react-native-vector-icons": "^6.4.14",
|
||||
"babel-plugin-module-resolver": "^5.0.0",
|
||||
"changelog-parser": "^3.0.1",
|
||||
"eslint-config-standard": "^17.1.0",
|
||||
"eslint-config-standard-with-typescript": "^38.0.0",
|
||||
"eslint-config-standard-with-typescript": "^39.0.0",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"metro-react-native-babel-preset": "0.76.8",
|
||||
"typescript": "^5.1.6"
|
||||
"typescript": "^5.2.2"
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,8 @@ export const storageDataPrefix = {
|
||||
fontSize: '@font_size',
|
||||
|
||||
theme: '@theme',
|
||||
|
||||
cheatTip: '@cheat_tip',
|
||||
} as const
|
||||
|
||||
// v0.x.x 版本的 data keys
|
||||
@ -135,24 +137,3 @@ export const DEFAULT_SETTING = {
|
||||
// query: {},
|
||||
},
|
||||
}
|
||||
|
||||
export const SYNC_CODE = {
|
||||
helloMsg: 'Hello~::^-^::~v4~',
|
||||
idPrefix: 'OjppZDo6',
|
||||
authMsg: 'lx-music auth::',
|
||||
authFailed: 'Auth failed',
|
||||
missingAuthCode: 'Missing auth code',
|
||||
getServiceIdFailed: 'Get service id failed',
|
||||
connectServiceFailed: 'Connect service failed',
|
||||
connecting: 'Connecting...',
|
||||
unknownServiceAddress: 'Unknown service address',
|
||||
msgBlockedIp: 'Blocked IP',
|
||||
msgConnect: 'lx-music connect',
|
||||
msgAuthFailed: 'Auth failed',
|
||||
} as const
|
||||
|
||||
export const SYNC_CLOSE_CODE = {
|
||||
normal: 1000,
|
||||
failed: 4100,
|
||||
} as const
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { connectServer } from '@/plugins/sync'
|
||||
import { updateSetting } from '@/core/common'
|
||||
// import { SYNC_CODE } from '@/config/constant'
|
||||
import { getSyncHost } from '@/plugins/sync/data'
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@ const closeSyncModeModal = () => {
|
||||
syncActions.setSyncModeComponentId('')
|
||||
}
|
||||
}
|
||||
export const selectSyncMode = async(serverName: string) => new Promise<LX.Sync.Mode>((resolve, reject) => {
|
||||
export const selectSyncMode = async(serverName: string) => new Promise<LX.Sync.List.SyncMode>((resolve, reject) => {
|
||||
removeSyncModeEvent()
|
||||
syncActions.setServerNmae(serverName)
|
||||
showSyncModeModal()
|
||||
@ -35,7 +35,7 @@ export const selectSyncMode = async(serverName: string) => new Promise<LX.Sync.M
|
||||
global.app_event.off('selectSyncMode', handleSelectMode)
|
||||
}
|
||||
|
||||
const handleSelectMode = (mode: LX.Sync.Mode) => {
|
||||
const handleSelectMode = (mode: LX.Sync.List.SyncMode) => {
|
||||
removeListeners()
|
||||
closeSyncModeModal()
|
||||
resolve(mode)
|
||||
|
@ -198,7 +198,7 @@ export class AppEvent extends Event {
|
||||
this.emit('songlistTagInfoChange', name, id)
|
||||
}
|
||||
|
||||
selectSyncMode(mode: LX.Sync.Mode) {
|
||||
selectSyncMode(mode: LX.Sync.List.SyncMode) {
|
||||
this.emit('selectSyncMode', mode)
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ const ModeModal = ({ componentId }: { componentId: string }) => {
|
||||
setSyncModeComponentId(componentId)
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [])
|
||||
const handleSelectMode = (mode: LX.Sync.Mode) => {
|
||||
const handleSelectMode = (mode: LX.Sync.List.SyncMode) => {
|
||||
if (mode.startsWith('overwrite') && isOverwrite) mode += '_full'
|
||||
global.app_event.selectSyncMode(mode)
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { request, generateRsaKey } from './utils'
|
||||
import { getSyncAuthKey, setSyncAuthKey } from '../data'
|
||||
import { SYNC_CODE } from '@/config/constant'
|
||||
import log from '../log'
|
||||
import { aesDecrypt, aesEncrypt, rsaDecrypt } from '../utils'
|
||||
import { getDeviceName } from '@/utils/nativeModules/utils'
|
||||
import { toMD5 } from '@/utils/tools'
|
||||
import { SYNC_CODE } from '../constants'
|
||||
|
||||
const hello = async(urlInfo: LX.Sync.UrlInfo) => request(`${urlInfo.httpProtocol}//${urlInfo.hostPath}/hello`)
|
||||
.then(({ text }) => text == SYNC_CODE.helloMsg)
|
||||
|
@ -1,15 +1,15 @@
|
||||
import { encryptMsg, decryptMsg } from './utils'
|
||||
import { modules, callObj } from './modules'
|
||||
import { callObj } from './sync'
|
||||
// import { action as commonAction } from '@/store/modules/common'
|
||||
// import { getStore } from '@/store'
|
||||
// import registerSyncListHandler from './syncList'
|
||||
import log from '../log'
|
||||
import { SYNC_CLOSE_CODE, SYNC_CODE } from '@/config/constant'
|
||||
import { aesEncrypt } from '../utils'
|
||||
import { setSyncStatus } from '@/core/sync'
|
||||
import { dateFormat } from '@/utils/common'
|
||||
import { createMsg2call } from 'message2call'
|
||||
import { toast } from '@/utils/tools'
|
||||
import { SYNC_CLOSE_CODE, SYNC_CODE } from '../constants'
|
||||
|
||||
let status: LX.Sync.Status = {
|
||||
status: false,
|
||||
@ -27,18 +27,6 @@ export const sendSyncMessage = (message: string) => {
|
||||
setSyncStatus(status)
|
||||
}
|
||||
|
||||
const handleConnection = (socket: LX.Sync.Socket) => {
|
||||
for (const { registerEvent } of Object.values(modules)) {
|
||||
registerEvent(socket)
|
||||
}
|
||||
}
|
||||
|
||||
const handleDisconnection = () => {
|
||||
for (const { unregisterEvent } of Object.values(modules)) {
|
||||
unregisterEvent()
|
||||
}
|
||||
}
|
||||
|
||||
const heartbeatTools = {
|
||||
failedNum: 0,
|
||||
maxTryNum: 100000,
|
||||
@ -134,15 +122,14 @@ export const connect = (urlInfo: LX.Sync.UrlInfo, keyInfo: LX.Sync.KeyInfo) => {
|
||||
heartbeatTools.connect(client)
|
||||
|
||||
let closeEvents: Array<(err: Error) => (void | Promise<void>)> = []
|
||||
let disconnected = true
|
||||
|
||||
const message2read = createMsg2call({
|
||||
const message2read = createMsg2call<LX.Sync.ServerSyncActions>({
|
||||
funcsObj: {
|
||||
...callObj,
|
||||
list_sync_finished() {
|
||||
log.info('sync list success')
|
||||
toast('Sync successfully')
|
||||
finished() {
|
||||
toast('Sync connected.')
|
||||
client!.isReady = true
|
||||
handleConnection(client as LX.Sync.Socket)
|
||||
sendSyncStatus({
|
||||
status: true,
|
||||
message: '',
|
||||
@ -152,6 +139,7 @@ export const connect = (urlInfo: LX.Sync.UrlInfo, keyInfo: LX.Sync.KeyInfo) => {
|
||||
},
|
||||
timeout: 120 * 1000,
|
||||
sendMessage(data) {
|
||||
if (disconnected) throw new Error('disconnected')
|
||||
void encryptMsg(keyInfo, JSON.stringify(data)).then((data) => {
|
||||
client?.send(data)
|
||||
}).catch((err) => {
|
||||
@ -174,13 +162,14 @@ export const connect = (urlInfo: LX.Sync.UrlInfo, keyInfo: LX.Sync.KeyInfo) => {
|
||||
},
|
||||
})
|
||||
|
||||
client.remoteSyncList = message2read.createSyncRemote('list')
|
||||
client.remote = message2read.remote
|
||||
client.remoteQueueList = message2read.createQueueRemote('list')
|
||||
|
||||
client.addEventListener('message', ({ data }) => {
|
||||
if (data == 'ping') return
|
||||
if (typeof data === 'string') {
|
||||
void decryptMsg(keyInfo, data).then((data) => {
|
||||
let syncData: LX.Sync.ServerActions
|
||||
let syncData: LX.Sync.ServerSyncActions
|
||||
try {
|
||||
syncData = JSON.parse(data)
|
||||
} catch (err) {
|
||||
@ -208,6 +197,10 @@ export const connect = (urlInfo: LX.Sync.UrlInfo, keyInfo: LX.Sync.KeyInfo) => {
|
||||
// const store = getStore()
|
||||
// global.lx.syncKeyInfo = keyInfo
|
||||
client!.isReady = false
|
||||
client!.moduleReadys = {
|
||||
list: false,
|
||||
}
|
||||
disconnected = false
|
||||
sendSyncStatus({
|
||||
status: false,
|
||||
message: initMessage,
|
||||
@ -221,7 +214,7 @@ export const connect = (urlInfo: LX.Sync.UrlInfo, keyInfo: LX.Sync.KeyInfo) => {
|
||||
log.error(err?.message)
|
||||
}
|
||||
closeEvents = []
|
||||
handleDisconnection()
|
||||
disconnected = true
|
||||
message2read.onDestroy()
|
||||
switch (code) {
|
||||
case SYNC_CLOSE_CODE.normal:
|
||||
|
@ -1,9 +1,9 @@
|
||||
import handleAuth from './auth'
|
||||
import { connect as socketConnect, disconnect as socketDisconnect, sendSyncStatus, sendSyncMessage } from './client'
|
||||
// import { getSyncHost } from '@/utils/data'
|
||||
import { SYNC_CODE } from '@/config/constant'
|
||||
import log from '../log'
|
||||
import { parseUrl } from './utils'
|
||||
import { SYNC_CODE } from '../constants'
|
||||
|
||||
let connectId = 0
|
||||
|
||||
|
@ -8,3 +8,7 @@ export const callObj = Object.assign({}, list.handler)
|
||||
export const modules = {
|
||||
list,
|
||||
}
|
||||
|
||||
export const featureVersion = {
|
||||
list: 1,
|
||||
} as const
|
||||
|
@ -1,8 +1,10 @@
|
||||
// 这个文件导出的方法将暴露给服务端调用,第一个参数固定为当前 socket 对象
|
||||
import { handleRemoteListAction, getLocalListData, setLocalListData } from '../../../utils'
|
||||
import log from '../../../log'
|
||||
// import { SYNC_CLOSE_CODE } from '@/config/constant'
|
||||
import { removeSyncModeEvent, selectSyncMode } from '@/core/sync'
|
||||
import { toMD5 } from '@/utils/tools'
|
||||
import { registerEvent, unregisterEvent } from './localEvent'
|
||||
|
||||
const logInfo = (eventName: string, success = false) => {
|
||||
log.info(`[${eventName}]${eventName.replace('list:sync:list_sync_', '').replace(/_/g, ' ')}${success ? ' success' : ''}`)
|
||||
@ -11,8 +13,8 @@ const logInfo = (eventName: string, success = false) => {
|
||||
// log.error(`[${eventName}]${eventName.replace('list:sync:list_sync_', '').replace(/_/g, ' ')} error: ${err.message}`)
|
||||
// }
|
||||
|
||||
export const onListSyncAction = async(socket: LX.Sync.Socket, action: LX.Sync.ActionList) => {
|
||||
if (!socket.isReady) return
|
||||
export const onListSyncAction = async(socket: LX.Sync.Socket, action: LX.Sync.List.ActionList) => {
|
||||
if (!socket.moduleReadys?.list) return
|
||||
await handleRemoteListAction(action)
|
||||
}
|
||||
|
||||
@ -34,11 +36,20 @@ export const list_sync_get_list_data = async(socket: LX.Sync.Socket) => {
|
||||
return getLocalListData()
|
||||
}
|
||||
|
||||
export const list_sync_set_list_data = async(socket: LX.Sync.Socket, data: LX.Sync.ListData) => {
|
||||
export const list_sync_set_list_data = async(socket: LX.Sync.Socket, data: LX.Sync.List.ListData) => {
|
||||
logInfo('list:sync:list_sync_set_list_data')
|
||||
await setLocalListData(data)
|
||||
}
|
||||
|
||||
export const list_sync_finished = async(socket: LX.Sync.Socket) => {
|
||||
logInfo('list:sync:finished')
|
||||
socket.moduleReadys.list = true
|
||||
registerEvent(socket)
|
||||
socket.onClose(() => {
|
||||
unregisterEvent()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// export default async(socket: LX.Sync.Socket) => new Promise<void>((resolve, reject) => {
|
||||
// let listenEvents: Array<() => void> = []
|
||||
@ -64,7 +75,7 @@ export const list_sync_set_list_data = async(socket: LX.Sync.Socket, data: LX.Sy
|
||||
// }))
|
||||
// listenEvents.push(socket.onRemoteEvent('list:sync:list_sync_get_sync_mode', async() => {
|
||||
// logInfo('list:sync:list_sync_get_sync_mode')
|
||||
// let mode: LX.Sync.Mode
|
||||
// let mode: LX.Sync.List.SyncMode
|
||||
// try {
|
||||
// mode = await selectSyncMode(socket.data.keyInfo.serverName)
|
||||
// } catch (err: unknown) {
|
||||
|
@ -8,9 +8,10 @@ export const registerEvent = (socket: LX.Sync.Socket) => {
|
||||
// unregisterLocalListAction?.()
|
||||
// unregisterLocalListAction = null
|
||||
// })
|
||||
unregisterEvent()
|
||||
unregisterLocalListAction = registerListActionEvent((action) => {
|
||||
if (!socket?.isReady) return
|
||||
void socket.remoteSyncList.onListSyncAction(action)
|
||||
if (!socket.moduleReadys?.list) return
|
||||
void socket.remoteQueueList.onListSyncAction(action)
|
||||
})
|
||||
}
|
||||
|
||||
|
21
src/plugins/sync/client/sync/handler.ts
Normal file
21
src/plugins/sync/client/sync/handler.ts
Normal file
@ -0,0 +1,21 @@
|
||||
// 这个文件导出的方法将暴露给服务端调用,第一个参数固定为当前 socket 对象
|
||||
// import { getUserSpace } from '@/user'
|
||||
// import { modules } from '../modules'
|
||||
|
||||
import { featureVersion } from '../modules'
|
||||
|
||||
|
||||
export const getEnabledFeatures = async(socket: LX.Sync.Socket, serverType: LX.Sync.ServerType, supportedFeatures: LX.Sync.SupportedFeatures): Promise<LX.Sync.EnabledFeatures> => {
|
||||
// const userSpace = getUserSpace(socket.userInfo.name)
|
||||
switch (serverType) {
|
||||
case 'server':
|
||||
return {
|
||||
list: featureVersion.list == supportedFeatures.list,
|
||||
}
|
||||
case 'desktop-app':
|
||||
default:
|
||||
return {
|
||||
list: featureVersion.list == supportedFeatures.list,
|
||||
}
|
||||
}
|
||||
}
|
8
src/plugins/sync/client/sync/index.ts
Normal file
8
src/plugins/sync/client/sync/index.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import * as handler from './handler'
|
||||
import { callObj as _callObj } from '../modules'
|
||||
export { modules } from '../modules'
|
||||
|
||||
export const callObj = {
|
||||
...handler,
|
||||
..._callObj,
|
||||
}
|
65
src/plugins/sync/constants.ts
Normal file
65
src/plugins/sync/constants.ts
Normal file
@ -0,0 +1,65 @@
|
||||
export const ENV_PARAMS = [
|
||||
'PORT',
|
||||
'BIND_IP',
|
||||
'CONFIG_PATH',
|
||||
'LOG_PATH',
|
||||
'DATA_PATH',
|
||||
'PROXY_HEADER',
|
||||
'MAX_SNAPSHOT_NUM',
|
||||
'LIST_ADD_MUSIC_LOCATION_TYPE',
|
||||
'LX_USER_',
|
||||
] as const
|
||||
|
||||
|
||||
export const LIST_IDS = {
|
||||
DEFAULT: 'default',
|
||||
LOVE: 'love',
|
||||
TEMP: 'temp',
|
||||
DOWNLOAD: 'download',
|
||||
PLAY_LATER: null,
|
||||
} as const
|
||||
|
||||
export const SYNC_CODE = {
|
||||
helloMsg: 'Hello~::^-^::~v4~',
|
||||
idPrefix: 'OjppZDo6',
|
||||
authMsg: 'lx-music auth::',
|
||||
msgAuthFailed: 'Auth failed',
|
||||
msgBlockedIp: 'Blocked IP',
|
||||
msgConnect: 'lx-music connect',
|
||||
|
||||
|
||||
authFailed: 'Auth failed',
|
||||
missingAuthCode: 'Missing auth code',
|
||||
getServiceIdFailed: 'Get service id failed',
|
||||
connectServiceFailed: 'Connect service failed',
|
||||
connecting: 'Connecting...',
|
||||
unknownServiceAddress: 'Unknown service address',
|
||||
} as const
|
||||
|
||||
export const SYNC_CLOSE_CODE = {
|
||||
normal: 1000,
|
||||
failed: 4100,
|
||||
} as const
|
||||
|
||||
export const TRANS_MODE: Readonly<Record<LX.Sync.List.SyncMode, LX.Sync.List.SyncMode>> = {
|
||||
merge_local_remote: 'merge_remote_local',
|
||||
merge_remote_local: 'merge_local_remote',
|
||||
overwrite_local_remote: 'overwrite_remote_local',
|
||||
overwrite_remote_local: 'overwrite_local_remote',
|
||||
overwrite_local_remote_full: 'overwrite_remote_local_full',
|
||||
overwrite_remote_local_full: 'overwrite_local_remote_full',
|
||||
cancel: 'cancel',
|
||||
} as const
|
||||
|
||||
export const File = {
|
||||
serverInfoJSON: 'serverInfo.json',
|
||||
userDir: 'users',
|
||||
userDevicesJSON: 'devices.json',
|
||||
listDir: 'list',
|
||||
listSnapshotDir: 'snapshot',
|
||||
listSnapshotInfoJSON: 'snapshotInfo.json',
|
||||
} as const
|
||||
|
||||
export const FeaturesList = [
|
||||
'list',
|
||||
] as const
|
@ -27,7 +27,7 @@ export const rsaDecrypt = (buffer: Buffer, key: string): string => {
|
||||
return rsaDecryptSync(buffer.toString('base64'), key, RSA_PADDING.OAEPWithSHA1AndMGF1Padding)
|
||||
}
|
||||
|
||||
export const getLocalListData = async(): Promise<LX.Sync.ListData> => {
|
||||
export const getLocalListData = async(): Promise<LX.Sync.List.ListData> => {
|
||||
return Promise.all([
|
||||
getListMusics(LIST_IDS.DEFAULT),
|
||||
getListMusics(LIST_IDS.LOVE),
|
||||
@ -42,12 +42,12 @@ export const getLocalListData = async(): Promise<LX.Sync.ListData> => {
|
||||
})
|
||||
}
|
||||
|
||||
export const setLocalListData = async(listData: LX.Sync.ListData) => {
|
||||
export const setLocalListData = async(listData: LX.Sync.List.ListData) => {
|
||||
await global.list_event.list_data_overwrite(listData, true)
|
||||
}
|
||||
|
||||
|
||||
export const registerListActionEvent = (sendListAction: (action: LX.Sync.ActionList) => (void | Promise<void>)) => {
|
||||
export const registerListActionEvent = (sendListAction: (action: LX.Sync.List.ActionList) => (void | Promise<void>)) => {
|
||||
const list_data_overwrite = async(listData: MakeOptional<LX.List.ListDataFull, 'tempList'>, isRemote: boolean = false) => {
|
||||
if (isRemote) return
|
||||
await sendListAction({ action: 'list_data_overwrite', data: listData })
|
||||
@ -124,7 +124,7 @@ export const registerListActionEvent = (sendListAction: (action: LX.Sync.ActionL
|
||||
}
|
||||
}
|
||||
|
||||
export const handleRemoteListAction = async({ action, data }: LX.Sync.ActionList) => {
|
||||
export const handleRemoteListAction = async({ action, data }: LX.Sync.List.ActionList) => {
|
||||
// console.log('handleRemoteListAction', action)
|
||||
|
||||
switch (action) {
|
||||
|
@ -16,7 +16,7 @@ import { useSettingValue } from '@/store/setting/hook'
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
import { useStatus } from '@/store/sync/hook'
|
||||
import Text from '@/components/common/Text'
|
||||
import { SYNC_CODE } from '@/config/constant'
|
||||
import { SYNC_CODE } from '@/plugins/sync/constants'
|
||||
|
||||
const addressRxp = /^https?:\/\/\S+/i
|
||||
|
||||
|
43
src/types/list_sync.d.ts
vendored
Normal file
43
src/types/list_sync.d.ts
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
declare namespace LX {
|
||||
|
||||
namespace Sync {
|
||||
namespace List {
|
||||
interface ListInfo {
|
||||
lastSyncDate?: number
|
||||
snapshotKey: string
|
||||
}
|
||||
|
||||
interface SyncActionBase <A> {
|
||||
action: A
|
||||
}
|
||||
interface SyncActionData<A, D> extends SyncActionBase<A> {
|
||||
data: D
|
||||
}
|
||||
type SyncAction<A, D = undefined> = D extends undefined ? SyncActionBase<A> : SyncActionData<A, D>
|
||||
type ActionList = SyncAction<'list_data_overwrite', LX.List.ListActionDataOverwrite>
|
||||
| SyncAction<'list_create', LX.List.ListActionAdd>
|
||||
| SyncAction<'list_remove', LX.List.ListActionRemove>
|
||||
| SyncAction<'list_update', LX.List.ListActionUpdate>
|
||||
| SyncAction<'list_update_position', LX.List.ListActionUpdatePosition>
|
||||
| SyncAction<'list_music_add', LX.List.ListActionMusicAdd>
|
||||
| SyncAction<'list_music_move', LX.List.ListActionMusicMove>
|
||||
| SyncAction<'list_music_remove', LX.List.ListActionMusicRemove>
|
||||
| SyncAction<'list_music_update', LX.List.ListActionMusicUpdate>
|
||||
| SyncAction<'list_music_update_position', LX.List.ListActionMusicUpdatePosition>
|
||||
| SyncAction<'list_music_overwrite', LX.List.ListActionMusicOverwrite>
|
||||
| SyncAction<'list_music_clear', LX.List.ListActionMusicClear>
|
||||
|
||||
type ListData = Omit<LX.List.ListDataFull, 'tempList'>
|
||||
type SyncMode = 'merge_local_remote'
|
||||
| 'merge_remote_local'
|
||||
| 'overwrite_local_remote'
|
||||
| 'overwrite_remote_local'
|
||||
| 'overwrite_local_remote_full'
|
||||
| 'overwrite_remote_local_full'
|
||||
// | 'none'
|
||||
| 'cancel'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
23
src/types/sync.d.ts
vendored
23
src/types/sync.d.ts
vendored
@ -12,27 +12,20 @@ declare global {
|
||||
serverName: string
|
||||
}
|
||||
|
||||
type ListData = Omit<LX.List.ListDataFull, 'tempList'>
|
||||
|
||||
type Mode = 'merge_local_remote'
|
||||
| 'merge_remote_local'
|
||||
| 'overwrite_local_remote'
|
||||
| 'overwrite_remote_local'
|
||||
| 'overwrite_local_remote_full'
|
||||
| 'overwrite_remote_local_full'
|
||||
// | 'none'
|
||||
| 'cancel'
|
||||
|
||||
interface Socket extends WebSocket {
|
||||
isReady: boolean
|
||||
data: {
|
||||
keyInfo: KeyInfo
|
||||
urlInfo: UrlInfo
|
||||
}
|
||||
moduleReadys: {
|
||||
list: boolean
|
||||
}
|
||||
|
||||
onClose: (handler: (err: Error) => (void | Promise<void>)) => () => void
|
||||
|
||||
remoteSyncList: LX.Sync.ServerActions
|
||||
remote: LX.Sync.ServerSyncActions
|
||||
remoteQueueList: LX.Sync.ServerSyncListActions
|
||||
}
|
||||
|
||||
|
||||
@ -42,6 +35,12 @@ declare global {
|
||||
hostPath: string
|
||||
href: string
|
||||
}
|
||||
|
||||
type ServerType = 'desktop-app' | 'server'
|
||||
interface EnabledFeatures {
|
||||
list: boolean
|
||||
}
|
||||
type SupportedFeatures = Partial<{ [k in keyof EnabledFeatures]: number }>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
42
src/types/sync_common.d.ts
vendored
42
src/types/sync_common.d.ts
vendored
@ -1,30 +1,24 @@
|
||||
declare namespace LX {
|
||||
namespace Sync {
|
||||
type ActionList = SyncAction<'list_data_overwrite', LX.List.ListActionDataOverwrite>
|
||||
| SyncAction<'list_create', LX.List.ListActionAdd>
|
||||
| SyncAction<'list_remove', LX.List.ListActionRemove>
|
||||
| SyncAction<'list_update', LX.List.ListActionUpdate>
|
||||
| SyncAction<'list_update_position', LX.List.ListActionUpdatePosition>
|
||||
| SyncAction<'list_music_add', LX.List.ListActionMusicAdd>
|
||||
| SyncAction<'list_music_move', LX.List.ListActionMusicMove>
|
||||
| SyncAction<'list_music_remove', LX.List.ListActionMusicRemove>
|
||||
| SyncAction<'list_music_update', LX.List.ListActionMusicUpdate>
|
||||
| SyncAction<'list_music_update_position', LX.List.ListActionMusicUpdatePosition>
|
||||
| SyncAction<'list_music_overwrite', LX.List.ListActionMusicOverwrite>
|
||||
| SyncAction<'list_music_clear', LX.List.ListActionMusicClear>
|
||||
type ServerSyncActions = WarpPromiseRecord<{
|
||||
onFeatureChanged: (feature: EnabledFeatures) => void
|
||||
}>
|
||||
type ServerSyncListActions = WarpPromiseRecord<{
|
||||
onListSyncAction: (action: LX.Sync.List.ActionList) => void
|
||||
}>
|
||||
|
||||
type ServerActions = WarpPromiseRecord<{
|
||||
onListSyncAction: (action: LX.Sync.ActionList) => void
|
||||
}>
|
||||
|
||||
type ClientActions = WarpPromiseRecord<{
|
||||
onListSyncAction: (action: LX.Sync.ActionList) => void
|
||||
list_sync_get_md5: () => string
|
||||
list_sync_get_sync_mode: () => Mode
|
||||
list_sync_get_list_data: () => ListData
|
||||
list_sync_set_list_data: (data: ListData) => void
|
||||
list_sync_finished: () => void
|
||||
}>
|
||||
type ClientSyncActions = WarpPromiseRecord<{
|
||||
getEnabledFeatures: (serverType: ServerType, supportedFeatures: SupportedFeatures) => EnabledFeatures
|
||||
finished: () => void
|
||||
}>
|
||||
type ClientSyncListActions = WarpPromiseRecord<{
|
||||
onListSyncAction: (action: LX.Sync.List.ActionList) => void
|
||||
list_sync_get_md5: () => string
|
||||
list_sync_get_sync_mode: () => LX.Sync.List.SyncMode
|
||||
list_sync_get_list_data: () => LX.Sync.List.ListData
|
||||
list_sync_set_list_data: (data: LX.Sync.List.ListData) => void
|
||||
list_sync_finished: () => void
|
||||
}>
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user