extension

package
v0.0.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2025 License: MIT Imports: 54 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FrontendWebpackConfig          = "Resources/app/frontend/build/webpack.config.js"
	FrontendWebpackCJSConfig       = "Resources/app/frontend/build/webpack.config.cjs"
	FrontendEntrypointJS           = "Resources/app/frontend/src/main.js"
	FrontendEntrypointTS           = "Resources/app/frontend/src/main.ts"
	FrontendBaseCSS                = "Resources/app/frontend/src/scss/base.scss"
	AdministrationWebpackConfig    = "Resources/app/administration/build/webpack.config.js"
	AdministrationWebpackCJSConfig = "Resources/app/administration/build/webpack.config.cjs"
	AdministrationEntrypointJS     = "Resources/app/administration/src/main.js"
	AdministrationEntrypointTS     = "Resources/app/administration/src/main.ts"
)
View Source
const (
	TypePlatformApp    = "app"
	TypePlatformPlugin = "plugin"
	TypeHeyFrameBundle = "heyframe-bundle"

	ComposerTypePlugin = "heyframe-platform-plugin"
	ComposerTypeApp    = "heyframe-app"
	ComposerTypeBundle = "heyframe-bundle"
)
View Source
const DevVersionNumber = "6.9.9.9"

Variables

View Source
var ErrPlatformInvalidType = errors.New("invalid composer type")

Functions

func AddZipFiles

func AddZipFiles(w *zip.Writer, basePath, baseInZip string) error

func BuildAssetsForExtensions

func BuildAssetsForExtensions(ctx context.Context, sources []asset.Source, assetConfig AssetBuildConfig) error

func BuildModifier

func BuildModifier(ext Extension, extensionRoot string, config BuildModifierConfig) error

func ChecksumFile

func ChecksumFile(filePath string) (string, error)

ChecksumFile generates a XXH128 checksum for a given file

func CleanupExtensionFolder

func CleanupExtensionFolder(path string, additionalPaths []string) error

func ConvertExtensionsToSources

func ConvertExtensionsToSources(ctx context.Context, extensions []Extension) []asset.Source

func CreateZip

func CreateZip(baseFolder, zipFile string) error

func DumpAndLoadAssetSourcesOfProject

func DumpAndLoadAssetSourcesOfProject(ctx context.Context, project string, cfg *platform.Config) ([]asset.Source, error)

func FindAssetSourcesOfProject

func FindAssetSourcesOfProject(ctx context.Context, project string, cfg *platform.Config) []asset.Source

FindAssetSourcesOfProject This finds all assets without invoking any PHP function and thinks all plugins / apps are active. Optional for CI usage.

func GenerateChecksumJSON

func GenerateChecksumJSON(ctx context.Context, baseFolder string, ext Extension) error

GenerateChecksumJSON creates a checksum.json file in the given folder

func GetConfiguredGoldMark

func GetConfiguredGoldMark() goldmark.Markdown

func GetHeyFrameProjectConstraint

func GetHeyFrameProjectConstraint(project string) (*version.Constraints, error)

func GetHeyFrameVersions

func GetHeyFrameVersions(ctx context.Context) ([]string, error)

func GetPhpVersion

func GetPhpVersion(ctx context.Context, constraint *version.Constraints) (string, error)

func GitCopyFolder

func GitCopyFolder(ctx context.Context, source, target, commitHash string) (string, error)

func InstallNPMDependencies

func InstallNPMDependencies(ctx context.Context, path string, packageJsonData NpmPackage, additionalParams ...string) error

func InstallNodeModulesOfConfigs

func InstallNodeModulesOfConfigs(ctx context.Context, cfgs ExtensionAssetConfig, force bool) ([]string, error)

func LoadSymfonyEnvFile

func LoadSymfonyEnvFile(projectRoot string) error

LoadSymfonyEnvFile loads the Symfony .env file from the project root.

func PlatformPath

func PlatformPath(projectRoot, component, path string) string

func PrepareExtensionForRelease

func PrepareExtensionForRelease(ctx context.Context, sourceRoot, extensionRoot string, ext Extension) error

PrepareExtensionForRelease Remove secret from the manifest. sourceRoot is the original folder (contains also .git).

func PrepareFolderForZipping

func PrepareFolderForZipping(ctx context.Context, path string, ext Extension, extCfg *Config) error

func ResizeExtensionIcon

func ResizeExtensionIcon(ctx context.Context, ext Extension) error

func RunValidation

func RunValidation(ctx context.Context, ext Extension, check validation.Check)

func Unzip

func Unzip(r *zip.Reader, dest string) error

Types

type ActionButton

type ActionButton struct {
	Label  TranslatableString `xml:"label"`
	Action string             `xml:"action,attr"`
	Entity string             `xml:"entity,attr"`
	View   string             `xml:"view,attr"`
	URL    string             `xml:"url,attr"`
}

type Admin

