import 'dart:typed_data'; import '../../../comms/Comms.dart' show LogLine; import '../application/ServiceConfig.dart'; import '../application/StepTracker.dart'; import 'BuildService.dart'; /// Local-side file work: building the artifact to ship, reading it into /// memory, and packing a web build into a single archive. Kept behind an /// interface so a ViewModel reaches it through the same [DataManager] as /// everything else. abstract class ConnectFileStorage { /// True on desktop, where local builds can run. bool get buildSupported; /// Build log lines and step progress, for the console and step list. Stream get buildLogs; Stream> get buildStepStream; /// Compiles [service]'s project and locates the produced jar. Future build(ServiceConfig service); /// Compiles [service]'s web project and locates its static output directory. Future buildWeb(ServiceConfig service); /// Cancels a build in flight. void cancelBuild(); /// Reads a local artifact into memory, ready to upload. Future readArtifact(String path); /// True when [path] exists on this machine. Future artifactExists(String path); /// Packs a directory of static files into gzipped tar bytes, returning the /// archive and the number of files it contains. Runs off the UI isolate. Future<(Uint8List, int)> packageWeb(String directoryPath); }