Skip to content

Commit ef5bc75

Browse files
committed
Release v1.37.0
1 parent ee06a7d commit ef5bc75

File tree

32 files changed

+220
-191
lines changed

32 files changed

+220
-191
lines changed

beta/auth/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func WithContext(ctx context.Context, uid UID, data interface{}) (_ context.Cont
2929
// between releases.
3030
//
3131
// The current implementation of this function can be found here:
32-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/auth/auth.go#L63-L67
32+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/auth/auth.go#L63-L67
3333
doPanic("encore apps must be run using the encore command")
3434
return
3535
}

beta/auth/pkgfn.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ func UserID() (_ UID, _ bool) {
99
// between releases.
1010
//
1111
// The current implementation of this function can be found here:
12-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/auth/pkgfn.go#L13-L15
12+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/auth/pkgfn.go#L13-L15
1313
doPanic("encore apps must be run using the encore command")
1414
return
1515
}
@@ -28,7 +28,7 @@ func Data() (_ any) {
2828
// between releases.
2929
//
3030
// The current implementation of this function can be found here:
31-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/auth/pkgfn.go#L25-L27
31+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/auth/pkgfn.go#L25-L27
3232
doPanic("encore apps must be run using the encore command")
3333
return
3434
}

beta/errs/builder.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func B() (_ *Builder) {
1818
//
1919
// The current implementation of this function can be found here:
2020
//
21-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/builder.go#L27-L27
21+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/builder.go#L27-L27
2222
doPanic("encore apps must be run using the encore command")
2323
return
2424
}
@@ -30,7 +30,7 @@ func (*Builder) Code(c ErrCode) (_ *Builder) {
3030
// between releases.
3131
//
3232
// The current implementation of this function can be found here:
33-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/builder.go#L30-L34
33+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/builder.go#L30-L34
3434
doPanic("encore apps must be run using the encore command")
3535
return
3636
}
@@ -42,7 +42,7 @@ func (*Builder) Msg(msg string) (_ *Builder) {
4242
// between releases.
4343
//
4444
// The current implementation of this function can be found here:
45-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/builder.go#L37-L40
45+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/builder.go#L37-L40
4646
doPanic("encore apps must be run using the encore command")
4747
return
4848
}
@@ -54,7 +54,7 @@ func (*Builder) Msgf(format string, args ...interface{}) (_ *Builder) {
5454
// between releases.
5555
//
5656
// The current implementation of this function can be found here:
57-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/builder.go#L43-L46
57+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/builder.go#L43-L46
5858
doPanic("encore apps must be run using the encore command")
5959
return
6060
}
@@ -66,7 +66,7 @@ func (*Builder) Meta(metaPairs ...interface{}) (_ *Builder) {
6666
// between releases.
6767
//
6868
// The current implementation of this function can be found here:
69-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/builder.go#L49-L52
69+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/builder.go#L49-L52
7070
doPanic("encore apps must be run using the encore command")
7171
return
7272
}
@@ -78,7 +78,7 @@ func (*Builder) Details(det ErrDetails) (_ *Builder) {
7878
// between releases.
7979
//
8080
// The current implementation of this function can be found here:
81-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/builder.go#L55-L59
81+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/builder.go#L55-L59
8282
doPanic("encore apps must be run using the encore command")
8383
return
8484
}
@@ -90,7 +90,7 @@ func (*Builder) Cause(err error) (_ *Builder) {
9090
// between releases.
9191
//
9292
// The current implementation of this function can be found here:
93-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/builder.go#L62-L77
93+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/builder.go#L62-L77
9494
doPanic("encore apps must be run using the encore command")
9595
return
9696
}
@@ -109,7 +109,7 @@ func (*Builder) Err() (_ error) {
109109
// between releases.
110110
//
111111
// The current implementation of this function can be found here:
112-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/builder.go#L87-L117
112+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/builder.go#L87-L117
113113
doPanic("encore apps must be run using the encore command")
114114
return
115115
}

