diff --git a/contact/pubspec.lock b/contact/pubspec.lock index 7f1ceef77..6a28553b5 100644 --- a/contact/pubspec.lock +++ b/contact/pubspec.lock @@ -545,10 +545,10 @@ packages: dependency: transitive description: name: flutter_svg - sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + sha256: d44bf546b13025ec7353091516f6881f1d4c633993cb109c3916c3a0159dadf1 url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.1.0" flutter_test: dependency: "direct dev" description: flutter @@ -1233,26 +1233,26 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43" + sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.19" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7" + sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.13" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26 + sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331" url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.17" vector_math: dependency: transitive description: @@ -1334,5 +1334,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.5.0 <4.0.0" - flutter: ">=3.24.0" + dart: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/core/pubspec.lock b/core/pubspec.lock index 0412fdd19..27dc73152 100644 --- a/core/pubspec.lock +++ b/core/pubspec.lock @@ -538,10 +538,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + sha256: d44bf546b13025ec7353091516f6881f1d4c633993cb109c3916c3a0159dadf1 url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.1.0" flutter_test: dependency: "direct dev" description: flutter @@ -1170,26 +1170,26 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43" + sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.19" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7" + sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.13" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26 + sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331" url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.17" vector_math: dependency: transitive description: @@ -1271,5 +1271,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.5.0 <4.0.0" - flutter: ">=3.24.0" + dart: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/core/pubspec.yaml b/core/pubspec.yaml index 0c781e258..beec847b0 100644 --- a/core/pubspec.yaml +++ b/core/pubspec.yaml @@ -39,7 +39,7 @@ dependencies: ### Dependencies from pub.dev ### cupertino_icons: 1.0.6 - flutter_svg: 2.0.9 + flutter_svg: 2.1.0 dio: 5.0.0 diff --git a/cozy/lib/cozy_config_manager/cozy_config_manager_stub.dart b/cozy/lib/cozy_config_manager/cozy_config_manager_stub.dart index 564a19713..f700e88b3 100644 --- a/cozy/lib/cozy_config_manager/cozy_config_manager_stub.dart +++ b/cozy/lib/cozy_config_manager/cozy_config_manager_stub.dart @@ -1,5 +1,5 @@ class CozyConfigManager { - Future injectCozyScript() async { + Future injectCozyScript(String cozyExternalBridgeVersion) async { throw UnimplementedError('Cannot use injectCozyScript in non-web environment'); } diff --git a/cozy/lib/cozy_config_manager/cozy_config_manager_web.dart b/cozy/lib/cozy_config_manager/cozy_config_manager_web.dart index 83c91cc39..78a766f90 100644 --- a/cozy/lib/cozy_config_manager/cozy_config_manager_web.dart +++ b/cozy/lib/cozy_config_manager/cozy_config_manager_web.dart @@ -5,8 +5,8 @@ import 'package:linagora_design_flutter/cozy_config_manager/cozy_config_manager. class CozyConfigManager { bool? _isInsideCozy; - Future injectCozyScript() async { - await cozy.CozyConfigManager().injectCozyScript(); + Future injectCozyScript(String cozyExternalBridgeVersion) async { + await cozy.CozyConfigManager().injectCozyScript(cozyExternalBridgeVersion); } Future initialize() async { diff --git a/cozy/pubspec.lock b/cozy/pubspec.lock index 6f6f68ee8..2c6aedd31 100644 --- a/cozy/pubspec.lock +++ b/cozy/pubspec.lock @@ -1,6 +1,14 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" async: dependency: transitive description: @@ -126,6 +134,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + sha256: cd57f7969b4679317c17af6fd16ee233c1e60a82ed209d8a475c54fd6fd6f845 + url: "https://pub.dev" + source: hosted + version: "2.2.0" flutter_test: dependency: "direct dev" description: flutter @@ -136,6 +152,22 @@ packages: description: flutter source: sdk version: "0.0.0" + http: + dependency: transitive + description: + name: http + sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" + url: "https://pub.dev" + source: hosted + version: "1.4.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" leak_tracker: dependency: transitive description: @@ -165,7 +197,7 @@ packages: description: path: "." ref: master - resolved-ref: "083cbf597cce8bedcc7ccda76a0c49eb06a71e9e" + resolved-ref: "17879a3de917152eb5473058ef2c3302d2c01f3e" url: "https://github.com/linagora/linagora-design-flutter.git" source: git version: "0.0.1" @@ -209,6 +241,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.0" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.dev" + source: hosted + version: "1.1.0" permission_handler_platform_interface: dependency: transitive description: @@ -217,6 +257,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.12.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" photo_manager: dependency: transitive description: @@ -294,6 +342,38 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.3" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 + url: "https://pub.dev" + source: hosted + version: "1.1.19" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" + url: "https://pub.dev" + source: hosted + version: "1.1.13" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331" + url: "https://pub.dev" + source: hosted + version: "1.1.17" vector_math: dependency: transitive description: @@ -310,6 +390,22 @@ packages: url: "https://pub.dev" source: hosted version: "14.3.0" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" sdks: - dart: ">=3.5.4 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" + dart: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/docs/adr/0061-cozy-integration-set-up.md b/docs/adr/0061-cozy-integration-set-up.md index 2131c5029..75511a8cb 100644 --- a/docs/adr/0061-cozy-integration-set-up.md +++ b/docs/adr/0061-cozy-integration-set-up.md @@ -68,7 +68,7 @@ cozy-stack instances add tmail.localhost:8080 --passphrase cozy --apps home,stor - Apply patchs/cozy-dev-config.patch - Edit session url in jmap-dart-client to /jmap/session - isInsideCozy will be `false` if run on localhost, so in cozy_config_web.dart, return true on isInsideCozy -- in `env.file`, COZY_INTEGRATION=true +- in `env.file`, COZY_INTEGRATION=true and COZY_EXTERNAL_BRIDGE_VERSION=x.x.x (where x.x.x is the version of cozy-external-bridge) - `flutter run -d chrome --web-port 2023 --web-browser-flag "--disable-web-security" --profile` 3. Access Cozy diff --git a/env.file b/env.file index 77b662611..9c6b135b6 100644 --- a/env.file +++ b/env.file @@ -8,4 +8,5 @@ IOS_FCM=supported FORWARD_WARNING_MESSAGE= PLATFORM=other WS_ECHO_PING= -COZY_INTEGRATION= \ No newline at end of file +COZY_INTEGRATION= +COZY_EXTERNAL_BRIDGE_VERSION= \ No newline at end of file diff --git a/lib/main/utils/app_config.dart b/lib/main/utils/app_config.dart index 7e7cf3ff2..f22cd5a35 100644 --- a/lib/main/utils/app_config.dart +++ b/lib/main/utils/app_config.dart @@ -75,4 +75,6 @@ class AppConfig { static bool get isWebSocketEchoPingEnabled => dotenv.get('WS_ECHO_PING', fallback: 'false') == 'true'; static bool get isCozyIntegrationEnabled => dotenv.get('COZY_INTEGRATION', fallback: 'false') == 'true'; + + static String get cozyExternalBridgeVersion => dotenv.get('COZY_EXTERNAL_BRIDGE_VERSION', fallback: '0.16.1'); } \ No newline at end of file diff --git a/lib/main/utils/cozy_integration.dart b/lib/main/utils/cozy_integration.dart index e2a78de4b..61082d8e2 100644 --- a/lib/main/utils/cozy_integration.dart +++ b/lib/main/utils/cozy_integration.dart @@ -11,7 +11,7 @@ class CozyIntegration { try { final cozyConfig = CozyConfigManager(); - await cozyConfig.injectCozyScript(); + await cozyConfig.injectCozyScript(AppConfig.cozyExternalBridgeVersion); await cozyConfig.initialize(); } catch (e) { logError('CozyIntegration::integrateCozy:Exception = $e'); diff --git a/model/pubspec.lock b/model/pubspec.lock index 6a29306ca..915ffec9a 100644 --- a/model/pubspec.lock +++ b/model/pubspec.lock @@ -545,10 +545,10 @@ packages: dependency: transitive description: name: flutter_svg - sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + sha256: d44bf546b13025ec7353091516f6881f1d4c633993cb109c3916c3a0159dadf1 url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.1.0" flutter_test: dependency: "direct dev" description: flutter @@ -1210,26 +1210,26 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43" + sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.19" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7" + sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.13" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26 + sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331" url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.17" vector_math: dependency: transitive description: @@ -1311,5 +1311,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.5.0 <4.0.0" - flutter: ">=3.24.0" + dart: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/pubspec.lock b/pubspec.lock index e31ba9f32..452e129f9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1113,10 +1113,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + sha256: d44bf546b13025ec7353091516f6881f1d4c633993cb109c3916c3a0159dadf1 url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.1.0" flutter_test: dependency: "direct dev" description: flutter @@ -1430,7 +1430,7 @@ packages: description: path: "." ref: master - resolved-ref: "083cbf597cce8bedcc7ccda76a0c49eb06a71e9e" + resolved-ref: "17879a3de917152eb5473058ef2c3302d2c01f3e" url: "https://github.com/linagora/linagora-design-flutter.git" source: git version: "0.0.1" @@ -2284,26 +2284,26 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43" + sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.19" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7" + sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.13" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26 + sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331" url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.17" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 9369a27fd..5774fb358 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -118,7 +118,7 @@ dependencies: intl_generator: 0.4.1 - flutter_svg: 2.0.9 + flutter_svg: 2.1.0 dio: 5.0.0