type Admin struct {
	ActionButton []ActionButton `xml:"action-button,omitempty"`
	Module       []Module       `xml:"module,omitempty"`
	MainModule   *MainModule    `xml:"main-module,omitempty"`
	BaseAppUrl   string         `xml:"base-app-url,omitempty"`
}

type AllowedHosts

type AllowedHosts struct {
	Host []string `xml:"host"`
}

type App

type App struct {
	// contains filtered or unexported fields
}

func (App) GetChangelog

func (a App) GetChangelog() (*ExtensionChangelog, error)

func (App) GetComposerName

func (a App) GetComposerName() (string, error)

func (App) GetExtensionConfig

func (a App) GetExtensionConfig() *Config

func (App) GetHeyFrameVersionConstraint

func (a App) GetHeyFrameVersionConstraint() (*version.Constraints, error)

func (App) GetIconPath

func (a App) GetIconPath() string

func (App) GetLicense

func (a App) GetLicense() (string, error)

func (App) GetMetaData

func (a App) GetMetaData() *extensionMetadata

func (App) GetName

func (a App) GetName() (string, error)

func (App) GetPath

func (a App) GetPath() string

func (App) GetResourcesDir

func (a App) GetResourcesDir() string

func (App) GetResourcesDirs

func (a App) GetResourcesDirs() []string

func (App) GetRootDir

func (a App) GetRootDir() string

func (App) GetSourceDirs

func (a App) GetSourceDirs() []string

func (App) GetType

func (App) GetType() string

func (App) GetVersion

func (a App) GetVersion() (*version.Version, error)

func (App) Validate

func (a App) Validate(_ context.Context, check validation.Check)

type AssetBuildConfig

type AssetBuildConfig struct {
	CleanupNodeModules           bool
	DisableAdminBuild            bool
	DisableFrontendBuild         bool
	HeyFrameRoot                 string
	HeyFrameVersion              *version.Constraints
	Browserslist                 string
	SkipExtensionsWithBuildFiles bool
	NPMForceInstall              bool
	ForceExtensionBuild          []string
	ForceAdminBuild              bool
	KeepNodeModules              []string
}

type BuildModifierConfig

type BuildModifierConfig struct {
	AppBackendUrl    string
	AppBackendSecret string
	Version          string
}

type ChecksumJSON

type ChecksumJSON struct {
	Algorithm        string            `json:"algorithm"`
	Hashes           map[string]string `json:"hashes"`
	Version          string            `json:"version"`
	ExtensionVersion string            `json:"extensionVersion"`
}

type Config

type Config struct {
	FileName string `yaml:"-" jsonschema:"-"`
	// Store is the store configuration of the extension.
	Store ConfigStore `yaml:"store,omitempty"`
	// Build is the build configuration of the extension.
	Build ConfigBuild `yaml:"build,omitempty"`
	// Changelog is the changelog configuration of the extension.
	Changelog changelog.Config `yaml:"changelog,omitempty"`
	// Validation is the validation configuration of the extension.
	Validation ConfigValidation `yaml:"validation,omitempty"`
}

func (*Config) Dump

func (c *Config) Dump(dir string) error

type ConfigBuild

type ConfigBuild struct {
	// ExtraBundles can be used to declare additional bundles to be considered for building
	ExtraBundles []ConfigExtraBundle `yaml:"extraBundles,omitempty"`
	// Override the heyframe version constraint for building, can be used to specify the version of the heyframe to use for building
	HeyFrameVersionConstraint string `yaml:"heyframeVersionConstraint,omitempty"`
	// Configuration for zipping
	Zip ConfigBuildZip `yaml:"zip"`
}

type ConfigBuildZip

type ConfigBuildZip struct {
	// Configuration for composer
	Composer ConfigBuildZipComposer `yaml:"composer,omitempty"`
	// Configuration for assets
	Assets ConfigBuildZipAssets `yaml:"assets,omitempty"`
	// Configuration for packing
	Pack ConfigBuildZipPack `yaml:"pack,omitempty"`

	Checksum ConfigBuildZipChecksum `yaml:"checksum,omitempty"`
}

Configuration for zipping.

type ConfigBuildZipAssets

type ConfigBuildZipAssets struct {
	// When enabled, the heyframe-cli build the assets
	Enabled bool `yaml:"enabled"`
	// Commands to run before the assets build
	BeforeHooks []string `yaml:"before_hooks,omitempty"`
	// Commands to run after the assets build
	AfterHooks []string `yaml:"after_hooks,omitempty"`
	// When enabled, builtin esbuild will be used for the admin assets
	EnableESBuildForAdmin bool `yaml:"enable_es_build_for_admin"`
	// When enabled, builtin esbuild will be used for the frontend assets
	EnableESBuildForFrontend bool `yaml:"enable_es_build_for_frontend"`
	// When disabled, builtin sass support will be disabled
	DisableSass bool `yaml:"disable_sass"`
	// When enabled, npm will install only production dependencies
	NpmStrict bool `yaml:"npm_strict"`
}

type ConfigBuildZipChecksum