beta/errs/error.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func Wrap(err error, msg string, metaPairs ...interface{}) (_ error) {
4949
// between releases.
5050
//
5151
// The current implementation of this function can be found here:
52-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/error.go#L66-L82
52+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/error.go#L66-L82
5353
doPanic("encore apps must be run using the encore command")
5454
return
5555
}
@@ -62,7 +62,7 @@ func WrapCode(err error, code ErrCode, msg string, metaPairs ...interface{}) (_
6262
// between releases.
6363
//
6464
// The current implementation of this function can be found here:
65-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/error.go#L86-L101
65+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/error.go#L86-L101
6666
doPanic("encore apps must be run using the encore command")
6767
return
6868
}
@@ -76,7 +76,7 @@ func Convert(err error) (_ error) {
7676
// between releases.
7777
//
7878
// The current implementation of this function can be found here:
79-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/error.go#L106-L117
79+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/error.go#L106-L117
8080
doPanic("encore apps must be run using the encore command")
8181
return
8282
}
@@ -90,7 +90,7 @@ func Code(err error) (_ ErrCode) {
9090
// between releases.
9191
//
9292
// The current implementation of this function can be found here:
93-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/error.go#L122-L129
93+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/error.go#L122-L129
9494
doPanic("encore apps must be run using the encore command")
9595
return
9696
}
@@ -103,7 +103,7 @@ func Meta(err error) (_ Metadata) {
103103
// between releases.
104104
//
105105
// The current implementation of this function can be found here:
106-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/error.go#L133-L138
106+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/error.go#L133-L138
107107
doPanic("encore apps must be run using the encore command")
108108
return
109109
}
@@ -116,7 +116,7 @@ func Details(err error) (_ ErrDetails) {
116116
// between releases.
117117
//
118118
// The current implementation of this function can be found here:
119-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/error.go#L142-L147
119+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/error.go#L142-L147
120120
doPanic("encore apps must be run using the encore command")
121121
return
122122
}
@@ -128,7 +128,7 @@ func (*Error) Error() (_ string) {
128128
// between releases.
129129
//
130130
// The current implementation of this function can be found here:
131-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/error.go#L150-L155
131+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/error.go#L150-L155
132132
doPanic("encore apps must be run using the encore command")
133133
return
134134
}
@@ -141,7 +141,7 @@ func (*Error) ErrorMessage() (_ string) {
141141
// between releases.
142142
//
143143
// The current implementation of this function can be found here:
144-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/error.go#L159-L183
144+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/error.go#L159-L183
145145
doPanic("encore apps must be run using the encore command")
146146
return
147147
}
@@ -153,7 +153,7 @@ func (*Error) Unwrap() (_ error) {
153153
// between releases.
154154
//
155155
// The current implementation of this function can be found here:
156-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/error.go#L186-L188
156+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/error.go#L186-L188
157157
doPanic("encore apps must be run using the encore command")
158158
return
159159
}
@@ -170,7 +170,7 @@ func HTTPError(w http.ResponseWriter, err error) {
170170
// between releases.
171171
//
172172
// The current implementation of this function can be found here:
173-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/beta/errs/error.go#L196-L198
173+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/beta/errs/error.go#L196-L198
174174
doPanic("encore apps must be run using the encore command")
175175
return
176176
}

config/pkgfn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func Load[T any]() (_ T) {
2525
// between releases.
2626
//
2727
// The current implementation of this function can be found here:
28-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/config/pkgfn.go#L32-L54
28+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/config/pkgfn.go#L32-L54
2929
doPanic("encore apps must be run using the encore command")
3030
return
3131
}

cron/cron.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func NewJob(id string, jobConfig JobConfig) (_ *Job) {
4444
// between releases.
4545
//
4646
// The current implementation of this function can be found here:
47-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/cron/cron.go#L39-L47
47+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/cron/cron.go#L39-L47
4848
doPanic("encore apps must be run using the encore command")
4949
return
5050
}

et/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func SetCfg[T any](cfg config.Value[T], newValue T) {
1616
// between releases.
1717
//
1818
// The current implementation of this function can be found here:
19-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/et/config.go#L15-L25
19+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/et/config.go#L15-L25
2020
doPanic("encore apps must be run using the encore command")
2121
return
2222
}

