-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into snyk-fix-a7cd6c79d2dc30527e08e5a4d1daa9c3
- Loading branch information
Showing
428 changed files
with
16,593 additions
and
10,096 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
const path = require('path'); | ||
const fs = require('fs'); | ||
const config = require('./.devpkg.json'); | ||
|
||
const extraNodeModules = {}; | ||
const watchFolders = []; | ||
const nodeModulesPaths = []; | ||
|
||
if (config.enabled) { | ||
Object.entries(config.packages).forEach(([pkgName, pkgConfig]) => { | ||
const pkgPath = pkgConfig.path; | ||
const useDevEntryPoint = pkgConfig.useDevEntryPoint ?? false; | ||
const packageJsonPath = path.resolve(pkgPath, 'package.json'); | ||
const packageJson = require(packageJsonPath); | ||
|
||
let entryPoint = ''; | ||
if (useDevEntryPoint && packageJson.devEntryPoint) { | ||
entryPoint = packageJson.devEntryPoint; | ||
} else if (packageJson.main) { | ||
entryPoint = packageJson.main; | ||
} | ||
|
||
if (entryPoint) { | ||
const fullEntryPath = path.resolve(__dirname, pkgPath, entryPoint); | ||
if (fs.existsSync(fullEntryPath)) { | ||
extraNodeModules[pkgName] = fullEntryPath; | ||
const resolvedPkgPath = path.resolve(__dirname, pkgPath); | ||
watchFolders.push(resolvedPkgPath); | ||
nodeModulesPaths.push(resolvedPkgPath); | ||
|
||
console.log( | ||
'\x1b[32m%s\x1b[0m', | ||
`✅ [devpkg] ${pkgName} -> ${extraNodeModules[pkgName]}`, | ||
); | ||
console.log('\x1b[34m%s\x1b[0m', `📝 ${packageJson.description}`); | ||
} else { | ||
console.error( | ||
'\x1b[31m%s\x1b[0m', | ||
`❌ [devpkg] Entry point not found for ${pkgName}: ${fullEntryPath}`, | ||
); | ||
} | ||
} else { | ||
console.error( | ||
'\x1b[31m%s\x1b[0m', | ||
`❌ [devpkg] No entry point specified for ${pkgName}`, | ||
); | ||
} | ||
}); | ||
} | ||
|
||
module.exports = { | ||
extraNodeModules, | ||
watchFolders, | ||
nodeModulesPaths, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"enabled": false, | ||
"packages": { | ||
"@haqq/rn-wallet-providers": { | ||
"path": "../haqq-rn-wallet-providers", | ||
"useDevEntryPoint": true | ||
}, | ||
"@haqq/shared-react-native": { | ||
"path": "../haqq-wallet-shared-react-native", | ||
"useDevEntryPoint": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# DevPkg Documentation | ||
|
||
## Overview | ||
|
||
The DevPkg feature allows developers to override npm packages with local development versions. This is particularly useful when working on multiple interconnected packages simultaneously, enabling real-time testing and debugging of changes across projects. | ||
|
||
## How It Works | ||
|
||
DevPkg modifies the Metro bundler configuration to prioritize specified local package directories over the versions installed in `node_modules`. This allows you to use development versions of packages without publishing them to npm or manually linking them. | ||
|
||
## Configuration | ||
|
||
### .devpkg.json | ||
|
||
This file contains the configuration for DevPkg. Here's an example structure: | ||
|
||
```json | ||
{ | ||
"enabled": true, | ||
"packages": { | ||
"your-local-package": { | ||
"path": "/path/to/your/local/package", | ||
"useDevEntryPoint": true | ||
} | ||
} | ||
} | ||
``` | ||
|
||
### Explanation | ||
|
||
- `enabled`: Enables or disables the package overriding. | ||
- `packages`: A list of packages to override with local development versions. | ||
- `path`: The path to the local package directory. | ||
- `useDevEntryPoint`: If true, uses the `devEntryPoint` specified in the package.json of the local package. Otherwise, uses the `main` field. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,47 @@ | ||
PUSH_NOTIFICATIONS= | ||
# Default chain provider configuration | ||
PROVIDER_NETWORK=https://rpc.eth.testedge2.haqq.network | ||
PROVIDER_WS_NETWORK=wss://rpc-ws.eth.testedge2.haqq.network | ||
NETWORK_EXPLORER=https://explorer.testedge2.haqq.network/ | ||
PROVIDER_CHAIN_ID=54211 | ||
|
||
# Wallet Connect Configuration | ||
WALLET_CONNECT_PROJECT_ID= | ||
WALLET_CONNECT_RELAY_URL= | ||
WALLET_CONNECT_RELAY_URL=wss://relay.walletconnect.org | ||
|
||
SENTRY_DSN="https://<example>@<example>.ingest.sentry.io/<example>" | ||
WEB3AUTH_CLIENT_ID= | ||
# Google Sign In | ||
GOOGLE_SIGNIN_WEB_CLIENT_ID= | ||
|
||
WEB3AUTH_DISCORD_VERIFIER= | ||
WEB3AUTH_DISCORD_CLIENT_ID= | ||
# HAQQ Backend Configuration | ||
HAQQ_BACKEND= | ||
HAQQ_BACKEND_DEV= | ||
|
||
# App ids Configuration | ||
GOOGLE_PLAY_PACKAGE=com.haqq.wallet | ||
APPSTORE_APP_ID=6443843352 | ||
|
||
# CAPTCHA Configuration | ||
# turnstile https://dash.cloudflare.com/login | ||
TURNSTILE_URL= | ||
TURNSTILE_SITEKEY= | ||
# reCAPTCHA https://www.google.com/recaptcha/admin/create | ||
RECAPTCHA_V2_URL= | ||
RECAPTCHA_V2_SITEKEY= | ||
# hCaptcha https://dashboard.hcaptcha.com/login | ||
HCAPTCHA_SITE_KEY= | ||
HCAPTCHA_URL= | ||
|
||
IS_DEVELOPMENT=1 | ||
# End-to-End Testing Configuration | ||
FOR_DETOX=false | ||
DETOX_MILK_PRIVATE_KEY= | ||
DETOX_PROVIDER=https://rpc.eth.testedge2.haqq.network | ||
DETOX_CHAIN_ID=54211 | ||
|
||
GOOGLE_SIGNIN_WEB_CLIENT_ID= | ||
# Other Configuration | ||
MMKV_KEY=YOUR_VERY_SECURE_KEY_FOR_MMKV_ENCRYPTION | ||
STORIES_ENABLED=true | ||
ENVIRONMENT=development | ||
IS_DEVELOPMENT=1 | ||
APP_VERSION=1.0.0 | ||
POSTHOG_API_KEY= | ||
POSTHOG_HOST= | ||
SENTRY_DSN="https://<example>@<example>.ingest.sentry.io/<example>" | ||
ADJUST_TOKEN= | ||
ADJUST_ENVIRONMENT=sandbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,3 +79,4 @@ jobs: | |
secrets: inherit | ||
needs: | ||
- slack_notify | ||
if: ${{ github.ref == 'refs/heads/main' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
053c47c44a04b18bfb66645ea7377543085c9bfc | ||
98910ab395927e5bc70db3058cbca9a50682160c |
22 changes: 22 additions & 0 deletions
22
.yarn/patches/@sentry-react-native-npm-5.33.1-7dbdef21fa.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/sentry.gradle b/sentry.gradle | ||
index 99f2bafdfdb17dc65c2cdf19d40b11e4fc3b1158..23c40f19e3f5f57ed2b7bde3e7cd66f124702f33 100644 | ||
--- a/sentry.gradle | ||
+++ b/sentry.gradle | ||
@@ -162,7 +162,7 @@ gradle.projectsEvaluated { | ||
|
||
def resolvedCliPackage = null | ||
try { | ||
- resolvedCliPackage = new File(["node", "--print", "require.resolve('@sentry/cli/package.json')"].execute(null, rootDir).text.trim()).getParentFile(); | ||
+ resolvedCliPackage = new File("$reactRoot/node_modules/@sentry/react-native/package.json").getParentFile(); | ||
} catch (Throwable ignored) {} | ||
def cliPackage = resolvedCliPackage != null && resolvedCliPackage.exists() ? resolvedCliPackage.getAbsolutePath() : "$reactRoot/node_modules/@sentry/cli" | ||
def cliExecutable = sentryProps.get("cli.executable", "$cliPackage/bin/sentry-cli") | ||
@@ -290,7 +290,7 @@ gradle.projectsEvaluated { | ||
def resolveSentryReactNativeSDKPath(reactRoot) { | ||
def resolvedSentryPath = null | ||
try { | ||
- resolvedSentryPath = new File(["node", "--print", "require.resolve('@sentry/react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile(); | ||
+ resolvedSentryPath = new File("$reactRoot/node_modules/@sentry/react-native/package.json").getParentFile(); | ||
} catch (Throwable ignored) {} // if the resolve fails we fallback to the default path | ||
def sentryPackage = resolvedSentryPath != null && resolvedSentryPath.exists() ? resolvedSentryPath.getAbsolutePath() : "$reactRoot/node_modules/@sentry/react-native" | ||
return sentryPackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.