type ConfigBuildZipChecksum struct {
	// Following files will be excluded from the checksum calculation
	Ignore []string `yaml:"ignore,omitempty"`
}

Configuration for checksum calculation.

type ConfigBuildZipComposer

type ConfigBuildZipComposer struct {
	// When enabled, a vendor folder will be created in the zip build
	Enabled bool `yaml:"enabled"`
	// Commands to run before the composer install
	BeforeHooks []string `yaml:"before_hooks,omitempty"`
	// Commands to run after the composer install
	AfterHooks []string `yaml:"after_hooks,omitempty"`
	// Composer packages to be excluded from the zip build
	ExcludedPackages []string `yaml:"excluded_packages,omitempty"`
}

type ConfigBuildZipPack

type ConfigBuildZipPack struct {
	// Excludes can be used to exclude files from the zip build
	Excludes ConfigBuildZipPackExcludes `yaml:"excludes,omitempty"`
	// Commands to run before the pack
	BeforeHooks []string `yaml:"before_hooks,omitempty"`
}

type ConfigBuildZipPackExcludes

type ConfigBuildZipPackExcludes struct {
	// Paths to exclude from the zip build
	Paths []string `yaml:"paths,omitempty"`
}

type ConfigExtraBundle

type ConfigExtraBundle struct {
	// Path to the bundle, relative from the extension root (src folder)
	Path string `yaml:"path"`
	// Name of the bundle, if empty the folder name of path will be used
	Name string `yaml:"name"`
}

type ConfigStore

type ConfigStore struct {
	// Specifies the visibility in stores.
	Availabilities *[]string `yaml:"availabilities" jsonschema:"enum=German,enum=International"`
	// Specifies the default locale.
	DefaultLocale *string `yaml:"default_locale" jsonschema:"enum=de_DE,enum=en_GB"`
	// Specifies the languages the extension is translated.
	Localizations *[]string `` /* 437-byte string literal not displayed */
	// Specifies the categories.
	Categories *[]string `` /* 833-byte string literal not displayed */
	// Specifies the type of the extension.
	Type *string `yaml:"type" jsonschema:"enum=extension,enum=theme"`
	// Specifies the Path to the icon (256x256 px) for store.
	Icon *string `yaml:"icon"`
	// Specifies whether the extension should automatically be set compatible with HeyFrame bugfix versions.
	AutomaticBugfixVersionCompatibility *bool `yaml:"automatic_bugfix_version_compatibility"`
	// Specifies the meta title of the extension in store.
	MetaTitle ConfigTranslated[string] `yaml:"meta_title" jsonschema:"maxLength=50"`
	// Specifies the meta description of the extension in store.
	MetaDescription ConfigTranslated[string] `yaml:"meta_description" jsonschema:"maxLength=185"`
	// Specifies the description of the extension in store.
	Description ConfigTranslated[string] `yaml:"description"`
	// Installation manual of the extension in store.
	InstallationManual ConfigTranslated[string] `yaml:"installation_manual"`
	// Specifies the tags of the extension.
	Tags ConfigTranslated[[]string] `yaml:"tags,omitempty"`
	// Specifies the links of YouTube-Videos to show or describe the extension.
	Videos ConfigTranslated[[]string] `yaml:"videos,omitempty"`
	// Specifies the highlights of the extension.
	Highlights ConfigTranslated[[]string] `yaml:"highlights,omitempty"`
	// Specifies the features of the extension.
	Features ConfigTranslated[[]string] `yaml:"features"`
	// Specifies Frequently Asked Questions for the extension.
	Faq ConfigTranslated[[]ConfigStoreFaq] `yaml:"faq"`
	// Specifies images for the extension in the store.
	Images *[]ConfigStoreImage `yaml:"images,omitempty"`
	// Specifies the directory where the images are located.
	ImageDirectory *string `yaml:"image_directory,omitempty"`
}

func (*ConfigStore) IsInGermanStore

func (c *ConfigStore) IsInGermanStore() bool

type ConfigStoreFaq

type ConfigStoreFaq struct {
	Question string `yaml:"question"`
	Answer   string `yaml:"answer"`
	Position int    `yaml:"position"`
}

type ConfigStoreImage

type ConfigStoreImage struct {
	// File path to image relative from root of the extension
	File string `yaml:"file"`
	// Specifies whether the image is active in the language.
	Activate ConfigStoreImageActivate `yaml:"activate"`
	// Specifies whether the image is a preview in the language.
	Preview ConfigStoreImagePreview `yaml:"preview"`
	// Specifies the order of the image ascending the given priority.
	Priority int `yaml:"priority"`
}

type ConfigStoreImageActivate

type ConfigStoreImageActivate struct {
	German  bool `yaml:"de"`
	English bool `yaml:"en"`
}

type ConfigStoreImagePreview

type ConfigStoreImagePreview struct {
	German  bool `yaml:"de"`
	English bool `yaml:"en"`
}

type ConfigTranslated

