# 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.
FileNameWithoutExtension returns a filename with its extension stripped.
GetIgnoredFiles reads the .fastlyignore file line-by-line and expands the glob pattern into a map containing all files it matches.
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.
NewHashsumCommand returns a usable command registered under the parent.
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.
# Constants
AsCompilation is a language specific compilation target that converts the language code into a Wasm binary.
AsCompilationURL is the official assemblyscript package URL.
AsDefaultBuildCommand is a build command compiled into the CLI binary so it can be used as a fallback for customer's who have an existing C@E project and are simply upgrading their CLI version and might not be familiar with the changes in the 4.0.0 release with regards to how build logic has moved to the fastly.toml manifest.
AsSDK is the required Compute@Edge SDK.
AsSourceDirectory represents the source code directory.
CustomPostBuildScriptMessage is the message displayed to a user when there is a custom post build script.
GoCompilation is a language specific compilation target that converts the language code into a Wasm binary.
GoCompilationTargetCommand is the shell command for returning the tinygo version.
GoCompilationURL is the official TinyGo website URL.
GoDefaultBuildCommand is a build command compiled into the CLI binary so it can be used as a fallback for customer's who have an existing C@E project and are simply upgrading their CLI version and might not be familiar with the changes in the 4.0.0 release with regards to how build logic has moved to the fastly.toml manifest.
GoInstaller is the command used to install the dependencies defined within the Go language manifest.
GoManifest is the manifest file for defining project configuration.
GoManifestRemediation is a error remediation message for a missing manifest.
GoSDK is the required Compute@Edge SDK.
GoSourceDirectory represents the source code directory.
GoToolchain is the executable responsible for managing dependencies.
GoToolchainURL is the official Go website URL.
GoToolchainVersionCommand is the shell command for returning the go version.
IgnoreFilePath is the filepath name of the Fastly ignore file.
JsCompilation is a language specific compilation target that converts the language code into a Wasm binary.
JsCompilationCommandRemediation is the command to execute to fix the missing compilation target.
JsCompilationURL is the official Fastly C@E JS runtime package URL.
JsDefaultBuildCommand is a build command compiled into the CLI binary so it can be used as a fallback for customer's who have an existing C@E project and are simply upgrading their CLI version and might not be familiar with the changes in the 4.0.0 release with regards to how build logic has moved to the fastly.toml manifest.
JsDefaultBuildCommandForWebpack is a build command compiled into the CLI binary so it can be used as a fallback for customer's who have an existing C@E project using the 'default' JS Starter Kit, and are simply upgrading their CLI version and might not be familiar with the changes in the 4.0.0 release with regards to how build logic has moved to the fastly.toml manifest.
JsInstaller is the command used to install the dependencies defined within the Js language manifest.
JsManifest is the manifest file for defining project configuration.
JsManifestRemediation is a error remediation message for a missing manifest.
JsSDK is the required Compute@Edge SDK.
JsSourceDirectory represents the source code directory.
JsToolchain is the executable responsible for managing dependencies.
JsToolchainURL is the official JS website URL.
RustCompilation is a language specific compilation target that converts the language code into a Wasm binary.
RustCompilationCommandRemediation is the command to execute to fix the missing compilation target.
RustCompilationTargetCommand is the shell command for returning the list of installed compilation targets.
RustCompilationURL is the specification URL for the wasm32-wasi target.
RustDefaultBuildCommand is a build command compiled into the CLI binary so it can be used as a fallback for customer's who have an existing C@E project and are simply upgrading their CLI version and might not be familiar with the changes in the 4.0.0 release with regards to how build logic has moved to the fastly.toml manifest.
RustManifest is the manifest file for defining project configuration.
RustManifestRemediation is a error remediation message for a missing manifest.
RustPackageName is the expected binary crate/package name to be built.
RustSDK is the required Compute@Edge SDK.
RustSourceDirectory represents the source code directory.
RustToolchain is the executable responsible for managing dependencies.
RustToolchainCommandRemediation is the command to execute to fix the toolchain.
RustToolchainURL is the official Rust website URL.
RustToolchainVersionCommand is the shell command for returning the Rust version.
SDKErrMessageFormat is a format string that can be used by the ToolchainValidator and any other language files that need to implement custom validation.
# Variables
GoConstraints is the set of supported toolchain and compilation versions.
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.
RustConstraints is the set of supported toolchain and compilation versions.
# Structs
AssemblyScript implements a Toolchain for the AssemblyScript language.
BuildCommand produces a deployable artifact from files on the local disk.
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.
HashsumCommand produces a deployable artifact from files on the local disk.
InitCommand initializes a Compute@Edge project package on the local machine.
JavaScript implements a Toolchain for the JavaScript language.
JsPackage represents a package.json manifest.
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.
ToolchainValidator represents required tools and files that need to exist.
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.