|
54 | 54 |
|
55 | 55 | useApi bool
|
56 | 56 | useDocker bool
|
57 |
| - noVerifyJWT = new(bool) |
58 | 57 | useLegacyBundle bool
|
| 58 | + noVerifyJWT = new(bool) |
59 | 59 | importMapPath string
|
60 | 60 |
|
61 | 61 | functionsDeployCmd = &cobra.Command{
|
|
67 | 67 | if !cmd.Flags().Changed("no-verify-jwt") {
|
68 | 68 | noVerifyJWT = nil
|
69 | 69 | }
|
| 70 | + if useApi { |
| 71 | + useDocker = false |
| 72 | + } |
70 | 73 | return deploy.Run(cmd.Context(), args, useDocker, noVerifyJWT, importMapPath, afero.NewOsFs())
|
71 | 74 | },
|
72 | 75 | }
|
@@ -126,14 +129,14 @@ func init() {
|
126 | 129 | functionsListCmd.Flags().StringVar(&flags.ProjectRef, "project-ref", "", "Project ref of the Supabase project.")
|
127 | 130 | functionsDeleteCmd.Flags().StringVar(&flags.ProjectRef, "project-ref", "", "Project ref of the Supabase project.")
|
128 | 131 | deployFlags := functionsDeployCmd.Flags()
|
129 |
| - deployFlags.BoolVar(&useApi, "use-api", true, "Use Management API to bundle functions.") |
130 |
| - deployFlags.BoolVar(&useDocker, "use-docker", false, "Use Docker to bundle functions.") |
131 |
| - functionsDeployCmd.MarkFlagsMutuallyExclusive("use-api", "use-docker") |
| 132 | + deployFlags.BoolVar(&useApi, "use-api", false, "Use Management API to bundle functions.") |
| 133 | + deployFlags.BoolVar(&useDocker, "use-docker", true, "Use Docker to bundle functions.") |
| 134 | + deployFlags.BoolVar(&useLegacyBundle, "legacy-bundle", false, "Use legacy bundling mechanism.") |
| 135 | + functionsDeployCmd.MarkFlagsMutuallyExclusive("use-api", "use-docker", "legacy-bundle") |
| 136 | + cobra.CheckErr(deployFlags.MarkHidden("legacy-bundle")) |
132 | 137 | deployFlags.BoolVar(noVerifyJWT, "no-verify-jwt", false, "Disable JWT verification for the Function.")
|
133 | 138 | deployFlags.StringVar(&flags.ProjectRef, "project-ref", "", "Project ref of the Supabase project.")
|
134 |
| - deployFlags.BoolVar(&useLegacyBundle, "legacy-bundle", false, "Use legacy bundling mechanism.") |
135 | 139 | deployFlags.StringVar(&importMapPath, "import-map", "", "Path to import map file.")
|
136 |
| - cobra.CheckErr(deployFlags.MarkHidden("legacy-bundle")) |
137 | 140 | functionsServeCmd.Flags().BoolVar(noVerifyJWT, "no-verify-jwt", false, "Disable JWT verification for the Function.")
|
138 | 141 | functionsServeCmd.Flags().StringVar(&envFilePath, "env-file", "", "Path to an env file to be populated to the Function environment.")
|
139 | 142 | functionsServeCmd.Flags().StringVar(&importMapPath, "import-map", "", "Path to import map file.")
|
|
0 commit comments