• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / cli / 13685581861

05 Mar 2025 09:09PM UTC coverage: 57.87% (+0.001%) from 57.869%
13685581861

push

github

web-flow
fix: move function deploy to public package (#3253)

35 of 49 new or added lines in 3 files covered. (71.43%)

7850 of 13565 relevant lines covered (57.87%)

199.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

52.94
/pkg/function/api.go
1
package function
2

3
import (
4
        "context"
5
        "io"
6

7
        "github.com/supabase/cli/pkg/api"
8
)
9

10
type EdgeRuntimeAPI struct {
11
        project string
12
        client  api.ClientWithResponses
13
        eszip   EszipBundler
14
        maxJobs uint
15
}
16

17
type EszipBundler interface {
18
        Bundle(ctx context.Context, entrypoint string, importMap string, staticFiles []string, output io.Writer) error
19
}
20

21
func NewEdgeRuntimeAPI(project string, client api.ClientWithResponses, opts ...withOption) EdgeRuntimeAPI {
2✔
22
        result := EdgeRuntimeAPI{client: client, project: project}
2✔
23
        for _, apply := range opts {
3✔
24
                apply(&result)
1✔
25
        }
1✔
26
        if result.maxJobs == 0 {
4✔
27
                result.maxJobs = 1
2✔
28
        }
2✔
29
        return result
2✔
30
}
31

32
type withOption func(*EdgeRuntimeAPI)
33

NEW
34
func WithBundler(bundler EszipBundler) withOption {
×
NEW
35
        return func(era *EdgeRuntimeAPI) {
×
NEW
36
                era.eszip = bundler
×
NEW
37
        }
×
38
}
39

NEW
40
func WithMaxJobs(maxJobs uint) withOption {
×
NEW
41
        return func(era *EdgeRuntimeAPI) {
×
NEW
42
                era.maxJobs = maxJobs
×
NEW
43
        }
×
44
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc