Skip to content

Commit 98ac5ce

Browse files
authored
Merge pull request #449 from kindlyops/pocketbase
Pocketbase
2 parents 7564e2a + a33fa55 commit 98ac5ce

File tree

3,142 files changed

+4764126
-1498
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,142 files changed

+4764126
-1498
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v1.7.4/bazelisk-linux-amd64
1616
sudo chmod +x /usr/local/bin/bazel
1717
- name: Check out code into the Go module directory
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
1919
with:
2020
token: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
2121
ref: ${{ github.head_ref }}
@@ -47,7 +47,7 @@ jobs:
4747
- name: Set up Go
4848
uses: actions/setup-go@master
4949
with:
50-
go-version: 1.17.6
50+
go-version: 1.18.4
5151
- name: setup-syft
5252
run: |
5353
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | \

.github/workflows/lint.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
name: fast lint checks
2-
on:
2+
on:
33
pull_request:
44
types: [opened, reopened, labeled, unlabeled, synchronize]
55

6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
610
jobs:
711
shellcheck:
812
name: runner / shellcheck
913
runs-on: ubuntu-latest
1014
steps:
11-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1216
- name: shellcheck
1317
uses: reviewdog/action-shellcheck@v1
1418
with:
15-
github_token: ${{ secrets.github_token }}
19+
github_token: ${{ secrets.GITHUB_TOKEN }}
1620
reporter: github-pr-review # Change reporter.
1721
path: "." # Optional.
1822
pattern: "*.sh" # Optional.
@@ -24,12 +28,12 @@ jobs:
2428
runs-on: ubuntu-latest
2529
steps:
2630
- name: Check out code into the Go module directory
27-
uses: actions/checkout@v2
31+
uses: actions/checkout@v3
2832
- name: golangci-lint
2933
uses: reviewdog/action-golangci-lint@v2
3034
with:
3135
reporter: github-pr-review
32-
github_token: ${{ secrets.github_token }}
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
3337
golangci_lint_flags: "--config=.golangci.yml"
3438
verify-labels:
3539
name: verify labels

.github/workflows/release-publisher.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Set up Go
1212
uses: actions/setup-go@master
1313
with:
14-
go-version: 1.17.2
14+
go-version: 1.18.4
1515
- name: Install bazelisk
1616
run: |
1717
sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v1.3.0/bazelisk-linux-amd64

WORKSPACE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe
2020

2121
go_rules_dependencies()
2222

23-
go_register_toolchains(version = "1.17.6")
23+
go_register_toolchains(version = "1.18.4")
2424

2525
http_archive(
2626
name = "bazel_gazelle",
27-
sha256 = "501deb3d5695ab658e82f6f6f549ba681ea3ca2a5fb7911154b5aa45596183fa",
27+
sha256 = "efbbba6ac1a4fd342d5122cbdfdb82aeb2cf2862e35022c752eaddffada7c3f3",
2828
urls = [
29-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.26.0/bazel-gazelle-v0.26.0.tar.gz",
30-
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.26.0/bazel-gazelle-v0.26.0.tar.gz",
29+
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.27.0/bazel-gazelle-v0.27.0.tar.gz",
30+
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.27.0/bazel-gazelle-v0.27.0.tar.gz",
3131
],
3232
)
3333

