From c9f9a467394f884a7ab833fd63738c1882c33422 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 21 May 2024 12:39:05 -0400 Subject: [PATCH 1/3] fix(client): update more broken paths --- .eslintrc.json | 30 +++++++++---------- client/src/cordova/android/README.md | 6 ++-- client/src/cordova/apple/README.md | 6 ++-- .../src/www/ui_components/licenses/README.md | 4 +-- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 9bf16f894e..84b98e58a5 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -28,34 +28,34 @@ // Similar to above but for src/www/model, but you can use files from both the // src/www/model and src/www/infrastructure paths. { - "target": "./src/www/model", + "target": "./client/src/wwwmodel", "from": ".", - "except": ["./src/www/model", "./src/infrastructure", "./node_modules"] + "except": ["./client/src/wwwmodel", "./src/infrastructure", "./node_modules"] }, // Prevents the internals of the outline_server_repository from being used publicly in the app. { - "target": "./src/www/app/*.ts", - "from": "./src/www/app/outline_server_repository/server.ts" + "target": "./client/src/wwwapp/*.ts", + "from": "./client/src/wwwapp/outline_server_repository/server.ts" }, { - "target": "./src/www/app/*.ts", - "from": "./src/www/app/outline_server_repository/access_key_serialization.ts" + "target": "./client/src/wwwapp/*.ts", + "from": "./client/src/wwwapp/outline_server_repository/access_key_serialization.ts" }, { - "target": "./src/www/views", - "from": "./src/www/model" + "target": "./client/src/wwwviews", + "from": "./client/src/wwwmodel" }, { - "target": "./src/www/ui_components", - "from": "./src/www/model" + "target": "./client/src/wwwui_components", + "from": "./client/src/wwwmodel" }, { - "target": "./src/www/views", - "from": "./src/www/app" + "target": "./client/src/wwwviews", + "from": "./client/src/wwwapp" }, { - "target": "./src/www/ui_components", - "from": "./src/www/app" + "target": "./client/src/wwwui_components", + "from": "./client/src/wwwapp" } ] } @@ -117,7 +117,7 @@ }, // No need to check browser compatibility for electron files { - "files": ["./src/www/app/electron_main.ts"], + "files": ["./client/src/wwwapp/electron_main.ts"], "rules": { "compat/compat": "off" } diff --git a/client/src/cordova/android/README.md b/client/src/cordova/android/README.md index 7773a5cb02..da858b1e44 100644 --- a/client/src/cordova/android/README.md +++ b/client/src/cordova/android/README.md @@ -23,13 +23,13 @@ Additional requirements for Android: To build for android, run: ```sh - npm run action cordova/build android + npm run action client/src/cordova/build android ``` We also support passing a `--verbose` option on cordova android: ```sh - npm run action cordova/build android -- --verbose + npm run action client/src/cordova/build android -- --verbose ``` Make sure to rebuild after modifying platform dependent files! @@ -48,7 +48,7 @@ A Docker image with all pre-requisites for Android builds is included. To build: ### To install the APK - Connect an Android device and enable [USB debugging](https://developer.android.com/studio/debug/dev-options.html#enable). -- Build the app, with `npm run action cordova/build android` +- Build the app, with `npm run action client/src/cordova/build android` - From the project root, run: `adb install -r -d platforms/android/app/build/outputs/apk//debug/app--debug.apk` ### To debug the web app on Android diff --git a/client/src/cordova/apple/README.md b/client/src/cordova/apple/README.md index 4566bd07a5..a4c92eeb6a 100644 --- a/client/src/cordova/apple/README.md +++ b/client/src/cordova/apple/README.md @@ -16,18 +16,18 @@ You will need: ## Set up XCode project -The XCode project is created by Cordova. To create the project and open it on XCode, use `npm run action cordova/setup $PLATFORM`, then open the XCode workspace file (not the project). +The XCode project is created by Cordova. To create the project and open it on XCode, use `npm run action client/src/cordova/setup $PLATFORM`, then open the XCode workspace file (not the project). For the **iOS** client and **Mac Catalyst** client: ```sh -npm run action cordova/build ios && open ./src/cordova/apple/ios.xcworkspace +npm run action client/src/cordova/build ios && open ./client/src/cordova/apple/ios.xcworkspace ``` For the **macOS** client: ```sh -SENTRY_DSN=https://public@sentry.example.com/1 npm run action cordova/setup macos -- --buildMode=release --versionName=0.0.0-dev && open ./src/cordova/apple/macos.xcworkspace +SENTRY_DSN=https://public@sentry.example.com/1 npm run action client/src/cordova/setup macos -- --buildMode=release --versionName=0.0.0-dev && open ./client/src/cordova/apple/macos.xcworkspace ``` > **Note** On Apple Silicon the macOS web UI is broken in debug mode, so we need to build it in release mode. We are specifying a fake `SENTRY_DSN`, you should specify your own in your releases. diff --git a/client/src/www/ui_components/licenses/README.md b/client/src/www/ui_components/licenses/README.md index dc3d92fa3e..d2ed4a0d8b 100644 --- a/client/src/www/ui_components/licenses/README.md +++ b/client/src/www/ui_components/licenses/README.md @@ -4,7 +4,7 @@ - `cd` to the root of your clone of this repo. - Ensure `node_modules` is up to date by running `npm ci`. -- `npx generate-license-file --input package.json --output src/www/ui_components/licenses/licenses.txt` -- `./src/www/ui_components/licenses/third_party.sh >> ./src/www/ui_components/licenses/licenses.txt` +- `npx generate-license-file --input package.json --output client/src/www/ui_components/licenses/licenses.txt` +- `./client/src/www/ui_components/licenses/third_party.sh >> ./client/src/www/ui_components/licenses/licenses.txt` Done! From 398a7ae6b64d52ea04c8f6e2a49c186d77598a8a Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 21 May 2024 14:41:58 -0400 Subject: [PATCH 2/3] Fix typos. --- .eslintrc.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 84b98e58a5..f02dd3bb44 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -28,34 +28,34 @@ // Similar to above but for src/www/model, but you can use files from both the // src/www/model and src/www/infrastructure paths. { - "target": "./client/src/wwwmodel", + "target": "./client/src/www/model", "from": ".", - "except": ["./client/src/wwwmodel", "./src/infrastructure", "./node_modules"] + "except": ["./client/src/www/model", "./src/infrastructure", "./node_modules"] }, // Prevents the internals of the outline_server_repository from being used publicly in the app. { - "target": "./client/src/wwwapp/*.ts", - "from": "./client/src/wwwapp/outline_server_repository/server.ts" + "target": "./client/src/www/app/*.ts", + "from": "./client/src/www/app/outline_server_repository/server.ts" }, { - "target": "./client/src/wwwapp/*.ts", - "from": "./client/src/wwwapp/outline_server_repository/access_key_serialization.ts" + "target": "./client/src/www/app/*.ts", + "from": "./client/src/www/app/outline_server_repository/access_key_serialization.ts" }, { - "target": "./client/src/wwwviews", - "from": "./client/src/wwwmodel" + "target": "./client/src/www/views", + "from": "./client/src/www/model" }, { - "target": "./client/src/wwwui_components", - "from": "./client/src/wwwmodel" + "target": "./client/src/www/ui_components", + "from": "./client/src/www/model" }, { - "target": "./client/src/wwwviews", - "from": "./client/src/wwwapp" + "target": "./client/src/www/views", + "from": "./client/src/www/app" }, { - "target": "./client/src/wwwui_components", - "from": "./client/src/wwwapp" + "target": "./client/src/www/ui_components", + "from": "./client/src/www/app" } ] } @@ -117,7 +117,7 @@ }, // No need to check browser compatibility for electron files { - "files": ["./client/src/wwwapp/electron_main.ts"], + "files": ["./client/src/www/app/electron_main.ts"], "rules": { "compat/compat": "off" } From 5e69d70a1aeb2808c54ba176c742bc0e1ca722b5 Mon Sep 17 00:00:00 2001 From: sbruens Date: Wed, 22 May 2024 16:11:44 -0400 Subject: [PATCH 3/3] Change `src/infrastructure to `infrastructure`. --- .eslintrc.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index f02dd3bb44..63e9302c16 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -17,20 +17,20 @@ "error", { "zones": [ - // This means that in the src/infrastructure folder, + // This means that in the /infrastructure folder, // you can't import any code, - // with the exception of other files within the src/infrastructure folder. + // with the exception of other files within the /infrastructure folder. { - "target": "./src/infrastructure", + "target": "./infrastructure", "from": ".", - "except": ["./src/infrastructure", "./node_modules"] + "except": ["./infrastructure", "./node_modules"] }, // Similar to above but for src/www/model, but you can use files from both the // src/www/model and src/www/infrastructure paths. { "target": "./client/src/www/model", "from": ".", - "except": ["./client/src/www/model", "./src/infrastructure", "./node_modules"] + "except": ["./client/src/www/model", "./infrastructure", "./node_modules"] }, // Prevents the internals of the outline_server_repository from being used publicly in the app. {