Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ Not applicable (proxied to Go binary).
- Requires a linked project (`--project-ref` or linked project config).
- Uses Docker by default to bundle functions; `--use-api` switches to server-side bundling.
- `--prune` deletes functions that exist in the Supabase project but not locally.
- `--jobs` (`-j`) sets the maximum number of parallel deploys; must be combined with `--use-api`.
- Phase 0 proxy: all invocations are forwarded to the bundled Go binary.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ const config = {
prune: Flag.boolean("prune").pipe(
Flag.withDescription("Delete Functions that exist in Supabase project but not locally."),
),
jobs: Flag.integer("jobs").pipe(
Flag.withAlias("j"),
Flag.withDescription("Maximum number of parallel jobs."),
Flag.optional,
),
} as const;

export const legacyFunctionsDeployCommand = Command.make("deploy", config).pipe(
Expand All @@ -36,6 +41,7 @@ export const legacyFunctionsDeployCommand = Command.make("deploy", config).pipe(
useApi: flags.useApi,
importMap: flags.importMap,
prune: flags.prune,
jobs: flags.jobs,
}),
),
);
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface LegacyFunctionsDeployFlags {
readonly useApi: boolean;
readonly importMap: Option.Option<string>;
readonly prune: boolean;
readonly jobs: Option.Option<number>;
}

export const legacyFunctionsDeploy = Effect.fn("legacy.functions.deploy")(function* (
Expand All @@ -21,5 +22,6 @@ export const legacyFunctionsDeploy = Effect.fn("legacy.functions.deploy")(functi
if (flags.useApi) args.push("--use-api");
if (Option.isSome(flags.importMap)) args.push("--import-map", flags.importMap.value);
if (flags.prune) args.push("--prune");
if (Option.isSome(flags.jobs)) args.push("--jobs", String(flags.jobs.value));
yield* proxy.exec(args);
});
Loading