Initial git-clone Paseo plugin (refactored from gitea-clone)
This commit is contained in:
commit
2fa79ffc69
14 files changed
+5229
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import { defineRpc } from "@getpaseo/plugin";
|
||||
import { z } from "zod";
|
||||
|
||||
export * from "./git-url";
|
||||
|
||||
export const gitCloneStatusRpc = defineRpc({
|
||||
name: "gitClone.status",
|
||||
input: z.object({}),
|
||||
output: z.object({
|
||||
gitAvailable: z.boolean(),
|
||||
gitVersion: z.string().nullable(),
|
||||
suggestedTargetDirectory: z.string(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const gitCloneRepoRpc = defineRpc({
|
||||
name: "gitClone.clone",
|
||||
input: z.object({
|
||||
url: z.string().min(1).max(2000),
|
||||
targetDirectory: z.string().min(1).max(1000),
|
||||
directoryName: z.string().max(255).optional(),
|
||||
branch: z.string().max(255).optional(),
|
||||
}),
|
||||
output: z.object({
|
||||
path: z.string(),
|
||||
url: z.string(),
|
||||
name: z.string(),
|
||||
alreadyExists: z.boolean(),
|
||||
}),
|
||||
});
|
||||
Reference in new issue
Block a user