cmd/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ go_library(
44
name = "go_default_library",
55
srcs = [
66
"chapters.go",
7+
"fly.go",
78
"ivs.go",
89
"lighting.go",
910
"play.go",
@@ -28,6 +29,7 @@ go_library(
2829
"//vendor/github.com/kennygrant/sanitize:go_default_library",
2930
"//vendor/github.com/mattn/go-isatty:go_default_library",
3031
"//vendor/github.com/muesli/coral:go_default_library",
32+
"//vendor/github.com/pocketbase/pocketbase:go_default_library",
3133
"//vendor/github.com/rs/zerolog:go_default_library",
3234
"//vendor/github.com/rs/zerolog/log:go_default_library",
3335
"//vendor/github.com/spf13/viper:go_default_library",

cmd/fly.go

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Copyright © 2022 Kindly Ops, LLC <support@kindlyops.com>
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package cmd
16+
17+
import (
18+
"github.com/muesli/coral"
19+
"github.com/pocketbase/pocketbase"
20+
"github.com/rs/zerolog/log"
21+
"github.com/spf13/viper"
22+
)
23+
24+
var flyServerCmd = &coral.Command{
25+
Use: "serve",
26+
Short: "Run pocketbase http server",
27+
Long: `Serve pocketbase web requests.`,
28+
Run: flyServer,
29+
Args: coral.ExactArgs(0),
30+
}
31+
32+
func flyServer(cmd *coral.Command, args []string) {
33+
_ = "127.0.0.1:" + viper.GetString("port")
34+
35+
log.Debug().Msgf("running pocketbase\n")
36+
app := pocketbase.New()
37+
if err := app.Start(); err != nil {
38+
log.Fatal().Err(err).Msg("error starting pocketbase")
39+
}
40+
41+
// app.RootCmd.AddCommand(&cobra.Command{
42+
// Use: "fly",
43+
// Run: func(command *cobra.Command, args []string) {
44+
// log.Debug().Msgf("Pocketbase interceptor no-op")
45+
// if err := app.Execute(); err != nil {
46+
// log.Fatal().Err(err).Msg("error starting pocketbase")
47+
// }
48+
// },
49+
// })
50+
}
51+
52+
// Port to listen for HTTP requests.
53+
var FlyPort string
54+
55+
func init() {
56+
flyServerCmd.Flags().StringVarP(&FlyPort, "port", "p", "8080", "Port to listen for HTTP requests")
57+
viper.BindPFlag("port", flyServerCmd.Flags().Lookup("port"))
58+
rootCmd.AddCommand(flyServerCmd)
59+
}

embeddy/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ go_library(
3030
embedsrcs = [":next_export"],
3131
importpath = "github.com/kindlyops/vbs/embeddy",
3232
visibility = ["//visibility:public"],
33+
deps = ["//vendor/github.com/labstack/echo/v5:go_default_library"],
3334
)

go.mod

Lines changed: 73 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module github.com/kindlyops/vbs
22

3-
go 1.17
3+
go 1.18
44

55
require (
6-
github.com/aws/aws-sdk-go v1.43.16
6+
github.com/aws/aws-sdk-go v1.44.85
77
github.com/hypebeast/go-osc v0.0.0-20220306225357-49b74755c17b
88
github.com/kennygrant/sanitize v1.2.4
99
github.com/mattn/go-isatty v0.0.16
@@ -17,39 +17,104 @@ require (
1717
github.com/charmbracelet/bubbletea v0.22.1
1818
github.com/charmbracelet/lipgloss v0.6.0
1919
github.com/muesli/coral v1.0.0
20+
github.com/pocketbase/pocketbase v0.7.5
2021
)
2122

2223
require (
24+
github.com/AlecAivazis/survey/v2 v2.3.5 // indirect
25+
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
26+
github.com/aws/aws-sdk-go-v2 v1.16.11 // indirect
27+
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.4 // indirect
28+
github.com/aws/aws-sdk-go-v2/config v1.17.1 // indirect
29+
github.com/aws/aws-sdk-go-v2/credentials v1.12.14 // indirect
30+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12 // indirect
31+
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.27 // indirect
32+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18 // indirect
33+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12 // indirect
34+
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19 // indirect
35+
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.9 // indirect
36+
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.5 // indirect
37+
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.13 // indirect
38+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12 // indirect
39+
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.12 // indirect
40+
github.com/aws/aws-sdk-go-v2/service/s3 v1.27.5 // indirect
41+
github.com/aws/aws-sdk-go-v2/service/sso v1.11.17 // indirect
42+
github.com/aws/aws-sdk-go-v2/service/sts v1.16.13 // indirect
43+
github.com/aws/smithy-go v1.12.1 // indirect
2344
github.com/charmbracelet/harmonica v0.2.0 // indirect
2445
github.com/containerd/console v1.0.3 // indirect
46+
github.com/disintegration/imaging v1.6.2 // indirect
47+
github.com/domodwyer/mailyak/v3 v3.3.4 // indirect
48+
github.com/fatih/color v1.13.0 // indirect
2549
github.com/fsnotify/fsnotify v1.5.4 // indirect
50+
github.com/gabriel-vasile/mimetype v1.4.1 // indirect
51+
github.com/ganigeorgiev/fexpr v0.1.1 // indirect
52+
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 // indirect
53+
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
54+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
55+
github.com/golang/protobuf v1.5.2 // indirect
56+
github.com/google/uuid v1.3.0 // indirect
57+
github.com/google/wire v0.5.0 // indirect
58+
github.com/googleapis/gax-go/v2 v2.5.1 // indirect
2659
github.com/hashicorp/hcl v1.0.0 // indirect
27-
github.com/inconshreveable/mousetrap v1.0.0 // indirect
60+
github.com/inconshreveable/mousetrap v1.0.1 // indirect
2861
github.com/jmespath/go-jmespath v0.4.0 // indirect
62+
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
63+
github.com/labstack/echo/v5 v5.0.0-20220201181537-ed2888cfa198 // indirect
2964
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
3065
github.com/magiconair/properties v1.8.6 // indirect
31-
github.com/mattn/go-colorable v0.1.12 // indirect
66+
github.com/mattn/go-colorable v0.1.13 // indirect
3267
github.com/mattn/go-localereader v0.0.1 // indirect
3368
github.com/mattn/go-runewidth v0.0.13 // indirect
69+
github.com/mattn/go-sqlite3 v1.14.15 // indirect
70+
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
3471
github.com/mitchellh/mapstructure v1.5.0 // indirect
3572
github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect
3673
github.com/muesli/cancelreader v0.2.2 // indirect
3774
github.com/muesli/reflow v0.3.0 // indirect
3875
github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739 // indirect
3976
github.com/pelletier/go-toml v1.9.5 // indirect
4077
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
78+
github.com/pocketbase/dbx v1.6.0 // indirect
79+
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
4180
github.com/rivo/uniseg v0.2.0 // indirect
4281
github.com/spf13/afero v1.8.2 // indirect
4382
github.com/spf13/cast v1.5.0 // indirect
83+
github.com/spf13/cobra v1.5.0 // indirect
4484
github.com/spf13/jwalterweatherman v1.1.0 // indirect
4585
github.com/spf13/pflag v1.0.5 // indirect
4686
github.com/subosito/gotenv v1.4.1 // indirect
47-
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect
48-
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
49-
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
87+
github.com/valyala/bytebufferpool v1.0.0 // indirect
88+
github.com/valyala/fasttemplate v1.2.1 // indirect
89+
go.opencensus.io v0.23.0 // indirect
90+
gocloud.dev v0.26.0 // indirect
91+
golang.org/x/crypto v0.0.0-20220824171710-5757bc0c5503 // indirect
92+
golang.org/x/image v0.0.0-20220722155232-062f8c9fd539 // indirect
93+
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
94+
golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c // indirect
95+
golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 // indirect
96+
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64 // indirect
97+
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
5098
golang.org/x/text v0.3.7 // indirect
51-
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
99+
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
100+
golang.org/x/tools v0.1.12 // indirect
101+
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
102+
google.golang.org/api v0.94.0 // indirect
103+
google.golang.org/appengine v1.6.7 // indirect
104+
google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc // indirect
105+
google.golang.org/grpc v1.49.0 // indirect
106+
google.golang.org/protobuf v1.28.1 // indirect
52107
gopkg.in/ini.v1 v1.67.0 // indirect
53108
gopkg.in/yaml.v2 v2.4.0 // indirect
54109
gopkg.in/yaml.v3 v3.0.1 // indirect
110+
lukechampine.com/uint128 v1.2.0 // indirect
111+
modernc.org/cc/v3 v3.36.3 // indirect
112+
modernc.org/ccgo/v3 v3.16.9 // indirect
113+
modernc.org/libc v1.17.0 // indirect
114+
modernc.org/mathutil v1.5.0 // indirect
115+
modernc.org/memory v1.2.0 // indirect
116+
modernc.org/opt v0.1.3 // indirect
117+
modernc.org/sqlite v1.18.1 // indirect
118+
modernc.org/strutil v1.1.2 // indirect
119+
modernc.org/token v1.0.0 // indirect
55120
)

0 commit comments

Comments
 (0)