et/mocking.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package et
44
type MockOption func(*mockOptions)
55

66
type mockOptions struct {
7+
runMiddleware bool
78
}
89

910
// RunMiddleware is a MockOption that sets whether to run the middleware chain
@@ -14,7 +15,7 @@ func RunMiddleware(enabled bool) (_ MockOption) {
1415
// between releases.
1516
//
1617
// The current implementation of this function can be found here:
17-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/et/mocking.go#L19-L23
18+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/et/mocking.go#L20-L24
1819
doPanic("encore apps must be run using the encore command")
1920
return
2021
}
@@ -51,7 +52,7 @@ func MockEndpoint[T any](originalEndpoint T, mock T, opts ...MockOption) {
5152
// between releases.
5253
//
5354
// The current implementation of this function can be found here:
54-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/et/mocking.go#L51-L71
55+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/et/mocking.go#L52-L72
5556
doPanic("encore apps must be run using the encore command")
5657
return
5758
}
@@ -86,7 +87,7 @@ func MockService[T any](serviceName string, mock T, opts ...MockOption) {
8687
// between releases.
8788
//
8889
// The current implementation of this function can be found here:
89-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/et/mocking.go#L97-L108
90+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/et/mocking.go#L98-L109
9091
doPanic("encore apps must be run using the encore command")
9192
return
9293
}

et/pkgfn.go

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package et
22

33
import (
4+
"context"
5+
46
"encore.dev/beta/auth"
7+
"encore.dev/storage/sqldb"
58
)
69

710
// OverrideAuthInfo overrides the auth information for the current request.
@@ -27,7 +30,7 @@ func OverrideAuthInfo(uid auth.UID, data any) {
2730
// between releases.
2831
//
2932
// The current implementation of this function can be found here:
30-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/et/pkgfn.go#L26-L28
33+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/et/pkgfn.go#L29-L31
3134
doPanic("encore apps must be run using the encore command")
3235
return
3336
}
@@ -47,7 +50,32 @@ func EnableServiceInstanceIsolation() {
4750
// between releases.
4851
//
4952
// The current implementation of this function can be found here:
50-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/et/pkgfn.go#L39-L41
53+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/et/pkgfn.go#L42-L44
54+
doPanic("encore apps must be run using the encore command")
55+
return
56+
}
57+
58+
type stringLiteral string
59+
60+
// NewTestDatabase creates a new, fresh database for the database with the given name.
61+
// The database name must be a database known to Encore (via `sqldb.NewDatabase`),
62+
// otherwise it reports an error.
63+
//
64+
// The new database is cloned from a template database that has had all migrations applied to it,
65+
// but excludes any of the changes applied to the given db.
66+
//
67+
// The returned database is isolated to the current test and any sub-tests,
68+
// and is automatically dropped at the end of the test, and any
69+
// open connections are automatically closed.
70+
//
71+
// The provided name must be a constant string literal (like "mydb").
72+
func NewTestDatabase(ctx context.Context, name stringLiteral) (_ *sqldb.Database, _ error) {
73+
// Encore will provide an implementation to this function at runtime, we do not expose
74+
// the implementation in the API contract as it is an implementation detail, which may change
75+
// between releases.
76+
//
77+
// The current implementation of this function can be found here:
78+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/et/pkgfn.go#L61-L63
5179
doPanic("encore apps must be run using the encore command")
5280
return
5381
}

et/pubsub.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func Topic[T any](topic *pubsub.Topic[T]) (_ TopicHelpers[T]) {
1111
// between releases.
1212
//
1313
// The current implementation of this function can be found here:
14-
// https://github.com/encoredev/encore/blob/v1.34.3/runtimes/go/et/pubsub.go#L8-L10
14+
// https://github.com/encoredev/encore/blob/v1.37.0/runtimes/go/et/pubsub.go#L8-L10
1515
doPanic("encore apps must be run using the encore command")
1616
return
1717
}

0 commit comments

Comments
 (0)