bundle

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright © 2025 KubeRocketAI Team

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	// FileStartDelimiter marks the beginning of a file section in a bundle
	FileStartDelimiter = "==== FILE: "

	// FileEndDelimiter marks the end of a file section in a bundle
	FileEndDelimiter = "==== END FILE ===="
)

Bundle format delimiters

View Source
const (
	// FilePermissions defines the default permission mode for created files
	FilePermissions = 0644

	// DirPermissions defines the default permission mode for created directories
	DirPermissions = 0755
)

File system permissions

Variables

This section is empty.

Functions

func GenerateBundleFilename

func GenerateBundleFilename(customOutput string, selectedAgents []string) string

GenerateBundleFilename creates the bundle filename

Types

type ExtractedFile added in v0.45.0

type ExtractedFile struct {
	Path    string
	Content string
}

ExtractedFile represents a file extracted from a bundle

func ParseBundle added in v0.45.0

func ParseBundle(reader io.Reader) ([]ExtractedFile, error)

ParseBundle parses a bundle markdown file and extracts all files

type Extractor added in v0.45.0

type Extractor struct {
	// contains filtered or unexported fields
}

Extractor handles extracting files from a bundle to the filesystem

func NewExtractor added in v0.45.0

func NewExtractor(projectRoot string) *Extractor

NewExtractor creates a new bundle extractor

func (*Extractor) DryRun added in v0.45.0

func (e *Extractor) DryRun(files []ExtractedFile) []string

DryRun returns information about what would be extracted without actually writing files

func (*Extractor) Extract added in v0.45.0

func (e *Extractor) Extract(files []ExtractedFile) (*ExtractorStats, error)

Extract writes the extracted files to the filesystem

type ExtractorStats added in v0.45.0

type ExtractorStats struct {
	FilesExtracted   int
	FilesOverwritten int
	DirsCreated      int
}

ExtractorStats holds statistics about the extraction process

Jump to

Keyboard shortcuts

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