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
ae7dc5f692
[ci] format
2024-03-11 19:55:57 +00: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
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
c9a1111275
[ci] format
2024-03-11 19:33:26 +00:00
Fred K. Schott
8a23ee530c
add handling for success=false responses ( #10387 )
2024-03-11 12:32:20 -07:00
Chris Swithinbank
6170122884
[ci] format
2024-03-11 19:09:04 +00: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
Houston (Bot)
82d81a1485
[ci] release ( #10362 )
...
* [ci] release
* Update CHANGELOG.md
* Update CHANGELOG.md
* Update CHANGELOG.md
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-03-07 19:53:37 -06:00
Chris Swithinbank
3f27e09628
Rename defineDB
to defineDb
( #10364 )
...
* Rename `defineDB` to `defineDb`
* Add changeset
* Improve changeset
2024-03-07 19:21:03 -06:00
Chris Swithinbank
b6ccaa6dc7
Revert "[ci] release ( #10359 )" ( #10363 )
...
This reverts commit 76c21b19d2
.
2024-03-08 01:45:27 +01:00
Houston (Bot)
76c21b19d2
[ci] release ( #10359 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-07 14:55:50 -05:00
Ben Holmes
988aad6705
Add batch support ( #10361 )
...
* deps: drizzle preview
* feat: db.batch and method run handling
* refactor: use db.batch in test fixture
* deps: bump to drizzle 0.29.5
* chore: changeset
* fix: unpin drizzle version
* fix: db execute should uh... execute
2024-03-07 14:49:46 -05:00
Chris Swithinbank
52fba64cb2
[ci] format
2024-03-07 19:20:45 +00:00
Chris Swithinbank
2e4958c8a7
Add integrations API for db config/seed files ( #10321 )
...
* Add integrations API for adding db config/seed files
* Fix seeding when user seed file is present
* Add basic test and fixture for integrations API
* Freeze that lockfile
* Test to see if this is a Windows fix
* Don’t import.meta.glob integration seed files
* Make integration seed files export a default function
* style: rejiggle
* Fix temporary file conflicts
* Remove changes to Astro’s core types, type utility method instead
* Use `astro:db` instead of `@astrojs/db`
* Revert unnecessarily cautious temporary path name
This reverts commit ef2156e41b
.
* Add changeset
* Fix entrypoints and `asDrizzleTable` usage in changeset
* Getting Nate in on the co-author action
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Fix user seed file in integrations fixture
* Update `seedLocal()` after merge
* Provide empty `seedFiles` array in `db execute`
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-03-07 20:19:17 +01:00
Ben Holmes
e086a9f8c8
[ci] format
2024-03-07 18:39:47 +00:00
Ben Holmes
06fe94e29d
Add --remote
flag for remote connection ( #10352 )
...
* feat: check for --remote
* chore: remove bad ticketing example cols
* fix: get seed file working with build
* Revert "fix: get seed file working with build"
This reverts commit 92830a106164b0997c820a3e0bf2a582018084a0.
* fix: seed from build instead of runtime
* refactor: move recreateTables out of runtime
* Revert "refactor: move recreateTables out of runtime"
This reverts commit d01a802ad7915fabc4c4ac35b2d907eae0538d95.
* fix: in-memory db for test fixture
* chore: changeset
* refactor: generate random db name instead
* refactor: use yargs-parser for flag
* chore: remove in-memory db logi
* refactor: rename random id flag for clarity
* feat: support --remote in dev
* feat: support --remote on shell
* refactor: inline db client
* feat: support --remote on db execute
* chore: stray console log
* chore: remove recreateTables from runtime
* chore: update seeding for new signature
* chore: remove unused error imports
2024-03-07 13:38:43 -05:00
Chris Swithinbank
bad9b583a2
Update seed to use export default function() instead of top-level await ( #10334 )
...
* Update fixtures seed files to export default function
* Call default export when running seed files
* Add changeset
2024-03-07 13:04:16 -05:00
Ben Holmes
5a9dab286f
Fix: drizzle vs. config runtime export conflict ( #10357 )
...
* fix: drizzle vs config export problem
* chore: remove drizzle runtime export
* chore: changeset
2024-03-07 12:55:33 -05:00
Matthew Phillips
652bd497dc
[ci] format
2024-03-07 16:38:45 +00:00
Matthew Phillips
9f422e9bd3
db: rename experimentalVersion to version ( #10348 )
...
* db: rename experimentalVersion to version
* Fix tests
* Update .changeset/fluffy-bobcats-arrive.md
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-03-07 11:37:36 -05:00
Houston (Bot)
e88eeb0337
[ci] release ( #10351 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-06 23:54:18 -08:00
Luiz Ferraz
393ad9b2aa
Include virtual declaration in package ( #10350 )
...
* Include virtual declaration in package
* Update .changeset/good-rats-bathe.md
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-03-06 17:00:22 -06:00
Houston (Bot)
c793f194c9
[ci] release ( #10344 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-06 11:07:43 -05:00
Matthew Phillips
a2e9b2b936
Fixes loading .ts configs in astro:db ( #10342 )
2024-03-06 09:50:02 -05:00
Houston (Bot)
1d9fb15a2d
[ci] release ( #10341 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-06 08:53:27 -05:00
Ben Holmes
a60861c960
fix: move db ambient types to separate module ( #10340 )
...
* fix: move ambient types to separate modue
* chore: changeset
2024-03-06 08:30:45 -05:00
Houston (Bot)
038201fbae
[ci] release ( #10337 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-05 16:58:48 -08:00
Fred K. Schott
f2e60a9675
Revert bad release ( #10336 )
...
* Revert "[ci] release (#10332 )"
This reverts commit dd3935b31c
.
* Revert "[ci] set `--tag` on release (#10323 )"
This reverts commit 50215ae731
.
2024-03-05 16:47:15 -08:00
Houston (Bot)
dd3935b31c
[ci] release ( #10332 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-05 16:26:25 -08:00
Fred K. Schott
e1477bb3d6
[ci] format
2024-03-05 19:45:27 +00:00
Fred K. Schott
24bc169070
add back data loss confirmation handling ( #10330 )
2024-03-05 14:44:19 -05:00
Matthew Phillips
57bded3057
Add minimal @astrojs/db readme ( #10331 )
2024-03-05 08:36:37 -05:00
Houston (Bot)
d1700cf731
[ci] release ( #10314 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-04 13:17:06 -05:00
Ben Holmes
78ddfadbf9
fix: reference base types ( #10315 )
...
* fix: reference root types
* chore: changeset
* chore: stray console log
2024-03-04 09:14:56 -05:00
Houston (Bot)
5afc8f2088
[ci] release ( #10306 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-04 03:09:24 -08:00
Fred K. Schott
725f83fdb9
small fix to an incorrect check ( #10300 )
2024-03-04 03:01:20 -08:00
Fred K. Schott
cb00c8b692
fix package json types ( #10313 )
2024-03-04 02:59:41 -08:00
Fred K. Schott
51393a729b
[ci] format
2024-03-04 10:51:57 +00:00
Fred K. Schott
93ec9e264a
add new migrations system ( #10312 )
2024-03-04 02:50:58 -08:00
Houston (Bot)
2db9031a9f
[ci] release ( #10292 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-02 00:42:07 -08:00
Ben Holmes
25fe5bd040
[ci] format
2024-03-02 00:31:00 +00:00
Ben Holmes
3488be9b59
finalize WIP API ( #10280 )
...
* feat: no more readable / writable
* fix: table typegen
* wip: move data seeding
* chore: add scripts to basics
* feat: data() -> seed file
* refactor: ensure precedence of file name
* feat: db execute command
* fix: test imports
* chore: remove old readable error tests
* feat: support local db with `db execute`
* refactor: remove integrations from test for now
* chore: stray comment
* chore: remove `table` config object
* feat: `db.batch`!
* refactor: move migrations/ inside db/
* fix: move ticketing-example to seed file
* fix: disable foreign keys when recreating tables
* refactor: standardize migrations dir
* feat: move to db/config.ts
* feat: file watching for db/config.ts dependencies
* feat: remove unsafeDisableStudio
* chroe: remove bad import
* feat: parse config.ts from cli
* chore: remove async from localDatabaseClient
* fix: update recipes config and seed
* chore: update unit tests
* chore: update tests to dev server
* refactor: collectionToTable -> asDrizzleTable
* chore: tidy up collection -> table error states
* refactor: regexp -> endsWith
* feat: pretty error inserting into table
* refactor: try/catch -> catch()
* feat: expose utils for integration seed files
* fix: add config import to db client modules
* fix: just use generic "seeding database" error
* chore: remove unused link args
* fix: migration queries im,port
* chore: remove irrelevant glob/ example
* feat: format migration file path
* feat: support all config file names
* chore: remove db.batch() for now
* chore: remove `db` object
* core: remove unused integration file
* chore: changeset
* fix: foreign key empty error message
* chore: remove old TODO
* fix: bad context reference
* refactor: seedDev -> seedLocal
* wip: throw some console logs at github
* wip: avoid seeding astro:db imported by seed file
* wip: use anything in db/
* refactor: only seed when loaded within srcDir
* refactor: avoid resolution when not seeding
* chore: remove logs
* refactor: seed within create local db client
* refactor: use normalizePath
* wip: logs
* wip: logs
* refactor: early return
* chore: more logs
* refactor: no batch
* fix: use beforeAll
* refactor: move all tests to base block
* wip: log dev server starting
* chore: remove logs
* wip: demo ready
* chore: remove duplicate recreateTables() call
* Revert "wip: demo ready"
This reverts commit 37585ce5cb
.
* refactor: beforeEach to isolate dev servers
* chore: remove useBundledDbUrl
* refactor: naming and seed scope
* chore: remove stray console logs
* wip: fix windows file import
* wip: try fileURLToPath
* Revert "wip: try fileURLToPath"
This reverts commit 46fd65d61a
.
* Revert "wip: fix windows file import"
This reverts commit 1a669ea646
.
* refactor: dir -> directory
* refactor: move execute file to cli
* refactor: remove seed.dev convention
* wip: attempt fileURLToPath
* wip: debug the file exists
* fix: use mjs??
* chore: remove duplicate seedLocal
* chore: remove log check
* refactor: use in memory db for tests
* chore: clean up test comment
* fix: avoid file writes for db setup on in memory db
* chore: bump db changeset to minor
---------
Co-authored-by: Nate Moore <nate@astro.build>
2024-03-01 19:29:55 -05:00
Fred K. Schott
3757a212c0
[ci] format
2024-02-29 05:27:46 +00:00
Fred K. Schott
c2e7b9847e
update login flow to support Brave ( #10258 )
2024-02-28 21:26:19 -08:00
Fred K. Schott
e86b81a671
[ci] format
2024-02-29 05:26:11 +00:00