type ConfigTranslated[T Translatable] struct {
	German  *T `yaml:"de,omitempty"`
	English *T `yaml:"en,omitempty"`
}

type ConfigValidation

type ConfigValidation struct {
	// Ignore items from the validation.
	Ignore          ConfigValidationList `yaml:"ignore,omitempty"`
	StoreCompliance bool                 `yaml:"store_compliance,omitempty"`
}

ConfigValidation is used to configure the extension validation.

type ConfigValidationList

type ConfigValidationList []validation.ToolConfigIgnore

func (*ConfigValidationList) Identifiers

func (c *ConfigValidationList) Identifiers() []string
type Cookie struct {
	SnippetName        string `xml:"snippet-name"`
	SnippetDescription string `xml:"snippet-description,omitempty"`
	Cookie             string `xml:"cookie"`
	Value              string `xml:"value,omitempty"`
	Expiration         int    `xml:"expiration,omitempty"`
}

type CookieEntry

type CookieEntry struct {
	Cookie
}

type CookieGroup

type CookieGroup struct {
	SnippetName        string        `xml:"snippet-name"`
	SnippetDescription string        `xml:"snippet-description,omitempty"`
	Entries            []CookieEntry `xml:"entries>cookie,omitempty"`
}

type Cookies

type Cookies struct {
	Cookie []Cookie      `xml:"cookie,omitempty"`
	Group  []CookieGroup `xml:"group,omitempty"`
}

type CustomFieldBase

type CustomFieldBase struct {
	Label              TranslatableString `xml:"label"`
	HelpText           TranslatableString `xml:"help-text,omitempty"`
	Required           bool               `xml:"required,omitempty"`
	Position           int                `xml:"position,omitempty"`
	AllowCustomerWrite bool               `xml:"allow-customer-write,omitempty"`
	AllowCartExpose    bool               `xml:"allow-cart-expose,omitempty"`
}

type CustomFieldBool

type CustomFieldBool struct {
	CustomFieldBase
	XMLName xml.Name `xml:"bool"`
	Name    string   `xml:"name,attr"`
}

type CustomFieldColorPicker

type CustomFieldColorPicker struct {
	CustomFieldBase
	XMLName xml.Name `xml:"color-picker"`
	Name    string   `xml:"name,attr"`
}

type CustomFieldDatetime

type CustomFieldDatetime struct {
	CustomFieldBase
	XMLName xml.Name `xml:"datetime"`
	Name    string   `xml:"name,attr"`
}

type CustomFieldFloat

type CustomFieldFloat struct {
	CustomFieldBase
	XMLName     xml.Name           `xml:"float"`
	Name        string             `xml:"name,attr"`
	Placeholder TranslatableString `xml:"placeholder,omitempty"`
	Steps       float64            `xml:"steps,omitempty"`
	Min         float64            `xml:"min,omitempty"`
	Max         float64            `xml:"max,omitempty"`
}

type CustomFieldInt

type CustomFieldInt struct {
	CustomFieldBase
	XMLName     xml.Name           `xml:"int"`
	Name        string             `xml:"name,attr"`
	Placeholder TranslatableString `xml:"placeholder,omitempty"`
	Steps       int                `xml:"steps,omitempty"`
	Min         int                `xml:"min,omitempty"`
	Max         int                `xml:"max,omitempty"`
}

type CustomFieldList

type CustomFieldList struct {
	Int                []CustomFieldInt                `xml:"int,omitempty"`
	Float              []CustomFieldFloat              `xml:"float,omitempty"`
	Text               []CustomFieldText               `xml:"text,omitempty"`
	TextArea           []CustomFieldTextArea           `xml:"text-area,omitempty"`
	Bool               []CustomFieldBool               `xml:"bool,omitempty"`
	Datetime           []CustomFieldDatetime           `xml:"datetime,omitempty"`
	SingleSelect       []CustomFieldSingleSelect       `xml:"single-select,omitempty"`
	MultiSelect        []CustomFieldMultiSelect        `xml:"multi-select,omitempty"`
	SingleEntitySelect []CustomFieldSingleEntitySelect `xml:"single-entity-select,omitempty"`
	MultiEntitySelect  []CustomFieldMultiEntitySelect  `xml:"multi-entity-select,omitempty"`
	ColorPicker        []CustomFieldColorPicker        `xml:"color-picker,omitempty"`
	MediaSelection     []CustomFieldMedia              `xml:"media-selection,omitempty"`
	Price              []CustomFieldPrice              `xml:"price,omitempty"`
}

type CustomFieldMedia

type CustomFieldMedia struct {
	CustomFieldBase
	XMLName xml.Name `xml:"media-selection"`
	Name    string   `xml:"name,attr"`
}

type CustomFieldMultiEntitySelect

type CustomFieldMultiEntitySelect struct {
	CustomFieldSingleEntitySelect
	XMLName xml.Name `xml:"multi-entity-select"`
}

type CustomFieldMultiSelect

type CustomFieldMultiSelect struct {
	CustomFieldSingleSelect
	XMLName xml.Name `xml:"multi-select"`
}

