0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-04-07 23:41:43 -05:00

[ci] format

This commit is contained in:
Matthew Phillips 2024-03-22 15:53:54 +00:00 committed by astrobot-houston
parent 6576f5d458
commit 44dacedb3a
5 changed files with 7 additions and 10 deletions

View file

@ -41,9 +41,9 @@ export function vitePluginDb(params: VitePluginDBParams): VitePlugin {
return {
name: 'astro:db',
enforce: 'pre',
configResolved(resolvedConfig) {
configResolved(resolvedConfig) {
command = resolvedConfig.command;
},
},
async resolveId(id, rawImporter) {
if (id !== VIRTUAL_MODULE_ID) return;
if (params.connectToStudio) return resolved.virtual;
@ -147,7 +147,7 @@ export function getStudioVirtualModContents({
isBuild: boolean;
}) {
function appTokenArg() {
if(isBuild) {
if (isBuild) {
// In production build, always read the runtime environment variable.
return 'process.env.ASTRO_STUDIO_APP_TOKEN';
} else {

View file

@ -36,8 +36,8 @@ const remoteResultSchema = z.object({
});
export function createRemoteDatabaseClient(appToken: string, remoteDbURL: string) {
if(appToken == null) {
throw new Error(`Cannot create a remote client: missing app token.`)
if (appToken == null) {
throw new Error(`Cannot create a remote client: missing app token.`);
}
const url = new URL('/db/query', remoteDbURL);

View file

@ -1,6 +1,5 @@
import { column, defineDb, defineTable } from 'astro:db';
const User = defineTable({
columns: {
id: column.text({ primaryKey: true, optional: false }),

View file

@ -1,4 +1 @@
export default function() {
}
export default function () {}

View file

@ -5,6 +5,7 @@ import { db, User } from 'astro:db';
// Just for the side-effect of running all the code
await db.select().from(User);
---
<html>
<head>
<title>Testing</title>