Releases: encoredev/encore
v1.46.1 — Updated behavior when generating clients
Changes when generating clients
encore gen client
now default to--env=local
instead of defaulting to your primary cloud environment. If you rely on the previous default, update you command and set--env=<cloud-env-name>
- The generated code for calling raw endpoints no longer hard-code
Content-Type: application/json
for generated TS/JS clients. This meansfetch
will begin auto-detecting the content type if it is not explicitly provided, which enables better support for usingFormData
for uploading files via the generated client. You can preserve the previous behavior by explicitly setting theContent-Type
header in the fetch options provided to the raw endpoint.
What's Changed
- tsparser: make tags non-nullable by @eandre in #1729
- Add user configuration support by @eandre in #1722
- runtimes/core: fix stream handshake with only path parameters by @fredr in #1730
- Update app-structure.md by @marcuskohlberg in #1732
- Update ts_llm_instructions.txt by @marcuskohlberg in #1733
- clientgen: default to local env if no env is specified by @fredr in #1728
- clientgen/{ts,js}: default content type on raw request by @fredr in #1717
Full Changelog: v1.46.0...v1.46.1
v1.46.0 — Signed URLs for Storage Objects & Local Dashboard improvements
Signed Upload/Download URLs for Storage Objects
This has been a highly requested feature since we launched object storage, and it's finally here!
Signed URLs provide a secure way for clients to upload directly to storage, and to download directly from private buckets. This leaves the heavy lifting to the specialized cloud storage services, and frees your API service from handling large content payloads.
Generating a URL to let a client upload directly to a bucket:
const uploadUrl = await profilePictures.signedUploadUrl("my-user-id", {ttl: 7200})
// Pass url to client
curl -X PUT --data-binary @/home/me/dog-wizard.jpeg "https://storage.googleapis.com/profile-pictures/my-user-id/?x-goog-signature=b7a1<...>"
Please check out the docs for more info, and we wish you happy transfers!
Remember to update using: encore version update
Infra dashboard in the Local Development Dashboard
You can now see your locally running infrastructure in the local development dashboard!
This helps you verify that everything is running as expected and simplifies actions like triggering Cron Jobs when developing locally.
We plan on expanding the dashboard with much more functionality, e.g. database management.
Please let us know on Discord what would be most useful to you! ❤️
localinfra.mp4
Event Details in Trace Viewer
It's been a long time coming, but we've finally shipped a key improvement to Encore's trace viewer: Event Details
This small but mighty change makes it much easier to view complex traces with many separate events. Simply click to expand and view each event on the timeline in a list.
tracedetails.mp4
What's Changed
- Add LLM instructions by @marcuskohlberg in #1706
- Add Railway deployment guide by @simon-johansson in #1693
- runtimes/go: support cache cluster outside svcs by @eandre in #1709
- add go llm rules by @marcuskohlberg in #1710
- update llm instructions by @marcuskohlberg in #1712
- Update self-host examples by @simon-johansson in #1708
- Add support for signed upload urls. by @erikcarlsson in #1661
- runtimes/go: fix cache error tracing by @eandre in #1713
- Add support for signed download urls. by @erikcarlsson in #1715
- infra: Add infra config docs and fix pubsub config bug by @ekerfelt in #1720
- clientgen/ts: qualify Request with globalThis to avoid name conflicts by @fredr in #1721
- Add docs for signed upload/download URLs. by @erikcarlsson in #1684
- runtimes/js: Add endpoint tags by @fredr in #1726
Full Changelog: v1.45.6...v1.46.0
v1.45.6 — Minor improvements & bugfixes
What's Changed
- runtimes/go: support trace sampling by @eandre in #1649
- Add github link to middleware example by @simon-johansson in #1650
- Add bucket github example link by @simon-johansson in #1653
- Fix broken links in docs by @marcuskohlberg in #1654
- windows: handle the runtime and app is on different drives by @fredr in #1655
- Remove duplicate word from neon docs by @macleodmac in #1642
- cli/daemon: fix rendering of type args in first run by @eandre in #1620
- runtimes/js: worker pooling by @eandre in #1652
- Update unknown language error message by @fredr in #1685
- runtimes/js: Added middleware functionality by @fredr in #1631
- cicd docs by @marcuskohlberg in #1687
- tsparser: fix is_default_export check by @fredr in #1688
- validation: make marker optional by @fredr in #1690
- Remove symlinking of encore.dev package by @eandre in #1662
- Fix infra config validation for Auth types by @ekerfelt in #1691
- infra-config: Add more DB config settings by @ekerfelt in #1694
- Fix new clippy lints by @fredr in #1695
- tutorial: fix uptime test by @fredr in #1697
Thanks to our new contributor ❤️
- @macleodmac made their first contribution in #1642
Full Changelog: v1.45.1...v1.45.6
v1.45.1 — Custom Middleware / Public Buckets & CDN / Value-based Validation
Custom Middlware
Launched during launch week day 1, read all about it here: https://encore.dev/blog/custom-middleware
Public Buckets & CDN support
Launched during launch week day 2, read all about it here: https://encore.dev/blog/public-buckets
Value-based validation
Launched during launch week day 4, read all about it here: https://encore.dev/blog/advanced-validation
Other improvements & Bugfixes
- tsparser: improved app validation by @eandre in #1627
- runtimes/js: use public stream types by @fredr in #1628
- runtimes/js: support Date in sqldb by @eandre in #1629
- Revert "tsparser: improved app validation" by @ekerfelt in #1633
- Add self-hosting section to REST API tutorial by @simon-johansson in #1632
- Add self-host instructions to Go tutorials by @simon-johansson in #1636
- docs: fix outdated info and typo in middleware docs by @fredr in #1639
- Infrastructure documentation improvements by @ekerfelt in #1640
- docs: Add docs for public buckets by @ekerfelt in #1625
- Add frontend docs for Encore.ts by @simon-johansson in #1643
- Fix typos in infra docs by @ekerfelt in #1644
- dockerbuild: make a valid unix path when converting from windows path with volume by @fredr in #1647
Full Changelog: v1.44.9...v1.45.1
v1.44.9 — Enhanced error messages in Encore.ts
This release comes with huge improvements to Encore.ts' error messages:
- No more Rust stack traces when you get compilation errors.
- All errors now have proper line of code references to help you find what's wrong.
- We've improved plenty of error messages to make them more helpful.
- We're continuously working through more cases and improving on error messages to make easier to understand.
Just check out this before/after comparison to see the difference in practice:
Thanks to all contributors
🙏 We continue to be overwhelmed by your support, feedback, and suggestions!
Together we're building the future of backend development and we couldn't be more excited.
❤️ As always, we're excited to hear what you think!
Please share your feedback on Discord.
Full Changelog: v1.44.6...v1.44.9
v1.44.4 — Minor improvements & Bugfixes
What's Changed
- runtimes/go: bound trace buffer size by @eandre in #1580
- runtimes/go: fix object storage gcs provider by @eandre in #1581
- Small changes to the TS ORM docs by @simon-johansson in #1582
- object_storage: Fix GO s3 provider registration by @ekerfelt in #1586
- docs: fix go object storage examples by @canpacis in #1584
- Support bucket refs in Encore.ts by @eandre in #1583
- docs: document SQLDatabase.named for Encore.ts by @eandre in #1588
- tsparser: fix bucket usage mapping by @eandre in #1592
Thanks to our new contributors! ❤️
Full Changelog: v1.44.0...v1.44.4
v1.44.0 — Object Storage is here!
We're very excited to announce that Encore (both Go and TypeScript versions) now supports Object Storage as a first-class cloud infrastructure resource! As always, update to the latest release with encore version update
!
Object Storage
Object Storage is a simple and scalable way to store files and unstructured data in your backend application. The most well-known implementation is Amazon S3 ("Simple Storage Service"), but it's universally supported by every major cloud provider.
Encore now provides a cloud-agnostic API for working with Object Storage, allowing you to store and retrieve files with ease. It has support for Amazon S3, Google Cloud Storage, as well as any other S3-compatible implementation (such as DigitalOcean Spaces, MinIO, etc.).
Here's how you might use it in Encore.ts:
import { Bucket } from "encore.dev/storage/objects";
export const profilePictures = new Bucket("profile-pictures", {
versioned: false
});
// Then use `profilePictures`:
profilePictures.upload(...);
profilePictures.download(...);
profilePictures.list(...);
Additionally, when you use Encore's Object Storage APIs you also automatically get:
- Automatic tracing and instrumentation of all Object Storage operations
- Built-in local development support, storing objects on the local filesystem
- Support for integration testing, using a local, in-memory storage backend
And with Encore's Cloud Platform you also get:
- Automatic infrastructure provisioning of Object Storage buckets
- Automatic fine-grained permission management of per-service storage operations (read, list, write, delete, etc.)
- Support for Object Storage in Preview Environments
- Native support for Object Storage in the Encore Platform's CI/CD pipeline
See the documentation (Encore.ts / Encore.go) for more information!
TypeScript parsing improvements
Encore.ts now has improved support for parsing more TypeScript language features:
- Interfaces extending other interfaces
- Namespaces and qualified names
- Re-exports (
export * from "./file"
)
Together, these improvements enable much wider support for referencing types defined in external libraries.
We're constantly working on bringing more improvements to the TypeScript parser, with more coming in the near future.
If you have use cases that the TypeScript parser doesn't support, please let us know in Discord!
What's Changed
- Share the db migration logic between the Encore platform and the daemon by @ekerfelt in #1561
- daemon: Add test for db migrations by @ekerfelt in #1562
- ts/prisma: additional instructions for deploying by @fredr in #1563
- Upgrade pingora to latest released version by @fredr in #1550
- supervisor: use vendored feature of openssl by @eandre in #1564
- cli: support client generation without linking app by @eandre in #1566
- Fixed test code example error in uptime.md by @LarsArtmann in #1559
- runtimes/core: fix semaphore use of sqs+sns by @eandre in #1567
- tsparser: support extends by @eandre in #1565
- build: Include secrets outside services in build config by @ekerfelt in #1568
- Add suport for forwarding go compiler flags by @ekerfelt in #1569
- add neon roles docs by @marcuskohlberg in #1571
- runtimes/go: fix rlog ctx with repeated fields by @eandre in #1573
- Update the TS database docs by @simon-johansson in #1575
- Fix
--openapi-exclude-private-endpoints
in client gen by @eandre in #1577
Thanks to our new contributors! ❤️
- @LarsArtmann made their first contribution in #1559
Full Changelog: v1.43.9...v1.44.0
v1.43.9 — First class ORM support in Encore.ts
In this release we've added greatly improved support for using ORMs and migration frameworks with Encore.ts.
Remember to update: encore version update
Since Encore’s approach to database management is flexible, i.e. it uses standard SQL migration files, it now supports integration with most popular ORMs.
📚 We've created examples and docs for how to use:
Many other ORMs are also supported. Here's how you can reason about it:
- ORM Compatibility: If an ORM can connect to a database via a standard SQL driver, it will work with Encore.
- Migration Tool Compatibility: If your migration tool generates SQL migration files without additional customization, it can be used with Encore.
Other improvements & Bugfixes
- runtimes/core: handle missing auth schema by @eandre in #1541
- runtimes/js: better handling of void returns by @eandre in #1543
- make it possible to override what rust builder to use by @fredr in #1551
- Tidy mods by @ekerfelt in #1558
Full Changelog: v1.43.7...v1.43.9
v1.43.7 - Minor improvements & Bugfixes
What's Changed
- runtimes/core: fix validation of nested objects in unions by @eandre in #1529
- runtimes/core: handle literal case in transform by @eandre in #1530
- runtimes/core: log listen address on startup by @eandre in #1531
- runtimes/core: fix array validation, add tracing support by @eandre in #1532
- runtimes/js: parse nulls in responses correctly by @eandre in #1534
- runtimes/core: fix nested union handling by @eandre in #1535
- Add more docs on database migration by @marcuskohlberg in #1536
- Clarify cron docs by @marcuskohlberg in #1537
Full Changelog: v1.43.3...v1.43.7
v1.43 - Date support in Encore.ts
We're excited to announce that Encore.ts now supports using Date types in API schemas, Pub/Sub topic messages, streaming APIs, and more! As always, update with encore version update
!
That means you can now do things like this:
export interface CreateBlogPostParams {
body: string;
publishAt?: Date; // set to schedule the publish in the future
}
export const createBlogPost = api(
{expose: true, method: "POST", path: "/blogpost" },
async (params: CreateBlogPostParams): Promise<BlogPost> {
// ...
}
)
Encore.ts will automatically validate the incoming request, ensuring the provided data is a valid RFC3339 timestamp,
and pass the data to the API handler as a fully constructed Date
object. No need to manually parse dates ever again. Additionally, Encore.ts's built-in API Explorer and Service Catalogs have also been updated to fully support dates.
Hiding internal messages in public errors
Encore.ts's errors can contain additional information in the internal_message
field. This field is now stripped when calling from the outside, ensuring private information about the error isn't leaked to external users. (This functionality is disabled when developing locally, to aid development.)
All changes
- cli: Move tutorial config flag to example repo by @ekerfelt in #1519
- runtimes/core+js: hide error internal message in responses by @fredr in #1518
- date handling by @eandre in #1504
- Include internal_message in all errors for local dev by @eandre in #1522
- runtimes/core: don't run gateway during tests by @fredr in #1524
- dashproxy caching by @eandre in #1523
- cli: improve app create form responsiveness by @eandre in #1525
- pkg/dockerbuild: handle junction points by @eandre in #1526
Full Changelog: v1.42.3...v1.43.3