Documentation
¶
Overview ¶
Package bundle provides primitives for bundling apps for portability.
Index ¶
Constants ¶
const ( // AppSourceName is the required name to be used for the source file. This // is needed so we know what we're searching for in the archive. Note, we // rename an app filename from a manifest when we create the bundle to // ensure it can be unpacked. We could get around this if we loaded all // files in the bundle, though we risk abuse with really large bundles. AppSourceName = "app.star" // AppBundleName is the standard name for a created bundle. AppBundleName = "bundle.tar.gz" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppBundle ¶
AppBundle represents the unpacked bundle in our system.
func FromDir ¶
FromDir translates a directory containing an app manifest and source into an AppBundle.
func LoadBundle ¶
LoadBundle loads a compressed archive into an AppBundle.
func (*AppBundle) WriteBundle ¶
WriteBundle writes a compressed archive to the provided writer.
func (*AppBundle) WriteBundleToPath ¶
WriteBundleToPath is a helper to be able to write the bundle to a provided directory.
type WriteOption ¶
type WriteOption any
func WithoutRuntime ¶
func WithoutRuntime() WriteOption
WithoutRuntime is a WriteOption that can be used to write the bundle without using the runtime to determine the files to include in the bundle. Instead, all files in the source FS will be included in the bundle.
This is useful when writing a bundle that is known not to contain any unnecessary files, when loading and rewriting a bundle that was already tree-shaken, or when loading the entire runtime is not possible for performance or security reasons.