type CustomFieldPrice

type CustomFieldPrice struct {
	CustomFieldBase
	XMLName xml.Name `xml:"price"`
	Name    string   `xml:"name,attr"`
}

type CustomFieldSet

type CustomFieldSet struct {
	Name            string             `xml:"name"`
	Label           TranslatableString `xml:"label"`
	RelatedEntities EntityList         `xml:"related-entities"`
	Fields          CustomFieldList    `xml:"fields"`
	Global          bool               `xml:"global,attr,omitempty"`
}

type CustomFieldSingleEntitySelect

type CustomFieldSingleEntitySelect struct {
	CustomFieldBase
	XMLName       xml.Name           `xml:"single-entity-select"`
	Name          string             `xml:"name,attr"`
	Placeholder   TranslatableString `xml:"placeholder,omitempty"`
	Entity        string             `xml:"entity"`
	LabelProperty string             `xml:"label-property"`
}

type CustomFieldSingleSelect

type CustomFieldSingleSelect struct {
	CustomFieldBase
	XMLName     xml.Name           `xml:"single-select"`
	Name        string             `xml:"name,attr"`
	Placeholder TranslatableString `xml:"placeholder,omitempty"`
	Options     OptionCollection   `xml:"options"`
}

type CustomFieldText

type CustomFieldText struct {
	CustomFieldBase
	XMLName     xml.Name           `xml:"text"`
	Name        string             `xml:"name,attr"`
	Placeholder TranslatableString `xml:"placeholder,omitempty"`
}

type CustomFieldTextArea

type CustomFieldTextArea struct {
	CustomFieldBase
	XMLName     xml.Name           `xml:"text-area"`
	Name        string             `xml:"name,attr"`
	Placeholder TranslatableString `xml:"placeholder,omitempty"`
}

type CustomFields

type CustomFields struct {
	CustomFieldSet []CustomFieldSet `xml:"custom-field-set,omitempty"`
}

type DeliveryTime

type DeliveryTime struct {
	ID   string             `xml:"id"`
	Name TranslatableString `xml:"name"`
	Min  int                `xml:"min"`
	Max  int                `xml:"max"`
	Unit string             `xml:"unit"`
}

type EntityList

type EntityList struct {
	Product             *struct{} `xml:"product,omitempty"`
	Order               *struct{} `xml:"order,omitempty"`
	Category            *struct{} `xml:"category,omitempty"`
	Customer            *struct{} `xml:"customer,omitempty"`
	CustomerAddress     *struct{} `xml:"customer_address,omitempty"`
	Media               *struct{} `xml:"media,omitempty"`
	ProductManufacturer *struct{} `xml:"product_manufacturer,omitempty"`
	Channel             *struct{} `xml:"sales_channel,omitempty"`
	LandingPage         *struct{} `xml:"landing_page,omitempty"`
	Promotion           *struct{} `xml:"promotion,omitempty"`
	ProductStream       *struct{} `xml:"product_stream,omitempty"`
	PropertyGroup       *struct{} `xml:"property_group,omitempty"`
	ProductReview       *struct{} `xml:"product_review,omitempty"`
	EventAction         *struct{} `xml:"event_action,omitempty"`
	Country             *struct{} `xml:"country,omitempty"`
	Currency            *struct{} `xml:"currency,omitempty"`
	CustomerGroup       *struct{} `xml:"customer_group,omitempty"`
	DeliveryTime        *struct{} `xml:"delivery_time,omitempty"`
	DocumentBaseConfig  *struct{} `xml:"document_base_config,omitempty"`
	Language            *struct{} `xml:"language,omitempty"`
	NumberRange         *struct{} `xml:"number_range,omitempty"`
	PaymentMethod       *struct{} `xml:"payment_method,omitempty"`
	Rule                *struct{} `xml:"rule,omitempty"`
	Salutation          *struct{} `xml:"salutation,omitempty"`
	ShippingMethod      *struct{} `xml:"shipping_method,omitempty"`
	Tax                 *struct{} `xml:"tax,omitempty"`
}

type Extension

type Extension interface {
	GetName() (string, error)
	GetComposerName() (string, error)
	// Deprecated: use the list variation instead
	GetResourcesDir() string
	GetResourcesDirs() []string

	GetIconPath() string

	// GetRootDir Returns the root folder where the code is located plugin -> src, app ->
	GetRootDir() string
	GetSourceDirs() []string
	GetVersion() (*version.Version, error)
	GetLicense() (string, error)
	GetHeyFrameVersionConstraint() (*version.Constraints, error)
	GetType() string
	GetPath() string
	GetChangelog() (*ExtensionChangelog, error)
	GetMetaData() *extensionMetadata
	GetExtensionConfig() *Config
	Validate(context.Context, validation.Check)
}

func FindExtensionsFromProject

func FindExtensionsFromProject(ctx context.Context, project string) []Extension

func GetExtensionByFolder

func GetExtensionByFolder(path string) (Extension, error)

