{"modulePath":"github.com/devfile/alizer","version":"v1.10.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package enricher\n\n## Functions\n\n```go\nfunc GetEnvPort(envPlaceholder string) int\n```\n\n```go\nfunc GetEnvPortFromDockerfile(envPlaceholder string, path string) int\n```\nGetEnvPortFromDockerfile returns a port value from the Dockerfile (locations provided by the 'utils.GetLocations' function) matching the specified 'envPlaceHolder'. It first extracts the environment variable name to lookup from 'envPlaceholder' by removing any 'process.env.' prefix. It then searches through all environment variables detected from the Dockerfile (as determined by 'utils.GetEnvVarsFromDockerFile'). And if the environment variable specified via 'envPlaceholder' is found in the Dockerfile environment variables and its corresponding value is a valid port (as determined by 'utils.GetValidPort'), it returns this valid port value.\n\nIf there is an error reading the Dockerfile or if the environment variable specified via 'envPlaceholder' is not found among the Dockerfile environment variables, the function returns -1.\n\n## Types\n\n```go\ntype AngularDetector struct{}\n```\n\n```go\nfunc (a AngularDetector) DoFrameworkDetection(language *model.Language, config string)\n```\nDoFrameworkDetection uses a tag to check for the framework name\n\n```go\nfunc (a AngularDetector) DoPortsDetection(component *model.Component, ctx *context.Context)\n```\nDoPortsDetection searches for the port in angular.json, package.json, and angular-cli.json\n\n```go\nfunc (a AngularDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo\n```\n\n```go\nfunc (a AngularDetector) GetSupportedFrameworks() []string\n```\n\n```go\ntype ExpressDetector struct{}\n```\n\n```go\nfunc (e ExpressDetector) DoFrameworkDetection(language *model.Language, config string)\n```\nDoFrameworkDetection uses a tag to check for the framework name\n\n```go\nfunc (e ExpressDetector) DoPortsDetection(component *model.Component, ctx *context.Context)\n```\n\n```go\nfunc (e ExpressDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo\n```\n\n```go\nfunc (e ExpressDetector) GetSupportedFrameworks() []string\n```\n\n```go\ntype NextDetector struct{}\n```\n\n```go\nfunc (n NextDetector) DoFrameworkDetection(language *model.Language, config string)\n```\nDoFrameworkDetection uses a tag to check for the framework name\n\n```go\nfunc (n NextDetector) DoPortsDetection(component *model.Component, ctx *context.Context)\n```\nDoPortsDetection searches for the port in package.json\n\n```go\nfunc (a NextDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo\n```\n\n```go\nfunc (n NextDetector) GetSupportedFrameworks() []string\n```\n\n```go\ntype NuxtDetector struct{}\n```\n\n```go\nfunc (n NuxtDetector) DoFrameworkDetection(language *model.Language, config string)\n```\nDoFrameworkDetection uses a tag to check for the framework name\n\n```go\nfunc (n NuxtDetector) DoPortsDetection(component *model.Component, ctx *context.Context)\n```\nDoPortsDetection searches for the port in package.json, and nuxt.config.js\n\n```go\nfunc (n NuxtDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo\n```\n\n```go\nfunc (n NuxtDetector) GetSupportedFrameworks() []string\n```\n\n```go\ntype ReactJsDetector struct{}\n```\n\n```go\nfunc (r ReactJsDetector) DoFrameworkDetection(language *model.Language, config string)\n```\nDoFrameworkDetection uses a tag to check for the framework name\n\n```go\nfunc (r ReactJsDetector) DoPortsDetection(component *model.Component, ctx *context.Context)\n```\nDoPortsDetection searches for the port in the env var, .env file, and package.json\n\n```go\nfunc (r ReactJsDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo\n```\n\n```go\nfunc (r ReactJsDetector) GetSupportedFrameworks() []string\n```\n\n```go\ntype SvelteDetector struct{}\n```\n\n```go\nfunc (s SvelteDetector) DoFrameworkDetection(language *model.Language, config string)\n```\nDoFrameworkDetection uses a tag to check for the framework name\n\n```go\nfunc (s SvelteDetector) DoPortsDetection(component *model.Component, ctx *context.Context)\n```\nDoPortsDetection searches for the port in package.json\n\n```go\nfunc (s SvelteDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo\n```\n\n```go\nfunc (s SvelteDetector) GetSupportedFrameworks() []string\n```\n\n```go\ntype VueDetector struct{}\n```\n\n```go\nfunc (v VueDetector) DoFrameworkDetection(language *model.Language, config string)\n```\nDoFrameworkDetection uses a tag to check for the framework name\n\n```go\nfunc (v VueDetector) DoPortsDetection(component *model.Component, ctx *context.Context)\n```\nDoPortsDetection searches for the port in package.json, .env file, and vue.config.js\n\n```go\nfunc (v VueDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo\n```\n\n```go\nfunc (v VueDetector) GetSupportedFrameworks() []string\n```\n\n","path":"github.com/devfile/alizer/pkg/apis/enricher/framework/javascript/nodejs","name":"enricher","synopsis":"","isRedistributable":true}
