@@ -16,7 +16,6 @@ import (
16
16
17
17
func Run (ctx context.Context , slugs []string , projectRef string , noVerifyJWT * bool , importMapPath string , fsys afero.Fs ) error {
18
18
// Load function config and project id
19
- var skippedFunctions []string
20
19
if err := utils .LoadConfigFS (fsys ); err != nil {
21
20
return err
22
21
} else if len (slugs ) > 0 {
@@ -25,12 +24,9 @@ func Run(ctx context.Context, slugs []string, projectRef string, noVerifyJWT *bo
25
24
return err
26
25
}
27
26
}
28
- } else if slugs , skippedFunctions , err = GetFunctionSlugs (fsys ); err != nil {
27
+ } else if slugs , err = GetFunctionSlugs (fsys ); err != nil {
29
28
return err
30
29
}
31
- if len (skippedFunctions ) > 0 {
32
- fmt .Fprintf (utils .GetDebugLogger (), "Skipped deploying the following functions: %s\n " , strings .Join (skippedFunctions , ", " ))
33
- }
34
30
// TODO: require all functions to be deployed from config for v2
35
31
if len (slugs ) == 0 {
36
32
return errors .Errorf ("No Functions specified or found in %s" , utils .Bold (utils .FunctionsDir ))
@@ -49,23 +45,19 @@ func Run(ctx context.Context, slugs []string, projectRef string, noVerifyJWT *bo
49
45
return nil
50
46
}
51
47
52
- func GetFunctionSlugs (fsys afero.Fs ) (slugs []string , disabledSlugs [] string , err error ) {
48
+ func GetFunctionSlugs (fsys afero.Fs ) (slugs []string , err error ) {
53
49
pattern := filepath .Join (utils .FunctionsDir , "*" , "index.ts" )
54
50
paths , err := afero .Glob (fsys , pattern )
55
51
if err != nil {
56
- return nil , nil , errors .Errorf ("failed to glob function slugs: %w" , err )
52
+ return nil , errors .Errorf ("failed to glob function slugs: %w" , err )
57
53
}
58
54
for _ , path := range paths {
59
55
slug := filepath .Base (filepath .Dir (path ))
60
56
if utils .FuncSlugPattern .MatchString (slug ) {
61
- if isFunctionEnabled (slug ) {
62
- slugs = append (slugs , slug )
63
- } else {
64
- disabledSlugs = append (disabledSlugs , slug )
65
- }
57
+ slugs = append (slugs , slug )
66
58
}
67
59
}
68
- return slugs , disabledSlugs , nil
60
+ return slugs , nil
69
61
}
70
62
71
63
func GetFunctionConfig (slugs []string , importMapPath string , noVerifyJWT * bool , fsys afero.Fs ) (config.FunctionConfig , error ) {
@@ -100,9 +92,3 @@ func GetFunctionConfig(slugs []string, importMapPath string, noVerifyJWT *bool,
100
92
}
101
93
return functionConfig , nil
102
94
}
103
-
104
- func isFunctionEnabled (slug string ) bool {
105
- functionConfig := utils .Config .Functions [slug ]
106
- // If the function config Enabled is not defined, or defined and set to true
107
- return functionConfig .Enabled == nil || * functionConfig .Enabled
108
- }
0 commit comments