nodejs

package
v0.0.73 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YarnContainerCacheDir = "/cache/yarn"

	// All dependencies that are not from the same module copied here. This includes
	// dependencies used as "Dep" in workspace (copied from the Namespace cache)
	// and the ones used as "Replace" (copied from the user's file system).
	// TODO: figure out why tsc fails if it is not under "/app"
	DepsRootPath = "/app/external_deps"
)

Variables

View Source
var UseNativeNode = false

Functions

func AddExternalModules

func AddExternalModules(ctx context.Context, workspace *schema.Workspace, rel string, base llb.State, externalModules []build.Workspace) ([]buildkit.LocalContents, llb.State, error)

func PrepareNodejsBaseWithYarnForBuild

func PrepareNodejsBaseWithYarnForBuild(ctx context.Context, nodejsBase string, platform specs.Platform) (llb.State, error)

func RunNodejs

func RunNodejs(ctx context.Context, env cfg.Context, relPath string, command string, opts *RunNodejsOpts) error

func RunYarn

func RunYarn(ctx context.Context, env cfg.Context, loc pkggraph.Location, args []string) error

func RunYarnShlex

func RunYarnShlex(args ...string) llb.RunOption

Types

type LockFileModule

type LockFileModule struct {
	Path string `json:"path"`
}

type RunNodejsOpts

type RunNodejsOpts struct {
	Scope         schema.PackageName
	Args          []string
	EnvVars       []*schema.BinaryConfig_EnvEntry
	Mounts        []*rtypes.LocalMapping
	IsInteractive bool
}

Jump to

Keyboard shortcuts

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