From cd50fd0ae25b83c54c3c44ee346696daa4b3b5cf Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sun, 15 Nov 2026 21:28:19 +0100 Subject: [PATCH] Wrapper imports the passphrase path, not Flutter dart build cli failed: wrapper_server pulled crdt_sync_flutter (dart:ui) through e2e_passphrase_source. The path const moves to a dart-only file. Todo: 656f0d08 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01WzxdWXgrX1QxVjqMiz6KFs --- lib/desktop/wrapper_server.dart | 6 ++---- lib/sync/e2e_passphrase_path.dart | 8 ++++++++ lib/sync/e2e_passphrase_source.dart | 4 ++-- pubspec.yaml | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 lib/sync/e2e_passphrase_path.dart diff --git a/lib/desktop/wrapper_server.dart b/lib/desktop/wrapper_server.dart index 0fd5b3c..9b1319c 100644 --- a/lib/desktop/wrapper_server.dart +++ b/lib/desktop/wrapper_server.dart @@ -7,11 +7,9 @@ import 'package:path/path.dart' as p; import 'package:todo/desktop/static_content_type.dart'; import 'package:todo/desktop/wrapper_image_routes.dart'; -import 'package:todo/sync/e2e_passphrase_source.dart' - show kSyncE2ePassphrasePath; +import 'package:todo/sync/e2e_passphrase_path.dart'; -export 'package:todo/sync/e2e_passphrase_source.dart' - show kSyncE2ePassphrasePath; +export 'package:todo/sync/e2e_passphrase_path.dart'; export 'wrapper_paths.dart'; diff --git a/lib/sync/e2e_passphrase_path.dart b/lib/sync/e2e_passphrase_path.dart new file mode 100644 index 0000000..9e58f7f --- /dev/null +++ b/lib/sync/e2e_passphrase_path.dart @@ -0,0 +1,8 @@ +/// Path of the wrapper's one-shot passphrase route. +/// +/// Kept apart from `e2e_passphrase_source.dart` (which needs Flutter) so the +/// dart-only desktop wrapper can import it; `dart build cli` fails on any +/// transitive `dart:ui`. +library; + +const kSyncE2ePassphrasePath = '/sync-e2e-passphrase'; diff --git a/lib/sync/e2e_passphrase_source.dart b/lib/sync/e2e_passphrase_source.dart index 396dbfc..8705b44 100644 --- a/lib/sync/e2e_passphrase_source.dart +++ b/lib/sync/e2e_passphrase_source.dart @@ -10,9 +10,9 @@ library; import 'package:crdt_sync_flutter/crdt_sync_flutter.dart' show kE2ePassphraseKey, kSecureStorage, saveE2ePassphrase; import 'package:http/http.dart' as http; +import 'package:todo/sync/e2e_passphrase_path.dart'; -/// Path of the wrapper's one-shot passphrase route. -const kSyncE2ePassphrasePath = '/sync-e2e-passphrase'; +export 'package:todo/sync/e2e_passphrase_path.dart'; /// Returns the passphrase, adopting the wrapper's once; null when none. Future readE2ePassphrase({Uri? base, http.Client? client}) async { diff --git a/pubspec.yaml b/pubspec.yaml index 69e4bd6..d8a691a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.87+1 +version: 1.0.88+1 environment: sdk: ^3.12.2