API / Minn\Ops / Directory

Directory final class

Minn\Ops\Directory · public/minn/src/Minn/Ops/Directory.php · 35 lines

The Minn update service, https://updates.minn.run: the one place the engine asks about anything it does not have yet, so a site running Minn talks to Minn and never to wordpress.org. The service speaks wordpress.org's own endpoints under /v1/ (plugin and theme update checks, directory search and information, translations) with every address a site would fetch pointed back at itself: packages under /v1/download/, icons, screenshots and emoji under /v1/assets/. It also serves Minn's own releases and changelogs. Every request names the engine and the WordPress version it is compatible with (which judges a plugin's "Requires at least"), never the site's address.

Constants and properties

constORIGIN = 'https://updates.minn.run/'
constBASE = 'https://updates.minn.run/v1/'
constPACKAGES = 'https://updates.minn.run/v1/download/'

Where plugin, theme and translation packages download from.

Public

staticurl(string $path): string#

An address on the service: a path under /v1/, such as "plugins/info/1.2/".

staticuserAgent(): string#

How the engine introduces itself: its version, and nothing about the site.

staticpost(Minn\Http $http, string $path, array $form): array#

A form POST to the service (the update checks) over the caller's client, its answer decoded.

$formarray<string, string>
@return array<string, mixed>