0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00
Commit graph

3400 commits

Author SHA1 Message Date
Houston (Bot)
0ddc327ee8
[ci] release (#10471)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-18 22:36:58 +05:30
Arsh
c12666166d
qol(endpoints): helpful error message when a response is not provided (#10455)
* qol(endpoints): helpful error message when a response is not provded

* add changeset

* add test
2024-03-18 20:06:46 +05:30
Arsh
83f9105cd5
fix(node): handle offshoot promise rejections (#10454)
* fix(node): handle offshoot promise rejections

* add test

* add changeset

* Update packages/integrations/node/test/errors.test.js
2024-03-18 19:44:46 +05:30
Arsh
fcece36586
fix(rendering): allow framework renders to be cancelled (#10448) 2024-03-18 19:29:24 +05:30
Mark Gaze
6a9a35ee15
Fix issue with JSON schema generation when schema is a function (#10426) 2024-03-18 14:14:18 +01:00
Matthew Phillips
37a485b4d1
Create new token when current has expired (#10435)
* Create new token when current has expired

* Add changeset

* Rename renew timer function:

* Handle creating a new token on renewal
2024-03-18 08:05:36 -04:00
Ben Holmes
219c49473f
fix type error in seed stub on initial setup (#10457)
* fix: move db type to base types for seed stub

* chore: changeset

* fix(test): bad NOW import
2024-03-18 07:55:39 -04:00
Houston (Bot)
4dcfa2bd90
[ci] release (#10453)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-15 16:24:46 -04:00
Martin Trapp
1900a8f9bc
Fixes an TypeError when using without (#10456) 2024-03-15 19:04:41 +01:00
Ben Holmes
5b48cc0fc8
feat(db): Run db type generation on astro sync (#10438)
* feat: db typegen on astro sync

* fix: avoid requiring db to be installed

* fix: make typegen optional for backwards compat

* chore: changeset

* fix: required -> optional

* fix: remove flags from sync API signature
2024-03-15 13:58:45 -04:00
Ben Holmes
0989cd3284
feat(db): execute command logs (#10439)
* feat: db execute success and error logs

* chore: changeset
2024-03-15 13:58:36 -04:00
Erika
f8e0ad3c52
fix(toolbar): Fixes small misc issues (#10442)
* fix(toolbar): Fixes small misc issues

* test: update test to test for the audit ui as well

* chore: changeset

* nit: address feedback
2024-03-15 13:26:37 +01:00
Nworm
3776ecf0aa
fix(routing): partially dynamic segments are being truncated (#10379)
* fix(routing): partially dynamic segments are being truncated and affecting routing.

* test: fix "/static should be higher priority than /static-"

* Update .changeset/five-colts-rescue.md

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>

* test: fix the check that was wrongly deleted.

* other: improve code readability.

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-03-15 10:27:07 +00:00
Houston (Bot)
464bea398b
[ci] release (#10446)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-14 14:58:33 -04:00
Matthew Phillips
098623c261
Prefer getting app token from runtime env (#10445) 2024-03-14 14:53:25 -04:00
Ben Holmes
5166e9715a
chore: remove duplicate astro:db log (#10441)
* chore: remove duplicate astro:db log

* chore: changeset
2024-03-14 14:39:53 -04:00
Houston (Bot)
7d8565db33
[ci] release (#10444)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-14 14:36:01 -04:00
Arsh
238f047b9d
fix(db): separate utils for runtime (#10443)
* fix(db): separate utils for runtime

* add changeset

* use safeFetch from runtime utils
2024-03-14 14:28:51 -04:00
Houston (Bot)
f92ff40fd3
[ci] release (#10430)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-14 09:01:22 -07:00
Fred K. Schott
1076864cc4
wait for token to propagate (#10431) 2024-03-14 08:57:40 -07:00
Erika
ee07e62942
fix(vue): Add default options to not transform assets (#10419)
* fix(vue): Add default options to not transform assets

* fix: oops merge correctly

* chore: changeset

* nit: address feedback
2024-03-14 09:54:05 +01:00
Fred K. Schott
4e24628aac
add missing regions to link command (#10432) 2024-03-13 16:17:17 -07:00
Arsh
128c7a3639
fix(app): provide adapter locals to error pages (#10427) 2024-03-14 02:02:14 +05:30
Houston (Bot)
c70aa6849f
[ci] release (#10416)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-13 15:58:51 -04:00
Fred K. Schott
189ec47c1e
add region support to db calls (#10428) 2024-03-13 12:50:55 -07:00
Alex Nguyen
8edc42aa7c
prevent URLs in attributes being escaped (#9820)
* prevent URLs in `content` attributes being escapedk

* removed content check

* Update .changeset/quick-islands-ring.md

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>

* add check for '&' in string

* Update .changeset/quick-islands-ring.md

* manual `canParse`

* add test

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: lilnasy <69170106+lilnasy@users.noreply.github.com>
2024-03-13 22:24:09 +05:30
Erika
2db25c05a4
fix(db): Add a safe db fetch wrapper (#10420)
* fix(db): Add a safe db fetch wrapper

* chore: changeset
2024-03-13 17:12:52 +01:00
Arsh
96c8bca19a
fix(db): validate column type before column schema (#10409)
* fix(db): validate column type before column schema

* add changeset

* Add test for text foreign keys

---------

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2024-03-13 09:49:28 -04:00
Arsh
055fe293c6
fix(redirects): escape Location header (#10410) 2024-03-13 14:57:39 +05:30
Houston (Bot)
0b0e244d1e
[ci] release (#10402)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-12 09:50:49 -04:00
Ben Holmes
a084d8cec6
feat: split config types to separate build (#10401)
* feat: split config types to separate build

* chore: changeset

* fix: drizzle property exports
2024-03-12 09:44:15 -04:00
Houston (Bot)
24ee74a37f
[ci] release (#10397)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-12 07:45:51 -04:00
Ben Holmes
41ca94e513
chore: remove drop table check for added table (#10396)
* chore: remove drop table check for added table

* chore: remove drop table from test

* chore: changeset
2024-03-12 07:30:45 -04:00
Ming-jun Lu
629c9d7c4d
Fix an issue where dev toolbar x-ray didn't escape props content (#10400)
* fix(toolbar): fix an issue where x-ray didn't escape props content

* test(toolbar): add a test case related to x-ray

* chore: add changeset
2024-03-12 12:30:11 +01:00
Matthew Phillips
a49892349e
Set new Astro Studio production URL (#10395) 2024-03-11 15:35:51 -07:00
Darius
f76dcb769f
export DB types (#10374)
* export DB types

* refactor: move schemas to separate file

* chore: changeset

* chore: add typesVersions

---------

Co-authored-by: bholmesdev <hey@bholmes.dev>
2024-03-11 18:06:52 -04:00
Houston (Bot)
33bfe6ed05
[ci] release (#10383)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-11 16:09:08 -04:00
Ben Holmes
236cdbb611
New CLI help reference for studio and db commands (#10390)
* feat: new, formatted astro db help

* feat: add "studio commands" section to cli

* chore: changeset

* Update packages/db/src/core/cli/print-help.ts

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* Update .changeset/thirty-bags-live.md

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

---------

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2024-03-11 15:54:49 -04:00
Martin Trapp
02aeb01cb8
Fixes broken transition types (#10392)
* Fixes broken transition types

* adds changeset

* adds changeset
2024-03-11 15:45:43 -04:00
Ben Holmes
9667ee990c
fix: remove runtime/config suggestion for db config exports (#10391)
* chore: remove runtime/config from package json

* fix: use relative path to dist

* chore: changeset

* Revert "fix: use relative path to dist"

This reverts commit 16c0cc296e.

* Revert "chore: remove runtime/config from package json"

This reverts commit c1b4678998.

* refactor: types null

* fix: exclude config.ts from tsc

* chore: update consts

* chore: comment on intellisense
2024-03-11 15:44:58 -04:00
Fred K. Schott
8a23ee530c
add handling for success=false responses (#10387) 2024-03-11 12:32:20 -07:00
Chris Swithinbank
38abae47b5
Fix db for projects without a seed file or with integrations (#10385)
* Add fixture and tests for integration with no user db config

* Create database tables when integration seed files load

* Defer running seed function until all modules are loaded

* Update package name

* Add test & fixture for a project with no seed file

* `recreateTables()` from `seedLocal()` (and move it out of main runtime module)

* Fix typo after rebase

* FREEZE DON’T MOVE

* Move `seedLocal` export back to runtime

* Simplify seed file normalization

* Clean up test files

* Add build tests for no-seed and integration-only fixtures

* Add changeset
2024-03-11 20:07:53 +01:00
Matthew Phillips
cd5e8d4b93
Fix use of db.batch in Stackblitz (#10384)
* Fix use of db.batch in Stackblitz

* Update .changeset/rare-items-protect.md

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-03-11 11:12:52 -04:00
Chris Swithinbank
8cceab587d
Use static imports for integration seed files in astro:db (#10381)
* Use static imports for integration seed files in `astro:db`

* Add changeset

* Add build test for integrations fixture

* chore: comment on top-level seed imports

* fix: random db id for tests

* fix: set db id from build before

* wip: remove reset on env variable

* wip: move random db id env to top of test file

* refactor: remove unlink from db startup

* chore: remove random db id completely??

---------

Co-authored-by: bholmesdev <hey@bholmes.dev>
2024-03-11 09:51:15 -04:00
Houston (Bot)
0e074fb390
[ci] release (#10365)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-11 10:25:30 +00:00
Fred K. Schott
41dca1e413
handle undefined snapshot from API (#10378) 2024-03-10 23:56:01 -07:00
Arsh
dc87214141
feat: middleware and virtual routes (#10206)
* add test

* app

* dev

* api route -> page

* adjust test

* add changeset

* remove `any`

* DEFAULT_404_COMPONENT constant

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-03-08 22:09:12 +05:30
Bjorn Lu
8107a2721b
Treeshake unused Astro scoped styles (#10291) 2024-03-08 23:03:02 +08:00
Erika
78bafc5d66
fix(tsconfigs): Add jsx: 'preserve' to the base template (#10368)
* fix(tsconfigs): Add `jsx: 'preserve'` to the base template

* chore: changeset
2024-03-08 13:45:43 +00:00
Zhang Zhipeng
1ea0a25b94
Add multiple cdn v2 (#10189)
* feat: add multiple cdn

* add multiple cdn test

* assetsPrefix not empty string

* add changeset

* simplify code

* change docs

* replace getFileExtension with node path.extname

* Adapt node extname

* multiple image test

* wip space

* update docs

* update docs, assetsPrefix type

* update docs

* update docs

* chore: update types and rename to `fallback`

* enhance changelog

* change docs

* update change defaultAeestsPrefix to fallback key test

* move utility to a new to avoid importing `node:path` inside vite plugins

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* chore: address Bjorn's comments

* kill the variable

* kill the variable /2

* Fix CI fail

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* uniform code sample

* add `.` string for fit getAssetsPrefix

* Fix extension function

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-03-08 13:10:07 +00:00