Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed Mar 22, 2024
1 parent 6576f5d commit 44daced
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions packages/db/src/core/integration/vite-plugin-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions packages/db/src/runtime/db-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion packages/db/test/fixtures/no-apptoken/db/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { column, defineDb, defineTable } from 'astro:db';


const User = defineTable({
columns: {
id: column.text({ primaryKey: true, optional: false }),
Expand Down
5 changes: 1 addition & 4 deletions packages/db/test/fixtures/no-apptoken/db/seed.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@

export default function() {

}
export default function () {}
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 44daced

Please sign in to comment.