mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-18 21:50:39 +08:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
effd7e129d | ||
![]() |
9a00cf7483 | ||
![]() |
d854082495 | ||
![]() |
3073bd99db | ||
![]() |
4436654769 | ||
![]() |
3ccc3653ac | ||
![]() |
e150db486a | ||
![]() |
66c2504718 | ||
![]() |
bbda7217ac | ||
![]() |
0b52cf35d2 | ||
![]() |
46974ddb75 | ||
![]() |
0df6fa822b | ||
![]() |
fdb1fc304a | ||
![]() |
39ea11a435 | ||
![]() |
618a582e42 |
@@ -5,7 +5,7 @@ buildscript {
|
|||||||
compileSdkVersion = 35
|
compileSdkVersion = 35
|
||||||
targetSdkVersion = 34
|
targetSdkVersion = 34
|
||||||
ndkVersion = "26.1.10909125"
|
ndkVersion = "26.1.10909125"
|
||||||
kotlinVersion = "1.9.24"
|
kotlinVersion = "1.9.25"
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
@@ -3,15 +3,16 @@
|
|||||||
"workspaces": {
|
"workspaces": {
|
||||||
"": {
|
"": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"form-data": "^4.0.1",
|
"form-data": "^4.0.2",
|
||||||
"patch-package": "^8.0.0",
|
"patch-package": "^8.0.0",
|
||||||
"postinstall-postinstall": "^2.1.0",
|
"postinstall-postinstall": "^2.1.0",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-native": "0.76.6",
|
"react-native": "0.76.7",
|
||||||
"react-native-camera-kit": "^14.1.0",
|
"react-native-camera-kit": "^14.2.0",
|
||||||
"react-native-paper": "^5.13.1",
|
"react-native-paper": "^5.13.1",
|
||||||
"react-native-safe-area-context": "^5.1.0",
|
"react-native-safe-area-context": "^5.2.0",
|
||||||
"react-native-update": "^10.22.0",
|
"react-native-svg": "^15.11.1",
|
||||||
|
"react-native-update": "^10.24.2",
|
||||||
"react-native-vector-icons": "^10.2.0",
|
"react-native-vector-icons": "^10.2.0",
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -21,10 +22,10 @@
|
|||||||
"@react-native-community/cli": "15.0.1",
|
"@react-native-community/cli": "15.0.1",
|
||||||
"@react-native-community/cli-platform-android": "15.0.1",
|
"@react-native-community/cli-platform-android": "15.0.1",
|
||||||
"@react-native-community/cli-platform-ios": "15.0.1",
|
"@react-native-community/cli-platform-ios": "15.0.1",
|
||||||
"@react-native/babel-preset": "0.76.6",
|
"@react-native/babel-preset": "0.76.7",
|
||||||
"@react-native/eslint-config": "0.76.6",
|
"@react-native/eslint-config": "0.76.7",
|
||||||
"@react-native/metro-config": "0.76.6",
|
"@react-native/metro-config": "0.76.7",
|
||||||
"@react-native/typescript-config": "0.76.6",
|
"@react-native/typescript-config": "0.76.7",
|
||||||
"@types/react": "^18.2.6",
|
"@types/react": "^18.2.6",
|
||||||
"@types/react-test-renderer": "^18.0.0",
|
"@types/react-test-renderer": "^18.0.0",
|
||||||
"babel-jest": "^29.6.3",
|
"babel-jest": "^29.6.3",
|
||||||
@@ -395,37 +396,37 @@
|
|||||||
|
|
||||||
"@react-native-community/cli-types": ["@react-native-community/cli-types@15.0.1", "", { "dependencies": { "joi": "^17.2.1" } }, "sha512-sWiJ62kkGu2mgYni2dsPxOMBzpwTjNsDH1ubY4mqcNEI9Zmzs0vRwwDUEhYqwNGys9+KpBKoZRrT2PAlhO84xA=="],
|
"@react-native-community/cli-types": ["@react-native-community/cli-types@15.0.1", "", { "dependencies": { "joi": "^17.2.1" } }, "sha512-sWiJ62kkGu2mgYni2dsPxOMBzpwTjNsDH1ubY4mqcNEI9Zmzs0vRwwDUEhYqwNGys9+KpBKoZRrT2PAlhO84xA=="],
|
||||||
|
|
||||||
"@react-native/assets-registry": ["@react-native/assets-registry@0.76.6", "", {}, "sha512-YI8HoReYiIwdFQs+k9Q9qpFTnsyYikZxgs/UVtVbhKixXDQF6F9LLvj2naOx4cfV+RGybNKxwmDl1vUok/dRFQ=="],
|
"@react-native/assets-registry": ["@react-native/assets-registry@0.76.7", "", {}, "sha512-o79whsqL5fbPTUQO9w1FptRd4cw1TaeOrXtQSLQeDrMVAenw/wmsjyPK10VKtvqxa1KNMtWEyfgxcM8CVZVFmg=="],
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen": ["@react-native/babel-plugin-codegen@0.76.6", "", { "dependencies": { "@react-native/codegen": "0.76.6" } }, "sha512-yFC9I/aDBOBz3ZMlqKn2NY/mDUtCksUNZ7AQmBiTAeVTUP0ujEjE0hTOx5Qd+kok7A7hwZEX87HdSgjiJZfr5g=="],
|
"@react-native/babel-plugin-codegen": ["@react-native/babel-plugin-codegen@0.76.7", "", { "dependencies": { "@react-native/codegen": "0.76.7" } }, "sha512-+8H4DXJREM4l/pwLF/wSVMRzVhzhGDix5jLezNrMD9J1U1AMfV2aSkWA1XuqR7pjPs/Vqf6TaPL7vJMZ4LU05Q=="],
|
||||||
|
|
||||||
"@react-native/babel-preset": ["@react-native/babel-preset@0.76.6", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/plugin-proposal-export-default-from": "^7.24.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-default-from": "^7.24.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-transform-arrow-functions": "^7.24.7", "@babel/plugin-transform-async-generator-functions": "^7.25.4", "@babel/plugin-transform-async-to-generator": "^7.24.7", "@babel/plugin-transform-block-scoping": "^7.25.0", "@babel/plugin-transform-class-properties": "^7.25.4", "@babel/plugin-transform-classes": "^7.25.4", "@babel/plugin-transform-computed-properties": "^7.24.7", "@babel/plugin-transform-destructuring": "^7.24.8", "@babel/plugin-transform-flow-strip-types": "^7.25.2", "@babel/plugin-transform-for-of": "^7.24.7", "@babel/plugin-transform-function-name": "^7.25.1", "@babel/plugin-transform-literals": "^7.25.2", "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", "@babel/plugin-transform-modules-commonjs": "^7.24.8", "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", "@babel/plugin-transform-numeric-separator": "^7.24.7", "@babel/plugin-transform-object-rest-spread": "^7.24.7", "@babel/plugin-transform-optional-catch-binding": "^7.24.7", "@babel/plugin-transform-optional-chaining": "^7.24.8", "@babel/plugin-transform-parameters": "^7.24.7", "@babel/plugin-transform-private-methods": "^7.24.7", "@babel/plugin-transform-private-property-in-object": "^7.24.7", "@babel/plugin-transform-react-display-name": "^7.24.7", "@babel/plugin-transform-react-jsx": "^7.25.2", "@babel/plugin-transform-react-jsx-self": "^7.24.7", "@babel/plugin-transform-react-jsx-source": "^7.24.7", "@babel/plugin-transform-regenerator": "^7.24.7", "@babel/plugin-transform-runtime": "^7.24.7", "@babel/plugin-transform-shorthand-properties": "^7.24.7", "@babel/plugin-transform-spread": "^7.24.7", "@babel/plugin-transform-sticky-regex": "^7.24.7", "@babel/plugin-transform-typescript": "^7.25.2", "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", "@react-native/babel-plugin-codegen": "0.76.6", "babel-plugin-syntax-hermes-parser": "^0.25.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" } }, "sha512-ojlVWY6S/VE/nb9hIRetPMTsW9ZmGb2R3dnToEXAtQQDz41eHMHXbkw/k2h0THp6qhas25ruNvn3N5n2o+lBzg=="],
|
"@react-native/babel-preset": ["@react-native/babel-preset@0.76.7", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/plugin-proposal-export-default-from": "^7.24.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-default-from": "^7.24.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-transform-arrow-functions": "^7.24.7", "@babel/plugin-transform-async-generator-functions": "^7.25.4", "@babel/plugin-transform-async-to-generator": "^7.24.7", "@babel/plugin-transform-block-scoping": "^7.25.0", "@babel/plugin-transform-class-properties": "^7.25.4", "@babel/plugin-transform-classes": "^7.25.4", "@babel/plugin-transform-computed-properties": "^7.24.7", "@babel/plugin-transform-destructuring": "^7.24.8", "@babel/plugin-transform-flow-strip-types": "^7.25.2", "@babel/plugin-transform-for-of": "^7.24.7", "@babel/plugin-transform-function-name": "^7.25.1", "@babel/plugin-transform-literals": "^7.25.2", "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", "@babel/plugin-transform-modules-commonjs": "^7.24.8", "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", "@babel/plugin-transform-numeric-separator": "^7.24.7", "@babel/plugin-transform-object-rest-spread": "^7.24.7", "@babel/plugin-transform-optional-catch-binding": "^7.24.7", "@babel/plugin-transform-optional-chaining": "^7.24.8", "@babel/plugin-transform-parameters": "^7.24.7", "@babel/plugin-transform-private-methods": "^7.24.7", "@babel/plugin-transform-private-property-in-object": "^7.24.7", "@babel/plugin-transform-react-display-name": "^7.24.7", "@babel/plugin-transform-react-jsx": "^7.25.2", "@babel/plugin-transform-react-jsx-self": "^7.24.7", "@babel/plugin-transform-react-jsx-source": "^7.24.7", "@babel/plugin-transform-regenerator": "^7.24.7", "@babel/plugin-transform-runtime": "^7.24.7", "@babel/plugin-transform-shorthand-properties": "^7.24.7", "@babel/plugin-transform-spread": "^7.24.7", "@babel/plugin-transform-sticky-regex": "^7.24.7", "@babel/plugin-transform-typescript": "^7.25.2", "@babel/plugin-transform-unicode-regex": "^7.24.7", "@babel/template": "^7.25.0", "@react-native/babel-plugin-codegen": "0.76.7", "babel-plugin-syntax-hermes-parser": "^0.25.1", "babel-plugin-transform-flow-enums": "^0.0.2", "react-refresh": "^0.14.0" } }, "sha512-/c5DYZ6y8tyg+g8tgXKndDT7mWnGmkZ9F+T3qNDfoE3Qh7ucrNeC2XWvU9h5pk8eRtj9l4SzF4aO1phzwoibyg=="],
|
||||||
|
|
||||||
"@react-native/codegen": ["@react-native/codegen@0.76.6", "", { "dependencies": { "@babel/parser": "^7.25.3", "glob": "^7.1.1", "hermes-parser": "0.23.1", "invariant": "^2.2.4", "jscodeshift": "^0.14.0", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "yargs": "^17.6.2" }, "peerDependencies": { "@babel/preset-env": "^7.1.6" } }, "sha512-BABb3e5G/+hyQYEYi0AODWh2km2d8ERoASZr6Hv90pVXdUHRYR+yxCatX7vSd9rnDUYndqRTzD0hZWAucPNAKg=="],
|
"@react-native/codegen": ["@react-native/codegen@0.76.7", "", { "dependencies": { "@babel/parser": "^7.25.3", "glob": "^7.1.1", "hermes-parser": "0.23.1", "invariant": "^2.2.4", "jscodeshift": "^0.14.0", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "yargs": "^17.6.2" }, "peerDependencies": { "@babel/preset-env": "^7.1.6" } }, "sha512-FAn585Ll65YvkSrKDyAcsdjHhhAGiMlSTUpHh0x7J5ntudUns+voYms0xMP+pEPt0XuLdjhD7zLIIlAWP407+g=="],
|
||||||
|
|
||||||
"@react-native/community-cli-plugin": ["@react-native/community-cli-plugin@0.76.6", "", { "dependencies": { "@react-native/dev-middleware": "0.76.6", "@react-native/metro-babel-transformer": "0.76.6", "chalk": "^4.0.0", "execa": "^5.1.1", "invariant": "^2.2.4", "metro": "^0.81.0", "metro-config": "^0.81.0", "metro-core": "^0.81.0", "node-fetch": "^2.2.0", "readline": "^1.3.0", "semver": "^7.1.3" }, "peerDependencies": { "@react-native-community/cli-server-api": "*" }, "optionalPeers": ["@react-native-community/cli-server-api"] }, "sha512-nETlc/+U5cESVluzzgN0OcVfcoMijGBaDWzOaJhoYUodcuqnqtu75XsSEc7yzlYjwNQG+vF83mu9CQGezruNMA=="],
|
"@react-native/community-cli-plugin": ["@react-native/community-cli-plugin@0.76.7", "", { "dependencies": { "@react-native/dev-middleware": "0.76.7", "@react-native/metro-babel-transformer": "0.76.7", "chalk": "^4.0.0", "execa": "^5.1.1", "invariant": "^2.2.4", "metro": "^0.81.0", "metro-config": "^0.81.0", "metro-core": "^0.81.0", "node-fetch": "^2.2.0", "readline": "^1.3.0", "semver": "^7.1.3" }, "peerDependencies": { "@react-native-community/cli-server-api": "*" }, "optionalPeers": ["@react-native-community/cli-server-api"] }, "sha512-lrcsY2WPLCEWU1pjdNV9+Ccj8vCEwCCURZiPa5aqi7lKB4C++1hPrxA8/CWWnTNcQp76DsBKGYqTFj7Ud4aupw=="],
|
||||||
|
|
||||||
"@react-native/debugger-frontend": ["@react-native/debugger-frontend@0.76.6", "", {}, "sha512-kP97xMQjiANi5/lmf8MakS7d8FTJl+BqYHQMqyvNiY+eeWyKnhqW2GL2v3eEUBAuyPBgJGivuuO4RvjZujduJg=="],
|
"@react-native/debugger-frontend": ["@react-native/debugger-frontend@0.76.7", "", {}, "sha512-89ZtZXt7ZxE94i7T94qzZMhp4Gfcpr/QVpGqEaejAxZD+gvDCH21cYSF+/Rz2ttBazm0rk5MZ0mFqb0Iqp1jmw=="],
|
||||||
|
|
||||||
"@react-native/dev-middleware": ["@react-native/dev-middleware@0.76.6", "", { "dependencies": { "@isaacs/ttlcache": "^1.4.1", "@react-native/debugger-frontend": "0.76.6", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^0.2.0", "connect": "^3.6.5", "debug": "^2.2.0", "nullthrows": "^1.1.1", "open": "^7.0.3", "selfsigned": "^2.4.1", "serve-static": "^1.13.1", "ws": "^6.2.3" } }, "sha512-1bAyd2/X48Nzb45s5l2omM75vy764odx/UnDs4sJfFCuK+cupU4nRPgl0XWIqgdM/2+fbQ3E4QsVS/WIKTFxvQ=="],
|
"@react-native/dev-middleware": ["@react-native/dev-middleware@0.76.7", "", { "dependencies": { "@isaacs/ttlcache": "^1.4.1", "@react-native/debugger-frontend": "0.76.7", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^0.2.0", "connect": "^3.6.5", "debug": "^2.2.0", "invariant": "^2.2.4", "nullthrows": "^1.1.1", "open": "^7.0.3", "selfsigned": "^2.4.1", "serve-static": "^1.13.1", "ws": "^6.2.3" } }, "sha512-Jsw8g9DyLPnR9yHEGuT09yHZ7M88/GL9CtU9WmyChlBwdXSeE3AmRqLegsV3XcgULQ1fqdemokaOZ/MwLYkjdA=="],
|
||||||
|
|
||||||
"@react-native/eslint-config": ["@react-native/eslint-config@0.76.6", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", "@react-native/eslint-plugin": "0.76.6", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-ft-flow": "^2.0.1", "eslint-plugin-jest": "^27.9.0", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.0.0" }, "peerDependencies": { "eslint": ">=8", "prettier": ">=2" } }, "sha512-s7dsWapoB2oTgwhS8cjJmls9qsAOEbodWnFVeDkGytcjlOWDEYdDSqOhJXuwAqNmkZP1noXmcqRATo+gCnY20A=="],
|
"@react-native/eslint-config": ["@react-native/eslint-config@0.76.7", "", { "dependencies": { "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", "@react-native/eslint-plugin": "0.76.7", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-ft-flow": "^2.0.1", "eslint-plugin-jest": "^27.9.0", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.0.0" }, "peerDependencies": { "eslint": ">=8", "prettier": ">=2" } }, "sha512-pd5Vgcwph0gtBvPmQ6Np6fC7vfI5/4xGdS4YNT5VTtrIcK5mki9M2iWvvQ5K12C4KHHLCFXGmtghTo1VIKzHCw=="],
|
||||||
|
|
||||||
"@react-native/eslint-plugin": ["@react-native/eslint-plugin@0.76.6", "", {}, "sha512-pAqN77lBXyfRcKN2D17AqWJLKkHNV/ZevPKKIGZ2LbLeM8POWsYcNnGtaO+glny8LbE+ZSBEXknMSIN+PrDk/A=="],
|
"@react-native/eslint-plugin": ["@react-native/eslint-plugin@0.76.7", "", {}, "sha512-mT+XOZJwUVMF/wrnyQcuyhLKLuDQmeC48YD/FBhSqCq+Q7zItxe78gDnXgMmuoeZuEu66s2nV1dzBM3qKOP/Xw=="],
|
||||||
|
|
||||||
"@react-native/gradle-plugin": ["@react-native/gradle-plugin@0.76.6", "", {}, "sha512-sDzpf4eiynryoS6bpYCweGoxSmWgCSx9lzBoxIIW+S6siyGiTaffzZHWCm8mIn9UZsSPlEO37q62ggnR9Zu/OA=="],
|
"@react-native/gradle-plugin": ["@react-native/gradle-plugin@0.76.7", "", {}, "sha512-gQI6RcrJbigU8xk7F960C5xQIgvbBj20TUvGecD+N2PHfbLpqR+92cj7hz3UcbrCONmTP40WHnbMMJ8P+kLsrA=="],
|
||||||
|
|
||||||
"@react-native/js-polyfills": ["@react-native/js-polyfills@0.76.6", "", {}, "sha512-cDD7FynxWYxHkErZzAJtzPGhJ13JdOgL+R0riTh0hCovOfIUz9ItffdLQv2nx48lnvMTQ+HZXMnGOZnsFCNzQw=="],
|
"@react-native/js-polyfills": ["@react-native/js-polyfills@0.76.7", "", {}, "sha512-+iEikj6c6Zvrg1c3cYMeiPB+5nS8EaIC3jCtP6Muk3qc7c386IymEPM2xycIlfg04DPZvO3D4P2/vaO9/TCnUg=="],
|
||||||
|
|
||||||
"@react-native/metro-babel-transformer": ["@react-native/metro-babel-transformer@0.76.6", "", { "dependencies": { "@babel/core": "^7.25.2", "@react-native/babel-preset": "0.76.6", "hermes-parser": "0.23.1", "nullthrows": "^1.1.1" } }, "sha512-xSBi9jPliThu5HRSJvluqUlDOLLEmf34zY/U7RDDjEbZqC0ufPcPS7c5XsSg0GDPiXc7lgjBVesPZsKFkoIBgA=="],
|
"@react-native/metro-babel-transformer": ["@react-native/metro-babel-transformer@0.76.7", "", { "dependencies": { "@babel/core": "^7.25.2", "@react-native/babel-preset": "0.76.7", "hermes-parser": "0.23.1", "nullthrows": "^1.1.1" } }, "sha512-jDS1wR7q46xY5ah+jF714Mvss9l7+lmwW/tplahZgLKozkYDC8Td5o9TOCgKlv18acw9H1V7zv8ivuRSj8ICPg=="],
|
||||||
|
|
||||||
"@react-native/metro-config": ["@react-native/metro-config@0.76.6", "", { "dependencies": { "@react-native/js-polyfills": "0.76.6", "@react-native/metro-babel-transformer": "0.76.6", "metro-config": "^0.81.0", "metro-runtime": "^0.81.0" } }, "sha512-R//+5BT/1hXv3ZjFjgF5uvR4xBpiHbw9Ci9AtCebPaAslQL8FXqAtwhn1Fjrl+ECo1Nhe25B/Lzl9WMWmI9X0w=="],
|
"@react-native/metro-config": ["@react-native/metro-config@0.76.7", "", { "dependencies": { "@react-native/js-polyfills": "0.76.7", "@react-native/metro-babel-transformer": "0.76.7", "metro-config": "^0.81.0", "metro-runtime": "^0.81.0" } }, "sha512-5kfw9wbL2FuLkZ/YjxJWgKuvN79hFuj/RtjlJmDntJDumeQH0GKMka2TVal2Cjv9SlV7Vixbt3yAWGLkXsQwTQ=="],
|
||||||
|
|
||||||
"@react-native/normalize-colors": ["@react-native/normalize-colors@0.76.6", "", {}, "sha512-1n4udXH2Cla31iA/8eLRdhFHpYUYK1NKWCn4m1Sr9L4SarWKAYuRFliK1fcLvPPALCFoFlWvn8I0ekdUOHMzDQ=="],
|
"@react-native/normalize-colors": ["@react-native/normalize-colors@0.76.7", "", {}, "sha512-ST1xxBuYVIXPdD81dR6+tzIgso7m3pa9+6rOBXTh5Xm7KEEFik7tnQX+GydXYMp3wr1gagJjragdXkPnxK6WNg=="],
|
||||||
|
|
||||||
"@react-native/typescript-config": ["@react-native/typescript-config@0.76.6", "", {}, "sha512-i1gh+wLaAwG6ZVe2Mkoa10RJznsfOC1crRh0JAobCHaTaA/ZmuFScBTRzRE60pO5Oz6HWM1qbQST+JM+5LiMuA=="],
|
"@react-native/typescript-config": ["@react-native/typescript-config@0.76.7", "", {}, "sha512-grJJY2DjXTQ0CDReSAHxOmp4eYDnQ5coUT9ZMdXEovmeALRysq54HH3vvdsM8FRAgQx1ZhGzRIUEF0/HDrAgQw=="],
|
||||||
|
|
||||||
"@react-native/virtualized-lists": ["@react-native/virtualized-lists@0.76.6", "", { "dependencies": { "invariant": "^2.2.4", "nullthrows": "^1.1.1" }, "peerDependencies": { "@types/react": "^18.2.6", "react": "*", "react-native": "*" }, "optionalPeers": ["@types/react"] }, "sha512-0HUWVwJbRq1BWFOu11eOWGTSmK9nMHhoMPyoI27wyWcl/nqUx7HOxMbRVq0DsTCyATSMPeF+vZ6o1REapcNWKw=="],
|
"@react-native/virtualized-lists": ["@react-native/virtualized-lists@0.76.7", "", { "dependencies": { "invariant": "^2.2.4", "nullthrows": "^1.1.1" }, "peerDependencies": { "@types/react": "^18.2.6", "react": "*", "react-native": "*" }, "optionalPeers": ["@types/react"] }, "sha512-pRUf1jUO8H9Ft04CaWv76t34QI9wY0sydoYlIwEtqXjjMJgmgDoOCAWBjArgn2mk8/rK+u/uicI67ZCYCp1pJw=="],
|
||||||
|
|
||||||
"@sideway/address": ["@sideway/address@4.1.5", "", { "dependencies": { "@hapi/hoek": "^9.0.0" } }, "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q=="],
|
"@sideway/address": ["@sideway/address@4.1.5", "", { "dependencies": { "@hapi/hoek": "^9.0.0" } }, "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q=="],
|
||||||
|
|
||||||
@@ -581,6 +582,8 @@
|
|||||||
|
|
||||||
"bluebird": ["bluebird@3.7.2", "", {}, "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="],
|
"bluebird": ["bluebird@3.7.2", "", {}, "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="],
|
||||||
|
|
||||||
|
"boolbase": ["boolbase@1.0.0", "", {}, "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="],
|
||||||
|
|
||||||
"brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="],
|
"brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="],
|
||||||
|
|
||||||
"braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],
|
"braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],
|
||||||
@@ -687,6 +690,12 @@
|
|||||||
|
|
||||||
"cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],
|
"cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],
|
||||||
|
|
||||||
|
"css-select": ["css-select@5.1.0", "", { "dependencies": { "boolbase": "^1.0.0", "css-what": "^6.1.0", "domhandler": "^5.0.2", "domutils": "^3.0.1", "nth-check": "^2.0.1" } }, "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg=="],
|
||||||
|
|
||||||
|
"css-tree": ["css-tree@1.1.3", "", { "dependencies": { "mdn-data": "2.0.14", "source-map": "^0.6.1" } }, "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q=="],
|
||||||
|
|
||||||
|
"css-what": ["css-what@6.1.0", "", {}, "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw=="],
|
||||||
|
|
||||||
"csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
|
"csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
|
||||||
|
|
||||||
"data-view-buffer": ["data-view-buffer@1.0.2", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "is-data-view": "^1.0.2" } }, "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ=="],
|
"data-view-buffer": ["data-view-buffer@1.0.2", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "is-data-view": "^1.0.2" } }, "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ=="],
|
||||||
@@ -733,6 +742,14 @@
|
|||||||
|
|
||||||
"doctrine": ["doctrine@3.0.0", "", { "dependencies": { "esutils": "^2.0.2" } }, "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w=="],
|
"doctrine": ["doctrine@3.0.0", "", { "dependencies": { "esutils": "^2.0.2" } }, "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w=="],
|
||||||
|
|
||||||
|
"dom-serializer": ["dom-serializer@2.0.0", "", { "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.2", "entities": "^4.2.0" } }, "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg=="],
|
||||||
|
|
||||||
|
"domelementtype": ["domelementtype@2.3.0", "", {}, "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw=="],
|
||||||
|
|
||||||
|
"domhandler": ["domhandler@5.0.3", "", { "dependencies": { "domelementtype": "^2.3.0" } }, "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w=="],
|
||||||
|
|
||||||
|
"domutils": ["domutils@3.2.2", "", { "dependencies": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", "domhandler": "^5.0.3" } }, "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw=="],
|
||||||
|
|
||||||
"dtrace-provider": ["dtrace-provider@0.8.8", "", { "dependencies": { "nan": "^2.14.0" } }, "sha512-b7Z7cNtHPhH9EJhNNbbeqTcXB8LGFFZhq1PGgEvpeHlzd36bhbdTWoE/Ba/YguqpBSlAPKnARWhVlhunCMwfxg=="],
|
"dtrace-provider": ["dtrace-provider@0.8.8", "", { "dependencies": { "nan": "^2.14.0" } }, "sha512-b7Z7cNtHPhH9EJhNNbbeqTcXB8LGFFZhq1PGgEvpeHlzd36bhbdTWoE/Ba/YguqpBSlAPKnARWhVlhunCMwfxg=="],
|
||||||
|
|
||||||
"dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
|
"dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
|
||||||
@@ -751,6 +768,8 @@
|
|||||||
|
|
||||||
"encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="],
|
"encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="],
|
||||||
|
|
||||||
|
"entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],
|
||||||
|
|
||||||
"env-paths": ["env-paths@2.2.1", "", {}, "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A=="],
|
"env-paths": ["env-paths@2.2.1", "", {}, "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A=="],
|
||||||
|
|
||||||
"envinfo": ["envinfo@7.14.0", "", { "bin": { "envinfo": "dist/cli.js" } }, "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg=="],
|
"envinfo": ["envinfo@7.14.0", "", { "bin": { "envinfo": "dist/cli.js" } }, "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg=="],
|
||||||
@@ -873,7 +892,7 @@
|
|||||||
|
|
||||||
"for-each": ["for-each@0.3.3", "", { "dependencies": { "is-callable": "^1.1.3" } }, "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw=="],
|
"for-each": ["for-each@0.3.3", "", { "dependencies": { "is-callable": "^1.1.3" } }, "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw=="],
|
||||||
|
|
||||||
"form-data": ["form-data@4.0.1", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } }, "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw=="],
|
"form-data": ["form-data@4.0.2", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "mime-types": "^2.1.12" } }, "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w=="],
|
||||||
|
|
||||||
"fresh": ["fresh@0.5.2", "", {}, "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="],
|
"fresh": ["fresh@0.5.2", "", {}, "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="],
|
||||||
|
|
||||||
@@ -1195,6 +1214,8 @@
|
|||||||
|
|
||||||
"math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="],
|
"math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="],
|
||||||
|
|
||||||
|
"mdn-data": ["mdn-data@2.0.14", "", {}, "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="],
|
||||||
|
|
||||||
"memoize-one": ["memoize-one@5.2.1", "", {}, "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q=="],
|
"memoize-one": ["memoize-one@5.2.1", "", {}, "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q=="],
|
||||||
|
|
||||||
"merge-stream": ["merge-stream@2.0.0", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="],
|
"merge-stream": ["merge-stream@2.0.0", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="],
|
||||||
@@ -1291,6 +1312,8 @@
|
|||||||
|
|
||||||
"npm-run-path": ["npm-run-path@4.0.1", "", { "dependencies": { "path-key": "^3.0.0" } }, "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="],
|
"npm-run-path": ["npm-run-path@4.0.1", "", { "dependencies": { "path-key": "^3.0.0" } }, "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="],
|
||||||
|
|
||||||
|
"nth-check": ["nth-check@2.1.1", "", { "dependencies": { "boolbase": "^1.0.0" } }, "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w=="],
|
||||||
|
|
||||||
"nullthrows": ["nullthrows@1.1.1", "", {}, "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw=="],
|
"nullthrows": ["nullthrows@1.1.1", "", {}, "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw=="],
|
||||||
|
|
||||||
"ob1": ["ob1@0.81.0", "", { "dependencies": { "flow-enums-runtime": "^0.0.6" } }, "sha512-6Cvrkxt1tqaRdWqTAMcVYEiO5i1xcF9y7t06nFdjFqkfPsEloCf8WwhXdwBpNUkVYSQlSGS7cDgVQR86miBfBQ=="],
|
"ob1": ["ob1@0.81.0", "", { "dependencies": { "flow-enums-runtime": "^0.0.6" } }, "sha512-6Cvrkxt1tqaRdWqTAMcVYEiO5i1xcF9y7t06nFdjFqkfPsEloCf8WwhXdwBpNUkVYSQlSGS7cDgVQR86miBfBQ=="],
|
||||||
@@ -1401,15 +1424,17 @@
|
|||||||
|
|
||||||
"react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="],
|
"react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="],
|
||||||
|
|
||||||
"react-native": ["react-native@0.76.6", "", { "dependencies": { "@jest/create-cache-key-function": "^29.6.3", "@react-native/assets-registry": "0.76.6", "@react-native/codegen": "0.76.6", "@react-native/community-cli-plugin": "0.76.6", "@react-native/gradle-plugin": "0.76.6", "@react-native/js-polyfills": "0.76.6", "@react-native/normalize-colors": "0.76.6", "@react-native/virtualized-lists": "0.76.6", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", "babel-jest": "^29.7.0", "babel-plugin-syntax-hermes-parser": "^0.23.1", "base64-js": "^1.5.1", "chalk": "^4.0.0", "commander": "^12.0.0", "event-target-shim": "^5.0.1", "flow-enums-runtime": "^0.0.6", "glob": "^7.1.1", "invariant": "^2.2.4", "jest-environment-node": "^29.6.3", "jsc-android": "^250231.0.0", "memoize-one": "^5.0.0", "metro-runtime": "^0.81.0", "metro-source-map": "^0.81.0", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "pretty-format": "^29.7.0", "promise": "^8.3.0", "react-devtools-core": "^5.3.1", "react-refresh": "^0.14.0", "regenerator-runtime": "^0.13.2", "scheduler": "0.24.0-canary-efb381bbf-20230505", "semver": "^7.1.3", "stacktrace-parser": "^0.1.10", "whatwg-fetch": "^3.0.0", "ws": "^6.2.3", "yargs": "^17.6.2" }, "peerDependencies": { "@types/react": "^18.2.6", "react": "^18.2.0" }, "optionalPeers": ["@types/react"], "bin": { "react-native": "cli.js" } }, "sha512-AsRi+ud6v6ADH7ZtSOY42kRB4nbM0KtSu450pGO4pDudl4AEK/AF96ai88snb2/VJJSGGa/49QyJVFXxz/qoFg=="],
|
"react-native": ["react-native@0.76.7", "", { "dependencies": { "@jest/create-cache-key-function": "^29.6.3", "@react-native/assets-registry": "0.76.7", "@react-native/codegen": "0.76.7", "@react-native/community-cli-plugin": "0.76.7", "@react-native/gradle-plugin": "0.76.7", "@react-native/js-polyfills": "0.76.7", "@react-native/normalize-colors": "0.76.7", "@react-native/virtualized-lists": "0.76.7", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", "babel-jest": "^29.7.0", "babel-plugin-syntax-hermes-parser": "^0.23.1", "base64-js": "^1.5.1", "chalk": "^4.0.0", "commander": "^12.0.0", "event-target-shim": "^5.0.1", "flow-enums-runtime": "^0.0.6", "glob": "^7.1.1", "invariant": "^2.2.4", "jest-environment-node": "^29.6.3", "jsc-android": "^250231.0.0", "memoize-one": "^5.0.0", "metro-runtime": "^0.81.0", "metro-source-map": "^0.81.0", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "pretty-format": "^29.7.0", "promise": "^8.3.0", "react-devtools-core": "^5.3.1", "react-refresh": "^0.14.0", "regenerator-runtime": "^0.13.2", "scheduler": "0.24.0-canary-efb381bbf-20230505", "semver": "^7.1.3", "stacktrace-parser": "^0.1.10", "whatwg-fetch": "^3.0.0", "ws": "^6.2.3", "yargs": "^17.6.2" }, "peerDependencies": { "@types/react": "^18.2.6", "react": "^18.2.0" }, "optionalPeers": ["@types/react"], "bin": { "react-native": "cli.js" } }, "sha512-GPJcQeO3qUi1MvuhsC2DC6tH8gJQ4uc4JWPORrdeuCGFWE3QLsN8/hiChTEvJREHLfQSV61YPI8gIOtAQ8c37g=="],
|
||||||
|
|
||||||
"react-native-camera-kit": ["react-native-camera-kit@14.1.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-idkg+Sa2KbGvF6SUqmuAr2U12qBELdiuUJ6fxgB4whUC2AyYHi5jBxiGv6whY/eTB3is7nW1S+TjyM9pEBzNzw=="],
|
"react-native-camera-kit": ["react-native-camera-kit@14.2.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-rPk/4Ux52/Kc6oIPk0x6NsrvDkeL+kd/GAUJ4xBtTlnmiWjLTgeA2Vjgg9ik03mmyf6rV+LaqaOBT7KejhuHKQ=="],
|
||||||
|
|
||||||
"react-native-paper": ["react-native-paper@5.13.1", "", { "dependencies": { "@callstack/react-theme-provider": "^3.0.9", "color": "^3.1.2", "use-latest-callback": "^0.1.5" }, "peerDependencies": { "react": "*", "react-native": "*", "react-native-safe-area-context": "*", "react-native-vector-icons": "*" } }, "sha512-8frKVKJ5JBd8WL1G3tpcYzOgK40kxkD/U+yLHGKNeLnD6v1Qc9W6DxWTHWN7lsX/DPYnhgvw1aKkYaPTmDj5pg=="],
|
"react-native-paper": ["react-native-paper@5.13.1", "", { "dependencies": { "@callstack/react-theme-provider": "^3.0.9", "color": "^3.1.2", "use-latest-callback": "^0.1.5" }, "peerDependencies": { "react": "*", "react-native": "*", "react-native-safe-area-context": "*", "react-native-vector-icons": "*" } }, "sha512-8frKVKJ5JBd8WL1G3tpcYzOgK40kxkD/U+yLHGKNeLnD6v1Qc9W6DxWTHWN7lsX/DPYnhgvw1aKkYaPTmDj5pg=="],
|
||||||
|
|
||||||
"react-native-safe-area-context": ["react-native-safe-area-context@5.1.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-Y4vyJX+0HPJUQNVeIJTj2/UOjbSJcB09OEwirAWDrOZ67Lz5p43AmjxSy8nnZft1rMzoh3rcPuonB6jJyHTfCw=="],
|
"react-native-safe-area-context": ["react-native-safe-area-context@5.2.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-QpcGA6MRKe8Zbpf1hirCBudNQYGsMv0n/CTTROMOFcXbqRUoEXLCsYxUmYKi7JJb3ziL2DbyzWXyH2/gw4Tkfw=="],
|
||||||
|
|
||||||
"react-native-update": ["react-native-update@10.22.0", "", { "dependencies": { "nanoid": "^3.3.3", "react-native-url-polyfill": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-native": ">=0.59.0" } }, "sha512-RP49tCaMSb7+H1zhpzd8RWiCcG5Opc5jklAB2T67SKVoiGYF4AH+/xdPlpOmuNHfUm97rJG945UPb/GcVT7/nA=="],
|
"react-native-svg": ["react-native-svg@15.11.1", "", { "dependencies": { "css-select": "^5.1.0", "css-tree": "^1.1.3", "warn-once": "0.1.1" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-Qmwx/yJKt+AHUr4zjxx/Q69qwKtRfr1+uIfFMQoq3WFRhqU76aL9db1DyvPiY632DAsVGba1pHf92OZPkpjrdQ=="],
|
||||||
|
|
||||||
|
"react-native-update": ["react-native-update@10.24.2", "", { "dependencies": { "nanoid": "^3.3.3", "react-native-url-polyfill": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-native": ">=0.59.0" } }, "sha512-pMnAFWApyZkTFKJliENcKVl3wSjOH/e0mEaYjYodWjpmHGZVET/J/nZ46Q03/JRtXcVnYkaq//y3axMfgHC21g=="],
|
||||||
|
|
||||||
"react-native-url-polyfill": ["react-native-url-polyfill@2.0.0", "", { "dependencies": { "whatwg-url-without-unicode": "8.0.0-3" }, "peerDependencies": { "react-native": "*" } }, "sha512-My330Do7/DvKnEvwQc0WdcBnFPploYKp9CYlefDXzIdEaA+PAhDYllkvGeEroEzvc4Kzzj2O4yVdz8v6fjRvhA=="],
|
"react-native-url-polyfill": ["react-native-url-polyfill@2.0.0", "", { "dependencies": { "whatwg-url-without-unicode": "8.0.0-3" }, "peerDependencies": { "react-native": "*" } }, "sha512-My330Do7/DvKnEvwQc0WdcBnFPploYKp9CYlefDXzIdEaA+PAhDYllkvGeEroEzvc4Kzzj2O4yVdz8v6fjRvhA=="],
|
||||||
|
|
||||||
@@ -1673,6 +1698,8 @@
|
|||||||
|
|
||||||
"walker": ["walker@1.0.8", "", { "dependencies": { "makeerror": "1.0.12" } }, "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ=="],
|
"walker": ["walker@1.0.8", "", { "dependencies": { "makeerror": "1.0.12" } }, "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ=="],
|
||||||
|
|
||||||
|
"warn-once": ["warn-once@0.1.1", "", {}, "sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q=="],
|
||||||
|
|
||||||
"wcwidth": ["wcwidth@1.0.1", "", { "dependencies": { "defaults": "^1.0.3" } }, "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg=="],
|
"wcwidth": ["wcwidth@1.0.1", "", { "dependencies": { "defaults": "^1.0.3" } }, "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg=="],
|
||||||
|
|
||||||
"webidl-conversions": ["webidl-conversions@5.0.0", "", {}, "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA=="],
|
"webidl-conversions": ["webidl-conversions@5.0.0", "", {}, "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA=="],
|
||||||
@@ -1809,6 +1836,8 @@
|
|||||||
|
|
||||||
"cross-spawn/which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
|
"cross-spawn/which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
|
||||||
|
|
||||||
|
"css-tree/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
|
||||||
|
|
||||||
"detox/fs-extra": ["fs-extra@11.2.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw=="],
|
"detox/fs-extra": ["fs-extra@11.2.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw=="],
|
||||||
|
|
||||||
"detox/semver": ["semver@7.6.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="],
|
"detox/semver": ["semver@7.6.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="],
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -14,15 +14,16 @@
|
|||||||
"dev:harmony": "react-native bundle-harmony --dev"
|
"dev:harmony": "react-native bundle-harmony --dev"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"form-data": "^4.0.1",
|
"form-data": "^4.0.2",
|
||||||
"patch-package": "^8.0.0",
|
"patch-package": "^8.0.0",
|
||||||
"postinstall-postinstall": "^2.1.0",
|
"postinstall-postinstall": "^2.1.0",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-native": "0.76.6",
|
"react-native": "0.76.7",
|
||||||
"react-native-camera-kit": "^14.1.0",
|
"react-native-camera-kit": "^14.2.0",
|
||||||
"react-native-paper": "^5.13.1",
|
"react-native-paper": "^5.13.1",
|
||||||
"react-native-safe-area-context": "^5.1.0",
|
"react-native-safe-area-context": "^5.2.0",
|
||||||
"react-native-update": "^10.22.0",
|
"react-native-svg": "^15.11.1",
|
||||||
|
"react-native-update": "^10.24.2",
|
||||||
"react-native-vector-icons": "^10.2.0"
|
"react-native-vector-icons": "^10.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -32,10 +33,10 @@
|
|||||||
"@react-native-community/cli": "15.0.1",
|
"@react-native-community/cli": "15.0.1",
|
||||||
"@react-native-community/cli-platform-android": "15.0.1",
|
"@react-native-community/cli-platform-android": "15.0.1",
|
||||||
"@react-native-community/cli-platform-ios": "15.0.1",
|
"@react-native-community/cli-platform-ios": "15.0.1",
|
||||||
"@react-native/babel-preset": "0.76.6",
|
"@react-native/babel-preset": "0.76.7",
|
||||||
"@react-native/eslint-config": "0.76.6",
|
"@react-native/eslint-config": "0.76.7",
|
||||||
"@react-native/metro-config": "0.76.6",
|
"@react-native/metro-config": "0.76.7",
|
||||||
"@react-native/typescript-config": "0.76.6",
|
"@react-native/typescript-config": "0.76.7",
|
||||||
"@types/react": "^18.2.6",
|
"@types/react": "^18.2.6",
|
||||||
"@types/react-test-renderer": "^18.0.0",
|
"@types/react-test-renderer": "^18.0.0",
|
||||||
"babel-jest": "^29.6.3",
|
"babel-jest": "^29.6.3",
|
||||||
|
9
Example/testHotUpdate/src/assets/react-logo.svg
Normal file
9
Example/testHotUpdate/src/assets/react-logo.svg
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-11.5 -10.23174 23 20.46348">
|
||||||
|
<title>React Logo</title>
|
||||||
|
<circle cx="0" cy="0" r="2.05" fill="#61dafb"/>
|
||||||
|
<g stroke="#61dafb" stroke-width="1" fill="none">
|
||||||
|
<ellipse rx="11" ry="4.2"/>
|
||||||
|
<ellipse rx="11" ry="4.2" transform="rotate(60)"/>
|
||||||
|
<ellipse rx="11" ry="4.2" transform="rotate(120)"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 365 B |
@@ -20,11 +20,12 @@ import {
|
|||||||
Portal,
|
Portal,
|
||||||
} from 'react-native-paper';
|
} from 'react-native-paper';
|
||||||
import {Camera} from 'react-native-camera-kit';
|
import {Camera} from 'react-native-camera-kit';
|
||||||
|
import {LocalSvg} from 'react-native-svg/css';
|
||||||
|
|
||||||
import TestConsole from './TestConsole';
|
import TestConsole from './TestConsole';
|
||||||
|
|
||||||
import _updateConfig from '../update.json';
|
import _updateConfig from '../update.json';
|
||||||
import {PushyProvider, Pushy, usePushy} from 'react-native-update';
|
import {UpdateProvider, Pushy, Cresc, useUpdate} from 'react-native-update';
|
||||||
const {appKey} = _updateConfig[Platform.OS];
|
const {appKey} = _updateConfig[Platform.OS];
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
@@ -39,7 +40,7 @@ function App() {
|
|||||||
currentHash,
|
currentHash,
|
||||||
parseTestQrCode,
|
parseTestQrCode,
|
||||||
progress: {received, total} = {},
|
progress: {received, total} = {},
|
||||||
} = usePushy();
|
} = useUpdate();
|
||||||
const [useDefaultAlert, setUseDefaultAlert] = useState(true);
|
const [useDefaultAlert, setUseDefaultAlert] = useState(true);
|
||||||
const [showTestConsole, setShowTestConsole] = useState(false);
|
const [showTestConsole, setShowTestConsole] = useState(false);
|
||||||
const [showUpdateBanner, setShowUpdateBanner] = useState(false);
|
const [showUpdateBanner, setShowUpdateBanner] = useState(false);
|
||||||
@@ -91,11 +92,21 @@ function App() {
|
|||||||
/>
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
</Portal>
|
</Portal>
|
||||||
<Image
|
<View style={{flexDirection: 'row', alignItems: 'center', gap: 10}}>
|
||||||
resizeMode={'contain'}
|
<Text>png:</Text>
|
||||||
source={require('./assets/shezhi.png')}
|
<Image
|
||||||
style={styles.image}
|
resizeMode={'contain'}
|
||||||
/>
|
source={require('./assets/shezhi.png')}
|
||||||
|
style={styles.image}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View style={{flexDirection: 'row', alignItems: 'center', gap: 10}}>
|
||||||
|
<Text>svg:</Text>
|
||||||
|
<LocalSvg
|
||||||
|
asset={require('./assets/react-logo.svg')}
|
||||||
|
style={{width: 30, height: 30}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
<Text style={styles.instructions}>
|
<Text style={styles.instructions}>
|
||||||
这是版本一 {'\n'}
|
这是版本一 {'\n'}
|
||||||
当前原生包版本号: {packageVersion}
|
当前原生包版本号: {packageVersion}
|
||||||
@@ -192,17 +203,24 @@ const styles = StyleSheet.create({
|
|||||||
image: {},
|
image: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
const pushyClient = new Pushy({
|
// use Pushy for China users
|
||||||
|
// const updateClient = new Pushy({
|
||||||
|
// appKey,
|
||||||
|
// debug: true,
|
||||||
|
// });
|
||||||
|
|
||||||
|
// use Cresc for global users
|
||||||
|
const updateClient = new Cresc({
|
||||||
appKey,
|
appKey,
|
||||||
debug: true,
|
debug: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default function Root() {
|
export default function Root() {
|
||||||
return (
|
return (
|
||||||
<PushyProvider client={pushyClient}>
|
<UpdateProvider client={updateClient}>
|
||||||
<PaperProvider>
|
<PaperProvider>
|
||||||
<App />
|
<App />
|
||||||
</PaperProvider>
|
</PaperProvider>
|
||||||
</PushyProvider>
|
</UpdateProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
### 本地开发
|
### 本地开发
|
||||||
|
|
||||||
```
|
```
|
||||||
$ git clone git@github.com:reactnativecn/react-native-pushy.git
|
$ git clone git@github.com:reactnativecn/react-native-update.git
|
||||||
$ cd react-native-pushy/Example/testHotUpdate
|
$ cd react-native-pushy/Example/testHotUpdate
|
||||||
$ yarn
|
$ yarn
|
||||||
$ yarn start
|
$ yarn start
|
||||||
@@ -34,4 +34,4 @@ $ yarn start
|
|||||||
|
|
||||||
本组件由[React Native 中文网](https://reactnative.cn/)独家发布,如有定制需求可以[联系我们](https://reactnative.cn/about.html#content)。
|
本组件由[React Native 中文网](https://reactnative.cn/)独家发布,如有定制需求可以[联系我们](https://reactnative.cn/about.html#content)。
|
||||||
|
|
||||||
关于此插件发现任何问题,可以前往[Issues](https://github.com/reactnativecn/react-native-pushy/issues)发帖提问。
|
关于此插件发现任何问题,可以前往[Issues](https://github.com/reactnativecn/react-native-update/issues)发帖提问。
|
||||||
|
@@ -98,23 +98,20 @@ public class UpdateModuleImpl {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
promise.reject("执行报错:" + e.getMessage());
|
promise.reject("downloadPatchFromPpk failed: "+e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void reloadUpdate(UpdateContext updateContext, ReactApplicationContext mContext, ReadableMap options, Promise promise) {
|
public static void reloadUpdate(UpdateContext updateContext, ReactApplicationContext mContext, ReadableMap options, Promise promise) {
|
||||||
final String hash = options.getString("hash");
|
final String hash = options.getString("hash");
|
||||||
|
|
||||||
if (hash == null || hash.isEmpty()) {
|
|
||||||
promise.reject("hash不能为空");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
|
updateContext.switchVersion(hash);
|
||||||
|
final Context application = mContext.getApplicationContext();
|
||||||
|
JSBundleLoader loader = JSBundleLoader.createFileLoader(UpdateContext.getBundleUrl(application));
|
||||||
try {
|
try {
|
||||||
updateContext.switchVersion(hash);
|
|
||||||
final Context application = mContext.getApplicationContext();
|
|
||||||
ReactInstanceManager instanceManager = updateContext.getCustomReactInstanceManager();
|
ReactInstanceManager instanceManager = updateContext.getCustomReactInstanceManager();
|
||||||
|
|
||||||
if (instanceManager == null) {
|
if (instanceManager == null) {
|
||||||
@@ -122,12 +119,10 @@ public class UpdateModuleImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
JSBundleLoader loader = JSBundleLoader.createFileLoader(UpdateContext.getBundleUrl(application));
|
|
||||||
Field loadField = instanceManager.getClass().getDeclaredField("mBundleLoader");
|
Field loadField = instanceManager.getClass().getDeclaredField("mBundleLoader");
|
||||||
loadField.setAccessible(true);
|
loadField.setAccessible(true);
|
||||||
loadField.set(instanceManager, loader);
|
loadField.set(instanceManager, loader);
|
||||||
} catch (Throwable err) {
|
} catch (Throwable err) {
|
||||||
promise.reject("pushy:"+err.getMessage());
|
|
||||||
Field jsBundleField = instanceManager.getClass().getDeclaredField("mJSBundleFile");
|
Field jsBundleField = instanceManager.getClass().getDeclaredField("mJSBundleFile");
|
||||||
jsBundleField.setAccessible(true);
|
jsBundleField.setAccessible(true);
|
||||||
jsBundleField.set(instanceManager, UpdateContext.getBundleUrl(application));
|
jsBundleField.set(instanceManager, UpdateContext.getBundleUrl(application));
|
||||||
@@ -137,31 +132,36 @@ public class UpdateModuleImpl {
|
|||||||
promise.resolve(true);
|
promise.resolve(true);
|
||||||
|
|
||||||
} catch (Throwable err) {
|
} catch (Throwable err) {
|
||||||
promise.reject(err);
|
|
||||||
Log.e("pushy", "switchVersion failed ", err);
|
|
||||||
final Activity currentActivity = mContext.getCurrentActivity();
|
final Activity currentActivity = mContext.getCurrentActivity();
|
||||||
if (currentActivity == null) {
|
if (currentActivity == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// Try to get getReactDelegate method using reflection
|
|
||||||
java.lang.reflect.Method getReactDelegateMethod =
|
java.lang.reflect.Method getReactDelegateMethod =
|
||||||
ReactActivity.class.getMethod("getReactDelegate");
|
ReactActivity.class.getMethod("getReactDelegate");
|
||||||
if (getReactDelegateMethod != null) {
|
|
||||||
ReactDelegate reactDelegate = (ReactDelegate)
|
ReactDelegate reactDelegate = (ReactDelegate)
|
||||||
getReactDelegateMethod.invoke(currentActivity);
|
getReactDelegateMethod.invoke(currentActivity);
|
||||||
|
|
||||||
// Try to get reload method using reflection
|
Field reactHostField = ReactDelegate.class.getDeclaredField("mReactHost");
|
||||||
java.lang.reflect.Method reloadMethod =
|
reactHostField.setAccessible(true);
|
||||||
ReactDelegate.class.getMethod("reload");
|
Object reactHost = reactHostField.get(reactDelegate);
|
||||||
if (reloadMethod != null) {
|
|
||||||
reloadMethod.invoke(reactDelegate);
|
// Access the mReactHostDelegate field
|
||||||
} else {
|
Field reactHostDelegateField = reactHost.getClass().getDeclaredField("mReactHostDelegate");
|
||||||
throw new NoSuchMethodException();
|
reactHostDelegateField.setAccessible(true);
|
||||||
}
|
Object reactHostDelegate = reactHostDelegateField.get(reactHost);
|
||||||
} else {
|
|
||||||
throw new NoSuchMethodException();
|
// Modify the jsBundleLoader field
|
||||||
}
|
Field jsBundleLoaderField = reactHostDelegate.getClass().getDeclaredField("jsBundleLoader");
|
||||||
|
jsBundleLoaderField.setAccessible(true);
|
||||||
|
jsBundleLoaderField.set(reactHostDelegate, loader);
|
||||||
|
|
||||||
|
// Get the reload method with a String parameter
|
||||||
|
java.lang.reflect.Method reloadMethod = reactHost.getClass().getMethod("reload", String.class);
|
||||||
|
|
||||||
|
// Invoke the reload method with a reason
|
||||||
|
reloadMethod.invoke(reactHost, "react-native-update");
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
currentActivity.runOnUiThread(new Runnable() {
|
currentActivity.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -171,72 +171,54 @@ public class UpdateModuleImpl {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
promise.resolve(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void setNeedUpdate(UpdateContext updateContext, ReadableMap options,Promise promise) {
|
public static void setNeedUpdate(UpdateContext updateContext, ReadableMap options, Promise promise) {
|
||||||
try {
|
final String hash = options.getString("hash");
|
||||||
final String hash = options.getString("hash");
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
if(hash==null || hash.isEmpty()){
|
@Override
|
||||||
promise.reject("hash不能为空");
|
public void run() {
|
||||||
return;
|
try {
|
||||||
}
|
updateContext.switchVersion(hash);
|
||||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
promise.resolve(true);
|
||||||
@Override
|
} catch (Throwable err) {
|
||||||
public void run() {
|
promise.reject("switchVersionLater failed: "+err.getMessage());
|
||||||
try {
|
Log.e("pushy", "switchVersionLater failed", err);
|
||||||
updateContext.switchVersion(hash);
|
|
||||||
promise.resolve(true);
|
|
||||||
} catch (Throwable err) {
|
|
||||||
promise.reject("switchVersionLater failed:"+err.getMessage());
|
|
||||||
Log.e("pushy", "switchVersionLater failed", err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
} catch (Exception e){
|
});
|
||||||
promise.reject("执行报错:"+e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void markSuccess(UpdateContext updateContext,Promise promise) {
|
public static void markSuccess(UpdateContext updateContext, Promise promise) {
|
||||||
try {
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
@Override
|
||||||
@Override
|
public void run() {
|
||||||
public void run() {
|
updateContext.markSuccess();
|
||||||
updateContext.markSuccess();
|
promise.resolve(true);
|
||||||
promise.resolve(true);
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
} catch (Exception e){
|
|
||||||
promise.reject("执行报错:"+e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setUuid(UpdateContext updateContext, String uuid, Promise promise) {
|
public static void setUuid(UpdateContext updateContext, String uuid, Promise promise) {
|
||||||
try {
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
@Override
|
||||||
@Override
|
public void run() {
|
||||||
public void run() {
|
updateContext.setKv("uuid", uuid);
|
||||||
updateContext.setKv("uuid", uuid);
|
promise.resolve(true);
|
||||||
promise.resolve(true);
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
} catch (Exception e){
|
|
||||||
promise.reject("执行报错:"+e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean check(String json) {
|
public static boolean check(String json) {
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
try {
|
try {
|
||||||
mapper.readValue(json, Map.class);
|
mapper.readValue(json, Map.class);
|
||||||
System.out.println("String can be converted to Map");
|
|
||||||
return true;
|
return true;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
System.out.println("String cannot be converted to Map");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -246,12 +228,12 @@ public class UpdateModuleImpl {
|
|||||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if(!check(info)){
|
if (check(info)) {
|
||||||
updateContext.setKv("hash_" + hash, info);
|
|
||||||
promise.reject("校验报错:json字符串格式错误");
|
|
||||||
}else {
|
|
||||||
updateContext.setKv("hash_" + hash, info);
|
updateContext.setKv("hash_" + hash, info);
|
||||||
promise.resolve(true);
|
promise.resolve(true);
|
||||||
|
} else {
|
||||||
|
updateContext.setKv("hash_" + hash, info);
|
||||||
|
promise.reject("setLocalHashInfo failed: invalid json string");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -262,7 +244,7 @@ public class UpdateModuleImpl {
|
|||||||
if (check(value)) {
|
if (check(value)) {
|
||||||
promise.resolve(value);
|
promise.resolve(value);
|
||||||
} else {
|
} else {
|
||||||
promise.reject("校验报错:json字符串格式错误");
|
promise.reject("getLocalHashInfo failed: invalid json string");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
1
endpoints_cresc.json
Normal file
1
endpoints_cresc.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
["https://cresc-server-pthxtmvcnf.ap-southeast-1.fcapp.run"]
|
@@ -78,6 +78,7 @@ RCT_EXPORT_MODULE(RCTPushy);
|
|||||||
BOOL needClearPushyInfo = ![curPackageVersion isEqualToString:packageVersion];
|
BOOL needClearPushyInfo = ![curPackageVersion isEqualToString:packageVersion];
|
||||||
if (needClearPushyInfo) {
|
if (needClearPushyInfo) {
|
||||||
[defaults setObject:nil forKey:keyPushyInfo];
|
[defaults setObject:nil forKey:keyPushyInfo];
|
||||||
|
[defaults setObject:nil forKey:keyHashInfo];
|
||||||
[defaults setObject:@(YES) forKey:KeyPackageUpdatedMarked];
|
[defaults setObject:@(YES) forKey:KeyPackageUpdatedMarked];
|
||||||
|
|
||||||
// ...need clear files later
|
// ...need clear files later
|
||||||
|
11
package.json
11
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-update",
|
"name": "react-native-update",
|
||||||
"version": "10.23.0",
|
"version": "10.25.0",
|
||||||
"description": "react-native hot update",
|
"description": "react-native hot update",
|
||||||
"main": "src/index",
|
"main": "src/index",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/reactnativecn/react-native-pushy.git"
|
"url": "git+https://github.com/reactnativecn/react-native-update.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react-native",
|
"react-native",
|
||||||
@@ -37,13 +37,13 @@
|
|||||||
"author": "reactnativecn",
|
"author": "reactnativecn",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/reactnativecn/react-native-pushy/issues"
|
"url": "https://github.com/reactnativecn/react-native-update/issues"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": ">=16.8.0",
|
"react": ">=16.8.0",
|
||||||
"react-native": ">=0.59.0"
|
"react-native": ">=0.59.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/reactnativecn/react-native-pushy#readme",
|
"homepage": "https://github.com/reactnativecn/react-native-update#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nanoid": "^3.3.3",
|
"nanoid": "^3.3.3",
|
||||||
"react-native-url-polyfill": "^2.0.0"
|
"react-native-url-polyfill": "^2.0.0"
|
||||||
@@ -74,6 +74,5 @@
|
|||||||
"react-native": "0.73",
|
"react-native": "0.73",
|
||||||
"ts-jest": "^29.2.5",
|
"ts-jest": "^29.2.5",
|
||||||
"typescript": "^5.6.3"
|
"typescript": "^5.6.3"
|
||||||
},
|
}
|
||||||
"packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"
|
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
|
|||||||
s.cocoapods_version = '>= 1.6.0'
|
s.cocoapods_version = '>= 1.6.0'
|
||||||
s.platform = :ios, "8.0"
|
s.platform = :ios, "8.0"
|
||||||
s.platforms = { :ios => "11.0" }
|
s.platforms = { :ios => "11.0" }
|
||||||
s.source = { :git => 'https://github.com/reactnativecn/react-native-pushy.git', :tag => '#{s.version}' }
|
s.source = { :git => 'https://github.com/reactnativecn/react-native-update.git', :tag => '#{s.version}' }
|
||||||
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
||||||
s.libraries = 'bz2', 'z'
|
s.libraries = 'bz2', 'z'
|
||||||
s.vendored_libraries = 'RCTPushy/libRCTPushy.a'
|
s.vendored_libraries = 'RCTPushy/libRCTPushy.a'
|
||||||
|
112
src/client.ts
112
src/client.ts
@@ -1,5 +1,14 @@
|
|||||||
import { CheckResult, PushyOptions, ProgressData, EventType } from './type';
|
import { CheckResult, ClientOptions, ProgressData, EventType } from './type';
|
||||||
import { emptyObj, joinUrls, log, noop, promiseAny, testUrls } from './utils';
|
import {
|
||||||
|
assertDev,
|
||||||
|
assertWeb,
|
||||||
|
emptyObj,
|
||||||
|
joinUrls,
|
||||||
|
log,
|
||||||
|
noop,
|
||||||
|
promiseAny,
|
||||||
|
testUrls,
|
||||||
|
} from './utils';
|
||||||
import { EmitterSubscription, Platform } from 'react-native';
|
import { EmitterSubscription, Platform } from 'react-native';
|
||||||
import { PermissionsAndroid } from './permissions';
|
import { PermissionsAndroid } from './permissions';
|
||||||
import {
|
import {
|
||||||
@@ -15,31 +24,42 @@ import {
|
|||||||
isRolledBack,
|
isRolledBack,
|
||||||
} from './core';
|
} from './core';
|
||||||
|
|
||||||
const defaultServer = {
|
const SERVER_PRESETS = {
|
||||||
main: 'https://update.react-native.cn/api',
|
// cn
|
||||||
backups: ['https://update.reactnative.cn/api'],
|
Pushy: {
|
||||||
queryUrls: [
|
main: 'https://update.react-native.cn/api',
|
||||||
'https://gitee.com/sunnylqm/react-native-pushy/raw/master/endpoints.json',
|
backups: ['https://update.reactnative.cn/api'],
|
||||||
'https://cdn.jsdelivr.net/gh/reactnativecn/react-native-pushy@master/endpoints.json',
|
queryUrls: [
|
||||||
],
|
'https://gitee.com/sunnylqm/react-native-pushy/raw/master/endpoints.json',
|
||||||
|
'https://cdn.jsdelivr.net/gh/reactnativecn/react-native-update@master/endpoints.json',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// i18n
|
||||||
|
Cresc: {
|
||||||
|
main: 'https://api.cresc.dev',
|
||||||
|
backups: ['https://api.cresc.app'],
|
||||||
|
queryUrls: [
|
||||||
|
'https://cdn.jsdelivr.net/gh/reactnativecn/react-native-update@master/endpoints_cresc.json',
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Platform.OS === 'web') {
|
assertWeb();
|
||||||
console.warn('react-native-update 不支持 web 端热更,不会执行操作');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
const defaultClientOptions: ClientOptions = {
|
||||||
|
appKey: '',
|
||||||
|
autoMarkSuccess: true,
|
||||||
|
updateStrategy: __DEV__ ? 'alwaysAlert' : 'alertUpdateAndIgnoreError',
|
||||||
|
checkStrategy: 'both',
|
||||||
|
logger: noop,
|
||||||
|
debug: false,
|
||||||
|
throwError: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
// for China users
|
||||||
export class Pushy {
|
export class Pushy {
|
||||||
options: PushyOptions = {
|
options = defaultClientOptions;
|
||||||
appKey: '',
|
clientType: 'Pushy' | 'Cresc' = 'Pushy';
|
||||||
server: defaultServer,
|
|
||||||
autoMarkSuccess: true,
|
|
||||||
updateStrategy: __DEV__ ? 'alwaysAlert' : 'alertUpdateAndIgnoreError',
|
|
||||||
checkStrategy: 'both',
|
|
||||||
logger: noop,
|
|
||||||
debug: false,
|
|
||||||
throwError: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
lastChecking?: number;
|
lastChecking?: number;
|
||||||
lastRespJson?: Promise<any>;
|
lastRespJson?: Promise<any>;
|
||||||
|
|
||||||
@@ -50,7 +70,7 @@ export class Pushy {
|
|||||||
|
|
||||||
static marked = false;
|
static marked = false;
|
||||||
static applyingUpdate = false;
|
static applyingUpdate = false;
|
||||||
version = cInfo.pushy;
|
version = cInfo.rnu;
|
||||||
loggerPromise = (() => {
|
loggerPromise = (() => {
|
||||||
let resolve: (value?: unknown) => void = () => {};
|
let resolve: (value?: unknown) => void = () => {};
|
||||||
const promise = new Promise(res => {
|
const promise = new Promise(res => {
|
||||||
@@ -62,12 +82,14 @@ export class Pushy {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
constructor(options: PushyOptions) {
|
constructor(options: ClientOptions) {
|
||||||
if (Platform.OS === 'ios' || Platform.OS === 'android') {
|
if (Platform.OS === 'ios' || Platform.OS === 'android') {
|
||||||
if (!options.appKey) {
|
if (!options.appKey) {
|
||||||
throw new Error('appKey is required');
|
throw new Error('appKey is required');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.clientType = new.target.name as 'Pushy' | 'Cresc';
|
||||||
|
this.options.server = SERVER_PRESETS[this.clientType];
|
||||||
this.setOptions(options);
|
this.setOptions(options);
|
||||||
if (isRolledBack) {
|
if (isRolledBack) {
|
||||||
this.report({
|
this.report({
|
||||||
@@ -79,7 +101,7 @@ export class Pushy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setOptions = (options: Partial<PushyOptions>) => {
|
setOptions = (options: Partial<ClientOptions>) => {
|
||||||
for (const [key, value] of Object.entries(options)) {
|
for (const [key, value] of Object.entries(options)) {
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
(this.options as any)[key] = value;
|
(this.options as any)[key] = value;
|
||||||
@@ -124,15 +146,24 @@ export class Pushy {
|
|||||||
return `${endpoint}/checkUpdate/${this.options.appKey}`;
|
return `${endpoint}/checkUpdate/${this.options.appKey}`;
|
||||||
};
|
};
|
||||||
static assertHash = (hash: string) => {
|
static assertHash = (hash: string) => {
|
||||||
if (!Pushy.downloadedHash) {
|
if (!this.downloadedHash) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (hash !== Pushy.downloadedHash) {
|
if (hash !== this.downloadedHash) {
|
||||||
log(`use downloaded hash ${Pushy.downloadedHash} first`);
|
log(`use downloaded hash ${Pushy.downloadedHash} first`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
assertDebug = () => {
|
||||||
|
if (__DEV__ && !this.options.debug) {
|
||||||
|
console.info(
|
||||||
|
'You are currently in the development environment and have not enabled debug mode. The hot update check will not be performed. If you need to debug hot updates in the development environment, please set debug to true in the client.',
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
markSuccess = () => {
|
markSuccess = () => {
|
||||||
if (Pushy.marked || __DEV__ || !isFirstTime) {
|
if (Pushy.marked || __DEV__ || !isFirstTime) {
|
||||||
return;
|
return;
|
||||||
@@ -142,10 +173,7 @@ export class Pushy {
|
|||||||
this.report({ type: 'markSuccess' });
|
this.report({ type: 'markSuccess' });
|
||||||
};
|
};
|
||||||
switchVersion = async (hash: string) => {
|
switchVersion = async (hash: string) => {
|
||||||
if (__DEV__) {
|
if (!assertDev('switchVersion()')) {
|
||||||
console.warn(
|
|
||||||
'您调用了switchVersion方法,但是当前是开发环境,不会进行任何操作。',
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Pushy.assertHash(hash) && !Pushy.applyingUpdate) {
|
if (Pushy.assertHash(hash) && !Pushy.applyingUpdate) {
|
||||||
@@ -156,10 +184,7 @@ export class Pushy {
|
|||||||
};
|
};
|
||||||
|
|
||||||
switchVersionLater = async (hash: string) => {
|
switchVersionLater = async (hash: string) => {
|
||||||
if (__DEV__) {
|
if (!assertDev('switchVersionLater()')) {
|
||||||
console.warn(
|
|
||||||
'您调用了switchVersionLater方法,但是当前是开发环境,不会进行任何操作。',
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Pushy.assertHash(hash)) {
|
if (Pushy.assertHash(hash)) {
|
||||||
@@ -168,21 +193,17 @@ export class Pushy {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
checkUpdate = async (extra?: Record<string, any>) => {
|
checkUpdate = async (extra?: Record<string, any>) => {
|
||||||
if (__DEV__ && !this.options.debug) {
|
if (!this.assertDebug()) {
|
||||||
console.info(
|
|
||||||
'您当前处于开发环境且未启用 debug,不会进行热更检查。如需在开发环境中调试热更,请在 client 中设置 debug 为 true',
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Platform.OS === 'web') {
|
if (!assertWeb()) {
|
||||||
console.warn('web 端不支持热更新检查');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.options.beforeCheckUpdate &&
|
this.options.beforeCheckUpdate &&
|
||||||
(await this.options.beforeCheckUpdate()) === false
|
(await this.options.beforeCheckUpdate()) === false
|
||||||
) {
|
) {
|
||||||
log('beforeCheckUpdate 返回 false, 忽略检查');
|
log('beforeCheckUpdate returned false, skipping check');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
@@ -310,7 +331,7 @@ export class Pushy {
|
|||||||
this.options.beforeDownloadUpdate &&
|
this.options.beforeDownloadUpdate &&
|
||||||
(await this.options.beforeDownloadUpdate(info)) === false
|
(await this.options.beforeDownloadUpdate(info)) === false
|
||||||
) {
|
) {
|
||||||
log('beforeDownloadUpdate 返回 false, 忽略下载');
|
log('beforeDownloadUpdate returned false, skipping download');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!info.update || !hash) {
|
if (!info.update || !hash) {
|
||||||
@@ -489,3 +510,6 @@ export class Pushy {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// for international users
|
||||||
|
export class Cresc extends Pushy {}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { createContext, useContext } from 'react';
|
import { createContext, useContext } from 'react';
|
||||||
import { CheckResult, ProgressData } from './type';
|
import { CheckResult, ProgressData } from './type';
|
||||||
import { Pushy } from './client';
|
import { Pushy, Cresc } from './client';
|
||||||
|
|
||||||
const noop = () => {};
|
const noop = () => {};
|
||||||
const asyncNoop = () => Promise.resolve();
|
const asyncNoop = () => Promise.resolve();
|
||||||
@@ -19,7 +19,7 @@ export const defaultContext = {
|
|||||||
packageVersion: '',
|
packageVersion: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const PushyContext = createContext<{
|
export const UpdateContext = createContext<{
|
||||||
checkUpdate: () => Promise<void>;
|
checkUpdate: () => Promise<void>;
|
||||||
switchVersion: () => Promise<void>;
|
switchVersion: () => Promise<void>;
|
||||||
switchVersionLater: () => Promise<void>;
|
switchVersionLater: () => Promise<void>;
|
||||||
@@ -35,10 +35,14 @@ export const PushyContext = createContext<{
|
|||||||
parseTestQrCode: (code: string) => boolean;
|
parseTestQrCode: (code: string) => boolean;
|
||||||
currentHash: string;
|
currentHash: string;
|
||||||
packageVersion: string;
|
packageVersion: string;
|
||||||
client?: Pushy;
|
client?: Pushy | Cresc;
|
||||||
progress?: ProgressData;
|
progress?: ProgressData;
|
||||||
updateInfo?: CheckResult;
|
updateInfo?: CheckResult;
|
||||||
lastError?: Error;
|
lastError?: Error;
|
||||||
}>(defaultContext);
|
}>(defaultContext);
|
||||||
|
|
||||||
export const usePushy = () => useContext(PushyContext);
|
export const useUpdate = () => useContext(UpdateContext);
|
||||||
|
|
||||||
|
export const usePushy = useUpdate;
|
||||||
|
|
||||||
|
export const useCresc = useUpdate;
|
||||||
|
14
src/core.ts
14
src/core.ts
@@ -13,8 +13,12 @@ export const PushyModule =
|
|||||||
? require('./NativePushy').default
|
? require('./NativePushy').default
|
||||||
: NativeModules.Pushy;
|
: NativeModules.Pushy;
|
||||||
|
|
||||||
|
export const UpdateModule = PushyModule;
|
||||||
|
|
||||||
if (!PushyModule) {
|
if (!PushyModule) {
|
||||||
throw new Error('react-native-update 模块无法加载,请对照安装文档检查配置。');
|
throw new Error(
|
||||||
|
'Failed to load react-native-update native module, please try to recompile',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const PushyConstants = isTurboModuleEnabled
|
const PushyConstants = isTurboModuleEnabled
|
||||||
@@ -31,12 +35,6 @@ export const isRolledBack: boolean = typeof rolledBackVersion === 'string';
|
|||||||
export const buildTime: string = PushyConstants.buildTime;
|
export const buildTime: string = PushyConstants.buildTime;
|
||||||
let uuid = PushyConstants.uuid;
|
let uuid = PushyConstants.uuid;
|
||||||
|
|
||||||
if (Platform.OS === 'android' && !PushyConstants.isUsingBundleUrl) {
|
|
||||||
throw new Error(
|
|
||||||
'react-native-update 模块无法加载,请对照文档检查 Bundle URL 的配置',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function setLocalHashInfo(hash: string, info: Record<string, any>) {
|
export function setLocalHashInfo(hash: string, info: Record<string, any>) {
|
||||||
PushyModule.setLocalHashInfo(hash, JSON.stringify(info));
|
PushyModule.setLocalHashInfo(hash, JSON.stringify(info));
|
||||||
}
|
}
|
||||||
@@ -63,7 +61,7 @@ if (!uuid) {
|
|||||||
log('uuid: ' + uuid);
|
log('uuid: ' + uuid);
|
||||||
|
|
||||||
export const cInfo = {
|
export const cInfo = {
|
||||||
pushy: require('../package.json').version,
|
rnu: require('../package.json').version,
|
||||||
rn: RNVersion,
|
rn: RNVersion,
|
||||||
os: Platform.OS + ' ' + Platform.Version,
|
os: Platform.OS + ' ' + Platform.Version,
|
||||||
uuid,
|
uuid,
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
export { Pushy } from './client';
|
export { Pushy, Cresc } from './client';
|
||||||
export { PushyContext, usePushy } from './context';
|
export { UpdateContext, usePushy, useCresc, useUpdate } from './context';
|
||||||
export { PushyProvider } from './provider';
|
export { PushyProvider, UpdateProvider } from './provider';
|
||||||
export { PushyModule } from './core';
|
export { PushyModule, UpdateModule } from './core';
|
||||||
|
@@ -12,22 +12,24 @@ import {
|
|||||||
Platform,
|
Platform,
|
||||||
Linking,
|
Linking,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { Pushy } from './client';
|
import { Pushy, Cresc } from './client';
|
||||||
import { currentVersion, packageVersion, getCurrentVersionInfo } from './core';
|
import { currentVersion, packageVersion, getCurrentVersionInfo } from './core';
|
||||||
import { CheckResult, ProgressData, PushyTestPayload } from './type';
|
import { CheckResult, ProgressData, UpdateTestPayload } from './type';
|
||||||
import { PushyContext } from './context';
|
import { UpdateContext } from './context';
|
||||||
import { URL } from 'react-native-url-polyfill';
|
import { URL } from 'react-native-url-polyfill';
|
||||||
import { isInRollout } from './isInRollout';
|
import { isInRollout } from './isInRollout';
|
||||||
import { log } from './utils';
|
import { log } from './utils';
|
||||||
|
|
||||||
export const PushyProvider = ({
|
export const UpdateProvider = ({
|
||||||
client,
|
client,
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
client: Pushy;
|
client: Pushy | Cresc;
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
}) => {
|
}) => {
|
||||||
|
client = useRef(client).current;
|
||||||
const { options } = client;
|
const { options } = client;
|
||||||
|
|
||||||
const stateListener = useRef<NativeEventSubscription>();
|
const stateListener = useRef<NativeEventSubscription>();
|
||||||
const [updateInfo, setUpdateInfo] = useState<CheckResult>();
|
const [updateInfo, setUpdateInfo] = useState<CheckResult>();
|
||||||
const updateInfoRef = useRef(updateInfo);
|
const updateInfoRef = useRef(updateInfo);
|
||||||
@@ -239,10 +241,7 @@ export const PushyProvider = ({
|
|||||||
const markSuccess = client.markSuccess;
|
const markSuccess = client.markSuccess;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (__DEV__ && !options.debug) {
|
if (!client.assertDebug()) {
|
||||||
console.info(
|
|
||||||
'您当前处于开发环境且未启用debug,不会进行热更检查。如需在开发环境中调试热更,请在client中设置debug为true',
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { checkStrategy, dismissErrorAfter, autoMarkSuccess } = options;
|
const { checkStrategy, dismissErrorAfter, autoMarkSuccess } = options;
|
||||||
@@ -272,11 +271,11 @@ export const PushyProvider = ({
|
|||||||
stateListener.current && stateListener.current.remove();
|
stateListener.current && stateListener.current.remove();
|
||||||
clearTimeout(dismissErrorTimer);
|
clearTimeout(dismissErrorTimer);
|
||||||
};
|
};
|
||||||
}, [checkUpdate, options, dismissError, markSuccess]);
|
}, [checkUpdate, options, dismissError, markSuccess, client]);
|
||||||
|
|
||||||
const parseTestPayload = useCallback(
|
const parseTestPayload = useCallback(
|
||||||
(payload: PushyTestPayload) => {
|
(payload: UpdateTestPayload) => {
|
||||||
if (payload && payload.type && payload.type.startsWith('__rnPushy')) {
|
if (payload && payload.type && payload.type.startsWith('__rnUpdate')) {
|
||||||
const logger = options.logger || (() => {});
|
const logger = options.logger || (() => {});
|
||||||
options.logger = ({ type, data }) => {
|
options.logger = ({ type, data }) => {
|
||||||
logger({ type, data });
|
logger({ type, data });
|
||||||
@@ -286,8 +285,8 @@ export const PushyProvider = ({
|
|||||||
checkUpdate({ extra: { toHash: payload.data } }).then(() => {
|
checkUpdate({ extra: { toHash: payload.data } }).then(() => {
|
||||||
if (updateInfoRef.current && updateInfoRef.current.upToDate) {
|
if (updateInfoRef.current && updateInfoRef.current.upToDate) {
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
'提示',
|
'Info',
|
||||||
'当前尚未检测到更新版本,如果是首次扫码,请等待服务器端生成补丁包后再试(约10秒)',
|
'No update found, please wait 10s for the server to generate the patch package',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
options.logger = logger;
|
options.logger = logger;
|
||||||
@@ -301,7 +300,7 @@ export const PushyProvider = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const parseTestQrCode = useCallback(
|
const parseTestQrCode = useCallback(
|
||||||
(code: string | PushyTestPayload) => {
|
(code: string | UpdateTestPayload) => {
|
||||||
try {
|
try {
|
||||||
const payload = typeof code === 'string' ? JSON.parse(code) : code;
|
const payload = typeof code === 'string' ? JSON.parse(code) : code;
|
||||||
return parseTestPayload(payload);
|
return parseTestPayload(payload);
|
||||||
@@ -335,7 +334,7 @@ export const PushyProvider = ({
|
|||||||
}, [parseTestPayload]);
|
}, [parseTestPayload]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PushyContext.Provider
|
<UpdateContext.Provider
|
||||||
value={{
|
value={{
|
||||||
checkUpdate,
|
checkUpdate,
|
||||||
switchVersion,
|
switchVersion,
|
||||||
@@ -354,6 +353,8 @@ export const PushyProvider = ({
|
|||||||
parseTestQrCode,
|
parseTestQrCode,
|
||||||
}}>
|
}}>
|
||||||
{children}
|
{children}
|
||||||
</PushyContext.Provider>
|
</UpdateContext.Provider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const PushyProvider = UpdateProvider;
|
||||||
|
10
src/type.ts
10
src/type.ts
@@ -44,7 +44,7 @@ export type EventType =
|
|||||||
export interface EventData {
|
export interface EventData {
|
||||||
currentVersion: string;
|
currentVersion: string;
|
||||||
cInfo: {
|
cInfo: {
|
||||||
pushy: string;
|
rnu: string;
|
||||||
rn: string;
|
rn: string;
|
||||||
os: string;
|
os: string;
|
||||||
uuid: string;
|
uuid: string;
|
||||||
@@ -65,15 +65,15 @@ export type UpdateEventsLogger = ({
|
|||||||
data: EventData;
|
data: EventData;
|
||||||
}) => void;
|
}) => void;
|
||||||
|
|
||||||
export interface PushyServerConfig {
|
export interface UpdateServerConfig {
|
||||||
main: string;
|
main: string;
|
||||||
backups?: string[];
|
backups?: string[];
|
||||||
queryUrls?: string[];
|
queryUrls?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PushyOptions {
|
export interface ClientOptions {
|
||||||
appKey: string;
|
appKey: string;
|
||||||
server?: PushyServerConfig;
|
server?: UpdateServerConfig;
|
||||||
logger?: UpdateEventsLogger;
|
logger?: UpdateEventsLogger;
|
||||||
updateStrategy?:
|
updateStrategy?:
|
||||||
| 'alwaysAlert'
|
| 'alwaysAlert'
|
||||||
@@ -90,7 +90,7 @@ export interface PushyOptions {
|
|||||||
beforeDownloadUpdate?: (info: CheckResult) => Promise<boolean>;
|
beforeDownloadUpdate?: (info: CheckResult) => Promise<boolean>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PushyTestPayload {
|
export interface UpdateTestPayload {
|
||||||
type: '__rnPushyVersionHash' | string | null;
|
type: '__rnPushyVersionHash' | string | null;
|
||||||
data: any;
|
data: any;
|
||||||
}
|
}
|
||||||
|
22
src/utils.ts
22
src/utils.ts
@@ -1,7 +1,7 @@
|
|||||||
import { Platform } from 'react-native';
|
import { Platform } from 'react-native';
|
||||||
|
|
||||||
export function log(...args: any[]) {
|
export function log(...args: any[]) {
|
||||||
console.log('pushy: ', ...args);
|
console.log('react-native-update: ', ...args);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function promiseAny<T>(promises: Promise<T>[]) {
|
export function promiseAny<T>(promises: Promise<T>[]) {
|
||||||
@@ -84,3 +84,23 @@ export const testUrls = async (urls?: string[]) => {
|
|||||||
log('all ping failed, use first url:', urls[0]);
|
log('all ping failed, use first url:', urls[0]);
|
||||||
return urls[0];
|
return urls[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const assertWeb = () => {
|
||||||
|
if (Platform.OS === 'web') {
|
||||||
|
console.warn(
|
||||||
|
'react-native-update does not support the Web platform and will not perform any operations',
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const assertDev = (matter: string) => {
|
||||||
|
if (__DEV__) {
|
||||||
|
console.warn(
|
||||||
|
`${matter} is not supported in development environment; no action taken.`,
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
Reference in New Issue
Block a user