func GetExtensionByZip

func GetExtensionByZip(filePath string) (Extension, error)

type ExtensionAssetConfig

type ExtensionAssetConfig map[string]*ExtensionAssetConfigEntry

func BuildAssetConfigFromExtensions

func BuildAssetConfigFromExtensions(ctx context.Context, sources []asset.Source, assetCfg AssetBuildConfig) ExtensionAssetConfig

func (ExtensionAssetConfig) FilterByAdmin

func (c ExtensionAssetConfig) FilterByAdmin() ExtensionAssetConfig

func (ExtensionAssetConfig) FilterByAdminAndEsBuild

func (c ExtensionAssetConfig) FilterByAdminAndEsBuild(esbuildEnabled bool) ExtensionAssetConfig

func (ExtensionAssetConfig) FilterByFrontendAndEsBuild added in v0.0.3

func (c ExtensionAssetConfig) FilterByFrontendAndEsBuild(esbuildEnabled bool) ExtensionAssetConfig

func (ExtensionAssetConfig) Has

func (c ExtensionAssetConfig) Has(name string) bool

func (ExtensionAssetConfig) Not

func (c ExtensionAssetConfig) Not(extensions []string) ExtensionAssetConfig

func (ExtensionAssetConfig) Only

func (c ExtensionAssetConfig) Only(extensions []string) ExtensionAssetConfig

func (ExtensionAssetConfig) RequiresAdminBuild

func (c ExtensionAssetConfig) RequiresAdminBuild() bool

func (ExtensionAssetConfig) RequiresFrontendBuild added in v0.0.3

func (c ExtensionAssetConfig) RequiresFrontendBuild() bool

func (ExtensionAssetConfig) RequiresHeyFrameRepository

func (c ExtensionAssetConfig) RequiresHeyFrameRepository() bool

type ExtensionAssetConfigAdmin

type ExtensionAssetConfigAdmin struct {
	Path          string  `json:"path"`
	EntryFilePath *string `json:"entryFilePath"`
	Webpack       *string `json:"webpack"`
}

type ExtensionAssetConfigEntry

type ExtensionAssetConfigEntry struct {
	BasePath                 string                       `json:"basePath"`
	Views                    []string                     `json:"views"`
	TechnicalName            string                       `json:"technicalName"`
	Administration           ExtensionAssetConfigAdmin    `json:"administration"`
	Frontend                 ExtensionAssetConfigFrontend `json:"frontend"`
	EnableESBuildForAdmin    bool
	EnableESBuildForFrontend bool
	DisableSass              bool
	NpmStrict                bool
	// contains filtered or unexported fields
}

func (*ExtensionAssetConfigEntry) GetContentHash

func (e *ExtensionAssetConfigEntry) GetContentHash() (string, error)

GetContentHash returns a cached xxhash of all relevant files in the extension

func (*ExtensionAssetConfigEntry) GetOutputAdminPath

func (e *ExtensionAssetConfigEntry) GetOutputAdminPath() string

func (*ExtensionAssetConfigEntry) GetOutputFrontendPath added in v0.0.3

func (e *ExtensionAssetConfigEntry) GetOutputFrontendPath() string

func (*ExtensionAssetConfigEntry) RequiresBuild

func (e *ExtensionAssetConfigEntry) RequiresBuild() bool

type ExtensionAssetConfigFrontend added in v0.0.3

type ExtensionAssetConfigFrontend struct {
	Path          string   `json:"path"`
	EntryFilePath *string  `json:"entryFilePath"`
	Webpack       *string  `json:"webpack"`
	StyleFiles    []string `json:"styleFiles"`
}

type ExtensionChangelog

type ExtensionChangelog struct {
	German     string `json:"german"`
	English    string `json:"english"`
	Changelogs map[string]string
}

type Frontend added in v0.0.3

type Frontend struct {
	TemplateLoadPriority int `xml:"template-load-priority,omitempty"`
}

type Gateways

type Gateways struct {
	Checkout string `xml:"checkout,omitempty"`
}

type HeyFrameBundle

type HeyFrameBundle struct {
	Composer heyframeBundleComposerJson
	// contains filtered or unexported fields
}

func (HeyFrameBundle) GetChangelog

func (p HeyFrameBundle) GetChangelog() (*ExtensionChangelog, error)

func (HeyFrameBundle) GetComposerName

func (p HeyFrameBundle) GetComposerName() (string, error)

func (HeyFrameBundle) GetExtensionConfig

func (p HeyFrameBundle) GetExtensionConfig() *Config

func (HeyFrameBundle) GetHeyFrameVersionConstraint

func (p HeyFrameBundle) GetHeyFrameVersionConstraint() (*version.Constraints, error)

func (HeyFrameBundle) GetIconPath

func (p HeyFrameBundle) GetIconPath() string

func (HeyFrameBundle) GetLicense

func (p HeyFrameBundle) GetLicense() (string, error)

func (HeyFrameBundle) GetMetaData

