Documentation
¶
Index ¶
Constants ¶
const ( ConfigVersionV3 = 3 ConfigVersionV4 = 4 ConfigVersionV6 = 6 )
The --config-version sent to the bundler for each API generation. The value is the generation's number: the bundler writes and reads the azion.config of that generation.
Variables ¶
var (
StagePkgURL = "https://pkg.pr.new/aziontech/bundler/@aziontech/bundler@main"
)
Functions ¶
func ArgsPathArg ¶
ArgsPathArg returns the --args-path option for the bundler, pointing to the args.json inside configDir, or an empty string when no config dir was given (the bundler then falls back to azion/args.json). Quoted for sh -c.
func CheckConfigFile ¶
CheckConfigFile fails early when the given azion.config file does not exist, before any command changes local or remote state. An empty path is valid.
func ConfigFileArg ¶
ConfigFileArg returns the --config-file option for the bundler, or an empty string when no config file was given. The path is single-quoted for sh -c.
func ConfigVersion ¶
func ConfigVersion(v apiversion.Version) int
ConfigVersion is the --config-version of an API generation. An unknown or unresolved generation gets v4's, the CLI's default generation.
Types ¶
type VulcanPkg ¶
type VulcanPkg struct {
Command func(flags, params string, f *cmdutil.Factory) string
CheckVulcanMajor func(currentVersion string, f *cmdutil.Factory, vulcan *VulcanPkg) error
ReadSettings func(string) (token.Settings, error)
}
func For ¶
For returns the bundler for the account's API generation, with the matching --config-version: v3 runs edge-functions, and v4 and v6 the published bundler. Every command that runs the bundler gets it from here, so the config version always follows the account.
func NewVulcanV3 ¶
func NewVulcanV3() *VulcanPkg
NewVulcanV3 runs edge-functions for API v3 projects. Its config version is ConfigVersionV3, but edge-functions@5.3.2 rejects --config-version ("unknown option"), so the flag is not sent; v3SendsConfigVersion turns it on once a v3 package accepts it.
func NewVulcanV6 ¶
func NewVulcanV6() *VulcanPkg
NewVulcanV6 runs the bundler for an API v6 project: the same published bundler as v4 (versionVulcan), with --config-version 6.
Setting AZIONCLI_BUNDLER_V6 to a package spec (for example a pkg.pr.new build) runs that instead, to try a bundler change before it is published.