binaries

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

Prisma binaries

How to build Prisma CLI binaries

Setup

Install zeit/pkg:

npm i -g pkg
Build the binary and upload to S3
sh publish.sh <version>

Documentation

Index

Constants

View Source
const EngineVersion = "33838b0f78f1fe9052cf9a00e9761c9dc097a63c"

EngineVersion is a hardcoded version of the Prisma Engine. The versions can be found under https://github.com/prisma/prisma-engines/commits/master

View Source
const PrismaVersion = "3.3.0"

PrismaVersion is a hardcoded version of the Prisma CLI.

Variables

View Source
var EngineURL = "https://binaries.prisma.sh/all_commits/%s/%s/%s.gz"

EngineURL points to an S3 bucket URL where the Prisma engines are stored.

View Source
var Engines = []Engine{{
	"query-engine",
	"PRISMA_QUERY_ENGINE_BINARY",
}, {
	"migration-engine",
	"PRISMA_MIGRATION_ENGINE_BINARY",
}, {
	"introspection-engine",
	"PRISMA_INTROSPECTION_ENGINE_BINARY",
}, {
	"prisma-fmt",
	"PRISMA_FMT_BINARY",
}}
View Source
var PrismaURL = "https://prisma-photongo.s3-eu-west-1.amazonaws.com/%s-%s-%s.gz"

PrismaURL points to an S3 bucket URL where the CLI binaries are stored.

Functions

func DownloadCLI

func DownloadCLI(toDir string) error

func DownloadEngine

func DownloadEngine(name string, toDir string) (file string, err error)

func FetchEngine

func FetchEngine(toDir string, engineName string, binaryPlatformName string) error

func FetchNative

func FetchNative(toDir string) error

FetchNative fetches the Prisma binaries needed for the generator to a given directory

func GetEnginePath added in v0.0.5

func GetEnginePath(dir, engine, binaryName string) string

func GlobalCacheDir

func GlobalCacheDir() string

GlobalCacheDir returns the path of where the CLI lives internally, this is the global temp dir

func GlobalTempDir

func GlobalTempDir() string

GlobalTempDir returns the path of where the engines live internally, this is the global temp dir

func GlobalUnpackDir added in v0.0.5

func GlobalUnpackDir() string

func PrismaCLIName

func PrismaCLIName() string

PrismaCLIName returns the local file path of where the CLI lives

Types

type Engine added in v0.0.2

type Engine struct {
	Name string
	Env  string
}

Directories

Path Synopsis
Package platform provides runtime methods to find out the correct prisma binary to use
Package platform provides runtime methods to find out the correct prisma binary to use

Jump to

Keyboard shortcuts

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