MCPcopy Index your code
hub / github.com/jetify-com/devbox / PackageFromStringWithOptions

Function PackageFromStringWithOptions

internal/devpkg/package.go:126–133  ·  view source on GitHub ↗
(raw string, locker lock.Locker, opts devopt.AddOpts)

Source from the content-addressed store, hash-verified

124}
125
126func PackageFromStringWithOptions(raw string, locker lock.Locker, opts devopt.AddOpts) *Package {
127 pkg := PackageFromStringWithDefaults(raw, locker)
128 pkg.DisablePlugin = opts.DisablePlugin
129 pkg.Patch = pkgNeedsPatch(pkg.CanonicalName(), configfile.PatchMode(opts.Patch))
130 pkg.outputs.selectedNames = lo.Uniq(append(pkg.outputs.selectedNames, opts.Outputs...))
131 pkg.AllowInsecure = opts.AllowInsecure
132 return pkg
133}
134
135func newPackage(raw string, isInstallable func() bool, locker lock.Locker) *Package {
136 pkg := &Package{

Callers 2

AddMethod · 0.92

Calls 4

PatchModeTypeAlias · 0.92
pkgNeedsPatchFunction · 0.85
CanonicalNameMethod · 0.65

Tested by

no test coverage detected