Oliver Speir
2e6d0d91a0
[ci] format
2024-06-10 15:54:26 +00:00
Oliver Speir
29463dff52
Export type Database from db/runtime ( #11216 )
...
* import and export in index.ts
* remove import and export from virtual.ts
* add changset
* Update .changeset/warm-pets-tap.md
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-06-10 16:53:38 +01:00
Matthew Phillips
f00ecd4596
[ci] format
2024-05-21 21:13:35 +00:00
Matthew Phillips
e14ce5726d
Fix inconsistent results from raw SQL ( #11091 )
...
* Fix inconsistent results from raw SQL
* Remove .only
* Fix
* Update packages/db/src/runtime/db-client.ts
Co-authored-by: Ben Holmes <hey@bholmes.dev>
---------
Co-authored-by: Ben Holmes <hey@bholmes.dev>
2024-05-21 17:12:39 -04:00
Darius
b78e83f448
prompt for workspace in db link ( #11032 )
...
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2024-05-21 21:13:56 +02:00
Erika
00420a7a52
[ci] format
2024-05-16 16:11:58 +00:00
Erika
1fec4a6eb9
fix: use astro cli command instead of astro db's ( #11070 )
...
* fix: use astro cli command instead of astro db's
* chore: changeset
2024-05-16 18:10:59 +02:00
Erika
9332bb1c1f
feat: add an internal for now studio package ( #11037 )
...
* feat: add an internal for now studio package
* fix: remove test commands
* fix: use getenvs from studio package
* fix: packagejson
* chore: changeset
* fix: remove unused error
* fix: of course Bjorn was right all along
2024-05-16 18:10:08 +02:00
Ben Holmes
c135cd546d
[ci] format
2024-05-13 16:21:32 +00:00
Ben Holmes
eb1d9a447b
Fix isDbError()
for remote errors ( #11027 )
...
* fix: use LibsqlError for remote db errors
* chore: remove unused drizzle.ts
* fix(test): return expected `error` object
* fix: error detail formatting
* feat(test): error messages with remote adapter
* feat(test): add code to test body
* chore: changeset
2024-05-13 12:20:43 -04:00
Matthew Phillips
8ef2f62c53
[ci] format
2024-05-08 12:29:08 +00:00
Matthew Phillips
a1343184da
Convert saved non-UTC dates to UTC ( #10967 )
...
* Convert saved non-UTC dates to UTC
* Simplify the check
* Simplify check and add link
2024-05-08 08:27:55 -04:00
Ben Holmes
befbda7fa3
[ci] format
2024-05-03 15:09:39 +00:00
Ben Holmes
44bafa989a
[db] Fix duplicate calls to recreate tables on startup ( #10919 )
...
* fix: move recreateTables() to integration hooks
* feat: recreate and seed at load, not in virtual runtime
* feat: eager build db on startup and seed file change
* fix: respect database_file in dbUrl
* chore: remove duplicate recreateTables call
* chore: remove now self-explanatory comments
* fix: remove invalidateModule call for eager loading
* feat: respect seed package paths
* fix: remove duplicate recreateTables() call
* refactor: move recreateTables() to vite-plugin-db
* refactor: move queries.ts from runtime/ to core/
* fix: update test import to core/queries
* refactor: move executeSeedFile to vite-plugin-db
* refactor: extract seeding and recreating to helper fns
* chore: changeset
* chore: revert connectToStudio refactor
* wip: log db url
* fix(test): normalize astro_database_file flag for windows
* Revert "wip: log db url"
This reverts commit 558e2de67a09a611377929b625127c649b8504d6.
* Revert "Revert "wip: log db url""
This reverts commit ffd004e00dff485b7bc5ddde0278dde6ff058b9e.
* fix: correctly resolve relative paths with unit test
* chore: remove unused dbDirPath
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* chore: remove unused import
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* chore: remove unused type
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* fix: remove bad import
* [db] Load seed files with vite dev server (#10941 )
* feat: load seed files with full vite dev server
* chore: remove unused export
---------
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2024-05-03 11:08:50 -04:00
Erika
77e206d7e5
[ci] format
2024-05-01 12:04:47 +00:00
Erika
a0c77fc716
chore: changeset ( #10925 )
2024-05-01 08:03:55 -04:00
Viktor Szépe
a146cf1012
Fix typos ( #10923 )
2024-05-01 13:56:38 +08:00
Matthew Phillips
1b7ed7a31a
[ci] format
2024-04-30 20:23:31 +00:00
Matthew Phillips
ca605f4dd8
Provide a better error for when the app token is missing in CI ( #10918 )
2024-04-30 16:22:26 -04:00
Chris Swithinbank
c238aa81ee
[ci] format
2024-04-26 14:09:06 +00:00
Chris Swithinbank
cf58d1ed56
Improve asDrizzleTable()
types ( #10882 )
2024-04-26 16:07:55 +02:00
Ben Holmes
8e6eb624ae
db: add login flow for web containers ( #10816 )
...
* feat: add login flow for web containers
* chore: changeset
* chore: remove unused web()
* feat: detect github codespaces
* fix: add success msg for manual flow
* refactor: use URL constructor for login URL
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* fix: add .href for url string
---------
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2024-04-22 11:37:11 -04:00
Emanuele Stoppa
40e8450671
chore: use Biome to format JS files ( #10788 )
...
* chore: configuration
* chore: update main commands
* chore: revert formatting package.json
* chore: rebase
2024-04-17 09:37:22 +01:00
Nick Dubelman
d4c91cb109
db: export 'alias' from drizzle-orm/sqlite-core ( #10789 )
...
* db: export 'alias' from drizzle-orm/sqlite-core
* chore: changeset
* fix: changeset target
---------
Co-authored-by: Ben Holmes <hey@bholmes.dev>
2024-04-16 17:28:20 -04:00
Jason
6ebd81dbc4
lint: upgrade eslint to version 9 ( #10730 )
2024-04-15 16:05:10 +08:00
Matthew Phillips
2d2ff58bb9
Fix db seeding when srcDir is root ( #10720 )
2024-04-09 09:11:32 -04:00
Matthew Phillips
4e7f5f8951
[ci] format
2024-04-08 13:22:48 +00:00
Matthew Phillips
28e7535e5c
Provide better messaging when renaming a table ( #10600 )
...
* Provide better messaging when renaming a table
* Update based on review
2024-04-08 09:21:41 -04:00
Matthew Phillips
48f158215d
[ci] format
2024-04-04 19:14:51 +00:00
Matthew Phillips
4bf8bd3848
Prevent errors in finding workspaceId from interrupting link prompts ( #10681 )
2024-04-04 15:13:46 -04:00
Matthew Phillips
d4b88c79b2
[ci] format
2024-04-04 16:43:57 +00:00
Matthew Phillips
1662aa8a85
Fix compatibility for @astrojs/db with cloudflare ( #10677 )
...
* Fix compatibility for @astrojs/db with cloudflare
* Use a manual implementation
* Update lockfile
2024-04-04 12:42:47 -04:00
Ben Holmes
57959e607e
[ci] format
2024-04-02 22:14:21 +00:00
Ben Holmes
f395ebcc08
refactor: rename "config" file to "virtual" ( #10638 )
...
* refactor: rename "config" file to "virtual"
* chore: changeset
* fix(test): config import
2024-04-02 18:13:18 -04:00
Matthew Phillips
5f5176b244
[ci] format
2024-04-02 20:08:38 +00:00
Matthew Phillips
b1eda3dc5c
Fix building static sites with Astro DB ( #10655 )
...
* Fix building static sites with Astro DB
* Adding a changeset
* Try a different port range
2024-04-02 16:07:18 -04:00
Arsh
953695ec2d
[ci] format
2024-04-02 15:38:27 +00:00
Arsh
713f99e849
fix(db): isolate AstroDbError from core utils ( #10646 )
...
* fix(db): isolate AstroDbError from core utils
* add changeset
2024-04-02 11:37:28 -04:00
Houston (Bot)
260f4fa191
[ci] update lockfile ( #10551 )
...
Co-authored-by: matthewp <matthewp@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-04-02 11:02:18 +08:00
Ben Holmes
a544f4cc0e
[ci] format
2024-04-01 21:03:37 +00:00
Ben Holmes
504d15d772
db: Better error messages when querying remote ( #10636 )
...
* feat: clear error messages on remote db error
* refactor: use AstroDbError for correct error name
* refactor: errorMessage -> responseMessage
* chore: changeset
* fix: revert seed file change
* fix: format seed errors as AstroDbError
* fix: correctly log eager seed errors
2024-04-01 17:02:36 -04:00
Matthew Phillips
17badaf55c
Give proper error when seed missing default export ( #10635 )
2024-04-01 14:18:46 -04:00
Matthew Phillips
ca29764912
[ci] format
2024-04-01 15:41:03 +00:00
Matthew Phillips
157392ee44
Make ASTRO_DATABASE_FILE work with file paths ( #10631 )
...
* Make ASTRO_DATABASE_FILE work with file paths
* Use pathToFileURL
2024-04-01 11:39:49 -04:00
Ben Holmes
27e2c24647
[ci] format
2024-04-01 15:17:47 +00:00
Ben Holmes
5a7733dde5
db: Seed on dev server startup ( #10599 )
...
* feat: load seed file on dev server startup
* feat: handle logging on dev server restart
* chore: changeset
* feat: support integration seed files
* fix: only run when seed is present, ignore unlink
* fix: load on startup for integration pkg paths
2024-04-01 11:16:46 -04:00
Houston (Bot)
c0cae63147
[ci] format
2024-03-28 18:10:50 +00:00
Ben Holmes
ed1031ba29
db: Rework index config with generated index names ( #10589 )
...
* feat: add indexes array config with name gen
* fix: add _idx suffix, remove name from output
* feat(test): new index config
* chore: remove unused type
* chore: changeset
* chore: add sort() for consistent names
* feat(test): consistent column ordering
* feat(test): ensure no queries when migrating legacy to new
2024-03-28 14:09:09 -04:00
Matthew Phillips
62a1d6df69
For --force-reset use conditional drop table query ( #10587 )
2024-03-27 16:30:59 -04:00
Ben Holmes
713abb2998
chore(db): Rename all collection usage to tables ( #10460 )
...
* chore: rename `collection` field to `table`
* chore: remove deprecated ResolvedCollectionConfig type (only used by studio)
* chore: collection -> table in migration-queries
* chore: update tests
* chore: last renames
* chore: bump migration version
* chore: remove deprecated collection field
* chore: droptablequeries
* chore(test): collection -> tables
* chore: revert collection -> table change on migration file
* chore: revert migration version change
* chore: changeset
2024-03-27 15:51:26 -04:00