Skip to content

Commit ab23ad4

Browse files
authored
feat(cat-voices): Enable wasm support for Catalyst Voices (#3622)
* feat: enable wasm support * feat: update vscode launch.json to enable wasm * fix: wasm undefined support * chore: update to CI version with wasm support * fix: undefined in wasm * chore: cleanup * style: spelling * chore: add wasm argument * fix: syntax * chore: switch to master
1 parent 1127fdd commit ab23ad4

File tree

20 files changed

+82
-39
lines changed

20 files changed

+82
-39
lines changed

.vscode/launch.recommended.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"deviceId": "chrome",
1515
"program": "lib/configs/main_web.dart",
1616
"args": [
17+
"--wasm",
1718
"--dart-define",
1819
"SENTRY_DSN=REPLACE_WITH_SENTRY_DSN_URL",
1920
"--web-header",
@@ -34,6 +35,7 @@
3435
"deviceId": "chrome",
3536
"program": "lib/configs/main_web.dart",
3637
"args": [
38+
"--wasm",
3739
"--dart-define",
3840
"SENTRY_DSN=REPLACE_WITH_SENTRY_DSN_URL",
3941
"--web-header",
@@ -52,6 +54,7 @@
5254
"deviceId": "chrome",
5355
"program": "lib/configs/main_web.dart",
5456
"args": [
57+
"--wasm",
5558
"--dart-define",
5659
"SENTRY_DSN=REPLACE_WITH_SENTRY_DSN_URL",
5760
"--web-header",
@@ -70,6 +73,7 @@
7073
"deviceId": "chrome",
7174
"program": "lib/configs/main_web.dart",
7275
"args": [
76+
"--wasm",
7377
"--dart-define",
7478
"SENTRY_DSN=REPLACE_WITH_SENTRY_DSN_URL",
7579
"--web-header",
@@ -88,6 +92,7 @@
8892
"deviceId": "chrome",
8993
"program": "lib/configs/main_web.dart",
9094
"args": [
95+
"--wasm",
9196
"--dart-define",
9297
"SENTRY_DSN=REPLACE_WITH_SENTRY_DSN_URL",
9398
"--web-header",
@@ -106,6 +111,7 @@
106111
"deviceId": "chrome",
107112
"program": "lib/configs/main_web.dart",
108113
"args": [
114+
"--wasm",
109115
"--dart-define",
110116
"SENTRY_DSN=REPLACE_WITH_SENTRY_DSN_URL",
111117
"--web-header",
@@ -124,6 +130,7 @@
124130
"deviceId": "chrome",
125131
"program": "lib/configs/main_web.dart",
126132
"args": [
133+
"--wasm",
127134
"--dart-define",
128135
"SENTRY_DSN=REPLACE_WITH_SENTRY_DSN_URL",
129136
"--web-header",
@@ -142,6 +149,7 @@
142149
"deviceId": "chrome",
143150
"program": "lib/configs/main_web.dart",
144151
"args": [
152+
"--wasm",
145153
"--dart-define",
146154
"SENTRY_DSN=REPLACE_WITH_SENTRY_DSN_URL",
147155
"--web-header",
@@ -160,6 +168,7 @@
160168
"deviceId": "chrome",
161169
"program": "lib/configs/main_web.dart",
162170
"args": [
171+
"--wasm",
163172
"--dart-define",
164173
"SENTRY_DSN=REPLACE_WITH_SENTRY_DSN_URL",
165174
"--web-header",

Earthfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.5.20 AS mdlint-ci
4-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.5.20 AS cspell-ci
5-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.5.20 AS postgresql-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:master AS mdlint-ci
4+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:master AS cspell-ci
5+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:master AS postgresql-ci
66

77
ARG --global REGISTRY="harbor.shared-services.projectcatalyst.io/dockerhub/library"
88
FROM ${REGISTRY}/debian:stable-slim

catalyst-gateway/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.5.21 AS rust-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:master AS rust-ci
44
IMPORT ../ AS repo-ci
55
IMPORT github.com/input-output-hk/catalyst-voices/catalyst-gateway:main AS cat-gateway-main
66

catalyst-gateway/event-db/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# the database and its associated software.
44
VERSION 0.8
55

6-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.5.20 AS postgresql-ci
6+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:master AS postgresql-ci
77

88
# cspell: words
99

catalyst-gateway/tests/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# cspell: words unittests socat
22

33
VERSION 0.8
4-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/spectral:v3.5.20 AS spectral-ci
4+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/spectral:master AS spectral-ci
55
IMPORT .. AS gateway
66

77
# build all necessary docker images required to run `docker-compose.yml` services

catalyst-gateway/tests/api_tests/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/python:v3.5.20 AS python-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/python:master AS python-ci
44
IMPORT github.com/input-output-hk/catalyst-libs/rust:catalyst-signed-doc/v0.0.8 AS cat-libs-rust
55
IMPORT github.com/input-output-hk/catalyst-libs/rust:catalyst-signed-doc/v.0.0.4-fix-earthly-build AS dep-cat-libs-rust
66
IMPORT github.com/input-output-hk/catalyst-storage AS cat-storage

catalyst_voices/Earthfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ VERSION 0.8
22

33
IMPORT ../ AS repo-ci
44
IMPORT ../catalyst-gateway AS catalyst-gateway
5-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.5.20 AS flutter-ci
5+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:master AS flutter-ci
66

77
# repo-catalyst-voices - Creates artifacts of all configuration files,
88
# packages and folders related to catalyst_voices frontend.
@@ -126,8 +126,9 @@ build-web:
126126
--TARGET=lib/configs/main_web.dart \
127127
--UPLOAD_DEBUG_SYMBOLS=$UPLOAD_DEBUG_SYMBOLS \
128128
--SENTRY_ORG='iohk-j4' \
129-
--SENTRY_PROJECT='catalyst-voices'
130-
SAVE ARTIFACT --keep-ts web
129+
--SENTRY_PROJECT='catalyst-voices' \
130+
--WASM=true
131+
SAVE ARTIFACT --keep-ts web AS LOCAL web
131132

132133
package:
133134
FROM harbor.shared-services.projectcatalyst.io/dockerhub/caddy:2.10

catalyst_voices/packages/internal/catalyst_voices_shared/lib/src/browser/catalyst_browser.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ library catalyst_browser;
22

33
export 'package:catalyst_voices_shared/src/browser/browser_stub.dart'
44
if (dart.library.io) 'io_browser.dart'
5-
if (dart.library.html) 'web_browser.dart';
5+
if (dart.library.js_interop) 'web_browser.dart';

catalyst_voices/packages/internal/catalyst_voices_shared/lib/src/platform/form_factor/form_factor.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'package:catalyst_voices_shared/src/platform/form_factor/helpers/stub_form_factor.dart'
22
if (dart.library.io) 'helpers/io_form_factor.dart'
3-
if (dart.library.html) 'helpers/web_form_factor.dart';
3+
if (dart.library.js_interop) 'helpers/web_form_factor.dart';
44

55
/// A form factor of the device the app is executing on.
66
///

catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/Earthfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION 0.8
2-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.5.20 AS flutter-ci
3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/playwright:v3.5.20 AS playwright-ci
2+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:master AS flutter-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/playwright:master AS playwright-ci
44

55
ARG --global REGISTRY="harbor.shared-services.projectcatalyst.io/dockerhub/"
66

0 commit comments

Comments
 (0)