repoclone

package
v0.4.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

Package repoclone implements local JVS project cloning.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRemoteLikeInput

func IsRemoteLikeInput(input string) bool

IsRemoteLikeInput reports remote URL and git/scp-style inputs while leaving ordinary local paths, including Windows drive paths, alone.

func SetCapacityGateForTest

func SetCapacityGateForTest(gate capacitygate.Gate) func()

SetCapacityGateForTest installs a clone capacity gate for tests.

Types

type Hooks

type Hooks struct {
	BeforePublish                func(stagingPath, targetPath string) error
	AfterSeparatedPayloadPublish func(publishedPayloadRoot, targetPayloadRoot string) error
}

type Options

type Options struct {
	SourceRepoRoot    string
	TargetPath        string
	TargetControlRoot string
	TargetPayloadRoot string
	SavePointsMode    SavePointsMode
	DryRun            bool
	RequestedEngine   model.EngineType
	TransferPlanner   transfer.EnginePlanner
	Hooks             Hooks
}

type Result

type Result struct {
	Operation                  string             `json:"operation"`
	SourceRepoRoot             string             `json:"source_repo_root"`
	TargetRepoRoot             string             `json:"target_repo_root,omitempty"`
	TargetFolder               string             `json:"target_folder,omitempty"`
	TargetControlRoot          string             `json:"target_control_root,omitempty"`
	TargetPayloadRoot          string             `json:"-"`
	SourceRepoID               string             `json:"source_repo_id"`
	TargetRepoID               string             `json:"target_repo_id,omitempty"`
	SavePointsMode             SavePointsMode     `json:"save_points_mode"`
	SavePointsCopiedCount      int                `json:"save_points_copied_count"`
	SavePointsCopied           []model.SnapshotID `json:"save_points_copied"`
	WorkspacesCreated          []string           `json:"workspaces_created"`
	SourceWorkspacesNotCreated []string           `json:"source_workspaces_not_created"`
	RuntimeStateCopied         bool               `json:"runtime_state_copied"`
	CloneManifest              string             `json:"clone_manifest,omitempty"`
	DoctorStrict               string             `json:"-"`
	DryRun                     bool               `json:"dry_run,omitempty"`
	Transfers                  []transfer.Record  `json:"transfers"`
	NewestSavePoint            string             `json:"newest_save_point,omitempty"`
}

func Clone

func Clone(options Options) (*Result, error)

Clone plans or executes a local JVS project clone.

type SavePointsMode

type SavePointsMode string
const (
	SavePointsModeAll  SavePointsMode = "all"
	SavePointsModeMain SavePointsMode = "main"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL