diff --git a/pkg/codeconfig/codeconfig.go b/pkg/codeconfig/codeconfig.go index c20b6be73..4a940f93a 100644 --- a/pkg/codeconfig/codeconfig.go +++ b/pkg/codeconfig/codeconfig.go @@ -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 { diff --git a/pkg/stack/site_helper.go b/pkg/stack/site_helper.go deleted file mode 100644 index 5c16b49c3..000000000 --- a/pkg/stack/site_helper.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright Nitric Pty Ltd. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -package stack - -import ( - "os/exec" - "path" -) - -func (s *Site) Build(st *Stack) error { - for _, script := range s.BuildScripts { - cmd := exec.Command(script) - cmd.Dir = path.Join(stackPath, s.Path) - err := cmd.Run() - if err != nil { - return err - } - } - return nil -} diff --git a/pkg/stack/types.go b/pkg/stack/types.go index 372bc6a8d..7e70283ff 100644 --- a/pkg/stack/types.go +++ b/pkg/stack/types.go @@ -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"` @@ -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) {