Skip to content

v1.1.0

Choose a tag to compare

@gmpassos gmpassos released this 09 Jun 05:27
· 14 commits to master since this release
c9e6e89

1.1.0

First-class third-party / imperative integration.

  • Imperative install: DartServiceManager.installDescriptor(descriptor, {startNow, force}) installs an already-built executable as a service —
    bypassing package resolution, manifest loading and compilation — with
    caller-supplied arguments, environment and runtime policy.
  • ServiceDescriptor.forCurrentExecutable(...): install the currently
    running program (Platform.resolvedExecutable) as a service, handling the
    JIT (dart <script>) vs AOT-binary distinction.
  • Runtime policy on ServiceDescriptor/ServiceInstallConfig and the
    dart_services: manifest: workingDirectory, restart
    (always/on-failure/never, new RestartPolicy enum), restartDelay,
    autoStart, stopTimeout, environmentFile. All default to the previous
    behaviour, so existing units/plists render unchanged.
  • Manifest executable: as an alternative to script: — install a
    pre-built binary without compiling.
  • Environment-file support (systemd EnvironmentFile=); drivers expose
    supportsEnvironmentFile and reject it where unsupported (launchd, Windows).
  • render() / --dry-run: drivers can render the native definition
    (systemd unit, launchd plist, sc command) without touching the system;
    DartServiceManager.renderDefinition(...) and install --executable --dry-run expose it.
  • reconfigure(descriptor): re-apply a changed descriptor, preserving the
    running state.
  • The registry now persists the full descriptor (args/env/description/policy),
    so lifecycle, listing and reconfigure work without a manifest. Registries
    written by 1.0.x still load.
  • CLI: install --executable <path>, --start-now, --dry-run,
    --restart, --restart-delay, --working-dir, --env-file,
    --no-auto-start, --force.
  • Windows services now configure SCM failure/restart actions to match the
    restart policy.

Potentially breaking: two new sealed exception subclasses —
PermissionDeniedException and ServiceAlreadyInstalledException — are added
to ServiceManagerException. Code that does an exhaustive switch over the
exception hierarchy must handle the new cases.

1.0.1

  • Add a Shelf HTTP server example (example/shelf_server) showing a real web
    server declared as a service and managed end-to-end, with graceful
    SIGTERM/SIGINT shutdown.
  • Document package-wide operations in the README: a bare package reference
    (no :service) targets every service of the package — including
    uninstall — and uninstalling deletes each service's cached native binary.