refactor(core): own editor UI and pin verified native releases
Gitea CI / Check code and tests (pull_request) Failing after 8s
Gitea CI / Build Android APK (pull_request) Skipped
Gitea CI / Build Windows x64 app (pull_request) Skipped
Gitea CI / Audit and package Windows x64 (pull_request) Skipped
Gitea CI / Assemble and validate CI artifacts (pull_request) Skipped
Gitea CI / Gitea CI passed (pull_request) Failing after 1s

This commit is contained in:
lingjhf committed 2026-10-12 03:20:29 +08:00
1 parent 796a3852a2
commit 38ca180cf7
354 files changed
+29841 -642

No files matched your search

+22 -2
View File
@@ -63,9 +63,9 @@ dev_dependencies:
for error in boundaries.check(self.root)))
def test_application_cannot_import_sibling_repository_sources(self):
self.write('lib/bridge.dart', "export '../../cutdex_sdk/lib/editor.dart';")
self.write('lib/bridge.dart', "export '../../cutdex_core/lib/editor.dart';")
self.write('integration_test/save_test.dart',
"import '../../cutdex_sdk/packages/project/lib/cutdex_project.dart';")
"import '../../cutdex_core/packages/project/lib/cutdex_project.dart';")
self.assertEqual(len(boundaries.check(self.root)), 2)
def test_application_library_cannot_import_test_or_tool_sources(self):
@@ -101,3 +101,23 @@ dev_dependencies:
const fixture = "import 'package:cutdex_ui/src/fake.dart';";
''')
self.assertEqual(boundaries.check(self.root), [])
def test_application_and_ui_cannot_own_native_media_channels(self):
for path in ('lib/diagnostics.dart', 'packages/cutdex_preview/lib/bridge.dart'):
with self.subTest(path=path):
self.write(path, "const native = MethodChannel('cutdex_runtime');")
self.assertTrue(any('belongs to cutdex_native_flutter transport' in error
for error in boundaries.check(self.root)))
def test_native_event_and_indirect_channel_names_are_rejected(self):
for channel in ('cutdex_runtime', 'cutdex_runtime/sessions/$id'):
with self.subTest(channel=channel):
self.write('lib/bridge.dart', f"const name = '{channel}';")
self.assertEqual(len(boundaries.check(self.root)), 1)
def test_wire_mocks_and_application_channels_remain_host_owned(self):
self.write('test/preview_test.dart', "const native = MethodChannel('cutdex_runtime');")
self.write('lib/window.dart', "const window = MethodChannel('cutdex_native/window');")
self.write('lib/note.dart', "// MethodChannel('cutdex_runtime');\n"
"const message = 'Missing cutdex_runtime plugin';")
self.assertEqual(boundaries.check(self.root), [])