Compare commits

...

1 Commits

Author SHA1 Message Date
Priyatham Sai chand d71130f947
add shim and crypto libs of node 2022-05-26 22:32:34 +05:30
5 changed files with 10040 additions and 9719 deletions

1
App.js
View File

@ -1,5 +1,6 @@
import 'react-native-gesture-handler';
import React, {useEffect} from 'react';
//import "./shim.js"
import {
SafeArea,
SafeAreaView,

9326
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,19 +14,51 @@
"@react-navigation/bottom-tabs": "^6.2.0",
"@react-navigation/native": "^5.9.4",
"@react-navigation/stack": "^5.14.5",
"@rnmapbox/maps": "rnmapbox/maps",
"@tradle/react-native-http": "^2.0.0",
"assert": "^1.1.1",
"asyncstorage-down": "^4.2.0",
"browserify-zlib": "~0.1.4",
"buffer": "^4.9.1",
"console-browserify": "^1.1.0",
"constants-browserify": "^1.0.0",
"dns.js": "^1.0.1",
"domain-browser": "^1.1.1",
"events": "^1.0.0",
"https-browserify": "~0.0.0",
"ipfs-core": "0.8.0",
"libp2p-crypto": "^0.21.2",
"path-browserify": "0.0.0",
"punycode": "^1.2.4",
"querystring-es3": "~0.2.0",
"react": "17.0.1",
"react-native": "0.64.1",
"react-native-bootsplash": "^4.1.5",
"react-native-crypto": "2.1.0",
"react-native-elements": "^3.4.1",
"react-native-gesture-handler": "^1.10.3",
"react-native-google-places-autocomplete": "^2.4.1",
"react-native-level-fs": "^3.0.0",
"react-native-maps": "^0.31.1",
"react-native-os": "^1.0.1",
"react-native-randombytes": "^3.6.1",
"react-native-reanimated": "^2.2.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "3.3.0",
"react-native-sensitive-info": "^6.0.0-alpha.9",
"react-native-vector-icons": "^8.1.0"
"react-native-tcp": "^3.2.1",
"react-native-udp": "^2.1.0",
"react-native-vector-icons": "^8.1.0",
"react-scripts": "^5.0.1",
"readable-stream": "1.0.33",
"rn-nodeify": "^10.3.0",
"stream": "^0.0.2",
"stream-browserify": "^1.0.0",
"string_decoder": "~0.10.25",
"timers-browserify": "^1.0.1",
"tty-browserify": "0.0.0",
"url": "~0.10.1",
"util": "~0.10.3",
"vm-browserify": "0.0.4"
},
"devDependencies": {
"@babel/core": "^7.17.9",
@ -40,5 +72,57 @@
},
"jest": {
"preset": "react-native"
},
"react-native": {
"crypto": "react-native-crypto",
"console": "console-browserify",
"path": "path-browserify",
"fs": "react-native-level-fs",
"dgram": "react-native-udp",
"os": "react-native-os",
"zlib": "browserify-zlib",
"constants": "constants-browserify",
"dns": "dns.js",
"net": "react-native-tcp",
"domain": "domain-browser",
"http": "@tradle/react-native-http",
"https": "https-browserify",
"querystring": "querystring-es3",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"stream": "stream-browserify",
"timers": "timers-browserify",
"tty": "tty-browserify",
"vm": "vm-browserify",
"tls": false
},
"browser": {
"crypto": "react-native-crypto",
"console": "console-browserify",
"path": "path-browserify",
"fs": "react-native-level-fs",
"dgram": "react-native-udp",
"os": "react-native-os",
"zlib": "browserify-zlib",
"constants": "constants-browserify",
"dns": "dns.js",
"net": "react-native-tcp",
"domain": "domain-browser",
"http": "@tradle/react-native-http",
"https": "https-browserify",
"querystring": "querystring-es3",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"stream": "stream-browserify",
"timers": "timers-browserify",
"tty": "tty-browserify",
"vm": "vm-browserify",
"tls": false
}
}

26
shim.js Normal file
View File

@ -0,0 +1,26 @@
if (typeof __dirname === 'undefined') global.__dirname = '/'
if (typeof __filename === 'undefined') global.__filename = ''
if (typeof process === 'undefined') {
global.process = require('process')
} else {
const bProcess = require('process')
for (var p in bProcess) {
if (!(p in process)) {
process[p] = bProcess[p]
}
}
}
process.browser = false
if (typeof Buffer === 'undefined') global.Buffer = require('buffer').Buffer
// global.location = global.location || { port: 80 }
const isDev = typeof __DEV__ === 'boolean' && __DEV__
process.env['NODE_ENV'] = isDev ? 'development' : 'production'
if (typeof localStorage !== 'undefined') {
localStorage.debug = isDev ? '*' : ''
}
// If using the crypto shim, uncomment the following line to ensure
// crypto is loaded first, so it can populate global.crypto
// require('crypto')

10318
yarn.lock

File diff suppressed because it is too large Load Diff