Skip to content

BREAKING CHANGE: remove sites and endpoint definitions #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pkg/codeconfig/codeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,6 @@ func (c *codeConfig) ToStack() (*stack.Stack, error) {
Queues: map[string]stack.Queue{},
Schedules: map[string]stack.Schedule{},
Apis: map[string]string{},
Sites: map[string]stack.Site{},
EntryPoints: map[string]stack.Entrypoint{},
}
errs := utils.NewErrorList()
for handler, f := range c.functions {
Expand Down
34 changes: 0 additions & 34 deletions pkg/stack/site_helper.go

This file was deleted.

25 changes: 0 additions & 25 deletions pkg/stack/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,29 +121,6 @@ type Topic struct{}

type Queue struct{}

// A static site deployment with Nitric
// We also support server rendered applications
type Site struct {
// Base path of the site
// Will be used to execute scripts
Path string `yaml:"path"`
// Path to get assets to upload
// this will be relative to path
AssetPath string `yaml:"assetPath"`
// Build scripts to execute before upload
BuildScripts []string `yaml:"buildScripts,omitempty"`
}

type EntrypointPath struct {
Target string `yaml:"target"`
Type string `yaml:"type"` // 'site' | 'api' | 'function' | 'container';
}

type Entrypoint struct {
Domains []string `yaml:"domains,omitempty"`
Paths map[string]EntrypointPath `yaml:"paths,omitempty"`
}

type Stack struct {
dir string
Name string `yaml:"name"`
Expand All @@ -156,8 +133,6 @@ type Stack struct {
Schedules map[string]Schedule `yaml:"schedules,omitempty"`
apiDocs map[string]*openapi3.T `yaml:"-"`
Apis map[string]string `yaml:"apis,omitempty"`
Sites map[string]Site `yaml:"sites,omitempty"`
EntryPoints map[string]Entrypoint `yaml:"entrypoints,omitempty"`
}

func (s *Stack) SetApiDoc(name string, doc *openapi3.T) {
Expand Down