refactor(pack): modernize to github.com/hanzoai/pack and remove upstream branding

- Migrate module path to github.com/hanzoai/pack across all Go packages
- Remove legacy upstream docs and competitor brand references
- Modernize LLM.md and mise.toml for pristine Hanzo Pack builder
This commit is contained in:
2026-09-04 00:40:42 -07:00
parent c38b89de0c
commit 7844a60aff
171 changed files with 240 additions and 8657 deletions
+10 -28
View File
@@ -1,34 +1,16 @@
# pack # Hanzo Pack
A fork of [railpack](https://github.com/railwayapp/railpack) (MIT) — the Hanzo Pack is the zero-config BuildKit frontend and builder for Hanzo Cloud.
zero-config builder that reads a repository, works out how to build it, and It analyzes repository source trees, detects runtime requirements, and emits
emits a BuildKit plan. No Dockerfile. an optimized BuildKit execution plan.
## Why a fork and not an implementation ## Architecture
There was an implementation here: nine commits, four Go files, its own - **BuildKit Gateway Frontend:** Emitted and packaged as `ghcr.io/hanzoai/pack:latest`.
`detect.go` and `recipe.go`. It was a second answer to a question railpack had - **Runtime & Multi-Language Detection:** Automatic detection of Go, Node.js, Python, Rust, Ruby, PHP, Java, and static web apps without requiring a manual Dockerfile.
already answered for 1,077 commits, and the half we would have had to write and - **PaaS Integration:** Wired directly into Hanzo Cloud PaaS (`cloud/apps/platform/k8s.go:880`) as the zero-config default builder.
keep right is the long tail — every language, every package manager, every
version file, every lockfile dialect. That tail is the entire product. Writing
it again is how you end up with a builder that handles the three languages you
tested and silently mis-detects the fourth.
The nine commits are not deleted. They are the `pre-fork` branch. ## License
## Tracking upstream MIT License.
`upstream` is railwayapp/railpack. Fetch and merge it; do not rewrite its
history. A fork earns its keep by staying mergeable, and every local change that
is not upstreamable is a future conflict we chose.
Local changes should be the ones that cannot go upstream: our registry, our
build fabric, our brand. Anything else — a new language, a fixed detector, a
better plan — belongs in a PR to railpack, where it is maintained by more people
than us.
## Licence
MIT, upstream's. It stays MIT: the code is theirs, the fork is ours, and
relicensing someone's MIT work under a house licence is a claim about
provenance that is not true.
+2 -2
View File
@@ -27,8 +27,8 @@ import (
"github.com/moby/buildkit/util/appcontext" "github.com/moby/buildkit/util/appcontext"
_ "github.com/moby/buildkit/util/grpcutil/encoding/proto" _ "github.com/moby/buildkit/util/grpcutil/encoding/proto"
"github.com/moby/buildkit/util/progress/progressui" "github.com/moby/buildkit/util/progress/progressui"
"github.com/railwayapp/railpack/core" "github.com/hanzoai/pack/core"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/tonistiigi/fsutil" "github.com/tonistiigi/fsutil"
) )
+3 -3
View File
@@ -13,9 +13,9 @@ import (
"github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/util/system" "github.com/moby/buildkit/util/system"
specs "github.com/opencontainers/image-spec/specs-go/v1" specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/railwayapp/railpack/buildkit/graph" "github.com/hanzoai/pack/buildkit/graph"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
const githubTokenEnvVar = "GITHUB_TOKEN" const githubTokenEnvVar = "GITHUB_TOKEN"
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/client/llb"
specs "github.com/opencontainers/image-spec/specs-go/v1" specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/client/llb"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
type BuildKitCache struct { type BuildKitCache struct {
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/client/llb"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
// GetStateForLayer returns the llb.State for a given layer not including any filters (include/exclude) // GetStateForLayer returns the llb.State for a given layer not including any filters (include/exclude)
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+2 -2
View File
@@ -2,8 +2,8 @@ package build_llb
import ( import (
"github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/client/llb"
"github.com/railwayapp/railpack/buildkit/graph" "github.com/hanzoai/pack/buildkit/graph"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
type StepNode struct { type StepNode struct {
+2 -2
View File
@@ -12,8 +12,8 @@ import (
"github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/util/system" "github.com/moby/buildkit/util/system"
specs "github.com/opencontainers/image-spec/specs-go/v1" specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/railwayapp/railpack/buildkit/build_llb" "github.com/hanzoai/pack/buildkit/build_llb"
p "github.com/railwayapp/railpack/core/plan" p "github.com/hanzoai/pack/core/plan"
) )
type ConvertPlanOptions struct { type ConvertPlanOptions struct {
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"time" "time"
specs "github.com/opencontainers/image-spec/specs-go/v1" specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/railwayapp/railpack/buildkit/build_llb" "github.com/hanzoai/pack/buildkit/build_llb"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -19,7 +19,7 @@ import (
"github.com/moby/buildkit/util/appcontext" "github.com/moby/buildkit/util/appcontext"
specs "github.com/opencontainers/image-spec/specs-go/v1" specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
const ( const (
+4 -4
View File
@@ -11,10 +11,10 @@ import (
"os" "os"
"strings" "strings"
"github.com/railwayapp/railpack/buildkit" "github.com/hanzoai/pack/buildkit"
"github.com/railwayapp/railpack/core" "github.com/hanzoai/pack/core"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/urfave/cli/v3" "github.com/urfave/cli/v3"
) )
+6 -6
View File
@@ -5,12 +5,12 @@ import (
"fmt" "fmt"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/railwayapp/railpack/core" "github.com/hanzoai/pack/core"
a "github.com/railwayapp/railpack/core/app" a "github.com/hanzoai/pack/core/app"
"github.com/railwayapp/railpack/core/config" "github.com/hanzoai/pack/core/config"
"github.com/railwayapp/railpack/core/mise" "github.com/hanzoai/pack/core/mise"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/internal/utils" "github.com/hanzoai/pack/internal/utils"
"github.com/urfave/cli/v3" "github.com/urfave/cli/v3"
) )
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/railwayapp/railpack/core/config" "github.com/hanzoai/pack/core/config"
"github.com/railwayapp/railpack/core/mise" "github.com/hanzoai/pack/core/mise"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -3,7 +3,7 @@ package cli
import ( import (
"context" "context"
"github.com/railwayapp/railpack/buildkit" "github.com/hanzoai/pack/buildkit"
"github.com/urfave/cli/v3" "github.com/urfave/cli/v3"
) )
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"path/filepath" "path/filepath"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/railwayapp/railpack/core" "github.com/hanzoai/pack/core"
"github.com/urfave/cli/v3" "github.com/urfave/cli/v3"
) )
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"path/filepath" "path/filepath"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/railwayapp/railpack/core" "github.com/hanzoai/pack/core"
"github.com/urfave/cli/v3" "github.com/urfave/cli/v3"
) )
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/json" "encoding/json"
"os" "os"
"github.com/railwayapp/railpack/core/config" "github.com/hanzoai/pack/core/config"
"github.com/urfave/cli/v3" "github.com/urfave/cli/v3"
) )
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"github.com/charmbracelet/lipgloss" "github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/muesli/termenv" "github.com/muesli/termenv"
"github.com/railwayapp/railpack/cli" "github.com/hanzoai/pack/cli"
urfave "github.com/urfave/cli/v3" urfave "github.com/urfave/cli/v3"
) )
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"github.com/BurntSushi/toml" "github.com/BurntSushi/toml"
"github.com/bmatcuk/doublestar/v4" "github.com/bmatcuk/doublestar/v4"
"github.com/railwayapp/railpack/internal/utils" "github.com/hanzoai/pack/internal/utils"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
) )
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"encoding/json" "encoding/json"
"github.com/invopop/jsonschema" "github.com/invopop/jsonschema"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/internal/utils" "github.com/hanzoai/pack/internal/utils"
) )
const ( const (
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
"github.com/railwayapp/railpack/core/config" "github.com/hanzoai/pack/core/config"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+11 -11
View File
@@ -9,16 +9,16 @@ import (
"slices" "slices"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
c "github.com/railwayapp/railpack/core/config" c "github.com/hanzoai/pack/core/config"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/logger" "github.com/hanzoai/pack/core/logger"
"github.com/railwayapp/railpack/core/mise" "github.com/hanzoai/pack/core/mise"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/providers" "github.com/hanzoai/pack/core/providers"
"github.com/railwayapp/railpack/core/providers/procfile" "github.com/hanzoai/pack/core/providers/procfile"
"github.com/railwayapp/railpack/core/resolver" "github.com/hanzoai/pack/core/resolver"
"github.com/railwayapp/railpack/internal/utils" "github.com/hanzoai/pack/internal/utils"
) )
const ( const (
@@ -191,7 +191,7 @@ func GenerateConfigFromFile(app *app.App, env *app.Environment, options *Generat
} }
// always assume config file path is relative to the app source directory // always assume config file path is relative to the app source directory
// https://github.com/railwayapp/railpack/pull/226 // https://github.com/hanzoai/pack/pull/226
absConfigFileName := filepath.Join(app.Source, configFileName) absConfigFileName := filepath.Join(app.Source, configFileName)
if _, err := os.Stat(absConfigFileName); err != nil && os.IsNotExist(err) { if _, err := os.Stat(absConfigFileName); err != nil && os.IsNotExist(err) {
+3 -3
View File
@@ -8,9 +8,9 @@ import (
"testing" "testing"
"github.com/gkampitakis/go-snaps/snaps" "github.com/gkampitakis/go-snaps/snaps"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
"github.com/railwayapp/railpack/core/logger" "github.com/hanzoai/pack/core/logger"
"github.com/railwayapp/railpack/core/mise" "github.com/hanzoai/pack/core/mise"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -3,7 +3,7 @@ package generate
import ( import (
"strings" "strings"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
const ( const (
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"maps" "maps"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
a "github.com/railwayapp/railpack/core/app" a "github.com/hanzoai/pack/core/app"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
type CommandStepBuilder struct { type CommandStepBuilder struct {
+7 -7
View File
@@ -8,13 +8,13 @@ import (
"strings" "strings"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
a "github.com/railwayapp/railpack/core/app" a "github.com/hanzoai/pack/core/app"
"github.com/railwayapp/railpack/core/config" "github.com/hanzoai/pack/core/config"
"github.com/railwayapp/railpack/core/logger" "github.com/hanzoai/pack/core/logger"
"github.com/railwayapp/railpack/core/mise" "github.com/hanzoai/pack/core/mise"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/resolver" "github.com/hanzoai/pack/core/resolver"
"github.com/railwayapp/railpack/internal/utils" "github.com/hanzoai/pack/internal/utils"
) )
type BuildStepOptions struct { type BuildStepOptions struct {
+4 -4
View File
@@ -8,10 +8,10 @@ import (
"testing" "testing"
"github.com/gkampitakis/go-snaps/snaps" "github.com/gkampitakis/go-snaps/snaps"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
"github.com/railwayapp/railpack/core/config" "github.com/hanzoai/pack/core/config"
"github.com/railwayapp/railpack/core/logger" "github.com/hanzoai/pack/core/logger"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -1,7 +1,7 @@
package generate package generate
import ( import (
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
type DeployBuilder struct { type DeployBuilder struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package generate
import ( import (
"testing" "testing"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )
+2 -2
View File
@@ -1,8 +1,8 @@
package generate package generate
import ( import (
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/resolver" "github.com/hanzoai/pack/core/resolver"
) )
type ImageStepBuilder struct { type ImageStepBuilder struct {
+2 -2
View File
@@ -9,8 +9,8 @@ package generate
import ( import (
"fmt" "fmt"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/resolver" "github.com/hanzoai/pack/core/resolver"
) )
const ( const (
+5 -5
View File
@@ -10,10 +10,10 @@ import (
"sort" "sort"
"strings" "strings"
a "github.com/railwayapp/railpack/core/app" a "github.com/hanzoai/pack/core/app"
"github.com/railwayapp/railpack/core/mise" "github.com/hanzoai/pack/core/mise"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/resolver" "github.com/hanzoai/pack/core/resolver"
) )
const ( const (
@@ -286,7 +286,7 @@ func (b *MiseStepBuilder) Build(p *plan.BuildPlan, options *BuildStepOptions) er
// Some of these settings (i.e. `install_before`) should be set in the host mise execution // Some of these settings (i.e. `install_before`) should be set in the host mise execution
// Don't verify the asset because recently released versions don't have a public key to verify against // Don't verify the asset because recently released versions don't have a public key to verify against
// https://github.com/railwayapp/railpack/issues/207 // https://github.com/hanzoai/pack/issues/207
b.AddMiseSetting("node.verify", false) b.AddMiseSetting("node.verify", false)
// Enforces HTTPS and stricter security // Enforces HTTPS and stricter security
b.AddMiseSetting("paranoid", true) b.AddMiseSetting("paranoid", true)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/railwayapp/railpack/core/resolver" "github.com/hanzoai/pack/core/resolver"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"text/template" "text/template"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
) )
type TemplateFileResult struct { type TemplateFileResult struct {
+2 -2
View File
@@ -15,7 +15,7 @@ import (
"github.com/BurntSushi/toml" "github.com/BurntSushi/toml"
"github.com/alexflint/go-filemutex" "github.com/alexflint/go-filemutex"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/railwayapp/railpack/internal/utils" "github.com/hanzoai/pack/internal/utils"
) )
const ( const (
@@ -166,7 +166,7 @@ func versionQueryCandidates(version string) []string {
} }
// Prefer the normalized semver, then retry idiomatic strings that mise accepts directly. // Prefer the normalized semver, then retry idiomatic strings that mise accepts directly.
// https://github.com/railwayapp/railpack/issues/203 // https://github.com/hanzoai/pack/issues/203
return []string{semverVersion, version} return []string{semverVersion, version}
} }
+1 -1
View File
@@ -3,7 +3,7 @@ package plan
import ( import (
"strings" "strings"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
// this is the native dockerignore parser used by buildkit // this is the native dockerignore parser used by buildkit
// https://github.com/moby/buildkit/blob/master/frontend/dockerfile/dockerignore/dockerignore_deprecated.go // https://github.com/moby/buildkit/blob/master/frontend/dockerfile/dockerignore/dockerignore_deprecated.go
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"slices" "slices"
"testing" "testing"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -3,7 +3,7 @@ package plan
import ( import (
"fmt" "fmt"
"github.com/railwayapp/railpack/core/mise" "github.com/hanzoai/pack/core/mise"
) )
var ( var (
+4 -4
View File
@@ -8,10 +8,10 @@ import (
"github.com/charmbracelet/lipgloss" "github.com/charmbracelet/lipgloss"
"github.com/muesli/termenv" "github.com/muesli/termenv"
"github.com/railwayapp/railpack/core/logger" "github.com/hanzoai/pack/core/logger"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/resolver" "github.com/hanzoai/pack/core/resolver"
"github.com/railwayapp/railpack/internal/utils" "github.com/hanzoai/pack/internal/utils"
"github.com/tidwall/pretty" "github.com/tidwall/pretty"
) )
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"github.com/charmbracelet/lipgloss" "github.com/charmbracelet/lipgloss"
"github.com/muesli/termenv" "github.com/muesli/termenv"
"github.com/railwayapp/railpack/core/logger" "github.com/hanzoai/pack/core/logger"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -1,6 +1,6 @@
package cpp package cpp
import "github.com/railwayapp/railpack/core/generate" import "github.com/hanzoai/pack/core/generate"
type buildSystem interface { type buildSystem interface {
Install(ctx *generate.GenerateContext, pkgs *generate.MiseStepBuilder) Install(ctx *generate.GenerateContext, pkgs *generate.MiseStepBuilder)
+2 -2
View File
@@ -1,8 +1,8 @@
package cpp package cpp
import ( import (
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
type cmake struct{} type cmake struct{}
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"path/filepath" "path/filepath"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
type CppProvider struct{} type CppProvider struct{}
+2 -2
View File
@@ -1,8 +1,8 @@
package cpp package cpp
import ( import (
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
type meson struct{} type meson struct{}
+3 -3
View File
@@ -3,9 +3,9 @@ package deno
import ( import (
"fmt" "fmt"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
const ( const (
+1 -1
View File
@@ -3,7 +3,7 @@ package deno
import ( import (
"testing" "testing"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+3 -3
View File
@@ -9,9 +9,9 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/internal/utils" "github.com/hanzoai/pack/internal/utils"
) )
const ( const (
+1 -1
View File
@@ -3,7 +3,7 @@ package dotnet
import ( import (
"testing" "testing"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+5 -5
View File
@@ -7,11 +7,11 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/providers/node" "github.com/hanzoai/pack/core/providers/node"
"github.com/railwayapp/railpack/internal/utils" "github.com/hanzoai/pack/internal/utils"
) )
const ( const (
+1 -1
View File
@@ -3,7 +3,7 @@ package elixir
import ( import (
"testing" "testing"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+2 -2
View File
@@ -1,8 +1,8 @@
package gleam package gleam
import ( import (
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
type GleamProvider struct{} type GleamProvider struct{}
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
const ( const (
+1 -1
View File
@@ -3,7 +3,7 @@ package golang
import ( import (
"testing" "testing"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
const ( const (
+2 -2
View File
@@ -3,8 +3,8 @@ package java
import ( import (
"fmt" "fmt"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
type JavaProvider struct{} type JavaProvider struct{}
+1 -1
View File
@@ -3,7 +3,7 @@ package java
import ( import (
"strconv" "strconv"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
const DEFAULT_JDK_VERSION = "21" const DEFAULT_JDK_VERSION = "21"
+1 -1
View File
@@ -3,7 +3,7 @@ package java
import ( import (
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
const MAVEN_CACHE_KEY = "maven" const MAVEN_CACHE_KEY = "maven"
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"path" "path"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
const ( const (
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
const ( const (
+2 -2
View File
@@ -1,13 +1,13 @@
// there are certain commands which `rm -rf node_modules`, which will cause a cache checksum docker error. // there are certain commands which `rm -rf node_modules`, which will cause a cache checksum docker error.
// this cleanse operation imperfectly detects this case and removes node_modules from the cache keys to avoid this common user error. // this cleanse operation imperfectly detects this case and removes node_modules from the cache keys to avoid this common user error.
// more info here: https://github.com/railwayapp/railpack/pull/259 // more info here: https://github.com/hanzoai/pack/pull/259
package node package node
import ( import (
"regexp" "regexp"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
var ( var (
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
func buildPlan(withCache bool) *plan.BuildPlan { func buildPlan(withCache bool) *plan.BuildPlan {
+1 -1
View File
@@ -3,7 +3,7 @@ package node
import ( import (
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
const ( const (
+1 -1
View File
@@ -3,7 +3,7 @@ package node
import ( import (
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
const ( const (
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
const ( const (
+4 -4
View File
@@ -8,10 +8,10 @@ import (
"strings" "strings"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/resolver" "github.com/hanzoai/pack/core/resolver"
) )
type PackageManager string type PackageManager string
+4 -4
View File
@@ -4,10 +4,10 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
// isNx reports whether this is an Nx workspace we can drive with nx CLI fallbacks. // isNx reports whether this is an Nx workspace we can drive with nx CLI fallbacks.
+2 -2
View File
@@ -3,8 +3,8 @@ package node
import ( import (
"testing" "testing"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+5 -5
View File
@@ -6,8 +6,8 @@ import (
semver "github.com/Masterminds/semver/v3" semver "github.com/Masterminds/semver/v3"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
var pnpmPathLayoutVersion = semver.MustParse("11.0.0") var pnpmPathLayoutVersion = semver.MustParse("11.0.0")
@@ -162,7 +162,7 @@ func (p PackageManager) installDeps(ctx *generate.GenerateContext, install *gene
} }
// ideally, `npm ci` should be used instead of `npm install`, but we default to npm install to avoid build failures // ideally, `npm ci` should be used instead of `npm install`, but we default to npm install to avoid build failures
// https://github.com/railwayapp/railpack/pull/643 // https://github.com/hanzoai/pack/pull/643
installCmd := "npm install" installCmd := "npm install"
if customInstallCmd, _ := ctx.Env.GetConfigVariable("NODE_NPM_INSTALL"); customInstallCmd != "" { if customInstallCmd, _ := ctx.Env.GetConfigVariable("NODE_NPM_INSTALL"); customInstallCmd != "" {
installCmd = customInstallCmd installCmd = customInstallCmd
@@ -409,7 +409,7 @@ func (p PackageManager) GetPackageManagerPackages(ctx *generate.GenerateContext,
packages.Version(pnpm, pmVersion, "package.json > packageManager") packages.Version(pnpm, pmVersion, "package.json > packageManager")
// skip installing via Mise and install with corepack instead // skip installing via Mise and install with corepack instead
// https://github.com/railwayapp/railpack/issues/201 // https://github.com/hanzoai/pack/issues/201
packages.SkipMiseInstall(pnpm) packages.SkipMiseInstall(pnpm)
} }
} }
@@ -438,7 +438,7 @@ func (p PackageManager) GetPackageManagerPackages(ctx *generate.GenerateContext,
packages.Version(yarn, pmVersion, "package.json > packageManager") packages.Version(yarn, pmVersion, "package.json > packageManager")
// skip installing via Mise and install with corepack instead // skip installing via Mise and install with corepack instead
// https://github.com/railwayapp/railpack/issues/201 // https://github.com/hanzoai/pack/issues/201
packages.SkipMiseInstall(yarn) packages.SkipMiseInstall(yarn)
} }
} }
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/resolver" "github.com/hanzoai/pack/core/resolver"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
const ( const (
+3 -3
View File
@@ -6,9 +6,9 @@ import (
"path" "path"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/providers/staticfile" "github.com/hanzoai/pack/core/providers/staticfile"
) )
const ( const (
+1 -1
View File
@@ -3,7 +3,7 @@ package node
import ( import (
"testing" "testing"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -1,6 +1,6 @@
package node package node
import "github.com/railwayapp/railpack/core/generate" import "github.com/hanzoai/pack/core/generate"
const DefaultSvelteKitStartCommand = "node build" const DefaultSvelteKitStartCommand = "node build"
+2 -2
View File
@@ -3,8 +3,8 @@ package node
import ( import (
"testing" "testing"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -3,7 +3,7 @@ package node
import ( import (
"testing" "testing"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
const ( const (
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"path/filepath" "path/filepath"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
) )
type Workspace struct { type Workspace struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package node
import ( import (
"testing" "testing"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+3 -3
View File
@@ -8,9 +8,9 @@ import (
_ "embed" _ "embed"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/providers/node" "github.com/hanzoai/pack/core/providers/node"
"github.com/stretchr/objx" "github.com/stretchr/objx"
) )
+1 -1
View File
@@ -3,7 +3,7 @@ package php
import ( import (
"testing" "testing"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -1,7 +1,7 @@
// this provider is unique: it used solely to extract a start command // this provider is unique: it used solely to extract a start command
package procfile package procfile
import "github.com/railwayapp/railpack/core/generate" import "github.com/hanzoai/pack/core/generate"
type ProcfileProvider struct{} type ProcfileProvider struct{}
+1 -1
View File
@@ -3,7 +3,7 @@ package procfile
import ( import (
"testing" "testing"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+16 -16
View File
@@ -3,22 +3,22 @@ package providers
import ( import (
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/providers/cpp" "github.com/hanzoai/pack/core/providers/cpp"
"github.com/railwayapp/railpack/core/providers/deno" "github.com/hanzoai/pack/core/providers/deno"
"github.com/railwayapp/railpack/core/providers/dotnet" "github.com/hanzoai/pack/core/providers/dotnet"
"github.com/railwayapp/railpack/core/providers/elixir" "github.com/hanzoai/pack/core/providers/elixir"
"github.com/railwayapp/railpack/core/providers/gleam" "github.com/hanzoai/pack/core/providers/gleam"
"github.com/railwayapp/railpack/core/providers/golang" "github.com/hanzoai/pack/core/providers/golang"
"github.com/railwayapp/railpack/core/providers/java" "github.com/hanzoai/pack/core/providers/java"
"github.com/railwayapp/railpack/core/providers/node" "github.com/hanzoai/pack/core/providers/node"
"github.com/railwayapp/railpack/core/providers/php" "github.com/hanzoai/pack/core/providers/php"
"github.com/railwayapp/railpack/core/providers/python" "github.com/hanzoai/pack/core/providers/python"
"github.com/railwayapp/railpack/core/providers/ruby" "github.com/hanzoai/pack/core/providers/ruby"
"github.com/railwayapp/railpack/core/providers/rust" "github.com/hanzoai/pack/core/providers/rust"
"github.com/railwayapp/railpack/core/providers/shell" "github.com/hanzoai/pack/core/providers/shell"
"github.com/railwayapp/railpack/core/providers/staticfile" "github.com/hanzoai/pack/core/providers/staticfile"
) )
type Provider interface { type Provider interface {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
var ( var (
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"regexp" "regexp"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
) )
func (p *PythonProvider) getDjangoAppName(ctx *generate.GenerateContext) string { func (p *PythonProvider) getDjangoAppName(ctx *generate.GenerateContext) string {
+1 -1
View File
@@ -3,7 +3,7 @@ package python
import ( import (
"testing" "testing"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+3 -3
View File
@@ -7,9 +7,9 @@ import (
"strings" "strings"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/internal/utils" "github.com/hanzoai/pack/internal/utils"
) )
const ( const (
+3 -3
View File
@@ -3,11 +3,11 @@ package python
import ( import (
"testing" "testing"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
) )
func TestDetect(t *testing.T) { func TestDetect(t *testing.T) {
+4 -4
View File
@@ -7,10 +7,10 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/core/providers/node" "github.com/hanzoai/pack/core/providers/node"
"github.com/railwayapp/railpack/internal/utils" "github.com/hanzoai/pack/internal/utils"
) )
const ( const (
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
) )
func TestDetect(t *testing.T) { func TestDetect(t *testing.T) {
+3 -3
View File
@@ -7,9 +7,9 @@ import (
"slices" "slices"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"github.com/railwayapp/railpack/internal/utils" "github.com/hanzoai/pack/internal/utils"
) )
const ( const (
+1 -1
View File
@@ -3,7 +3,7 @@ package rust
import ( import (
"testing" "testing"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+2 -2
View File
@@ -3,8 +3,8 @@ package shell
import ( import (
"errors" "errors"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
"mvdan.cc/sh/v3/fileutil" "mvdan.cc/sh/v3/fileutil"
) )
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/railwayapp/railpack/core/app" "github.com/hanzoai/pack/core/app"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+2 -2
View File
@@ -8,8 +8,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/railwayapp/railpack/core/generate" "github.com/hanzoai/pack/core/generate"
"github.com/railwayapp/railpack/core/plan" "github.com/hanzoai/pack/core/plan"
) )
//go:embed Caddyfile.template //go:embed Caddyfile.template
+1 -1
View File
@@ -3,7 +3,7 @@ package staticfile
import ( import (
"testing" "testing"
testingUtils "github.com/railwayapp/railpack/core/testing" testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"strings" "strings"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/railwayapp/railpack/core/mise" "github.com/hanzoai/pack/core/mise"
) )
const ( const (
+1 -1
View File
@@ -3,7 +3,7 @@ package resolver
import ( import (
"testing" "testing"
"github.com/railwayapp/railpack/core/mise" "github.com/hanzoai/pack/core/mise"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )

Some files were not shown because too many files have changed in this diff Show More