From fbac06037679bdabd4d8ea9d2f70196bd4dc09f9 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:57:07 -0400 Subject: [PATCH 1/4] mobile watchers --- x/examples/outline-connectivity-app/README.md | 2 ++ x/examples/outline-connectivity-app/package.json | 4 +++- .../outline-connectivity-app/shared_backend/package.json | 4 +++- .../shared_frontend/pages/connectivity_test/index.ts | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/x/examples/outline-connectivity-app/README.md b/x/examples/outline-connectivity-app/README.md index 10708c19..560f50a0 100644 --- a/x/examples/outline-connectivity-app/README.md +++ b/x/examples/outline-connectivity-app/README.md @@ -113,6 +113,8 @@ If at any point you run into issues during development, try `yarn reset`. `yarn watch` +If you just want to develop ios or android, you can run `yarn watch:ios` or `yarn watch:android` respectively. + ### Build > TODO: how to generate credentials diff --git a/x/examples/outline-connectivity-app/package.json b/x/examples/outline-connectivity-app/package.json index cf26addb..14e3a4cd 100644 --- a/x/examples/outline-connectivity-app/package.json +++ b/x/examples/outline-connectivity-app/package.json @@ -24,7 +24,9 @@ "setup:vscode": "yarn sdks vscode", "shared_backend": "yarn workspace shared_backend", "shared_frontend": "yarn workspace shared_frontend", - "watch": "yarn workspaces foreach -piv run watch" + "watch": "yarn workspaces foreach -piv run watch", + "watch:android": "yarn workspaces foreach -piv run watch:android", + "watch:ios": "yarn workspaces foreach -piv run watch:ios" }, "version": "0.0.0", "workspaces": [ diff --git a/x/examples/outline-connectivity-app/shared_backend/package.json b/x/examples/outline-connectivity-app/shared_backend/package.json index 25acb1e3..6ad59850 100644 --- a/x/examples/outline-connectivity-app/shared_backend/package.json +++ b/x/examples/outline-connectivity-app/shared_backend/package.json @@ -12,6 +12,8 @@ "clean": "rm -rf output", "go": "go", "setup": "yarn build", - "watch": "nodemon --exec 'yarn build' --ext go" + "watch": "nodemon --exec 'yarn build' --ext go", + "watch:android": "nodemon --exec 'yarn build:android' --ext go", + "watch:ios": "nodemon --exec 'yarn build:ios' --ext go" } } diff --git a/x/examples/outline-connectivity-app/shared_frontend/pages/connectivity_test/index.ts b/x/examples/outline-connectivity-app/shared_frontend/pages/connectivity_test/index.ts index 4cb6095a..d43d47fe 100644 --- a/x/examples/outline-connectivity-app/shared_frontend/pages/connectivity_test/index.ts +++ b/x/examples/outline-connectivity-app/shared_frontend/pages/connectivity_test/index.ts @@ -598,7 +598,7 @@ export class ConnectivityTestPage extends LitElement { // TODO: move language definitions to a centralized place return html`
-

${msg("Outline Connectivity Test")}

+

${msg("Outline Connectivity Test!!!!!!!")}

