# Packages
Package setup contains logic for managing the creation of resources that are defined within the fastly.toml manifest file.
# Functions
CreatePackageArchive packages build artifacts as a Fastly package, which must be a GZipped Tar archive such as: package-name.tar.gz.
FileNameWithoutExtension returns a filename with its extension stripped.
GetCrateVersionFromMetadata searches for a crate inside a CargoMetadata tree and returns the crates version as a semver.Version.
GetIgnoredFiles reads the .fastlyignore file line-by-line and expands the glob pattern into a map containing all files it matches.
GetLatestCrateVersion fetches all versions of a given Rust crate from the crates.io HTTP API and returns the latest valid semver version.
GetNonIgnoredFiles walks a filepath and returns all files that don't exist in the provided ignore files map.
GetViceroy returns the path to the installed binary.
NewAssemblyScript constructs a new AssemblyScript toolchain.
NewBuildCommand returns a usable command registered under the parent.
NewDeployCommand returns a usable command registered under the parent.
NewGo constructs a new Go toolchain.
NewInitCommand returns a usable command registered under the parent.
NewJavaScript constructs a new JavaScript toolchain.
NewLanguage constructs a new Language from a LangaugeOptions.
NewLanguages returns a list of supported programming languages.
NewOther constructs a new unsupported language instance.
NewPackCommand returns a usable command registered under the parent.
NewPublishCommand returns a usable command registered under the parent.
NewRootCommand returns a new command registered in the parent.
NewRust constructs a new Rust toolchain.
NewServeCommand returns a usable command registered under the parent.
NewUpdateCommand returns a usable command registered under the parent.
NewValidateCommand returns a usable command registered under the parent.
SetPackageName into package.json manifest.
# Constants
ASSourceDirectory represents the source code directory.
CustomBuildScriptMessage is the message displayed to a user when there is a custom build script.
CustomPostBuildScriptMessage is the message displayed to a user when there is a custom post build script.
GoManifestName represents the language file for configuring dependencies.
GoSourceDirectory represents the source code directory (i.e.
IgnoreFilePath is the filepath name of the Fastly ignore file.
JSManifestName represents the language file for configuring dependencies.
JSSourceDirectory represents the source code directory.
JsToolchain represents the default JS toolchain.
RustManifestName represents the language file for configuring dependencies.
RustSourceDirectory represents the source code directory.
# Variables
InstallDir represents the directory where the Viceroy binary should be installed.
Languages is a list of supported language options.
PackageSizeLimit describes the package size limit in bytes (currently 50mb) https://docs.fastly.com/products/compute-at-edge-billing-and-resource-limits#resource-limits.
# Structs
AssemblyScript implements a Toolchain for the AssemblyScript language.
BuildCommand produces a deployable artifact from files on the local disk.
CargoCrateVersion models a Cargo crate version returned by the crates.io API.
CargoCrateVersions models a Cargo crate version returned by the crates.io API.
CargoManifest models the package configuration properties of a Rust Cargo manifest which we are interested in and are read from the Cargo.toml manifest file within the $PWD of the package.
CargoMetadata models information about the workspace members and resolved dependencies of the current package via `cargo metadata` command output.
CargoMetadataPackage models the package structure returned when executing the command `cargo metadata`.
CargoPackage models the package configuration properties of a Rust Cargo package which we are interested in and is embedded within CargoManifest and CargoLock.
DeployCommand deploys an artifact previously produced by build.
Flags represents the flags defined for the command.
Go implements a Toolchain for the TinyGo language.
InitCommand initializes a Compute@Edge project package on the local machine.
JavaScript implements a Toolchain for the JavaScript language.
Language models a Compute@Edge source language.
LanguageOptions models configuration options for a Language.
Other implements a Toolchain for languages without official support.
PackCommand takes a .wasm and builds the required tar/gzip package ready to be uploaded.
PublishCommand produces and deploys an artifact from files on the local disk.
RootCommand is the parent command for all subcommands in this package.
Rust implements a Toolchain for the Rust language.
ServeCommand produces and runs an artifact from files on the local disk.
Shell represents a subprocess shell used by `compute` environment where `[scripts.build]` has been defined within fastly.toml manifest.
UpdateCommand calls the Fastly API to update packages.
ValidateCommand validates a package archive.
# Interfaces
Toolchain abstracts a Compute@Edge source language toolchain.
# Type aliases
FileValidator validates a file.