Add app source and tests

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
alvocool
2026-10-11 10:15:30 +03:00
parent 7e246255c2
commit 38881d1fe1
135 changed files with 21057 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
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<LogLine> get buildLogs;
Stream<List<DeployStep>> get buildStepStream;
/// Compiles [service]'s project and locates the produced jar.
Future<BuildResult> build(ServiceConfig service);
/// Compiles [service]'s web project and locates its static output directory.
Future<BuildResult> buildWeb(ServiceConfig service);
/// Cancels a build in flight.
void cancelBuild();
/// Reads a local artifact into memory, ready to upload.
Future<Uint8List> readArtifact(String path);
/// True when [path] exists on this machine.
Future<bool> 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);
}