Skip to content

Commit

Permalink
chore: [SIW-769] Integrate proximity manager (#5347)
Browse files Browse the repository at this point in the history
## Short description
This PR add `io-react-native-proximity` integration. 
https://github.com/pagopa/io-react-native-proximity

Depends on: #5343

---------

Co-authored-by: Mario Perrotta <mario.perrotta@pagopa.it>
  • Loading branch information
grausof and hevelius committed Dec 19, 2023
1 parent 843b4b7 commit 8feb31f
Show file tree
Hide file tree
Showing 6 changed files with 209 additions and 11 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
import "@pagopa/react-native-nodelibs/globals";
import "react-native-get-random-values";
import "text-encoding-polyfill";
import {
AlertStatic as Alert,
AppRegistry,
Expand Down
12 changes: 12 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ PODS:
- React-Core
- pagopa-io-react-native-login-utils (0.2.0):
- React-Core
- pagopa-io-react-native-proximity (0.1.6):
- React-Core
- PromisesObjC (2.0.0)
- Protobuf (3.19.1)
- RCT-Folly (2021.06.28.00-v2):
Expand Down Expand Up @@ -375,6 +377,8 @@ PODS:
- glog
- react-native-background-timer (2.1.1):
- React
- react-native-ble-manager (10.1.5):
- React-Core
- react-native-blob-util (0.15.0):
- React-Core
- react-native-cameraroll (5.6.1):
Expand Down Expand Up @@ -627,6 +631,7 @@ DEPENDENCIES:
- "pagopa-io-react-native-crypto (from `../node_modules/@pagopa/io-react-native-crypto`)"
- "pagopa-io-react-native-jwt (from `../node_modules/@pagopa/io-react-native-jwt`)"
- "pagopa-io-react-native-login-utils (from `../node_modules/@pagopa/io-react-native-login-utils`)"
- "pagopa-io-react-native-proximity (from `../node_modules/@pagopa/io-react-native-proximity`)"
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
Expand All @@ -644,6 +649,7 @@ DEPENDENCIES:
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- react-native-background-timer (from `../node_modules/react-native-background-timer`)
- react-native-ble-manager (from `../node_modules/react-native-ble-manager`)
- react-native-blob-util (from `../node_modules/react-native-blob-util`)
- "react-native-cameraroll (from `../node_modules/@react-native-camera-roll/camera-roll`)"
- react-native-config (from `../node_modules/react-native-config`)
Expand Down Expand Up @@ -770,6 +776,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/@pagopa/io-react-native-jwt"
pagopa-io-react-native-login-utils:
:path: "../node_modules/@pagopa/io-react-native-login-utils"
pagopa-io-react-native-proximity:
:path: "../node_modules/@pagopa/io-react-native-proximity"
RCT-Folly:
:podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
RCTRequired:
Expand Down Expand Up @@ -802,6 +810,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/logger"
react-native-background-timer:
:path: "../node_modules/react-native-background-timer"
react-native-ble-manager:
:path: "../node_modules/react-native-ble-manager"
react-native-blob-util:
:path: "../node_modules/react-native-blob-util"
react-native-cameraroll:
Expand Down Expand Up @@ -952,6 +962,7 @@ SPEC CHECKSUMS:
pagopa-io-react-native-crypto: 644fece16966f2e1ea1f872344ee5a3c6c8761a1
pagopa-io-react-native-jwt: 0b096d1b173e438a963cb81f251a33988b46f5fa
pagopa-io-react-native-login-utils: 929e584c817572ce7a3e41e0c6f96c7990bd314d
pagopa-io-react-native-proximity: 457b07c792ab2e52739abf4a696565132d4b5dda
PromisesObjC: 68159ce6952d93e17b2dfe273b8c40907db5ba58
Protobuf: 3724efa50cb2846d7ccebc8691c574e85fd74471
RCT-Folly: b9d9fe1fc70114b751c076104e52f3b1b5e5a95a
Expand All @@ -970,6 +981,7 @@ SPEC CHECKSUMS:
React-jsinspector: 5b92a5a30e02e1a21802f293cc71e05d887c7378
React-logger: 96d904c5bc87c2660d48e6a36fb2edf65f9cfb11
react-native-background-timer: 1b6e6b4e10f1b74c367a1fdc3c72b67c619b222b
react-native-ble-manager: 09724bad4d06b86a85e0cd7bd97196fecca15e9a
react-native-blob-util: a5d3561045ed98cfb2fb80cbbff600fae0e8edee
react-native-cameraroll: 2f08db1ecc9b73dbc01f89335d6d5179fac2894c
react-native-config: 6502b1879f97ed5ac570a029961fc35ea606cd14
Expand Down
20 changes: 19 additions & 1 deletion metro.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
const { getDefaultConfig } = require("metro-config");
const OriginalResolver = require("metro-resolver");
const path = require("path");

const blacklistedModules = ["module"];

// eslint-disable-next-line functional/immutable-data
module.exports = (async () => {
Expand All @@ -16,9 +20,23 @@ module.exports = (async () => {
},
resolver: {
assetExts: assetExts.filter(ext => ext !== "svg"),
sourceExts: [...withE2ESourceExts, "svg"],
sourceExts: [...withE2ESourceExts, "svg", "cjs"],
extraNodeModules: {
...require("@pagopa/react-native-nodelibs")
},
resolveRequest: (context, moduleName, platform) => {
if (blacklistedModules.includes(moduleName)) {
return {
filePath: path.resolve(__dirname + "/shim-module.js"),
type: "sourceFile"
};
} else {
return OriginalResolver.resolve(
{ ...context, resolveRequest: undefined },
moduleName,
platform
);
}
}
}
};
Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"@pagopa/io-react-native-crypto": "^0.2.1",
"@pagopa/io-react-native-jwt": "1.1.0",
"@pagopa/io-react-native-login-utils": "^0.2.0",
"@pagopa/io-react-native-proximity": "^0.1.6",
"@pagopa/io-react-native-wallet": "^0.11.1",
"@pagopa/react-native-cie": "1.2.0",
"@pagopa/react-native-nodelibs": "^0.1.0",
Expand Down Expand Up @@ -165,6 +166,7 @@
"react-native-android-open-settings": "^1.3.0",
"react-native-background-timer": "2.1.1",
"react-native-barcode-builder": "^2.0.0",
"react-native-ble-manager": "^10.1.5",
"react-native-blob-util": "0.15.0",
"react-native-calendar-events": "2.2.0",
"react-native-config": "^1.4.5",
Expand Down Expand Up @@ -204,6 +206,7 @@
"react-native-splash-screen": "^3.2.0",
"react-native-svg": "^12.3.0",
"react-native-tab-view": "^2.x",
"react-native-uuid": "^2.0.1",
"react-native-view-shot": "3.1.2",
"react-native-vision-camera": "2.15.4",
"react-native-webview": "^11.26.1",
Expand All @@ -227,6 +230,7 @@
"rn-qr-generator": "^1.3.0",
"semver": "^5.7.2",
"sha.js": "^2.4.11",
"text-encoding-polyfill": "^0.6.7",
"tslib": "^1.9.3",
"typed-redux-saga": "^1.4.0",
"typesafe-actions": "4.4.2",
Expand Down Expand Up @@ -324,6 +328,12 @@
"@types/react": "16.7.18",
"@types/prop-types": "15.5.5"
},
"react-native": {
"path": "path-browserify"
},
"browser": {
"path": "path-browserify"
},
"repository": {
"type": "git",
"url": "git+https://github.com/pagopa/io-app.git"
Expand Down
4 changes: 4 additions & 0 deletions shim-module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* File that shims a module. See the file metro.config.js at the root
*/
module.exports = {};
Loading

0 comments on commit 8feb31f

Please sign in to comment.