cloud library

The Dartvel Cloud protocol, shared by the CLI and the Cloud service.

A library of its own rather than part of dartvel.dart: an application never talks to Dartvel Cloud, and nothing in it should arrive in one.

Classes

DVCloudArtifact
A file a build produced, named relative to the target's output directory.
DVCloudBuild
DVCloudBuildSpec
What to build.
DVCloudEvent
One event on a build's stream: a line of its log, or a change of status.
DVCloudEventParser
Reads server-sent events from text arriving in chunks of any size.
DVCloudRefusal
Why the service said no.

Constants

dvCloudApiVersion → const String
The protocol version in every path.
dvCloudArtifactExecutableHeader → const String
Sent with an artifact a worker uploads: the file is executable.
dvCloudArtifactLinkHeader → const String
Sent with an artifact a worker uploads, with an empty body: the artifact is a symbolic link to this target.
dvCloudBuildHeader → const String
The header a build request carries its DVCloudBuildSpec in, as JSON, so the body can be the source archive and nothing else.
dvCloudCredentials → const Map<String, String>
The credentials a project can keep in Dartvel Cloud, and what each is.
dvCloudDefaultUrl → const String
The hosted Dartvel Cloud service, where the CLI sends a cloud request. DARTVEL_CLOUD_URL replaces it, for Dartvel's own staging and tests.
dvCloudHostTargets → const Set<String>
Targets whose output is for the operating system of the worker that built it, so a request may name that system. A web-server build is one executable for the host it was compiled on: a Linux worker cannot make the macOS or Windows server. Every other target has the one worker OS dvCloudTargets names.
dvCloudPlansUrl → const String
Where an account without a plan is sent.
dvCloudProfiles → const List<String>
The profiles dartvel build --profile takes.
dvCloudSimulatorOnlyTargets → const Set<String>
Targets a cloud build makes for a simulator only. A tvOS device build is signed with a team the service does not keep, so it is refused up front.
dvCloudStores → const List<String>
The stores dartvel deploy --store knows, by their protocol name: firebase is Firebase App Distribution, which the command line spells firebase-app-distribution. The names are the wire format, so a worker already running reads a request from either spelling of the command.
dvCloudTargets → const Map<String, DVCloudWorkerOs>
The worker operating system each target builds on.
dvCloudTokenVariable → const String
dvCloudUrlVariable → const String
The environment variables the CLI reads.

Properties

dvCloudCredentialNames → Iterable<String>
no setter

Functions

dvCloudEncodeEvent(DVCloudEvent event) → String
event as server-sent-event text.
dvCloudIsCredentialName(String name) → bool
dvCloudIsProjectName(String name) → bool
A project is named as its pubspec.yaml names the package.
dvCloudSourceExcluded(String path, {String app = '.'}) → bool
Whether path, relative to the project with / separators, stays out of the source a cloud build uploads.
dvCloudSpecHeader(DVCloudBuildSpec spec) → String
The JSON a DVCloudBuildSpec travels in, in the dvCloudBuildHeader.
dvCloudWorkerOs(String target) → DVCloudWorkerOs?