Documentation
¶
Index ¶
Constants ¶
const ManifestFile = "manifest.pxf"
ManifestFile is the standard file name of the application metadata manifest. It holds the BelluiApp schema encoded in the textual PXF format.
Variables ¶
This section is empty.
Functions ¶
func Save ¶
Save attempts to write a BelluiApp metadata to the provided writer. The content is encoded in the textual PXF format. If the encoding fails an error will be returned.
func SaveStandard ¶
SaveStandard attempts to save a BelluiApp metadata to the `manifest.pxf` file in the specified dir. If the file cannot be written or encoding fails an error will be returned.
Types ¶
type AdaptiveIcon ¶
type AppDetails ¶
type AppDetails struct {
Icon string
Name, ID string
Version string
Build int
// FileAssociations declares document types that this application can open.
// The packaging metadata emitted from these entries is what asks the OS to
// route matching files to the app (macOS CFBundleDocumentTypes, Android
// ACTION_VIEW intent-filters, Linux desktop MimeType, Windows registry).
FileAssociations []FileAssociation
// URLSchemes declares custom URL schemes (without the "://") that this
// application registers as a handler for, e.g. "myapp" for myapp://open.
URLSchemes []string
}
AppDetails describes the build information, this group may be OS or arch specific
type BelluiApp ¶
type BelluiApp struct {
Website string
Description string
Details AppDetails
AdaptiveIcon *AdaptiveIcon
Development map[string]string
Release map[string]string
Source *AppSource
CanOpen *CanOpen
LinuxAndBSD *LinuxAndBSD
Languages []string
Migrations map[string]bool
}
BelluiApp describes the top level metadata for building a bellui application. It is serialized to and from the manifest.pxf file via the textual PXF format; the wire schema lives in belluiapppb/belluiapp.proto and the mapping in convert.go.
func Load ¶
Load attempts to read a BelluiApp metadata from the provided reader. The content is decoded from the textual PXF format. If this cannot be done an error will be returned.
Unknown fields are silently ignored (DiscardUnknown). A project's manifest.pxf may carry packaging-tool extension fields (e.g. details.ios_usage_descriptions, consumed by the bellui CLI) that this runtime schema does not model. The runtime only reads a handful of known fields (ID, name, version, build, icon), so an unrecognised extension field must not fail the whole load — otherwise the best-effort dev-mode fallback in app.checkLocalMetadata would spam a parse error on every launch (pre-rebrand tracker #1020). The strict, schema-validating loader used by the packaging CLI lives in a separate copy (cmd/bellui/internal/metadata) and is unaffected.
func LoadStandard ¶
LoadStandard attempts to read a BelluiApp metadata from the `manifest.pxf` file in the specified dir. If the file cannot be found or parsed an error will be returned.
type CanOpen ¶
type CanOpen struct {
MimeTypes string
}
CanOpen represents a selection of file types (mime etc) that this application can open.
type FileAssociation ¶
type FileAssociation struct {
// Extensions is the set of file extensions, without the leading dot, that
// belong to this type (e.g. ["txt", "md"]).
Extensions []string
// MimeType is the canonical MIME type for this document type, e.g. "text/plain".
MimeType string
// Description is a human readable name for the type, e.g. "Text Document".
Description string
// Role is the macOS CFBundleTypeRole for the type: one of "Editor", "Viewer",
// "Shell" or "None". Defaults to "Editor" when empty. Ignored on other platforms.
Role string
// Icon is an optional per-type icon file. Ignored where the platform has no
// per-document-type icon slot.
Icon string
}
FileAssociation declares a single document type that the application can open. It maps to per-platform handler metadata emitted by the packaging commands.