Skip to content

Commit dbf63e3

Browse files
committed
delete email and ssh, rework crons
1 parent aed99a4 commit dbf63e3

File tree

18 files changed

+211
-1329
lines changed

18 files changed

+211
-1329
lines changed

.vscode/launch.json

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,13 @@
77
"program": "${workspaceFolder}/main.go",
88
"args": [
99
"up",
10-
"--addr=:7777",
11-
"--ssh-addr=:2222",
12-
"--smtp-addr=:2525",
13-
// "--log-output=${workspaceFolder}/example/logs/data/smallweb.log"
10+
"--enable-crons"
1411
],
1512
"cwd": "${workspaceFolder}/example",
1613
"env": {
1714
"DENO_TLS_CA_STORE": "system",
1815
},
1916
},
20-
{
21-
"name": "smallweb.run up",
22-
"type": "go",
23-
"request": "launch",
24-
"program": "${workspaceFolder}/main.go",
25-
"args": [
26-
"up",
27-
"--domain=smallweb.localhost",
28-
"--addr=:7777",
29-
"--ssh-addr=:2222"
30-
],
31-
"cwd": "${userHome}/smallweb/smallweb.run",
32-
"env": {
33-
"DENO_TLS_CA_STORE": "system",
34-
},
35-
},
3617
{
3718
"name": "smallweb cli",
3819
"type": "go",
@@ -42,8 +23,9 @@
4223
"args": [
4324
"ls"
4425
],
26+
"cwd": "${workspaceFolder}/example",
4527
"env": {
46-
"SMALLWEB_DIR": "${workspaceFolder}/example",
28+
"DENO_TLS_CA_STORE": "system",
4729
},
4830
},
4931
{

example/.smallweb/config.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"$schema": "../../schemas/config.schema.json",
3-
"domain": "smallweb.traefik.me"
3+
"domain": "smallweb.live"
44
}

example/cron/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default {
2-
run() {
3-
console.log('Cron job running...');
2+
fetch: () => {
3+
return new Response("Hello from the cron job!")
44
}
5-
}
5+
} satisfies Deno.ServeDefaultExport

example/cron/smallweb.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"crons": [
33
{
44
"schedule": "* * * * *",
5-
"args": []
5+
"path": "/cron"
66
}
77
]
88
}

example/hono/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import { Hono } from 'hono'
22

33
const app = new Hono()
44

5-
app.get('/', (c) => c.text('Hono!'))
5+
app.get('/', (c) => c.text(c.req.url))
66

77
export default app

go.mod

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,19 @@ require (
1919
)
2020

2121
require (
22-
github.com/abiosoft/ishell/v2 v2.0.2
23-
github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db
2422
github.com/caddyserver/certmagic v0.25.2
2523
github.com/charmbracelet/ssh v0.0.0-20250826160808-ebfa259c7309
2624
github.com/charmbracelet/wish v1.4.7
27-
github.com/creack/pty v1.1.24
2825
github.com/fsnotify/fsnotify v1.9.0
2926
github.com/getsops/sops/v3 v3.12.1
3027
github.com/knadh/koanf/providers/confmap v1.0.0
3128
github.com/knadh/koanf/providers/posflag v1.0.1
3229
github.com/leaanthony/gosod v1.0.4
3330
github.com/lmittmann/tint v1.1.3
34-
github.com/mhale/smtpd v0.8.3
3531
github.com/pkg/sftp v1.13.10
3632
github.com/robfig/cron/v3 v3.0.1
3733
github.com/samber/slog-http v1.12.0
3834
go.uber.org/zap v1.27.1
39-
golang.org/x/crypto v0.48.0
4035
gopkg.in/natefinch/lumberjack.v2 v2.2.1
4136
)
4237

@@ -64,7 +59,6 @@ require (
6459
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.55.0 // indirect
6560
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.55.0 // indirect
6661
github.com/ProtonMail/go-crypto v1.4.0 // indirect
67-
github.com/abiosoft/ishell v2.0.0+incompatible // indirect
6862
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
6963
github.com/aws/aws-sdk-go-v2 v1.41.2 // indirect
7064
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.5 // indirect
@@ -100,22 +94,19 @@ require (
10094
github.com/charmbracelet/x/ansi v0.11.6 // indirect
10195
github.com/charmbracelet/x/cellbuf v0.0.15 // indirect
10296
github.com/charmbracelet/x/conpty v0.2.0 // indirect
103-
github.com/charmbracelet/x/errors v0.0.0-20260301003739-baafbde16d0a // indirect
10497
github.com/charmbracelet/x/term v0.2.2 // indirect
10598
github.com/charmbracelet/x/termios v0.1.1 // indirect
10699
github.com/clipperhouse/displaywidth v0.11.0 // indirect
107-
github.com/clipperhouse/stringish v0.1.1 // indirect
108100
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
109101
github.com/cloudflare/circl v1.6.3 // indirect
110102
github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect
111103
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
112-
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
104+
github.com/creack/pty v1.1.24 // indirect
113105
github.com/envoyproxy/go-control-plane/envoy v1.37.0 // indirect
114106
github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect
115107
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
116108
github.com/fatih/color v1.18.0 // indirect
117109
github.com/felixge/httpsnoop v1.0.4 // indirect
118-
github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect
119110
github.com/getsops/gopgagent v0.0.0-20241224165529-7044f28e491e // indirect
120111
github.com/go-jose/go-jose/v4 v4.1.3 // indirect
121112
github.com/go-logfmt/logfmt v0.6.1 // indirect
@@ -170,9 +161,7 @@ require (
170161
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
171162
github.com/pkg/errors v0.9.1 // indirect
172163
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
173-
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
174164
github.com/rivo/uniseg v0.4.7 // indirect
175-
github.com/rogpeppe/go-internal v1.14.1 // indirect
176165
github.com/russross/blackfriday/v2 v2.1.0 // indirect
177166
github.com/ryanuber/go-glob v1.0.0 // indirect
178167
github.com/sirupsen/logrus v1.9.4 // indirect
@@ -195,6 +184,7 @@ require (
195184
go.uber.org/multierr v1.11.0 // indirect
196185
go.uber.org/zap/exp v0.3.0 // indirect
197186
go.yaml.in/yaml/v3 v3.0.4 // indirect
187+
golang.org/x/crypto v0.48.0 // indirect
198188
golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa // indirect
199189
golang.org/x/mod v0.33.0 // indirect
200190
golang.org/x/oauth2 v0.35.0 // indirect
@@ -203,13 +193,11 @@ require (
203193
golang.org/x/text v0.34.0 // indirect
204194
golang.org/x/time v0.14.0 // indirect
205195
golang.org/x/tools v0.42.0 // indirect
206-
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
207196
google.golang.org/api v0.269.0 // indirect
208197
google.golang.org/genproto v0.0.0-20260226221140-a57be14db171 // indirect
209198
google.golang.org/genproto/googleapis/api v0.0.0-20260226221140-a57be14db171 // indirect
210199
google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 // indirect
211200
google.golang.org/grpc v1.79.1 // indirect
212201
google.golang.org/protobuf v1.36.11 // indirect
213202
gopkg.in/ini.v1 v1.67.1 // indirect
214-
gopkg.in/yaml.v3 v3.0.1 // indirect
215203
)

0 commit comments

Comments
 (0)