Skip to content

Commit 6ff942e

Browse files
committed
feat: change projectName to project
1 parent 1b4e54b commit 6ff942e

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

workspace.go

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,10 @@ var initWorkspaceCommand = cli.Command{
3434
}
3535

3636
func handleInitWorkspace(ctx context.Context, cmd *cli.Command) error {
37-
titleStyle := lipgloss.NewStyle().
38-
Bold(true).
39-
Foreground(lipgloss.Color("11"))
40-
41-
fmt.Printf("%s\n", titleStyle.Render("workspace init"))
42-
4337
// Check for existing workspace configuration
4438
existingConfig, existingPath, err := FindWorkspaceConfig()
4539
if err == nil && existingConfig != nil {
46-
fmt.Printf("Existing workspace detected: %s (project: %s)\n", aurora.Bold(existingPath), existingConfig.ProjectName)
40+
fmt.Printf("Existing workspace detected: %s (project: %s)\n", aurora.Bold(existingPath), existingConfig.Project)
4741
}
4842

4943
// Get current directory and show where the file will be written
@@ -182,7 +176,7 @@ func createProjectValidator(projectInfoMap map[string]projectInfo) func(string)
182176

183177
// WorkspaceConfig stores workspace-level configuration
184178
type WorkspaceConfig struct {
185-
ProjectName string `json:"projectName"`
179+
Project string `json:"project"`
186180
OpenAPISpec string `json:"openapi_spec,omitempty"`
187181
StainlessConfig string `json:"stainless_config,omitempty"`
188182
}
@@ -249,10 +243,10 @@ func SaveWorkspaceConfig(configPath string, config *WorkspaceConfig) error {
249243
// GetProjectNameFromConfig returns the project name from workspace config if available
250244
func GetProjectNameFromConfig() string {
251245
config, _, err := FindWorkspaceConfig()
252-
if err != nil || config == nil || config.ProjectName == "" {
246+
if err != nil || config == nil || config.Project == "" {
253247
return ""
254248
}
255-
return config.ProjectName
249+
return config.Project
256250
}
257251

258252
// InitWorkspaceConfig initializes a new workspace config in the current directory
@@ -265,7 +259,7 @@ func InitWorkspaceConfig(projectName, openAPISpec, stainlessConfig string) error
265259

266260
configPath := filepath.Join(dir, "stainless-workspace.json")
267261
config := WorkspaceConfig{
268-
ProjectName: projectName,
262+
Project: projectName,
269263
OpenAPISpec: openAPISpec,
270264
StainlessConfig: stainlessConfig,
271265
}

0 commit comments

Comments
 (0)