${this.renderResults()}
From 73310fc0fcdeacc337a558a9cc71dbe9e55f6edb Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:58:32 -0400 Subject: [PATCH 2/4] oops lmao --- .../shared_frontend/pages/connectivity_test/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/examples/outline-connectivity-app/shared_frontend/pages/connectivity_test/index.ts b/x/examples/outline-connectivity-app/shared_frontend/pages/connectivity_test/index.ts index d43d47fe..4cb6095a 100644 --- a/x/examples/outline-connectivity-app/shared_frontend/pages/connectivity_test/index.ts +++ b/x/examples/outline-connectivity-app/shared_frontend/pages/connectivity_test/index.ts @@ -598,7 +598,7 @@ export class ConnectivityTestPage extends LitElement { // TODO: move language definitions to a centralized place return html`
-

${msg("Outline Connectivity Test!!!!!!!")}

+

${msg("Outline Connectivity Test")}

${this.renderResults()} From 7533c4dda3e28e215cf8d316cc3ec145b762c7cb Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Thu, 19 Oct 2023 14:13:45 -0400 Subject: [PATCH 3/4] also run frontend server --- .../connectivity/MobileBackendPlugin.kt | 2 +- .../outline-connectivity-app/package.json | 5 +++-- x/examples/outline-connectivity-app/yarn.lock | 21 +++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/x/examples/outline-connectivity-app/app_mobile/android/app/src/main/java/org/getoutline/sdk/example/connectivity/MobileBackendPlugin.kt b/x/examples/outline-connectivity-app/app_mobile/android/app/src/main/java/org/getoutline/sdk/example/connectivity/MobileBackendPlugin.kt index 495030ea..2fe23260 100644 --- a/x/examples/outline-connectivity-app/app_mobile/android/app/src/main/java/org/getoutline/sdk/example/connectivity/MobileBackendPlugin.kt +++ b/x/examples/outline-connectivity-app/app_mobile/android/app/src/main/java/org/getoutline/sdk/example/connectivity/MobileBackendPlugin.kt @@ -31,7 +31,7 @@ class MobileBackendPlugin: Plugin() { response = Json.decodeFromString( Shared_backend.handleRequest( rawInputMessage.toByteArray(Charsets.UTF_8) - ).toString(Charsets.UTF_8) + ).toString(Charsets.UTF_8)C ) } catch (error: Exception) { output.put("error", error.message) diff --git a/x/examples/outline-connectivity-app/package.json b/x/examples/outline-connectivity-app/package.json index 14e3a4cd..1652a117 100644 --- a/x/examples/outline-connectivity-app/package.json +++ b/x/examples/outline-connectivity-app/package.json @@ -6,6 +6,7 @@ "description": "A cross-platform connectivity test app using the Outline SDK", "devDependencies": { "@yarnpkg/sdks": "^3.0.0-rc.48", + "concurrently": "^8.2.2", "typescript": "^5.1.6" }, "engines": { @@ -25,8 +26,8 @@ "shared_backend": "yarn workspace shared_backend", "shared_frontend": "yarn workspace shared_frontend", "watch": "yarn workspaces foreach -piv run watch", - "watch:android": "yarn workspaces foreach -piv run watch:android", - "watch:ios": "yarn workspaces foreach -piv run watch:ios" + "watch:android": "concurrently -n frontend,android 'yarn app_mobile watch:frontend' 'yarn workspaces foreach -piv run watch:android'", + "watch:ios": "concurrently -n frontend,ios 'yarn app_mobile watch:frontend' 'yarn workspaces foreach -piv run watch:ios'" }, "version": "0.0.0", "workspaces": [ diff --git a/x/examples/outline-connectivity-app/yarn.lock b/x/examples/outline-connectivity-app/yarn.lock index fbad2c9e..fef74a6c 100644 --- a/x/examples/outline-connectivity-app/yarn.lock +++ b/x/examples/outline-connectivity-app/yarn.lock @@ -975,6 +975,26 @@ __metadata: languageName: node linkType: hard +"concurrently@npm:^8.2.2": + version: 8.2.2 + resolution: "concurrently@npm:8.2.2" + dependencies: + chalk: ^4.1.2 + date-fns: ^2.30.0 + lodash: ^4.17.21 + rxjs: ^7.8.1 + shell-quote: ^1.8.1 + spawn-command: 0.0.2 + supports-color: ^8.1.1 + tree-kill: ^1.2.2 + yargs: ^17.7.2 + bin: + conc: dist/bin/concurrently.js + concurrently: dist/bin/concurrently.js + checksum: 8ac774df06869773438f1bf91025180c52d5b53139bc86cf47659136c0d97461d0579c515d848d1e945d4e3e0cafe646b2ea18af8d74259b46abddcfe39b2c6c + languageName: node + linkType: hard + "console-control-strings@npm:^1.1.0": version: 1.1.0 resolution: "console-control-strings@npm:1.1.0" @@ -2608,6 +2628,7 @@ __metadata: resolution: "outline_sdk_connectivity_test@workspace:." dependencies: "@yarnpkg/sdks": ^3.0.0-rc.48 + concurrently: ^8.2.2 lit: ^2.7.6 typescript: ^5.1.6 languageName: unknown From d9dfc2145f7ef1daf105096123fe2e4e68369f38 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Thu, 19 Oct 2023 14:20:21 -0400 Subject: [PATCH 4/4] remove typo --- .../getoutline/sdk/example/connectivity/MobileBackendPlugin.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/examples/outline-connectivity-app/app_mobile/android/app/src/main/java/org/getoutline/sdk/example/connectivity/MobileBackendPlugin.kt b/x/examples/outline-connectivity-app/app_mobile/android/app/src/main/java/org/getoutline/sdk/example/connectivity/MobileBackendPlugin.kt index 2fe23260..495030ea 100644 --- a/x/examples/outline-connectivity-app/app_mobile/android/app/src/main/java/org/getoutline/sdk/example/connectivity/MobileBackendPlugin.kt +++ b/x/examples/outline-connectivity-app/app_mobile/android/app/src/main/java/org/getoutline/sdk/example/connectivity/MobileBackendPlugin.kt @@ -31,7 +31,7 @@ class MobileBackendPlugin: Plugin() { response = Json.decodeFromString( Shared_backend.handleRequest( rawInputMessage.toByteArray(Charsets.UTF_8) - ).toString(Charsets.UTF_8)C + ).toString(Charsets.UTF_8) ) } catch (error: Exception) { output.put("error", error.message)