MCPcopy
hub / github.com/wavetermdev/waveterm / ReadAppManifest

Function ReadAppManifest

pkg/waveappstore/waveappstore.go:722–744  ·  view source on GitHub ↗
(appId string)

Source from the content-addressed store, hash-verified

720}
721
722func ReadAppManifest(appId string) (*wshrpc.AppManifest, error) {
723 if err := ValidateAppId(appId); err != nil {
724 return nil, fmt.Errorf("invalid appId: %w", err)
725 }
726
727 appDir, err := GetAppDir(appId)
728 if err != nil {
729 return nil, err
730 }
731
732 manifestPath := filepath.Join(appDir, ManifestFileName)
733 data, err := os.ReadFile(manifestPath)
734 if err != nil {
735 return nil, fmt.Errorf("failed to read %s: %w", ManifestFileName, err)
736 }
737
738 var manifest wshrpc.AppManifest
739 if err := json.Unmarshal(data, &manifest); err != nil {
740 return nil, fmt.Errorf("failed to parse %s: %w", ManifestFileName, err)
741 }
742
743 return &manifest, nil
744}
745
746func ReadAppSecretBindings(appId string) (map[string]string, error) {
747 if err := ValidateAppId(appId); err != nil {

Callers 5

runBuilderAppMethod · 0.92
GetStatusMethod · 0.92
setManifestMetadataMethod · 0.92
ListAllAppsFunction · 0.85
ListAllEditableAppsFunction · 0.85

Calls 3

ValidateAppIdFunction · 0.85
GetAppDirFunction · 0.85
ReadFileMethod · 0.80

Tested by

no test coverage detected