Skip to content

Commit

Permalink
chore: separate suite native to its own packges folder (#5685)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nodonisko authored Jun 26, 2022
1 parent c0eeb4a commit 1cd4f5d
Show file tree
Hide file tree
Showing 223 changed files with 91 additions and 79 deletions.
5 changes: 3 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
packages/**/node_modules
packages/blockchain-link
packages/suite-desktop
packages/suite-native
suite-native/app
suite-native/**/node_modules
node_modules
.git
.git
4 changes: 1 addition & 3 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@

/packages/suite-desktop-api @szymonlesisz @marekrjpolak

/packages/suite-native @matejkriz @Nodonisko

/packages/suite-native-* @Nodonisko @bouchja1 @juriczech
/suite-native @Nodonisko @bouchja1 @juriczech

/packages/suite-storage @matejkriz

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
| [@trezor/suite-data](./packages/suite-data) | suite static data |
| [@trezor/suite-desktop-api](./packages/suite-desktop-api) | API for suite - suite-desktop communication |
| [@trezor/suite-desktop](./packages/suite-desktop) | suite build target for Mac, Win, Linux |
| [@trezor/suite-native](./packages/suite-native) | suite build target for react-native |
| [@trezor/suite-native](./suite-native/app) | suite build target for react-native |
| [@trezor/suite-storage](./packages/suite-storage) | abstract database definition for suite |
| [@trezor/suite-web-landing](./packages/suite-web-landing) | https://suite.trezor.io/ |
| [@trezor/suite-web](./packages/suite-web) | suite build target for web |
Expand All @@ -49,7 +49,7 @@ Before you start make sure you have downloaded and installed [NVM](https://githu
- `yarn`
- `yarn build:libs && yarn workspace @trezor/suite-data msg-system-sign-config`

_To set up your dev environment for a native platform (iOS/Android) follow [these additional steps](https://github.com/trezor/trezor-suite/tree/develop/packages/suite-native#development)._
_To set up your dev environment for a native platform (iOS/Android) follow [these additional steps](https://github.com/trezor/trezor-suite/tree/develop/suite-native/app#development)._

Run a dev build:

Expand Down
2 changes: 1 addition & 1 deletion ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ suite-native build android:
- yarn install --frozen-lockfile --cache-folder .yarn --prefer-offline
- yarn workspace @trezor/suite-data copy-static-files
- yarn workspace @trezor/suite-native build:android
- mv packages/suite-native/android/app/build/outputs/apk/dev/debug/app-dev-debug.apk .
- mv suite-native/app/android/app/build/outputs/apk/dev/debug/app-dev-debug.apk .
artifacts:
expire_in: 7 day
paths:
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packages": ["packages/*", "scripts"],
"packages": ["packages/*", "suite-native/*", "scripts"],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "independent"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"workspaces": {
"packages": [
"packages/*",
"suite-native/*",
"scripts"
],
"nohoist": [
Expand Down
4 changes: 2 additions & 2 deletions packages/connect-plugin-ethereum/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ function messageToHex(string: string) {

describe('typedData', () => {
commonFixtures.tests
.filter(test => test.parameters.metamask_v4_compat)
.forEach(test => {
.filter((test: any) => test.parameters.metamask_v4_compat)
.forEach((test: any) => {
it('typedData to message_hash and domain_separator_hash', () => {
const transformed = transformTypedData(
// @ts-ignore JSON..
Expand Down
9 changes: 0 additions & 9 deletions packages/suite-native-home/tsconfig.json

This file was deleted.

11 changes: 0 additions & 11 deletions packages/suite-native-navigation-root/tsconfig.json

This file was deleted.

9 changes: 0 additions & 9 deletions packages/suite-native-settings/tsconfig.json

This file was deleted.

15 changes: 0 additions & 15 deletions packages/suite-native/tsconfig.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ project.ext.react = [
hermesCommand: "../../../../node_modules/hermes-engine/%OS-BIN%/hermesc",
composeSourceMapsPath: "../../node_modules/react-native/scripts/compose-source-maps.js",
cliPath: "../../../../node_modules/react-native/cli.js",
entryFile: "packages/suite-native/index.js",
entryFile: "suite-native/app/index.js",
reactRoot: "../../../../"
]

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected List<ReactPackage> getPackages() {

@Override
protected String getJSMainModuleName() {
return "packages/suite-native/index";
return "suite-native/app/index";
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected List<ReactPackage> getPackages() {

@Override
protected String getJSMainModuleName() {
return "packages/suite-native/index";
return "suite-native/app/index";
}

@NonNull
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ DEPENDENCIES:
- RNGestureHandler (from `../../../node_modules/react-native-gesture-handler`)
- RNReanimated (from `../../../node_modules/react-native-reanimated`)
- RNScreens (from `../../../node_modules/react-native-screens`)
- trezor-transport-native (from `../../transport-native`)
- trezor-transport-native (from `../../../packages/transport-native`)
- Yoga (from `../../../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
Expand Down Expand Up @@ -598,16 +598,16 @@ EXTERNAL SOURCES:
RNScreens:
:path: "../../../node_modules/react-native-screens"
trezor-transport-native:
:path: "../../transport-native"
:path: "../../../packages/transport-native"
Yoga:
:path: "../../../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
boost: 33822b9202be3240e51605d20431570aa3a6c58e
boost: a7c83b31436843459a1961bfd74b96033dc77234
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5c2288575b9bd33de61ab847e51d0dca167323e7
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
FBLazyVector: a7a655862f6b09625d11c772296b01cd5164b648
FBReactNativeSpec: b78cc13f35883189b62e306e7120e8f837e38bdb
FBReactNativeSpec: d8bedf13ce939219aacc80bbbe2675ce47f67e27
Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
Flipper-DoubleConversion: 3d3d04a078d4f3a1b6c6916587f159dc11f232c4
Expand All @@ -618,11 +618,11 @@ SPEC CHECKSUMS:
Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 46667b3bfd7b7368ebbef149ba7e1d17a61a1b94
glog: 476ee3e89abb49e07f822b48323c51c57124b572
hermes-engine: 84e3af1ea01dd7351ac5d8689cbbea1f9903ffc3
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
RCT-Folly: 97ba718a5f53eedf76d63d51074d5a9ca1245029
RCT-Folly: 4d8508a426467c48885f1151029bc15fa5d7b3b8
RCTRequired: 3e917ea5377751094f38145fdece525aa90545a0
RCTTypeSafety: c43c072a4bd60feb49a9570b0517892b4305c45e
React: 176dd882de001854ced260fad41bb68a31aa4bd0
Expand Down Expand Up @@ -660,4 +660,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 0ea5d86384de3805e047aea50716e04878050b4f

COCOAPODS: 1.11.3
COCOAPODS: 1.11.2
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
/* Begin PBXBuildFile section */
00E356F31AD99517003FC87E /* TrezorSuiteTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* TrezorSuiteTests.m */; };
0C80B921A6F3F58F76C31292 /* libPods-TrezorSuite.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-TrezorSuite.a */; };
0EE2ADD303944494A5030793 /* TTSatoshi-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = EAD24AA6025640BB9F7C7B6B /* TTSatoshi-Medium.otf */; };
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
295C649096E84360A861704B /* TTSatoshi-DemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 7A6230C034DE4586AD564C7F /* TTSatoshi-DemiBold.otf */; };
5C232FC7C0094224A35E1882 /* TTSatoshi-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = E70CFF92AAAE4DEF96F4931E /* TTSatoshi-Regular.otf */; };
5EA58567F7C34D4BB4135E94 /* TTSatoshi-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = A0E40F5120CB4E82AF6C1CA0 /* TTSatoshi-Medium.otf */; };
7699B88040F8A987B510C191 /* libPods-TrezorSuite-TrezorSuiteTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-TrezorSuite-TrezorSuiteTests.a */; };
7F5F35C7F5874548A3B53457 /* TTSatoshi-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 97E677142EC34389AB5C8B52 /* TTSatoshi-Bold.otf */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
AE19C8EA249F4BC29A82736A /* TTSatoshi-DemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8BCDC7530653430F8480AEF1 /* TTSatoshi-DemiBold.otf */; };
B4528AB09CC346C49EB6347E /* TTSatoshi-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 69A6D83EFA4747F2BABDFD0A /* TTSatoshi-Regular.otf */; };
Expand Down Expand Up @@ -45,12 +49,12 @@
5709B34CF0A7D63546082F79 /* Pods-TrezorSuite.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TrezorSuite.release.xcconfig"; path = "Target Support Files/Pods-TrezorSuite/Pods-TrezorSuite.release.xcconfig"; sourceTree = "<group>"; };
5B7EB9410499542E8C5724F5 /* Pods-TrezorSuite-TrezorSuiteTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TrezorSuite-TrezorSuiteTests.debug.xcconfig"; path = "Target Support Files/Pods-TrezorSuite-TrezorSuiteTests/Pods-TrezorSuite-TrezorSuiteTests.debug.xcconfig"; sourceTree = "<group>"; };
5DCACB8F33CDC322A6C60F78 /* libPods-TrezorSuite.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TrezorSuite.a"; sourceTree = BUILT_PRODUCTS_DIR; };
69A6D83EFA4747F2BABDFD0A /* TTSatoshi-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "TTSatoshi-Regular.otf"; path = "../../theme/fonts/TTSatoshi-Regular.otf"; sourceTree = "<group>"; };
7A6230C034DE4586AD564C7F /* TTSatoshi-DemiBold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "TTSatoshi-DemiBold.otf"; path = "../../../packages/theme/fonts/TTSatoshi-DemiBold.otf"; sourceTree = "<group>"; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = TrezorSuite/LaunchScreen.storyboard; sourceTree = "<group>"; };
89C6BE57DB24E9ADA2F236DE /* Pods-TrezorSuite-TrezorSuiteTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TrezorSuite-TrezorSuiteTests.release.xcconfig"; path = "Target Support Files/Pods-TrezorSuite-TrezorSuiteTests/Pods-TrezorSuite-TrezorSuiteTests.release.xcconfig"; sourceTree = "<group>"; };
8BCDC7530653430F8480AEF1 /* TTSatoshi-DemiBold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "TTSatoshi-DemiBold.otf"; path = "../../theme/fonts/TTSatoshi-DemiBold.otf"; sourceTree = "<group>"; };
92AC1F3110C34E2F8264BEAE /* TTSatoshi-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "TTSatoshi-Bold.otf"; path = "../../theme/fonts/TTSatoshi-Bold.otf"; sourceTree = "<group>"; };
A0E40F5120CB4E82AF6C1CA0 /* TTSatoshi-Medium.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "TTSatoshi-Medium.otf"; path = "../../theme/fonts/TTSatoshi-Medium.otf"; sourceTree = "<group>"; };
97E677142EC34389AB5C8B52 /* TTSatoshi-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "TTSatoshi-Bold.otf"; path = "../../../packages/theme/fonts/TTSatoshi-Bold.otf"; sourceTree = "<group>"; };
E70CFF92AAAE4DEF96F4931E /* TTSatoshi-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "TTSatoshi-Regular.otf"; path = "../../../packages/theme/fonts/TTSatoshi-Regular.otf"; sourceTree = "<group>"; };
EAD24AA6025640BB9F7C7B6B /* TTSatoshi-Medium.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "TTSatoshi-Medium.otf"; path = "../../../packages/theme/fonts/TTSatoshi-Medium.otf"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -121,6 +125,10 @@
8BCDC7530653430F8480AEF1 /* TTSatoshi-DemiBold.otf */,
A0E40F5120CB4E82AF6C1CA0 /* TTSatoshi-Medium.otf */,
69A6D83EFA4747F2BABDFD0A /* TTSatoshi-Regular.otf */,
97E677142EC34389AB5C8B52 /* TTSatoshi-Bold.otf */,
7A6230C034DE4586AD564C7F /* TTSatoshi-DemiBold.otf */,
EAD24AA6025640BB9F7C7B6B /* TTSatoshi-Medium.otf */,
E70CFF92AAAE4DEF96F4931E /* TTSatoshi-Regular.otf */,
);
name = Resources;
sourceTree = "<group>";
Expand Down Expand Up @@ -268,6 +276,10 @@
AE19C8EA249F4BC29A82736A /* TTSatoshi-DemiBold.otf in Resources */,
5EA58567F7C34D4BB4135E94 /* TTSatoshi-Medium.otf in Resources */,
B4528AB09CC346C49EB6347E /* TTSatoshi-Regular.otf in Resources */,
7F5F35C7F5874548A3B53457 /* TTSatoshi-Bold.otf in Resources */,
295C649096E84360A861704B /* TTSatoshi-DemiBold.otf in Resources */,
0EE2ADD303944494A5030793 /* TTSatoshi-Medium.otf in Resources */,
5C232FC7C0094224A35E1882 /* TTSatoshi-Regular.otf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"packages/suite-native/index"];
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"suite-native/app/index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</dict>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<string/>
<key>UIAppFonts</key>
<array>
<string>TTSatoshi-Bold.otf</string>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ module.exports = {
ios: {},
android: {},
},
assets: ['../theme/fonts/'],
assets: ['../../packages/theme/fonts/'],
};
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions suite-native/app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": { "outDir": "libDev" },
"references": [
{ "path": "../atoms" },
{ "path": "../navigation-root" },
{ "path": "../../packages/connect" },
{ "path": "../../packages/styles" },
{ "path": "../../packages/theme" },
{
"path": "../../packages/transport-native"
}
],
"include": [".", "**.json"]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions suite-native/atoms/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": { "outDir": "libDev" },
"references": [
{ "path": "../../packages/icons" },
{ "path": "../../packages/styles" },
{ "path": "../../packages/theme" }
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"extends": "../../tsconfig.json",
"compilerOptions": { "outDir": "libDev" },
"references": [
{ "path": "../icons" },
{ "path": "../styles" },
{ "path": "../theme" }
{ "path": "../navigation" },
{ "path": "../atoms" },
{ "path": "../../packages/styles" }
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"extends": "../../tsconfig.json",
"compilerOptions": { "outDir": "libDev" },
"references": [
{ "path": "../suite-native-atoms" },
{ "path": "../icons" },
{ "path": "../styles" }
{ "path": "../navigation" },
{ "path": "../atoms" },
{ "path": "../../packages/styles" }
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions suite-native/navigation-root/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": { "outDir": "libDev" },
"references": [
{ "path": "../module-settings" },
{ "path": "../navigation" },
{ "path": "../atoms" },
{ "path": "../../packages/icons" },
{ "path": "../../packages/styles" }
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions suite-native/navigation/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": { "outDir": "libDev" },
"references": [
{ "path": "../atoms" },
{ "path": "../../packages/icons" },
{ "path": "../../packages/styles" }
]
}

0 comments on commit 1cd4f5d

Please sign in to comment.