func (p HeyFrameBundle) GetMetaData() *extensionMetadata

func (HeyFrameBundle) GetName

func (p HeyFrameBundle) GetName() (string, error)

func (HeyFrameBundle) GetPath

func (p HeyFrameBundle) GetPath() string

func (HeyFrameBundle) GetResourcesDir

func (p HeyFrameBundle) GetResourcesDir() string

GetResourcesDir returns the resources directory of the heyframe bundle.

func (HeyFrameBundle) GetResourcesDirs

func (p HeyFrameBundle) GetResourcesDirs() []string

func (HeyFrameBundle) GetRootDir

func (p HeyFrameBundle) GetRootDir() string

GetRootDir returns the src directory of the bundle.

func (HeyFrameBundle) GetSourceDirs

func (p HeyFrameBundle) GetSourceDirs() []string

func (HeyFrameBundle) GetType

func (HeyFrameBundle) GetType() string

func (HeyFrameBundle) GetVersion

func (p HeyFrameBundle) GetVersion() (*version.Version, error)

func (HeyFrameBundle) Validate

func (p HeyFrameBundle) Validate(c context.Context, check validation.Check)

type MainModule

type MainModule struct {
	Source string `xml:"source,attr"`
}

type Manifest

type Manifest struct {
	XMLName         xml.Name         `xml:"manifest"`
	Meta            Meta             `xml:"meta"`
	Setup           *Setup           `xml:"setup,omitempty"`
	Admin           *Admin           `xml:"admin,omitempty"`
	Frontend        *Frontend        `xml:"frontend,omitempty"`
	Permissions     *Permissions     `xml:"permissions,omitempty"`
	AllowedHosts    *AllowedHosts    `xml:"allowed-hosts,omitempty"`
	CustomFields    *CustomFields    `xml:"custom-fields,omitempty"`
	Webhooks        *Webhooks        `xml:"webhooks,omitempty"`
	Cookies         *Cookies         `xml:"cookies,omitempty"`
	Payments        *Payments        `xml:"payments,omitempty"`
	ShippingMethods *ShippingMethods `xml:"shipping-methods,omitempty"`
	RuleConditions  *RuleConditions  `xml:"rule-conditions,omitempty"`
	Tax             *Tax             `xml:"tax,omitempty"`
	Gateways        *Gateways        `xml:"gateways,omitempty"`
}

type Meta

type Meta struct {
	Name                    string             `xml:"name"`
	Label                   TranslatableString `xml:"label"`
	Description             TranslatableString `xml:"description,omitempty"`
	Author                  string             `xml:"author,omitempty"`
	Copyright               string             `xml:"copyright,omitempty"`
	Version                 string             `xml:"version"`
	Icon                    string             `xml:"icon,omitempty"`
	License                 string             `xml:"license"`
	Compatibility           string             `xml:"compatibility,omitempty"`
	Privacy                 string             `xml:"privacy,omitempty"`
	PrivacyPolicyExtensions TranslatableString `xml:"privacyPolicyExtensions,omitempty"`
}

type Module

type Module struct {
	Label    TranslatableString `xml:"label"`
	Source   string             `xml:"source,attr,omitempty"`
	Name     string             `xml:"name,attr"`
	Parent   string             `xml:"parent,attr"`
	Position int                `xml:"position,attr,omitempty"`
}

type NpmPackage

type NpmPackage struct {
	Dependencies    map[string]string `json:"dependencies"`
	DevDependencies map[string]string `json:"devDependencies"`
	Scripts         map[string]string `json:"scripts"`
}

func (NpmPackage) HasScript

func (p NpmPackage) HasScript(name string) bool

type Option

type Option struct {
	Name  TranslatableString `xml:"name"`
	Value string             `xml:"value,attr"`
}

type OptionCollection

type OptionCollection struct {
	Option []Option `xml:"option"`
}

type PaymentMethod

type PaymentMethod struct {
	Identifier   string             `xml:"identifier"`
	Name         TranslatableString `xml:"name"`
	Description  TranslatableString `xml:"description,omitempty"`
	PayURL       string             `xml:"pay-url,omitempty"`
	FinalizeURL  string             `xml:"finalize-url,omitempty"`
	ValidateURL  string             `xml:"validate-url,omitempty"`
	CaptureURL   string             `xml:"capture-url,omitempty"`
	RefundURL    string             `xml:"refund-url,omitempty"`
	RecurringURL string             `xml:"recurring-url,omitempty"`
	Icon         string             `xml:"icon,omitempty"`
}

type Payments

type Payments struct {
	PaymentMethod []PaymentMethod `xml:"payment-method,omitempty"`
}

type Permissions

type Permissions struct {
	Read       []string `xml:"read,omitempty"`
	Create     []string `xml:"create,omitempty"`
	Update     []string `xml:"update,omitempty"`
	Delete     []string `xml:"delete,omitempty"`
	Permission []string `xml:"permission,omitempty"`
}

type PlatformComposerJson

