metro/commands/live/live_commands
library
Classes
-
LiveRunAction
-
A built-in action run with
metro live:run <name>.
Functions
-
describeSeededAt(Object? seededAt, {DateTime? now})
→ String
-
seeded 10:42 for a time today, seeded 12 Sep 10:42 for an earlier
day, or not seeded.
-
liveCommandMoved(String name, {LiveRunner? runner})
→ String?
-
The message for
name when it moved, or null when it didn't.
-
liveRunUsage(List<LiveManifestEntry> projectCommands)
→ String
-
The
metro live:run help: the built-in actions, then the project's live
commands from commands.json.
-
liveShellArgumentsError(List<String> rest)
→ String
-
Why
metro live won't take the command in rest, and where that command
runs instead.
-
renderAuth(LiveBlock block, Map<String, Object?> payload, {String? session})
→ void
-
Adds the signed-in sessions of an
auth.show payload to block.
-
renderDeepLink(LiveBlock block, Map<String, Object?> payload, PlatformLinks platform)
→ void
-
Adds the outcome of a
deeplink.open payload to block, stage by
stage, so a link that goes nowhere says which step dropped it.
-
renderDeepLinkSetup(LiveBlock block, Map<String, Object?> payload, PlatformLinks platform)
→ void
-
Adds the
deeplink setup view: what the app does with links, and what
the project's platform config lets in.
-
renderItems(LiveBlock block, Object? items, {required String empty})
→ void
-
Adds a KEY / TYPE / VALUE (/ EXPIRES) table for storage-style
items.
-
renderOtherStates(LiveBlock block, Map<String, Object?> payload, {String target = 'metro live:run data'})
→ void
-
Adds the other Nylo states on screen, and how to look at one, to
block.
-
renderPlatformReach(LiveBlock block, Object? link, PlatformLinks platform)
→ void
-
Warns when the platform wouldn't deliver a link the app just routed.
-
renderRouteChange(LiveBlock block, String path, Map<String, Object?> payload)
→ void
-
Adds the outcome of a
route.push to path to block.
-
renderSeederList(LiveBlock block, String device, Object? payload, {List<String> registered = const [], String restart = 'restart', String seed = 'seed', String rollback = 'seed:rollback'})
→ void
-
Adds the seeders in a
seeders.list payload to block.
-
renderSeedRuns(LiveBlock block, Object? payload, {String rollback = 'seed:rollback', ({String done, String running}) verbs = (running: 'Seeding', done: 'Seeded')})
→ String?
-
Adds each run in a
seeders.run payload to block: its changes, its
messages and how it ended. After seeding, it ends with how to undo it
with rollback.
-
renderSnapshotPreview(LiveBlock block, String device, LiveSnapshot snapshot, {String export = 'export'})
→ void
-
Adds the storage and Backpack tables of
snapshot from device to
block, ending with how to save it with export.
-
renderSnapshotWarnings(LiveBlock block, LiveSnapshot snapshot)
→ void
-
Adds what the app left out of
snapshot, keys that look like
credentials, and a size warning to block.
-
renderStateData(LiveBlock block, Map<String, Object?> payload, {List<LiveStateField>? fields, String? unavailable, bool full = false, String target = 'metro live:run data'})
→ void
-
Adds the
data view of a state.data payload to block: what the page
is, the data it was opened with, and the fields its state declares.
-
renderStateFields(LiveBlock block, List<LiveStateField> fields, {bool full = false})
→ void
-
Adds a
fields section for the fields of a state to block.
-
renderStatus(LiveBlock block, String device, Map<String, Object?> status)
→ void
-
Adds the
live:status view of status for device to block.
-
renderStoredValue(LiveBlock block, String key, Map<String, Object?> payload, {required String missing})
→ void
-
Adds the whole value the app holds for
key to block, untruncated.
-
resolveLiveAppCommand(String name, List<LiveManifestEntry> entries)
→ String?
-
The full name of the project live command
name refers to: an exact
category:name, or a bare name that only one command in entries has.
-
runLiveShellCommand(String name, List<String> arguments, LiveRunner runner)
→ Future<int?>
-
Runs the
metro live command name with arguments on runner's
session and returns its exit code.
-
splitLiveRunArguments(List<String> arguments)
→ ({List<String> arguments, String? name, String? stoppedAt})
-
Splits
metro live:run arguments into the command name and everything/// Splits metro live:run arguments into the command name and everything
else, keeping the shared live flags (wherever they appear) in arguments.