Skip to content

Commit ba5b15a

Browse files
authored
feat(cli): Mix in CloudAuthDatabase to database classes (#294)
To ensure that multiple databases are not needed in projects using Cloud Auth, mix in Cloud Auth to users' databases if available, or use the vendored `CloudAuthDatabase` class when there is no database. TODO: - Move migration logic to a proper migration class - Run build_runner if needed
1 parent f30ac59 commit ba5b15a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3957
-1041
lines changed

apps/cli/fixtures/fixtures_test.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,6 @@ class TestRunner {
428428
for (final database in project!.databases.values)
429429
if (database.config case ast.CelestDatabaseConfig(:final hostname))
430430
'--env=${hostname.name}=file::memory:',
431-
if (project.auth?.providers.isNotEmpty ?? false)
432-
'--env=CELEST_AUTH_DATABASE_HOST=file::memory:',
433431
imageName,
434432
],
435433
);
@@ -501,8 +499,6 @@ class TestRunner {
501499
if (database.config
502500
case ast.CelestDatabaseConfig(:final hostname))
503501
hostname.name: 'file::memory:',
504-
if (project.auth?.providers.isNotEmpty ?? false)
505-
'CELEST_AUTH_DATABASE_HOST': 'file::memory:',
506502
},
507503
environmentId: 'local',
508504
verbose: false,

apps/cli/fixtures/standalone/auth/goldens/api.local.dart

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/cli/fixtures/standalone/auth/goldens/ast.json

Lines changed: 87 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/cli/fixtures/standalone/auth/goldens/ast.resolved.json

Lines changed: 119 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/cli/fixtures/standalone/auth/goldens/celest.json

Lines changed: 110 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)