type PlatformComposerJson struct {
	Name        string   `json:"name"`
	Keywords    []string `json:"keywords"`
	Description string   `json:"description"`
	Version     string   `json:"version"`
	Type        string   `json:"type"`
	License     string   `json:"license"`
	Authors     []struct {
		Name     string `json:"name"`
		Homepage string `json:"homepage"`
	} `json:"authors"`
	Require  map[string]string         `json:"require"`
	Extra    platformComposerJsonExtra `json:"extra"`
	Autoload struct {
		Psr0 map[string]string `json:"psr-0"`
		Psr4 map[string]string `json:"psr-4"`
	} `json:"autoload"`
	Suggest map[string]string `json:"suggest"`
}

type PlatformPlugin

type PlatformPlugin struct {
	Composer PlatformComposerJson
	// contains filtered or unexported fields
}

func (PlatformPlugin) GetChangelog

func (p PlatformPlugin) GetChangelog() (*ExtensionChangelog, error)

func (PlatformPlugin) GetComposerName

func (p PlatformPlugin) GetComposerName() (string, error)

func (PlatformPlugin) GetExtensionConfig

func (p PlatformPlugin) GetExtensionConfig() *Config

func (PlatformPlugin) GetHeyFrameVersionConstraint

func (p PlatformPlugin) GetHeyFrameVersionConstraint() (*version.Constraints, error)

func (PlatformPlugin) GetIconPath

func (p PlatformPlugin) GetIconPath() string

func (PlatformPlugin) GetLicense

func (p PlatformPlugin) GetLicense() (string, error)

func (PlatformPlugin) GetMetaData

func (p PlatformPlugin) GetMetaData() *extensionMetadata

func (PlatformPlugin) GetName

func (p PlatformPlugin) GetName() (string, error)

func (PlatformPlugin) GetPath

func (p PlatformPlugin) GetPath() string

func (PlatformPlugin) GetResourcesDir

func (p PlatformPlugin) GetResourcesDir() string

GetResourcesDir returns the resources directory of the plugin.

func (PlatformPlugin) GetResourcesDirs

func (p PlatformPlugin) GetResourcesDirs() []string

func (PlatformPlugin) GetRootDir

func (p PlatformPlugin) GetRootDir() string

GetRootDir returns the src directory of the plugin.

func (PlatformPlugin) GetSourceDirs

func (p PlatformPlugin) GetSourceDirs() []string

func (PlatformPlugin) GetType

func (PlatformPlugin) GetType() string

func (PlatformPlugin) GetVersion

func (p PlatformPlugin) GetVersion() (*version.Version, error)

func (PlatformPlugin) Validate

func (p PlatformPlugin) Validate(c context.Context, check validation.Check)

type RuleCondition

type RuleCondition struct {
	Identifier  string             `xml:"identifier"`
	Name        TranslatableString `xml:"name"`
	Group       string             `xml:"group"`
	Script      string             `xml:"script"`
	Constraints []CustomFieldList  `xml:"constraints"`
}

type RuleConditions

type RuleConditions struct {
	RuleCondition []RuleCondition `xml:"rule-condition,omitempty"`
}

type Setup

type Setup struct {
	RegistrationUrl string `xml:"registrationUrl"`
	Secret          string `xml:"secret,omitempty"`
}

type ShippingMethod

type ShippingMethod struct {
	Identifier   string             `xml:"identifier"`
	Name         TranslatableString `xml:"name"`
	Description  TranslatableString `xml:"description,omitempty"`
	Active       bool               `xml:"active,omitempty"`
	DeliveryTime DeliveryTime       `xml:"delivery-time"`
	Icon         string             `xml:"icon,omitempty"`
	Position     int                `xml:"position,omitempty"`
	TrackingURL  TranslatableString `xml:"tracking-url,omitempty"`
}

type ShippingMethods

type ShippingMethods struct {
	ShippingMethod []ShippingMethod `xml:"shipping-method,omitempty"`
}

type Tax

type Tax struct {
	TaxProvider []TaxProvider `xml:"tax-provider,omitempty"`
}

type TaxProvider

type TaxProvider struct {
	Identifier string `xml:"identifier"`
	Name       string `xml:"name"`
	Priority   int    `xml:"priority"`
	ProcessURL string `xml:"process-url"`
}

type Translatable

type Translatable interface {
	string | []string | []ConfigStoreFaq
}

type TranslatableString

type TranslatableString []struct {
	Value string `xml:",chardata"`
	Lang  string `xml:"lang,attr,omitempty"`
}

func (TranslatableString) GetValueByLanguage

func (t TranslatableString) GetValueByLanguage(lang []string) string

type Webhook

type Webhook struct {
	Name            string `xml:"name,attr"`
	URL             string `xml:"url,attr"`
	Event           string `xml:"event,attr"`
	OnlyLiveVersion bool   `xml:"onlyLiveVersion,attr,omitempty"`
}

type Webhooks

type Webhooks struct {
	Webhook []Webhook `xml:"webhook,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL