summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthewp@users.noreply.github.com> 2024-03-27 19:21:30 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2024-03-27 19:21:30 +0000
commit016b4b7b136f778936e1056ef55577c67dd289de (patch)
tree1f894aee6f5426b73a255e6a734dd239554be29a
parentf5df12cfebba1abdef50faa7a5549b545f0b3f8c (diff)
downloadastro-016b4b7b136f778936e1056ef55577c67dd289de.tar.gz
astro-016b4b7b136f778936e1056ef55577c67dd289de.tar.zst
astro-016b4b7b136f778936e1056ef55577c67dd289de.zip
[ci] format
-rw-r--r--packages/db/src/core/integration/index.ts11
-rw-r--r--packages/db/test/local-prod.test.js4
2 files changed, 10 insertions, 5 deletions
diff --git a/packages/db/src/core/integration/index.ts b/packages/db/src/core/integration/index.ts
index d288475a5..df03df9df 100644
--- a/packages/db/src/core/integration/index.ts
+++ b/packages/db/src/core/integration/index.ts
@@ -5,6 +5,7 @@ import type { AstroConfig, AstroIntegration } from 'astro';
import { AstroError } from 'astro/errors';
import { mkdir, writeFile } from 'fs/promises';
import { blue, yellow } from 'kleur/colors';
+import { loadEnv } from 'vite';
import parseArgs from 'yargs-parser';
import { CONFIG_FILE_NAMES, DB_PATH } from '../consts.js';
import { resolveDbConfig } from '../load-file.js';
@@ -14,7 +15,6 @@ import { fileURLIntegration } from './file-url.js';
import { typegenInternal } from './typegen.js';
import { type LateSeedFiles, type LateTables, vitePluginDb } from './vite-plugin-db.js';
import { vitePluginInjectEnvTs } from './vite-plugin-inject-env-ts.js';
-import { loadEnv } from 'vite';
function astroDBIntegration(): AstroIntegration {
let connectToStudio = false;
@@ -115,9 +115,14 @@ function astroDBIntegration(): AstroIntegration {
});
},
'astro:build:start': async ({ logger }) => {
- if(!connectToStudio && !databaseFileEnvDefined() && (output === 'server' || output === 'hybrid')) {
+ if (
+ !connectToStudio &&
+ !databaseFileEnvDefined() &&
+ (output === 'server' || output === 'hybrid')
+ ) {
const message = `Attempting to build without the --remote flag or the ASTRO_DATABASE_FILE environment variable defined. You probably want to pass --remote to astro build.`;
- const hint = 'Learn more connecting to Studio: https://docs.astro.build/en/guides/astro-db/#connect-to-astro-studio';
+ const hint =
+ 'Learn more connecting to Studio: https://docs.astro.build/en/guides/astro-db/#connect-to-astro-studio';
throw new AstroError(message, hint);
}
diff --git a/packages/db/test/local-prod.test.js b/packages/db/test/local-prod.test.js
index 16682d57a..150c2383f 100644
--- a/packages/db/test/local-prod.test.js
+++ b/packages/db/test/local-prod.test.js
@@ -37,7 +37,7 @@ describe('astro:db local database', () => {
let buildError = null;
try {
await fixture.build();
- } catch(err) {
+ } catch (err) {
buildError = err;
}
@@ -55,7 +55,7 @@ describe('astro:db local database', () => {
let buildError = null;
try {
await fixture2.build();
- } catch(err) {
+ } catch (err) {
buildError = err;
}