packaging

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OffenderEntry

type OffenderEntry struct {
	Package string
	SizeMB  float64
}

type PackageResult

type PackageResult struct {
	LambdaZipPath string
	LambdaZipSize int64
	// StandaloneTarPath is the provider-agnostic artifact: a gzipped tar of
	// the raw Next.js standalone directory, with no target-specific shims
	// baked in. AWS ignores this (it deploys LambdaZipPath directly);
	// Cloudflare extracts it before running its adapter. Empty if tar
	// creation failed (a warning is logged but packaging does not fail —
	// providers that need it will surface a clear error themselves).
	StandaloneTarPath string
	StandaloneTarSize int64
	S3Assets          []S3Asset
	SizeWarning       string
}

type Packager

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

func NewPackager

func NewPackager(projectRoot string, payload *nextcore.NextCorePayload) (*Packager, error)

func (*Packager) Cleanup

func (p *Packager) Cleanup()

func (*Packager) Package

func (p *Packager) Package() (*PackageResult, error)

type S3Asset

type S3Asset struct {
	LocalPath    string
	S3Key        string
	CacheControl string
	ContentType  string
}

type SizeReport

type SizeReport struct {
	TotalMB       float64
	NodeModulesMB float64
	ServerCodeMB  float64
	TopOffenders  []OffenderEntry
}

func AuditStandaloneSize

func AuditStandaloneSize(standaloneDir string) (*SizeReport, error)

Jump to

Keyboard shortcuts

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